From e793c705b3f9f6b9756916be0c76613871dbfc4c Mon Sep 17 00:00:00 2001 From: Stephen Owen Date: Thu, 20 Aug 2020 18:00:09 -0400 Subject: [PATCH 01/20] Includes Generated Files And Half Of Unit Test Coverage --- .../Microsoft.Azure.Management.Automanage.sln | 31 + .../src/AzSdk.RP.props | 7 + .../src/CHANGELOG.md | 11 + .../src/Generated/AccountsOperations.cs | 1233 ++++++++++++++++ .../Generated/AccountsOperationsExtensions.cs | 258 ++++ .../src/Generated/AutomanageClient.cs | 379 +++++ ...nfigurationProfileAssignmentsOperations.cs | 1078 ++++++++++++++ ...nProfileAssignmentsOperationsExtensions.cs | 286 ++++ ...nfigurationProfilePreferencesOperations.cs | 1234 +++++++++++++++++ ...nProfilePreferencesOperationsExtensions.cs | 260 ++++ .../src/Generated/IAccountsOperations.cs | 172 +++ .../src/Generated/IAutomanageClient.cs | 95 ++ ...nfigurationProfileAssignmentsOperations.cs | 190 +++ ...nfigurationProfilePreferencesOperations.cs | 175 +++ .../src/Generated/IOperations.cs | 46 + .../src/Generated/Models/Account.cs | 61 + .../src/Generated/Models/AccountIdentity.cs | 75 + .../Generated/Models/ConfigurationProfile.cs | 22 + .../Models/ConfigurationProfileAssignment.cs | 61 + ...onfigurationProfileAssignmentCompliance.cs | 56 + ...onfigurationProfileAssignmentProperties.cs | 105 ++ .../Models/ConfigurationProfilePreference.cs | 63 + ...nfigurationProfilePreferenceAntiMalware.cs | 101 ++ ...onfigurationProfilePreferenceProperties.cs | 63 + .../ConfigurationProfilePreferenceVmBackup.cs | 83 ++ .../Models/EnableRealTimeProtection.cs | 22 + .../src/Generated/Models/ErrorResponse.cs | 51 + .../src/Generated/Models/ErrorResponseBody.cs | 73 + .../Models/ErrorResponseException.cs | 62 + .../src/Generated/Models/Operation.cs | 85 ++ .../src/Generated/Models/OperationDisplay.cs | 78 ++ .../src/Generated/Models/Page.cs | 53 + .../Generated/Models/ProvisioningStatus.cs | 23 + .../src/Generated/Models/ProxyResource.cs | 48 + .../src/Generated/Models/Resource.cs | 78 ++ .../Generated/Models/ResourceIdentityType.cs | 60 + .../src/Generated/Models/RunScheduledScan.cs | 22 + .../src/Generated/Models/ScanType.cs | 22 + .../src/Generated/Models/TrackedResource.cs | 59 + .../src/Generated/Models/UpdateStatus.cs | 23 + .../src/Generated/Operations.cs | 222 +++ .../src/Generated/OperationsExtensions.cs | 55 + ...crosoft.Azure.Management.Automanage.csproj | 24 + .../src/generate.ps1 | 1 + .../Helpers/RecordedDelegatingHandler.cs | 94 ++ ...t.Azure.Management.Automanage.Tests.csproj | 30 + .../tests/ScenarioTests/AccountsTests.cs | 43 + .../ConfigurationProfilesAssignmentsTests.cs | 58 + .../tests/ScenarioTests/OperationsTests.cs | 72 + .../tests/ScenarioTests/TestBase.cs | 141 ++ ...ountsOperationsGetsAllValidOperations.json | 74 + ...AccountsOperationsGetsExpectedAccount.json | 74 + .../OperationsTests/ListOperationsTest.json | 69 + 53 files changed, 7861 insertions(+) create mode 100644 sdk/automanage/Microsoft.Azure.Management.Automanage/Microsoft.Azure.Management.Automanage.sln create mode 100644 sdk/automanage/Microsoft.Azure.Management.Automanage/src/AzSdk.RP.props create mode 100644 sdk/automanage/Microsoft.Azure.Management.Automanage/src/CHANGELOG.md create mode 100644 sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/AccountsOperations.cs create mode 100644 sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/AccountsOperationsExtensions.cs create mode 100644 sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/AutomanageClient.cs create mode 100644 sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/ConfigurationProfileAssignmentsOperations.cs create mode 100644 sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/ConfigurationProfileAssignmentsOperationsExtensions.cs create mode 100644 sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/ConfigurationProfilePreferencesOperations.cs create mode 100644 sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/ConfigurationProfilePreferencesOperationsExtensions.cs create mode 100644 sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/IAccountsOperations.cs create mode 100644 sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/IAutomanageClient.cs create mode 100644 sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/IConfigurationProfileAssignmentsOperations.cs create mode 100644 sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/IConfigurationProfilePreferencesOperations.cs create mode 100644 sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/IOperations.cs create mode 100644 sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/Account.cs create mode 100644 sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/AccountIdentity.cs create mode 100644 sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfile.cs create mode 100644 sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfileAssignment.cs create mode 100644 sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfileAssignmentCompliance.cs create mode 100644 sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfileAssignmentProperties.cs create mode 100644 sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfilePreference.cs create mode 100644 sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfilePreferenceAntiMalware.cs create mode 100644 sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfilePreferenceProperties.cs create mode 100644 sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfilePreferenceVmBackup.cs create mode 100644 sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/EnableRealTimeProtection.cs create mode 100644 sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ErrorResponse.cs create mode 100644 sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ErrorResponseBody.cs create mode 100644 sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ErrorResponseException.cs create mode 100644 sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/Operation.cs create mode 100644 sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/OperationDisplay.cs create mode 100644 sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/Page.cs create mode 100644 sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ProvisioningStatus.cs create mode 100644 sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ProxyResource.cs create mode 100644 sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/Resource.cs create mode 100644 sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ResourceIdentityType.cs create mode 100644 sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/RunScheduledScan.cs create mode 100644 sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ScanType.cs create mode 100644 sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/TrackedResource.cs create mode 100644 sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/UpdateStatus.cs create mode 100644 sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Operations.cs create mode 100644 sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/OperationsExtensions.cs create mode 100644 sdk/automanage/Microsoft.Azure.Management.Automanage/src/Microsoft.Azure.Management.Automanage.csproj create mode 100644 sdk/automanage/Microsoft.Azure.Management.Automanage/src/generate.ps1 create mode 100644 sdk/automanage/Microsoft.Azure.Management.Automanage/tests/Helpers/RecordedDelegatingHandler.cs create mode 100644 sdk/automanage/Microsoft.Azure.Management.Automanage/tests/Microsoft.Azure.Management.Automanage.Tests.csproj create mode 100644 sdk/automanage/Microsoft.Azure.Management.Automanage/tests/ScenarioTests/AccountsTests.cs create mode 100644 sdk/automanage/Microsoft.Azure.Management.Automanage/tests/ScenarioTests/ConfigurationProfilesAssignmentsTests.cs create mode 100644 sdk/automanage/Microsoft.Azure.Management.Automanage/tests/ScenarioTests/OperationsTests.cs create mode 100644 sdk/automanage/Microsoft.Azure.Management.Automanage/tests/ScenarioTests/TestBase.cs create mode 100644 sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/AccountsTests/AccountsOperationsGetsAllValidOperations.json create mode 100644 sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/AccountsTests/AccountsOperationsGetsExpectedAccount.json create mode 100644 sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/OperationsTests/ListOperationsTest.json diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/Microsoft.Azure.Management.Automanage.sln b/sdk/automanage/Microsoft.Azure.Management.Automanage/Microsoft.Azure.Management.Automanage.sln new file mode 100644 index 0000000000000..51f15afc25721 --- /dev/null +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/Microsoft.Azure.Management.Automanage.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30225.117 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Management.Automanage", "src\Microsoft.Azure.Management.Automanage.csproj", "{729E0304-87FD-499C-A0EB-A9339D91A3FF}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Management.Automanage.Tests", "tests\Microsoft.Azure.Management.Automanage.Tests.csproj", "{BF6E0BED-7C6B-47FF-82C1-AD40FE0350EA}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {729E0304-87FD-499C-A0EB-A9339D91A3FF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {729E0304-87FD-499C-A0EB-A9339D91A3FF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {729E0304-87FD-499C-A0EB-A9339D91A3FF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {729E0304-87FD-499C-A0EB-A9339D91A3FF}.Release|Any CPU.Build.0 = Release|Any CPU + {BF6E0BED-7C6B-47FF-82C1-AD40FE0350EA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BF6E0BED-7C6B-47FF-82C1-AD40FE0350EA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BF6E0BED-7C6B-47FF-82C1-AD40FE0350EA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BF6E0BED-7C6B-47FF-82C1-AD40FE0350EA}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {A29B8186-E93D-41BD-B5DB-55FCC7BCAB27} + EndGlobalSection +EndGlobal diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/AzSdk.RP.props b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/AzSdk.RP.props new file mode 100644 index 0000000000000..bb65d484a8adf --- /dev/null +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/AzSdk.RP.props @@ -0,0 +1,7 @@ + + + + Automation_2015-10-31;Automation_2018-01-15;Automation_2017-05-15-preview;Automation_2018-06-30; + $(PackageTags);$(CommonTags);$(AzureApiTag); + + \ No newline at end of file diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/CHANGELOG.md b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/CHANGELOG.md new file mode 100644 index 0000000000000..acc61cade724d --- /dev/null +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/CHANGELOG.md @@ -0,0 +1,11 @@ +# Microsoft.Azure.Management.GuestConfiguration release notes + +## Changes in 0.6.0-preview +### Features +Provides Microsoft Azure Automanage operations including the ability to create, update and get guest configuration assignments, compliance statuses, guest configuration assignment reports. + +### Bug fixes +None + +### REST API version +This version of the GuestConfiguration .NET client library targets version 2020-06-30-preview of the Azure Automanage REST API. \ No newline at end of file diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/AccountsOperations.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/AccountsOperations.cs new file mode 100644 index 0000000000000..65b8232de9d2f --- /dev/null +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/AccountsOperations.cs @@ -0,0 +1,1233 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Automanage +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// AccountsOperations operations. + /// + internal partial class AccountsOperations : IServiceOperations, IAccountsOperations + { + /// + /// Initializes a new instance of the AccountsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal AccountsOperations(AutomanageClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the AutomanageClient + /// + public AutomanageClient Client { get; private set; } + + /// + /// Creates an Automanage Account + /// + /// + /// Name of the Automanage account. + /// + /// + /// The resource group name. + /// + /// + /// Parameters supplied to create or update Automanage account. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateOrUpdateWithHttpMessagesAsync(string accountName, string resourceGroupName, Account parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (accountName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "accountName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._]+$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("accountName", accountName); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automanage/accounts/{accountName}").ToString(); + _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 201) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 201) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Get information about a Automanage account + /// + /// + /// The Automanage account name. + /// + /// + /// The resource group name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetWithHttpMessagesAsync(string accountName, string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (accountName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "accountName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._]+$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("accountName", accountName); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automanage/accounts/{accountName}").ToString(); + _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Delete a Automanage account + /// + /// + /// The resource group name. + /// + /// + /// Name of the Automanage account + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string accountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._]+$"); + } + } + if (accountName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "accountName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("accountName", accountName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automanage/accounts/{accountName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 204) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Updates an Automanage Account + /// + /// + /// Name of the Automanage account. + /// + /// + /// The resource group name. + /// + /// + /// Parameters supplied to update Automanage account. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> UpdateWithHttpMessagesAsync(string accountName, string resourceGroupName, Account parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (accountName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "accountName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._]+$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("accountName", accountName); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automanage/accounts/{accountName}").ToString(); + _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Retrieve a list of Automanage accounts within a given resource group + /// + /// + /// The resource group name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._]+$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroup", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automanage/accounts").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Retrieve a list of Automanage accounts within a subscription + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListBySubscriptionWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListBySubscription", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Automanage/accounts").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/AccountsOperationsExtensions.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/AccountsOperationsExtensions.cs new file mode 100644 index 0000000000000..49b38f8198e93 --- /dev/null +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/AccountsOperationsExtensions.cs @@ -0,0 +1,258 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Automanage +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for AccountsOperations. + /// + public static partial class AccountsOperationsExtensions + { + /// + /// Creates an Automanage Account + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Automanage account. + /// + /// + /// The resource group name. + /// + /// + /// Parameters supplied to create or update Automanage account. + /// + public static Account CreateOrUpdate(this IAccountsOperations operations, string accountName, string resourceGroupName, Account parameters) + { + return operations.CreateOrUpdateAsync(accountName, resourceGroupName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Creates an Automanage Account + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Automanage account. + /// + /// + /// The resource group name. + /// + /// + /// Parameters supplied to create or update Automanage account. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this IAccountsOperations operations, string accountName, string resourceGroupName, Account parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(accountName, resourceGroupName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Get information about a Automanage account + /// + /// + /// The operations group for this extension method. + /// + /// + /// The Automanage account name. + /// + /// + /// The resource group name. + /// + public static Account Get(this IAccountsOperations operations, string accountName, string resourceGroupName) + { + return operations.GetAsync(accountName, resourceGroupName).GetAwaiter().GetResult(); + } + + /// + /// Get information about a Automanage account + /// + /// + /// The operations group for this extension method. + /// + /// + /// The Automanage account name. + /// + /// + /// The resource group name. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IAccountsOperations operations, string accountName, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(accountName, resourceGroupName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Delete a Automanage account + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// Name of the Automanage account + /// + public static void Delete(this IAccountsOperations operations, string resourceGroupName, string accountName) + { + operations.DeleteAsync(resourceGroupName, accountName).GetAwaiter().GetResult(); + } + + /// + /// Delete a Automanage account + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// Name of the Automanage account + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IAccountsOperations operations, string resourceGroupName, string accountName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, accountName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Updates an Automanage Account + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Automanage account. + /// + /// + /// The resource group name. + /// + /// + /// Parameters supplied to update Automanage account. + /// + public static Account Update(this IAccountsOperations operations, string accountName, string resourceGroupName, Account parameters) + { + return operations.UpdateAsync(accountName, resourceGroupName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Updates an Automanage Account + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Automanage account. + /// + /// + /// The resource group name. + /// + /// + /// Parameters supplied to update Automanage account. + /// + /// + /// The cancellation token. + /// + public static async Task UpdateAsync(this IAccountsOperations operations, string accountName, string resourceGroupName, Account parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.UpdateWithHttpMessagesAsync(accountName, resourceGroupName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Retrieve a list of Automanage accounts within a given resource group + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + public static IEnumerable ListByResourceGroup(this IAccountsOperations operations, string resourceGroupName) + { + return operations.ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult(); + } + + /// + /// Retrieve a list of Automanage accounts within a given resource group + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByResourceGroupAsync(this IAccountsOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Retrieve a list of Automanage accounts within a subscription + /// + /// + /// The operations group for this extension method. + /// + public static IEnumerable ListBySubscription(this IAccountsOperations operations) + { + return operations.ListBySubscriptionAsync().GetAwaiter().GetResult(); + } + + /// + /// Retrieve a list of Automanage accounts within a subscription + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task> ListBySubscriptionAsync(this IAccountsOperations operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListBySubscriptionWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/AutomanageClient.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/AutomanageClient.cs new file mode 100644 index 0000000000000..f817a238c76a2 --- /dev/null +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/AutomanageClient.cs @@ -0,0 +1,379 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Automanage +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Serialization; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + + /// + /// Automanage Client + /// + public partial class AutomanageClient : ServiceClient, IAutomanageClient, IAzureClient + { + /// + /// The base URI of the service. + /// + public System.Uri BaseUri { get; set; } + + /// + /// Gets or sets json serialization settings. + /// + public JsonSerializerSettings SerializationSettings { get; private set; } + + /// + /// Gets or sets json deserialization settings. + /// + public JsonSerializerSettings DeserializationSettings { get; private set; } + + /// + /// Credentials needed for the client to connect to Azure. + /// + public ServiceClientCredentials Credentials { get; private set; } + + /// + /// Client Api Version. + /// + public string ApiVersion { get; private set; } + + /// + /// Subscription ID which uniquely identify Microsoft Azure subscription. The + /// subscription ID forms part of the URI for every service call. + /// + public string SubscriptionId { get; set; } + + /// + /// The preferred language for the response. + /// + public string AcceptLanguage { get; set; } + + /// + /// The retry timeout in seconds for Long Running Operations. Default value is + /// 30. + /// + public int? LongRunningOperationRetryTimeout { get; set; } + + /// + /// Whether a unique x-ms-client-request-id should be generated. When set to + /// true a unique x-ms-client-request-id value is generated and included in + /// each request. Default is true. + /// + public bool? GenerateClientRequestId { get; set; } + + /// + /// Gets the IAccountsOperations. + /// + public virtual IAccountsOperations Accounts { get; private set; } + + /// + /// Gets the IConfigurationProfileAssignmentsOperations. + /// + public virtual IConfigurationProfileAssignmentsOperations ConfigurationProfileAssignments { get; private set; } + + /// + /// Gets the IConfigurationProfilePreferencesOperations. + /// + public virtual IConfigurationProfilePreferencesOperations ConfigurationProfilePreferences { get; private set; } + + /// + /// Gets the IOperations. + /// + public virtual IOperations Operations { get; private set; } + + /// + /// Initializes a new instance of the AutomanageClient class. + /// + /// + /// HttpClient to be used + /// + /// + /// True: will dispose the provided httpClient on calling AutomanageClient.Dispose(). False: will not dispose provided httpClient + protected AutomanageClient(HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClient) + { + Initialize(); + } + + /// + /// Initializes a new instance of the AutomanageClient class. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + protected AutomanageClient(params DelegatingHandler[] handlers) : base(handlers) + { + Initialize(); + } + + /// + /// Initializes a new instance of the AutomanageClient class. + /// + /// + /// Optional. The http client handler used to handle http transport. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + protected AutomanageClient(HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : base(rootHandler, handlers) + { + Initialize(); + } + + /// + /// Initializes a new instance of the AutomanageClient class. + /// + /// + /// Optional. The base URI of the service. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + /// + /// Thrown when a required parameter is null + /// + protected AutomanageClient(System.Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) + { + if (baseUri == null) + { + throw new System.ArgumentNullException("baseUri"); + } + BaseUri = baseUri; + } + + /// + /// Initializes a new instance of the AutomanageClient class. + /// + /// + /// Optional. The base URI of the service. + /// + /// + /// Optional. The http client handler used to handle http transport. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + /// + /// Thrown when a required parameter is null + /// + protected AutomanageClient(System.Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) + { + if (baseUri == null) + { + throw new System.ArgumentNullException("baseUri"); + } + BaseUri = baseUri; + } + + /// + /// Initializes a new instance of the AutomanageClient class. + /// + /// + /// Required. Credentials needed for the client to connect to Azure. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + /// + /// Thrown when a required parameter is null + /// + public AutomanageClient(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) + { + if (credentials == null) + { + throw new System.ArgumentNullException("credentials"); + } + Credentials = credentials; + if (Credentials != null) + { + Credentials.InitializeServiceClient(this); + } + } + + /// + /// Initializes a new instance of the AutomanageClient class. + /// + /// + /// Required. Credentials needed for the client to connect to Azure. + /// + /// + /// HttpClient to be used + /// + /// + /// True: will dispose the provided httpClient on calling AutomanageClient.Dispose(). False: will not dispose provided httpClient + /// + /// Thrown when a required parameter is null + /// + public AutomanageClient(ServiceClientCredentials credentials, HttpClient httpClient, bool disposeHttpClient) : this(httpClient, disposeHttpClient) + { + if (credentials == null) + { + throw new System.ArgumentNullException("credentials"); + } + Credentials = credentials; + if (Credentials != null) + { + Credentials.InitializeServiceClient(this); + } + } + + /// + /// Initializes a new instance of the AutomanageClient class. + /// + /// + /// Required. Credentials needed for the client to connect to Azure. + /// + /// + /// Optional. The http client handler used to handle http transport. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + /// + /// Thrown when a required parameter is null + /// + public AutomanageClient(ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) + { + if (credentials == null) + { + throw new System.ArgumentNullException("credentials"); + } + Credentials = credentials; + if (Credentials != null) + { + Credentials.InitializeServiceClient(this); + } + } + + /// + /// Initializes a new instance of the AutomanageClient class. + /// + /// + /// Optional. The base URI of the service. + /// + /// + /// Required. Credentials needed for the client to connect to Azure. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + /// + /// Thrown when a required parameter is null + /// + public AutomanageClient(System.Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) + { + if (baseUri == null) + { + throw new System.ArgumentNullException("baseUri"); + } + if (credentials == null) + { + throw new System.ArgumentNullException("credentials"); + } + BaseUri = baseUri; + Credentials = credentials; + if (Credentials != null) + { + Credentials.InitializeServiceClient(this); + } + } + + /// + /// Initializes a new instance of the AutomanageClient class. + /// + /// + /// Optional. The base URI of the service. + /// + /// + /// Required. Credentials needed for the client to connect to Azure. + /// + /// + /// Optional. The http client handler used to handle http transport. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + /// + /// Thrown when a required parameter is null + /// + public AutomanageClient(System.Uri baseUri, ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) + { + if (baseUri == null) + { + throw new System.ArgumentNullException("baseUri"); + } + if (credentials == null) + { + throw new System.ArgumentNullException("credentials"); + } + BaseUri = baseUri; + Credentials = credentials; + if (Credentials != null) + { + Credentials.InitializeServiceClient(this); + } + } + + /// + /// An optional partial-method to perform custom initialization. + /// + partial void CustomInitialize(); + /// + /// Initializes client properties. + /// + private void Initialize() + { + Accounts = new AccountsOperations(this); + ConfigurationProfileAssignments = new ConfigurationProfileAssignmentsOperations(this); + ConfigurationProfilePreferences = new ConfigurationProfilePreferencesOperations(this); + Operations = new Operations(this); + BaseUri = new System.Uri("https://management.azure.com"); + ApiVersion = "2020-06-30-preview"; + AcceptLanguage = "en-US"; + LongRunningOperationRetryTimeout = 30; + GenerateClientRequestId = true; + SerializationSettings = new JsonSerializerSettings + { + Formatting = Newtonsoft.Json.Formatting.Indented, + DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, + DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, + NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, + ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, + ContractResolver = new ReadOnlyJsonContractResolver(), + Converters = new List + { + new Iso8601TimeSpanConverter() + } + }; + SerializationSettings.Converters.Add(new TransformationJsonConverter()); + DeserializationSettings = new JsonSerializerSettings + { + DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, + DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, + NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, + ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, + ContractResolver = new ReadOnlyJsonContractResolver(), + Converters = new List + { + new Iso8601TimeSpanConverter() + } + }; + CustomInitialize(); + DeserializationSettings.Converters.Add(new TransformationJsonConverter()); + DeserializationSettings.Converters.Add(new CloudErrorJsonConverter()); + } + } +} diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/ConfigurationProfileAssignmentsOperations.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/ConfigurationProfileAssignmentsOperations.cs new file mode 100644 index 0000000000000..841ad0a27cf12 --- /dev/null +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/ConfigurationProfileAssignmentsOperations.cs @@ -0,0 +1,1078 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Automanage +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ConfigurationProfileAssignmentsOperations operations. + /// + internal partial class ConfigurationProfileAssignmentsOperations : IServiceOperations, IConfigurationProfileAssignmentsOperations + { + /// + /// Initializes a new instance of the ConfigurationProfileAssignmentsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal ConfigurationProfileAssignmentsOperations(AutomanageClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the AutomanageClient + /// + public AutomanageClient Client { get; private set; } + + /// + /// Creates an association between a VM and Automanage configuration profile + /// + /// + /// Name of the configuration profile assignment. Only default is supported. + /// + /// + /// Parameters supplied to the create or update configuration profile + /// assignment. + /// + /// + /// The resource group name. + /// + /// + /// The name of the virtual machine. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> CreateOrUpdateWithHttpMessagesAsync(string configurationProfileAssignmentName, ConfigurationProfileAssignment parameters, string resourceGroupName, string vmName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send Request + AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(configurationProfileAssignmentName, parameters, resourceGroupName, vmName, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get information about a configuration profile assignment + /// + /// + /// The resource group name. + /// + /// + /// The configuration profile assignment name. + /// + /// + /// The name of the virtual machine. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string configurationProfileAssignmentName, string vmName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._]+$"); + } + } + if (configurationProfileAssignmentName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "configurationProfileAssignmentName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (vmName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "vmName"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("configurationProfileAssignmentName", configurationProfileAssignmentName); + tracingParameters.Add("vmName", vmName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/providers/Microsoft.Automanage/configurationProfileAssignments/{configurationProfileAssignmentName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{configurationProfileAssignmentName}", System.Uri.EscapeDataString(configurationProfileAssignmentName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{vmName}", System.Uri.EscapeDataString(vmName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Delete a configuration profile assignment + /// + /// + /// The resource group name. + /// + /// + /// Name of the configuration profile assignment + /// + /// + /// The name of the virtual machine. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string configurationProfileAssignmentName, string vmName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._]+$"); + } + } + if (configurationProfileAssignmentName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "configurationProfileAssignmentName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (vmName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "vmName"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("configurationProfileAssignmentName", configurationProfileAssignmentName); + tracingParameters.Add("vmName", vmName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/providers/Microsoft.Automanage/configurationProfileAssignments/{configurationProfileAssignmentName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{configurationProfileAssignmentName}", System.Uri.EscapeDataString(configurationProfileAssignmentName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{vmName}", System.Uri.EscapeDataString(vmName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 204) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Get list of configuration profile assignments + /// + /// + /// The resource group name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._]+$"); + } + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automanage/configurationProfileAssignments").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Get list of configuration profile assignments under a given subscription + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListBySubscriptionWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListBySubscription", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Automanage/configurationProfileAssignments").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Creates an association between a VM and Automanage configuration profile + /// + /// + /// Name of the configuration profile assignment. Only default is supported. + /// + /// + /// Parameters supplied to the create or update configuration profile + /// assignment. + /// + /// + /// The resource group name. + /// + /// + /// The name of the virtual machine. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> BeginCreateOrUpdateWithHttpMessagesAsync(string configurationProfileAssignmentName, ConfigurationProfileAssignment parameters, string resourceGroupName, string vmName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (configurationProfileAssignmentName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "configurationProfileAssignmentName"); + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._]+$"); + } + } + if (vmName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "vmName"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("configurationProfileAssignmentName", configurationProfileAssignmentName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("vmName", vmName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdate", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/providers/Microsoft.Automanage/configurationProfileAssignments/{configurationProfileAssignmentName}").ToString(); + _url = _url.Replace("{configurationProfileAssignmentName}", System.Uri.EscapeDataString(configurationProfileAssignmentName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{vmName}", System.Uri.EscapeDataString(vmName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 201) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 201) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/ConfigurationProfileAssignmentsOperationsExtensions.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/ConfigurationProfileAssignmentsOperationsExtensions.cs new file mode 100644 index 0000000000000..bd37c422f1f1a --- /dev/null +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/ConfigurationProfileAssignmentsOperationsExtensions.cs @@ -0,0 +1,286 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Automanage +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for ConfigurationProfileAssignmentsOperations. + /// + public static partial class ConfigurationProfileAssignmentsOperationsExtensions + { + /// + /// Creates an association between a VM and Automanage configuration profile + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the configuration profile assignment. Only default is supported. + /// + /// + /// Parameters supplied to the create or update configuration profile + /// assignment. + /// + /// + /// The resource group name. + /// + /// + /// The name of the virtual machine. + /// + public static ConfigurationProfileAssignment CreateOrUpdate(this IConfigurationProfileAssignmentsOperations operations, string configurationProfileAssignmentName, ConfigurationProfileAssignment parameters, string resourceGroupName, string vmName) + { + return operations.CreateOrUpdateAsync(configurationProfileAssignmentName, parameters, resourceGroupName, vmName).GetAwaiter().GetResult(); + } + + /// + /// Creates an association between a VM and Automanage configuration profile + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the configuration profile assignment. Only default is supported. + /// + /// + /// Parameters supplied to the create or update configuration profile + /// assignment. + /// + /// + /// The resource group name. + /// + /// + /// The name of the virtual machine. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this IConfigurationProfileAssignmentsOperations operations, string configurationProfileAssignmentName, ConfigurationProfileAssignment parameters, string resourceGroupName, string vmName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(configurationProfileAssignmentName, parameters, resourceGroupName, vmName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Get information about a configuration profile assignment + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The configuration profile assignment name. + /// + /// + /// The name of the virtual machine. + /// + public static ConfigurationProfileAssignment Get(this IConfigurationProfileAssignmentsOperations operations, string resourceGroupName, string configurationProfileAssignmentName, string vmName) + { + return operations.GetAsync(resourceGroupName, configurationProfileAssignmentName, vmName).GetAwaiter().GetResult(); + } + + /// + /// Get information about a configuration profile assignment + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The configuration profile assignment name. + /// + /// + /// The name of the virtual machine. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IConfigurationProfileAssignmentsOperations operations, string resourceGroupName, string configurationProfileAssignmentName, string vmName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, configurationProfileAssignmentName, vmName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Delete a configuration profile assignment + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// Name of the configuration profile assignment + /// + /// + /// The name of the virtual machine. + /// + public static void Delete(this IConfigurationProfileAssignmentsOperations operations, string resourceGroupName, string configurationProfileAssignmentName, string vmName) + { + operations.DeleteAsync(resourceGroupName, configurationProfileAssignmentName, vmName).GetAwaiter().GetResult(); + } + + /// + /// Delete a configuration profile assignment + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// Name of the configuration profile assignment + /// + /// + /// The name of the virtual machine. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IConfigurationProfileAssignmentsOperations operations, string resourceGroupName, string configurationProfileAssignmentName, string vmName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, configurationProfileAssignmentName, vmName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Get list of configuration profile assignments + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + public static IEnumerable List(this IConfigurationProfileAssignmentsOperations operations, string resourceGroupName) + { + return operations.ListAsync(resourceGroupName).GetAwaiter().GetResult(); + } + + /// + /// Get list of configuration profile assignments + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The cancellation token. + /// + public static async Task> ListAsync(this IConfigurationProfileAssignmentsOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Get list of configuration profile assignments under a given subscription + /// + /// + /// The operations group for this extension method. + /// + public static IEnumerable ListBySubscription(this IConfigurationProfileAssignmentsOperations operations) + { + return operations.ListBySubscriptionAsync().GetAwaiter().GetResult(); + } + + /// + /// Get list of configuration profile assignments under a given subscription + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task> ListBySubscriptionAsync(this IConfigurationProfileAssignmentsOperations operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListBySubscriptionWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates an association between a VM and Automanage configuration profile + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the configuration profile assignment. Only default is supported. + /// + /// + /// Parameters supplied to the create or update configuration profile + /// assignment. + /// + /// + /// The resource group name. + /// + /// + /// The name of the virtual machine. + /// + public static ConfigurationProfileAssignment BeginCreateOrUpdate(this IConfigurationProfileAssignmentsOperations operations, string configurationProfileAssignmentName, ConfigurationProfileAssignment parameters, string resourceGroupName, string vmName) + { + return operations.BeginCreateOrUpdateAsync(configurationProfileAssignmentName, parameters, resourceGroupName, vmName).GetAwaiter().GetResult(); + } + + /// + /// Creates an association between a VM and Automanage configuration profile + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the configuration profile assignment. Only default is supported. + /// + /// + /// Parameters supplied to the create or update configuration profile + /// assignment. + /// + /// + /// The resource group name. + /// + /// + /// The name of the virtual machine. + /// + /// + /// The cancellation token. + /// + public static async Task BeginCreateOrUpdateAsync(this IConfigurationProfileAssignmentsOperations operations, string configurationProfileAssignmentName, ConfigurationProfileAssignment parameters, string resourceGroupName, string vmName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(configurationProfileAssignmentName, parameters, resourceGroupName, vmName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/ConfigurationProfilePreferencesOperations.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/ConfigurationProfilePreferencesOperations.cs new file mode 100644 index 0000000000000..98a6e17bb3630 --- /dev/null +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/ConfigurationProfilePreferencesOperations.cs @@ -0,0 +1,1234 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Automanage +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ConfigurationProfilePreferencesOperations operations. + /// + internal partial class ConfigurationProfilePreferencesOperations : IServiceOperations, IConfigurationProfilePreferencesOperations + { + /// + /// Initializes a new instance of the ConfigurationProfilePreferencesOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal ConfigurationProfilePreferencesOperations(AutomanageClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the AutomanageClient + /// + public AutomanageClient Client { get; private set; } + + /// + /// Creates a configuration profile preference + /// + /// + /// Name of the configuration profile preference. + /// + /// + /// The resource group name. + /// + /// + /// Parameters supplied to create or update configuration profile preference. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateOrUpdateWithHttpMessagesAsync(string configurationProfilePreferenceName, string resourceGroupName, ConfigurationProfilePreference parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (configurationProfilePreferenceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "configurationProfilePreferenceName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._]+$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("configurationProfilePreferenceName", configurationProfilePreferenceName); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automanage/configurationProfilePreferences/{configurationProfilePreferenceName}").ToString(); + _url = _url.Replace("{configurationProfilePreferenceName}", System.Uri.EscapeDataString(configurationProfilePreferenceName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 201) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 201) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Get information about a configuration profile preference + /// + /// + /// The configuration profile preference name. + /// + /// + /// The resource group name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetWithHttpMessagesAsync(string configurationProfilePreferenceName, string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (configurationProfilePreferenceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "configurationProfilePreferenceName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._]+$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("configurationProfilePreferenceName", configurationProfilePreferenceName); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automanage/configurationProfilePreferences/{configurationProfilePreferenceName}").ToString(); + _url = _url.Replace("{configurationProfilePreferenceName}", System.Uri.EscapeDataString(configurationProfilePreferenceName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Delete a configuration profile preference + /// + /// + /// The resource group name. + /// + /// + /// Name of the configuration profile preference + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string configurationProfilePreferenceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._]+$"); + } + } + if (configurationProfilePreferenceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "configurationProfilePreferenceName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("configurationProfilePreferenceName", configurationProfilePreferenceName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automanage/configurationProfilePreferences/{configurationProfilePreferenceName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{configurationProfilePreferenceName}", System.Uri.EscapeDataString(configurationProfilePreferenceName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 204) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Updates a configuration profile preference + /// + /// + /// Name of the configuration profile preference. + /// + /// + /// The resource group name. + /// + /// + /// Parameters supplied to create or update configuration profile preference. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> UpdateWithHttpMessagesAsync(string configurationProfilePreferenceName, string resourceGroupName, ConfigurationProfilePreference parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (configurationProfilePreferenceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "configurationProfilePreferenceName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._]+$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("configurationProfilePreferenceName", configurationProfilePreferenceName); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automanage/configurationProfilePreferences/{configurationProfilePreferenceName}").ToString(); + _url = _url.Replace("{configurationProfilePreferenceName}", System.Uri.EscapeDataString(configurationProfilePreferenceName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Retrieve a list of configuration profile preferences within a given + /// resource group + /// + /// + /// The resource group name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._]+$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroup", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automanage/configurationProfilePreferences").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Retrieve a list of configuration profile preferences within a subscription + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListBySubscriptionWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListBySubscription", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Automanage/configurationProfilePreferences").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/ConfigurationProfilePreferencesOperationsExtensions.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/ConfigurationProfilePreferencesOperationsExtensions.cs new file mode 100644 index 0000000000000..f4289cba50a59 --- /dev/null +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/ConfigurationProfilePreferencesOperationsExtensions.cs @@ -0,0 +1,260 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Automanage +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for ConfigurationProfilePreferencesOperations. + /// + public static partial class ConfigurationProfilePreferencesOperationsExtensions + { + /// + /// Creates a configuration profile preference + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the configuration profile preference. + /// + /// + /// The resource group name. + /// + /// + /// Parameters supplied to create or update configuration profile preference. + /// + public static ConfigurationProfilePreference CreateOrUpdate(this IConfigurationProfilePreferencesOperations operations, string configurationProfilePreferenceName, string resourceGroupName, ConfigurationProfilePreference parameters) + { + return operations.CreateOrUpdateAsync(configurationProfilePreferenceName, resourceGroupName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Creates a configuration profile preference + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the configuration profile preference. + /// + /// + /// The resource group name. + /// + /// + /// Parameters supplied to create or update configuration profile preference. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this IConfigurationProfilePreferencesOperations operations, string configurationProfilePreferenceName, string resourceGroupName, ConfigurationProfilePreference parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(configurationProfilePreferenceName, resourceGroupName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Get information about a configuration profile preference + /// + /// + /// The operations group for this extension method. + /// + /// + /// The configuration profile preference name. + /// + /// + /// The resource group name. + /// + public static ConfigurationProfilePreference Get(this IConfigurationProfilePreferencesOperations operations, string configurationProfilePreferenceName, string resourceGroupName) + { + return operations.GetAsync(configurationProfilePreferenceName, resourceGroupName).GetAwaiter().GetResult(); + } + + /// + /// Get information about a configuration profile preference + /// + /// + /// The operations group for this extension method. + /// + /// + /// The configuration profile preference name. + /// + /// + /// The resource group name. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IConfigurationProfilePreferencesOperations operations, string configurationProfilePreferenceName, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(configurationProfilePreferenceName, resourceGroupName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Delete a configuration profile preference + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// Name of the configuration profile preference + /// + public static void Delete(this IConfigurationProfilePreferencesOperations operations, string resourceGroupName, string configurationProfilePreferenceName) + { + operations.DeleteAsync(resourceGroupName, configurationProfilePreferenceName).GetAwaiter().GetResult(); + } + + /// + /// Delete a configuration profile preference + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// Name of the configuration profile preference + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IConfigurationProfilePreferencesOperations operations, string resourceGroupName, string configurationProfilePreferenceName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, configurationProfilePreferenceName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Updates a configuration profile preference + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the configuration profile preference. + /// + /// + /// The resource group name. + /// + /// + /// Parameters supplied to create or update configuration profile preference. + /// + public static ConfigurationProfilePreference Update(this IConfigurationProfilePreferencesOperations operations, string configurationProfilePreferenceName, string resourceGroupName, ConfigurationProfilePreference parameters) + { + return operations.UpdateAsync(configurationProfilePreferenceName, resourceGroupName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Updates a configuration profile preference + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the configuration profile preference. + /// + /// + /// The resource group name. + /// + /// + /// Parameters supplied to create or update configuration profile preference. + /// + /// + /// The cancellation token. + /// + public static async Task UpdateAsync(this IConfigurationProfilePreferencesOperations operations, string configurationProfilePreferenceName, string resourceGroupName, ConfigurationProfilePreference parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.UpdateWithHttpMessagesAsync(configurationProfilePreferenceName, resourceGroupName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Retrieve a list of configuration profile preferences within a given + /// resource group + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + public static IEnumerable ListByResourceGroup(this IConfigurationProfilePreferencesOperations operations, string resourceGroupName) + { + return operations.ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult(); + } + + /// + /// Retrieve a list of configuration profile preferences within a given + /// resource group + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByResourceGroupAsync(this IConfigurationProfilePreferencesOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Retrieve a list of configuration profile preferences within a subscription + /// + /// + /// The operations group for this extension method. + /// + public static IEnumerable ListBySubscription(this IConfigurationProfilePreferencesOperations operations) + { + return operations.ListBySubscriptionAsync().GetAwaiter().GetResult(); + } + + /// + /// Retrieve a list of configuration profile preferences within a subscription + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task> ListBySubscriptionAsync(this IConfigurationProfilePreferencesOperations operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListBySubscriptionWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/IAccountsOperations.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/IAccountsOperations.cs new file mode 100644 index 0000000000000..a3fbaf02dc023 --- /dev/null +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/IAccountsOperations.cs @@ -0,0 +1,172 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Automanage +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// AccountsOperations operations. + /// + public partial interface IAccountsOperations + { + /// + /// Creates an Automanage Account + /// + /// + /// Name of the Automanage account. + /// + /// + /// The resource group name. + /// + /// + /// Parameters supplied to create or update Automanage account. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> CreateOrUpdateWithHttpMessagesAsync(string accountName, string resourceGroupName, Account parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get information about a Automanage account + /// + /// + /// The Automanage account name. + /// + /// + /// The resource group name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetWithHttpMessagesAsync(string accountName, string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Delete a Automanage account + /// + /// + /// The resource group name. + /// + /// + /// Name of the Automanage account + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + Task DeleteWithHttpMessagesAsync(string resourceGroupName, string accountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Updates an Automanage Account + /// + /// + /// Name of the Automanage account. + /// + /// + /// The resource group name. + /// + /// + /// Parameters supplied to update Automanage account. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> UpdateWithHttpMessagesAsync(string accountName, string resourceGroupName, Account parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Retrieve a list of Automanage accounts within a given resource + /// group + /// + /// + /// The resource group name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Retrieve a list of Automanage accounts within a subscription + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListBySubscriptionWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/IAutomanageClient.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/IAutomanageClient.cs new file mode 100644 index 0000000000000..6c188aab1e5ac --- /dev/null +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/IAutomanageClient.cs @@ -0,0 +1,95 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Automanage +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + + /// + /// Automanage Client + /// + public partial interface IAutomanageClient : System.IDisposable + { + /// + /// The base URI of the service. + /// + System.Uri BaseUri { get; set; } + + /// + /// Gets or sets json serialization settings. + /// + JsonSerializerSettings SerializationSettings { get; } + + /// + /// Gets or sets json deserialization settings. + /// + JsonSerializerSettings DeserializationSettings { get; } + + /// + /// Credentials needed for the client to connect to Azure. + /// + ServiceClientCredentials Credentials { get; } + + /// + /// Client Api Version. + /// + string ApiVersion { get; } + + /// + /// Subscription ID which uniquely identify Microsoft Azure + /// subscription. The subscription ID forms part of the URI for every + /// service call. + /// + string SubscriptionId { get; set; } + + /// + /// The preferred language for the response. + /// + string AcceptLanguage { get; set; } + + /// + /// The retry timeout in seconds for Long Running Operations. Default + /// value is 30. + /// + int? LongRunningOperationRetryTimeout { get; set; } + + /// + /// Whether a unique x-ms-client-request-id should be generated. When + /// set to true a unique x-ms-client-request-id value is generated and + /// included in each request. Default is true. + /// + bool? GenerateClientRequestId { get; set; } + + + /// + /// Gets the IAccountsOperations. + /// + IAccountsOperations Accounts { get; } + + /// + /// Gets the IConfigurationProfileAssignmentsOperations. + /// + IConfigurationProfileAssignmentsOperations ConfigurationProfileAssignments { get; } + + /// + /// Gets the IConfigurationProfilePreferencesOperations. + /// + IConfigurationProfilePreferencesOperations ConfigurationProfilePreferences { get; } + + /// + /// Gets the IOperations. + /// + IOperations Operations { get; } + + } +} diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/IConfigurationProfileAssignmentsOperations.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/IConfigurationProfileAssignmentsOperations.cs new file mode 100644 index 0000000000000..ce75480dd0a46 --- /dev/null +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/IConfigurationProfileAssignmentsOperations.cs @@ -0,0 +1,190 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Automanage +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ConfigurationProfileAssignmentsOperations operations. + /// + public partial interface IConfigurationProfileAssignmentsOperations + { + /// + /// Creates an association between a VM and Automanage configuration + /// profile + /// + /// + /// Name of the configuration profile assignment. Only default is + /// supported. + /// + /// + /// Parameters supplied to the create or update configuration profile + /// assignment. + /// + /// + /// The resource group name. + /// + /// + /// The name of the virtual machine. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> CreateOrUpdateWithHttpMessagesAsync(string configurationProfileAssignmentName, ConfigurationProfileAssignment parameters, string resourceGroupName, string vmName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get information about a configuration profile assignment + /// + /// + /// The resource group name. + /// + /// + /// The configuration profile assignment name. + /// + /// + /// The name of the virtual machine. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetWithHttpMessagesAsync(string resourceGroupName, string configurationProfileAssignmentName, string vmName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Delete a configuration profile assignment + /// + /// + /// The resource group name. + /// + /// + /// Name of the configuration profile assignment + /// + /// + /// The name of the virtual machine. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + Task DeleteWithHttpMessagesAsync(string resourceGroupName, string configurationProfileAssignmentName, string vmName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get list of configuration profile assignments + /// + /// + /// The resource group name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get list of configuration profile assignments under a given + /// subscription + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListBySubscriptionWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates an association between a VM and Automanage configuration + /// profile + /// + /// + /// Name of the configuration profile assignment. Only default is + /// supported. + /// + /// + /// Parameters supplied to the create or update configuration profile + /// assignment. + /// + /// + /// The resource group name. + /// + /// + /// The name of the virtual machine. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> BeginCreateOrUpdateWithHttpMessagesAsync(string configurationProfileAssignmentName, ConfigurationProfileAssignment parameters, string resourceGroupName, string vmName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/IConfigurationProfilePreferencesOperations.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/IConfigurationProfilePreferencesOperations.cs new file mode 100644 index 0000000000000..583cf07ae647b --- /dev/null +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/IConfigurationProfilePreferencesOperations.cs @@ -0,0 +1,175 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Automanage +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ConfigurationProfilePreferencesOperations operations. + /// + public partial interface IConfigurationProfilePreferencesOperations + { + /// + /// Creates a configuration profile preference + /// + /// + /// Name of the configuration profile preference. + /// + /// + /// The resource group name. + /// + /// + /// Parameters supplied to create or update configuration profile + /// preference. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> CreateOrUpdateWithHttpMessagesAsync(string configurationProfilePreferenceName, string resourceGroupName, ConfigurationProfilePreference parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get information about a configuration profile preference + /// + /// + /// The configuration profile preference name. + /// + /// + /// The resource group name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetWithHttpMessagesAsync(string configurationProfilePreferenceName, string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Delete a configuration profile preference + /// + /// + /// The resource group name. + /// + /// + /// Name of the configuration profile preference + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + Task DeleteWithHttpMessagesAsync(string resourceGroupName, string configurationProfilePreferenceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Updates a configuration profile preference + /// + /// + /// Name of the configuration profile preference. + /// + /// + /// The resource group name. + /// + /// + /// Parameters supplied to create or update configuration profile + /// preference. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> UpdateWithHttpMessagesAsync(string configurationProfilePreferenceName, string resourceGroupName, ConfigurationProfilePreference parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Retrieve a list of configuration profile preferences within a given + /// resource group + /// + /// + /// The resource group name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Retrieve a list of configuration profile preferences within a + /// subscription + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListBySubscriptionWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/IOperations.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/IOperations.cs new file mode 100644 index 0000000000000..61caee406e41d --- /dev/null +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/IOperations.cs @@ -0,0 +1,46 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Automanage +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Operations operations. + /// + public partial interface IOperations + { + /// + /// Lists all of the available Automanage REST API operations. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/Account.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/Account.cs new file mode 100644 index 0000000000000..faf5333d903b5 --- /dev/null +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/Account.cs @@ -0,0 +1,61 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Automanage.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Definition of the Automanage account. + /// + public partial class Account : TrackedResource + { + /// + /// Initializes a new instance of the Account class. + /// + public Account() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Account class. + /// + /// ARM resource id of the Automanage + /// assignment. + /// Name of the Automanage assignment. + /// Region where the VM is located. + /// The type of the resource. + /// Resource tags. + /// The identity of the Automanage + /// account. + public Account(string id = default(string), string name = default(string), string location = default(string), string type = default(string), IDictionary tags = default(IDictionary), AccountIdentity identity = default(AccountIdentity)) + : base(id, name, location, type, tags) + { + Identity = identity; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the identity of the Automanage account. + /// + [JsonProperty(PropertyName = "identity")] + public AccountIdentity Identity { get; set; } + + } +} diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/AccountIdentity.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/AccountIdentity.cs new file mode 100644 index 0000000000000..7dc6ceec84064 --- /dev/null +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/AccountIdentity.cs @@ -0,0 +1,75 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Automanage.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Identity for the Automanage account. + /// + public partial class AccountIdentity + { + /// + /// Initializes a new instance of the AccountIdentity class. + /// + public AccountIdentity() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AccountIdentity class. + /// + /// The principal id of Automanage account + /// identity. + /// The tenant id associated with the Automanage + /// account. + /// The type of identity used for the Automanage + /// account. Currently, the only supported type is 'SystemAssigned', + /// which implicitly creates an identity. Possible values include: + /// 'SystemAssigned', 'None' + public AccountIdentity(string principalId = default(string), string tenantId = default(string), ResourceIdentityType? type = default(ResourceIdentityType?)) + { + PrincipalId = principalId; + TenantId = tenantId; + Type = type; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the principal id of Automanage account identity. + /// + [JsonProperty(PropertyName = "principalId")] + public string PrincipalId { get; private set; } + + /// + /// Gets the tenant id associated with the Automanage account. + /// + [JsonProperty(PropertyName = "tenantId")] + public string TenantId { get; private set; } + + /// + /// Gets or sets the type of identity used for the Automanage account. + /// Currently, the only supported type is 'SystemAssigned', which + /// implicitly creates an identity. Possible values include: + /// 'SystemAssigned', 'None' + /// + [JsonProperty(PropertyName = "type")] + public ResourceIdentityType? Type { get; set; } + + } +} diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfile.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfile.cs new file mode 100644 index 0000000000000..e44616853159e --- /dev/null +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfile.cs @@ -0,0 +1,22 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Automanage.Models +{ + + /// + /// Defines values for ConfigurationProfile. + /// + public static class ConfigurationProfile + { + public const string AzureBestPracticesTestDev = "Azure Best Practices - TestDev"; + public const string AzureBestPracticesProd = "Azure Best Practices - Prod"; + } +} diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfileAssignment.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfileAssignment.cs new file mode 100644 index 0000000000000..29e4e04a13b24 --- /dev/null +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfileAssignment.cs @@ -0,0 +1,61 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Automanage.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Configuration profile assignment is an association between a VM and + /// automanage profile configuration. + /// + public partial class ConfigurationProfileAssignment : ProxyResource + { + /// + /// Initializes a new instance of the ConfigurationProfileAssignment + /// class. + /// + public ConfigurationProfileAssignment() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ConfigurationProfileAssignment + /// class. + /// + /// ARM resource id of the Automanage + /// assignment. + /// Name of the Automanage assignment. + /// Region where the VM is located. + /// The type of the resource. + /// Properties of the configuration profile + /// assignment. + public ConfigurationProfileAssignment(string id = default(string), string name = default(string), string location = default(string), string type = default(string), ConfigurationProfileAssignmentProperties properties = default(ConfigurationProfileAssignmentProperties)) + : base(id, name, location, type) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets properties of the configuration profile assignment. + /// + [JsonProperty(PropertyName = "properties")] + public ConfigurationProfileAssignmentProperties Properties { get; set; } + + } +} diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfileAssignmentCompliance.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfileAssignmentCompliance.cs new file mode 100644 index 0000000000000..ce4b26bbc6938 --- /dev/null +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfileAssignmentCompliance.cs @@ -0,0 +1,56 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Automanage.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// The compliance status for the configuration profile assignment. + /// + public partial class ConfigurationProfileAssignmentCompliance + { + /// + /// Initializes a new instance of the + /// ConfigurationProfileAssignmentCompliance class. + /// + public ConfigurationProfileAssignmentCompliance() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// ConfigurationProfileAssignmentCompliance class. + /// + /// The state of compliance, which only + /// appears in the response. Possible values include: 'Succeeded', + /// 'Failed', 'Created' + public ConfigurationProfileAssignmentCompliance(string updateStatus = default(string)) + { + UpdateStatus = updateStatus; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the state of compliance, which only appears in the response. + /// Possible values include: 'Succeeded', 'Failed', 'Created' + /// + [JsonProperty(PropertyName = "updateStatus")] + public string UpdateStatus { get; private set; } + + } +} diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfileAssignmentProperties.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfileAssignmentProperties.cs new file mode 100644 index 0000000000000..a1991d0ec9095 --- /dev/null +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfileAssignmentProperties.cs @@ -0,0 +1,105 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Automanage.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Automanage configuration profile assignment properties. + /// + public partial class ConfigurationProfileAssignmentProperties + { + /// + /// Initializes a new instance of the + /// ConfigurationProfileAssignmentProperties class. + /// + public ConfigurationProfileAssignmentProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// ConfigurationProfileAssignmentProperties class. + /// + /// A value indicating configuration + /// profile. Possible values include: 'Azure Best Practices - TestDev', + /// 'Azure Best Practices - Prod' + /// The target VM resource URI + /// The Automanage account ARM Resource + /// URI + /// The configuration + /// profile custom preferences ARM resource URI + /// The state of onboarding, which + /// only appears in the response. Possible values include: 'Succeeded', + /// 'Failed', 'Created' + /// The configuration setting for the + /// configuration profile. + public ConfigurationProfileAssignmentProperties(string configurationProfile = default(string), string targetId = default(string), string accountId = default(string), string configurationProfilePreferenceId = default(string), string provisioningStatus = default(string), ConfigurationProfileAssignmentCompliance compliance = default(ConfigurationProfileAssignmentCompliance)) + { + ConfigurationProfile = configurationProfile; + TargetId = targetId; + AccountId = accountId; + ConfigurationProfilePreferenceId = configurationProfilePreferenceId; + ProvisioningStatus = provisioningStatus; + Compliance = compliance; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a value indicating configuration profile. Possible + /// values include: 'Azure Best Practices - TestDev', 'Azure Best + /// Practices - Prod' + /// + [JsonProperty(PropertyName = "configurationProfile")] + public string ConfigurationProfile { get; set; } + + /// + /// Gets or sets the target VM resource URI + /// + [JsonProperty(PropertyName = "targetId")] + public string TargetId { get; set; } + + /// + /// Gets or sets the Automanage account ARM Resource URI + /// + [JsonProperty(PropertyName = "accountId")] + public string AccountId { get; set; } + + /// + /// Gets or sets the configuration profile custom preferences ARM + /// resource URI + /// + [JsonProperty(PropertyName = "configurationProfilePreferenceId")] + public string ConfigurationProfilePreferenceId { get; set; } + + /// + /// Gets the state of onboarding, which only appears in the response. + /// Possible values include: 'Succeeded', 'Failed', 'Created' + /// + [JsonProperty(PropertyName = "provisioningStatus")] + public string ProvisioningStatus { get; private set; } + + /// + /// Gets or sets the configuration setting for the configuration + /// profile. + /// + [JsonProperty(PropertyName = "compliance")] + public ConfigurationProfileAssignmentCompliance Compliance { get; set; } + + } +} diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfilePreference.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfilePreference.cs new file mode 100644 index 0000000000000..dc99520292c91 --- /dev/null +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfilePreference.cs @@ -0,0 +1,63 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Automanage.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Definition of the configuration profile preference. + /// + public partial class ConfigurationProfilePreference : TrackedResource + { + /// + /// Initializes a new instance of the ConfigurationProfilePreference + /// class. + /// + public ConfigurationProfilePreference() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ConfigurationProfilePreference + /// class. + /// + /// ARM resource id of the Automanage + /// assignment. + /// Name of the Automanage assignment. + /// Region where the VM is located. + /// The type of the resource. + /// Resource tags. + /// Properties of the configuration profile + /// preference. + public ConfigurationProfilePreference(string id = default(string), string name = default(string), string location = default(string), string type = default(string), IDictionary tags = default(IDictionary), ConfigurationProfilePreferenceProperties properties = default(ConfigurationProfilePreferenceProperties)) + : base(id, name, location, type, tags) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets properties of the configuration profile preference. + /// + [JsonProperty(PropertyName = "properties")] + public ConfigurationProfilePreferenceProperties Properties { get; set; } + + } +} diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfilePreferenceAntiMalware.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfilePreferenceAntiMalware.cs new file mode 100644 index 0000000000000..8875b4d641bd2 --- /dev/null +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfilePreferenceAntiMalware.cs @@ -0,0 +1,101 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Automanage.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Automanage configuration profile Antimalware preferences. + /// + public partial class ConfigurationProfilePreferenceAntiMalware + { + /// + /// Initializes a new instance of the + /// ConfigurationProfilePreferenceAntiMalware class. + /// + public ConfigurationProfilePreferenceAntiMalware() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// ConfigurationProfilePreferenceAntiMalware class. + /// + /// Enables or disables Real + /// Time Protection. Possible values include: 'True', 'False' + /// Extensions, Paths and Processes that must + /// be excluded from scan + /// Enables or disables a periodic scan + /// for antimalware. Possible values include: 'True', 'False' + /// Type of scheduled scan. Possible values + /// include: 'Quick', 'Full' + /// Schedule scan settings day + /// Schedule scan settings time + public ConfigurationProfilePreferenceAntiMalware(string enableRealTimeProtection = default(string), object exclusions = default(object), string runScheduledScan = default(string), string scanType = default(string), string scanDay = default(string), string scanTimeInMinutes = default(string)) + { + EnableRealTimeProtection = enableRealTimeProtection; + Exclusions = exclusions; + RunScheduledScan = runScheduledScan; + ScanType = scanType; + ScanDay = scanDay; + ScanTimeInMinutes = scanTimeInMinutes; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets enables or disables Real Time Protection. Possible + /// values include: 'True', 'False' + /// + [JsonProperty(PropertyName = "enableRealTimeProtection")] + public string EnableRealTimeProtection { get; set; } + + /// + /// Gets or sets extensions, Paths and Processes that must be excluded + /// from scan + /// + [JsonProperty(PropertyName = "exclusions")] + public object Exclusions { get; set; } + + /// + /// Gets or sets enables or disables a periodic scan for antimalware. + /// Possible values include: 'True', 'False' + /// + [JsonProperty(PropertyName = "runScheduledScan")] + public string RunScheduledScan { get; set; } + + /// + /// Gets or sets type of scheduled scan. Possible values include: + /// 'Quick', 'Full' + /// + [JsonProperty(PropertyName = "scanType")] + public string ScanType { get; set; } + + /// + /// Gets or sets schedule scan settings day + /// + [JsonProperty(PropertyName = "scanDay")] + public string ScanDay { get; set; } + + /// + /// Gets or sets schedule scan settings time + /// + [JsonProperty(PropertyName = "scanTimeInMinutes")] + public string ScanTimeInMinutes { get; set; } + + } +} diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfilePreferenceProperties.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfilePreferenceProperties.cs new file mode 100644 index 0000000000000..86314938bf140 --- /dev/null +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfilePreferenceProperties.cs @@ -0,0 +1,63 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Automanage.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Automanage configuration profile preference properties. + /// + public partial class ConfigurationProfilePreferenceProperties + { + /// + /// Initializes a new instance of the + /// ConfigurationProfilePreferenceProperties class. + /// + public ConfigurationProfilePreferenceProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// ConfigurationProfilePreferenceProperties class. + /// + /// The custom preferences for Azure VM + /// Backup. + /// The custom preferences for Azure + /// Antimalware. + public ConfigurationProfilePreferenceProperties(ConfigurationProfilePreferenceVmBackup vmBackup = default(ConfigurationProfilePreferenceVmBackup), ConfigurationProfilePreferenceAntiMalware antiMalware = default(ConfigurationProfilePreferenceAntiMalware)) + { + VmBackup = vmBackup; + AntiMalware = antiMalware; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the custom preferences for Azure VM Backup. + /// + [JsonProperty(PropertyName = "vmBackup")] + public ConfigurationProfilePreferenceVmBackup VmBackup { get; set; } + + /// + /// Gets or sets the custom preferences for Azure Antimalware. + /// + [JsonProperty(PropertyName = "antiMalware")] + public ConfigurationProfilePreferenceAntiMalware AntiMalware { get; set; } + + } +} diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfilePreferenceVmBackup.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfilePreferenceVmBackup.cs new file mode 100644 index 0000000000000..e27200a8c493a --- /dev/null +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfilePreferenceVmBackup.cs @@ -0,0 +1,83 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Automanage.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Automanage configuration profile VM Backup preferences. + /// + public partial class ConfigurationProfilePreferenceVmBackup + { + /// + /// Initializes a new instance of the + /// ConfigurationProfilePreferenceVmBackup class. + /// + public ConfigurationProfilePreferenceVmBackup() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// ConfigurationProfilePreferenceVmBackup class. + /// + /// TimeZone optional input as string. For + /// example: Pacific Standard Time + /// Instant RP retention + /// policy range in days + /// Retention policy with the details on + /// backup copy retention ranges. + /// Backup schedule specified as part of + /// backup policy. + public ConfigurationProfilePreferenceVmBackup(string timeZone = default(string), int? instantRpRetentionRangeInDays = default(int?), string retentionPolicy = default(string), string schedulePolicy = default(string)) + { + TimeZone = timeZone; + InstantRpRetentionRangeInDays = instantRpRetentionRangeInDays; + RetentionPolicy = retentionPolicy; + SchedulePolicy = schedulePolicy; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets timeZone optional input as string. For example: + /// Pacific Standard Time + /// + [JsonProperty(PropertyName = "timeZone")] + public string TimeZone { get; set; } + + /// + /// Gets or sets instant RP retention policy range in days + /// + [JsonProperty(PropertyName = "instantRpRetentionRangeInDays")] + public int? InstantRpRetentionRangeInDays { get; set; } + + /// + /// Gets or sets retention policy with the details on backup copy + /// retention ranges. + /// + [JsonProperty(PropertyName = "retentionPolicy")] + public string RetentionPolicy { get; set; } + + /// + /// Gets or sets backup schedule specified as part of backup policy. + /// + [JsonProperty(PropertyName = "schedulePolicy")] + public string SchedulePolicy { get; set; } + + } +} diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/EnableRealTimeProtection.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/EnableRealTimeProtection.cs new file mode 100644 index 0000000000000..8e6a85bd31861 --- /dev/null +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/EnableRealTimeProtection.cs @@ -0,0 +1,22 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Automanage.Models +{ + + /// + /// Defines values for EnableRealTimeProtection. + /// + public static class EnableRealTimeProtection + { + public const string True = "True"; + public const string False = "False"; + } +} diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ErrorResponse.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ErrorResponse.cs new file mode 100644 index 0000000000000..ca24e2ca8ae26 --- /dev/null +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ErrorResponse.cs @@ -0,0 +1,51 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Automanage.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// ARM error response body. + /// + public partial class ErrorResponse + { + /// + /// Initializes a new instance of the ErrorResponse class. + /// + public ErrorResponse() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ErrorResponse class. + /// + /// Details about the error. + public ErrorResponse(ErrorResponseBody error = default(ErrorResponseBody)) + { + Error = error; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets details about the error. + /// + [JsonProperty(PropertyName = "error")] + public ErrorResponseBody Error { get; set; } + + } +} diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ErrorResponseBody.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ErrorResponseBody.cs new file mode 100644 index 0000000000000..3eee8cac51557 --- /dev/null +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ErrorResponseBody.cs @@ -0,0 +1,73 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Automanage.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// An error response from the Automanage service. + /// + public partial class ErrorResponseBody + { + /// + /// Initializes a new instance of the ErrorResponseBody class. + /// + public ErrorResponseBody() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ErrorResponseBody class. + /// + /// An identifier for the error. Codes are invariant + /// and are intended to be consumed programmatically. + /// A message describing the error, intended to + /// be suitable for display in a user interface. + /// The target of the particular error. For + /// example, the name of the property in error. + public ErrorResponseBody(string code = default(string), string message = default(string), string target = default(string)) + { + Code = code; + Message = message; + Target = target; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets an identifier for the error. Codes are invariant and + /// are intended to be consumed programmatically. + /// + [JsonProperty(PropertyName = "code")] + public string Code { get; set; } + + /// + /// Gets or sets a message describing the error, intended to be + /// suitable for display in a user interface. + /// + [JsonProperty(PropertyName = "message")] + public string Message { get; set; } + + /// + /// Gets or sets the target of the particular error. For example, the + /// name of the property in error. + /// + [JsonProperty(PropertyName = "target")] + public string Target { get; set; } + + } +} diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ErrorResponseException.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ErrorResponseException.cs new file mode 100644 index 0000000000000..b49e95bfe24e9 --- /dev/null +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ErrorResponseException.cs @@ -0,0 +1,62 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Automanage.Models +{ + using Microsoft.Rest; + + /// + /// Exception thrown for an invalid response with ErrorResponse + /// information. + /// + public partial class ErrorResponseException : RestException + { + /// + /// Gets information about the associated HTTP request. + /// + public HttpRequestMessageWrapper Request { get; set; } + + /// + /// Gets information about the associated HTTP response. + /// + public HttpResponseMessageWrapper Response { get; set; } + + /// + /// Gets or sets the body object. + /// + public ErrorResponse Body { get; set; } + + /// + /// Initializes a new instance of the ErrorResponseException class. + /// + public ErrorResponseException() + { + } + + /// + /// Initializes a new instance of the ErrorResponseException class. + /// + /// The exception message. + public ErrorResponseException(string message) + : this(message, null) + { + } + + /// + /// Initializes a new instance of the ErrorResponseException class. + /// + /// The exception message. + /// Inner exception. + public ErrorResponseException(string message, System.Exception innerException) + : base(message, innerException) + { + } + } +} diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/Operation.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/Operation.cs new file mode 100644 index 0000000000000..83e105f29360d --- /dev/null +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/Operation.cs @@ -0,0 +1,85 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Automanage.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Automanage REST API operation + /// + [Rest.Serialization.JsonTransformation] + public partial class Operation + { + /// + /// Initializes a new instance of the Operation class. + /// + public Operation() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Operation class. + /// + /// Operation name: For ex. + /// providers/Microsoft.Automanage/configurationProfileAssignments/write + /// or read + /// Indicates whether the operation is a + /// data action + /// Provider, Resource, Operation and description + /// values. + /// Service provider: + /// Microsoft.Automanage + public Operation(string name = default(string), string isDataAction = default(string), OperationDisplay display = default(OperationDisplay), string statusCode = default(string)) + { + Name = name; + IsDataAction = isDataAction; + Display = display; + StatusCode = statusCode; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets operation name: For ex. + /// providers/Microsoft.Automanage/configurationProfileAssignments/write + /// or read + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets indicates whether the operation is a data action + /// + [JsonProperty(PropertyName = "isDataAction")] + public string IsDataAction { get; set; } + + /// + /// Gets or sets provider, Resource, Operation and description values. + /// + [JsonProperty(PropertyName = "display")] + public OperationDisplay Display { get; set; } + + /// + /// Gets or sets service provider: Microsoft.Automanage + /// + [JsonProperty(PropertyName = "properties.statusCode")] + public string StatusCode { get; set; } + + } +} diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/OperationDisplay.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/OperationDisplay.cs new file mode 100644 index 0000000000000..de8fbc510b94d --- /dev/null +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/OperationDisplay.cs @@ -0,0 +1,78 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Automanage.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Provider, Resource, Operation and description values. + /// + public partial class OperationDisplay + { + /// + /// Initializes a new instance of the OperationDisplay class. + /// + public OperationDisplay() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the OperationDisplay class. + /// + /// Service provider: + /// Microsoft.Automanage + /// Resource on which the operation is + /// performed: For ex. + /// Operation type: Read, write, delete, + /// etc. + /// Description about operation. + public OperationDisplay(string provider = default(string), string resource = default(string), string operation = default(string), string description = default(string)) + { + Provider = provider; + Resource = resource; + Operation = operation; + Description = description; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets service provider: Microsoft.Automanage + /// + [JsonProperty(PropertyName = "provider")] + public string Provider { get; set; } + + /// + /// Gets or sets resource on which the operation is performed: For ex. + /// + [JsonProperty(PropertyName = "resource")] + public string Resource { get; set; } + + /// + /// Gets or sets operation type: Read, write, delete, etc. + /// + [JsonProperty(PropertyName = "operation")] + public string Operation { get; set; } + + /// + /// Gets or sets description about operation. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + } +} diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/Page.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/Page.cs new file mode 100644 index 0000000000000..1510a14106328 --- /dev/null +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/Page.cs @@ -0,0 +1,53 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Automanage.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + + /// + /// Defines a page in Azure responses. + /// + /// Type of the page content items + [JsonObject] + public class Page : IPage + { + /// + /// Gets the link to the next page. + /// + [JsonProperty("")] + public string NextPageLink { get; private set; } + + [JsonProperty("value")] + private IList Items{ get; set; } + + /// + /// Returns an enumerator that iterates through the collection. + /// + /// A an enumerator that can be used to iterate through the collection. + public IEnumerator GetEnumerator() + { + return Items == null ? System.Linq.Enumerable.Empty().GetEnumerator() : Items.GetEnumerator(); + } + + /// + /// Returns an enumerator that iterates through the collection. + /// + /// A an enumerator that can be used to iterate through the collection. + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + } +} diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ProvisioningStatus.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ProvisioningStatus.cs new file mode 100644 index 0000000000000..39e799c0d1c6a --- /dev/null +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ProvisioningStatus.cs @@ -0,0 +1,23 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Automanage.Models +{ + + /// + /// Defines values for ProvisioningStatus. + /// + public static class ProvisioningStatus + { + public const string Succeeded = "Succeeded"; + public const string Failed = "Failed"; + public const string Created = "Created"; + } +} diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ProxyResource.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ProxyResource.cs new file mode 100644 index 0000000000000..93b7529e80ca7 --- /dev/null +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ProxyResource.cs @@ -0,0 +1,48 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Automanage.Models +{ + using System.Linq; + + /// + /// ARM proxy resource. + /// + public partial class ProxyResource : Resource + { + /// + /// Initializes a new instance of the ProxyResource class. + /// + public ProxyResource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ProxyResource class. + /// + /// ARM resource id of the Automanage + /// assignment. + /// Name of the Automanage assignment. + /// Region where the VM is located. + /// The type of the resource. + public ProxyResource(string id = default(string), string name = default(string), string location = default(string), string type = default(string)) + : base(id, name, location, type) + { + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/Resource.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/Resource.cs new file mode 100644 index 0000000000000..35f3ef7e94dbc --- /dev/null +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/Resource.cs @@ -0,0 +1,78 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Automanage.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Newtonsoft.Json; + using System.Linq; + + /// + /// The core properties of ARM resources + /// + public partial class Resource : IResource + { + /// + /// Initializes a new instance of the Resource class. + /// + public Resource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Resource class. + /// + /// ARM resource id of the Automanage + /// assignment. + /// Name of the Automanage assignment. + /// Region where the VM is located. + /// The type of the resource. + public Resource(string id = default(string), string name = default(string), string location = default(string), string type = default(string)) + { + Id = id; + Name = name; + Location = location; + Type = type; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets ARM resource id of the Automanage assignment. + /// + [JsonProperty(PropertyName = "id")] + public string Id { get; private set; } + + /// + /// Gets name of the Automanage assignment. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; private set; } + + /// + /// Gets region where the VM is located. + /// + [JsonProperty(PropertyName = "location")] + public string Location { get; private set; } + + /// + /// Gets the type of the resource. + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; private set; } + + } +} diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ResourceIdentityType.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ResourceIdentityType.cs new file mode 100644 index 0000000000000..3d1ae4491aa1c --- /dev/null +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ResourceIdentityType.cs @@ -0,0 +1,60 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Automanage.Models +{ + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for ResourceIdentityType. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum ResourceIdentityType + { + [EnumMember(Value = "SystemAssigned")] + SystemAssigned, + [EnumMember(Value = "None")] + None + } + internal static class ResourceIdentityTypeEnumExtension + { + internal static string ToSerializedValue(this ResourceIdentityType? value) + { + return value == null ? null : ((ResourceIdentityType)value).ToSerializedValue(); + } + + internal static string ToSerializedValue(this ResourceIdentityType value) + { + switch( value ) + { + case ResourceIdentityType.SystemAssigned: + return "SystemAssigned"; + case ResourceIdentityType.None: + return "None"; + } + return null; + } + + internal static ResourceIdentityType? ParseResourceIdentityType(this string value) + { + switch( value ) + { + case "SystemAssigned": + return ResourceIdentityType.SystemAssigned; + case "None": + return ResourceIdentityType.None; + } + return null; + } + } +} diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/RunScheduledScan.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/RunScheduledScan.cs new file mode 100644 index 0000000000000..08e058eccbd5e --- /dev/null +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/RunScheduledScan.cs @@ -0,0 +1,22 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Automanage.Models +{ + + /// + /// Defines values for RunScheduledScan. + /// + public static class RunScheduledScan + { + public const string True = "True"; + public const string False = "False"; + } +} diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ScanType.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ScanType.cs new file mode 100644 index 0000000000000..402ef1096e3fc --- /dev/null +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ScanType.cs @@ -0,0 +1,22 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Automanage.Models +{ + + /// + /// Defines values for ScanType. + /// + public static class ScanType + { + public const string Quick = "Quick"; + public const string Full = "Full"; + } +} diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/TrackedResource.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/TrackedResource.cs new file mode 100644 index 0000000000000..2a109511571d2 --- /dev/null +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/TrackedResource.cs @@ -0,0 +1,59 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Automanage.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The resource model definition for a ARM tracked top level resource + /// + public partial class TrackedResource : Resource + { + /// + /// Initializes a new instance of the TrackedResource class. + /// + public TrackedResource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the TrackedResource class. + /// + /// ARM resource id of the Automanage + /// assignment. + /// Name of the Automanage assignment. + /// Region where the VM is located. + /// The type of the resource. + /// Resource tags. + public TrackedResource(string id = default(string), string name = default(string), string location = default(string), string type = default(string), IDictionary tags = default(IDictionary)) + : base(id, name, location, type) + { + Tags = tags; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets resource tags. + /// + [JsonProperty(PropertyName = "tags")] + public IDictionary Tags { get; set; } + + } +} diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/UpdateStatus.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/UpdateStatus.cs new file mode 100644 index 0000000000000..a57d4d77bf466 --- /dev/null +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/UpdateStatus.cs @@ -0,0 +1,23 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Automanage.Models +{ + + /// + /// Defines values for UpdateStatus. + /// + public static class UpdateStatus + { + public const string Succeeded = "Succeeded"; + public const string Failed = "Failed"; + public const string Created = "Created"; + } +} diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Operations.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Operations.cs new file mode 100644 index 0000000000000..3e2db2f56cc30 --- /dev/null +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Operations.cs @@ -0,0 +1,222 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Automanage +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Operations operations. + /// + internal partial class Operations : IServiceOperations, IOperations + { + /// + /// Initializes a new instance of the Operations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal Operations(AutomanageClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the AutomanageClient + /// + public AutomanageClient Client { get; private set; } + + /// + /// Lists all of the available Automanage REST API operations. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Automanage/operations").ToString(); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/OperationsExtensions.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/OperationsExtensions.cs new file mode 100644 index 0000000000000..cef373bc540a1 --- /dev/null +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/OperationsExtensions.cs @@ -0,0 +1,55 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Automanage +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for Operations. + /// + public static partial class OperationsExtensions + { + /// + /// Lists all of the available Automanage REST API operations. + /// + /// + /// The operations group for this extension method. + /// + public static IEnumerable List(this IOperations operations) + { + return operations.ListAsync().GetAwaiter().GetResult(); + } + + /// + /// Lists all of the available Automanage REST API operations. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task> ListAsync(this IOperations operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Microsoft.Azure.Management.Automanage.csproj b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Microsoft.Azure.Management.Automanage.csproj new file mode 100644 index 0000000000000..c5a881ff30161 --- /dev/null +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Microsoft.Azure.Management.Automanage.csproj @@ -0,0 +1,24 @@ + + + + + + + netstandard2.0 + Microsoft.Azure.Management.Automanage + Microsoft.Azure.Management.Automanage + For detailed release notes, see: https://github.com/Azure/azure-sdk-for-net/blob/psSdkJson6/src/SDKs/Automanage/Management.Automanage/changelog.md + + + + + + + + + + $(SdkTargetFx) + + + + diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/generate.ps1 b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/generate.ps1 new file mode 100644 index 0000000000000..c2161441bcf92 --- /dev/null +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/generate.ps1 @@ -0,0 +1 @@ +Start-AutoRestCodeGeneration -ResourceProvider "automation/resource-manager" -AutoRestVersion "v2" \ No newline at end of file diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/Helpers/RecordedDelegatingHandler.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/Helpers/RecordedDelegatingHandler.cs new file mode 100644 index 0000000000000..2e94a520f570b --- /dev/null +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/Helpers/RecordedDelegatingHandler.cs @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Net.Http; +using System.Net.Http.Headers; +using System.Threading.Tasks; +using Microsoft.Azure.Management.Automanage.Models; + +namespace Automanage.Tests.Helpers +{ + public class RecordedDelegatingHandler : DelegatingHandler + { + private HttpResponseMessage _response; + + public RecordedDelegatingHandler() + { + StatusCodeToReturn = HttpStatusCode.OK; + SubsequentStatusCodeToReturn = StatusCodeToReturn; + } + + public RecordedDelegatingHandler(HttpResponseMessage response) + { + StatusCodeToReturn = HttpStatusCode.OK; + SubsequentStatusCodeToReturn = StatusCodeToReturn; + _response = response; + } + + public HttpStatusCode StatusCodeToReturn { get; set; } + + public HttpStatusCode SubsequentStatusCodeToReturn { get; set; } + + public string Request { get; private set; } + + public HttpRequestHeaders RequestHeaders { get; private set; } + + public HttpContentHeaders ContentHeaders { get; private set; } + + public HttpMethod Method { get; private set; } + + public Uri Uri { get; private set; } + + public bool IsPassThrough { get; set; } + + private int counter; + + protected override async Task SendAsync(HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) + { + counter++; + // Save request + if (request.Content == null) + { + Request = string.Empty; + } + else + { + Request = await request.Content.ReadAsStringAsync(); + } + RequestHeaders = request.Headers; + if (request.Content != null) + { + ContentHeaders = request.Content.Headers; + } + Method = request.Method; + Uri = request.RequestUri; + + // Prepare response + if (IsPassThrough) + { + return await base.SendAsync(request, cancellationToken); + } + else + { + // Generate mock response for unit tests + if (_response != null && counter == 1) + { + return _response; + } + else + { + var statusCode = StatusCodeToReturn; + if (counter > 1) + statusCode = SubsequentStatusCodeToReturn; + HttpResponseMessage response = new HttpResponseMessage(statusCode); + response.Content = new StringContent(""); + return response; + } + } + } + } +} \ No newline at end of file diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/Microsoft.Azure.Management.Automanage.Tests.csproj b/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/Microsoft.Azure.Management.Automanage.Tests.csproj new file mode 100644 index 0000000000000..fabd8b0728325 --- /dev/null +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/Microsoft.Azure.Management.Automanage.Tests.csproj @@ -0,0 +1,30 @@ + + + + netcoreapp3.1 + + + Automanage.Tests + Automanage.Tests Class Library + Automanage.Tests + 1.0.0 + Microsoft.Azure.Management.Automanage.Tests + + + + PreserveNewest + + + + + + + + + + + PreserveNewest + + + + \ No newline at end of file diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/ScenarioTests/AccountsTests.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/ScenarioTests/AccountsTests.cs new file mode 100644 index 0000000000000..a027a957d9ba8 --- /dev/null +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/ScenarioTests/AccountsTests.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +namespace Automanage.Tests.ScenarioTests +{ + using System; + using System.Collections.Generic; + using System.Net; + using System.Threading.Tasks; + using Automanage.Tests.Helpers; + using Microsoft.Azure.Management.Automanage; + using Microsoft.Azure.Management.Automanage.Models; + using Microsoft.Rest.Azure; + using Microsoft.Rest.ClientRuntime.Azure.TestFramework; + using Xunit; + using Xunit.Abstractions; + + public class AccountsTests : TestBase + { + private RecordedDelegatingHandler handler; + + public AccountsTests() + : base() + { + handler = new RecordedDelegatingHandler { SubsequentStatusCodeToReturn = HttpStatusCode.OK }; + } + + [Fact] + [Trait("Category", "Scenario")] + public void AccountsOperationsGetsExpectedAccount() + { + var thisType = this.GetType(); + using (MockContext context = MockContext.Start(thisType)) + { + var automanageClient = GetAutomanagementClient(context, handler); + + var actual = automanageClient.Accounts.Get("AMVM-SubLib-017-ABP", "AMVM-SubLib-017_group"); + + Assert.NotNull(actual); + } + } + } +} \ No newline at end of file diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/ScenarioTests/ConfigurationProfilesAssignmentsTests.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/ScenarioTests/ConfigurationProfilesAssignmentsTests.cs new file mode 100644 index 0000000000000..ab1ce333249d0 --- /dev/null +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/ScenarioTests/ConfigurationProfilesAssignmentsTests.cs @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +namespace Automanage.Tests.ScenarioTests +{ + using System; + using System.Collections.Generic; + using System.Net; + using System.Threading.Tasks; + using Automanage.Tests.Helpers; + using Microsoft.Azure.Management.Automanage; + using Microsoft.Azure.Management.Automanage.Models; + using Microsoft.Rest.Azure; + using Microsoft.Rest.ClientRuntime.Azure.TestFramework; + using Xunit; + using Xunit.Abstractions; + + public class ConfigurationProfilesAssignmentsTests : TestBase + { + private RecordedDelegatingHandler handler; + + public ConfigurationProfilesAssignmentsTests() + : base() + { + handler = new RecordedDelegatingHandler { SubsequentStatusCodeToReturn = HttpStatusCode.OK }; + } + + [Fact] + [Trait("Category", "Scenario")] + public void ConfigurationProfilesAssignmentsGetsExpectedProfile() + { + var thisType = this.GetType(); + using (MockContext context = MockContext.Start(thisType)) + { + var automanageClient = GetAutomanagementClient(context, handler); + + var actual = automanageClient.Accounts.Get("AMVM-SubLib-017-ABP", "AMVM-SubLib-017_group"); + + Assert.NotNull(actual); + } + } + + [Fact] + [Trait("Category", "Scenario")] + public void ConfigurationProfilesAssignmentsAssignsExpectedProfile() + { + var thisType = this.GetType(); + using (MockContext context = MockContext.Start(thisType)) + { + var automanageClient = GetAutomanagementClient(context, handler); + + var actual = automanageClient.Accounts.Get("AMVM-SubLib-017-ABP", "AMVM-SubLib-017_group"); + + Assert.NotNull(actual); + } + } + } +} \ No newline at end of file diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/ScenarioTests/OperationsTests.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/ScenarioTests/OperationsTests.cs new file mode 100644 index 0000000000000..4b1655dadda55 --- /dev/null +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/ScenarioTests/OperationsTests.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +namespace Automanage.Tests.ScenarioTests +{ + using System; + using System.Collections.Generic; + using System.Net; + using System.Threading.Tasks; + using Automanage.Tests.Helpers; + using Microsoft.Azure.Management.Automanage; + using Microsoft.Azure.Management.Automanage.Models; + using Microsoft.Rest.Azure; + using Microsoft.Rest.ClientRuntime.Azure.TestFramework; + using Xunit; + using Xunit.Abstractions; + + public class OperationsTests : TestBase + { + private RecordedDelegatingHandler handler; + + public OperationsTests() + : base() + { + handler = new RecordedDelegatingHandler { SubsequentStatusCodeToReturn = HttpStatusCode.OK }; + } + + [Fact] + [Trait("Category", "Scenario")] + public void ListOperationsGetsAllValidOperations() + { + var thisType = this.GetType(); + using (MockContext context = MockContext.Start(thisType)) + { + var automanageClient = GetAutomanagementClient(context, handler); + + var actual = automanageClient.Operations.List(); + + Assert.NotNull(actual); + if (!this.IsRecording) + { + CheckListedOperations(actual); + } + } + } + + private static void CheckListedOperations(IEnumerable operationListResult) + { + List supportedOperations = new List + { + "Microsoft.Automanage/register/Action", + "Microsoft.Automanage/accounts/Delete", + "Microsoft.Automanage/accounts/Read", + "Microsoft.Automanage/accounts/Write", + "Microsoft.Automanage/configurationProfileAssignments/Delete", + "Microsoft.Automanage/configurationProfileAssignments/Read", + "Microsoft.Automanage/configurationProfileAssignments/Write", + + }; + + string expectedProvider = "Microsoft.Automanage"; + + var enumerator = operationListResult.GetEnumerator(); + while (enumerator.MoveNext()) + { + Operation current = enumerator.Current; + Assert.True(supportedOperations.Contains(current.Name)); + Assert.Equal(expectedProvider, current.Display.Provider); + } + } + } +} \ No newline at end of file diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/ScenarioTests/TestBase.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/ScenarioTests/TestBase.cs new file mode 100644 index 0000000000000..1418e1f0faf17 --- /dev/null +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/ScenarioTests/TestBase.cs @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +using System; +using System.Collections.Generic; +using Microsoft.Azure.Management.Automanage; +using Microsoft.Azure.Management.Automanage.Models; +using Xunit; +using Microsoft.Rest.ClientRuntime.Azure.TestFramework; +using Microsoft.Azure.Test.HttpRecorder; +using System.IO; +using Microsoft.Azure.Management.ResourceManager; +using Microsoft.Azure.Management.ResourceManager.Models; +using Automanage.Tests.Helpers; + +namespace Automanage.Tests.ScenarioTests +{ + public class TestBase + { + protected bool IsRecording { get; set; } + + protected ResourceManagementClient ResourceManagementClient { get; private set; } + + public TestBase() + { + //// Set the path to find the recorded session files (only works in VS locally for .net452) + HttpMockServer.RecordsDirectory = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "SessionRecords"); + this.IsRecording = false; + } + + protected AutomanageClient GetAutomanagementClient(MockContext context, RecordedDelegatingHandler handler) + { + if (handler != null) + { + handler.IsPassThrough = true; + } + + AutomanageClient client; + string testMode = Environment.GetEnvironmentVariable("AZURE_TEST_MODE", EnvironmentVariableTarget.User); + if (string.Equals(testMode, "record", StringComparison.OrdinalIgnoreCase)) + { + this.IsRecording = true; + string connectionString = Environment.GetEnvironmentVariable("TEST_CSM_ORGID_AUTHENTICATION", EnvironmentVariableTarget.User); + + TestEnvironment env = new TestEnvironment(connectionString: connectionString); + client = context.GetServiceClient( + currentEnvironment: env, + handlers: handler ?? new RecordedDelegatingHandler { SubsequentStatusCodeToReturn = System.Net.HttpStatusCode.OK }); + + this.SetResourceManagementClient(env: env, context: context, handler: handler); + } + else + { + client = context.GetServiceClient( + handlers: handler ?? new RecordedDelegatingHandler { SubsequentStatusCodeToReturn = System.Net.HttpStatusCode.OK }); + + this.SetResourceManagementClient(env: null, context: context, handler: handler); + } + + return client; + } + + private void SetResourceManagementClient(TestEnvironment env, MockContext context, RecordedDelegatingHandler handler) + { + if (handler != null) + { + handler.IsPassThrough = true; + } + + if (env != null) + { + this.ResourceManagementClient = context.GetServiceClient( + currentEnvironment: env, + handlers: handler ?? new RecordedDelegatingHandler { SubsequentStatusCodeToReturn = System.Net.HttpStatusCode.OK }); + } + else + { + this.ResourceManagementClient = context.GetServiceClient( + handlers: handler ?? new RecordedDelegatingHandler { SubsequentStatusCodeToReturn = System.Net.HttpStatusCode.OK }); + } + } + + protected bool VerifyExistenceOrCreateResourceGroup(string resourceGroupName, string location) + { + if (this.ResourceManagementClient == null) + { + throw new NullReferenceException("ResourceManagementClient not created."); + } + + if (this.ResourceManagementClient.ResourceGroups.CheckExistence(resourceGroupName: resourceGroupName)) + { + return true; + } + + ResourceGroup resourceGroup = new ResourceGroup + { + Location = location, + Name = resourceGroupName + }; + + resourceGroup = this.ResourceManagementClient.ResourceGroups.CreateOrUpdate(resourceGroupName: resourceGroupName, parameters: resourceGroup); + + return true; + } + + protected static void AreEqual(IList exp, IList act) + { + if (exp != null) + { + for (int i = 0; i < exp.Count; i++) + { + Assert.Equal(exp[i], act[i]); + } + } + } + + protected static void AreEqual(IList exp, IList act) + { + if (exp != null) + { + for (int i = 0; i < exp.Count; i++) + { + Assert.Equal(exp[i], act[i]); + } + } + } + + protected static void AreEqual(IDictionary exp, IDictionary act) + { + if (exp != null) + { + Assert.NotNull(act); + Assert.Equal(exp.Count, act.Count); + foreach (var key in exp.Keys) + { + Assert.Equal(exp[key], act[key]); + } + } + } + } +} diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/AccountsTests/AccountsOperationsGetsAllValidOperations.json b/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/AccountsTests/AccountsOperationsGetsAllValidOperations.json new file mode 100644 index 0000000000000..908b43813af0c --- /dev/null +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/AccountsTests/AccountsOperationsGetsAllValidOperations.json @@ -0,0 +1,74 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/cdd53a71-7d81-493d-bce6-224fec7223a9/resourceGroups/AMVM-SubLib-017_group/providers/Microsoft.Automanage/accounts/AMVM-SubLib-017-ABP?api-version=2020-06-30-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2RkNTNhNzEtN2Q4MS00OTNkLWJjZTYtMjI0ZmVjNzIyM2E5L3Jlc291cmNlR3JvdXBzL0FNVk0tU3ViTGliLTAxN19ncm91cC9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYW5hZ2UvYWNjb3VudHMvQU1WTS1TdWJMaWItMDE3LUFCUD9hcGktdmVyc2lvbj0yMDIwLTA2LTMwLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "8671ee17-cf15-4e2b-8d3f-8d4c408d0e2c" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.28207.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18363.", + "Microsoft.Azure.Management.Automanage.AutomanageClient/1.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Request-Context": [ + "appId=cid-v1:a4d240dc-d543-4b4e-a019-0a571290b85d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Kestrel" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "512a2c8a-e336-4df8-98d9-5030780f3466" + ], + "x-ms-correlation-request-id": [ + "512a2c8a-e336-4df8-98d9-5030780f3466" + ], + "x-ms-routing-request-id": [ + "CANADACENTRAL:20200820T214307Z:512a2c8a-e336-4df8-98d9-5030780f3466" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Thu, 20 Aug 2020 21:43:07 GMT" + ], + "Content-Length": [ + "385" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"identity\": {\r\n \"type\": \"SystemAssigned\",\r\n \"principalId\": \"f60187c9-9456-4386-aeb9-c1b50278e3f9\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\r\n },\r\n \"location\": \"eastus\",\r\n \"id\": \"/subscriptions/cdd53a71-7d81-493d-bce6-224fec7223a9/resourceGroups/AMVM-SubLib-017_group/providers/Microsoft.Automanage/accounts/AMVM-SubLib-017-ABP\",\r\n \"name\": \"AMVM-SubLib-017-ABP\",\r\n \"type\": \"Microsoft.Automanage/accounts\"\r\n}", + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "cdd53a71-7d81-493d-bce6-224fec7223a9" + } +} \ No newline at end of file diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/AccountsTests/AccountsOperationsGetsExpectedAccount.json b/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/AccountsTests/AccountsOperationsGetsExpectedAccount.json new file mode 100644 index 0000000000000..b984a6589fbc9 --- /dev/null +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/AccountsTests/AccountsOperationsGetsExpectedAccount.json @@ -0,0 +1,74 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/cdd53a71-7d81-493d-bce6-224fec7223a9/resourceGroups/AMVM-SubLib-017_group/providers/Microsoft.Automanage/accounts/AMVM-SubLib-017-ABP?api-version=2020-06-30-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2RkNTNhNzEtN2Q4MS00OTNkLWJjZTYtMjI0ZmVjNzIyM2E5L3Jlc291cmNlR3JvdXBzL0FNVk0tU3ViTGliLTAxN19ncm91cC9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYW5hZ2UvYWNjb3VudHMvQU1WTS1TdWJMaWItMDE3LUFCUD9hcGktdmVyc2lvbj0yMDIwLTA2LTMwLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "b7f55539-cc0c-4e25-bcb6-b9de70a02214" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.28207.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18363.", + "Microsoft.Azure.Management.Automanage.AutomanageClient/1.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Request-Context": [ + "appId=cid-v1:a4d240dc-d543-4b4e-a019-0a571290b85d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Kestrel" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "4d4967a9-04d1-4a7a-9358-b70a926ed10f" + ], + "x-ms-correlation-request-id": [ + "4d4967a9-04d1-4a7a-9358-b70a926ed10f" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20200820T215103Z:4d4967a9-04d1-4a7a-9358-b70a926ed10f" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Thu, 20 Aug 2020 21:51:02 GMT" + ], + "Content-Length": [ + "385" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"identity\": {\r\n \"type\": \"SystemAssigned\",\r\n \"principalId\": \"f60187c9-9456-4386-aeb9-c1b50278e3f9\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\r\n },\r\n \"location\": \"eastus\",\r\n \"id\": \"/subscriptions/cdd53a71-7d81-493d-bce6-224fec7223a9/resourceGroups/AMVM-SubLib-017_group/providers/Microsoft.Automanage/accounts/AMVM-SubLib-017-ABP\",\r\n \"name\": \"AMVM-SubLib-017-ABP\",\r\n \"type\": \"Microsoft.Automanage/accounts\"\r\n}", + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "cdd53a71-7d81-493d-bce6-224fec7223a9" + } +} \ No newline at end of file diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/OperationsTests/ListOperationsTest.json b/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/OperationsTests/ListOperationsTest.json new file mode 100644 index 0000000000000..bec1d56306400 --- /dev/null +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/OperationsTests/ListOperationsTest.json @@ -0,0 +1,69 @@ +{ + "Entries": [ + { + "RequestUri": "/providers/Microsoft.Automanage/operations?api-version=2020-06-30-preview", + "EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuQWxlcnRzTWFuYWdlbWVudC9vcGVyYXRpb25zP2FwaS12ZXJzaW9uPTIwMTktMDUtMDUtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "ec75485c-a09e-4f05-944f-d73c7eaadcc9" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.Automanage.AutomanageClient/1.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Thu, 06 Jun 2019 07:16:15 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "87c9c58c-9bc9-41b8-b60b-f0772dd35017" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-tenant-reads": [ + "11999" + ], + "x-ms-correlation-request-id": [ + "e3abda35-41bb-4b82-8f14-5b82191a3abe" + ], + "x-ms-routing-request-id": [ + "SOUTHINDIA:20190606T071615Z:e3abda35-41bb-4b82-8f14-5b82191a3abe" + ], + "Content-Length": [ + "4604" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\"value\":[{\"name\":\"Microsoft.Automanage/register/Action\",\"display\":{\"provider\":\"Microsoft Automanage\",\"resource\":\"Automanage Provider\",\"operation\":\"Registers the Automanage Provider\",\"description\":\"Registers the subscription for the Automanage Provider.\"},\"origin\":\"system\",\"isDataAction\":false},{\"name\":\"Microsoft.Automanage/accounts/Delete\",\"display\":{\"provider\":\"Microsoft Automanage\",\"resource\":\"Automanage Accounts\",\"operation\":\"Delete Automanage Accounts\",\"description\":\"Delete any Automanage Accounts\"},\"origin\":\"system\",\"isDataAction\":false},{\"name\":\"Microsoft.Automanage/accounts/Read\",\"display\":{\"provider\":\"Microsoft Automanage\",\"resource\":\"Automanage Accounts\",\"operation\":\"Read Automanage Accounts\",\"description\":\"Read any Automanage Accounts\"},\"origin\":\"system\",\"isDataAction\":false},{\"name\":\"Microsoft.Automanage/accounts/Write\",\"display\":{\"provider\":\"Microsoft Automanage\",\"resource\":\"Automanage Accounts\",\"operation\":\"Create or Update Automanage Accounts\",\"description\":\"Create or Update any Automanage Accounts\"},\"origin\":\"system\",\"isDataAction\":false},{\"name\":\"Microsoft.Automanage/configurationProfileAssignments/Delete\",\"display\":{\"provider\":\"Microsoft Automanage\",\"resource\":\"Automanage Configuration Profile Assignments\",\"operation\":\"Delete Configuration Profile Assignments\",\"description\":\"Delete any Configuration Profile Assignments\"},\"origin\":\"system\",\"isDataAction\":false},{\"name\":\"Microsoft.Automanage/configurationProfileAssignments/Read\",\"display\":{\"provider\":\"Microsoft Automanage\",\"resource\":\"Automanage Configuration Profile Assignments\",\"operation\":\"Read Configuration Profile Assignments\",\"description\":\"Read any Configuration Profile Assignments\"},\"origin\":\"system\",\"isDataAction\":false},{\"name\":\"Microsoft.Automanage/configurationProfileAssignments/Write\",\"display\":{\"provider\":\"Microsoft Automanage\",\"resource\":\"Automanage Configuration Profile Assignments\",\"operation\":\"Create or Update Configuration Profile Assignments\",\"description\":\"Create or Update any Configuration Profile Assignments\"},\"origin\":\"system\",\"isDataAction\":false}]}", + + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "dd91de05-d791-4ceb-b6dc-988682dc7d72" + } +} \ No newline at end of file From 833cb23a05ed930ca45777b4c689e7990a298878 Mon Sep 17 00:00:00 2001 From: Stephen Owen Date: Sat, 22 Aug 2020 10:46:13 -0400 Subject: [PATCH 02/20] tests completed --- .../tests/ScenarioTests/AccountsTests.cs | 20 +- .../ConfigurationProfilePreferencesTests.cs | 75 +++++++ .../ConfigurationProfilesAssignmentsTests.cs | 49 +++-- .../tests/ScenarioTests/OperationsTests.cs | 4 +- ...AccountsOperationsGetsExpectedAccount.json | 72 +++++- ...ntsOperationsListsReturnsAllAccounts.json} | 34 ++- ...ProfilesPreferencesCreatesPreferences.json | 74 +++++++ ...ferencesGetReturnsExpectedPreferences.json | 74 +++++++ ...rofilesPreferencesListsAnyPreferences.json | 140 ++++++++++++ ...onProfilesPreferencesListsPreferences.json | 74 +++++++ ...tionProfilesAssignmentsCreatesProfile.json | 80 +++++++ ...rofilesAssignmentsGetsExpectedProfile.json | 206 ++++++++++++++++++ ...lesListAssignmentsGetsExpectedProfile.json | 74 +++++++ 13 files changed, 931 insertions(+), 45 deletions(-) create mode 100644 sdk/automanage/Microsoft.Azure.Management.Automanage/tests/ScenarioTests/ConfigurationProfilePreferencesTests.cs rename sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/AccountsTests/{AccountsOperationsGetsAllValidOperations.json => AccountsOperationsListsReturnsAllAccounts.json} (52%) create mode 100644 sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/ConfigurationProfilePreferencesTests/ConfigurationProfilesPreferencesCreatesPreferences.json create mode 100644 sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/ConfigurationProfilePreferencesTests/ConfigurationProfilesPreferencesGetReturnsExpectedPreferences.json create mode 100644 sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/ConfigurationProfilePreferencesTests/ConfigurationProfilesPreferencesListsAnyPreferences.json create mode 100644 sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/ConfigurationProfilePreferencesTests/ConfigurationProfilesPreferencesListsPreferences.json create mode 100644 sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/ConfigurationProfilesAssignmentsTests/ConfigurationProfilesAssignmentsCreatesProfile.json create mode 100644 sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/ConfigurationProfilesAssignmentsTests/ConfigurationProfilesAssignmentsGetsExpectedProfile.json create mode 100644 sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/ConfigurationProfilesAssignmentsTests/ConfigurationProfilesListAssignmentsGetsExpectedProfile.json diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/ScenarioTests/AccountsTests.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/ScenarioTests/AccountsTests.cs index a027a957d9ba8..975664bdc57d9 100644 --- a/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/ScenarioTests/AccountsTests.cs +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/ScenarioTests/AccountsTests.cs @@ -33,11 +33,23 @@ public void AccountsOperationsGetsExpectedAccount() using (MockContext context = MockContext.Start(thisType)) { var automanageClient = GetAutomanagementClient(context, handler); - - var actual = automanageClient.Accounts.Get("AMVM-SubLib-017-ABP", "AMVM-SubLib-017_group"); - + var t = automanageClient.Accounts.ListByResourceGroup("myNewAmVm3"); + var actual = automanageClient.Accounts.Get("AMVM-SubLib-017-ABP", "AMVM-SubLib-017_group"); Assert.NotNull(actual); } - } + } + + [Fact] + [Trait("Category", "Scenario")] + public void AccountsOperationsListsReturnsAllAccounts() + { + var thisType = this.GetType(); + using (MockContext context = MockContext.Start(thisType)) + { + var automanageClient = GetAutomanagementClient(context, handler); + var list = automanageClient.Accounts.ListByResourceGroup("myNewAmVm3"); + Assert.NotNull(list); + } + } } } \ No newline at end of file diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/ScenarioTests/ConfigurationProfilePreferencesTests.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/ScenarioTests/ConfigurationProfilePreferencesTests.cs new file mode 100644 index 0000000000000..adf82495129a8 --- /dev/null +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/ScenarioTests/ConfigurationProfilePreferencesTests.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +namespace Automanage.Tests.ScenarioTests +{ + using System.Net; + using System.Threading; + using System.Threading.Tasks; + using Automanage.Tests.Helpers; + using Microsoft.Azure.Management.Automanage; + using Microsoft.Azure.Management.Automanage.Models; + using Microsoft.Rest.ClientRuntime.Azure.TestFramework; + using Xunit; + using Xunit.Abstractions; + + public class ConfigurationProfilePreferencesTests : TestBase + { + private RecordedDelegatingHandler handler; + private string vmName = "mynewamvmVM2"; + private string vmID = "/subscriptions/cdd53a71-7d81-493d-bce6-224fec7223a9/resourceGroups/mynewamvmVM_group/providers/Microsoft.Compute/virtualMachines/mynewamvmVM2"; + private string automanageAccountId = "/subscriptions/cdd53a71-7d81-493d-bce6-224fec7223a9/resourceGroups/AMVM-SubLib-017_group/providers/Microsoft.Automanage/accounts/AMVM-SubLib-017-ABP"; + public ConfigurationProfilePreferencesTests() + : base() + { + handler = new RecordedDelegatingHandler { SubsequentStatusCodeToReturn = HttpStatusCode.OK }; + } + + [Fact] + [Trait("Category", "Scenario")] + public async Task ConfigurationProfilesPreferencesListsPreferences() + { + var thisType = this.GetType(); + using (MockContext context = MockContext.Start(thisType)) + { + var automanageClient = GetAutomanagementClient(context, handler); + var actual = automanageClient.ConfigurationProfilePreferences.ListByResourceGroup("MYNEWAMVM3"); + Assert.NotNull(actual); + } + } + + [Fact] + [Trait("Category", "Scenario")] + public async Task ConfigurationProfilesPreferencesGetReturnsExpectedPreferences() + { + var thisType = this.GetType(); + using (MockContext context = MockContext.Start(thisType)) + { + var automanageClient = GetAutomanagementClient(context, handler); + var actual = automanageClient.ConfigurationProfilePreferences.Get("MyNewCustomPrefs", "MYNEWAMVM3"); + Assert.NotNull(actual); + } + } + + private ConfigurationProfilePreference GetAConfigurationProfilePreferenceObject() + { + var customAntiMalwareProps = new ConfigurationProfilePreferenceAntiMalware( + enableRealTimeProtection: "True", + exclusions: new[] { "C:\\temp", "notepad.exe" }, + scanType: "Quick", + scanDay: "1", + scanTimeInMinutes: "360"); + var vmBackupProps = new ConfigurationProfilePreferenceVmBackup("Pacific Standard Time", 14, null, null); + + var preferenceProperties = new ConfigurationProfilePreferenceProperties( + vmBackup: vmBackupProps, antiMalware: customAntiMalwareProps); + + var thisAssignment = new ConfigurationProfilePreference( + id: null, + name: "default", + location: "West US 2", + properties: preferenceProperties); + return thisAssignment; + } + } +} \ No newline at end of file diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/ScenarioTests/ConfigurationProfilesAssignmentsTests.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/ScenarioTests/ConfigurationProfilesAssignmentsTests.cs index ab1ce333249d0..7f653d20484f2 100644 --- a/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/ScenarioTests/ConfigurationProfilesAssignmentsTests.cs +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/ScenarioTests/ConfigurationProfilesAssignmentsTests.cs @@ -3,22 +3,22 @@ // license information. namespace Automanage.Tests.ScenarioTests { - using System; - using System.Collections.Generic; using System.Net; + using System.Threading; using System.Threading.Tasks; using Automanage.Tests.Helpers; using Microsoft.Azure.Management.Automanage; using Microsoft.Azure.Management.Automanage.Models; - using Microsoft.Rest.Azure; - using Microsoft.Rest.ClientRuntime.Azure.TestFramework; + using Microsoft.Rest.ClientRuntime.Azure.TestFramework; using Xunit; using Xunit.Abstractions; public class ConfigurationProfilesAssignmentsTests : TestBase { private RecordedDelegatingHandler handler; - + private string vmName = "mynewamvmVM2"; + private string vmID = "/subscriptions/cdd53a71-7d81-493d-bce6-224fec7223a9/resourceGroups/mynewamvmVM_group/providers/Microsoft.Compute/virtualMachines/mynewamvmVM2"; + private string automanageAccountId = "/subscriptions/cdd53a71-7d81-493d-bce6-224fec7223a9/resourceGroups/AMVM-SubLib-017_group/providers/Microsoft.Automanage/accounts/AMVM-SubLib-017-ABP"; public ConfigurationProfilesAssignmentsTests() : base() { @@ -27,32 +27,55 @@ public ConfigurationProfilesAssignmentsTests() [Fact] [Trait("Category", "Scenario")] - public void ConfigurationProfilesAssignmentsGetsExpectedProfile() + public async Task ConfigurationProfilesListAssignmentsGetsExpectedProfile() { var thisType = this.GetType(); using (MockContext context = MockContext.Start(thisType)) { var automanageClient = GetAutomanagementClient(context, handler); - - var actual = automanageClient.Accounts.Get("AMVM-SubLib-017-ABP", "AMVM-SubLib-017_group"); - - Assert.NotNull(actual); + //var actual2 = await automanageClient.ConfigurationProfileAssignments.ListWithHttpMessagesAsync("DeluxeTest"); + var actual = automanageClient.ConfigurationProfileAssignments.List("DeluxeTest"); + Assert.NotNull(actual); } } [Fact] - [Trait("Category", "Scenario")] - public void ConfigurationProfilesAssignmentsAssignsExpectedProfile() + //[Trait("Category", "Scenario")] + public async Task ConfigurationProfilesAssignmentsCreatesProfile() { var thisType = this.GetType(); using (MockContext context = MockContext.Start(thisType)) { var automanageClient = GetAutomanagementClient(context, handler); - var actual = automanageClient.Accounts.Get("AMVM-SubLib-017-ABP", "AMVM-SubLib-017_group"); + //create new ProfileAssignment + var expectedProfile = GetAConfigurationProfileAssignment(); + var actual = automanageClient.ConfigurationProfileAssignments.BeginCreateOrUpdateAsync( + configurationProfileAssignmentName: expectedProfile.Name, + parameters: expectedProfile, + resourceGroupName: "mynewamvmVM_group", + vmName: vmName) ; Assert.NotNull(actual); } } + + private ConfigurationProfileAssignment GetAConfigurationProfileAssignment() + { + var assignmentProperties = new ConfigurationProfileAssignmentProperties( + configurationProfile: "Azure Best Practices - Prod", + targetId: vmID, + accountId: automanageAccountId, + configurationProfilePreferenceId: null, //change to the ARM id of a preference object to test preference application + provisioningStatus: null, + compliance: null); + + var thisAssignment = new ConfigurationProfileAssignment( + id: null, + name: "default", + location: "East US 2", + properties: assignmentProperties); + return thisAssignment; + } } } \ No newline at end of file diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/ScenarioTests/OperationsTests.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/ScenarioTests/OperationsTests.cs index 4b1655dadda55..5a8ca6e5b049b 100644 --- a/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/ScenarioTests/OperationsTests.cs +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/ScenarioTests/OperationsTests.cs @@ -58,13 +58,13 @@ private static void CheckListedOperations(IEnumerable operationListRe }; - string expectedProvider = "Microsoft.Automanage"; + string expectedProvider = "Microsoft Automanage"; var enumerator = operationListResult.GetEnumerator(); while (enumerator.MoveNext()) { Operation current = enumerator.Current; - Assert.True(supportedOperations.Contains(current.Name)); + Assert.Contains(current.Name, supportedOperations); Assert.Equal(expectedProvider, current.Display.Provider); } } diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/AccountsTests/AccountsOperationsGetsExpectedAccount.json b/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/AccountsTests/AccountsOperationsGetsExpectedAccount.json index b984a6589fbc9..7dedb59933f49 100644 --- a/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/AccountsTests/AccountsOperationsGetsExpectedAccount.json +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/AccountsTests/AccountsOperationsGetsExpectedAccount.json @@ -1,5 +1,65 @@ { "Entries": [ + { + "RequestUri": "/subscriptions/cdd53a71-7d81-493d-bce6-224fec7223a9/resourceGroups/myNewAmVm3/providers/Microsoft.Automanage/accounts?api-version=2020-06-30-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2RkNTNhNzEtN2Q4MS00OTNkLWJjZTYtMjI0ZmVjNzIyM2E5L3Jlc291cmNlR3JvdXBzL215TmV3QW1WbTMvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRvbWFuYWdlL2FjY291bnRzP2FwaS12ZXJzaW9uPTIwMjAtMDYtMzAtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "b01dc805-728a-4c21-92dd-bebe25dabdde" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.28207.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18363.", + "Microsoft.Azure.Management.Automanage.AutomanageClient/1.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "2f5adb56-5024-4f2c-a969-4c6a8bcc022b" + ], + "x-ms-correlation-request-id": [ + "2f5adb56-5024-4f2c-a969-4c6a8bcc022b" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20200822T132126Z:2f5adb56-5024-4f2c-a969-4c6a8bcc022b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Sat, 22 Aug 2020 13:21:26 GMT" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "12" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "StatusCode": 200 + }, { "RequestUri": "/subscriptions/cdd53a71-7d81-493d-bce6-224fec7223a9/resourceGroups/AMVM-SubLib-017_group/providers/Microsoft.Automanage/accounts/AMVM-SubLib-017-ABP?api-version=2020-06-30-preview", "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2RkNTNhNzEtN2Q4MS00OTNkLWJjZTYtMjI0ZmVjNzIyM2E5L3Jlc291cmNlR3JvdXBzL0FNVk0tU3ViTGliLTAxN19ncm91cC9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYW5hZ2UvYWNjb3VudHMvQU1WTS1TdWJMaWItMDE3LUFCUD9hcGktdmVyc2lvbj0yMDIwLTA2LTMwLXByZXZpZXc=", @@ -7,7 +67,7 @@ "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "b7f55539-cc0c-4e25-bcb6-b9de70a02214" + "ee30f359-f92a-49e6-a47a-c2c2cbd65cb8" ], "Accept-Language": [ "en-US" @@ -36,22 +96,22 @@ "Kestrel" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" + "11998" ], "x-ms-request-id": [ - "4d4967a9-04d1-4a7a-9358-b70a926ed10f" + "daa88489-3654-4ba9-b83c-0616ffe70946" ], "x-ms-correlation-request-id": [ - "4d4967a9-04d1-4a7a-9358-b70a926ed10f" + "daa88489-3654-4ba9-b83c-0616ffe70946" ], "x-ms-routing-request-id": [ - "CENTRALUS:20200820T215103Z:4d4967a9-04d1-4a7a-9358-b70a926ed10f" + "CENTRALUS:20200822T132137Z:daa88489-3654-4ba9-b83c-0616ffe70946" ], "X-Content-Type-Options": [ "nosniff" ], "Date": [ - "Thu, 20 Aug 2020 21:51:02 GMT" + "Sat, 22 Aug 2020 13:21:37 GMT" ], "Content-Length": [ "385" diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/AccountsTests/AccountsOperationsGetsAllValidOperations.json b/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/AccountsTests/AccountsOperationsListsReturnsAllAccounts.json similarity index 52% rename from sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/AccountsTests/AccountsOperationsGetsAllValidOperations.json rename to sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/AccountsTests/AccountsOperationsListsReturnsAllAccounts.json index 908b43813af0c..cc366acda0be8 100644 --- a/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/AccountsTests/AccountsOperationsGetsAllValidOperations.json +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/AccountsTests/AccountsOperationsListsReturnsAllAccounts.json @@ -1,13 +1,13 @@ { "Entries": [ { - "RequestUri": "/subscriptions/cdd53a71-7d81-493d-bce6-224fec7223a9/resourceGroups/AMVM-SubLib-017_group/providers/Microsoft.Automanage/accounts/AMVM-SubLib-017-ABP?api-version=2020-06-30-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2RkNTNhNzEtN2Q4MS00OTNkLWJjZTYtMjI0ZmVjNzIyM2E5L3Jlc291cmNlR3JvdXBzL0FNVk0tU3ViTGliLTAxN19ncm91cC9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYW5hZ2UvYWNjb3VudHMvQU1WTS1TdWJMaWItMDE3LUFCUD9hcGktdmVyc2lvbj0yMDIwLTA2LTMwLXByZXZpZXc=", + "RequestUri": "/subscriptions/cdd53a71-7d81-493d-bce6-224fec7223a9/resourceGroups/myNewAmVm3/providers/Microsoft.Automanage/accounts?api-version=2020-06-30-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2RkNTNhNzEtN2Q4MS00OTNkLWJjZTYtMjI0ZmVjNzIyM2E5L3Jlc291cmNlR3JvdXBzL215TmV3QW1WbTMvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRvbWFuYWdlL2FjY291bnRzP2FwaS12ZXJzaW9uPTIwMjAtMDYtMzAtcHJldmlldw==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "8671ee17-cf15-4e2b-8d3f-8d4c408d0e2c" + "1c8ff64d-c84b-4476-b9cd-4c5dfc7b97f5" ], "Accept-Language": [ "en-US" @@ -26,44 +26,38 @@ "Pragma": [ "no-cache" ], - "Request-Context": [ - "appId=cid-v1:a4d240dc-d543-4b4e-a019-0a571290b85d" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "Server": [ - "Kestrel" - ], "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], "x-ms-request-id": [ - "512a2c8a-e336-4df8-98d9-5030780f3466" + "fa5a34a8-b37b-44c7-9e7b-b2ae5a4159f0" ], "x-ms-correlation-request-id": [ - "512a2c8a-e336-4df8-98d9-5030780f3466" + "fa5a34a8-b37b-44c7-9e7b-b2ae5a4159f0" ], "x-ms-routing-request-id": [ - "CANADACENTRAL:20200820T214307Z:512a2c8a-e336-4df8-98d9-5030780f3466" + "NORTHCENTRALUS:20200822T132243Z:fa5a34a8-b37b-44c7-9e7b-b2ae5a4159f0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "Date": [ - "Thu, 20 Aug 2020 21:43:07 GMT" - ], - "Content-Length": [ - "385" + "Sat, 22 Aug 2020 13:22:42 GMT" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" + ], + "Content-Length": [ + "12" ] }, - "ResponseBody": "{\r\n \"identity\": {\r\n \"type\": \"SystemAssigned\",\r\n \"principalId\": \"f60187c9-9456-4386-aeb9-c1b50278e3f9\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\r\n },\r\n \"location\": \"eastus\",\r\n \"id\": \"/subscriptions/cdd53a71-7d81-493d-bce6-224fec7223a9/resourceGroups/AMVM-SubLib-017_group/providers/Microsoft.Automanage/accounts/AMVM-SubLib-017-ABP\",\r\n \"name\": \"AMVM-SubLib-017-ABP\",\r\n \"type\": \"Microsoft.Automanage/accounts\"\r\n}", + "ResponseBody": "{\r\n \"value\": []\r\n}", "StatusCode": 200 } ], diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/ConfigurationProfilePreferencesTests/ConfigurationProfilesPreferencesCreatesPreferences.json b/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/ConfigurationProfilePreferencesTests/ConfigurationProfilesPreferencesCreatesPreferences.json new file mode 100644 index 0000000000000..f4cbe2e8fa6f2 --- /dev/null +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/ConfigurationProfilePreferencesTests/ConfigurationProfilesPreferencesCreatesPreferences.json @@ -0,0 +1,74 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/cdd53a71-7d81-493d-bce6-224fec7223a9/resourceGroups/myNewAmVm3/providers/Microsoft.Automanage/configurationProfilePreferences/amvmCustomPreferenceSample?api-version=2020-06-30-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2RkNTNhNzEtN2Q4MS00OTNkLWJjZTYtMjI0ZmVjNzIyM2E5L3Jlc291cmNlR3JvdXBzL215TmV3QW1WbTMvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRvbWFuYWdlL2NvbmZpZ3VyYXRpb25Qcm9maWxlUHJlZmVyZW5jZXMvYW12bUN1c3RvbVByZWZlcmVuY2VTYW1wbGU/YXBpLXZlcnNpb249MjAyMC0wNi0zMC1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"vmBackup\": {\r\n \"timeZone\": \"Pacific Standard Time\",\r\n \"instantRpRetentionRangeInDays\": 14\r\n },\r\n \"antiMalware\": {\r\n \"enableRealTimeProtection\": \"True\",\r\n \"exclusions\": [\r\n \"C:\\\\temp\",\r\n \"notepad.exe\"\r\n ],\r\n \"scanType\": \"Quick\",\r\n \"scanDay\": \"1\",\r\n \"scanTimeInMinutes\": \"360\"\r\n }\r\n }\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "81358e27-a022-4355-9ce4-d0ee7f5d814b" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.28207.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18363.", + "Microsoft.Azure.Management.Automanage.AutomanageClient/1.0.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "376" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-failure-cause": [ + "gateway" + ], + "x-ms-request-id": [ + "6f471c40-a75e-4290-acb5-226deb36fea1" + ], + "x-ms-correlation-request-id": [ + "6f471c40-a75e-4290-acb5-226deb36fea1" + ], + "x-ms-routing-request-id": [ + "CANADACENTRAL:20200822T142206Z:6f471c40-a75e-4290-acb5-226deb36fea1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Sat, 22 Aug 2020 14:22:05 GMT" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "104" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"LocationRequired\",\r\n \"message\": \"The location property is required for this definition.\"\r\n }\r\n}", + "StatusCode": 400 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "cdd53a71-7d81-493d-bce6-224fec7223a9" + } +} \ No newline at end of file diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/ConfigurationProfilePreferencesTests/ConfigurationProfilesPreferencesGetReturnsExpectedPreferences.json b/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/ConfigurationProfilePreferencesTests/ConfigurationProfilesPreferencesGetReturnsExpectedPreferences.json new file mode 100644 index 0000000000000..506cbd29f947d --- /dev/null +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/ConfigurationProfilePreferencesTests/ConfigurationProfilesPreferencesGetReturnsExpectedPreferences.json @@ -0,0 +1,74 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/cdd53a71-7d81-493d-bce6-224fec7223a9/resourceGroups/MYNEWAMVM3/providers/Microsoft.Automanage/configurationProfilePreferences/MyNewCustomPrefs?api-version=2020-06-30-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2RkNTNhNzEtN2Q4MS00OTNkLWJjZTYtMjI0ZmVjNzIyM2E5L3Jlc291cmNlR3JvdXBzL01ZTkVXQU1WTTMvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRvbWFuYWdlL2NvbmZpZ3VyYXRpb25Qcm9maWxlUHJlZmVyZW5jZXMvTXlOZXdDdXN0b21QcmVmcz9hcGktdmVyc2lvbj0yMDIwLTA2LTMwLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "30b62b38-5e94-462c-b6e8-f8a9ab011cd4" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.28207.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18363.", + "Microsoft.Azure.Management.Automanage.AutomanageClient/1.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Request-Context": [ + "appId=cid-v1:a4d240dc-d543-4b4e-a019-0a571290b85d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Kestrel" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "9f8a3f54-b99e-4059-b4e1-45f02008c9ae" + ], + "x-ms-correlation-request-id": [ + "9f8a3f54-b99e-4059-b4e1-45f02008c9ae" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20200822T143553Z:9f8a3f54-b99e-4059-b4e1-45f02008c9ae" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Sat, 22 Aug 2020 14:35:53 GMT" + ], + "Content-Length": [ + "758" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cdd53a71-7d81-493d-bce6-224fec7223a9/resourceGroups/myNewAmVm3/providers/Microsoft.Automanage/configurationProfilePreferences/MyNewCustomPrefs\",\r\n \"name\": \"MyNewCustomPrefs\",\r\n \"type\": \"Microsoft.Automanage/configurationProfilePreferences\",\r\n \"location\": \"westus2\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"antimalware\": {\r\n \"enableRealTimeProtection\": true,\r\n \"exclusions\": {\r\n \"extensions\": \"c:\\\\temp\",\r\n \"paths\": \"myDb.sql\",\r\n \"processes\": \"notepad.exe\"\r\n },\r\n \"runScheduledScan\": false,\r\n \"scanType\": \"Quick\",\r\n \"scanDay\": \"7\",\r\n \"scanTimeInMinutes\": \"120\"\r\n }\r\n },\r\n \"systemData\": {\r\n \"createdAt\": \"2020-08-22T10:25:21.4596406-04:00\",\r\n \"createdBy\": \"stowen@microsoft.com\",\r\n \"createdByType\": \"User\",\r\n \"lastModifiedAt\": \"2020-08-22T10:25:21.4596406-04:00\",\r\n \"lastModifiedBy\": \"stowen@microsoft.com\",\r\n \"lastModifiedByType\": \"User\"\r\n }\r\n}", + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "cdd53a71-7d81-493d-bce6-224fec7223a9" + } +} \ No newline at end of file diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/ConfigurationProfilePreferencesTests/ConfigurationProfilesPreferencesListsAnyPreferences.json b/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/ConfigurationProfilePreferencesTests/ConfigurationProfilesPreferencesListsAnyPreferences.json new file mode 100644 index 0000000000000..480262b01f7f0 --- /dev/null +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/ConfigurationProfilePreferencesTests/ConfigurationProfilesPreferencesListsAnyPreferences.json @@ -0,0 +1,140 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/cdd53a71-7d81-493d-bce6-224fec7223a9/providers/Microsoft.Automanage/configurationProfilePreferences?api-version=2020-06-30-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2RkNTNhNzEtN2Q4MS00OTNkLWJjZTYtMjI0ZmVjNzIyM2E5L3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0b21hbmFnZS9jb25maWd1cmF0aW9uUHJvZmlsZVByZWZlcmVuY2VzP2FwaS12ZXJzaW9uPTIwMjAtMDYtMzAtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "aad404b2-a898-4dea-9627-e9b1d11d79af" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.28207.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18363.", + "Microsoft.Azure.Management.Automanage.AutomanageClient/1.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Request-Context": [ + "appId=cid-v1:a4d240dc-d543-4b4e-a019-0a571290b85d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Kestrel" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "3eef991e-5418-40e1-bc63-d1281f9e40f4" + ], + "x-ms-correlation-request-id": [ + "3eef991e-5418-40e1-bc63-d1281f9e40f4" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20200822T142714Z:3eef991e-5418-40e1-bc63-d1281f9e40f4" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Sat, 22 Aug 2020 14:27:14 GMT" + ], + "Content-Length": [ + "771" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"values\": [\r\n {\r\n \"id\": \"/subscriptions/cdd53a71-7d81-493d-bce6-224fec7223a9/resourceGroups/myNewAmVm3/providers/Microsoft.Automanage/configurationProfilePreferences/MyNewCustomPrefs\",\r\n \"name\": \"MyNewCustomPrefs\",\r\n \"type\": \"Microsoft.Automanage/configurationProfilePreferences\",\r\n \"location\": \"westus2\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"antimalware\": {\r\n \"enableRealTimeProtection\": true,\r\n \"exclusions\": {\r\n \"extensions\": \"c:\\\\temp\",\r\n \"paths\": \"myDb.sql\",\r\n \"processes\": \"notepad.exe\"\r\n },\r\n \"runScheduledScan\": false,\r\n \"scanType\": \"Quick\",\r\n \"scanDay\": \"7\",\r\n \"scanTimeInMinutes\": \"120\"\r\n }\r\n },\r\n \"systemData\": {\r\n \"createdAt\": \"2020-08-22T10:25:21.4596406-04:00\",\r\n \"createdBy\": \"stowen@microsoft.com\",\r\n \"createdByType\": \"User\",\r\n \"lastModifiedAt\": \"2020-08-22T10:25:21.4596406-04:00\",\r\n \"lastModifiedBy\": \"stowen@microsoft.com\",\r\n \"lastModifiedByType\": \"User\"\r\n }\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cdd53a71-7d81-493d-bce6-224fec7223a9/resourceGroups/MYNEWAMVM3/providers/Microsoft.Automanage/configurationProfilePreferences/MyNewCustomPrefs?api-version=2020-06-30-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2RkNTNhNzEtN2Q4MS00OTNkLWJjZTYtMjI0ZmVjNzIyM2E5L3Jlc291cmNlR3JvdXBzL01ZTkVXQU1WTTMvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRvbWFuYWdlL2NvbmZpZ3VyYXRpb25Qcm9maWxlUHJlZmVyZW5jZXMvTXlOZXdDdXN0b21QcmVmcz9hcGktdmVyc2lvbj0yMDIwLTA2LTMwLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "dc6c66c6-91cf-4d57-a4e2-36a850843092" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.28207.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18363.", + "Microsoft.Azure.Management.Automanage.AutomanageClient/1.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Request-Context": [ + "appId=cid-v1:a4d240dc-d543-4b4e-a019-0a571290b85d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Kestrel" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11998" + ], + "x-ms-request-id": [ + "de5ca056-fab8-43cc-96b2-80296b89f896" + ], + "x-ms-correlation-request-id": [ + "de5ca056-fab8-43cc-96b2-80296b89f896" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20200822T142715Z:de5ca056-fab8-43cc-96b2-80296b89f896" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Sat, 22 Aug 2020 14:27:15 GMT" + ], + "Content-Length": [ + "758" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cdd53a71-7d81-493d-bce6-224fec7223a9/resourceGroups/myNewAmVm3/providers/Microsoft.Automanage/configurationProfilePreferences/MyNewCustomPrefs\",\r\n \"name\": \"MyNewCustomPrefs\",\r\n \"type\": \"Microsoft.Automanage/configurationProfilePreferences\",\r\n \"location\": \"westus2\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"antimalware\": {\r\n \"enableRealTimeProtection\": true,\r\n \"exclusions\": {\r\n \"extensions\": \"c:\\\\temp\",\r\n \"paths\": \"myDb.sql\",\r\n \"processes\": \"notepad.exe\"\r\n },\r\n \"runScheduledScan\": false,\r\n \"scanType\": \"Quick\",\r\n \"scanDay\": \"7\",\r\n \"scanTimeInMinutes\": \"120\"\r\n }\r\n },\r\n \"systemData\": {\r\n \"createdAt\": \"2020-08-22T10:25:21.4596406-04:00\",\r\n \"createdBy\": \"stowen@microsoft.com\",\r\n \"createdByType\": \"User\",\r\n \"lastModifiedAt\": \"2020-08-22T10:25:21.4596406-04:00\",\r\n \"lastModifiedBy\": \"stowen@microsoft.com\",\r\n \"lastModifiedByType\": \"User\"\r\n }\r\n}", + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "cdd53a71-7d81-493d-bce6-224fec7223a9" + } +} \ No newline at end of file diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/ConfigurationProfilePreferencesTests/ConfigurationProfilesPreferencesListsPreferences.json b/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/ConfigurationProfilePreferencesTests/ConfigurationProfilesPreferencesListsPreferences.json new file mode 100644 index 0000000000000..23cfbb6e00792 --- /dev/null +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/ConfigurationProfilePreferencesTests/ConfigurationProfilesPreferencesListsPreferences.json @@ -0,0 +1,74 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/cdd53a71-7d81-493d-bce6-224fec7223a9/resourceGroups/MYNEWAMVM3/providers/Microsoft.Automanage/configurationProfilePreferences?api-version=2020-06-30-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2RkNTNhNzEtN2Q4MS00OTNkLWJjZTYtMjI0ZmVjNzIyM2E5L3Jlc291cmNlR3JvdXBzL01ZTkVXQU1WTTMvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRvbWFuYWdlL2NvbmZpZ3VyYXRpb25Qcm9maWxlUHJlZmVyZW5jZXM/YXBpLXZlcnNpb249MjAyMC0wNi0zMC1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "d047ffe4-6355-4f3d-a29f-dc743a625a89" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.28207.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18363.", + "Microsoft.Azure.Management.Automanage.AutomanageClient/1.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Request-Context": [ + "appId=cid-v1:a4d240dc-d543-4b4e-a019-0a571290b85d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Kestrel" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11998" + ], + "x-ms-request-id": [ + "8955c30b-aab9-4548-8ae9-5e8cd55063b8" + ], + "x-ms-correlation-request-id": [ + "8955c30b-aab9-4548-8ae9-5e8cd55063b8" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20200822T142954Z:8955c30b-aab9-4548-8ae9-5e8cd55063b8" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Sat, 22 Aug 2020 14:29:53 GMT" + ], + "Content-Length": [ + "771" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"values\": [\r\n {\r\n \"id\": \"/subscriptions/cdd53a71-7d81-493d-bce6-224fec7223a9/resourceGroups/myNewAmVm3/providers/Microsoft.Automanage/configurationProfilePreferences/MyNewCustomPrefs\",\r\n \"name\": \"MyNewCustomPrefs\",\r\n \"type\": \"Microsoft.Automanage/configurationProfilePreferences\",\r\n \"location\": \"westus2\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"antimalware\": {\r\n \"enableRealTimeProtection\": true,\r\n \"exclusions\": {\r\n \"extensions\": \"c:\\\\temp\",\r\n \"paths\": \"myDb.sql\",\r\n \"processes\": \"notepad.exe\"\r\n },\r\n \"runScheduledScan\": false,\r\n \"scanType\": \"Quick\",\r\n \"scanDay\": \"7\",\r\n \"scanTimeInMinutes\": \"120\"\r\n }\r\n },\r\n \"systemData\": {\r\n \"createdAt\": \"2020-08-22T10:25:21.4596406-04:00\",\r\n \"createdBy\": \"stowen@microsoft.com\",\r\n \"createdByType\": \"User\",\r\n \"lastModifiedAt\": \"2020-08-22T10:25:21.4596406-04:00\",\r\n \"lastModifiedBy\": \"stowen@microsoft.com\",\r\n \"lastModifiedByType\": \"User\"\r\n }\r\n }\r\n ]\r\n}", + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "cdd53a71-7d81-493d-bce6-224fec7223a9" + } +} \ No newline at end of file diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/ConfigurationProfilesAssignmentsTests/ConfigurationProfilesAssignmentsCreatesProfile.json b/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/ConfigurationProfilesAssignmentsTests/ConfigurationProfilesAssignmentsCreatesProfile.json new file mode 100644 index 0000000000000..972e206103f89 --- /dev/null +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/ConfigurationProfilesAssignmentsTests/ConfigurationProfilesAssignmentsCreatesProfile.json @@ -0,0 +1,80 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/cdd53a71-7d81-493d-bce6-224fec7223a9/resourceGroups/mynewamvmVM_group/providers/Microsoft.Compute/virtualMachines/mynewamvmVM/providers/Microsoft.Automanage/configurationProfileAssignments/default?api-version=2020-06-30-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2RkNTNhNzEtN2Q4MS00OTNkLWJjZTYtMjI0ZmVjNzIyM2E5L3Jlc291cmNlR3JvdXBzL215bmV3YW12bVZNX2dyb3VwL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29tcHV0ZS92aXJ0dWFsTWFjaGluZXMvbXluZXdhbXZtVk0vcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRvbWFuYWdlL2NvbmZpZ3VyYXRpb25Qcm9maWxlQXNzaWdubWVudHMvZGVmYXVsdD9hcGktdmVyc2lvbj0yMDIwLTA2LTMwLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"configurationProfile\": \"Azure Best Practices - Prod\",\r\n \"targetId\": \"/subscriptions/cdd53a71-7d81-493d-bce6-224fec7223a9/resourceGroups/mynewamvmVM_group/providers/Microsoft.Compute/virtualMachines/mynewamvmVM\",\r\n \"accountId\": \"/subscriptions/cdd53a71-7d81-493d-bce6-224fec7223a9/resourceGroups/AMVM-SubLib-017_group/providers/Microsoft.Automanage/accounts/AMVM-SubLib-017-ABP\"\r\n }\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "132da640-bfbe-4f55-850d-ac9306056430" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.28207.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18363.", + "Microsoft.Azure.Management.Automanage.AutomanageClient/1.0.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "418" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Request-Context": [ + "appId=cid-v1:a4d240dc-d543-4b4e-a019-0a571290b85d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Kestrel" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "602cebb3-7473-4ce6-97ec-caca48afa50f" + ], + "x-ms-correlation-request-id": [ + "602cebb3-7473-4ce6-97ec-caca48afa50f" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20200821T151944Z:602cebb3-7473-4ce6-97ec-caca48afa50f" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 21 Aug 2020 15:19:44 GMT" + ], + "Content-Length": [ + "127" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"UpdateOnPutNotSupported\",\r\n \"message\": \"Updating values of an existing item on PUT is not currently supported.\"\r\n }\r\n}", + "StatusCode": 409 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "cdd53a71-7d81-493d-bce6-224fec7223a9" + } +} \ No newline at end of file diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/ConfigurationProfilesAssignmentsTests/ConfigurationProfilesAssignmentsGetsExpectedProfile.json b/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/ConfigurationProfilesAssignmentsTests/ConfigurationProfilesAssignmentsGetsExpectedProfile.json new file mode 100644 index 0000000000000..8b7608e8c5328 --- /dev/null +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/ConfigurationProfilesAssignmentsTests/ConfigurationProfilesAssignmentsGetsExpectedProfile.json @@ -0,0 +1,206 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/cdd53a71-7d81-493d-bce6-224fec7223a9/resourceGroups/AMVM-SubLib-017_group/providers/Microsoft.Automanage/configurationProfileAssignments?api-version=2020-06-30-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2RkNTNhNzEtN2Q4MS00OTNkLWJjZTYtMjI0ZmVjNzIyM2E5L3Jlc291cmNlR3JvdXBzL0FNVk0tU3ViTGliLTAxN19ncm91cC9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYW5hZ2UvY29uZmlndXJhdGlvblByb2ZpbGVBc3NpZ25tZW50cz9hcGktdmVyc2lvbj0yMDIwLTA2LTMwLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "1ff82f08-6792-4579-a723-cf3cc51af06a" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.28207.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18363.", + "Microsoft.Azure.Management.Automanage.AutomanageClient/1.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Request-Context": [ + "appId=cid-v1:a4d240dc-d543-4b4e-a019-0a571290b85d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Kestrel" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "3758704f-fc16-453c-b79f-a9c1dba1b402" + ], + "x-ms-correlation-request-id": [ + "3758704f-fc16-453c-b79f-a9c1dba1b402" + ], + "x-ms-routing-request-id": [ + "CANADACENTRAL:20200821T151347Z:3758704f-fc16-453c-b79f-a9c1dba1b402" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 21 Aug 2020 15:13:46 GMT" + ], + "Content-Length": [ + "13" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"values\": []\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cdd53a71-7d81-493d-bce6-224fec7223a9/resourceGroups/AMVM-SubLib-017_group/providers/Microsoft.Automanage/configurationProfileAssignments?api-version=2020-06-30-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2RkNTNhNzEtN2Q4MS00OTNkLWJjZTYtMjI0ZmVjNzIyM2E5L3Jlc291cmNlR3JvdXBzL0FNVk0tU3ViTGliLTAxN19ncm91cC9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYW5hZ2UvY29uZmlndXJhdGlvblByb2ZpbGVBc3NpZ25tZW50cz9hcGktdmVyc2lvbj0yMDIwLTA2LTMwLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "331bcfb2-f1bf-46c4-aef4-8ad567423bf5" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.28207.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18363.", + "Microsoft.Azure.Management.Automanage.AutomanageClient/1.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Request-Context": [ + "appId=cid-v1:a4d240dc-d543-4b4e-a019-0a571290b85d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Kestrel" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11997" + ], + "x-ms-request-id": [ + "de2aa054-f586-4c20-b4c4-cfa5684e586e" + ], + "x-ms-correlation-request-id": [ + "de2aa054-f586-4c20-b4c4-cfa5684e586e" + ], + "x-ms-routing-request-id": [ + "CANADACENTRAL:20200821T151347Z:de2aa054-f586-4c20-b4c4-cfa5684e586e" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 21 Aug 2020 15:13:47 GMT" + ], + "Content-Length": [ + "13" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"values\": []\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cdd53a71-7d81-493d-bce6-224fec7223a9/resourceGroups/AMVM-SubLib-017_group/providers/Microsoft.Automanage/accounts/AMVM-SubLib-017-ABP?api-version=2020-06-30-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2RkNTNhNzEtN2Q4MS00OTNkLWJjZTYtMjI0ZmVjNzIyM2E5L3Jlc291cmNlR3JvdXBzL0FNVk0tU3ViTGliLTAxN19ncm91cC9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYW5hZ2UvYWNjb3VudHMvQU1WTS1TdWJMaWItMDE3LUFCUD9hcGktdmVyc2lvbj0yMDIwLTA2LTMwLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "1c2516ce-9cf5-4695-83ee-4e77ccfe800b" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.28207.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18363.", + "Microsoft.Azure.Management.Automanage.AutomanageClient/1.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Request-Context": [ + "appId=cid-v1:a4d240dc-d543-4b4e-a019-0a571290b85d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Kestrel" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11998" + ], + "x-ms-request-id": [ + "d5da7ce5-61ff-41cf-b705-e8cb04e7fb9b" + ], + "x-ms-correlation-request-id": [ + "d5da7ce5-61ff-41cf-b705-e8cb04e7fb9b" + ], + "x-ms-routing-request-id": [ + "CANADACENTRAL:20200821T151347Z:d5da7ce5-61ff-41cf-b705-e8cb04e7fb9b" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 21 Aug 2020 15:13:46 GMT" + ], + "Content-Length": [ + "385" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"identity\": {\r\n \"type\": \"SystemAssigned\",\r\n \"principalId\": \"f60187c9-9456-4386-aeb9-c1b50278e3f9\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\r\n },\r\n \"location\": \"eastus\",\r\n \"id\": \"/subscriptions/cdd53a71-7d81-493d-bce6-224fec7223a9/resourceGroups/AMVM-SubLib-017_group/providers/Microsoft.Automanage/accounts/AMVM-SubLib-017-ABP\",\r\n \"name\": \"AMVM-SubLib-017-ABP\",\r\n \"type\": \"Microsoft.Automanage/accounts\"\r\n}", + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "cdd53a71-7d81-493d-bce6-224fec7223a9" + } +} \ No newline at end of file diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/ConfigurationProfilesAssignmentsTests/ConfigurationProfilesListAssignmentsGetsExpectedProfile.json b/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/ConfigurationProfilesAssignmentsTests/ConfigurationProfilesListAssignmentsGetsExpectedProfile.json new file mode 100644 index 0000000000000..dbfc9a7061302 --- /dev/null +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/ConfigurationProfilesAssignmentsTests/ConfigurationProfilesListAssignmentsGetsExpectedProfile.json @@ -0,0 +1,74 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/cdd53a71-7d81-493d-bce6-224fec7223a9/resourceGroups/DeluxeTest/providers/Microsoft.Automanage/configurationProfileAssignments?api-version=2020-06-30-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2RkNTNhNzEtN2Q4MS00OTNkLWJjZTYtMjI0ZmVjNzIyM2E5L3Jlc291cmNlR3JvdXBzL0RlbHV4ZVRlc3QvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRvbWFuYWdlL2NvbmZpZ3VyYXRpb25Qcm9maWxlQXNzaWdubWVudHM/YXBpLXZlcnNpb249MjAyMC0wNi0zMC1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "e49a79a2-ca4a-4a1f-9afa-4ea84b6dcf1e" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.28207.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18363.", + "Microsoft.Azure.Management.Automanage.AutomanageClient/1.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Request-Context": [ + "appId=cid-v1:a4d240dc-d543-4b4e-a019-0a571290b85d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Kestrel" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "1d14fe1b-14fc-4e01-99a9-c686c28704af" + ], + "x-ms-correlation-request-id": [ + "1d14fe1b-14fc-4e01-99a9-c686c28704af" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20200821T165801Z:1d14fe1b-14fc-4e01-99a9-c686c28704af" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 21 Aug 2020 16:58:01 GMT" + ], + "Content-Length": [ + "770" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"values\": [\r\n {\r\n \"properties\": {\r\n \"targetId\": \"/subscriptions/cdd53a71-7d81-493d-bce6-224fec7223a9/resourceGroups/DeluxeTest/providers/Microsoft.Compute/virtualMachines/TestMeAmvmv\",\r\n \"configurationProfile\": \"Azure virtual machine best practices – Production\",\r\n \"accountId\": \"/subscriptions/cdd53a71-7d81-493d-bce6-224fec7223a9/resourceGroups/AMVM-SubLib-017_group/providers/Microsoft.Automanage/accounts/AMVM-SubLib-017-ABP\",\r\n \"provisioningState\": \"New\",\r\n \"compliance\": {\r\n \"status\": \"InProgress\"\r\n }\r\n },\r\n \"id\": \"/subscriptions/cdd53a71-7d81-493d-bce6-224fec7223a9/resourceGroups/DeluxeTest/providers/Microsoft.Compute/virtualMachines/TestMeAmvmv/providers/Microsoft.Automanage/configurationProfileAssignments/default\",\r\n \"name\": \"default\",\r\n \"type\": \"Microsoft.Automanage/configurationProfileAssignments\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "cdd53a71-7d81-493d-bce6-224fec7223a9" + } +} \ No newline at end of file From 59a9fea89b6abb38ad6e9cc27027c53c0dda6156 Mon Sep 17 00:00:00 2001 From: Stephen Owen Date: Sat, 22 Aug 2020 10:50:36 -0400 Subject: [PATCH 03/20] updated readme --- .../Microsoft.Azure.Management.Automanage/src/CHANGELOG.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/CHANGELOG.md b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/CHANGELOG.md index acc61cade724d..8cdf4ea8dbc25 100644 --- a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/CHANGELOG.md +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/CHANGELOG.md @@ -1,11 +1,11 @@ -# Microsoft.Azure.Management.GuestConfiguration release notes +# Microsoft.Azure.Management.Automanage release notes ## Changes in 0.6.0-preview ### Features -Provides Microsoft Azure Automanage operations including the ability to create, update and get guest configuration assignments, compliance statuses, guest configuration assignment reports. +Provides Microsoft Azure Automanage operations including the ability to create, update and get Automanage configuration assignments, compliance statuses, and Automanage assignment reports. ### Bug fixes None ### REST API version -This version of the GuestConfiguration .NET client library targets version 2020-06-30-preview of the Azure Automanage REST API. \ No newline at end of file +This version of the Automanage .NET client library targets version 2020-06-30-preview of the Azure Automanage REST API. \ No newline at end of file From 2624dd283dd7ec717392d4fd36be28996bfe97b0 Mon Sep 17 00:00:00 2001 From: Stephen Owen Date: Tue, 25 Aug 2020 09:15:01 -0400 Subject: [PATCH 04/20] updated versions, included AssemblyInfo --- .../src/CHANGELOG.md | 2 +- .../src/Properties/AssemblyInfo.cs | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 sdk/automanage/Microsoft.Azure.Management.Automanage/src/Properties/AssemblyInfo.cs diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/CHANGELOG.md b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/CHANGELOG.md index 8cdf4ea8dbc25..0d4a9f52901d8 100644 --- a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/CHANGELOG.md +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/CHANGELOG.md @@ -2,7 +2,7 @@ ## Changes in 0.6.0-preview ### Features -Provides Microsoft Azure Automanage operations including the ability to create, update and get Automanage configuration assignments, compliance statuses, and Automanage assignment reports. +Provides Microsoft Azure Automanage management operations including the ability to create, update and get Automanaged profile assignments, compliance statuses, automation accounts, and other related artifacts. ### Bug fixes None diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Properties/AssemblyInfo.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000000..d88e25f02aae5 --- /dev/null +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Properties/AssemblyInfo.cs @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +using System.Reflection; +using System.Resources; + +[assembly: AssemblyTitle("Microsoft Azure Automanaged Management Library")] +[assembly: AssemblyDescription("Provides Microsoft Azure Automanage management operations including the ability to create, update and get Automanaged profile assignments, compliance statuses, automation accounts, and other related artifacts.")] + +[assembly: AssemblyVersion("0.6.0")] +[assembly: AssemblyFileVersion("0.6.0")] + +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("Azure .NET SDK")] +[assembly: AssemblyCopyright("Copyright (c) Microsoft Corporation")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] +[assembly: NeutralResourcesLanguage("en")] \ No newline at end of file From 4b72d7748eb29227289d45698fd626bd6e189ca6 Mon Sep 17 00:00:00 2001 From: Stephen Owen Date: Tue, 25 Aug 2020 09:20:45 -0400 Subject: [PATCH 05/20] removed unneeded package references --- .../src/Microsoft.Azure.Management.Automanage.csproj | 6 ------ 1 file changed, 6 deletions(-) diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Microsoft.Azure.Management.Automanage.csproj b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Microsoft.Azure.Management.Automanage.csproj index c5a881ff30161..3f078bbfd3e2d 100644 --- a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Microsoft.Azure.Management.Automanage.csproj +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Microsoft.Azure.Management.Automanage.csproj @@ -10,12 +10,6 @@ For detailed release notes, see: https://github.com/Azure/azure-sdk-for-net/blob/psSdkJson6/src/SDKs/Automanage/Management.Automanage/changelog.md - - - - - - $(SdkTargetFx) From 3e5f1dbfd15495207ddcddf0d3ef95ef32b2b95d Mon Sep 17 00:00:00 2001 From: Stephen Owen Date: Tue, 25 Aug 2020 11:38:26 -0400 Subject: [PATCH 06/20] updated assemblyname to properCasing --- .../Microsoft.Azure.Management.Automanage.sln | 4 ++-- .../src/Generated/AccountsOperations.cs | 2 +- .../src/Generated/AccountsOperationsExtensions.cs | 2 +- .../src/Generated/AutomanageClient.cs | 2 +- .../ConfigurationProfileAssignmentsOperations.cs | 2 +- ...ConfigurationProfileAssignmentsOperationsExtensions.cs | 2 +- .../ConfigurationProfilePreferencesOperations.cs | 2 +- ...ConfigurationProfilePreferencesOperationsExtensions.cs | 2 +- .../src/Generated/IAccountsOperations.cs | 2 +- .../src/Generated/IAutomanageClient.cs | 2 +- .../IConfigurationProfileAssignmentsOperations.cs | 2 +- .../IConfigurationProfilePreferencesOperations.cs | 2 +- .../src/Generated/IOperations.cs | 2 +- .../src/Generated/Models/Account.cs | 2 +- .../src/Generated/Models/AccountIdentity.cs | 2 +- .../src/Generated/Models/ConfigurationProfile.cs | 2 +- .../Generated/Models/ConfigurationProfileAssignment.cs | 2 +- .../Models/ConfigurationProfileAssignmentCompliance.cs | 2 +- .../Models/ConfigurationProfileAssignmentProperties.cs | 2 +- .../Generated/Models/ConfigurationProfilePreference.cs | 2 +- .../Models/ConfigurationProfilePreferenceAntiMalware.cs | 2 +- .../Models/ConfigurationProfilePreferenceProperties.cs | 2 +- .../Models/ConfigurationProfilePreferenceVmBackup.cs | 2 +- .../src/Generated/Models/EnableRealTimeProtection.cs | 2 +- .../src/Generated/Models/ErrorResponse.cs | 2 +- .../src/Generated/Models/ErrorResponseBody.cs | 2 +- .../src/Generated/Models/ErrorResponseException.cs | 2 +- .../src/Generated/Models/Operation.cs | 2 +- .../src/Generated/Models/OperationDisplay.cs | 2 +- .../src/Generated/Models/Page.cs | 2 +- .../src/Generated/Models/ProvisioningStatus.cs | 2 +- .../src/Generated/Models/ProxyResource.cs | 2 +- .../src/Generated/Models/Resource.cs | 2 +- .../src/Generated/Models/ResourceIdentityType.cs | 2 +- .../src/Generated/Models/RunScheduledScan.cs | 2 +- .../src/Generated/Models/ScanType.cs | 2 +- .../src/Generated/Models/TrackedResource.cs | 2 +- .../src/Generated/Models/UpdateStatus.cs | 2 +- .../src/Generated/Operations.cs | 2 +- .../src/Generated/OperationsExtensions.cs | 2 +- .../src/Microsoft.Azure.Management.Automanage.csproj | 4 ++-- .../tests/Helpers/RecordedDelegatingHandler.cs | 4 ++-- .../Microsoft.Azure.Management.Automanage.Tests.csproj | 4 ++-- .../tests/ScenarioTests/AccountsTests.cs | 8 ++++---- .../ScenarioTests/ConfigurationProfilePreferencesTests.cs | 8 ++++---- .../ConfigurationProfilesAssignmentsTests.cs | 8 ++++---- .../tests/ScenarioTests/OperationsTests.cs | 8 ++++---- .../tests/ScenarioTests/TestBase.cs | 8 ++++---- 48 files changed, 67 insertions(+), 67 deletions(-) diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/Microsoft.Azure.Management.Automanage.sln b/sdk/automanage/Microsoft.Azure.Management.Automanage/Microsoft.Azure.Management.Automanage.sln index 51f15afc25721..86eb7532b5a63 100644 --- a/sdk/automanage/Microsoft.Azure.Management.Automanage/Microsoft.Azure.Management.Automanage.sln +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/Microsoft.Azure.Management.Automanage.sln @@ -3,9 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.30225.117 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Management.Automanage", "src\Microsoft.Azure.Management.Automanage.csproj", "{729E0304-87FD-499C-A0EB-A9339D91A3FF}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Management.AutoManage", "src\Microsoft.Azure.Management.AutoManage.csproj", "{729E0304-87FD-499C-A0EB-A9339D91A3FF}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Management.Automanage.Tests", "tests\Microsoft.Azure.Management.Automanage.Tests.csproj", "{BF6E0BED-7C6B-47FF-82C1-AD40FE0350EA}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Management.AutoManage.Tests", "tests\Microsoft.Azure.Management.AutoManage.Tests.csproj", "{BF6E0BED-7C6B-47FF-82C1-AD40FE0350EA}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/AccountsOperations.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/AccountsOperations.cs index 65b8232de9d2f..0eb436d0d960e 100644 --- a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/AccountsOperations.cs +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/AccountsOperations.cs @@ -8,7 +8,7 @@ // regenerated. // -namespace Microsoft.Azure.Management.Automanage +namespace Microsoft.Azure.Management.AutoManage { using Microsoft.Rest; using Microsoft.Rest.Azure; diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/AccountsOperationsExtensions.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/AccountsOperationsExtensions.cs index 49b38f8198e93..62d3491a58dfb 100644 --- a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/AccountsOperationsExtensions.cs +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/AccountsOperationsExtensions.cs @@ -8,7 +8,7 @@ // regenerated. // -namespace Microsoft.Azure.Management.Automanage +namespace Microsoft.Azure.Management.AutoManage { using Microsoft.Rest; using Microsoft.Rest.Azure; diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/AutomanageClient.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/AutomanageClient.cs index f817a238c76a2..e0a3862134b68 100644 --- a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/AutomanageClient.cs +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/AutomanageClient.cs @@ -8,7 +8,7 @@ // regenerated. // -namespace Microsoft.Azure.Management.Automanage +namespace Microsoft.Azure.Management.AutoManage { using Microsoft.Rest; using Microsoft.Rest.Azure; diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/ConfigurationProfileAssignmentsOperations.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/ConfigurationProfileAssignmentsOperations.cs index 841ad0a27cf12..910d7cde3d67f 100644 --- a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/ConfigurationProfileAssignmentsOperations.cs +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/ConfigurationProfileAssignmentsOperations.cs @@ -8,7 +8,7 @@ // regenerated. // -namespace Microsoft.Azure.Management.Automanage +namespace Microsoft.Azure.Management.AutoManage { using Microsoft.Rest; using Microsoft.Rest.Azure; diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/ConfigurationProfileAssignmentsOperationsExtensions.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/ConfigurationProfileAssignmentsOperationsExtensions.cs index bd37c422f1f1a..70e2ac4b6c6d9 100644 --- a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/ConfigurationProfileAssignmentsOperationsExtensions.cs +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/ConfigurationProfileAssignmentsOperationsExtensions.cs @@ -8,7 +8,7 @@ // regenerated. // -namespace Microsoft.Azure.Management.Automanage +namespace Microsoft.Azure.Management.AutoManage { using Microsoft.Rest; using Microsoft.Rest.Azure; diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/ConfigurationProfilePreferencesOperations.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/ConfigurationProfilePreferencesOperations.cs index 98a6e17bb3630..74f6228a227fd 100644 --- a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/ConfigurationProfilePreferencesOperations.cs +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/ConfigurationProfilePreferencesOperations.cs @@ -8,7 +8,7 @@ // regenerated. // -namespace Microsoft.Azure.Management.Automanage +namespace Microsoft.Azure.Management.AutoManage { using Microsoft.Rest; using Microsoft.Rest.Azure; diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/ConfigurationProfilePreferencesOperationsExtensions.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/ConfigurationProfilePreferencesOperationsExtensions.cs index f4289cba50a59..08132cc2048c0 100644 --- a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/ConfigurationProfilePreferencesOperationsExtensions.cs +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/ConfigurationProfilePreferencesOperationsExtensions.cs @@ -8,7 +8,7 @@ // regenerated. // -namespace Microsoft.Azure.Management.Automanage +namespace Microsoft.Azure.Management.AutoManage { using Microsoft.Rest; using Microsoft.Rest.Azure; diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/IAccountsOperations.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/IAccountsOperations.cs index a3fbaf02dc023..9e2be4f693609 100644 --- a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/IAccountsOperations.cs +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/IAccountsOperations.cs @@ -8,7 +8,7 @@ // regenerated. // -namespace Microsoft.Azure.Management.Automanage +namespace Microsoft.Azure.Management.AutoManage { using Microsoft.Rest; using Microsoft.Rest.Azure; diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/IAutomanageClient.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/IAutomanageClient.cs index 6c188aab1e5ac..8673fc530a206 100644 --- a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/IAutomanageClient.cs +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/IAutomanageClient.cs @@ -8,7 +8,7 @@ // regenerated. // -namespace Microsoft.Azure.Management.Automanage +namespace Microsoft.Azure.Management.AutoManage { using Microsoft.Rest; using Microsoft.Rest.Azure; diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/IConfigurationProfileAssignmentsOperations.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/IConfigurationProfileAssignmentsOperations.cs index ce75480dd0a46..c6cc880589b4f 100644 --- a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/IConfigurationProfileAssignmentsOperations.cs +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/IConfigurationProfileAssignmentsOperations.cs @@ -8,7 +8,7 @@ // regenerated. // -namespace Microsoft.Azure.Management.Automanage +namespace Microsoft.Azure.Management.AutoManage { using Microsoft.Rest; using Microsoft.Rest.Azure; diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/IConfigurationProfilePreferencesOperations.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/IConfigurationProfilePreferencesOperations.cs index 583cf07ae647b..869dcca17b2d2 100644 --- a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/IConfigurationProfilePreferencesOperations.cs +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/IConfigurationProfilePreferencesOperations.cs @@ -8,7 +8,7 @@ // regenerated. // -namespace Microsoft.Azure.Management.Automanage +namespace Microsoft.Azure.Management.AutoManage { using Microsoft.Rest; using Microsoft.Rest.Azure; diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/IOperations.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/IOperations.cs index 61caee406e41d..939de59a26d90 100644 --- a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/IOperations.cs +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/IOperations.cs @@ -8,7 +8,7 @@ // regenerated. // -namespace Microsoft.Azure.Management.Automanage +namespace Microsoft.Azure.Management.AutoManage { using Microsoft.Rest; using Microsoft.Rest.Azure; diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/Account.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/Account.cs index faf5333d903b5..1ed4b721ab229 100644 --- a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/Account.cs +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/Account.cs @@ -8,7 +8,7 @@ // regenerated. // -namespace Microsoft.Azure.Management.Automanage.Models +namespace Microsoft.Azure.Management.AutoManage.Models { using Newtonsoft.Json; using System.Collections; diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/AccountIdentity.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/AccountIdentity.cs index 7dc6ceec84064..720dc3bfa6597 100644 --- a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/AccountIdentity.cs +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/AccountIdentity.cs @@ -8,7 +8,7 @@ // regenerated. // -namespace Microsoft.Azure.Management.Automanage.Models +namespace Microsoft.Azure.Management.AutoManage.Models { using Newtonsoft.Json; using System.Linq; diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfile.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfile.cs index e44616853159e..0fc309ed5c304 100644 --- a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfile.cs +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfile.cs @@ -8,7 +8,7 @@ // regenerated. // -namespace Microsoft.Azure.Management.Automanage.Models +namespace Microsoft.Azure.Management.AutoManage.Models { /// diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfileAssignment.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfileAssignment.cs index 29e4e04a13b24..a2fd67eb0c731 100644 --- a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfileAssignment.cs +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfileAssignment.cs @@ -8,7 +8,7 @@ // regenerated. // -namespace Microsoft.Azure.Management.Automanage.Models +namespace Microsoft.Azure.Management.AutoManage.Models { using Newtonsoft.Json; using System.Linq; diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfileAssignmentCompliance.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfileAssignmentCompliance.cs index ce4b26bbc6938..2218901daa7c3 100644 --- a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfileAssignmentCompliance.cs +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfileAssignmentCompliance.cs @@ -8,7 +8,7 @@ // regenerated. // -namespace Microsoft.Azure.Management.Automanage.Models +namespace Microsoft.Azure.Management.AutoManage.Models { using Newtonsoft.Json; using System.Linq; diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfileAssignmentProperties.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfileAssignmentProperties.cs index a1991d0ec9095..d0f436b056c5c 100644 --- a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfileAssignmentProperties.cs +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfileAssignmentProperties.cs @@ -8,7 +8,7 @@ // regenerated. // -namespace Microsoft.Azure.Management.Automanage.Models +namespace Microsoft.Azure.Management.AutoManage.Models { using Newtonsoft.Json; using System.Linq; diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfilePreference.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfilePreference.cs index dc99520292c91..5adfba65333e3 100644 --- a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfilePreference.cs +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfilePreference.cs @@ -8,7 +8,7 @@ // regenerated. // -namespace Microsoft.Azure.Management.Automanage.Models +namespace Microsoft.Azure.Management.AutoManage.Models { using Newtonsoft.Json; using System.Collections; diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfilePreferenceAntiMalware.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfilePreferenceAntiMalware.cs index 8875b4d641bd2..71e30fe9469ab 100644 --- a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfilePreferenceAntiMalware.cs +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfilePreferenceAntiMalware.cs @@ -8,7 +8,7 @@ // regenerated. // -namespace Microsoft.Azure.Management.Automanage.Models +namespace Microsoft.Azure.Management.AutoManage.Models { using Newtonsoft.Json; using System.Linq; diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfilePreferenceProperties.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfilePreferenceProperties.cs index 86314938bf140..af1f2d7bb7f21 100644 --- a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfilePreferenceProperties.cs +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfilePreferenceProperties.cs @@ -8,7 +8,7 @@ // regenerated. // -namespace Microsoft.Azure.Management.Automanage.Models +namespace Microsoft.Azure.Management.AutoManage.Models { using Newtonsoft.Json; using System.Linq; diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfilePreferenceVmBackup.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfilePreferenceVmBackup.cs index e27200a8c493a..921c6dcb14d33 100644 --- a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfilePreferenceVmBackup.cs +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfilePreferenceVmBackup.cs @@ -8,7 +8,7 @@ // regenerated. // -namespace Microsoft.Azure.Management.Automanage.Models +namespace Microsoft.Azure.Management.AutoManage.Models { using Newtonsoft.Json; using System.Linq; diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/EnableRealTimeProtection.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/EnableRealTimeProtection.cs index 8e6a85bd31861..880e8f85892ce 100644 --- a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/EnableRealTimeProtection.cs +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/EnableRealTimeProtection.cs @@ -8,7 +8,7 @@ // regenerated. // -namespace Microsoft.Azure.Management.Automanage.Models +namespace Microsoft.Azure.Management.AutoManage.Models { /// diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ErrorResponse.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ErrorResponse.cs index ca24e2ca8ae26..34ca49919df45 100644 --- a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ErrorResponse.cs +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ErrorResponse.cs @@ -8,7 +8,7 @@ // regenerated. // -namespace Microsoft.Azure.Management.Automanage.Models +namespace Microsoft.Azure.Management.AutoManage.Models { using Newtonsoft.Json; using System.Linq; diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ErrorResponseBody.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ErrorResponseBody.cs index 3eee8cac51557..ad0a894cdaca7 100644 --- a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ErrorResponseBody.cs +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ErrorResponseBody.cs @@ -8,7 +8,7 @@ // regenerated. // -namespace Microsoft.Azure.Management.Automanage.Models +namespace Microsoft.Azure.Management.AutoManage.Models { using Newtonsoft.Json; using System.Linq; diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ErrorResponseException.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ErrorResponseException.cs index b49e95bfe24e9..c628662bd8f17 100644 --- a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ErrorResponseException.cs +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ErrorResponseException.cs @@ -8,7 +8,7 @@ // regenerated. // -namespace Microsoft.Azure.Management.Automanage.Models +namespace Microsoft.Azure.Management.AutoManage.Models { using Microsoft.Rest; diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/Operation.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/Operation.cs index 83e105f29360d..ee3f927f2e59d 100644 --- a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/Operation.cs +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/Operation.cs @@ -8,7 +8,7 @@ // regenerated. // -namespace Microsoft.Azure.Management.Automanage.Models +namespace Microsoft.Azure.Management.AutoManage.Models { using Microsoft.Rest; using Microsoft.Rest.Serialization; diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/OperationDisplay.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/OperationDisplay.cs index de8fbc510b94d..76bafe99c9f4c 100644 --- a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/OperationDisplay.cs +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/OperationDisplay.cs @@ -8,7 +8,7 @@ // regenerated. // -namespace Microsoft.Azure.Management.Automanage.Models +namespace Microsoft.Azure.Management.AutoManage.Models { using Newtonsoft.Json; using System.Linq; diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/Page.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/Page.cs index 1510a14106328..0ac8e5b45f4bf 100644 --- a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/Page.cs +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/Page.cs @@ -8,7 +8,7 @@ // regenerated. // -namespace Microsoft.Azure.Management.Automanage.Models +namespace Microsoft.Azure.Management.AutoManage.Models { using Microsoft.Rest; using Microsoft.Rest.Azure; diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ProvisioningStatus.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ProvisioningStatus.cs index 39e799c0d1c6a..44c289ea2b25c 100644 --- a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ProvisioningStatus.cs +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ProvisioningStatus.cs @@ -8,7 +8,7 @@ // regenerated. // -namespace Microsoft.Azure.Management.Automanage.Models +namespace Microsoft.Azure.Management.AutoManage.Models { /// diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ProxyResource.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ProxyResource.cs index 93b7529e80ca7..5db1da47feede 100644 --- a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ProxyResource.cs +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ProxyResource.cs @@ -8,7 +8,7 @@ // regenerated. // -namespace Microsoft.Azure.Management.Automanage.Models +namespace Microsoft.Azure.Management.AutoManage.Models { using System.Linq; diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/Resource.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/Resource.cs index 35f3ef7e94dbc..39feab1dd40a9 100644 --- a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/Resource.cs +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/Resource.cs @@ -8,7 +8,7 @@ // regenerated. // -namespace Microsoft.Azure.Management.Automanage.Models +namespace Microsoft.Azure.Management.AutoManage.Models { using Microsoft.Rest; using Microsoft.Rest.Azure; diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ResourceIdentityType.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ResourceIdentityType.cs index 3d1ae4491aa1c..2637187a6478e 100644 --- a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ResourceIdentityType.cs +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ResourceIdentityType.cs @@ -8,7 +8,7 @@ // regenerated. // -namespace Microsoft.Azure.Management.Automanage.Models +namespace Microsoft.Azure.Management.AutoManage.Models { using Newtonsoft.Json; using Newtonsoft.Json.Converters; diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/RunScheduledScan.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/RunScheduledScan.cs index 08e058eccbd5e..0ab23b6179acf 100644 --- a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/RunScheduledScan.cs +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/RunScheduledScan.cs @@ -8,7 +8,7 @@ // regenerated. // -namespace Microsoft.Azure.Management.Automanage.Models +namespace Microsoft.Azure.Management.AutoManage.Models { /// diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ScanType.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ScanType.cs index 402ef1096e3fc..ba25bc1e25b7e 100644 --- a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ScanType.cs +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ScanType.cs @@ -8,7 +8,7 @@ // regenerated. // -namespace Microsoft.Azure.Management.Automanage.Models +namespace Microsoft.Azure.Management.AutoManage.Models { /// diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/TrackedResource.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/TrackedResource.cs index 2a109511571d2..9be20b9448d98 100644 --- a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/TrackedResource.cs +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/TrackedResource.cs @@ -8,7 +8,7 @@ // regenerated. // -namespace Microsoft.Azure.Management.Automanage.Models +namespace Microsoft.Azure.Management.AutoManage.Models { using Newtonsoft.Json; using System.Collections; diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/UpdateStatus.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/UpdateStatus.cs index a57d4d77bf466..8c1f511cb6c2b 100644 --- a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/UpdateStatus.cs +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/UpdateStatus.cs @@ -8,7 +8,7 @@ // regenerated. // -namespace Microsoft.Azure.Management.Automanage.Models +namespace Microsoft.Azure.Management.AutoManage.Models { /// diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Operations.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Operations.cs index 3e2db2f56cc30..a0a6968470c7e 100644 --- a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Operations.cs +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Operations.cs @@ -8,7 +8,7 @@ // regenerated. // -namespace Microsoft.Azure.Management.Automanage +namespace Microsoft.Azure.Management.AutoManage { using Microsoft.Rest; using Microsoft.Rest.Azure; diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/OperationsExtensions.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/OperationsExtensions.cs index cef373bc540a1..34681f45f35b9 100644 --- a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/OperationsExtensions.cs +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/OperationsExtensions.cs @@ -8,7 +8,7 @@ // regenerated. // -namespace Microsoft.Azure.Management.Automanage +namespace Microsoft.Azure.Management.AutoManage { using Microsoft.Rest; using Microsoft.Rest.Azure; diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Microsoft.Azure.Management.Automanage.csproj b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Microsoft.Azure.Management.Automanage.csproj index 3f078bbfd3e2d..1f7fc414734b8 100644 --- a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Microsoft.Azure.Management.Automanage.csproj +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Microsoft.Azure.Management.Automanage.csproj @@ -5,8 +5,8 @@ netstandard2.0 - Microsoft.Azure.Management.Automanage - Microsoft.Azure.Management.Automanage + Microsoft.Azure.Management.AutoManage + Microsoft.Azure.Management.AutoManage For detailed release notes, see: https://github.com/Azure/azure-sdk-for-net/blob/psSdkJson6/src/SDKs/Automanage/Management.Automanage/changelog.md diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/Helpers/RecordedDelegatingHandler.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/Helpers/RecordedDelegatingHandler.cs index 2e94a520f570b..97384fdf92e63 100644 --- a/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/Helpers/RecordedDelegatingHandler.cs +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/Helpers/RecordedDelegatingHandler.cs @@ -8,9 +8,9 @@ using System.Net.Http; using System.Net.Http.Headers; using System.Threading.Tasks; -using Microsoft.Azure.Management.Automanage.Models; +using Microsoft.Azure.Management.AutoManage.Models; -namespace Automanage.Tests.Helpers +namespace AutoManage.Tests.Helpers { public class RecordedDelegatingHandler : DelegatingHandler { diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/Microsoft.Azure.Management.Automanage.Tests.csproj b/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/Microsoft.Azure.Management.Automanage.Tests.csproj index fabd8b0728325..5ae4674c41f57 100644 --- a/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/Microsoft.Azure.Management.Automanage.Tests.csproj +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/Microsoft.Azure.Management.Automanage.Tests.csproj @@ -8,7 +8,7 @@ Automanage.Tests Class Library Automanage.Tests 1.0.0 - Microsoft.Azure.Management.Automanage.Tests + Microsoft.Azure.Management.AutoManage.Tests @@ -18,7 +18,7 @@ - + diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/ScenarioTests/AccountsTests.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/ScenarioTests/AccountsTests.cs index 975664bdc57d9..28f8bb2f034e1 100644 --- a/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/ScenarioTests/AccountsTests.cs +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/ScenarioTests/AccountsTests.cs @@ -1,15 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for // license information. -namespace Automanage.Tests.ScenarioTests +namespace AutoManage.Tests.ScenarioTests { using System; using System.Collections.Generic; using System.Net; using System.Threading.Tasks; - using Automanage.Tests.Helpers; - using Microsoft.Azure.Management.Automanage; - using Microsoft.Azure.Management.Automanage.Models; + using AutoManage.Tests.Helpers; + using Microsoft.Azure.Management.AutoManage; + using Microsoft.Azure.Management.AutoManage.Models; using Microsoft.Rest.Azure; using Microsoft.Rest.ClientRuntime.Azure.TestFramework; using Xunit; diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/ScenarioTests/ConfigurationProfilePreferencesTests.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/ScenarioTests/ConfigurationProfilePreferencesTests.cs index adf82495129a8..a255036f454dc 100644 --- a/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/ScenarioTests/ConfigurationProfilePreferencesTests.cs +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/ScenarioTests/ConfigurationProfilePreferencesTests.cs @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for // license information. -namespace Automanage.Tests.ScenarioTests +namespace AutoManage.Tests.ScenarioTests { using System.Net; using System.Threading; using System.Threading.Tasks; - using Automanage.Tests.Helpers; - using Microsoft.Azure.Management.Automanage; - using Microsoft.Azure.Management.Automanage.Models; + using AutoManage.Tests.Helpers; + using Microsoft.Azure.Management.AutoManage; + using Microsoft.Azure.Management.AutoManage.Models; using Microsoft.Rest.ClientRuntime.Azure.TestFramework; using Xunit; using Xunit.Abstractions; diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/ScenarioTests/ConfigurationProfilesAssignmentsTests.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/ScenarioTests/ConfigurationProfilesAssignmentsTests.cs index 7f653d20484f2..1a8769dc5ff65 100644 --- a/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/ScenarioTests/ConfigurationProfilesAssignmentsTests.cs +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/ScenarioTests/ConfigurationProfilesAssignmentsTests.cs @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for // license information. -namespace Automanage.Tests.ScenarioTests +namespace AutoManage.Tests.ScenarioTests { using System.Net; using System.Threading; using System.Threading.Tasks; - using Automanage.Tests.Helpers; - using Microsoft.Azure.Management.Automanage; - using Microsoft.Azure.Management.Automanage.Models; + using AutoManage.Tests.Helpers; + using Microsoft.Azure.Management.AutoManage; + using Microsoft.Azure.Management.AutoManage.Models; using Microsoft.Rest.ClientRuntime.Azure.TestFramework; using Xunit; using Xunit.Abstractions; diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/ScenarioTests/OperationsTests.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/ScenarioTests/OperationsTests.cs index 5a8ca6e5b049b..f080128ec36d7 100644 --- a/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/ScenarioTests/OperationsTests.cs +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/ScenarioTests/OperationsTests.cs @@ -1,15 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for // license information. -namespace Automanage.Tests.ScenarioTests +namespace AutoManage.Tests.ScenarioTests { using System; using System.Collections.Generic; using System.Net; using System.Threading.Tasks; - using Automanage.Tests.Helpers; - using Microsoft.Azure.Management.Automanage; - using Microsoft.Azure.Management.Automanage.Models; + using AutoManage.Tests.Helpers; + using Microsoft.Azure.Management.AutoManage; + using Microsoft.Azure.Management.AutoManage.Models; using Microsoft.Rest.Azure; using Microsoft.Rest.ClientRuntime.Azure.TestFramework; using Xunit; diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/ScenarioTests/TestBase.cs b/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/ScenarioTests/TestBase.cs index 1418e1f0faf17..9e3395de06be6 100644 --- a/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/ScenarioTests/TestBase.cs +++ b/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/ScenarioTests/TestBase.cs @@ -3,17 +3,17 @@ using System; using System.Collections.Generic; -using Microsoft.Azure.Management.Automanage; -using Microsoft.Azure.Management.Automanage.Models; +using Microsoft.Azure.Management.AutoManage; +using Microsoft.Azure.Management.AutoManage.Models; using Xunit; using Microsoft.Rest.ClientRuntime.Azure.TestFramework; using Microsoft.Azure.Test.HttpRecorder; using System.IO; using Microsoft.Azure.Management.ResourceManager; using Microsoft.Azure.Management.ResourceManager.Models; -using Automanage.Tests.Helpers; +using AutoManage.Tests.Helpers; -namespace Automanage.Tests.ScenarioTests +namespace AutoManage.Tests.ScenarioTests { public class TestBase { From 01ae9121ceb25622298157f3faeefe474599b9e2 Mon Sep 17 00:00:00 2001 From: Stephen Owen <69686895+stowen-msft@users.noreply.github.com> Date: Wed, 26 Aug 2020 13:35:00 -0400 Subject: [PATCH 07/20] Rename Microsoft.Azure.Management.Automanage.sln to Microsoft.Azure.Management.AutoManage.sln --- ...t.Automanage.sln => Microsoft.Azure.Management.AutoManage.sln} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sdk/automanage/Microsoft.Azure.Management.Automanage/{Microsoft.Azure.Management.Automanage.sln => Microsoft.Azure.Management.AutoManage.sln} (100%) diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/Microsoft.Azure.Management.Automanage.sln b/sdk/automanage/Microsoft.Azure.Management.Automanage/Microsoft.Azure.Management.AutoManage.sln similarity index 100% rename from sdk/automanage/Microsoft.Azure.Management.Automanage/Microsoft.Azure.Management.Automanage.sln rename to sdk/automanage/Microsoft.Azure.Management.Automanage/Microsoft.Azure.Management.AutoManage.sln From 1630e7d671f47ef038f852e15e89d832c80f2361 Mon Sep 17 00:00:00 2001 From: Stephen Owen Date: Wed, 26 Aug 2020 13:37:16 -0400 Subject: [PATCH 08/20] casing fixes --- .../Microsoft.Azure.Management.AutoManage.sln | 0 .../src/AzSdk.RP.props | 0 .../src/CHANGELOG.md | 0 .../src/Generated/AccountsOperations.cs | 0 .../src/Generated/AccountsOperationsExtensions.cs | 0 .../src/Generated/AutomanageClient.cs | 0 .../src/Generated/ConfigurationProfileAssignmentsOperations.cs | 0 .../ConfigurationProfileAssignmentsOperationsExtensions.cs | 0 .../src/Generated/ConfigurationProfilePreferencesOperations.cs | 0 .../ConfigurationProfilePreferencesOperationsExtensions.cs | 0 .../src/Generated/IAccountsOperations.cs | 0 .../src/Generated/IAutomanageClient.cs | 0 .../src/Generated/IConfigurationProfileAssignmentsOperations.cs | 0 .../src/Generated/IConfigurationProfilePreferencesOperations.cs | 0 .../src/Generated/IOperations.cs | 0 .../src/Generated/Models/Account.cs | 0 .../src/Generated/Models/AccountIdentity.cs | 0 .../src/Generated/Models/ConfigurationProfile.cs | 0 .../src/Generated/Models/ConfigurationProfileAssignment.cs | 0 .../Generated/Models/ConfigurationProfileAssignmentCompliance.cs | 0 .../Generated/Models/ConfigurationProfileAssignmentProperties.cs | 0 .../src/Generated/Models/ConfigurationProfilePreference.cs | 0 .../Generated/Models/ConfigurationProfilePreferenceAntiMalware.cs | 0 .../Generated/Models/ConfigurationProfilePreferenceProperties.cs | 0 .../Generated/Models/ConfigurationProfilePreferenceVmBackup.cs | 0 .../src/Generated/Models/EnableRealTimeProtection.cs | 0 .../src/Generated/Models/ErrorResponse.cs | 0 .../src/Generated/Models/ErrorResponseBody.cs | 0 .../src/Generated/Models/ErrorResponseException.cs | 0 .../src/Generated/Models/Operation.cs | 0 .../src/Generated/Models/OperationDisplay.cs | 0 .../src/Generated/Models/Page.cs | 0 .../src/Generated/Models/ProvisioningStatus.cs | 0 .../src/Generated/Models/ProxyResource.cs | 0 .../src/Generated/Models/Resource.cs | 0 .../src/Generated/Models/ResourceIdentityType.cs | 0 .../src/Generated/Models/RunScheduledScan.cs | 0 .../src/Generated/Models/ScanType.cs | 0 .../src/Generated/Models/TrackedResource.cs | 0 .../src/Generated/Models/UpdateStatus.cs | 0 .../src/Generated/Operations.cs | 0 .../src/Generated/OperationsExtensions.cs | 0 .../src/Microsoft.Azure.Management.AutoManage.csproj} | 0 .../src/Properties/AssemblyInfo.cs | 0 .../src/generate.ps1 | 0 .../tests/Helpers/RecordedDelegatingHandler.cs | 0 .../tests/Microsoft.Azure.Management.AutoManage.Tests.csproj} | 0 .../tests/ScenarioTests/AccountsTests.cs | 0 .../tests/ScenarioTests/ConfigurationProfilePreferencesTests.cs | 0 .../tests/ScenarioTests/ConfigurationProfilesAssignmentsTests.cs | 0 .../tests/ScenarioTests/OperationsTests.cs | 0 .../tests/ScenarioTests/TestBase.cs | 0 .../AccountsTests/AccountsOperationsGetsExpectedAccount.json | 0 .../AccountsTests/AccountsOperationsListsReturnsAllAccounts.json | 0 .../ConfigurationProfilesPreferencesCreatesPreferences.json | 0 ...igurationProfilesPreferencesGetReturnsExpectedPreferences.json | 0 .../ConfigurationProfilesPreferencesListsAnyPreferences.json | 0 .../ConfigurationProfilesPreferencesListsPreferences.json | 0 .../ConfigurationProfilesAssignmentsCreatesProfile.json | 0 .../ConfigurationProfilesAssignmentsGetsExpectedProfile.json | 0 .../ConfigurationProfilesListAssignmentsGetsExpectedProfile.json | 0 .../tests/SessionRecords/OperationsTests/ListOperationsTest.json | 0 62 files changed, 0 insertions(+), 0 deletions(-) rename sdk/automanage/{Microsoft.Azure.Management.Automanage => Microsoft.Azure.Management.AutoManage}/Microsoft.Azure.Management.AutoManage.sln (100%) rename sdk/automanage/{Microsoft.Azure.Management.Automanage => Microsoft.Azure.Management.AutoManage}/src/AzSdk.RP.props (100%) rename sdk/automanage/{Microsoft.Azure.Management.Automanage => Microsoft.Azure.Management.AutoManage}/src/CHANGELOG.md (100%) rename sdk/automanage/{Microsoft.Azure.Management.Automanage => Microsoft.Azure.Management.AutoManage}/src/Generated/AccountsOperations.cs (100%) rename sdk/automanage/{Microsoft.Azure.Management.Automanage => Microsoft.Azure.Management.AutoManage}/src/Generated/AccountsOperationsExtensions.cs (100%) rename sdk/automanage/{Microsoft.Azure.Management.Automanage => Microsoft.Azure.Management.AutoManage}/src/Generated/AutomanageClient.cs (100%) rename sdk/automanage/{Microsoft.Azure.Management.Automanage => Microsoft.Azure.Management.AutoManage}/src/Generated/ConfigurationProfileAssignmentsOperations.cs (100%) rename sdk/automanage/{Microsoft.Azure.Management.Automanage => Microsoft.Azure.Management.AutoManage}/src/Generated/ConfigurationProfileAssignmentsOperationsExtensions.cs (100%) rename sdk/automanage/{Microsoft.Azure.Management.Automanage => Microsoft.Azure.Management.AutoManage}/src/Generated/ConfigurationProfilePreferencesOperations.cs (100%) rename sdk/automanage/{Microsoft.Azure.Management.Automanage => Microsoft.Azure.Management.AutoManage}/src/Generated/ConfigurationProfilePreferencesOperationsExtensions.cs (100%) rename sdk/automanage/{Microsoft.Azure.Management.Automanage => Microsoft.Azure.Management.AutoManage}/src/Generated/IAccountsOperations.cs (100%) rename sdk/automanage/{Microsoft.Azure.Management.Automanage => Microsoft.Azure.Management.AutoManage}/src/Generated/IAutomanageClient.cs (100%) rename sdk/automanage/{Microsoft.Azure.Management.Automanage => Microsoft.Azure.Management.AutoManage}/src/Generated/IConfigurationProfileAssignmentsOperations.cs (100%) rename sdk/automanage/{Microsoft.Azure.Management.Automanage => Microsoft.Azure.Management.AutoManage}/src/Generated/IConfigurationProfilePreferencesOperations.cs (100%) rename sdk/automanage/{Microsoft.Azure.Management.Automanage => Microsoft.Azure.Management.AutoManage}/src/Generated/IOperations.cs (100%) rename sdk/automanage/{Microsoft.Azure.Management.Automanage => Microsoft.Azure.Management.AutoManage}/src/Generated/Models/Account.cs (100%) rename sdk/automanage/{Microsoft.Azure.Management.Automanage => Microsoft.Azure.Management.AutoManage}/src/Generated/Models/AccountIdentity.cs (100%) rename sdk/automanage/{Microsoft.Azure.Management.Automanage => Microsoft.Azure.Management.AutoManage}/src/Generated/Models/ConfigurationProfile.cs (100%) rename sdk/automanage/{Microsoft.Azure.Management.Automanage => Microsoft.Azure.Management.AutoManage}/src/Generated/Models/ConfigurationProfileAssignment.cs (100%) rename sdk/automanage/{Microsoft.Azure.Management.Automanage => Microsoft.Azure.Management.AutoManage}/src/Generated/Models/ConfigurationProfileAssignmentCompliance.cs (100%) rename sdk/automanage/{Microsoft.Azure.Management.Automanage => Microsoft.Azure.Management.AutoManage}/src/Generated/Models/ConfigurationProfileAssignmentProperties.cs (100%) rename sdk/automanage/{Microsoft.Azure.Management.Automanage => Microsoft.Azure.Management.AutoManage}/src/Generated/Models/ConfigurationProfilePreference.cs (100%) rename sdk/automanage/{Microsoft.Azure.Management.Automanage => Microsoft.Azure.Management.AutoManage}/src/Generated/Models/ConfigurationProfilePreferenceAntiMalware.cs (100%) rename sdk/automanage/{Microsoft.Azure.Management.Automanage => Microsoft.Azure.Management.AutoManage}/src/Generated/Models/ConfigurationProfilePreferenceProperties.cs (100%) rename sdk/automanage/{Microsoft.Azure.Management.Automanage => Microsoft.Azure.Management.AutoManage}/src/Generated/Models/ConfigurationProfilePreferenceVmBackup.cs (100%) rename sdk/automanage/{Microsoft.Azure.Management.Automanage => Microsoft.Azure.Management.AutoManage}/src/Generated/Models/EnableRealTimeProtection.cs (100%) rename sdk/automanage/{Microsoft.Azure.Management.Automanage => Microsoft.Azure.Management.AutoManage}/src/Generated/Models/ErrorResponse.cs (100%) rename sdk/automanage/{Microsoft.Azure.Management.Automanage => Microsoft.Azure.Management.AutoManage}/src/Generated/Models/ErrorResponseBody.cs (100%) rename sdk/automanage/{Microsoft.Azure.Management.Automanage => Microsoft.Azure.Management.AutoManage}/src/Generated/Models/ErrorResponseException.cs (100%) rename sdk/automanage/{Microsoft.Azure.Management.Automanage => Microsoft.Azure.Management.AutoManage}/src/Generated/Models/Operation.cs (100%) rename sdk/automanage/{Microsoft.Azure.Management.Automanage => Microsoft.Azure.Management.AutoManage}/src/Generated/Models/OperationDisplay.cs (100%) rename sdk/automanage/{Microsoft.Azure.Management.Automanage => Microsoft.Azure.Management.AutoManage}/src/Generated/Models/Page.cs (100%) rename sdk/automanage/{Microsoft.Azure.Management.Automanage => Microsoft.Azure.Management.AutoManage}/src/Generated/Models/ProvisioningStatus.cs (100%) rename sdk/automanage/{Microsoft.Azure.Management.Automanage => Microsoft.Azure.Management.AutoManage}/src/Generated/Models/ProxyResource.cs (100%) rename sdk/automanage/{Microsoft.Azure.Management.Automanage => Microsoft.Azure.Management.AutoManage}/src/Generated/Models/Resource.cs (100%) rename sdk/automanage/{Microsoft.Azure.Management.Automanage => Microsoft.Azure.Management.AutoManage}/src/Generated/Models/ResourceIdentityType.cs (100%) rename sdk/automanage/{Microsoft.Azure.Management.Automanage => Microsoft.Azure.Management.AutoManage}/src/Generated/Models/RunScheduledScan.cs (100%) rename sdk/automanage/{Microsoft.Azure.Management.Automanage => Microsoft.Azure.Management.AutoManage}/src/Generated/Models/ScanType.cs (100%) rename sdk/automanage/{Microsoft.Azure.Management.Automanage => Microsoft.Azure.Management.AutoManage}/src/Generated/Models/TrackedResource.cs (100%) rename sdk/automanage/{Microsoft.Azure.Management.Automanage => Microsoft.Azure.Management.AutoManage}/src/Generated/Models/UpdateStatus.cs (100%) rename sdk/automanage/{Microsoft.Azure.Management.Automanage => Microsoft.Azure.Management.AutoManage}/src/Generated/Operations.cs (100%) rename sdk/automanage/{Microsoft.Azure.Management.Automanage => Microsoft.Azure.Management.AutoManage}/src/Generated/OperationsExtensions.cs (100%) rename sdk/automanage/{Microsoft.Azure.Management.Automanage/src/Microsoft.Azure.Management.Automanage.csproj => Microsoft.Azure.Management.AutoManage/src/Microsoft.Azure.Management.AutoManage.csproj} (100%) rename sdk/automanage/{Microsoft.Azure.Management.Automanage => Microsoft.Azure.Management.AutoManage}/src/Properties/AssemblyInfo.cs (100%) rename sdk/automanage/{Microsoft.Azure.Management.Automanage => Microsoft.Azure.Management.AutoManage}/src/generate.ps1 (100%) rename sdk/automanage/{Microsoft.Azure.Management.Automanage => Microsoft.Azure.Management.AutoManage}/tests/Helpers/RecordedDelegatingHandler.cs (100%) rename sdk/automanage/{Microsoft.Azure.Management.Automanage/tests/Microsoft.Azure.Management.Automanage.Tests.csproj => Microsoft.Azure.Management.AutoManage/tests/Microsoft.Azure.Management.AutoManage.Tests.csproj} (100%) rename sdk/automanage/{Microsoft.Azure.Management.Automanage => Microsoft.Azure.Management.AutoManage}/tests/ScenarioTests/AccountsTests.cs (100%) rename sdk/automanage/{Microsoft.Azure.Management.Automanage => Microsoft.Azure.Management.AutoManage}/tests/ScenarioTests/ConfigurationProfilePreferencesTests.cs (100%) rename sdk/automanage/{Microsoft.Azure.Management.Automanage => Microsoft.Azure.Management.AutoManage}/tests/ScenarioTests/ConfigurationProfilesAssignmentsTests.cs (100%) rename sdk/automanage/{Microsoft.Azure.Management.Automanage => Microsoft.Azure.Management.AutoManage}/tests/ScenarioTests/OperationsTests.cs (100%) rename sdk/automanage/{Microsoft.Azure.Management.Automanage => Microsoft.Azure.Management.AutoManage}/tests/ScenarioTests/TestBase.cs (100%) rename sdk/automanage/{Microsoft.Azure.Management.Automanage => Microsoft.Azure.Management.AutoManage}/tests/SessionRecords/AccountsTests/AccountsOperationsGetsExpectedAccount.json (100%) rename sdk/automanage/{Microsoft.Azure.Management.Automanage => Microsoft.Azure.Management.AutoManage}/tests/SessionRecords/AccountsTests/AccountsOperationsListsReturnsAllAccounts.json (100%) rename sdk/automanage/{Microsoft.Azure.Management.Automanage => Microsoft.Azure.Management.AutoManage}/tests/SessionRecords/ConfigurationProfilePreferencesTests/ConfigurationProfilesPreferencesCreatesPreferences.json (100%) rename sdk/automanage/{Microsoft.Azure.Management.Automanage => Microsoft.Azure.Management.AutoManage}/tests/SessionRecords/ConfigurationProfilePreferencesTests/ConfigurationProfilesPreferencesGetReturnsExpectedPreferences.json (100%) rename sdk/automanage/{Microsoft.Azure.Management.Automanage => Microsoft.Azure.Management.AutoManage}/tests/SessionRecords/ConfigurationProfilePreferencesTests/ConfigurationProfilesPreferencesListsAnyPreferences.json (100%) rename sdk/automanage/{Microsoft.Azure.Management.Automanage => Microsoft.Azure.Management.AutoManage}/tests/SessionRecords/ConfigurationProfilePreferencesTests/ConfigurationProfilesPreferencesListsPreferences.json (100%) rename sdk/automanage/{Microsoft.Azure.Management.Automanage => Microsoft.Azure.Management.AutoManage}/tests/SessionRecords/ConfigurationProfilesAssignmentsTests/ConfigurationProfilesAssignmentsCreatesProfile.json (100%) rename sdk/automanage/{Microsoft.Azure.Management.Automanage => Microsoft.Azure.Management.AutoManage}/tests/SessionRecords/ConfigurationProfilesAssignmentsTests/ConfigurationProfilesAssignmentsGetsExpectedProfile.json (100%) rename sdk/automanage/{Microsoft.Azure.Management.Automanage => Microsoft.Azure.Management.AutoManage}/tests/SessionRecords/ConfigurationProfilesAssignmentsTests/ConfigurationProfilesListAssignmentsGetsExpectedProfile.json (100%) rename sdk/automanage/{Microsoft.Azure.Management.Automanage => Microsoft.Azure.Management.AutoManage}/tests/SessionRecords/OperationsTests/ListOperationsTest.json (100%) diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/Microsoft.Azure.Management.AutoManage.sln b/sdk/automanage/Microsoft.Azure.Management.AutoManage/Microsoft.Azure.Management.AutoManage.sln similarity index 100% rename from sdk/automanage/Microsoft.Azure.Management.Automanage/Microsoft.Azure.Management.AutoManage.sln rename to sdk/automanage/Microsoft.Azure.Management.AutoManage/Microsoft.Azure.Management.AutoManage.sln diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/AzSdk.RP.props b/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/AzSdk.RP.props similarity index 100% rename from sdk/automanage/Microsoft.Azure.Management.Automanage/src/AzSdk.RP.props rename to sdk/automanage/Microsoft.Azure.Management.AutoManage/src/AzSdk.RP.props diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/CHANGELOG.md b/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/CHANGELOG.md similarity index 100% rename from sdk/automanage/Microsoft.Azure.Management.Automanage/src/CHANGELOG.md rename to sdk/automanage/Microsoft.Azure.Management.AutoManage/src/CHANGELOG.md diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/AccountsOperations.cs b/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/AccountsOperations.cs similarity index 100% rename from sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/AccountsOperations.cs rename to sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/AccountsOperations.cs diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/AccountsOperationsExtensions.cs b/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/AccountsOperationsExtensions.cs similarity index 100% rename from sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/AccountsOperationsExtensions.cs rename to sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/AccountsOperationsExtensions.cs diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/AutomanageClient.cs b/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/AutomanageClient.cs similarity index 100% rename from sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/AutomanageClient.cs rename to sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/AutomanageClient.cs diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/ConfigurationProfileAssignmentsOperations.cs b/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/ConfigurationProfileAssignmentsOperations.cs similarity index 100% rename from sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/ConfigurationProfileAssignmentsOperations.cs rename to sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/ConfigurationProfileAssignmentsOperations.cs diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/ConfigurationProfileAssignmentsOperationsExtensions.cs b/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/ConfigurationProfileAssignmentsOperationsExtensions.cs similarity index 100% rename from sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/ConfigurationProfileAssignmentsOperationsExtensions.cs rename to sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/ConfigurationProfileAssignmentsOperationsExtensions.cs diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/ConfigurationProfilePreferencesOperations.cs b/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/ConfigurationProfilePreferencesOperations.cs similarity index 100% rename from sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/ConfigurationProfilePreferencesOperations.cs rename to sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/ConfigurationProfilePreferencesOperations.cs diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/ConfigurationProfilePreferencesOperationsExtensions.cs b/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/ConfigurationProfilePreferencesOperationsExtensions.cs similarity index 100% rename from sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/ConfigurationProfilePreferencesOperationsExtensions.cs rename to sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/ConfigurationProfilePreferencesOperationsExtensions.cs diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/IAccountsOperations.cs b/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/IAccountsOperations.cs similarity index 100% rename from sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/IAccountsOperations.cs rename to sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/IAccountsOperations.cs diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/IAutomanageClient.cs b/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/IAutomanageClient.cs similarity index 100% rename from sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/IAutomanageClient.cs rename to sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/IAutomanageClient.cs diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/IConfigurationProfileAssignmentsOperations.cs b/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/IConfigurationProfileAssignmentsOperations.cs similarity index 100% rename from sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/IConfigurationProfileAssignmentsOperations.cs rename to sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/IConfigurationProfileAssignmentsOperations.cs diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/IConfigurationProfilePreferencesOperations.cs b/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/IConfigurationProfilePreferencesOperations.cs similarity index 100% rename from sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/IConfigurationProfilePreferencesOperations.cs rename to sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/IConfigurationProfilePreferencesOperations.cs diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/IOperations.cs b/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/IOperations.cs similarity index 100% rename from sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/IOperations.cs rename to sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/IOperations.cs diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/Account.cs b/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/Models/Account.cs similarity index 100% rename from sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/Account.cs rename to sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/Models/Account.cs diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/AccountIdentity.cs b/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/Models/AccountIdentity.cs similarity index 100% rename from sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/AccountIdentity.cs rename to sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/Models/AccountIdentity.cs diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfile.cs b/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/Models/ConfigurationProfile.cs similarity index 100% rename from sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfile.cs rename to sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/Models/ConfigurationProfile.cs diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfileAssignment.cs b/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/Models/ConfigurationProfileAssignment.cs similarity index 100% rename from sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfileAssignment.cs rename to sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/Models/ConfigurationProfileAssignment.cs diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfileAssignmentCompliance.cs b/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/Models/ConfigurationProfileAssignmentCompliance.cs similarity index 100% rename from sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfileAssignmentCompliance.cs rename to sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/Models/ConfigurationProfileAssignmentCompliance.cs diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfileAssignmentProperties.cs b/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/Models/ConfigurationProfileAssignmentProperties.cs similarity index 100% rename from sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfileAssignmentProperties.cs rename to sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/Models/ConfigurationProfileAssignmentProperties.cs diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfilePreference.cs b/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/Models/ConfigurationProfilePreference.cs similarity index 100% rename from sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfilePreference.cs rename to sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/Models/ConfigurationProfilePreference.cs diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfilePreferenceAntiMalware.cs b/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/Models/ConfigurationProfilePreferenceAntiMalware.cs similarity index 100% rename from sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfilePreferenceAntiMalware.cs rename to sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/Models/ConfigurationProfilePreferenceAntiMalware.cs diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfilePreferenceProperties.cs b/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/Models/ConfigurationProfilePreferenceProperties.cs similarity index 100% rename from sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfilePreferenceProperties.cs rename to sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/Models/ConfigurationProfilePreferenceProperties.cs diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfilePreferenceVmBackup.cs b/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/Models/ConfigurationProfilePreferenceVmBackup.cs similarity index 100% rename from sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ConfigurationProfilePreferenceVmBackup.cs rename to sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/Models/ConfigurationProfilePreferenceVmBackup.cs diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/EnableRealTimeProtection.cs b/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/Models/EnableRealTimeProtection.cs similarity index 100% rename from sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/EnableRealTimeProtection.cs rename to sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/Models/EnableRealTimeProtection.cs diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ErrorResponse.cs b/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/Models/ErrorResponse.cs similarity index 100% rename from sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ErrorResponse.cs rename to sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/Models/ErrorResponse.cs diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ErrorResponseBody.cs b/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/Models/ErrorResponseBody.cs similarity index 100% rename from sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ErrorResponseBody.cs rename to sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/Models/ErrorResponseBody.cs diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ErrorResponseException.cs b/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/Models/ErrorResponseException.cs similarity index 100% rename from sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ErrorResponseException.cs rename to sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/Models/ErrorResponseException.cs diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/Operation.cs b/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/Models/Operation.cs similarity index 100% rename from sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/Operation.cs rename to sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/Models/Operation.cs diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/OperationDisplay.cs b/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/Models/OperationDisplay.cs similarity index 100% rename from sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/OperationDisplay.cs rename to sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/Models/OperationDisplay.cs diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/Page.cs b/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/Models/Page.cs similarity index 100% rename from sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/Page.cs rename to sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/Models/Page.cs diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ProvisioningStatus.cs b/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/Models/ProvisioningStatus.cs similarity index 100% rename from sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ProvisioningStatus.cs rename to sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/Models/ProvisioningStatus.cs diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ProxyResource.cs b/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/Models/ProxyResource.cs similarity index 100% rename from sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ProxyResource.cs rename to sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/Models/ProxyResource.cs diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/Resource.cs b/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/Models/Resource.cs similarity index 100% rename from sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/Resource.cs rename to sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/Models/Resource.cs diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ResourceIdentityType.cs b/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/Models/ResourceIdentityType.cs similarity index 100% rename from sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ResourceIdentityType.cs rename to sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/Models/ResourceIdentityType.cs diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/RunScheduledScan.cs b/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/Models/RunScheduledScan.cs similarity index 100% rename from sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/RunScheduledScan.cs rename to sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/Models/RunScheduledScan.cs diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ScanType.cs b/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/Models/ScanType.cs similarity index 100% rename from sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/ScanType.cs rename to sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/Models/ScanType.cs diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/TrackedResource.cs b/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/Models/TrackedResource.cs similarity index 100% rename from sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/TrackedResource.cs rename to sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/Models/TrackedResource.cs diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/UpdateStatus.cs b/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/Models/UpdateStatus.cs similarity index 100% rename from sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Models/UpdateStatus.cs rename to sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/Models/UpdateStatus.cs diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Operations.cs b/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/Operations.cs similarity index 100% rename from sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/Operations.cs rename to sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/Operations.cs diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/OperationsExtensions.cs b/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/OperationsExtensions.cs similarity index 100% rename from sdk/automanage/Microsoft.Azure.Management.Automanage/src/Generated/OperationsExtensions.cs rename to sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Generated/OperationsExtensions.cs diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Microsoft.Azure.Management.Automanage.csproj b/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Microsoft.Azure.Management.AutoManage.csproj similarity index 100% rename from sdk/automanage/Microsoft.Azure.Management.Automanage/src/Microsoft.Azure.Management.Automanage.csproj rename to sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Microsoft.Azure.Management.AutoManage.csproj diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/Properties/AssemblyInfo.cs b/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Properties/AssemblyInfo.cs similarity index 100% rename from sdk/automanage/Microsoft.Azure.Management.Automanage/src/Properties/AssemblyInfo.cs rename to sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Properties/AssemblyInfo.cs diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/src/generate.ps1 b/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/generate.ps1 similarity index 100% rename from sdk/automanage/Microsoft.Azure.Management.Automanage/src/generate.ps1 rename to sdk/automanage/Microsoft.Azure.Management.AutoManage/src/generate.ps1 diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/Helpers/RecordedDelegatingHandler.cs b/sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/Helpers/RecordedDelegatingHandler.cs similarity index 100% rename from sdk/automanage/Microsoft.Azure.Management.Automanage/tests/Helpers/RecordedDelegatingHandler.cs rename to sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/Helpers/RecordedDelegatingHandler.cs diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/Microsoft.Azure.Management.Automanage.Tests.csproj b/sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/Microsoft.Azure.Management.AutoManage.Tests.csproj similarity index 100% rename from sdk/automanage/Microsoft.Azure.Management.Automanage/tests/Microsoft.Azure.Management.Automanage.Tests.csproj rename to sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/Microsoft.Azure.Management.AutoManage.Tests.csproj diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/ScenarioTests/AccountsTests.cs b/sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/ScenarioTests/AccountsTests.cs similarity index 100% rename from sdk/automanage/Microsoft.Azure.Management.Automanage/tests/ScenarioTests/AccountsTests.cs rename to sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/ScenarioTests/AccountsTests.cs diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/ScenarioTests/ConfigurationProfilePreferencesTests.cs b/sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/ScenarioTests/ConfigurationProfilePreferencesTests.cs similarity index 100% rename from sdk/automanage/Microsoft.Azure.Management.Automanage/tests/ScenarioTests/ConfigurationProfilePreferencesTests.cs rename to sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/ScenarioTests/ConfigurationProfilePreferencesTests.cs diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/ScenarioTests/ConfigurationProfilesAssignmentsTests.cs b/sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/ScenarioTests/ConfigurationProfilesAssignmentsTests.cs similarity index 100% rename from sdk/automanage/Microsoft.Azure.Management.Automanage/tests/ScenarioTests/ConfigurationProfilesAssignmentsTests.cs rename to sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/ScenarioTests/ConfigurationProfilesAssignmentsTests.cs diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/ScenarioTests/OperationsTests.cs b/sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/ScenarioTests/OperationsTests.cs similarity index 100% rename from sdk/automanage/Microsoft.Azure.Management.Automanage/tests/ScenarioTests/OperationsTests.cs rename to sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/ScenarioTests/OperationsTests.cs diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/ScenarioTests/TestBase.cs b/sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/ScenarioTests/TestBase.cs similarity index 100% rename from sdk/automanage/Microsoft.Azure.Management.Automanage/tests/ScenarioTests/TestBase.cs rename to sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/ScenarioTests/TestBase.cs diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/AccountsTests/AccountsOperationsGetsExpectedAccount.json b/sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/SessionRecords/AccountsTests/AccountsOperationsGetsExpectedAccount.json similarity index 100% rename from sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/AccountsTests/AccountsOperationsGetsExpectedAccount.json rename to sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/SessionRecords/AccountsTests/AccountsOperationsGetsExpectedAccount.json diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/AccountsTests/AccountsOperationsListsReturnsAllAccounts.json b/sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/SessionRecords/AccountsTests/AccountsOperationsListsReturnsAllAccounts.json similarity index 100% rename from sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/AccountsTests/AccountsOperationsListsReturnsAllAccounts.json rename to sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/SessionRecords/AccountsTests/AccountsOperationsListsReturnsAllAccounts.json diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/ConfigurationProfilePreferencesTests/ConfigurationProfilesPreferencesCreatesPreferences.json b/sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/SessionRecords/ConfigurationProfilePreferencesTests/ConfigurationProfilesPreferencesCreatesPreferences.json similarity index 100% rename from sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/ConfigurationProfilePreferencesTests/ConfigurationProfilesPreferencesCreatesPreferences.json rename to sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/SessionRecords/ConfigurationProfilePreferencesTests/ConfigurationProfilesPreferencesCreatesPreferences.json diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/ConfigurationProfilePreferencesTests/ConfigurationProfilesPreferencesGetReturnsExpectedPreferences.json b/sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/SessionRecords/ConfigurationProfilePreferencesTests/ConfigurationProfilesPreferencesGetReturnsExpectedPreferences.json similarity index 100% rename from sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/ConfigurationProfilePreferencesTests/ConfigurationProfilesPreferencesGetReturnsExpectedPreferences.json rename to sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/SessionRecords/ConfigurationProfilePreferencesTests/ConfigurationProfilesPreferencesGetReturnsExpectedPreferences.json diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/ConfigurationProfilePreferencesTests/ConfigurationProfilesPreferencesListsAnyPreferences.json b/sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/SessionRecords/ConfigurationProfilePreferencesTests/ConfigurationProfilesPreferencesListsAnyPreferences.json similarity index 100% rename from sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/ConfigurationProfilePreferencesTests/ConfigurationProfilesPreferencesListsAnyPreferences.json rename to sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/SessionRecords/ConfigurationProfilePreferencesTests/ConfigurationProfilesPreferencesListsAnyPreferences.json diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/ConfigurationProfilePreferencesTests/ConfigurationProfilesPreferencesListsPreferences.json b/sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/SessionRecords/ConfigurationProfilePreferencesTests/ConfigurationProfilesPreferencesListsPreferences.json similarity index 100% rename from sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/ConfigurationProfilePreferencesTests/ConfigurationProfilesPreferencesListsPreferences.json rename to sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/SessionRecords/ConfigurationProfilePreferencesTests/ConfigurationProfilesPreferencesListsPreferences.json diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/ConfigurationProfilesAssignmentsTests/ConfigurationProfilesAssignmentsCreatesProfile.json b/sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/SessionRecords/ConfigurationProfilesAssignmentsTests/ConfigurationProfilesAssignmentsCreatesProfile.json similarity index 100% rename from sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/ConfigurationProfilesAssignmentsTests/ConfigurationProfilesAssignmentsCreatesProfile.json rename to sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/SessionRecords/ConfigurationProfilesAssignmentsTests/ConfigurationProfilesAssignmentsCreatesProfile.json diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/ConfigurationProfilesAssignmentsTests/ConfigurationProfilesAssignmentsGetsExpectedProfile.json b/sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/SessionRecords/ConfigurationProfilesAssignmentsTests/ConfigurationProfilesAssignmentsGetsExpectedProfile.json similarity index 100% rename from sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/ConfigurationProfilesAssignmentsTests/ConfigurationProfilesAssignmentsGetsExpectedProfile.json rename to sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/SessionRecords/ConfigurationProfilesAssignmentsTests/ConfigurationProfilesAssignmentsGetsExpectedProfile.json diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/ConfigurationProfilesAssignmentsTests/ConfigurationProfilesListAssignmentsGetsExpectedProfile.json b/sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/SessionRecords/ConfigurationProfilesAssignmentsTests/ConfigurationProfilesListAssignmentsGetsExpectedProfile.json similarity index 100% rename from sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/ConfigurationProfilesAssignmentsTests/ConfigurationProfilesListAssignmentsGetsExpectedProfile.json rename to sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/SessionRecords/ConfigurationProfilesAssignmentsTests/ConfigurationProfilesListAssignmentsGetsExpectedProfile.json diff --git a/sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/OperationsTests/ListOperationsTest.json b/sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/SessionRecords/OperationsTests/ListOperationsTest.json similarity index 100% rename from sdk/automanage/Microsoft.Azure.Management.Automanage/tests/SessionRecords/OperationsTests/ListOperationsTest.json rename to sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/SessionRecords/OperationsTests/ListOperationsTest.json From b35debccf7d29328efb2fe637f09312093d121c9 Mon Sep 17 00:00:00 2001 From: Stephen Owen Date: Thu, 27 Aug 2020 13:27:35 -0400 Subject: [PATCH 09/20] added metadata file --- .../mgmtmetadata/automation_resource-manager.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 eng/mgmt/mgmtmetadata/automation_resource-manager.txt diff --git a/eng/mgmt/mgmtmetadata/automation_resource-manager.txt b/eng/mgmt/mgmtmetadata/automation_resource-manager.txt new file mode 100644 index 0000000000000..f2328b9d19955 --- /dev/null +++ b/eng/mgmt/mgmtmetadata/automation_resource-manager.txt @@ -0,0 +1,14 @@ +Installing AutoRest version: v2 +AutoRest installed successfully. +Commencing code generation +Generating CSharp code +Executing AutoRest command +cmd.exe /c C:\Users\Stephen\AppData\Roaming\npm\autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/automation/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --csharp-sdks-folder=C:\git\stowen\azure-sdk-for-net\sdk +2020-08-27 17:25:35 UTC +Azure-rest-api-specs repository information +GitHub fork: Azure +Branch: master +Commit: bc1d3e6f1d19840375907101b30579c16c8a5d76 +AutoRest information +Requested version: v2 +Bootstrapper version: autorest@2.0.4413 From 78f8cb319335b808b5892812e99a5cb17df9ed8c Mon Sep 17 00:00:00 2001 From: Stephen Owen Date: Tue, 1 Sep 2020 21:07:51 -0400 Subject: [PATCH 10/20] lineending+ --- .../Microsoft.Azure.Management.AutoManage/src/AzSdk.RP.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/AzSdk.RP.props b/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/AzSdk.RP.props index bb65d484a8adf..c90d82d7497ff 100644 --- a/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/AzSdk.RP.props +++ b/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/AzSdk.RP.props @@ -4,4 +4,4 @@ Automation_2015-10-31;Automation_2018-01-15;Automation_2017-05-15-preview;Automation_2018-06-30; $(PackageTags);$(CommonTags);$(AzureApiTag); - \ No newline at end of file + From c3341aa70cf00fe9f60c5ffdd1399a0a6cacb088 Mon Sep 17 00:00:00 2001 From: Stephen Owen Date: Wed, 2 Sep 2020 20:38:32 -0400 Subject: [PATCH 11/20] newline-- --- .../Microsoft.Azure.Management.AutoManage/src/AzSdk.RP.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/AzSdk.RP.props b/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/AzSdk.RP.props index c90d82d7497ff..bb65d484a8adf 100644 --- a/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/AzSdk.RP.props +++ b/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/AzSdk.RP.props @@ -4,4 +4,4 @@ Automation_2015-10-31;Automation_2018-01-15;Automation_2017-05-15-preview;Automation_2018-06-30; $(PackageTags);$(CommonTags);$(AzureApiTag); - + \ No newline at end of file From 9b2b5e16fab9b432701caf50874f5709561676f8 Mon Sep 17 00:00:00 2001 From: Stephen Owen Date: Wed, 2 Sep 2020 22:30:23 -0400 Subject: [PATCH 12/20] changed hardcoded reference to dotnet coreapp31 --- .../Microsoft.Azure.Management.AutoManage.Tests.csproj | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/Microsoft.Azure.Management.AutoManage.Tests.csproj b/sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/Microsoft.Azure.Management.AutoManage.Tests.csproj index 5ae4674c41f57..7546810588da0 100644 --- a/sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/Microsoft.Azure.Management.AutoManage.Tests.csproj +++ b/sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/Microsoft.Azure.Management.AutoManage.Tests.csproj @@ -1,8 +1,8 @@ - - netcoreapp3.1 - + + $(SdkTargetFx) + Automanage.Tests Automanage.Tests Class Library From dced3677c1b212c6bbd2fe0ff7a9aa739b0a9c56 Mon Sep 17 00:00:00 2001 From: Stephen Owen Date: Wed, 2 Sep 2020 23:26:02 -0400 Subject: [PATCH 13/20] PR feedback, fixed csproj hard coded versions, added required properties to csproj --- .../Microsoft.Azure.Management.AutoManage.csproj | 13 +++++++------ ...crosoft.Azure.Management.AutoManage.Tests.csproj | 13 +++++++------ 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Microsoft.Azure.Management.AutoManage.csproj b/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Microsoft.Azure.Management.AutoManage.csproj index 1f7fc414734b8..0d68b5062f022 100644 --- a/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Microsoft.Azure.Management.AutoManage.csproj +++ b/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Microsoft.Azure.Management.AutoManage.csproj @@ -2,17 +2,18 @@ - + + + $(SdkTargetFx) + - netstandard2.0 + AutoManage.Tests + AutoManage.Tests Class Library + 1.0.0 Microsoft.Azure.Management.AutoManage Microsoft.Azure.Management.AutoManage For detailed release notes, see: https://github.com/Azure/azure-sdk-for-net/blob/psSdkJson6/src/SDKs/Automanage/Management.Automanage/changelog.md - - $(SdkTargetFx) - - diff --git a/sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/Microsoft.Azure.Management.AutoManage.Tests.csproj b/sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/Microsoft.Azure.Management.AutoManage.Tests.csproj index 7546810588da0..68a548d5cc141 100644 --- a/sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/Microsoft.Azure.Management.AutoManage.Tests.csproj +++ b/sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/Microsoft.Azure.Management.AutoManage.Tests.csproj @@ -1,13 +1,14 @@ - - $(SdkTargetFx) - - Automanage.Tests - Automanage.Tests Class Library - Automanage.Tests + $(SdkTargetFx) + + + AutoManage.Tests + AutoManage.Tests Class Library + AutoManage.Tests 1.0.0 + AutoManagement;AutoManaged Microsoft.Azure.Management.AutoManage.Tests From ad642700091da6c32351cfb5362db644a229d051 Mon Sep 17 00:00:00 2001 From: Stephen Owen Date: Wed, 2 Sep 2020 23:38:55 -0400 Subject: [PATCH 14/20] fixing ambiguous package name error --- .../src/Microsoft.Azure.Management.AutoManage.csproj | 5 +++-- .../tests/Microsoft.Azure.Management.AutoManage.Tests.csproj | 1 - 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Microsoft.Azure.Management.AutoManage.csproj b/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Microsoft.Azure.Management.AutoManage.csproj index 0d68b5062f022..1ea768a55210e 100644 --- a/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Microsoft.Azure.Management.AutoManage.csproj +++ b/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Microsoft.Azure.Management.AutoManage.csproj @@ -7,11 +7,12 @@ $(SdkTargetFx) - AutoManage.Tests - AutoManage.Tests Class Library + Microsoft.Azure.Management.AutoManage + Microsoft Azure AutoManage Class Library 1.0.0 Microsoft.Azure.Management.AutoManage Microsoft.Azure.Management.AutoManage + AutoManagement;AutoManaged;Automanagement Configuration Profile; Automanagement Account For detailed release notes, see: https://github.com/Azure/azure-sdk-for-net/blob/psSdkJson6/src/SDKs/Automanage/Management.Automanage/changelog.md diff --git a/sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/Microsoft.Azure.Management.AutoManage.Tests.csproj b/sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/Microsoft.Azure.Management.AutoManage.Tests.csproj index 68a548d5cc141..1c09a4ba57006 100644 --- a/sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/Microsoft.Azure.Management.AutoManage.Tests.csproj +++ b/sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/Microsoft.Azure.Management.AutoManage.Tests.csproj @@ -8,7 +8,6 @@ AutoManage.Tests Class Library AutoManage.Tests 1.0.0 - AutoManagement;AutoManaged Microsoft.Azure.Management.AutoManage.Tests From da11b72ea97fee39149d03447f4598977d73bd27 Mon Sep 17 00:00:00 2001 From: Stephen Owen Date: Wed, 2 Sep 2020 23:50:52 -0400 Subject: [PATCH 15/20] fixed version number --- .../src/Microsoft.Azure.Management.AutoManage.csproj | 4 ++-- .../tests/Microsoft.Azure.Management.AutoManage.Tests.csproj | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Microsoft.Azure.Management.AutoManage.csproj b/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Microsoft.Azure.Management.AutoManage.csproj index 1ea768a55210e..4358e59d07518 100644 --- a/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Microsoft.Azure.Management.AutoManage.csproj +++ b/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/Microsoft.Azure.Management.AutoManage.csproj @@ -4,12 +4,12 @@ - $(SdkTargetFx) + $(SdkTargetFx) Microsoft.Azure.Management.AutoManage Microsoft Azure AutoManage Class Library - 1.0.0 + 0.1.0-preview Microsoft.Azure.Management.AutoManage Microsoft.Azure.Management.AutoManage AutoManagement;AutoManaged;Automanagement Configuration Profile; Automanagement Account diff --git a/sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/Microsoft.Azure.Management.AutoManage.Tests.csproj b/sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/Microsoft.Azure.Management.AutoManage.Tests.csproj index 1c09a4ba57006..40196728cc2b4 100644 --- a/sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/Microsoft.Azure.Management.AutoManage.Tests.csproj +++ b/sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/Microsoft.Azure.Management.AutoManage.Tests.csproj @@ -1,13 +1,13 @@ - $(SdkTargetFx) + netcoreapp2.0 AutoManage.Tests AutoManage.Tests Class Library AutoManage.Tests - 1.0.0 + 0.1.0-preview Microsoft.Azure.Management.AutoManage.Tests From 05d83f520f832be97ebe972d5b107b28aa2d8ee0 Mon Sep 17 00:00:00 2001 From: Stephen Owen Date: Thu, 3 Sep 2020 00:14:16 -0400 Subject: [PATCH 16/20] fix wrong reference in generate --- .../Microsoft.Azure.Management.AutoManage/src/generate.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/generate.ps1 b/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/generate.ps1 index c2161441bcf92..2d79ffaf190b0 100644 --- a/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/generate.ps1 +++ b/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/generate.ps1 @@ -1 +1 @@ -Start-AutoRestCodeGeneration -ResourceProvider "automation/resource-manager" -AutoRestVersion "v2" \ No newline at end of file +Start-AutoRestCodeGeneration -ResourceProvider "automanage/resource-manager" -AutoRestVersion "v2" \ No newline at end of file From 8f4711bf659a96fe8b3fe76c45c210a146a3a9de Mon Sep 17 00:00:00 2001 From: Stephen Owen Date: Thu, 3 Sep 2020 00:38:40 -0400 Subject: [PATCH 17/20] PRfeedback, fixed incorrect tag references, version numbers, and remove unneeded dotnet version --- .../mgmtmetadata/automanage_resource-manager.txt | 14 ++++++++++++++ .../src/AzSdk.RP.props | 2 +- .../src/CHANGELOG.md | 2 +- ...rosoft.Azure.Management.AutoManage.Tests.csproj | 3 --- .../ConfigurationProfilesAssignmentsTests.cs | 4 ++-- 5 files changed, 18 insertions(+), 7 deletions(-) create mode 100644 eng/mgmt/mgmtmetadata/automanage_resource-manager.txt diff --git a/eng/mgmt/mgmtmetadata/automanage_resource-manager.txt b/eng/mgmt/mgmtmetadata/automanage_resource-manager.txt new file mode 100644 index 0000000000000..5b9aa34f8314d --- /dev/null +++ b/eng/mgmt/mgmtmetadata/automanage_resource-manager.txt @@ -0,0 +1,14 @@ +Installing AutoRest version: v2 +AutoRest installed successfully. +Commencing code generation +Generating CSharp code +Executing AutoRest command +cmd.exe /c C:\Users\Stephen\AppData\Roaming\npm\autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/automanage/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --csharp-sdks-folder=C:\git\stowen\azure-sdk-for-net\sdk +2020-09-03 04:30:29 UTC +Azure-rest-api-specs repository information +GitHub fork: Azure +Branch: master +Commit: 9ab0b5d07464e0235fb66832c24f31f1602f21b7 +AutoRest information +Requested version: v2 +Bootstrapper version: autorest@2.0.4413 diff --git a/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/AzSdk.RP.props b/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/AzSdk.RP.props index bb65d484a8adf..49c92de420e04 100644 --- a/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/AzSdk.RP.props +++ b/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/AzSdk.RP.props @@ -1,7 +1,7 @@  - Automation_2015-10-31;Automation_2018-01-15;Automation_2017-05-15-preview;Automation_2018-06-30; + AutoManage_0_1_0-preview;AutoManage_06_30_2020-preview; $(PackageTags);$(CommonTags);$(AzureApiTag); \ No newline at end of file diff --git a/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/CHANGELOG.md b/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/CHANGELOG.md index 0d4a9f52901d8..1e82b3895abf1 100644 --- a/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/CHANGELOG.md +++ b/sdk/automanage/Microsoft.Azure.Management.AutoManage/src/CHANGELOG.md @@ -1,6 +1,6 @@ # Microsoft.Azure.Management.Automanage release notes -## Changes in 0.6.0-preview +## Changes in 0.1.0-preview ### Features Provides Microsoft Azure Automanage management operations including the ability to create, update and get Automanaged profile assignments, compliance statuses, automation accounts, and other related artifacts. diff --git a/sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/Microsoft.Azure.Management.AutoManage.Tests.csproj b/sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/Microsoft.Azure.Management.AutoManage.Tests.csproj index 40196728cc2b4..01dc7174190ad 100644 --- a/sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/Microsoft.Azure.Management.AutoManage.Tests.csproj +++ b/sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/Microsoft.Azure.Management.AutoManage.Tests.csproj @@ -1,8 +1,5 @@ - - netcoreapp2.0 - AutoManage.Tests AutoManage.Tests Class Library diff --git a/sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/ScenarioTests/ConfigurationProfilesAssignmentsTests.cs b/sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/ScenarioTests/ConfigurationProfilesAssignmentsTests.cs index 1a8769dc5ff65..8027851212c93 100644 --- a/sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/ScenarioTests/ConfigurationProfilesAssignmentsTests.cs +++ b/sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/ScenarioTests/ConfigurationProfilesAssignmentsTests.cs @@ -27,7 +27,7 @@ public ConfigurationProfilesAssignmentsTests() [Fact] [Trait("Category", "Scenario")] - public async Task ConfigurationProfilesListAssignmentsGetsExpectedProfile() + public void ConfigurationProfilesListAssignmentsGetsExpectedProfile() { var thisType = this.GetType(); using (MockContext context = MockContext.Start(thisType)) @@ -41,7 +41,7 @@ public async Task ConfigurationProfilesListAssignmentsGetsExpectedProfile() [Fact] //[Trait("Category", "Scenario")] - public async Task ConfigurationProfilesAssignmentsCreatesProfile() + public void ConfigurationProfilesAssignmentsCreatesProfile() { var thisType = this.GetType(); using (MockContext context = MockContext.Start(thisType)) From 66f26cc1508cd11736ba91feedc83fa99c2e8428 Mon Sep 17 00:00:00 2001 From: Stephen Owen Date: Thu, 3 Sep 2020 09:42:30 -0400 Subject: [PATCH 18/20] pr feedback, fixing missing session records --- ...rosoft.Azure.Management.AutoManage.Tests.csproj | 14 +++----------- .../ConfigurationProfilePreferencesTests.cs | 4 ++-- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/Microsoft.Azure.Management.AutoManage.Tests.csproj b/sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/Microsoft.Azure.Management.AutoManage.Tests.csproj index 01dc7174190ad..fdde0e28b5ec5 100644 --- a/sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/Microsoft.Azure.Management.AutoManage.Tests.csproj +++ b/sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/Microsoft.Azure.Management.AutoManage.Tests.csproj @@ -1,4 +1,4 @@ - + AutoManage.Tests @@ -8,20 +8,12 @@ Microsoft.Azure.Management.AutoManage.Tests - - PreserveNewest + + PreserveNewest - - - - - PreserveNewest - - - \ No newline at end of file diff --git a/sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/ScenarioTests/ConfigurationProfilePreferencesTests.cs b/sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/ScenarioTests/ConfigurationProfilePreferencesTests.cs index a255036f454dc..1b23f99d973f7 100644 --- a/sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/ScenarioTests/ConfigurationProfilePreferencesTests.cs +++ b/sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/ScenarioTests/ConfigurationProfilePreferencesTests.cs @@ -27,7 +27,7 @@ public ConfigurationProfilePreferencesTests() [Fact] [Trait("Category", "Scenario")] - public async Task ConfigurationProfilesPreferencesListsPreferences() + public void ConfigurationProfilesPreferencesListsPreferences() { var thisType = this.GetType(); using (MockContext context = MockContext.Start(thisType)) @@ -40,7 +40,7 @@ public async Task ConfigurationProfilesPreferencesListsPreferences() [Fact] [Trait("Category", "Scenario")] - public async Task ConfigurationProfilesPreferencesGetReturnsExpectedPreferences() + public void ConfigurationProfilesPreferencesGetReturnsExpectedPreferences() { var thisType = this.GetType(); using (MockContext context = MockContext.Start(thisType)) From 65d4d8195e6436a3a1c7547d2a82fe38295e306d Mon Sep 17 00:00:00 2001 From: Stephen Owen Date: Thu, 3 Sep 2020 10:05:39 -0400 Subject: [PATCH 19/20] renamed missing test --- ...rationsTest.json => ListOperationsGetsAllValidOperations.json} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/SessionRecords/OperationsTests/{ListOperationsTest.json => ListOperationsGetsAllValidOperations.json} (100%) diff --git a/sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/SessionRecords/OperationsTests/ListOperationsTest.json b/sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/SessionRecords/OperationsTests/ListOperationsGetsAllValidOperations.json similarity index 100% rename from sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/SessionRecords/OperationsTests/ListOperationsTest.json rename to sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/SessionRecords/OperationsTests/ListOperationsGetsAllValidOperations.json From 3fa81dd21f163f44b8b1f02527783dd6601b4b3d Mon Sep 17 00:00:00 2001 From: Stephen Owen Date: Thu, 3 Sep 2020 10:34:51 -0400 Subject: [PATCH 20/20] fixed old test --- .../ListOperationsGetsAllValidOperations.json | 47 ++++++++++--------- 1 file changed, 26 insertions(+), 21 deletions(-) diff --git a/sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/SessionRecords/OperationsTests/ListOperationsGetsAllValidOperations.json b/sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/SessionRecords/OperationsTests/ListOperationsGetsAllValidOperations.json index bec1d56306400..7779c2009a570 100644 --- a/sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/SessionRecords/OperationsTests/ListOperationsGetsAllValidOperations.json +++ b/sdk/automanage/Microsoft.Azure.Management.AutoManage/tests/SessionRecords/OperationsTests/ListOperationsGetsAllValidOperations.json @@ -2,53 +2,59 @@ "Entries": [ { "RequestUri": "/providers/Microsoft.Automanage/operations?api-version=2020-06-30-preview", - "EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuQWxlcnRzTWFuYWdlbWVudC9vcGVyYXRpb25zP2FwaS12ZXJzaW9uPTIwMTktMDUtMDUtcHJldmlldw==", + "EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0b21hbmFnZS9vcGVyYXRpb25zP2FwaS12ZXJzaW9uPTIwMjAtMDYtMzAtcHJldmlldw==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "ec75485c-a09e-4f05-944f-d73c7eaadcc9" + "8aef84e6-db4a-415c-964e-2f5af757bd99" ], - "accept-language": [ + "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.6.26614.01", + "FxVersion/4.6.28207.03", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.17763.", - "Microsoft.Azure.Management.Automanage.AutomanageClient/1.0.0" + "OSVersion/Microsoft.Windows.10.0.18363.", + "Microsoft.Azure.Management.AutoManage.AutomanageClient/0.6.0" ] }, "ResponseHeaders": { "Cache-Control": [ - "no-store, no-cache" - ], - "Date": [ - "Thu, 06 Jun 2019 07:16:15 GMT" + "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ - "87c9c58c-9bc9-41b8-b60b-f0772dd35017" - ], - "X-Content-Type-Options": [ - "nosniff" + "Request-Context": [ + "appId=cid-v1:a4d240dc-d543-4b4e-a019-0a571290b85d" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Server": [ + "Kestrel" + ], "x-ms-ratelimit-remaining-tenant-reads": [ "11999" ], + "x-ms-request-id": [ + "a665304b-9144-4ef3-a133-90cb34aa3184" + ], "x-ms-correlation-request-id": [ - "e3abda35-41bb-4b82-8f14-5b82191a3abe" + "a665304b-9144-4ef3-a133-90cb34aa3184" ], "x-ms-routing-request-id": [ - "SOUTHINDIA:20190606T071615Z:e3abda35-41bb-4b82-8f14-5b82191a3abe" + "NORTHCENTRALUS:20200903T143152Z:a665304b-9144-4ef3-a133-90cb34aa3184" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Thu, 03 Sep 2020 14:31:51 GMT" ], "Content-Length": [ - "4604" + "2075" ], "Content-Type": [ "application/json; charset=utf-8" @@ -57,13 +63,12 @@ "-1" ] }, - "ResponseBody": "{\"value\":[{\"name\":\"Microsoft.Automanage/register/Action\",\"display\":{\"provider\":\"Microsoft Automanage\",\"resource\":\"Automanage Provider\",\"operation\":\"Registers the Automanage Provider\",\"description\":\"Registers the subscription for the Automanage Provider.\"},\"origin\":\"system\",\"isDataAction\":false},{\"name\":\"Microsoft.Automanage/accounts/Delete\",\"display\":{\"provider\":\"Microsoft Automanage\",\"resource\":\"Automanage Accounts\",\"operation\":\"Delete Automanage Accounts\",\"description\":\"Delete any Automanage Accounts\"},\"origin\":\"system\",\"isDataAction\":false},{\"name\":\"Microsoft.Automanage/accounts/Read\",\"display\":{\"provider\":\"Microsoft Automanage\",\"resource\":\"Automanage Accounts\",\"operation\":\"Read Automanage Accounts\",\"description\":\"Read any Automanage Accounts\"},\"origin\":\"system\",\"isDataAction\":false},{\"name\":\"Microsoft.Automanage/accounts/Write\",\"display\":{\"provider\":\"Microsoft Automanage\",\"resource\":\"Automanage Accounts\",\"operation\":\"Create or Update Automanage Accounts\",\"description\":\"Create or Update any Automanage Accounts\"},\"origin\":\"system\",\"isDataAction\":false},{\"name\":\"Microsoft.Automanage/configurationProfileAssignments/Delete\",\"display\":{\"provider\":\"Microsoft Automanage\",\"resource\":\"Automanage Configuration Profile Assignments\",\"operation\":\"Delete Configuration Profile Assignments\",\"description\":\"Delete any Configuration Profile Assignments\"},\"origin\":\"system\",\"isDataAction\":false},{\"name\":\"Microsoft.Automanage/configurationProfileAssignments/Read\",\"display\":{\"provider\":\"Microsoft Automanage\",\"resource\":\"Automanage Configuration Profile Assignments\",\"operation\":\"Read Configuration Profile Assignments\",\"description\":\"Read any Configuration Profile Assignments\"},\"origin\":\"system\",\"isDataAction\":false},{\"name\":\"Microsoft.Automanage/configurationProfileAssignments/Write\",\"display\":{\"provider\":\"Microsoft Automanage\",\"resource\":\"Automanage Configuration Profile Assignments\",\"operation\":\"Create or Update Configuration Profile Assignments\",\"description\":\"Create or Update any Configuration Profile Assignments\"},\"origin\":\"system\",\"isDataAction\":false}]}", - + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"name\": \"Microsoft.Automanage/register/Action\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Automanage\",\r\n \"resource\": \"Automanage Provider\",\r\n \"operation\": \"Registers the Automanage Provider\",\r\n \"description\": \"Registers the subscription for the Automanage Provider.\"\r\n },\r\n \"origin\": \"system\",\r\n \"isDataAction\": false\r\n },\r\n {\r\n \"name\": \"Microsoft.Automanage/accounts/Delete\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Automanage\",\r\n \"resource\": \"Automanage Accounts\",\r\n \"operation\": \"Delete Automanage Accounts\",\r\n \"description\": \"Delete any Automanage Accounts\"\r\n },\r\n \"origin\": \"system\",\r\n \"isDataAction\": false\r\n },\r\n {\r\n \"name\": \"Microsoft.Automanage/accounts/Read\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Automanage\",\r\n \"resource\": \"Automanage Accounts\",\r\n \"operation\": \"Read Automanage Accounts\",\r\n \"description\": \"Read any Automanage Accounts\"\r\n },\r\n \"origin\": \"system\",\r\n \"isDataAction\": false\r\n },\r\n {\r\n \"name\": \"Microsoft.Automanage/accounts/Write\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Automanage\",\r\n \"resource\": \"Automanage Accounts\",\r\n \"operation\": \"Create or Update Automanage Accounts\",\r\n \"description\": \"Create or Update any Automanage Accounts\"\r\n },\r\n \"origin\": \"system\",\r\n \"isDataAction\": false\r\n },\r\n {\r\n \"name\": \"Microsoft.Automanage/configurationProfileAssignments/Delete\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Automanage\",\r\n \"resource\": \"Automanage Configuration Profile Assignments\",\r\n \"operation\": \"Delete Configuration Profile Assignments\",\r\n \"description\": \"Delete any Configuration Profile Assignments\"\r\n },\r\n \"origin\": \"system\",\r\n \"isDataAction\": false\r\n },\r\n {\r\n \"name\": \"Microsoft.Automanage/configurationProfileAssignments/Read\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Automanage\",\r\n \"resource\": \"Automanage Configuration Profile Assignments\",\r\n \"operation\": \"Read Configuration Profile Assignments\",\r\n \"description\": \"Read any Configuration Profile Assignments\"\r\n },\r\n \"origin\": \"system\",\r\n \"isDataAction\": false\r\n },\r\n {\r\n \"name\": \"Microsoft.Automanage/configurationProfileAssignments/Write\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Automanage\",\r\n \"resource\": \"Automanage Configuration Profile Assignments\",\r\n \"operation\": \"Create or Update Configuration Profile Assignments\",\r\n \"description\": \"Create or Update any Configuration Profile Assignments\"\r\n },\r\n \"origin\": \"system\",\r\n \"isDataAction\": false\r\n }\r\n ]\r\n}", "StatusCode": 200 } ], "Names": {}, "Variables": { - "SubscriptionId": "dd91de05-d791-4ceb-b6dc-988682dc7d72" + "SubscriptionId": "cdd53a71-7d81-493d-bce6-224fec7223a9" } } \ No newline at end of file