From 149dd1b6b4889f5c3b730aa86eaa3e41ec451604 Mon Sep 17 00:00:00 2001 From: Devesh Guha Oleti Muni Date: Mon, 8 Apr 2019 15:32:13 -0700 Subject: [PATCH] DeploymentManager - SDK preview (#5649) * Port from -pr repo * UT framework; ArtifactSource CRUD tests * Unit Tests * Enhance unit tests * Fix for Playback mode * Update Tests to fetch SAS from storage * Update TargetFramework * Update tests, session records * PR Feedback * Autogenerate using generate.ps1 * PR Feedback * Regerate sdk using generate.ps1 --- src/SDKs/DeploymentManager/AzSdk.RP.props | 7 + .../DeploymentManager.Tests.csproj | 46 + .../Helpers/DeploymentManagerClientHelper.cs | 233 + .../Helpers/DeploymentManagerTestUtilities.cs | 61 + .../Helpers/RecordedDelegatingHandler.cs | 90 + .../Properties/AssemblyInfo.cs | 39 + .../TopologyAndRolloutScenarioTest.json | 4877 +++++++++++++++++ .../ArtifactRoot/Storage.Copy.Parameters.json | 24 + .../ArtifactRoot/Storage.Copy.Template.json | 43 + .../ArtifactRoot/Storage.Parameters.json | 24 + .../Tests/ArtifactRoot/Storage.Template.json | 43 + .../Storage_Invalid.Parameters.json | 24 + .../Tests/EndToEndFunctionalTests.cs | 683 +++ .../DeploymentManager/DeploymentManager.sln | 43 + .../Generated/ArtifactSourcesOperations.cs | 684 +++ .../ArtifactSourcesOperationsExtensions.cs | 156 + .../Generated/AzureDeploymentManagerClient.cs | 405 ++ .../Generated/IArtifactSourcesOperations.cs | 106 + .../IAzureDeploymentManagerClient.cs | 113 + .../Generated/IOperations.cs | 46 + .../Generated/IRolloutsOperations.cs | 207 + .../Generated/IServiceTopologiesOperations.cs | 106 + .../Generated/IServiceUnitsOperations.cs | 164 + .../Generated/IServicesOperations.cs | 114 + .../Generated/IStepsOperations.cs | 105 + .../Generated/Models/ArtifactSource.cs | 117 + .../Models/ArtifactSourcePropertiesModel.cs | 104 + .../Generated/Models/Authentication.cs | 36 + .../Generated/Models/AzureEntityResource.cs | 59 + .../Generated/Models/CloudErrorBody.cs | 77 + .../Generated/Models/DeploymentMode.cs | 60 + .../Generated/Models/Identity.cs | 79 + .../Generated/Models/Message.cs | 60 + .../Generated/Models/Operation.cs | 75 + .../Generated/Models/OperationDetail.cs | 78 + .../Generated/Models/PrePostStep.cs | 65 + .../Generated/Models/ProxyResource.cs | 50 + .../Generated/Models/Resource.cs | 72 + .../Generated/Models/ResourceOperation.cs | 106 + .../Generated/Models/Rollout.cs | 187 + .../Generated/Models/RolloutOperationInfo.cs | 96 + .../Models/RolloutPropertiesModel.cs | 81 + .../Generated/Models/RolloutRequest.cs | 145 + .../Generated/Models/RolloutStep.cs | 112 + .../Models/RolloutsCreateOrUpdateHeaders.cs | 55 + .../Generated/Models/SasAuthentication.cs | 73 + .../Generated/Models/Service.cs | 90 + .../Generated/Models/ServiceProperties.cs | 83 + .../Generated/Models/ServiceResource.cs | 98 + .../Models/ServiceTopologyProperties.cs | 54 + .../Models/ServiceTopologyResource.cs | 79 + .../Generated/Models/ServiceUnit.cs | 89 + .../Generated/Models/ServiceUnitArtifacts.cs | 83 + .../Generated/Models/ServiceUnitProperties.cs | 87 + .../Generated/Models/ServiceUnitResource.cs | 102 + .../ServiceUnitsCreateOrUpdateHeaders.cs | 55 + .../Generated/Models/Step.cs | 133 + .../Generated/Models/StepOperationInfo.cs | 95 + .../Generated/Models/StepProperties.cs | 35 + .../Generated/Models/StepResource.cs | 79 + .../Generated/Models/TrackedResource.cs | 83 + .../Generated/Models/WaitStepAttributes.cs | 67 + .../Generated/Models/WaitStepProperties.cs | 65 + .../Generated/Operations.cs | 232 + .../Generated/OperationsExtensions.cs | 55 + .../Generated/RolloutsOperations.cs | 1176 ++++ .../Generated/RolloutsOperationsExtensions.cs | 326 ++ .../SdkInfo_AzureDeploymentManager.cs | 44 + .../Generated/ServiceTopologiesOperations.cs | 688 +++ .../ServiceTopologiesOperationsExtensions.cs | 156 + .../Generated/ServiceUnitsOperations.cs | 792 +++ .../ServiceUnitsOperationsExtensions.cs | 262 + .../Generated/ServicesOperations.cs | 714 +++ .../Generated/ServicesOperationsExtensions.cs | 172 + .../Generated/StepsOperations.cs | 683 +++ .../Generated/StepsOperationsExtensions.cs | 154 + ....Azure.Management.DeploymentManager.csproj | 26 + .../Properties/AssemblyInfo.cs | 20 + .../Management.DeploymentManager/generate.ps1 | 1 + src/SDKs/DeploymentManager/ReleaseNotes.md | 4 + .../deploymentmanager_resource-manager.txt | 14 + 81 files changed, 17126 insertions(+) create mode 100644 src/SDKs/DeploymentManager/AzSdk.RP.props create mode 100644 src/SDKs/DeploymentManager/DeploymentManager.Tests/DeploymentManager.Tests.csproj create mode 100644 src/SDKs/DeploymentManager/DeploymentManager.Tests/Helpers/DeploymentManagerClientHelper.cs create mode 100644 src/SDKs/DeploymentManager/DeploymentManager.Tests/Helpers/DeploymentManagerTestUtilities.cs create mode 100644 src/SDKs/DeploymentManager/DeploymentManager.Tests/Helpers/RecordedDelegatingHandler.cs create mode 100644 src/SDKs/DeploymentManager/DeploymentManager.Tests/Properties/AssemblyInfo.cs create mode 100644 src/SDKs/DeploymentManager/DeploymentManager.Tests/SessionRecords/DeploymentManager.Tests.EndToEndFunctionalTests/TopologyAndRolloutScenarioTest.json create mode 100644 src/SDKs/DeploymentManager/DeploymentManager.Tests/Tests/ArtifactRoot/Storage.Copy.Parameters.json create mode 100644 src/SDKs/DeploymentManager/DeploymentManager.Tests/Tests/ArtifactRoot/Storage.Copy.Template.json create mode 100644 src/SDKs/DeploymentManager/DeploymentManager.Tests/Tests/ArtifactRoot/Storage.Parameters.json create mode 100644 src/SDKs/DeploymentManager/DeploymentManager.Tests/Tests/ArtifactRoot/Storage.Template.json create mode 100644 src/SDKs/DeploymentManager/DeploymentManager.Tests/Tests/ArtifactRoot/Storage_Invalid.Parameters.json create mode 100644 src/SDKs/DeploymentManager/DeploymentManager.Tests/Tests/EndToEndFunctionalTests.cs create mode 100644 src/SDKs/DeploymentManager/DeploymentManager.sln create mode 100644 src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/ArtifactSourcesOperations.cs create mode 100644 src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/ArtifactSourcesOperationsExtensions.cs create mode 100644 src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/AzureDeploymentManagerClient.cs create mode 100644 src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/IArtifactSourcesOperations.cs create mode 100644 src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/IAzureDeploymentManagerClient.cs create mode 100644 src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/IOperations.cs create mode 100644 src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/IRolloutsOperations.cs create mode 100644 src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/IServiceTopologiesOperations.cs create mode 100644 src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/IServiceUnitsOperations.cs create mode 100644 src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/IServicesOperations.cs create mode 100644 src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/IStepsOperations.cs create mode 100644 src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/ArtifactSource.cs create mode 100644 src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/ArtifactSourcePropertiesModel.cs create mode 100644 src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/Authentication.cs create mode 100644 src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/AzureEntityResource.cs create mode 100644 src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/CloudErrorBody.cs create mode 100644 src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/DeploymentMode.cs create mode 100644 src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/Identity.cs create mode 100644 src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/Message.cs create mode 100644 src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/Operation.cs create mode 100644 src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/OperationDetail.cs create mode 100644 src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/PrePostStep.cs create mode 100644 src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/ProxyResource.cs create mode 100644 src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/Resource.cs create mode 100644 src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/ResourceOperation.cs create mode 100644 src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/Rollout.cs create mode 100644 src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/RolloutOperationInfo.cs create mode 100644 src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/RolloutPropertiesModel.cs create mode 100644 src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/RolloutRequest.cs create mode 100644 src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/RolloutStep.cs create mode 100644 src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/RolloutsCreateOrUpdateHeaders.cs create mode 100644 src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/SasAuthentication.cs create mode 100644 src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/Service.cs create mode 100644 src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/ServiceProperties.cs create mode 100644 src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/ServiceResource.cs create mode 100644 src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/ServiceTopologyProperties.cs create mode 100644 src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/ServiceTopologyResource.cs create mode 100644 src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/ServiceUnit.cs create mode 100644 src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/ServiceUnitArtifacts.cs create mode 100644 src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/ServiceUnitProperties.cs create mode 100644 src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/ServiceUnitResource.cs create mode 100644 src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/ServiceUnitsCreateOrUpdateHeaders.cs create mode 100644 src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/Step.cs create mode 100644 src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/StepOperationInfo.cs create mode 100644 src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/StepProperties.cs create mode 100644 src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/StepResource.cs create mode 100644 src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/TrackedResource.cs create mode 100644 src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/WaitStepAttributes.cs create mode 100644 src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/WaitStepProperties.cs create mode 100644 src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Operations.cs create mode 100644 src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/OperationsExtensions.cs create mode 100644 src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/RolloutsOperations.cs create mode 100644 src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/RolloutsOperationsExtensions.cs create mode 100644 src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/SdkInfo_AzureDeploymentManager.cs create mode 100644 src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/ServiceTopologiesOperations.cs create mode 100644 src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/ServiceTopologiesOperationsExtensions.cs create mode 100644 src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/ServiceUnitsOperations.cs create mode 100644 src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/ServiceUnitsOperationsExtensions.cs create mode 100644 src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/ServicesOperations.cs create mode 100644 src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/ServicesOperationsExtensions.cs create mode 100644 src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/StepsOperations.cs create mode 100644 src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/StepsOperationsExtensions.cs create mode 100644 src/SDKs/DeploymentManager/Management.DeploymentManager/Microsoft.Azure.Management.DeploymentManager.csproj create mode 100644 src/SDKs/DeploymentManager/Management.DeploymentManager/Properties/AssemblyInfo.cs create mode 100644 src/SDKs/DeploymentManager/Management.DeploymentManager/generate.ps1 create mode 100644 src/SDKs/DeploymentManager/ReleaseNotes.md create mode 100644 src/SDKs/_metadata/deploymentmanager_resource-manager.txt diff --git a/src/SDKs/DeploymentManager/AzSdk.RP.props b/src/SDKs/DeploymentManager/AzSdk.RP.props new file mode 100644 index 000000000000..1522799aaa75 --- /dev/null +++ b/src/SDKs/DeploymentManager/AzSdk.RP.props @@ -0,0 +1,7 @@ + + + + DeploymentManager_2018-09-01-preview; + $(PackageTags);$(CommonTags);$(AzureApiTag); + + \ No newline at end of file diff --git a/src/SDKs/DeploymentManager/DeploymentManager.Tests/DeploymentManager.Tests.csproj b/src/SDKs/DeploymentManager/DeploymentManager.Tests/DeploymentManager.Tests.csproj new file mode 100644 index 000000000000..b1d028fb11a3 --- /dev/null +++ b/src/SDKs/DeploymentManager/DeploymentManager.Tests/DeploymentManager.Tests.csproj @@ -0,0 +1,46 @@ + + + + Microsoft.Azure.Management.DeploymentManager.Tests + DeploymentManager.Tests Class Library + Microsoft.Azure.Management.DeploymentManager.Tests + 1.0.0 + true + {23CD2878-1A27-4ECD-80F9-8B9BB1539F7F} + + + + PreserveNewest + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Always + + + + \ No newline at end of file diff --git a/src/SDKs/DeploymentManager/DeploymentManager.Tests/Helpers/DeploymentManagerClientHelper.cs b/src/SDKs/DeploymentManager/DeploymentManager.Tests/Helpers/DeploymentManagerClientHelper.cs new file mode 100644 index 000000000000..49103f3e434a --- /dev/null +++ b/src/SDKs/DeploymentManager/DeploymentManager.Tests/Helpers/DeploymentManagerClientHelper.cs @@ -0,0 +1,233 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +namespace Management.DeploymentManager.Tests +{ + using System; + using System.Linq; + using Microsoft.Azure.Management.Authorization; + using Microsoft.Azure.Management.ManagedServiceIdentity; + using Microsoft.Azure.Management.Resources; + using Microsoft.Azure.Management.Resources.Models; + using Microsoft.Azure.Management.Storage; + using Microsoft.Azure.Test.HttpRecorder; + using Microsoft.Rest.ClientRuntime.Azure.TestFramework; + using Microsoft.WindowsAzure.Storage; + using Microsoft.WindowsAzure.Storage.Auth; + using Microsoft.WindowsAzure.Storage.Blob; + using Xunit; + + public class DeploymentManagerClientHelper + { + private ResourceManagementClient resourceManagementClient; + private StorageManagementClient storageManagementClient; + private ManagedServiceIdentityClient managedServiceIdentityClient; + private AuthorizationManagementClient authorizationClient; + + private MockContext _context; + private TestBase _testBase; + + public DeploymentManagerClientHelper(TestBase testBase, MockContext context) : this( + testBase, + context, + new RecordedDelegatingHandler() { StatusCodeToReturn = System.Net.HttpStatusCode.OK }) + { + this.ResourceGroupName = TestUtilities.GenerateName("admsdknet"); + } + + public DeploymentManagerClientHelper(TestBase testBase, MockContext context, RecordedDelegatingHandler handler) + { + _testBase = testBase; + _context = context; + + resourceManagementClient = DeploymentManagerTestUtilities.GetResourceManagementClient(context, handler); + storageManagementClient = DeploymentManagerTestUtilities.GetStorageManagementClient(context, handler); + managedServiceIdentityClient = DeploymentManagerTestUtilities.GetManagedServiceIdentityClient(context, handler); + authorizationClient = DeploymentManagerTestUtilities.GetAuthorizationManagementClient(context, handler); + } + + public string ResourceGroupName { get; private set; } + + public void TryCreateResourceGroup(string location) + { + ResourceGroup result = resourceManagementClient.ResourceGroups.CreateOrUpdate(this.ResourceGroupName, new ResourceGroup { Location = location }); + var newlyCreatedGroup = resourceManagementClient.ResourceGroups.Get(this.ResourceGroupName); + ThrowIfTrue(newlyCreatedGroup == null, "_client.ResourceGroups.Get returned null."); + ThrowIfTrue(!this.ResourceGroupName.Equals(newlyCreatedGroup.Name), string.Format("resourceGroupName is not equal to {0}", this.ResourceGroupName)); + } + + public string GetProviderLocation(string providerName, string resourceType) + { + string defaultLocation = "Central US"; + string location = defaultLocation; + + if (HttpMockServer.Mode == HttpRecorderMode.Record) + { + var providerType = resourceManagementClient.Providers.Get(providerName).ResourceTypes.ToList() + .FirstOrDefault(t => t.ResourceType.Equals(resourceType, StringComparison.OrdinalIgnoreCase)); + + location = providerType?.Locations?.FirstOrDefault() ?? defaultLocation; + } + + return location; + } + + public void DeleteResourceGroup(string resourceGroupName = null) + { + if (string.IsNullOrEmpty(resourceGroupName)) + { + resourceManagementClient.ResourceGroups.Delete(this.ResourceGroupName); + } + else + { + resourceManagementClient.ResourceGroups.Delete(resourceGroupName); + } + } + + public string CreateManagedIdentity( + string subscriptionId, + string identityName) + { + if (HttpMockServer.Mode == HttpRecorderMode.Record) + { + var parameters = new Microsoft.Azure.Management.ManagedServiceIdentity.Models.Identity() + { + Location = this.GetProviderLocation("Microsoft.ManagedIdentity", "userAssignedIdentities") + }; + + var identity = this.managedServiceIdentityClient.UserAssignedIdentities.CreateOrUpdate( + this.ResourceGroupName, + identityName, + parameters); + + Assert.NotNull(identity); + + // Give a couple minutes for the MSI to propagate. Observed failures of principalId not being found in the tenant + // when there is no wait time between MSI creation and role assignment. + DeploymentManagerTestUtilities.Sleep(TimeSpan.FromMinutes(2)); + + var scope = "/subscriptions/" + subscriptionId; + var roleDefinitionList = this.authorizationClient.RoleDefinitions.List( + scope, + new Microsoft.Rest.Azure.OData.ODataQuery("roleName eq 'Contributor'")); + + var roleAssignmentName = Guid.NewGuid().ToString(); + var roleAssignmentParameters = new Microsoft.Azure.Management.Authorization.Models.RoleAssignmentCreateParameters() + { + PrincipalId = identity.PrincipalId.ToString(), + RoleDefinitionId = roleDefinitionList.First().Id, + CanDelegate = false + }; + + var roleAssignment = this.authorizationClient.RoleAssignments.Create( + scope, + roleAssignmentName, + roleAssignmentParameters); + Assert.NotNull(roleAssignment); + + // Add additional wait time after role assignment to propagate permissions. Observed + // no permissions to modify resource group errors without wait time. + DeploymentManagerTestUtilities.Sleep(TimeSpan.FromMinutes(1)); + + roleAssignment = this.authorizationClient.RoleAssignments.Get( + scope, + roleAssignmentName); + Assert.NotNull(roleAssignment); + + return identity.Id; + } + + return "dummyIdentity"; + } + + public void CreateStorageAccount(string storageAccountName) + { + if (HttpMockServer.Mode == HttpRecorderMode.Record) + { + var parameters = new Microsoft.Azure.Management.Storage.Models.StorageAccountCreateParameters() + { + Location = this.GetProviderLocation("Microsoft.Storage", "storageAccounts"), + AccountType = Microsoft.Azure.Management.Storage.Models.AccountType.StandardLRS + }; + + var storageAccount = this.storageManagementClient.StorageAccounts.Create( + this.ResourceGroupName, + storageAccountName, + parameters); + } + } + + public void UploadBlob( + string storageAccountName, + string containerName, + string filePath, + string blobName) + { + if (HttpMockServer.Mode == HttpRecorderMode.Record) + { + var accountKeyResult = this.storageManagementClient.StorageAccounts.ListKeysWithHttpMessagesAsync( + this.ResourceGroupName, + storageAccountName).Result; + var storageAccount = new CloudStorageAccount( + new StorageCredentials( + storageAccountName, + accountKeyResult.Body.Key1), + useHttps: true); + + var blobClient = storageAccount.CreateCloudBlobClient(); + var container = blobClient.GetContainerReference(containerName); + + container.CreateIfNotExistsAsync().Wait(); + + var blob = container.GetBlockBlobReference(blobName); + blob.UploadFromFileAsync(filePath).Wait(); + } + } + + public string GetBlobContainerSasUri(string resourceGroupName, string storageAccountName, string containerName) + { + string sasUri = "foobar"; + + if (HttpMockServer.Mode == HttpRecorderMode.Record) + { + var accountKeyResult = this.storageManagementClient.StorageAccounts.ListKeysWithHttpMessagesAsync( + resourceGroupName, + storageAccountName).Result; + var storageAccount = new CloudStorageAccount( + new StorageCredentials( + storageAccountName, + accountKeyResult.Body.Key1), + useHttps: true); + + var blobClient = storageAccount.CreateCloudBlobClient(); + var container = blobClient.GetContainerReference(containerName); + container.CreateIfNotExistsAsync(); + sasUri = this.GetContainerSasUri(container); + } + + return sasUri; + } + + private string GetContainerSasUri(CloudBlobContainer container) + { + var sasConstraints = new SharedAccessBlobPolicy(); + sasConstraints.SharedAccessStartTime = DateTime.UtcNow.AddDays(-1); + sasConstraints.SharedAccessExpiryTime = DateTime.UtcNow.AddDays(2); + sasConstraints.Permissions = SharedAccessBlobPermissions.Read | SharedAccessBlobPermissions.List; + + // Generate the shared access signature on the blob, setting the constraints directly on the signature. + string sasContainerToken = container.GetSharedAccessSignature(sasConstraints); + + // Return the URI string for the container, including the SAS token. + return container.Uri + sasContainerToken; + } + + private void ThrowIfTrue(bool condition, string message) + { + if (condition) + { + throw new Exception(message); + } + } + } +} diff --git a/src/SDKs/DeploymentManager/DeploymentManager.Tests/Helpers/DeploymentManagerTestUtilities.cs b/src/SDKs/DeploymentManager/DeploymentManager.Tests/Helpers/DeploymentManagerTestUtilities.cs new file mode 100644 index 000000000000..cbe73a5dbc09 --- /dev/null +++ b/src/SDKs/DeploymentManager/DeploymentManager.Tests/Helpers/DeploymentManagerTestUtilities.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. + +namespace Management.DeploymentManager.Tests +{ + using Microsoft.Azure.Management.Authorization; + using Microsoft.Azure.Management.DeploymentManager; + using Microsoft.Azure.Management.ManagedServiceIdentity; + using Microsoft.Azure.Management.Resources; + using Microsoft.Azure.Management.Storage; + using Microsoft.Azure.Test.HttpRecorder; + using Microsoft.Rest.ClientRuntime.Azure.TestFramework; + using System; + using System.Threading; + + public static class DeploymentManagerTestUtilities + { + public static ResourceManagementClient GetResourceManagementClient(MockContext context, RecordedDelegatingHandler handler) + { + handler.IsPassThrough = true; + var client = context.GetServiceClient(handlers: handler); + return client; + } + + public static AuthorizationManagementClient GetAuthorizationManagementClient(MockContext context, RecordedDelegatingHandler handler) + { + handler.IsPassThrough = true; + var client = context.GetServiceClient(handlers: handler); + return client; + } + + public static ManagedServiceIdentityClient GetManagedServiceIdentityClient(MockContext context, RecordedDelegatingHandler handler) + { + handler.IsPassThrough = true; + var client = context.GetServiceClient(handlers: handler); + return client; + } + + public static AzureDeploymentManagerClient GetDeploymentManagerClient(MockContext context, RecordedDelegatingHandler handler) + { + handler.IsPassThrough = true; + var client = context.GetServiceClient(handlers: handler); + return client; + } + + public static StorageManagementClient GetStorageManagementClient(MockContext context, RecordedDelegatingHandler handler) + { + handler.IsPassThrough = true; + var client = context.GetServiceClient(handlers: handler); + return client; + } + + public static void Sleep(TimeSpan duration) + { + if (HttpMockServer.Mode == HttpRecorderMode.Record) + { + Thread.Sleep(duration); + } + } + } +} diff --git a/src/SDKs/DeploymentManager/DeploymentManager.Tests/Helpers/RecordedDelegatingHandler.cs b/src/SDKs/DeploymentManager/DeploymentManager.Tests/Helpers/RecordedDelegatingHandler.cs new file mode 100644 index 000000000000..5a4ab1bada98 --- /dev/null +++ b/src/SDKs/DeploymentManager/DeploymentManager.Tests/Helpers/RecordedDelegatingHandler.cs @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +namespace Management.DeploymentManager.Tests +{ + using System; + using System.Net; + using System.Net.Http; + using System.Net.Http.Headers; + using System.Threading.Tasks; + + public class RecordedDelegatingHandler : DelegatingHandler + { + private HttpResponseMessage _response; + + public RecordedDelegatingHandler() + { + StatusCodeToReturn = HttpStatusCode.Created; + SubsequentStatusCodeToReturn = StatusCodeToReturn; + } + + public RecordedDelegatingHandler(HttpResponseMessage response) + { + StatusCodeToReturn = HttpStatusCode.Created; + 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 + { + if (_response != null && counter == 1) + { + return _response; + } + else + { + var statusCode = StatusCodeToReturn; + if (counter > 1) + statusCode = SubsequentStatusCodeToReturn; + var response = new HttpResponseMessage(statusCode); + response.Content = new StringContent(""); + return response; + } + } + } + } +} diff --git a/src/SDKs/DeploymentManager/DeploymentManager.Tests/Properties/AssemblyInfo.cs b/src/SDKs/DeploymentManager/DeploymentManager.Tests/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..8b8ad7d79dc2 --- /dev/null +++ b/src/SDKs/DeploymentManager/DeploymentManager.Tests/Properties/AssemblyInfo.cs @@ -0,0 +1,39 @@ +// 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.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("DeploymentManager.Tests")] +[assembly: AssemblyDescription("DeploymentManager.Tests Class Library")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("DeploymentManager.Tests")] +[assembly: AssemblyCopyright("Copyright © 2018")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("f0563b94-71dd-481b-bc1b-36768990c2da")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/SDKs/DeploymentManager/DeploymentManager.Tests/SessionRecords/DeploymentManager.Tests.EndToEndFunctionalTests/TopologyAndRolloutScenarioTest.json b/src/SDKs/DeploymentManager/DeploymentManager.Tests/SessionRecords/DeploymentManager.Tests.EndToEndFunctionalTests/TopologyAndRolloutScenarioTest.json new file mode 100644 index 000000000000..85da2486f37a --- /dev/null +++ b/src/SDKs/DeploymentManager/DeploymentManager.Tests/SessionRecords/DeploymentManager.Tests.EndToEndFunctionalTests/TopologyAndRolloutScenarioTest.json @@ -0,0 +1,4877 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/providers/Microsoft.DeploymentManager?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Byb3ZpZGVycy9NaWNyb3NvZnQuRGVwbG95bWVudE1hbmFnZXI/YXBpLXZlcnNpb249MjAxNS0xMS0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "7db93b4a-377e-48e6-8b02-fed9cdb6d54c" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:20:22 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "7fae628d-4b56-4e38-a24f-c2b8105831dd" + ], + "x-ms-correlation-request-id": [ + "7fae628d-4b56-4e38-a24f-c2b8105831dd" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T022023Z:7fae628d-4b56-4e38-a24f-c2b8105831dd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "1523" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/providers/Microsoft.DeploymentManager\",\r\n \"namespace\": \"Microsoft.DeploymentManager\",\r\n \"authorizations\": [\r\n {\r\n \"applicationId\": \"5b306cba-9c71-49db-96c3-d17ca2379c4d\"\r\n }\r\n ],\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"artifactSources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-09-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"serviceTopologies\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-09-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"serviceTopologies/services\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-09-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"serviceTopologies/services/serviceUnits\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-09-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"steps\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-09-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"rollouts\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-09-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"operationResults\",\r\n \"locations\": [\r\n \"global\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-09-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlZ3JvdXBzL2FkbXNka25ldDk4Mjg/YXBpLXZlcnNpb249MjAxNS0xMS0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"Central US\"\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "ad55b066-1b4c-4fec-80b1-d2d96a8dc9b5" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "32" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:20:23 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "33738bed-87e9-41d4-8e7c-9615f0478f8b" + ], + "x-ms-correlation-request-id": [ + "33738bed-87e9-41d4-8e7c-9615f0478f8b" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T022024Z:33738bed-87e9-41d4-8e7c-9615f0478f8b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "182" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet9828\",\r\n \"name\": \"admsdknet9828\",\r\n \"location\": \"centralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlZ3JvdXBzL2FkbXNka25ldDk4Mjg/YXBpLXZlcnNpb249MjAxNS0xMS0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "e0ef0765-a8a7-4e2f-b56f-b0228dc4ebe3" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:20:23 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11998" + ], + "x-ms-request-id": [ + "207c0d8e-ca47-4115-8657-bc0f9e785c13" + ], + "x-ms-correlation-request-id": [ + "207c0d8e-ca47-4115-8657-bc0f9e785c13" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T022024Z:207c0d8e-ca47-4115-8657-bc0f9e785c13" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "182" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet9828\",\r\n \"name\": \"admsdknet9828\",\r\n \"location\": \"centralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/providers/Microsoft.Storage?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Byb3ZpZGVycy9NaWNyb3NvZnQuU3RvcmFnZT9hcGktdmVyc2lvbj0yMDE1LTExLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "cfe7f8a6-befe-4dc3-a78e-5a580e11686a" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:20:23 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11997" + ], + "x-ms-request-id": [ + "45c67aa9-bec8-424f-8177-a028e18d2ab2" + ], + "x-ms-correlation-request-id": [ + "45c67aa9-bec8-424f-8177-a028e18d2ab2" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T022024Z:45c67aa9-bec8-424f-8177-a028e18d2ab2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "8495" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/providers/Microsoft.Storage\",\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"authorizations\": [\r\n {\r\n \"applicationId\": \"a6aa9161-5291-40bb-8c5c-923b567bee3b\",\r\n \"roleDefinitionId\": \"070ab87f-0efc-4423-b18b-756f3bdb0236\"\r\n },\r\n {\r\n \"applicationId\": \"e406a681-f3d4-42a8-90b6-c2b029497af1\"\r\n }\r\n ],\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada East\",\r\n \"Canada Central\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"South Africa North\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-11-01\",\r\n \"2018-07-01\",\r\n \"2018-03-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-10-01\",\r\n \"2017-06-01\",\r\n \"2016-12-01\",\r\n \"2016-05-01\",\r\n \"2016-01-01\",\r\n \"2015-06-15\",\r\n \"2015-05-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SystemAssignedResourceIdentity\"\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2018-11-01\",\r\n \"2018-07-01\",\r\n \"2018-03-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-10-01\",\r\n \"2017-06-01\",\r\n \"2016-12-01\",\r\n \"2016-05-01\",\r\n \"2016-01-01\",\r\n \"2015-06-15\",\r\n \"2015-05-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/asyncoperations\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada East\",\r\n \"Canada Central\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"South Africa North\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-11-01\",\r\n \"2018-07-01\",\r\n \"2018-03-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-10-01\",\r\n \"2017-06-01\",\r\n \"2016-12-01\",\r\n \"2016-05-01\",\r\n \"2016-01-01\",\r\n \"2015-06-15\",\r\n \"2015-05-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/listAccountSas\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada East\",\r\n \"Canada Central\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"South Africa North\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-11-01\",\r\n \"2018-07-01\",\r\n \"2018-03-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-10-01\",\r\n \"2017-06-01\",\r\n \"2016-12-01\",\r\n \"2016-05-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/listServiceSas\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada East\",\r\n \"Canada Central\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"South Africa North\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-11-01\",\r\n \"2018-07-01\",\r\n \"2018-03-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-10-01\",\r\n \"2017-06-01\",\r\n \"2016-12-01\",\r\n \"2016-05-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/blobServices\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada East\",\r\n \"Canada Central\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"South Africa North\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-11-01\",\r\n \"2018-07-01\",\r\n \"2018-03-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-10-01\",\r\n \"2017-06-01\",\r\n \"2016-12-01\",\r\n \"2016-05-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/tableServices\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada East\",\r\n \"Canada Central\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"South Africa North\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-11-01\",\r\n \"2018-07-01\",\r\n \"2018-03-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-10-01\",\r\n \"2017-06-01\",\r\n \"2016-12-01\",\r\n \"2016-05-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/queueServices\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada East\",\r\n \"Canada Central\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"South Africa North\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-11-01\",\r\n \"2018-07-01\",\r\n \"2018-03-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-10-01\",\r\n \"2017-06-01\",\r\n \"2016-12-01\",\r\n \"2016-05-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/fileServices\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada East\",\r\n \"Canada Central\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"South Africa North\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-11-01\",\r\n \"2018-07-01\",\r\n \"2018-03-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-10-01\",\r\n \"2017-06-01\",\r\n \"2016-12-01\",\r\n \"2016-05-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2018-11-01\",\r\n \"2018-07-01\",\r\n \"2018-03-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-10-01\",\r\n \"2017-06-01\",\r\n \"2016-12-01\",\r\n \"2016-07-01\",\r\n \"2016-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/usages\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada East\",\r\n \"Canada Central\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"South Africa North\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-11-01\",\r\n \"2018-07-01\",\r\n \"2018-03-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-10-01\",\r\n \"2017-06-01\",\r\n \"2016-12-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/deleteVirtualNetworkOrSubnets\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada East\",\r\n \"Canada Central\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"South Africa North\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-11-01\",\r\n \"2018-07-01\",\r\n \"2018-03-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-10-01\",\r\n \"2017-06-01\",\r\n \"2016-12-01\",\r\n \"2016-07-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"usages\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2018-11-01\",\r\n \"2018-07-01\",\r\n \"2018-03-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-10-01\",\r\n \"2017-06-01\",\r\n \"2016-12-01\",\r\n \"2016-05-01\",\r\n \"2016-01-01\",\r\n \"2015-06-15\",\r\n \"2015-05-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2018-11-01\",\r\n \"2018-07-01\",\r\n \"2018-03-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-10-01\",\r\n \"2017-06-01\",\r\n \"2016-12-01\",\r\n \"2016-05-01\",\r\n \"2016-01-01\",\r\n \"2015-06-15\",\r\n \"2015-05-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"East US 2 (Stage)\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US 2\",\r\n \"Central US\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Brazil South\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada East\",\r\n \"Canada Central\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"South Africa North\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"East US 2 (Stage)\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US 2\",\r\n \"Central US\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Brazil South\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada East\",\r\n \"Canada Central\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"South Africa North\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/providers/Microsoft.Storage?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Byb3ZpZGVycy9NaWNyb3NvZnQuU3RvcmFnZT9hcGktdmVyc2lvbj0yMDE1LTExLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "5ef6b4b9-1452-48d7-a37b-4b9974e16a81" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:20:47 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11998" + ], + "x-ms-request-id": [ + "ed1e00bc-b0d6-4610-a402-f279804bacd1" + ], + "x-ms-correlation-request-id": [ + "ed1e00bc-b0d6-4610-a402-f279804bacd1" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T022048Z:ed1e00bc-b0d6-4610-a402-f279804bacd1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "8495" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/providers/Microsoft.Storage\",\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"authorizations\": [\r\n {\r\n \"applicationId\": \"a6aa9161-5291-40bb-8c5c-923b567bee3b\",\r\n \"roleDefinitionId\": \"070ab87f-0efc-4423-b18b-756f3bdb0236\"\r\n },\r\n {\r\n \"applicationId\": \"e406a681-f3d4-42a8-90b6-c2b029497af1\"\r\n }\r\n ],\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada East\",\r\n \"Canada Central\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"South Africa North\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-11-01\",\r\n \"2018-07-01\",\r\n \"2018-03-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-10-01\",\r\n \"2017-06-01\",\r\n \"2016-12-01\",\r\n \"2016-05-01\",\r\n \"2016-01-01\",\r\n \"2015-06-15\",\r\n \"2015-05-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SystemAssignedResourceIdentity\"\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2018-11-01\",\r\n \"2018-07-01\",\r\n \"2018-03-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-10-01\",\r\n \"2017-06-01\",\r\n \"2016-12-01\",\r\n \"2016-05-01\",\r\n \"2016-01-01\",\r\n \"2015-06-15\",\r\n \"2015-05-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/asyncoperations\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada East\",\r\n \"Canada Central\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"South Africa North\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-11-01\",\r\n \"2018-07-01\",\r\n \"2018-03-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-10-01\",\r\n \"2017-06-01\",\r\n \"2016-12-01\",\r\n \"2016-05-01\",\r\n \"2016-01-01\",\r\n \"2015-06-15\",\r\n \"2015-05-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/listAccountSas\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada East\",\r\n \"Canada Central\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"South Africa North\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-11-01\",\r\n \"2018-07-01\",\r\n \"2018-03-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-10-01\",\r\n \"2017-06-01\",\r\n \"2016-12-01\",\r\n \"2016-05-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/listServiceSas\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada East\",\r\n \"Canada Central\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"South Africa North\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-11-01\",\r\n \"2018-07-01\",\r\n \"2018-03-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-10-01\",\r\n \"2017-06-01\",\r\n \"2016-12-01\",\r\n \"2016-05-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/blobServices\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada East\",\r\n \"Canada Central\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"South Africa North\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-11-01\",\r\n \"2018-07-01\",\r\n \"2018-03-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-10-01\",\r\n \"2017-06-01\",\r\n \"2016-12-01\",\r\n \"2016-05-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/tableServices\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada East\",\r\n \"Canada Central\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"South Africa North\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-11-01\",\r\n \"2018-07-01\",\r\n \"2018-03-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-10-01\",\r\n \"2017-06-01\",\r\n \"2016-12-01\",\r\n \"2016-05-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/queueServices\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada East\",\r\n \"Canada Central\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"South Africa North\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-11-01\",\r\n \"2018-07-01\",\r\n \"2018-03-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-10-01\",\r\n \"2017-06-01\",\r\n \"2016-12-01\",\r\n \"2016-05-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/fileServices\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada East\",\r\n \"Canada Central\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"South Africa North\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-11-01\",\r\n \"2018-07-01\",\r\n \"2018-03-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-10-01\",\r\n \"2017-06-01\",\r\n \"2016-12-01\",\r\n \"2016-05-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2018-11-01\",\r\n \"2018-07-01\",\r\n \"2018-03-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-10-01\",\r\n \"2017-06-01\",\r\n \"2016-12-01\",\r\n \"2016-07-01\",\r\n \"2016-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/usages\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada East\",\r\n \"Canada Central\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"South Africa North\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-11-01\",\r\n \"2018-07-01\",\r\n \"2018-03-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-10-01\",\r\n \"2017-06-01\",\r\n \"2016-12-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/deleteVirtualNetworkOrSubnets\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada East\",\r\n \"Canada Central\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"South Africa North\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-11-01\",\r\n \"2018-07-01\",\r\n \"2018-03-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-10-01\",\r\n \"2017-06-01\",\r\n \"2016-12-01\",\r\n \"2016-07-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"usages\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2018-11-01\",\r\n \"2018-07-01\",\r\n \"2018-03-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-10-01\",\r\n \"2017-06-01\",\r\n \"2016-12-01\",\r\n \"2016-05-01\",\r\n \"2016-01-01\",\r\n \"2015-06-15\",\r\n \"2015-05-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2018-11-01\",\r\n \"2018-07-01\",\r\n \"2018-03-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-10-01\",\r\n \"2017-06-01\",\r\n \"2016-12-01\",\r\n \"2016-05-01\",\r\n \"2016-01-01\",\r\n \"2015-06-15\",\r\n \"2015-05-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"East US 2 (Stage)\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US 2\",\r\n \"Central US\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Brazil South\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada East\",\r\n \"Canada Central\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"South Africa North\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"East US 2 (Stage)\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US 2\",\r\n \"Central US\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Brazil South\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada East\",\r\n \"Canada Central\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"South Africa North\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet9828/providers/Microsoft.Storage/storageAccounts/admsdknet9828stgacct?api-version=2015-06-15", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDk4MjgvcHJvdmlkZXJzL01pY3Jvc29mdC5TdG9yYWdlL3N0b3JhZ2VBY2NvdW50cy9hZG1zZGtuZXQ5ODI4c3RnYWNjdD9hcGktdmVyc2lvbj0yMDE1LTA2LTE1", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"East US\",\r\n \"properties\": {\r\n \"accountType\": \"Standard_LRS\"\r\n }\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "c8c0381c-cc22-4f01-801e-09fc6402f6ef" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.Storage.StorageManagementClient/4.0.0.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "89" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:20:24 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/providers/Microsoft.Storage/locations/eastus/asyncoperations/5ef6e035-fcb3-466f-bfbb-9bd324cab21f?monitor=true&api-version=2015-06-15" + ], + "Retry-After": [ + "17" + ], + "Server": [ + "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "5ef6e035-fcb3-466f-bfbb-9bd324cab21f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "ffaa7e87-a5ca-4db1-ada6-6bcd7f5ce17b" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T022025Z:ffaa7e87-a5ca-4db1-ada6-6bcd7f5ce17b" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "0" + ], + "Content-Type": [ + "text/plain; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/providers/Microsoft.Storage/locations/eastus/asyncoperations/5ef6e035-fcb3-466f-bfbb-9bd324cab21f?monitor=true&api-version=2015-06-15", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Byb3ZpZGVycy9NaWNyb3NvZnQuU3RvcmFnZS9sb2NhdGlvbnMvZWFzdHVzL2FzeW5jb3BlcmF0aW9ucy81ZWY2ZTAzNS1mY2IzLTQ2NmYtYmZiYi05YmQzMjRjYWIyMWY/bW9uaXRvcj10cnVlJmFwaS12ZXJzaW9uPTIwMTUtMDYtMTU=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.Storage.StorageManagementClient/4.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:20:41 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "d3e14ecf-1e9a-4ef2-8046-7df5ccdc2fd9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11996" + ], + "x-ms-correlation-request-id": [ + "bf1fde44-8cf5-49bf-bd24-5a1420bdc687" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T022042Z:bf1fde44-8cf5-49bf-bd24-5a1420bdc687" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "89" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"location\": \"East US\",\r\n \"properties\": {\r\n \"accountType\": \"Standard_LRS\"\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet9828/providers/Microsoft.Storage/storageAccounts/admsdknet9828stgacct/listKeys?api-version=2015-06-15", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDk4MjgvcHJvdmlkZXJzL01pY3Jvc29mdC5TdG9yYWdlL3N0b3JhZ2VBY2NvdW50cy9hZG1zZGtuZXQ5ODI4c3RnYWNjdC9saXN0S2V5cz9hcGktdmVyc2lvbj0yMDE1LTA2LTE1", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "1db9eda1-d53a-4cdf-afef-572ff860d83a" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.Storage.StorageManagementClient/4.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:20:41 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "2c82f52d-f0b1-4e22-95e2-66566af99d82" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "ee6fcc00-0ae2-411c-90ed-7618ff9ddb42" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T022042Z:ee6fcc00-0ae2-411c-90ed-7618ff9ddb42" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "197" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ] + }, + //[SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="This is the secret for a resource that has since been deleted.")] + "ResponseBody": "{\r\n \"key1\": \"e6Xm75ZlxpApMoFdlopJRA9JbTK+2Zyfgwp9g64JJMZw7x6fHOpP9PZZmic7WWkbWjV5Vvn5XGsaEuNNUuAmeA==\",\r\n \"key2\": \"pYJfdzNury9DttntKOL3I9nlfBGo21qXiBlAM9yzrOgfxNR/4azJng86oGT2bU1KR7yqfdccxg47Pl/J/Ff1/A==\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet9828/providers/Microsoft.Storage/storageAccounts/admsdknet9828stgacct/listKeys?api-version=2015-06-15", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDk4MjgvcHJvdmlkZXJzL01pY3Jvc29mdC5TdG9yYWdlL3N0b3JhZ2VBY2NvdW50cy9hZG1zZGtuZXQ5ODI4c3RnYWNjdC9saXN0S2V5cz9hcGktdmVyc2lvbj0yMDE1LTA2LTE1", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "41c7d78d-6afb-440b-8355-9bece8b8bcd0" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.Storage.StorageManagementClient/4.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:20:43 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "50ba74fe-07fa-4ff2-bce1-173be4c7fe41" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "a442c27f-19ac-4064-99af-fa9681543ced" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T022043Z:a442c27f-19ac-4064-99af-fa9681543ced" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "197" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ] + }, + //[SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="This is the secret for a resource that has since been deleted.")] + "ResponseBody": "{\r\n \"key1\": \"e6Xm75ZlxpApMoFdlopJRA9JbTK+2Zyfgwp9g64JJMZw7x6fHOpP9PZZmic7WWkbWjV5Vvn5XGsaEuNNUuAmeA==\",\r\n \"key2\": \"pYJfdzNury9DttntKOL3I9nlfBGo21qXiBlAM9yzrOgfxNR/4azJng86oGT2bU1KR7yqfdccxg47Pl/J/Ff1/A==\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet9828/providers/Microsoft.Storage/storageAccounts/admsdknet9828stgacct/listKeys?api-version=2015-06-15", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDk4MjgvcHJvdmlkZXJzL01pY3Jvc29mdC5TdG9yYWdlL3N0b3JhZ2VBY2NvdW50cy9hZG1zZGtuZXQ5ODI4c3RnYWNjdC9saXN0S2V5cz9hcGktdmVyc2lvbj0yMDE1LTA2LTE1", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "19ccb8cf-dcf0-4836-9bc7-3c811ad6a4af" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.Storage.StorageManagementClient/4.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:20:43 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "875f648c-9875-4bcf-88f3-42ed99eb28c2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "ea5b74c0-16ca-48f9-b13d-5e97906e0592" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T022044Z:ea5b74c0-16ca-48f9-b13d-5e97906e0592" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "197" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ] + }, + //[SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="This is the secret for a resource that has since been deleted.")] + "ResponseBody": "{\r\n \"key1\": \"e6Xm75ZlxpApMoFdlopJRA9JbTK+2Zyfgwp9g64JJMZw7x6fHOpP9PZZmic7WWkbWjV5Vvn5XGsaEuNNUuAmeA==\",\r\n \"key2\": \"pYJfdzNury9DttntKOL3I9nlfBGo21qXiBlAM9yzrOgfxNR/4azJng86oGT2bU1KR7yqfdccxg47Pl/J/Ff1/A==\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet9828/providers/Microsoft.Storage/storageAccounts/admsdknet9828stgacct/listKeys?api-version=2015-06-15", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDk4MjgvcHJvdmlkZXJzL01pY3Jvc29mdC5TdG9yYWdlL3N0b3JhZ2VBY2NvdW50cy9hZG1zZGtuZXQ5ODI4c3RnYWNjdC9saXN0S2V5cz9hcGktdmVyc2lvbj0yMDE1LTA2LTE1", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "7fbb1f77-a40f-4a81-8f23-95e90243f563" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.Storage.StorageManagementClient/4.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:20:43 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "7e96cfe9-c649-4fef-8c21-e743e3da07e4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-correlation-request-id": [ + "1f55d2e2-1d73-4e61-a243-1212bb587c75" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T022044Z:1f55d2e2-1d73-4e61-a243-1212bb587c75" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "197" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ] + }, + //[SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="This is the secret for a resource that has since been deleted.")] + "ResponseBody": "{\r\n \"key1\": \"e6Xm75ZlxpApMoFdlopJRA9JbTK+2Zyfgwp9g64JJMZw7x6fHOpP9PZZmic7WWkbWjV5Vvn5XGsaEuNNUuAmeA==\",\r\n \"key2\": \"pYJfdzNury9DttntKOL3I9nlfBGo21qXiBlAM9yzrOgfxNR/4azJng86oGT2bU1KR7yqfdccxg47Pl/J/Ff1/A==\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet9828/providers/Microsoft.Storage/storageAccounts/admsdknet9828stgacct/listKeys?api-version=2015-06-15", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDk4MjgvcHJvdmlkZXJzL01pY3Jvc29mdC5TdG9yYWdlL3N0b3JhZ2VBY2NvdW50cy9hZG1zZGtuZXQ5ODI4c3RnYWNjdC9saXN0S2V5cz9hcGktdmVyc2lvbj0yMDE1LTA2LTE1", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "838005cd-8365-410b-a10c-8e9e669c873a" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.Storage.StorageManagementClient/4.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:20:43 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "96f21f65-4964-49a6-aab0-0ebfaab1d288" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1195" + ], + "x-ms-correlation-request-id": [ + "6779e710-583d-4f8b-a3a3-bfde357f9f7f" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T022044Z:6779e710-583d-4f8b-a3a3-bfde357f9f7f" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "197" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ] + }, + //[SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="This is the secret for a resource that has since been deleted.")] + "ResponseBody": "{\r\n \"key1\": \"e6Xm75ZlxpApMoFdlopJRA9JbTK+2Zyfgwp9g64JJMZw7x6fHOpP9PZZmic7WWkbWjV5Vvn5XGsaEuNNUuAmeA==\",\r\n \"key2\": \"pYJfdzNury9DttntKOL3I9nlfBGo21qXiBlAM9yzrOgfxNR/4azJng86oGT2bU1KR7yqfdccxg47Pl/J/Ff1/A==\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet9828/providers/Microsoft.Storage/storageAccounts/admsdknet9828stgacct/listKeys?api-version=2015-06-15", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDk4MjgvcHJvdmlkZXJzL01pY3Jvc29mdC5TdG9yYWdlL3N0b3JhZ2VBY2NvdW50cy9hZG1zZGtuZXQ5ODI4c3RnYWNjdC9saXN0S2V5cz9hcGktdmVyc2lvbj0yMDE1LTA2LTE1", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "d23108ae-68ea-468e-99d7-411b18e970cf" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.Storage.StorageManagementClient/4.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:20:44 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "77102983-ceb8-4a2d-a456-ae0eac957844" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1194" + ], + "x-ms-correlation-request-id": [ + "e5f265a9-6c33-4135-9057-68f0423dca33" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T022044Z:e5f265a9-6c33-4135-9057-68f0423dca33" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "197" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ] + }, + //[SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="This is the secret for a resource that has since been deleted.")] + "ResponseBody": "{\r\n \"key1\": \"e6Xm75ZlxpApMoFdlopJRA9JbTK+2Zyfgwp9g64JJMZw7x6fHOpP9PZZmic7WWkbWjV5Vvn5XGsaEuNNUuAmeA==\",\r\n \"key2\": \"pYJfdzNury9DttntKOL3I9nlfBGo21qXiBlAM9yzrOgfxNR/4azJng86oGT2bU1KR7yqfdccxg47Pl/J/Ff1/A==\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet9828/providers/Microsoft.Storage/storageAccounts/admsdknet9828stgacct/listKeys?api-version=2015-06-15", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDk4MjgvcHJvdmlkZXJzL01pY3Jvc29mdC5TdG9yYWdlL3N0b3JhZ2VBY2NvdW50cy9hZG1zZGtuZXQ5ODI4c3RnYWNjdC9saXN0S2V5cz9hcGktdmVyc2lvbj0yMDE1LTA2LTE1", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "71bd03a6-98d0-48e2-9939-bb1429e414de" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.Storage.StorageManagementClient/4.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:31:20 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "d25c9716-e4f8-4d1f-91ff-d42da2cc50b3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "c6dad770-afc0-4ae4-a612-bd93e684e876" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T023120Z:c6dad770-afc0-4ae4-a612-bd93e684e876" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "197" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ] + }, + //[SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="This is the secret for a resource that has since been deleted.")] + "ResponseBody": "{\r\n \"key1\": \"e6Xm75ZlxpApMoFdlopJRA9JbTK+2Zyfgwp9g64JJMZw7x6fHOpP9PZZmic7WWkbWjV5Vvn5XGsaEuNNUuAmeA==\",\r\n \"key2\": \"pYJfdzNury9DttntKOL3I9nlfBGo21qXiBlAM9yzrOgfxNR/4azJng86oGT2bU1KR7yqfdccxg47Pl/J/Ff1/A==\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet9828/providers/Microsoft.DeploymentManager/artifactSources/admsdknet9828ArtifactSource?api-version=2018-09-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDk4MjgvcHJvdmlkZXJzL01pY3Jvc29mdC5EZXBsb3ltZW50TWFuYWdlci9hcnRpZmFjdFNvdXJjZXMvYWRtc2RrbmV0OTgyOEFydGlmYWN0U291cmNlP2FwaS12ZXJzaW9uPTIwMTgtMDktMDEtcHJldmlldw==", + "RequestMethod": "PUT", + //[SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="This is the secret for a resource that has since been deleted.")] + "RequestBody": "{\r\n \"properties\": {\r\n \"sourceType\": \"AzureStorage\",\r\n \"artifactRoot\": \"Tests\\\\ArtifactRoot\",\r\n \"authentication\": {\r\n \"type\": \"Sas\",\r\n \"properties\": {\r\n \"sasUri\": \"https://admsdknet9828stgacct.blob.core.windows.net/artifacts?sv=2017-04-17&sr=c&sig=JLSL1q6Ul2aD6OCDiLsIZe7VIkQsnnjSgZVQlx0I3N4%3D&st=2019-03-27T02%3A20%3A44Z&se=2019-03-30T02%3A20%3A44Z&sp=rl\"\r\n }\r\n }\r\n },\r\n \"location\": \"Central US\"\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "cd4d5fb4-e028-479d-ac8a-7b58db3a3493" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "436" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:20:45 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-client-request-id": [ + "cd4d5fb4-e028-479d-ac8a-7b58db3a3493" + ], + "x-ms-correlation-request-id": [ + "180cd2dc-65e3-47a7-bccb-6de14f0b79ff" + ], + "x-ms-request-id": [ + "abecbc98-1401-47ad-a7a0-ca00417a78b0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "DENY" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T022046Z:180cd2dc-65e3-47a7-bccb-6de14f0b79ff" + ], + "Content-Length": [ + "682" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + //[SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="This is the secret for a resource that has since been deleted.")] + "ResponseBody": "{\r\n \"properties\": {\r\n \"sourceType\": \"AzureStorage\",\r\n \"artifactRoot\": \"Tests\\\\ArtifactRoot\",\r\n \"authentication\": {\r\n \"type\": \"Sas\",\r\n \"properties\": {\r\n \"sasUri\": \"https://admsdknet9828stgacct.blob.core.windows.net/artifacts?sv=2017-04-17&sr=c&sig=JLSL1q6Ul2aD6OCDiLsIZe7VIkQsnnjSgZVQlx0I3N4%3D&st=2019-03-27T02%3A20%3A44Z&se=2019-03-30T02%3A20%3A44Z&sp=rl\"\r\n }\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"type\": \"Microsoft.DeploymentManager/artifactSources\",\r\n \"apiVersion\": \"2018-09-01-preview\",\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/artifactSources/admsdknet9828ArtifactSource\",\r\n \"name\": \"admsdknet9828ArtifactSource\",\r\n \"location\": \"Central US\"\r\n}", + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet9828/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet9828ServiceTopology?api-version=2018-09-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDk4MjgvcHJvdmlkZXJzL01pY3Jvc29mdC5EZXBsb3ltZW50TWFuYWdlci9zZXJ2aWNlVG9wb2xvZ2llcy9hZG1zZGtuZXQ5ODI4U2VydmljZVRvcG9sb2d5P2FwaS12ZXJzaW9uPTIwMTgtMDktMDEtcHJldmlldw==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"artifactSourceId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/artifactSources/admsdknet9828ArtifactSource\"\r\n },\r\n \"location\": \"Central US\"\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "869c86c0-83eb-4090-965d-3acef304930a" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "247" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:20:47 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-client-request-id": [ + "869c86c0-83eb-4090-965d-3acef304930a" + ], + "x-ms-correlation-request-id": [ + "cb86fb0f-285b-4d4c-823e-0592d6cd1339" + ], + "x-ms-request-id": [ + "0fa6e4ba-6b06-4dd9-ad91-9570be8a7784" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "DENY" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T022047Z:cb86fb0f-285b-4d4c-823e-0592d6cd1339" + ], + "Content-Length": [ + "556" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"artifactSourceId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/artifactSources/admsdknet9828ArtifactSource\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"type\": \"Microsoft.DeploymentManager/servicetopologies\",\r\n \"apiVersion\": \"2018-09-01-preview\",\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet9828ServiceTopology\",\r\n \"name\": \"admsdknet9828ServiceTopology\",\r\n \"location\": \"Central US\"\r\n}", + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet9828/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet9828ServiceTopology?api-version=2018-09-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDk4MjgvcHJvdmlkZXJzL01pY3Jvc29mdC5EZXBsb3ltZW50TWFuYWdlci9zZXJ2aWNlVG9wb2xvZ2llcy9hZG1zZGtuZXQ5ODI4U2VydmljZVRvcG9sb2d5P2FwaS12ZXJzaW9uPTIwMTgtMDktMDEtcHJldmlldw==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"artifactSourceId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/artifactSources/admsdknet9828UpdatedArtifactSource\"\r\n },\r\n \"location\": \"Central US\"\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "18a62e09-7450-424a-829c-5566923d87b7" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "254" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:31:41 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-client-request-id": [ + "18a62e09-7450-424a-829c-5566923d87b7" + ], + "x-ms-correlation-request-id": [ + "358fca9a-dd0d-460a-a73b-4b42378f2f41" + ], + "x-ms-request-id": [ + "240be1a2-c400-4c1c-8f05-dc0301edc016" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "DENY" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T023141Z:358fca9a-dd0d-460a-a73b-4b42378f2f41" + ], + "Content-Length": [ + "563" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"artifactSourceId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/artifactSources/admsdknet9828UpdatedArtifactSource\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"type\": \"Microsoft.DeploymentManager/servicetopologies\",\r\n \"apiVersion\": \"2018-09-01-preview\",\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet9828ServiceTopology\",\r\n \"name\": \"admsdknet9828ServiceTopology\",\r\n \"location\": \"Central US\"\r\n}", + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet9828/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet9828ServiceTopology?api-version=2018-09-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDk4MjgvcHJvdmlkZXJzL01pY3Jvc29mdC5EZXBsb3ltZW50TWFuYWdlci9zZXJ2aWNlVG9wb2xvZ2llcy9hZG1zZGtuZXQ5ODI4U2VydmljZVRvcG9sb2d5P2FwaS12ZXJzaW9uPTIwMTgtMDktMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "dfb15e1c-ec9a-4dcc-826f-69b12e8ccf9f" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:20:47 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-client-request-id": [ + "dfb15e1c-ec9a-4dcc-826f-69b12e8ccf9f" + ], + "x-ms-correlation-request-id": [ + "7b457678-1b6f-4764-9bda-b4ff27c12a30" + ], + "x-ms-request-id": [ + "788a4031-968b-4bd4-aea4-5afcc5f376c5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "DENY" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T022048Z:7b457678-1b6f-4764-9bda-b4ff27c12a30" + ], + "Content-Length": [ + "524" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"artifactSourceId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/artifactSources/admsdknet9828ArtifactSource\"\r\n },\r\n \"type\": \"Microsoft.DeploymentManager/servicetopologies\",\r\n \"apiVersion\": \"2018-09-01-preview\",\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet9828ServiceTopology\",\r\n \"name\": \"admsdknet9828ServiceTopology\",\r\n \"location\": \"Central US\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet9828/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet9828ServiceTopology?api-version=2018-09-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDk4MjgvcHJvdmlkZXJzL01pY3Jvc29mdC5EZXBsb3ltZW50TWFuYWdlci9zZXJ2aWNlVG9wb2xvZ2llcy9hZG1zZGtuZXQ5ODI4U2VydmljZVRvcG9sb2d5P2FwaS12ZXJzaW9uPTIwMTgtMDktMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "81a70351-da1a-488c-b95a-ec10ab74eda8" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:31:43 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-failure-cause": [ + "gateway" + ], + "x-ms-request-id": [ + "7b9ce0ca-4aa1-402b-9e7e-71f96c19da4c" + ], + "x-ms-correlation-request-id": [ + "7b9ce0ca-4aa1-402b-9e7e-71f96c19da4c" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T023143Z:7b9ce0ca-4aa1-402b-9e7e-71f96c19da4c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "191" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"The Resource 'Microsoft.DeploymentManager/serviceTopologies/admsdknet9828ServiceTopology' under resource group 'admsdknet9828' was not found.\"\r\n }\r\n}", + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet9828/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet9828ServiceTopology/services/admsdknet9828Service?api-version=2018-09-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDk4MjgvcHJvdmlkZXJzL01pY3Jvc29mdC5EZXBsb3ltZW50TWFuYWdlci9zZXJ2aWNlVG9wb2xvZ2llcy9hZG1zZGtuZXQ5ODI4U2VydmljZVRvcG9sb2d5L3NlcnZpY2VzL2FkbXNka25ldDk4MjhTZXJ2aWNlP2FwaS12ZXJzaW9uPTIwMTgtMDktMDEtcHJldmlldw==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"targetLocation\": \"East US\",\r\n \"targetSubscriptionId\": \"53012dcb-5039-4e96-8e6c-5d913da1cdb5\"\r\n },\r\n \"location\": \"Central US\"\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "3fd32d18-bcf7-48fe-b517-cbd763c02d57" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "159" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:20:48 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-client-request-id": [ + "3fd32d18-bcf7-48fe-b517-cbd763c02d57" + ], + "x-ms-correlation-request-id": [ + "058f38c9-3cf9-41d6-be2e-39b3f9ca0672" + ], + "x-ms-request-id": [ + "0f90a8f3-69b5-4620-9279-a14a891411ed" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "DENY" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T022049Z:058f38c9-3cf9-41d6-be2e-39b3f9ca0672" + ], + "Content-Length": [ + "492" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"targetSubscriptionId\": \"53012dcb-5039-4e96-8e6c-5d913da1cdb5\",\r\n \"targetLocation\": \"East US\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"type\": \"Microsoft.DeploymentManager/serviceTopologies/services\",\r\n \"apiVersion\": \"2018-09-01-preview\",\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet9828ServiceTopology/services/admsdknet9828Service\",\r\n \"name\": \"admsdknet9828Service\",\r\n \"location\": \"Central US\"\r\n}", + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet9828/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet9828ServiceTopology/services/admsdknet9828Service?api-version=2018-09-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDk4MjgvcHJvdmlkZXJzL01pY3Jvc29mdC5EZXBsb3ltZW50TWFuYWdlci9zZXJ2aWNlVG9wb2xvZ2llcy9hZG1zZGtuZXQ5ODI4U2VydmljZVRvcG9sb2d5L3NlcnZpY2VzL2FkbXNka25ldDk4MjhTZXJ2aWNlP2FwaS12ZXJzaW9uPTIwMTgtMDktMDEtcHJldmlldw==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"targetLocation\": \"East US\",\r\n \"targetSubscriptionId\": \"1e591dc1-b014-4754-b53b-58b67bcab1cd\"\r\n },\r\n \"location\": \"Central US\"\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "2f335fb2-ce83-4337-9d05-ebc828f9dd15" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "159" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:31:17 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-client-request-id": [ + "2f335fb2-ce83-4337-9d05-ebc828f9dd15" + ], + "x-ms-correlation-request-id": [ + "cf28d7a3-86ce-4f66-9c36-8b746cd05607" + ], + "x-ms-request-id": [ + "2521b842-2285-47af-b355-673e42c6de21" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "DENY" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T023118Z:cf28d7a3-86ce-4f66-9c36-8b746cd05607" + ], + "Content-Length": [ + "492" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"targetSubscriptionId\": \"1e591dc1-b014-4754-b53b-58b67bcab1cd\",\r\n \"targetLocation\": \"East US\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"type\": \"Microsoft.DeploymentManager/serviceTopologies/services\",\r\n \"apiVersion\": \"2018-09-01-preview\",\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet9828ServiceTopology/services/admsdknet9828Service\",\r\n \"name\": \"admsdknet9828Service\",\r\n \"location\": \"Central US\"\r\n}", + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet9828/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet9828ServiceTopology/services/admsdknet9828Service?api-version=2018-09-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDk4MjgvcHJvdmlkZXJzL01pY3Jvc29mdC5EZXBsb3ltZW50TWFuYWdlci9zZXJ2aWNlVG9wb2xvZ2llcy9hZG1zZGtuZXQ5ODI4U2VydmljZVRvcG9sb2d5L3NlcnZpY2VzL2FkbXNka25ldDk4MjhTZXJ2aWNlP2FwaS12ZXJzaW9uPTIwMTgtMDktMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "3a924e07-157b-4b84-8520-a00a26d8cc55" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:20:49 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-client-request-id": [ + "3a924e07-157b-4b84-8520-a00a26d8cc55" + ], + "x-ms-correlation-request-id": [ + "c67292db-50e4-48a8-b04e-cec3830a9290" + ], + "x-ms-request-id": [ + "3ad79657-8019-417f-84c6-298e420f5808" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "DENY" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11997" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T022050Z:c67292db-50e4-48a8-b04e-cec3830a9290" + ], + "Content-Length": [ + "492" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"targetSubscriptionId\": \"53012dcb-5039-4e96-8e6c-5d913da1cdb5\",\r\n \"targetLocation\": \"East US\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"type\": \"Microsoft.DeploymentManager/serviceTopologies/services\",\r\n \"apiVersion\": \"2018-09-01-preview\",\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet9828ServiceTopology/services/admsdknet9828Service\",\r\n \"name\": \"admsdknet9828Service\",\r\n \"location\": \"Central US\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet9828/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet9828ServiceTopology/services/admsdknet9828Service?api-version=2018-09-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDk4MjgvcHJvdmlkZXJzL01pY3Jvc29mdC5EZXBsb3ltZW50TWFuYWdlci9zZXJ2aWNlVG9wb2xvZ2llcy9hZG1zZGtuZXQ5ODI4U2VydmljZVRvcG9sb2d5L3NlcnZpY2VzL2FkbXNka25ldDk4MjhTZXJ2aWNlP2FwaS12ZXJzaW9uPTIwMTgtMDktMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "9901681e-8ab5-442d-9ed6-b3a354863b00" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:31:19 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-failure-cause": [ + "gateway" + ], + "x-ms-request-id": [ + "840916f4-f461-4e9c-be20-eb4b085c600d" + ], + "x-ms-correlation-request-id": [ + "840916f4-f461-4e9c-be20-eb4b085c600d" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T023120Z:840916f4-f461-4e9c-be20-eb4b085c600d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "221" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"The Resource 'Microsoft.DeploymentManager/serviceTopologies/admsdknet9828ServiceTopology/services/admsdknet9828Service' under resource group 'admsdknet9828' was not found.\"\r\n }\r\n}", + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet9828/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet9828ServiceTopology/services/admsdknet9828Service/serviceUnits/admsdknet9828ServiceUnit?api-version=2018-09-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDk4MjgvcHJvdmlkZXJzL01pY3Jvc29mdC5EZXBsb3ltZW50TWFuYWdlci9zZXJ2aWNlVG9wb2xvZ2llcy9hZG1zZGtuZXQ5ODI4U2VydmljZVRvcG9sb2d5L3NlcnZpY2VzL2FkbXNka25ldDk4MjhTZXJ2aWNlL3NlcnZpY2VVbml0cy9hZG1zZGtuZXQ5ODI4U2VydmljZVVuaXQ/YXBpLXZlcnNpb249MjAxOC0wOS0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"targetResourceGroup\": \"admsdknet9828\",\r\n \"deploymentMode\": \"Incremental\",\r\n \"artifacts\": {\r\n \"templateArtifactSourceRelativePath\": \"Storage.Template.json\",\r\n \"parametersArtifactSourceRelativePath\": \"Storage.Parameters.json\"\r\n }\r\n },\r\n \"location\": \"Central US\"\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "3a90bb5c-10bc-414b-b16d-99a355851f81" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "310" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:20:51 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/operationResults/6efeb326-608c-4b3c-a4a2-671e1af9b843?api-version=2018-09-01-preview" + ], + "Retry-After": [ + "56" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/operationResults/6efeb326-608c-4b3c-a4a2-671e1af9b843?api-version=2018-09-01-preview" + ], + "x-ms-client-request-id": [ + "3a90bb5c-10bc-414b-b16d-99a355851f81" + ], + "x-ms-correlation-request-id": [ + "33fc1ab5-44f3-4621-baf8-1a036328f93b" + ], + "x-ms-request-id": [ + "6efeb326-608c-4b3c-a4a2-671e1af9b843" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "DENY" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T022052Z:33fc1ab5-44f3-4621-baf8-1a036328f93b" + ], + "Content-Length": [ + "665" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"targetResourceGroup\": \"admsdknet9828\",\r\n \"deploymentMode\": \"Incremental\",\r\n \"artifacts\": {\r\n \"templateArtifactSourceRelativePath\": \"Storage.Template.json\",\r\n \"parametersArtifactSourceRelativePath\": \"Storage.Parameters.json\"\r\n },\r\n \"provisioningState\": \"Running\"\r\n },\r\n \"type\": \"Microsoft.DeploymentManager/serviceTopologies/services/serviceUnits\",\r\n \"apiVersion\": \"2018-09-01-preview\",\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet9828ServiceTopology/services/admsdknet9828Service/serviceUnits/admsdknet9828ServiceUnit\",\r\n \"name\": \"admsdknet9828ServiceUnit\",\r\n \"location\": \"Central US\"\r\n}", + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet9828/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet9828ServiceTopology/services/admsdknet9828Service/serviceUnits/admsdknet9828ServiceUnit?api-version=2018-09-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDk4MjgvcHJvdmlkZXJzL01pY3Jvc29mdC5EZXBsb3ltZW50TWFuYWdlci9zZXJ2aWNlVG9wb2xvZ2llcy9hZG1zZGtuZXQ5ODI4U2VydmljZVRvcG9sb2d5L3NlcnZpY2VzL2FkbXNka25ldDk4MjhTZXJ2aWNlL3NlcnZpY2VVbml0cy9hZG1zZGtuZXQ5ODI4U2VydmljZVVuaXQ/YXBpLXZlcnNpb249MjAxOC0wOS0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"targetResourceGroup\": \"admsdknet9828\",\r\n \"deploymentMode\": \"Complete\",\r\n \"artifacts\": {\r\n \"templateArtifactSourceRelativePath\": \"Storage.Copy.Template.json\",\r\n \"parametersArtifactSourceRelativePath\": \"Storage.Copy.Parameters.json\"\r\n }\r\n },\r\n \"location\": \"Central US\"\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "9733367c-2dad-4c35-87ec-ed51777be0f4" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "317" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:30:16 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/operationResults/1dacf633-b604-4577-92a7-be7c7dc78650?api-version=2018-09-01-preview" + ], + "Retry-After": [ + "53" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/operationResults/1dacf633-b604-4577-92a7-be7c7dc78650?api-version=2018-09-01-preview" + ], + "x-ms-client-request-id": [ + "9733367c-2dad-4c35-87ec-ed51777be0f4" + ], + "x-ms-correlation-request-id": [ + "ab9f1a0d-6a31-49f2-a3fd-52eeffa09be0" + ], + "x-ms-request-id": [ + "1dacf633-b604-4577-92a7-be7c7dc78650" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "DENY" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T023017Z:ab9f1a0d-6a31-49f2-a3fd-52eeffa09be0" + ], + "Content-Length": [ + "672" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"targetResourceGroup\": \"admsdknet9828\",\r\n \"deploymentMode\": \"Complete\",\r\n \"artifacts\": {\r\n \"templateArtifactSourceRelativePath\": \"Storage.Copy.Template.json\",\r\n \"parametersArtifactSourceRelativePath\": \"Storage.Copy.Parameters.json\"\r\n },\r\n \"provisioningState\": \"Running\"\r\n },\r\n \"type\": \"Microsoft.DeploymentManager/serviceTopologies/services/serviceUnits\",\r\n \"apiVersion\": \"2018-09-01-preview\",\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet9828ServiceTopology/services/admsdknet9828Service/serviceUnits/admsdknet9828ServiceUnit\",\r\n \"name\": \"admsdknet9828ServiceUnit\",\r\n \"location\": \"Central US\"\r\n}", + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/operationResults/6efeb326-608c-4b3c-a4a2-671e1af9b843?api-version=2018-09-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlZ3JvdXBzL2FkbXNka25ldDk4MjgvcHJvdmlkZXJzL01pY3Jvc29mdC5EZXBsb3ltZW50TWFuYWdlci9vcGVyYXRpb25SZXN1bHRzLzZlZmViMzI2LTYwOGMtNGIzYy1hNGEyLTY3MWUxYWY5Yjg0Mz9hcGktdmVyc2lvbj0yMDE4LTA5LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:21:48 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet9828ServiceTopology/services/admsdknet9828Service/serviceUnits/admsdknet9828ServiceUnit?api-version=2018-09-01-preview" + ], + "Retry-After": [ + "30" + ], + "x-ms-client-request-id": [ + "4819f3f6-5ede-4465-bc31-fd6474da440e" + ], + "x-ms-correlation-request-id": [ + "79080aee-2647-43f1-8718-6bf2cc8e147f" + ], + "x-ms-request-id": [ + "6043d5d1-d774-47cf-bb25-8873ed034a6c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "DENY" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11996" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T022149Z:79080aee-2647-43f1-8718-6bf2cc8e147f" + ], + "Content-Length": [ + "106" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2019-03-28T02:20:51.259Z\",\r\n \"endTime\": \"2019-03-28T02:20:53.229Z\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet9828/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet9828ServiceTopology/services/admsdknet9828Service/serviceUnits/admsdknet9828ServiceUnit?api-version=2018-09-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDk4MjgvcHJvdmlkZXJzL01pY3Jvc29mdC5EZXBsb3ltZW50TWFuYWdlci9zZXJ2aWNlVG9wb2xvZ2llcy9hZG1zZGtuZXQ5ODI4U2VydmljZVRvcG9sb2d5L3NlcnZpY2VzL2FkbXNka25ldDk4MjhTZXJ2aWNlL3NlcnZpY2VVbml0cy9hZG1zZGtuZXQ5ODI4U2VydmljZVVuaXQ/YXBpLXZlcnNpb249MjAxOC0wOS0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:21:49 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-client-request-id": [ + "13bc5b0a-7d4f-4df1-8775-e220e5724596" + ], + "x-ms-correlation-request-id": [ + "5171567d-d8b0-4199-8bbc-fae3e315d1ab" + ], + "x-ms-request-id": [ + "adf3b1fa-3f6e-4e9e-a89e-3394796fb2a1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "DENY" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11995" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T022150Z:5171567d-d8b0-4199-8bbc-fae3e315d1ab" + ], + "Content-Length": [ + "667" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"targetResourceGroup\": \"admsdknet9828\",\r\n \"deploymentMode\": \"Incremental\",\r\n \"artifacts\": {\r\n \"templateArtifactSourceRelativePath\": \"Storage.Template.json\",\r\n \"parametersArtifactSourceRelativePath\": \"Storage.Parameters.json\"\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"type\": \"Microsoft.DeploymentManager/serviceTopologies/services/serviceUnits\",\r\n \"apiVersion\": \"2018-09-01-preview\",\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet9828ServiceTopology/services/admsdknet9828Service/serviceUnits/admsdknet9828ServiceUnit\",\r\n \"name\": \"admsdknet9828ServiceUnit\",\r\n \"location\": \"Central US\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet9828/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet9828ServiceTopology/services/admsdknet9828Service/serviceUnits/admsdknet9828ServiceUnit?api-version=2018-09-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDk4MjgvcHJvdmlkZXJzL01pY3Jvc29mdC5EZXBsb3ltZW50TWFuYWdlci9zZXJ2aWNlVG9wb2xvZ2llcy9hZG1zZGtuZXQ5ODI4U2VydmljZVRvcG9sb2d5L3NlcnZpY2VzL2FkbXNka25ldDk4MjhTZXJ2aWNlL3NlcnZpY2VVbml0cy9hZG1zZGtuZXQ5ODI4U2VydmljZVVuaXQ/YXBpLXZlcnNpb249MjAxOC0wOS0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "4fb75ce9-92f7-4010-9980-da7282e625fd" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:21:50 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-client-request-id": [ + "4fb75ce9-92f7-4010-9980-da7282e625fd" + ], + "x-ms-correlation-request-id": [ + "5f1eee7c-1fac-4fed-b09d-14a1513a19e9" + ], + "x-ms-request-id": [ + "92c0152b-7293-42d5-8c20-61cb267c0823" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "DENY" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11994" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T022151Z:5f1eee7c-1fac-4fed-b09d-14a1513a19e9" + ], + "Content-Length": [ + "667" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"targetResourceGroup\": \"admsdknet9828\",\r\n \"deploymentMode\": \"Incremental\",\r\n \"artifacts\": {\r\n \"templateArtifactSourceRelativePath\": \"Storage.Template.json\",\r\n \"parametersArtifactSourceRelativePath\": \"Storage.Parameters.json\"\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"type\": \"Microsoft.DeploymentManager/serviceTopologies/services/serviceUnits\",\r\n \"apiVersion\": \"2018-09-01-preview\",\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet9828ServiceTopology/services/admsdknet9828Service/serviceUnits/admsdknet9828ServiceUnit\",\r\n \"name\": \"admsdknet9828ServiceUnit\",\r\n \"location\": \"Central US\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet9828/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet9828ServiceTopology/services/admsdknet9828Service/serviceUnits/admsdknet9828ServiceUnit?api-version=2018-09-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDk4MjgvcHJvdmlkZXJzL01pY3Jvc29mdC5EZXBsb3ltZW50TWFuYWdlci9zZXJ2aWNlVG9wb2xvZ2llcy9hZG1zZGtuZXQ5ODI4U2VydmljZVRvcG9sb2d5L3NlcnZpY2VzL2FkbXNka25ldDk4MjhTZXJ2aWNlL3NlcnZpY2VVbml0cy9hZG1zZGtuZXQ5ODI4U2VydmljZVVuaXQ/YXBpLXZlcnNpb249MjAxOC0wOS0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:31:12 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-client-request-id": [ + "d030bf48-2551-4a05-8c99-7bbe165b11b7" + ], + "x-ms-correlation-request-id": [ + "893a8626-85fe-4d65-9e45-0a71b2b28cb5" + ], + "x-ms-request-id": [ + "9e1380e5-5171-429f-9636-a798a1da7481" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "DENY" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11996" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T023112Z:893a8626-85fe-4d65-9e45-0a71b2b28cb5" + ], + "Content-Length": [ + "674" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"targetResourceGroup\": \"admsdknet9828\",\r\n \"deploymentMode\": \"Complete\",\r\n \"artifacts\": {\r\n \"templateArtifactSourceRelativePath\": \"Storage.Copy.Template.json\",\r\n \"parametersArtifactSourceRelativePath\": \"Storage.Copy.Parameters.json\"\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"type\": \"Microsoft.DeploymentManager/serviceTopologies/services/serviceUnits\",\r\n \"apiVersion\": \"2018-09-01-preview\",\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet9828ServiceTopology/services/admsdknet9828Service/serviceUnits/admsdknet9828ServiceUnit\",\r\n \"name\": \"admsdknet9828ServiceUnit\",\r\n \"location\": \"Central US\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet9828/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet9828ServiceTopology/services/admsdknet9828Service/serviceUnits/admsdknet9828ServiceUnit?api-version=2018-09-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDk4MjgvcHJvdmlkZXJzL01pY3Jvc29mdC5EZXBsb3ltZW50TWFuYWdlci9zZXJ2aWNlVG9wb2xvZ2llcy9hZG1zZGtuZXQ5ODI4U2VydmljZVRvcG9sb2d5L3NlcnZpY2VzL2FkbXNka25ldDk4MjhTZXJ2aWNlL3NlcnZpY2VVbml0cy9hZG1zZGtuZXQ5ODI4U2VydmljZVVuaXQ/YXBpLXZlcnNpb249MjAxOC0wOS0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "1d00815a-d877-41a3-8ac0-496fc4b89015" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:31:13 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-failure-cause": [ + "gateway" + ], + "x-ms-request-id": [ + "f26e3c4c-4c55-4f84-b3f1-a8a7f0f03b80" + ], + "x-ms-correlation-request-id": [ + "f26e3c4c-4c55-4f84-b3f1-a8a7f0f03b80" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T023114Z:f26e3c4c-4c55-4f84-b3f1-a8a7f0f03b80" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "259" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"The Resource 'Microsoft.DeploymentManager/serviceTopologies/admsdknet9828ServiceTopology/services/admsdknet9828Service/serviceUnits/admsdknet9828ServiceUnit' under resource group 'admsdknet9828' was not found.\"\r\n }\r\n}", + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet9828/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet9828ServiceTopology/services/admsdknet9828Service/serviceUnits/admsdknet9828InvalidServiceUnit?api-version=2018-09-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDk4MjgvcHJvdmlkZXJzL01pY3Jvc29mdC5EZXBsb3ltZW50TWFuYWdlci9zZXJ2aWNlVG9wb2xvZ2llcy9hZG1zZGtuZXQ5ODI4U2VydmljZVRvcG9sb2d5L3NlcnZpY2VzL2FkbXNka25ldDk4MjhTZXJ2aWNlL3NlcnZpY2VVbml0cy9hZG1zZGtuZXQ5ODI4SW52YWxpZFNlcnZpY2VVbml0P2FwaS12ZXJzaW9uPTIwMTgtMDktMDEtcHJldmlldw==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"targetResourceGroup\": \"admsdknet9828\",\r\n \"deploymentMode\": \"Incremental\",\r\n \"artifacts\": {\r\n \"templateArtifactSourceRelativePath\": \"Storage.Template.json\",\r\n \"parametersArtifactSourceRelativePath\": \"Storage_Invalid.Parameters.json\"\r\n }\r\n },\r\n \"location\": \"Central US\"\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "00abbe4e-3c84-4d23-914e-5ad6ca151e21" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "318" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:21:56 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/operationResults/1d037d45-d5e4-467a-8e62-a1a0c384298f?api-version=2018-09-01-preview" + ], + "Retry-After": [ + "33" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/operationResults/1d037d45-d5e4-467a-8e62-a1a0c384298f?api-version=2018-09-01-preview" + ], + "x-ms-client-request-id": [ + "00abbe4e-3c84-4d23-914e-5ad6ca151e21" + ], + "x-ms-correlation-request-id": [ + "1282793a-edff-4965-950f-446c899684ee" + ], + "x-ms-request-id": [ + "1d037d45-d5e4-467a-8e62-a1a0c384298f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "DENY" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1195" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T022156Z:1282793a-edff-4965-950f-446c899684ee" + ], + "Content-Length": [ + "687" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"targetResourceGroup\": \"admsdknet9828\",\r\n \"deploymentMode\": \"Incremental\",\r\n \"artifacts\": {\r\n \"templateArtifactSourceRelativePath\": \"Storage.Template.json\",\r\n \"parametersArtifactSourceRelativePath\": \"Storage_Invalid.Parameters.json\"\r\n },\r\n \"provisioningState\": \"Running\"\r\n },\r\n \"type\": \"Microsoft.DeploymentManager/serviceTopologies/services/serviceUnits\",\r\n \"apiVersion\": \"2018-09-01-preview\",\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet9828ServiceTopology/services/admsdknet9828Service/serviceUnits/admsdknet9828InvalidServiceUnit\",\r\n \"name\": \"admsdknet9828InvalidServiceUnit\",\r\n \"location\": \"Central US\"\r\n}", + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/operationResults/1d037d45-d5e4-467a-8e62-a1a0c384298f?api-version=2018-09-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlZ3JvdXBzL2FkbXNka25ldDk4MjgvcHJvdmlkZXJzL01pY3Jvc29mdC5EZXBsb3ltZW50TWFuYWdlci9vcGVyYXRpb25SZXN1bHRzLzFkMDM3ZDQ1LWQ1ZTQtNDY3YS04ZTYyLWExYTBjMzg0Mjk4Zj9hcGktdmVyc2lvbj0yMDE4LTA5LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:22:32 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet9828ServiceTopology/services/admsdknet9828Service/serviceUnits/admsdknet9828InvalidServiceUnit?api-version=2018-09-01-preview" + ], + "Retry-After": [ + "30" + ], + "x-ms-client-request-id": [ + "8210af43-0d54-42f6-93f8-d121f22635b1" + ], + "x-ms-correlation-request-id": [ + "9f84c6e2-1ede-4f49-8254-466376e6877a" + ], + "x-ms-request-id": [ + "0924e83d-c9fd-4dbc-8a0a-7e148677e1fd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "DENY" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T022232Z:9f84c6e2-1ede-4f49-8254-466376e6877a" + ], + "Content-Length": [ + "106" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2019-03-28T02:21:54.004Z\",\r\n \"endTime\": \"2019-03-28T02:22:01.331Z\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet9828/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet9828ServiceTopology/services/admsdknet9828Service/serviceUnits/admsdknet9828InvalidServiceUnit?api-version=2018-09-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDk4MjgvcHJvdmlkZXJzL01pY3Jvc29mdC5EZXBsb3ltZW50TWFuYWdlci9zZXJ2aWNlVG9wb2xvZ2llcy9hZG1zZGtuZXQ5ODI4U2VydmljZVRvcG9sb2d5L3NlcnZpY2VzL2FkbXNka25ldDk4MjhTZXJ2aWNlL3NlcnZpY2VVbml0cy9hZG1zZGtuZXQ5ODI4SW52YWxpZFNlcnZpY2VVbml0P2FwaS12ZXJzaW9uPTIwMTgtMDktMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:22:33 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-client-request-id": [ + "a05032ad-3e80-4c79-89d3-334eccfc1713" + ], + "x-ms-correlation-request-id": [ + "5a3d4180-a3fb-4ea7-bb55-d589ecddea78" + ], + "x-ms-request-id": [ + "854f643f-2a0b-4d69-a39d-7e85d929bb93" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "DENY" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11998" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T022233Z:5a3d4180-a3fb-4ea7-bb55-d589ecddea78" + ], + "Content-Length": [ + "689" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"targetResourceGroup\": \"admsdknet9828\",\r\n \"deploymentMode\": \"Incremental\",\r\n \"artifacts\": {\r\n \"templateArtifactSourceRelativePath\": \"Storage.Template.json\",\r\n \"parametersArtifactSourceRelativePath\": \"Storage_Invalid.Parameters.json\"\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"type\": \"Microsoft.DeploymentManager/serviceTopologies/services/serviceUnits\",\r\n \"apiVersion\": \"2018-09-01-preview\",\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet9828ServiceTopology/services/admsdknet9828Service/serviceUnits/admsdknet9828InvalidServiceUnit\",\r\n \"name\": \"admsdknet9828InvalidServiceUnit\",\r\n \"location\": \"Central US\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet9828/providers/Microsoft.DeploymentManager/steps/admsdknet9828WaitStep?api-version=2018-09-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDk4MjgvcHJvdmlkZXJzL01pY3Jvc29mdC5EZXBsb3ltZW50TWFuYWdlci9zdGVwcy9hZG1zZGtuZXQ5ODI4V2FpdFN0ZXA/YXBpLXZlcnNpb249MjAxOC0wOS0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"stepType\": \"Wait\",\r\n \"attributes\": {\r\n \"duration\": \"PT5M\"\r\n }\r\n },\r\n \"location\": \"Central US\"\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "dbc27c7f-b6ac-4602-a02d-accfd6cdd2e2" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "136" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:22:35 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-client-request-id": [ + "dbc27c7f-b6ac-4602-a02d-accfd6cdd2e2" + ], + "x-ms-correlation-request-id": [ + "126eaa43-1675-4629-9d1d-7c3c7562171e" + ], + "x-ms-request-id": [ + "6a273b5e-62ee-49d8-99fa-326ca81009bd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "DENY" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T022236Z:126eaa43-1675-4629-9d1d-7c3c7562171e" + ], + "Content-Length": [ + "385" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"stepType\": \"Wait\",\r\n \"attributes\": {\r\n \"duration\": \"PT5M\"\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"type\": \"Microsoft.DeploymentManager/steps\",\r\n \"apiVersion\": \"2018-09-01-preview\",\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/steps/admsdknet9828WaitStep\",\r\n \"name\": \"admsdknet9828WaitStep\",\r\n \"location\": \"Central US\"\r\n}", + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet9828/providers/Microsoft.DeploymentManager/steps/admsdknet9828WaitStep?api-version=2018-09-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDk4MjgvcHJvdmlkZXJzL01pY3Jvc29mdC5EZXBsb3ltZW50TWFuYWdlci9zdGVwcy9hZG1zZGtuZXQ5ODI4V2FpdFN0ZXA/YXBpLXZlcnNpb249MjAxOC0wOS0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"stepType\": \"Wait\",\r\n \"attributes\": {\r\n \"duration\": \"PT10M\"\r\n }\r\n },\r\n \"location\": \"Central US\"\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "101e3b09-f6d6-46f4-8b04-d5496163d990" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "137" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:29:49 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-client-request-id": [ + "101e3b09-f6d6-46f4-8b04-d5496163d990" + ], + "x-ms-correlation-request-id": [ + "6eb40f2a-04c9-42fb-8562-cb22f02ec0dc" + ], + "x-ms-request-id": [ + "68e5d24b-ae59-4590-abbf-0e82e3bfecf0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "DENY" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T022949Z:6eb40f2a-04c9-42fb-8562-cb22f02ec0dc" + ], + "Content-Length": [ + "386" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"stepType\": \"Wait\",\r\n \"attributes\": {\r\n \"duration\": \"PT10M\"\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"type\": \"Microsoft.DeploymentManager/steps\",\r\n \"apiVersion\": \"2018-09-01-preview\",\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/steps/admsdknet9828WaitStep\",\r\n \"name\": \"admsdknet9828WaitStep\",\r\n \"location\": \"Central US\"\r\n}", + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet9828/providers/Microsoft.DeploymentManager/steps/admsdknet9828WaitStep?api-version=2018-09-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDk4MjgvcHJvdmlkZXJzL01pY3Jvc29mdC5EZXBsb3ltZW50TWFuYWdlci9zdGVwcy9hZG1zZGtuZXQ5ODI4V2FpdFN0ZXA/YXBpLXZlcnNpb249MjAxOC0wOS0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "a188dc54-d266-43a2-9ac0-fa4a995061f5" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:22:36 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-client-request-id": [ + "a188dc54-d266-43a2-9ac0-fa4a995061f5" + ], + "x-ms-correlation-request-id": [ + "40c8c235-98f8-4a65-9ed6-7d8b9656877f" + ], + "x-ms-request-id": [ + "dd58e07d-a7a4-4b7d-baff-643f87b86236" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "DENY" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11997" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T022237Z:40c8c235-98f8-4a65-9ed6-7d8b9656877f" + ], + "Content-Length": [ + "385" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"stepType\": \"Wait\",\r\n \"attributes\": {\r\n \"duration\": \"PT5M\"\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"type\": \"Microsoft.DeploymentManager/steps\",\r\n \"apiVersion\": \"2018-09-01-preview\",\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/steps/admsdknet9828WaitStep\",\r\n \"name\": \"admsdknet9828WaitStep\",\r\n \"location\": \"Central US\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet9828/providers/Microsoft.DeploymentManager/steps/admsdknet9828WaitStep?api-version=2018-09-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDk4MjgvcHJvdmlkZXJzL01pY3Jvc29mdC5EZXBsb3ltZW50TWFuYWdlci9zdGVwcy9hZG1zZGtuZXQ5ODI4V2FpdFN0ZXA/YXBpLXZlcnNpb249MjAxOC0wOS0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "41c59576-ddad-47ed-a7c1-5f88b6efbda0" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:29:58 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-failure-cause": [ + "gateway" + ], + "x-ms-request-id": [ + "bd57ed50-f680-44c0-b63f-b88cc2bba033" + ], + "x-ms-correlation-request-id": [ + "bd57ed50-f680-44c0-b63f-b88cc2bba033" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T022958Z:bd57ed50-f680-44c0-b63f-b88cc2bba033" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "172" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"The Resource 'Microsoft.DeploymentManager/steps/admsdknet9828WaitStep' under resource group 'admsdknet9828' was not found.\"\r\n }\r\n}", + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/providers/Microsoft.ManagedIdentity?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Byb3ZpZGVycy9NaWNyb3NvZnQuTWFuYWdlZElkZW50aXR5P2FwaS12ZXJzaW9uPTIwMTUtMTEtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "6d4f5f4b-c712-4ed7-bcb9-ee326971d824" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:22:36 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11990" + ], + "x-ms-request-id": [ + "3f3767bd-8683-4018-b45a-d7c5ad09d3cb" + ], + "x-ms-correlation-request-id": [ + "3f3767bd-8683-4018-b45a-d7c5ad09d3cb" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T022237Z:3f3767bd-8683-4018-b45a-d7c5ad09d3cb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "1805" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/providers/Microsoft.ManagedIdentity\",\r\n \"namespace\": \"Microsoft.ManagedIdentity\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Identities\",\r\n \"locations\": [\r\n \"South Africa North\",\r\n \"South Africa West\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"Brazil South\",\r\n \"Central India\",\r\n \"West India\",\r\n \"South India\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Central US\",\r\n \"North Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"France Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-11-30\",\r\n \"2015-08-31-PREVIEW\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"userAssignedIdentities\",\r\n \"locations\": [\r\n \"South Africa North\",\r\n \"South Africa West\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"Brazil South\",\r\n \"Central India\",\r\n \"West India\",\r\n \"South India\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Central US\",\r\n \"North Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"France Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-11-30\",\r\n \"2015-08-31-PREVIEW\"\r\n ],\r\n \"capabilities\": \"None\"\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"South Africa North\",\r\n \"South Africa West\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"Brazil South\",\r\n \"Central India\",\r\n \"West India\",\r\n \"South India\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Central US\",\r\n \"North Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"France Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-11-30\",\r\n \"2015-08-31-PREVIEW\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet9828/providers/Microsoft.ManagedIdentity/userAssignedIdentities/admsdknet9828Identity?api-version=2015-08-31-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDk4MjgvcHJvdmlkZXJzL01pY3Jvc29mdC5NYW5hZ2VkSWRlbnRpdHkvdXNlckFzc2lnbmVkSWRlbnRpdGllcy9hZG1zZGtuZXQ5ODI4SWRlbnRpdHk/YXBpLXZlcnNpb249MjAxNS0wOC0zMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"South Africa North\"\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "443a4172-fa38-47f6-abde-591902b3ef0a" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.ManagedServiceIdentity.ManagedServiceIdentityClient/0.10.0.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "40" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:22:40 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.ManagedIdentity/userAssignedIdentities/admsdknet9828Identity" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "fb0e9585-7c5f-46e8-9592-a2b5d144cfcb" + ], + "x-ms-correlation-request-id": [ + "fb0e9585-7c5f-46e8-9592-a2b5d144cfcb" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T022241Z:fb0e9585-7c5f-46e8-9592-a2b5d144cfcb" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "835" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.ManagedIdentity/userAssignedIdentities/admsdknet9828Identity\",\r\n \"name\": \"admsdknet9828Identity\",\r\n \"type\": \"Microsoft.ManagedIdentity/userAssignedIdentities\",\r\n \"location\": \"southafricanorth\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"principalId\": \"e9b19c54-8758-4816-92a3-d368f67d6455\",\r\n \"clientId\": \"8e0c86e6-64c1-4083-b175-c414add5c5fc\",\r\n \"clientSecretUrl\": \"https://control-southafricanorth.identity.azure.net/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.ManagedIdentity/userAssignedIdentities/admsdknet9828Identity/credentials?tid=72f988bf-86f1-41af-91ab-2d7cd011db47&oid=e9b19c54-8758-4816-92a3-d368f67d6455&aid=8e0c86e6-64c1-4083-b175-c414add5c5fc\"\r\n }\r\n}", + "StatusCode": 201 + }, + { + "RequestUri": "//subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/providers/Microsoft.Authorization/roleDefinitions?$filter=roleName%20eq%20'Contributor'&api-version=2018-01-01-preview", + "EncodedRequestUri": "Ly9zdWJzY3JpcHRpb25zLzUzMDEyZGNiLTUwMzktNGU5Ni04ZTZjLTVkOTEzZGExY2RiNS9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcm9sZURlZmluaXRpb25zPyRmaWx0ZXI9cm9sZU5hbWUlMjBlcSUyMCdDb250cmlidXRvcicmYXBpLXZlcnNpb249MjAxOC0wMS0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "5f078eac-c837-4d4d-ab9d-fd2c06c766a3" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/2.11.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:24:40 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Set-Cookie": [ + "x-ms-gateway-slice=Production; path=/; secure; HttpOnly" + ], + "x-ms-request-charge": [ + "1" + ], + "x-ms-request-id": [ + "bb101c05-8d6b-47bb-9cd4-405e2838d4b4" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-correlation-request-id": [ + "2325c0a2-f6f9-4f35-9c20-14cae51a2f69" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T022441Z:2325c0a2-f6f9-4f35-9c20-14cae51a2f69" + ], + "Content-Length": [ + "832" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"properties\": {\r\n \"roleName\": \"Contributor\",\r\n \"type\": \"BuiltInRole\",\r\n \"description\": \"Lets you manage everything except access to resources.\",\r\n \"assignableScopes\": [\r\n \"/\"\r\n ],\r\n \"permissions\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": [\r\n \"Microsoft.Authorization/*/Delete\",\r\n \"Microsoft.Authorization/*/Write\",\r\n \"Microsoft.Authorization/elevateAccess/Action\",\r\n \"Microsoft.Blueprint/blueprintAssignments/write\",\r\n \"Microsoft.Blueprint/blueprintAssignments/delete\"\r\n ],\r\n \"dataActions\": [],\r\n \"notDataActions\": []\r\n }\r\n ],\r\n \"createdOn\": \"2015-02-02T21:55:09.8806423Z\",\r\n \"updatedOn\": \"2019-02-05T21:24:38.458061Z\",\r\n \"createdBy\": null,\r\n \"updatedBy\": null\r\n },\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\",\r\n \"type\": \"Microsoft.Authorization/roleDefinitions\",\r\n \"name\": \"b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "//subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/providers/Microsoft.Authorization/roleAssignments/501cd758-2531-416f-93c7-c9e7c26c77f4?api-version=2018-09-01-preview", + "EncodedRequestUri": "Ly9zdWJzY3JpcHRpb25zLzUzMDEyZGNiLTUwMzktNGU5Ni04ZTZjLTVkOTEzZGExY2RiNS9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcm9sZUFzc2lnbm1lbnRzLzUwMWNkNzU4LTI1MzEtNDE2Zi05M2M3LWM5ZTdjMjZjNzdmND9hcGktdmVyc2lvbj0yMDE4LTA5LTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"roleDefinitionId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\",\r\n \"principalId\": \"e9b19c54-8758-4816-92a3-d368f67d6455\",\r\n \"canDelegate\": false\r\n }\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "fc0e119d-1b97-450d-975b-37128fa02f32" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/2.11.0.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "281" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:24:43 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Set-Cookie": [ + "x-ms-gateway-slice=Production; path=/; secure; HttpOnly" + ], + "x-ms-request-charge": [ + "2" + ], + "x-ms-request-id": [ + "d7b62519-2671-47b4-b4c0-09ee01c1cbf7" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "579a7b68-263b-4f56-899c-96862637187e" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T022443Z:579a7b68-263b-4f56-899c-96862637187e" + ], + "Content-Length": [ + "721" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"roleDefinitionId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\",\r\n \"principalId\": \"e9b19c54-8758-4816-92a3-d368f67d6455\",\r\n \"principalType\": \"ServicePrincipal\",\r\n \"scope\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5\",\r\n \"createdOn\": \"2019-03-28T02:24:41.8857487Z\",\r\n \"updatedOn\": \"2019-03-28T02:24:41.8857487Z\",\r\n \"createdBy\": null,\r\n \"updatedBy\": \"f52e71ff-b5e8-41f3-a79e-ece2d7ccd615\"\r\n },\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/providers/Microsoft.Authorization/roleAssignments/501cd758-2531-416f-93c7-c9e7c26c77f4\",\r\n \"type\": \"Microsoft.Authorization/roleAssignments\",\r\n \"name\": \"501cd758-2531-416f-93c7-c9e7c26c77f4\"\r\n}", + "StatusCode": 201 + }, + { + "RequestUri": "//subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/providers/Microsoft.Authorization/roleAssignments/501cd758-2531-416f-93c7-c9e7c26c77f4?api-version=2018-09-01-preview", + "EncodedRequestUri": "Ly9zdWJzY3JpcHRpb25zLzUzMDEyZGNiLTUwMzktNGU5Ni04ZTZjLTVkOTEzZGExY2RiNS9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcm9sZUFzc2lnbm1lbnRzLzUwMWNkNzU4LTI1MzEtNDE2Zi05M2M3LWM5ZTdjMjZjNzdmND9hcGktdmVyc2lvbj0yMDE4LTA5LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "ac93b12c-c32d-4ce2-90ab-6c3ab87ba067" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/2.11.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:25:43 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Set-Cookie": [ + "x-ms-gateway-slice=Production; path=/; secure; HttpOnly" + ], + "x-ms-request-charge": [ + "1" + ], + "x-ms-request-id": [ + "86f40c50-e5a0-4c80-a4a5-78787026d2d2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11994" + ], + "x-ms-correlation-request-id": [ + "ea814289-587f-4663-a663-f87327480260" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T022543Z:ea814289-587f-4663-a663-f87327480260" + ], + "Content-Length": [ + "755" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"roleDefinitionId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\",\r\n \"principalId\": \"e9b19c54-8758-4816-92a3-d368f67d6455\",\r\n \"principalType\": \"ServicePrincipal\",\r\n \"scope\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5\",\r\n \"createdOn\": \"2019-03-28T02:24:43.3075982Z\",\r\n \"updatedOn\": \"2019-03-28T02:24:43.3075982Z\",\r\n \"createdBy\": \"f52e71ff-b5e8-41f3-a79e-ece2d7ccd615\",\r\n \"updatedBy\": \"f52e71ff-b5e8-41f3-a79e-ece2d7ccd615\"\r\n },\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/providers/Microsoft.Authorization/roleAssignments/501cd758-2531-416f-93c7-c9e7c26c77f4\",\r\n \"type\": \"Microsoft.Authorization/roleAssignments\",\r\n \"name\": \"501cd758-2531-416f-93c7-c9e7c26c77f4\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet9828/providers/Microsoft.DeploymentManager/rollouts/admsdknet9828Rollout?api-version=2018-09-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDk4MjgvcHJvdmlkZXJzL01pY3Jvc29mdC5EZXBsb3ltZW50TWFuYWdlci9yb2xsb3V0cy9hZG1zZGtuZXQ5ODI4Um9sbG91dD9hcGktdmVyc2lvbj0yMDE4LTA5LTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"identity\": {\r\n \"type\": \"userAssigned\",\r\n \"identityIds\": [\r\n \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.ManagedIdentity/userAssignedIdentities/admsdknet9828Identity\"\r\n ]\r\n },\r\n \"properties\": {\r\n \"buildVersion\": \"1.0.0.0\",\r\n \"artifactSourceId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/artifactSources/admsdknet9828ArtifactSource\",\r\n \"targetServiceTopologyId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet9828ServiceTopology\",\r\n \"stepGroups\": [\r\n {\r\n \"name\": \"First_Region\",\r\n \"preDeploymentSteps\": [\r\n {\r\n \"stepId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/steps/admsdknet9828WaitStep\"\r\n }\r\n ],\r\n \"deploymentTargetId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet9828ServiceTopology/services/admsdknet9828Service/serviceUnits/admsdknet9828ServiceUnit\"\r\n }\r\n ]\r\n },\r\n \"location\": \"Central US\"\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "c05cf87b-2b57-47ad-8b64-8e602f5a0042" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "1322" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:25:47 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/operationResults/9d71f8be-f182-4d49-8c05-5aa7b26c4f30?api-version=2018-09-01-preview" + ], + "Retry-After": [ + "51" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/operationResults/9d71f8be-f182-4d49-8c05-5aa7b26c4f30?api-version=2018-09-01-preview" + ], + "x-ms-client-request-id": [ + "c05cf87b-2b57-47ad-8b64-8e602f5a0042" + ], + "x-ms-correlation-request-id": [ + "d7aad614-20b3-4cea-a196-b72f0e7291ae" + ], + "x-ms-request-id": [ + "9d71f8be-f182-4d49-8c05-5aa7b26c4f30" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "DENY" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T022547Z:d7aad614-20b3-4cea-a196-b72f0e7291ae" + ], + "Content-Length": [ + "1483" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"identity\": {\r\n \"type\": \"userAssigned\",\r\n \"identityIds\": [\r\n \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.ManagedIdentity/userAssignedIdentities/admsdknet9828Identity\"\r\n ]\r\n },\r\n \"properties\": {\r\n \"buildVersion\": \"1.0.0.0\",\r\n \"targetServiceTopologyId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet9828ServiceTopology\",\r\n \"artifactSourceId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/artifactSources/admsdknet9828ArtifactSource\",\r\n \"stepGroups\": [\r\n {\r\n \"name\": \"First_Region\",\r\n \"deploymentTargetId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet9828ServiceTopology/services/admsdknet9828Service/serviceUnits/admsdknet9828ServiceUnit\",\r\n \"preDeploymentSteps\": [\r\n {\r\n \"stepId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/steps/admsdknet9828WaitStep\"\r\n }\r\n ],\r\n \"postDeploymentSteps\": [],\r\n \"dependsOnStepGroups\": []\r\n }\r\n ],\r\n \"provisioningState\": \"Running\"\r\n },\r\n \"type\": \"Microsoft.DeploymentManager/rollouts\",\r\n \"apiVersion\": \"2018-09-01-preview\",\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/rollouts/admsdknet9828Rollout\",\r\n \"name\": \"admsdknet9828Rollout\",\r\n \"location\": \"Central US\"\r\n}", + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/operationResults/9d71f8be-f182-4d49-8c05-5aa7b26c4f30?api-version=2018-09-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlZ3JvdXBzL2FkbXNka25ldDk4MjgvcHJvdmlkZXJzL01pY3Jvc29mdC5EZXBsb3ltZW50TWFuYWdlci9vcGVyYXRpb25SZXN1bHRzLzlkNzFmOGJlLWYxODItNGQ0OS04YzA1LTVhYTdiMjZjNGYzMD9hcGktdmVyc2lvbj0yMDE4LTA5LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:26:38 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/rollouts/admsdknet9828Rollout?api-version=2018-09-01-preview" + ], + "Retry-After": [ + "30" + ], + "x-ms-client-request-id": [ + "849e3046-5adc-4fa5-8cea-37285403f6ee" + ], + "x-ms-correlation-request-id": [ + "3d7507f0-a519-4c0a-81d0-1d0911cd4b13" + ], + "x-ms-request-id": [ + "d399eefb-3e1c-4834-ae9e-5847fd2a04e8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "DENY" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11984" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T022639Z:3d7507f0-a519-4c0a-81d0-1d0911cd4b13" + ], + "Content-Length": [ + "106" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2019-03-28T02:25:45.962Z\",\r\n \"endTime\": \"2019-03-28T02:25:51.005Z\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet9828/providers/Microsoft.DeploymentManager/rollouts/admsdknet9828Rollout?api-version=2018-09-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDk4MjgvcHJvdmlkZXJzL01pY3Jvc29mdC5EZXBsb3ltZW50TWFuYWdlci9yb2xsb3V0cy9hZG1zZGtuZXQ5ODI4Um9sbG91dD9hcGktdmVyc2lvbj0yMDE4LTA5LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:26:40 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/rollouts/admsdknet9828Rollout?api-version=2018-09-01-preview" + ], + "Retry-After": [ + "120" + ], + "x-ms-client-request-id": [ + "8cc2062c-0260-4d31-8f5d-0f8acce7782b" + ], + "x-ms-correlation-request-id": [ + "f30b7bf2-f32d-439d-8502-17af13063aef" + ], + "x-ms-request-id": [ + "c6f1ec93-88a8-400d-bae3-e58c7a560dc3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "DENY" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11983" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T022641Z:f30b7bf2-f32d-439d-8502-17af13063aef" + ], + "Content-Length": [ + "2312" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"identity\": {\r\n \"type\": \"userAssigned\",\r\n \"identityIds\": [\r\n \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.ManagedIdentity/userAssignedIdentities/admsdknet9828Identity\"\r\n ]\r\n },\r\n \"properties\": {\r\n \"status\": \"Running\",\r\n \"totalRetryAttempts\": 0,\r\n \"operationInfo\": {\r\n \"retryAttempt\": 0,\r\n \"skipSucceededOnRetry\": false,\r\n \"startTime\": \"2019-03-28T02:25:50.286Z\",\r\n \"lastUpdatedTime\": \"2019-03-28T02:25:50.286Z\"\r\n },\r\n \"services\": [\r\n {\r\n \"name\": \"admsdknet9828Service\",\r\n \"targetSubscriptionId\": \"53012dcb-5039-4e96-8e6c-5d913da1cdb5\",\r\n \"targetLocation\": \"East US\",\r\n \"serviceUnits\": [\r\n {\r\n \"name\": \"admsdknet9828ServiceUnit\",\r\n \"targetResourceGroup\": \"admsdknet9828Service\",\r\n \"artifacts\": {},\r\n \"steps\": [\r\n {\r\n \"name\": \"Wait/admsdknet9828WaitStep.PreDeploy\",\r\n \"stepGroup\": \"First_Region\",\r\n \"status\": \"Running\",\r\n \"operationInfo\": {\r\n \"deploymentName\": \"\",\r\n \"startTime\": \"2019-03-28T02:25:55.977Z\",\r\n \"lastUpdatedTime\": \"2019-03-28T02:25:55.977Z\"\r\n },\r\n \"resourceOperations\": [],\r\n \"messages\": [\r\n {\r\n \"timestamp\": \"2019-03-28T02:25:55.8683693Z\",\r\n \"message\": \"Wait ending at '03/28/2019 02:30:55 UTC', with '5 minutes' remaining.\"\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"buildVersion\": \"1.0.0.0\",\r\n \"targetServiceTopologyId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet9828ServiceTopology\",\r\n \"artifactSourceId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/artifactSources/admsdknet9828ArtifactSource\",\r\n \"stepGroups\": [\r\n {\r\n \"name\": \"First_Region\",\r\n \"deploymentTargetId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet9828ServiceTopology/services/admsdknet9828Service/serviceUnits/admsdknet9828ServiceUnit\",\r\n \"preDeploymentSteps\": [\r\n {\r\n \"stepId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/steps/admsdknet9828WaitStep\"\r\n }\r\n ],\r\n \"postDeploymentSteps\": [],\r\n \"dependsOnStepGroups\": []\r\n }\r\n ],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"type\": \"Microsoft.DeploymentManager/rollouts\",\r\n \"apiVersion\": \"2018-09-01-preview\",\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/rollouts/admsdknet9828Rollout\",\r\n \"name\": \"admsdknet9828Rollout\",\r\n \"location\": \"Central US\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet9828/providers/Microsoft.DeploymentManager/rollouts/admsdknet9828Rollout?api-version=2018-09-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDk4MjgvcHJvdmlkZXJzL01pY3Jvc29mdC5EZXBsb3ltZW50TWFuYWdlci9yb2xsb3V0cy9hZG1zZGtuZXQ5ODI4Um9sbG91dD9hcGktdmVyc2lvbj0yMDE4LTA5LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "90f18b50-ab21-437b-ba9a-79e33930fbcb" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:27:38 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/rollouts/admsdknet9828Rollout?api-version=2018-09-01-preview" + ], + "Retry-After": [ + "120" + ], + "x-ms-client-request-id": [ + "90f18b50-ab21-437b-ba9a-79e33930fbcb" + ], + "x-ms-correlation-request-id": [ + "b1ce90be-beb7-4d82-bbf0-bf4ccd92ca5e" + ], + "x-ms-request-id": [ + "766fdde3-ff2f-4bce-8455-b51f936b39dc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "DENY" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11993" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T022739Z:b1ce90be-beb7-4d82-bbf0-bf4ccd92ca5e" + ], + "Content-Length": [ + "2312" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"identity\": {\r\n \"type\": \"userAssigned\",\r\n \"identityIds\": [\r\n \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.ManagedIdentity/userAssignedIdentities/admsdknet9828Identity\"\r\n ]\r\n },\r\n \"properties\": {\r\n \"status\": \"Running\",\r\n \"totalRetryAttempts\": 0,\r\n \"operationInfo\": {\r\n \"retryAttempt\": 0,\r\n \"skipSucceededOnRetry\": false,\r\n \"startTime\": \"2019-03-28T02:25:50.286Z\",\r\n \"lastUpdatedTime\": \"2019-03-28T02:25:50.286Z\"\r\n },\r\n \"services\": [\r\n {\r\n \"name\": \"admsdknet9828Service\",\r\n \"targetSubscriptionId\": \"53012dcb-5039-4e96-8e6c-5d913da1cdb5\",\r\n \"targetLocation\": \"East US\",\r\n \"serviceUnits\": [\r\n {\r\n \"name\": \"admsdknet9828ServiceUnit\",\r\n \"targetResourceGroup\": \"admsdknet9828Service\",\r\n \"artifacts\": {},\r\n \"steps\": [\r\n {\r\n \"name\": \"Wait/admsdknet9828WaitStep.PreDeploy\",\r\n \"stepGroup\": \"First_Region\",\r\n \"status\": \"Running\",\r\n \"operationInfo\": {\r\n \"deploymentName\": \"\",\r\n \"startTime\": \"2019-03-28T02:25:55.977Z\",\r\n \"lastUpdatedTime\": \"2019-03-28T02:25:55.977Z\"\r\n },\r\n \"resourceOperations\": [],\r\n \"messages\": [\r\n {\r\n \"timestamp\": \"2019-03-28T02:25:55.8683693Z\",\r\n \"message\": \"Wait ending at '03/28/2019 02:30:55 UTC', with '5 minutes' remaining.\"\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"buildVersion\": \"1.0.0.0\",\r\n \"targetServiceTopologyId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet9828ServiceTopology\",\r\n \"artifactSourceId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/artifactSources/admsdknet9828ArtifactSource\",\r\n \"stepGroups\": [\r\n {\r\n \"name\": \"First_Region\",\r\n \"deploymentTargetId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet9828ServiceTopology/services/admsdknet9828Service/serviceUnits/admsdknet9828ServiceUnit\",\r\n \"preDeploymentSteps\": [\r\n {\r\n \"stepId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/steps/admsdknet9828WaitStep\"\r\n }\r\n ],\r\n \"postDeploymentSteps\": [],\r\n \"dependsOnStepGroups\": []\r\n }\r\n ],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"type\": \"Microsoft.DeploymentManager/rollouts\",\r\n \"apiVersion\": \"2018-09-01-preview\",\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/rollouts/admsdknet9828Rollout\",\r\n \"name\": \"admsdknet9828Rollout\",\r\n \"location\": \"Central US\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet9828/providers/Microsoft.DeploymentManager/rollouts/admsdknet9828Rollout?api-version=2018-09-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDk4MjgvcHJvdmlkZXJzL01pY3Jvc29mdC5EZXBsb3ltZW50TWFuYWdlci9yb2xsb3V0cy9hZG1zZGtuZXQ5ODI4Um9sbG91dD9hcGktdmVyc2lvbj0yMDE4LTA5LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "2f22f068-f9e1-4061-b152-dd03a8671d22" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:28:41 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/rollouts/admsdknet9828Rollout?api-version=2018-09-01-preview" + ], + "Retry-After": [ + "120" + ], + "x-ms-client-request-id": [ + "2f22f068-f9e1-4061-b152-dd03a8671d22" + ], + "x-ms-correlation-request-id": [ + "da39e989-7931-4f41-a557-a3ed4f6f916d" + ], + "x-ms-request-id": [ + "32252712-5c72-4812-afd8-f9b4963f33e8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "DENY" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11992" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T022842Z:da39e989-7931-4f41-a557-a3ed4f6f916d" + ], + "Content-Length": [ + "2262" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"identity\": {\r\n \"type\": \"userAssigned\",\r\n \"identityIds\": [\r\n \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.ManagedIdentity/userAssignedIdentities/admsdknet9828Identity\"\r\n ]\r\n },\r\n \"properties\": {\r\n \"status\": \"Canceled\",\r\n \"totalRetryAttempts\": 0,\r\n \"operationInfo\": {\r\n \"retryAttempt\": 0,\r\n \"skipSucceededOnRetry\": false,\r\n \"startTime\": \"2019-03-28T02:25:50.286Z\",\r\n \"endTime\": \"2019-03-28T02:28:02.419Z\",\r\n \"lastUpdatedTime\": \"2019-03-28T02:28:02.419Z\"\r\n },\r\n \"services\": [\r\n {\r\n \"name\": \"admsdknet9828Service\",\r\n \"targetSubscriptionId\": \"53012dcb-5039-4e96-8e6c-5d913da1cdb5\",\r\n \"targetLocation\": \"East US\",\r\n \"serviceUnits\": [\r\n {\r\n \"name\": \"admsdknet9828ServiceUnit\",\r\n \"targetResourceGroup\": \"admsdknet9828Service\",\r\n \"artifacts\": {},\r\n \"steps\": [\r\n {\r\n \"name\": \"Wait/admsdknet9828WaitStep.PreDeploy\",\r\n \"stepGroup\": \"First_Region\",\r\n \"status\": \"Canceled\",\r\n \"operationInfo\": {\r\n \"deploymentName\": \"\",\r\n \"startTime\": \"2019-03-28T02:25:55.977Z\",\r\n \"endTime\": \"2019-03-28T02:27:57.046Z\",\r\n \"lastUpdatedTime\": \"2019-03-28T02:27:57.046Z\"\r\n },\r\n \"resourceOperations\": [],\r\n \"messages\": []\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"buildVersion\": \"1.0.0.0\",\r\n \"targetServiceTopologyId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet9828ServiceTopology\",\r\n \"artifactSourceId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/artifactSources/admsdknet9828ArtifactSource\",\r\n \"stepGroups\": [\r\n {\r\n \"name\": \"First_Region\",\r\n \"deploymentTargetId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet9828ServiceTopology/services/admsdknet9828Service/serviceUnits/admsdknet9828ServiceUnit\",\r\n \"preDeploymentSteps\": [\r\n {\r\n \"stepId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/steps/admsdknet9828WaitStep\"\r\n }\r\n ],\r\n \"postDeploymentSteps\": [],\r\n \"dependsOnStepGroups\": []\r\n }\r\n ],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"type\": \"Microsoft.DeploymentManager/rollouts\",\r\n \"apiVersion\": \"2018-09-01-preview\",\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/rollouts/admsdknet9828Rollout\",\r\n \"name\": \"admsdknet9828Rollout\",\r\n \"location\": \"Central US\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet9828/providers/Microsoft.DeploymentManager/rollouts/admsdknet9828Rollout?api-version=2018-09-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDk4MjgvcHJvdmlkZXJzL01pY3Jvc29mdC5EZXBsb3ltZW50TWFuYWdlci9yb2xsb3V0cy9hZG1zZGtuZXQ5ODI4Um9sbG91dD9hcGktdmVyc2lvbj0yMDE4LTA5LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "0f7985e9-93a9-4b8c-b48f-459498a8abcf" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:28:42 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-failure-cause": [ + "gateway" + ], + "x-ms-request-id": [ + "4098dc5c-cd87-4674-a56c-61d65ad5a509" + ], + "x-ms-correlation-request-id": [ + "4098dc5c-cd87-4674-a56c-61d65ad5a509" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T022842Z:4098dc5c-cd87-4674-a56c-61d65ad5a509" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "174" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"The Resource 'Microsoft.DeploymentManager/rollouts/admsdknet9828Rollout' under resource group 'admsdknet9828' was not found.\"\r\n }\r\n}", + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet9828/providers/Microsoft.DeploymentManager/rollouts/admsdknet9828FailureRollout?api-version=2018-09-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDk4MjgvcHJvdmlkZXJzL01pY3Jvc29mdC5EZXBsb3ltZW50TWFuYWdlci9yb2xsb3V0cy9hZG1zZGtuZXQ5ODI4RmFpbHVyZVJvbGxvdXQ/YXBpLXZlcnNpb249MjAxOC0wOS0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"identity\": {\r\n \"type\": \"userAssigned\",\r\n \"identityIds\": [\r\n \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.ManagedIdentity/userAssignedIdentities/admsdknet9828Identity\"\r\n ]\r\n },\r\n \"properties\": {\r\n \"buildVersion\": \"1.0.0.0\",\r\n \"artifactSourceId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/artifactSources/admsdknet9828ArtifactSource\",\r\n \"targetServiceTopologyId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet9828ServiceTopology\",\r\n \"stepGroups\": [\r\n {\r\n \"name\": \"FirstRegion\",\r\n \"deploymentTargetId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet9828ServiceTopology/services/admsdknet9828Service/serviceUnits/admsdknet9828InvalidServiceUnit\"\r\n }\r\n ]\r\n },\r\n \"location\": \"Central US\"\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "7def0ef5-3832-4071-ada9-916b202e9e30" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "1085" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:26:45 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/operationResults/747e30d5-f7a5-43cd-aa69-b0b247dadaf2?api-version=2018-09-01-preview" + ], + "Retry-After": [ + "49" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/operationResults/747e30d5-f7a5-43cd-aa69-b0b247dadaf2?api-version=2018-09-01-preview" + ], + "x-ms-client-request-id": [ + "7def0ef5-3832-4071-ada9-916b202e9e30" + ], + "x-ms-correlation-request-id": [ + "f2422f96-5479-4f71-a92f-6edb232b251a" + ], + "x-ms-request-id": [ + "747e30d5-f7a5-43cd-aa69-b0b247dadaf2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "DENY" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T022646Z:f2422f96-5479-4f71-a92f-6edb232b251a" + ], + "Content-Length": [ + "1344" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"identity\": {\r\n \"type\": \"userAssigned\",\r\n \"identityIds\": [\r\n \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.ManagedIdentity/userAssignedIdentities/admsdknet9828Identity\"\r\n ]\r\n },\r\n \"properties\": {\r\n \"buildVersion\": \"1.0.0.0\",\r\n \"targetServiceTopologyId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet9828ServiceTopology\",\r\n \"artifactSourceId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/artifactSources/admsdknet9828ArtifactSource\",\r\n \"stepGroups\": [\r\n {\r\n \"name\": \"FirstRegion\",\r\n \"deploymentTargetId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet9828ServiceTopology/services/admsdknet9828Service/serviceUnits/admsdknet9828InvalidServiceUnit\",\r\n \"preDeploymentSteps\": [],\r\n \"postDeploymentSteps\": [],\r\n \"dependsOnStepGroups\": []\r\n }\r\n ],\r\n \"provisioningState\": \"Running\"\r\n },\r\n \"type\": \"Microsoft.DeploymentManager/rollouts\",\r\n \"apiVersion\": \"2018-09-01-preview\",\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/rollouts/admsdknet9828FailureRollout\",\r\n \"name\": \"admsdknet9828FailureRollout\",\r\n \"location\": \"Central US\"\r\n}", + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/operationResults/747e30d5-f7a5-43cd-aa69-b0b247dadaf2?api-version=2018-09-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlZ3JvdXBzL2FkbXNka25ldDk4MjgvcHJvdmlkZXJzL01pY3Jvc29mdC5EZXBsb3ltZW50TWFuYWdlci9vcGVyYXRpb25SZXN1bHRzLzc0N2UzMGQ1LWY3YTUtNDNjZC1hYTY5LWIwYjI0N2RhZGFmMj9hcGktdmVyc2lvbj0yMDE4LTA5LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:27:35 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/rollouts/admsdknet9828FailureRollout?api-version=2018-09-01-preview" + ], + "Retry-After": [ + "30" + ], + "x-ms-client-request-id": [ + "c53bf029-9cca-4a84-a346-c34958a3e4b3" + ], + "x-ms-correlation-request-id": [ + "3305f281-b75f-40f5-9f06-834be8f0ecec" + ], + "x-ms-request-id": [ + "36b55aca-0a9d-49a9-9869-d62aa93ea7a9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "DENY" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11995" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T022736Z:3305f281-b75f-40f5-9f06-834be8f0ecec" + ], + "Content-Length": [ + "106" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2019-03-28T02:26:44.823Z\",\r\n \"endTime\": \"2019-03-28T02:26:48.334Z\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet9828/providers/Microsoft.DeploymentManager/rollouts/admsdknet9828FailureRollout?api-version=2018-09-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDk4MjgvcHJvdmlkZXJzL01pY3Jvc29mdC5EZXBsb3ltZW50TWFuYWdlci9yb2xsb3V0cy9hZG1zZGtuZXQ5ODI4RmFpbHVyZVJvbGxvdXQ/YXBpLXZlcnNpb249MjAxOC0wOS0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:27:36 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/rollouts/admsdknet9828FailureRollout?api-version=2018-09-01-preview" + ], + "Retry-After": [ + "120" + ], + "x-ms-client-request-id": [ + "b0fe95cd-7c95-4600-8104-73d4dc9d4d17" + ], + "x-ms-correlation-request-id": [ + "018def1b-3a86-41cb-8ac0-2c9affaddeb4" + ], + "x-ms-request-id": [ + "8b2f6ce3-1a9a-4695-8a0a-fbd74ab32d0a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "DENY" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11994" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T022737Z:018def1b-3a86-41cb-8ac0-2c9affaddeb4" + ], + "Content-Length": [ + "2578" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"identity\": {\r\n \"type\": \"userAssigned\",\r\n \"identityIds\": [\r\n \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.ManagedIdentity/userAssignedIdentities/admsdknet9828Identity\"\r\n ]\r\n },\r\n \"properties\": {\r\n \"status\": \"Failed\",\r\n \"totalRetryAttempts\": 0,\r\n \"operationInfo\": {\r\n \"retryAttempt\": 0,\r\n \"skipSucceededOnRetry\": false,\r\n \"startTime\": \"2019-03-28T02:26:47.803Z\",\r\n \"endTime\": \"2019-03-28T02:26:54.229Z\",\r\n \"lastUpdatedTime\": \"2019-03-28T02:26:54.229Z\",\r\n \"error\": {\r\n \"message\": \"Rollout failed. See individual resource's 'StatusMessage' property for specific error information. \"\r\n }\r\n },\r\n \"services\": [\r\n {\r\n \"name\": \"admsdknet9828Service\",\r\n \"targetSubscriptionId\": \"53012dcb-5039-4e96-8e6c-5d913da1cdb5\",\r\n \"targetLocation\": \"East US\",\r\n \"serviceUnits\": [\r\n {\r\n \"name\": \"admsdknet9828InvalidServiceUnit\",\r\n \"targetResourceGroup\": \"admsdknet9828\",\r\n \"deploymentMode\": \"Incremental\",\r\n \"artifacts\": {},\r\n \"steps\": [\r\n {\r\n \"name\": \"Deploy\",\r\n \"stepGroup\": \"FirstRegion\",\r\n \"status\": \"Failed\",\r\n \"operationInfo\": {\r\n \"deploymentName\": \"3BFC62AB942047B49C61C1363828CE2B0admsdknet9828InvalidServiceUni\",\r\n \"startTime\": \"2019-03-28T02:26:54.088Z\",\r\n \"endTime\": \"2019-03-28T02:26:54.088Z\",\r\n \"lastUpdatedTime\": \"2019-03-28T02:26:54.088Z\",\r\n \"error\": {\r\n \"code\": \"ActionExecutionFailed\",\r\n \"message\": \"ResourceGroup 'admsdknet9828''s location 'East US' declared in the Service Model does not match with actual ResourceGroup location 'centralus' on Azure. Update your Service Model with the actual resource group location. \"\r\n }\r\n },\r\n \"resourceOperations\": [],\r\n \"messages\": []\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"buildVersion\": \"1.0.0.0\",\r\n \"targetServiceTopologyId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet9828ServiceTopology\",\r\n \"artifactSourceId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/artifactSources/admsdknet9828ArtifactSource\",\r\n \"stepGroups\": [\r\n {\r\n \"name\": \"FirstRegion\",\r\n \"deploymentTargetId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet9828ServiceTopology/services/admsdknet9828Service/serviceUnits/admsdknet9828InvalidServiceUnit\",\r\n \"preDeploymentSteps\": [],\r\n \"postDeploymentSteps\": [],\r\n \"dependsOnStepGroups\": []\r\n }\r\n ],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"type\": \"Microsoft.DeploymentManager/rollouts\",\r\n \"apiVersion\": \"2018-09-01-preview\",\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/rollouts/admsdknet9828FailureRollout\",\r\n \"name\": \"admsdknet9828FailureRollout\",\r\n \"location\": \"Central US\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet9828/providers/Microsoft.DeploymentManager/rollouts/admsdknet9828FailureRollout?api-version=2018-09-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDk4MjgvcHJvdmlkZXJzL01pY3Jvc29mdC5EZXBsb3ltZW50TWFuYWdlci9yb2xsb3V0cy9hZG1zZGtuZXQ5ODI4RmFpbHVyZVJvbGxvdXQ/YXBpLXZlcnNpb249MjAxOC0wOS0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "c7070fd5-d0ae-4429-b612-cb8b52e68ac6" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:29:44 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/rollouts/admsdknet9828FailureRollout?api-version=2018-09-01-preview" + ], + "Retry-After": [ + "120" + ], + "x-ms-client-request-id": [ + "c7070fd5-d0ae-4429-b612-cb8b52e68ac6" + ], + "x-ms-correlation-request-id": [ + "ff9619ec-4fa2-4067-b014-0ab309bc8e98" + ], + "x-ms-request-id": [ + "b454694d-5dc0-42f5-930e-233a034e5fb8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "DENY" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T022944Z:ff9619ec-4fa2-4067-b014-0ab309bc8e98" + ], + "Content-Length": [ + "2578" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"identity\": {\r\n \"type\": \"userAssigned\",\r\n \"identityIds\": [\r\n \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.ManagedIdentity/userAssignedIdentities/admsdknet9828Identity\"\r\n ]\r\n },\r\n \"properties\": {\r\n \"status\": \"Failed\",\r\n \"totalRetryAttempts\": 0,\r\n \"operationInfo\": {\r\n \"retryAttempt\": 0,\r\n \"skipSucceededOnRetry\": false,\r\n \"startTime\": \"2019-03-28T02:26:47.803Z\",\r\n \"endTime\": \"2019-03-28T02:26:54.229Z\",\r\n \"lastUpdatedTime\": \"2019-03-28T02:26:54.229Z\",\r\n \"error\": {\r\n \"message\": \"Rollout failed. See individual resource's 'StatusMessage' property for specific error information. \"\r\n }\r\n },\r\n \"services\": [\r\n {\r\n \"name\": \"admsdknet9828Service\",\r\n \"targetSubscriptionId\": \"53012dcb-5039-4e96-8e6c-5d913da1cdb5\",\r\n \"targetLocation\": \"East US\",\r\n \"serviceUnits\": [\r\n {\r\n \"name\": \"admsdknet9828InvalidServiceUnit\",\r\n \"targetResourceGroup\": \"admsdknet9828\",\r\n \"deploymentMode\": \"Incremental\",\r\n \"artifacts\": {},\r\n \"steps\": [\r\n {\r\n \"name\": \"Deploy\",\r\n \"stepGroup\": \"FirstRegion\",\r\n \"status\": \"Failed\",\r\n \"operationInfo\": {\r\n \"deploymentName\": \"3BFC62AB942047B49C61C1363828CE2B0admsdknet9828InvalidServiceUni\",\r\n \"startTime\": \"2019-03-28T02:26:54.088Z\",\r\n \"endTime\": \"2019-03-28T02:26:54.088Z\",\r\n \"lastUpdatedTime\": \"2019-03-28T02:26:54.088Z\",\r\n \"error\": {\r\n \"code\": \"ActionExecutionFailed\",\r\n \"message\": \"ResourceGroup 'admsdknet9828''s location 'East US' declared in the Service Model does not match with actual ResourceGroup location 'centralus' on Azure. Update your Service Model with the actual resource group location. \"\r\n }\r\n },\r\n \"resourceOperations\": [],\r\n \"messages\": []\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"buildVersion\": \"1.0.0.0\",\r\n \"targetServiceTopologyId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet9828ServiceTopology\",\r\n \"artifactSourceId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/artifactSources/admsdknet9828ArtifactSource\",\r\n \"stepGroups\": [\r\n {\r\n \"name\": \"FirstRegion\",\r\n \"deploymentTargetId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet9828ServiceTopology/services/admsdknet9828Service/serviceUnits/admsdknet9828InvalidServiceUnit\",\r\n \"preDeploymentSteps\": [],\r\n \"postDeploymentSteps\": [],\r\n \"dependsOnStepGroups\": []\r\n }\r\n ],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"type\": \"Microsoft.DeploymentManager/rollouts\",\r\n \"apiVersion\": \"2018-09-01-preview\",\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/rollouts/admsdknet9828FailureRollout\",\r\n \"name\": \"admsdknet9828FailureRollout\",\r\n \"location\": \"Central US\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet9828/providers/Microsoft.DeploymentManager/rollouts/admsdknet9828Rollout/cancel?api-version=2018-09-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDk4MjgvcHJvdmlkZXJzL01pY3Jvc29mdC5EZXBsb3ltZW50TWFuYWdlci9yb2xsb3V0cy9hZG1zZGtuZXQ5ODI4Um9sbG91dC9jYW5jZWw/YXBpLXZlcnNpb249MjAxOC0wOS0wMS1wcmV2aWV3", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "bd81cf47-945c-471f-ba0e-7fefadd566b1" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:27:40 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/rollouts/admsdknet9828Rollout?api-version=2018-09-01-preview" + ], + "x-ms-client-request-id": [ + "bd81cf47-945c-471f-ba0e-7fefadd566b1" + ], + "x-ms-correlation-request-id": [ + "4416c200-463e-482b-a571-7de2ac516389" + ], + "x-ms-request-id": [ + "23a15294-b970-4c82-b720-056b639c56bc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "DENY" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T022741Z:4416c200-463e-482b-a571-7de2ac516389" + ], + "Content-Length": [ + "1654" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"identity\": {\r\n \"type\": \"userAssigned\",\r\n \"identityIds\": [\r\n \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.ManagedIdentity/userAssignedIdentities/admsdknet9828Identity\"\r\n ]\r\n },\r\n \"properties\": {\r\n \"status\": \"Canceling\",\r\n \"operationInfo\": {\r\n \"retryAttempt\": 0,\r\n \"skipSucceededOnRetry\": false,\r\n \"startTime\": \"2019-03-28T02:25:50.286Z\",\r\n \"lastUpdatedTime\": \"2019-03-28T02:25:50.286Z\"\r\n },\r\n \"buildVersion\": \"1.0.0.0\",\r\n \"targetServiceTopologyId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet9828ServiceTopology\",\r\n \"artifactSourceId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/artifactSources/admsdknet9828ArtifactSource\",\r\n \"stepGroups\": [\r\n {\r\n \"name\": \"First_Region\",\r\n \"deploymentTargetId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet9828ServiceTopology/services/admsdknet9828Service/serviceUnits/admsdknet9828ServiceUnit\",\r\n \"preDeploymentSteps\": [\r\n {\r\n \"stepId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/steps/admsdknet9828WaitStep\"\r\n }\r\n ],\r\n \"postDeploymentSteps\": [],\r\n \"dependsOnStepGroups\": []\r\n }\r\n ],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"type\": \"Microsoft.DeploymentManager/rollouts\",\r\n \"apiVersion\": \"2018-09-01-preview\",\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/rollouts/admsdknet9828Rollout\",\r\n \"name\": \"admsdknet9828Rollout\",\r\n \"location\": \"Central US\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet9828/providers/Microsoft.DeploymentManager/rollouts/admsdknet9828Rollout?api-version=2018-09-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDk4MjgvcHJvdmlkZXJzL01pY3Jvc29mdC5EZXBsb3ltZW50TWFuYWdlci9yb2xsb3V0cy9hZG1zZGtuZXQ5ODI4Um9sbG91dD9hcGktdmVyc2lvbj0yMDE4LTA5LTAxLXByZXZpZXc=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "167f30a1-f5f0-4eca-84d6-e34a04ea8b42" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:28:42 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-client-request-id": [ + "167f30a1-f5f0-4eca-84d6-e34a04ea8b42" + ], + "x-ms-correlation-request-id": [ + "191fdabc-314b-4600-9e9c-1f887a027403" + ], + "x-ms-request-id": [ + "7d96a841-9267-4b77-b04c-e39c5afafba9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "DENY" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14999" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T022842Z:191fdabc-314b-4600-9e9c-1f887a027403" + ], + "Content-Length": [ + "4" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "null", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet9828/providers/Microsoft.DeploymentManager/rollouts/admsdknet9828FailureRollout/restart?api-version=2018-09-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDk4MjgvcHJvdmlkZXJzL01pY3Jvc29mdC5EZXBsb3ltZW50TWFuYWdlci9yb2xsb3V0cy9hZG1zZGtuZXQ5ODI4RmFpbHVyZVJvbGxvdXQvcmVzdGFydD9hcGktdmVyc2lvbj0yMDE4LTA5LTAxLXByZXZpZXc=", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "a791d0fa-ca10-4008-ad63-837a6c16eafa" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:29:47 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/rollouts/admsdknet9828FailureRollout?api-version=2018-09-01-preview" + ], + "Retry-After": [ + "60" + ], + "x-ms-client-request-id": [ + "a791d0fa-ca10-4008-ad63-837a6c16eafa" + ], + "x-ms-correlation-request-id": [ + "d92ef1d4-a7a4-4a44-bcbb-20cbb849db9d" + ], + "x-ms-request-id": [ + "4fd4b575-4017-4549-bece-4034685978ed" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "DENY" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T022947Z:d92ef1d4-a7a4-4a44-bcbb-20cbb849db9d" + ], + "Content-Length": [ + "1536" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"identity\": {\r\n \"type\": \"userAssigned\",\r\n \"identityIds\": [\r\n \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.ManagedIdentity/userAssignedIdentities/admsdknet9828Identity\"\r\n ]\r\n },\r\n \"properties\": {\r\n \"status\": \"Running\",\r\n \"totalRetryAttempts\": 1,\r\n \"operationInfo\": {\r\n \"retryAttempt\": 1,\r\n \"skipSucceededOnRetry\": false,\r\n \"startTime\": \"2019-03-28T02:29:45.915Z\",\r\n \"lastUpdatedTime\": \"2019-03-28T02:29:45.915Z\"\r\n },\r\n \"buildVersion\": \"1.0.0.0\",\r\n \"targetServiceTopologyId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet9828ServiceTopology\",\r\n \"artifactSourceId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/artifactSources/admsdknet9828ArtifactSource\",\r\n \"stepGroups\": [\r\n {\r\n \"name\": \"FirstRegion\",\r\n \"deploymentTargetId\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet9828ServiceTopology/services/admsdknet9828Service/serviceUnits/admsdknet9828InvalidServiceUnit\",\r\n \"preDeploymentSteps\": [],\r\n \"postDeploymentSteps\": [],\r\n \"dependsOnStepGroups\": []\r\n }\r\n ],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"type\": \"Microsoft.DeploymentManager/rollouts\",\r\n \"apiVersion\": \"2018-09-01-preview\",\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/rollouts/admsdknet9828FailureRollout\",\r\n \"name\": \"admsdknet9828FailureRollout\",\r\n \"location\": \"Central US\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet9828/providers/Microsoft.DeploymentManager/steps/admsdknet9828WaitStep?api-version=2018-09-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDk4MjgvcHJvdmlkZXJzL01pY3Jvc29mdC5EZXBsb3ltZW50TWFuYWdlci9zdGVwcy9hZG1zZGtuZXQ5ODI4V2FpdFN0ZXA/YXBpLXZlcnNpb249MjAxOC0wOS0wMS1wcmV2aWV3", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "3cb8db16-f780-40a5-97c9-ded3bfe4f6ea" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:29:58 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-client-request-id": [ + "3cb8db16-f780-40a5-97c9-ded3bfe4f6ea" + ], + "x-ms-correlation-request-id": [ + "d981d7d5-1e79-40cb-94a7-84e4f138ce00" + ], + "x-ms-request-id": [ + "ec1ba97a-d1a7-42d6-bcd9-a2599b4dc05d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "DENY" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14999" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T022958Z:d981d7d5-1e79-40cb-94a7-84e4f138ce00" + ], + "Content-Length": [ + "4" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "null", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/operationResults/1dacf633-b604-4577-92a7-be7c7dc78650?api-version=2018-09-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlZ3JvdXBzL2FkbXNka25ldDk4MjgvcHJvdmlkZXJzL01pY3Jvc29mdC5EZXBsb3ltZW50TWFuYWdlci9vcGVyYXRpb25SZXN1bHRzLzFkYWNmNjMzLWI2MDQtNDU3Ny05MmE3LWJlN2M3ZGM3ODY1MD9hcGktdmVyc2lvbj0yMDE4LTA5LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:31:11 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet9828ServiceTopology/services/admsdknet9828Service/serviceUnits/admsdknet9828ServiceUnit?api-version=2018-09-01-preview" + ], + "Retry-After": [ + "30" + ], + "x-ms-client-request-id": [ + "7bcbba98-c49c-46f7-b4ef-722687eb89bf" + ], + "x-ms-correlation-request-id": [ + "28d84191-20cc-4b5a-92a6-712b34103afc" + ], + "x-ms-request-id": [ + "7c37ea6c-26d4-448f-a9e4-f15a212ebdf2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "DENY" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11997" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T023111Z:28d84191-20cc-4b5a-92a6-712b34103afc" + ], + "Content-Length": [ + "106" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2019-03-28T02:30:16.924Z\",\r\n \"endTime\": \"2019-03-28T02:30:20.101Z\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet9828/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet9828ServiceTopology/services/admsdknet9828Service/serviceUnits/admsdknet9828ServiceUnit?api-version=2018-09-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDk4MjgvcHJvdmlkZXJzL01pY3Jvc29mdC5EZXBsb3ltZW50TWFuYWdlci9zZXJ2aWNlVG9wb2xvZ2llcy9hZG1zZGtuZXQ5ODI4U2VydmljZVRvcG9sb2d5L3NlcnZpY2VzL2FkbXNka25ldDk4MjhTZXJ2aWNlL3NlcnZpY2VVbml0cy9hZG1zZGtuZXQ5ODI4U2VydmljZVVuaXQ/YXBpLXZlcnNpb249MjAxOC0wOS0wMS1wcmV2aWV3", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "0839ca03-d328-4c80-b17e-05409b39da3a" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:31:13 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-client-request-id": [ + "0839ca03-d328-4c80-b17e-05409b39da3a" + ], + "x-ms-correlation-request-id": [ + "bfebf971-5606-4391-8f83-71ec0f2ebe1b" + ], + "x-ms-request-id": [ + "ea46822e-35a3-49cc-ada6-98fdff6e7555" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "DENY" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14999" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T023114Z:bfebf971-5606-4391-8f83-71ec0f2ebe1b" + ], + "Content-Length": [ + "4" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "null", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet9828/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet9828ServiceTopology/services/admsdknet9828Service/serviceUnits/admsdknet9828InvalidServiceUnit?api-version=2018-09-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDk4MjgvcHJvdmlkZXJzL01pY3Jvc29mdC5EZXBsb3ltZW50TWFuYWdlci9zZXJ2aWNlVG9wb2xvZ2llcy9hZG1zZGtuZXQ5ODI4U2VydmljZVRvcG9sb2d5L3NlcnZpY2VzL2FkbXNka25ldDk4MjhTZXJ2aWNlL3NlcnZpY2VVbml0cy9hZG1zZGtuZXQ5ODI4SW52YWxpZFNlcnZpY2VVbml0P2FwaS12ZXJzaW9uPTIwMTgtMDktMDEtcHJldmlldw==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "cf417b09-6ac4-44d9-9ad0-3392b895d3d5" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:31:15 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-client-request-id": [ + "cf417b09-6ac4-44d9-9ad0-3392b895d3d5" + ], + "x-ms-correlation-request-id": [ + "c1633eb4-b03e-4639-bed7-c1f6007ba4fa" + ], + "x-ms-request-id": [ + "c7c94a12-4047-4037-a0a0-1449a19943d6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "DENY" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14998" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T023116Z:c1633eb4-b03e-4639-bed7-c1f6007ba4fa" + ], + "Content-Length": [ + "4" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "null", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet9828/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet9828ServiceTopology/services/admsdknet9828Service?api-version=2018-09-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDk4MjgvcHJvdmlkZXJzL01pY3Jvc29mdC5EZXBsb3ltZW50TWFuYWdlci9zZXJ2aWNlVG9wb2xvZ2llcy9hZG1zZGtuZXQ5ODI4U2VydmljZVRvcG9sb2d5L3NlcnZpY2VzL2FkbXNka25ldDk4MjhTZXJ2aWNlP2FwaS12ZXJzaW9uPTIwMTgtMDktMDEtcHJldmlldw==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "bca14bc4-54fc-4305-a03b-531f5c2591a1" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:31:19 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-client-request-id": [ + "bca14bc4-54fc-4305-a03b-531f5c2591a1" + ], + "x-ms-correlation-request-id": [ + "d43af689-3dcc-476e-884e-e68ed1c8d88d" + ], + "x-ms-request-id": [ + "ea21d75c-24bd-4b80-8f48-db8ce2b58782" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "DENY" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14997" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T023120Z:d43af689-3dcc-476e-884e-e68ed1c8d88d" + ], + "Content-Length": [ + "4" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "null", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet9828/providers/Microsoft.DeploymentManager/artifactSources/admsdknet9828UpdatedArtifactSource?api-version=2018-09-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDk4MjgvcHJvdmlkZXJzL01pY3Jvc29mdC5EZXBsb3ltZW50TWFuYWdlci9hcnRpZmFjdFNvdXJjZXMvYWRtc2RrbmV0OTgyOFVwZGF0ZWRBcnRpZmFjdFNvdXJjZT9hcGktdmVyc2lvbj0yMDE4LTA5LTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + //[SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="This is the secret for a resource that has since been deleted.")] + "RequestBody": "{\r\n \"properties\": {\r\n \"sourceType\": \"AzureStorage\",\r\n \"artifactRoot\": \"Tests\\\\ArtifactRoot\",\r\n \"authentication\": {\r\n \"type\": \"Sas\",\r\n \"properties\": {\r\n \"sasUri\": \"https://admsdknet9828stgacct.blob.core.windows.net/artifacts?sv=2017-04-17&sr=c&sig=WmD%2BUVgLThgwqOWcUbKBvHeWxxAuoQeDwQmX4sXsaEw%3D&st=2019-03-27T02%3A31%3A20Z&se=2019-03-30T02%3A31%3A20Z&sp=rl\"\r\n }\r\n }\r\n },\r\n \"location\": \"Central US\"\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "691ed7d0-59eb-4da6-9e1b-a8638b6b8ffc" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "438" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:31:40 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-client-request-id": [ + "691ed7d0-59eb-4da6-9e1b-a8638b6b8ffc" + ], + "x-ms-correlation-request-id": [ + "8cb05f81-9779-4aef-85c6-b1a4e42c9fc9" + ], + "x-ms-request-id": [ + "574d0c63-772e-47d5-a28f-a572c3e29ac0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "DENY" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T023141Z:8cb05f81-9779-4aef-85c6-b1a4e42c9fc9" + ], + "Content-Length": [ + "698" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + //[SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="This is the secret for a resource that has since been deleted.")] + "ResponseBody": "{\r\n \"properties\": {\r\n \"sourceType\": \"AzureStorage\",\r\n \"artifactRoot\": \"Tests\\\\ArtifactRoot\",\r\n \"authentication\": {\r\n \"type\": \"Sas\",\r\n \"properties\": {\r\n \"sasUri\": \"https://admsdknet9828stgacct.blob.core.windows.net/artifacts?sv=2017-04-17&sr=c&sig=WmD%2BUVgLThgwqOWcUbKBvHeWxxAuoQeDwQmX4sXsaEw%3D&st=2019-03-27T02%3A31%3A20Z&se=2019-03-30T02%3A31%3A20Z&sp=rl\"\r\n }\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"type\": \"Microsoft.DeploymentManager/artifactSources\",\r\n \"apiVersion\": \"2018-09-01-preview\",\r\n \"id\": \"/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828/providers/Microsoft.DeploymentManager/artifactSources/admsdknet9828UpdatedArtifactSource\",\r\n \"name\": \"admsdknet9828UpdatedArtifactSource\",\r\n \"location\": \"Central US\"\r\n}", + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet9828/providers/Microsoft.DeploymentManager/serviceTopologies/admsdknet9828ServiceTopology?api-version=2018-09-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDk4MjgvcHJvdmlkZXJzL01pY3Jvc29mdC5EZXBsb3ltZW50TWFuYWdlci9zZXJ2aWNlVG9wb2xvZ2llcy9hZG1zZGtuZXQ5ODI4U2VydmljZVRvcG9sb2d5P2FwaS12ZXJzaW9uPTIwMTgtMDktMDEtcHJldmlldw==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "ec44a5b3-e8c5-4072-97ea-fc8ba4219596" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:31:43 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-client-request-id": [ + "ec44a5b3-e8c5-4072-97ea-fc8ba4219596" + ], + "x-ms-correlation-request-id": [ + "ac02ab8a-8671-43cb-b57f-9a3f44f45f17" + ], + "x-ms-request-id": [ + "449a13f7-5ac0-4c46-ba86-a332e46faeea" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "DENY" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14999" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T023143Z:ac02ab8a-8671-43cb-b57f-9a3f44f45f17" + ], + "Content-Length": [ + "4" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "null", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet9828/providers/Microsoft.DeploymentManager/artifactSources/admsdknet9828ArtifactSource?api-version=2018-09-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDk4MjgvcHJvdmlkZXJzL01pY3Jvc29mdC5EZXBsb3ltZW50TWFuYWdlci9hcnRpZmFjdFNvdXJjZXMvYWRtc2RrbmV0OTgyOEFydGlmYWN0U291cmNlP2FwaS12ZXJzaW9uPTIwMTgtMDktMDEtcHJldmlldw==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "ffff3f93-f9e4-4c61-9efb-990f9006ee21" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:32:03 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-client-request-id": [ + "ffff3f93-f9e4-4c61-9efb-990f9006ee21" + ], + "x-ms-correlation-request-id": [ + "8ef68eee-0a6b-4f96-aae8-a835acd62928" + ], + "x-ms-request-id": [ + "1d668bef-2ea2-4ece-8e9a-81d38e6116f6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "DENY" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14998" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T023203Z:8ef68eee-0a6b-4f96-aae8-a835acd62928" + ], + "Content-Length": [ + "4" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "null", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet9828/providers/Microsoft.DeploymentManager/artifactSources/admsdknet9828UpdatedArtifactSource?api-version=2018-09-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDk4MjgvcHJvdmlkZXJzL01pY3Jvc29mdC5EZXBsb3ltZW50TWFuYWdlci9hcnRpZmFjdFNvdXJjZXMvYWRtc2RrbmV0OTgyOFVwZGF0ZWRBcnRpZmFjdFNvdXJjZT9hcGktdmVyc2lvbj0yMDE4LTA5LTAxLXByZXZpZXc=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "aad32237-d49b-42ce-8af4-6a21ce127937" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:32:04 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-client-request-id": [ + "aad32237-d49b-42ce-8af4-6a21ce127937" + ], + "x-ms-correlation-request-id": [ + "0e50e6bf-ee78-4fb2-91be-e92f228eb09c" + ], + "x-ms-request-id": [ + "ba7170f2-6488-4fd0-8082-7a47ea604440" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "DENY" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14997" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T023204Z:0e50e6bf-ee78-4fb2-91be-e92f228eb09c" + ], + "Content-Length": [ + "4" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "null", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourceGroups/admsdknet9828/providers/Microsoft.DeploymentManager/artifactSources/admsdknet9828ArtifactSource?api-version=2018-09-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlR3JvdXBzL2FkbXNka25ldDk4MjgvcHJvdmlkZXJzL01pY3Jvc29mdC5EZXBsb3ltZW50TWFuYWdlci9hcnRpZmFjdFNvdXJjZXMvYWRtc2RrbmV0OTgyOEFydGlmYWN0U291cmNlP2FwaS12ZXJzaW9uPTIwMTgtMDktMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "327f8876-e111-4383-839e-0d7bd0f6e8cb" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.DeploymentManager.AzureDeploymentManagerClient/0.9.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:32:04 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-failure-cause": [ + "gateway" + ], + "x-ms-request-id": [ + "4748637f-b05c-4aa6-9a87-fa04f663c313" + ], + "x-ms-correlation-request-id": [ + "4748637f-b05c-4aa6-9a87-fa04f663c313" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T023205Z:4748637f-b05c-4aa6-9a87-fa04f663c313" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "188" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"The Resource 'Microsoft.DeploymentManager/artifactSources/admsdknet9828ArtifactSource' under resource group 'admsdknet9828' was not found.\"\r\n }\r\n}", + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/resourcegroups/admsdknet9828?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L3Jlc291cmNlZ3JvdXBzL2FkbXNka25ldDk4Mjg/YXBpLXZlcnNpb249MjAxNS0xMS0wMQ==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "e3a4b1f2-e25b-4b44-a59b-b82f0c4bbd4b" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:32:05 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BRE1TREtORVQ5ODI4LUNFTlRSQUxVUyIsImpvYkxvY2F0aW9uIjoiY2VudHJhbHVzIn0?api-version=2015-11-01" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14996" + ], + "x-ms-request-id": [ + "9dadea8b-ba62-4242-a2b0-9182b294c8dc" + ], + "x-ms-correlation-request-id": [ + "9dadea8b-ba62-4242-a2b0-9182b294c8dc" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T023205Z:9dadea8b-ba62-4242-a2b0-9182b294c8dc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BRE1TREtORVQ5ODI4LUNFTlRSQUxVUyIsImpvYkxvY2F0aW9uIjoiY2VudHJhbHVzIn0?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFCUkUxVFJFdE9SVlE1T0RJNExVTkZUbFJTUVV4VlV5SXNJbXB2WWt4dlkyRjBhVzl1SWpvaVkyVnVkSEpoYkhWekluMD9hcGktdmVyc2lvbj0yMDE1LTExLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:32:20 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BRE1TREtORVQ5ODI4LUNFTlRSQUxVUyIsImpvYkxvY2F0aW9uIjoiY2VudHJhbHVzIn0?api-version=2015-11-01" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11996" + ], + "x-ms-request-id": [ + "99b449e0-2dda-49c7-87ed-93e5e3ef8018" + ], + "x-ms-correlation-request-id": [ + "99b449e0-2dda-49c7-87ed-93e5e3ef8018" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T023220Z:99b449e0-2dda-49c7-87ed-93e5e3ef8018" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BRE1TREtORVQ5ODI4LUNFTlRSQUxVUyIsImpvYkxvY2F0aW9uIjoiY2VudHJhbHVzIn0?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFCUkUxVFJFdE9SVlE1T0RJNExVTkZUbFJTUVV4VlV5SXNJbXB2WWt4dlkyRjBhVzl1SWpvaVkyVnVkSEpoYkhWekluMD9hcGktdmVyc2lvbj0yMDE1LTExLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:32:35 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BRE1TREtORVQ5ODI4LUNFTlRSQUxVUyIsImpvYkxvY2F0aW9uIjoiY2VudHJhbHVzIn0?api-version=2015-11-01" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11995" + ], + "x-ms-request-id": [ + "f8d8a75a-7d31-448a-840d-e66fc0da45a1" + ], + "x-ms-correlation-request-id": [ + "f8d8a75a-7d31-448a-840d-e66fc0da45a1" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T023235Z:f8d8a75a-7d31-448a-840d-e66fc0da45a1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BRE1TREtORVQ5ODI4LUNFTlRSQUxVUyIsImpvYkxvY2F0aW9uIjoiY2VudHJhbHVzIn0?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFCUkUxVFJFdE9SVlE1T0RJNExVTkZUbFJTUVV4VlV5SXNJbXB2WWt4dlkyRjBhVzl1SWpvaVkyVnVkSEpoYkhWekluMD9hcGktdmVyc2lvbj0yMDE1LTExLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:32:51 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BRE1TREtORVQ5ODI4LUNFTlRSQUxVUyIsImpvYkxvY2F0aW9uIjoiY2VudHJhbHVzIn0?api-version=2015-11-01" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11994" + ], + "x-ms-request-id": [ + "1c7353c1-d905-4cc7-9eb5-3eb4adef0be8" + ], + "x-ms-correlation-request-id": [ + "1c7353c1-d905-4cc7-9eb5-3eb4adef0be8" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T023251Z:1c7353c1-d905-4cc7-9eb5-3eb4adef0be8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BRE1TREtORVQ5ODI4LUNFTlRSQUxVUyIsImpvYkxvY2F0aW9uIjoiY2VudHJhbHVzIn0?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFCUkUxVFJFdE9SVlE1T0RJNExVTkZUbFJTUVV4VlV5SXNJbXB2WWt4dlkyRjBhVzl1SWpvaVkyVnVkSEpoYkhWekluMD9hcGktdmVyc2lvbj0yMDE1LTExLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:33:06 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BRE1TREtORVQ5ODI4LUNFTlRSQUxVUyIsImpvYkxvY2F0aW9uIjoiY2VudHJhbHVzIn0?api-version=2015-11-01" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11993" + ], + "x-ms-request-id": [ + "2e7dce44-d967-46cb-81cb-169c1ba955b2" + ], + "x-ms-correlation-request-id": [ + "2e7dce44-d967-46cb-81cb-169c1ba955b2" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T023306Z:2e7dce44-d967-46cb-81cb-169c1ba955b2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BRE1TREtORVQ5ODI4LUNFTlRSQUxVUyIsImpvYkxvY2F0aW9uIjoiY2VudHJhbHVzIn0?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFCUkUxVFJFdE9SVlE1T0RJNExVTkZUbFJTUVV4VlV5SXNJbXB2WWt4dlkyRjBhVzl1SWpvaVkyVnVkSEpoYkhWekluMD9hcGktdmVyc2lvbj0yMDE1LTExLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:33:21 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BRE1TREtORVQ5ODI4LUNFTlRSQUxVUyIsImpvYkxvY2F0aW9uIjoiY2VudHJhbHVzIn0?api-version=2015-11-01" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11992" + ], + "x-ms-request-id": [ + "6e533557-a655-4df1-b729-3e57f228d813" + ], + "x-ms-correlation-request-id": [ + "6e533557-a655-4df1-b729-3e57f228d813" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T023321Z:6e533557-a655-4df1-b729-3e57f228d813" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BRE1TREtORVQ5ODI4LUNFTlRSQUxVUyIsImpvYkxvY2F0aW9uIjoiY2VudHJhbHVzIn0?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFCUkUxVFJFdE9SVlE1T0RJNExVTkZUbFJTUVV4VlV5SXNJbXB2WWt4dlkyRjBhVzl1SWpvaVkyVnVkSEpoYkhWekluMD9hcGktdmVyc2lvbj0yMDE1LTExLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:33:35 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BRE1TREtORVQ5ODI4LUNFTlRSQUxVUyIsImpvYkxvY2F0aW9uIjoiY2VudHJhbHVzIn0?api-version=2015-11-01" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11991" + ], + "x-ms-request-id": [ + "8dfdbce7-8a41-4726-8f49-accd9673bf20" + ], + "x-ms-correlation-request-id": [ + "8dfdbce7-8a41-4726-8f49-accd9673bf20" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T023336Z:8dfdbce7-8a41-4726-8f49-accd9673bf20" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BRE1TREtORVQ5ODI4LUNFTlRSQUxVUyIsImpvYkxvY2F0aW9uIjoiY2VudHJhbHVzIn0?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFCUkUxVFJFdE9SVlE1T0RJNExVTkZUbFJTUVV4VlV5SXNJbXB2WWt4dlkyRjBhVzl1SWpvaVkyVnVkSEpoYkhWekluMD9hcGktdmVyc2lvbj0yMDE1LTExLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:33:50 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11990" + ], + "x-ms-request-id": [ + "98afd259-1bab-4eaa-88bc-9ea74b14e290" + ], + "x-ms-correlation-request-id": [ + "98afd259-1bab-4eaa-88bc-9ea74b14e290" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T023351Z:98afd259-1bab-4eaa-88bc-9ea74b14e290" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/53012dcb-5039-4e96-8e6c-5d913da1cdb5/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BRE1TREtORVQ5ODI4LUNFTlRSQUxVUyIsImpvYkxvY2F0aW9uIjoiY2VudHJhbHVzIn0?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNTMwMTJkY2ItNTAzOS00ZTk2LThlNmMtNWQ5MTNkYTFjZGI1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFCUkUxVFJFdE9SVlE1T0RJNExVTkZUbFJTUVV4VlV5SXNJbXB2WWt4dlkyRjBhVzl1SWpvaVkyVnVkSEpoYkhWekluMD9hcGktdmVyc2lvbj0yMDE1LTExLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 28 Mar 2019 02:33:51 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11989" + ], + "x-ms-request-id": [ + "8f56a762-740c-4507-b7e4-9935a7f2eed1" + ], + "x-ms-correlation-request-id": [ + "8f56a762-740c-4507-b7e4-9935a7f2eed1" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20190328T023351Z:8f56a762-740c-4507-b7e4-9935a7f2eed1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "", + "StatusCode": 200 + } + ], + "Names": { + ".ctor": [ + "admsdknet9828" + ] + }, + "Variables": { + "SubscriptionId": "53012dcb-5039-4e96-8e6c-5d913da1cdb5" + } +} \ No newline at end of file diff --git a/src/SDKs/DeploymentManager/DeploymentManager.Tests/Tests/ArtifactRoot/Storage.Copy.Parameters.json b/src/SDKs/DeploymentManager/DeploymentManager.Tests/Tests/ArtifactRoot/Storage.Copy.Parameters.json new file mode 100644 index 000000000000..5eb044ee71b8 --- /dev/null +++ b/src/SDKs/DeploymentManager/DeploymentManager.Tests/Tests/ArtifactRoot/Storage.Copy.Parameters.json @@ -0,0 +1,24 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "value": "centralus" + }, + "storageAccountName": { + "value": "__STORAGEACCOUNTNAME__" + }, + "accountType": { + "value": "Standard_RAGRS" + }, + "kind": { + "value": "StorageV2" + }, + "accessTier": { + "value": "Hot" + }, + "supportsHttpsTrafficOnly": { + "value": true + } + } +} diff --git a/src/SDKs/DeploymentManager/DeploymentManager.Tests/Tests/ArtifactRoot/Storage.Copy.Template.json b/src/SDKs/DeploymentManager/DeploymentManager.Tests/Tests/ArtifactRoot/Storage.Copy.Template.json new file mode 100644 index 000000000000..f6e275dbcb00 --- /dev/null +++ b/src/SDKs/DeploymentManager/DeploymentManager.Tests/Tests/ArtifactRoot/Storage.Copy.Template.json @@ -0,0 +1,43 @@ +{ + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string" + }, + "storageAccountName": { + "type": "string" + }, + "accountType": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "accessTier": { + "type": "string" + }, + "supportsHttpsTrafficOnly": { + "type": "bool" + } + }, + "variables": {}, + "resources": [ + { + "name": "[parameters('storageAccountName')]", + "type": "Microsoft.Storage/storageAccounts", + "apiVersion": "2018-07-01", + "location": "[parameters('location')]", + "properties": { + "accessTier": "[parameters('accessTier')]", + "supportsHttpsTrafficOnly": "[parameters('supportsHttpsTrafficOnly')]" + }, + "dependsOn": [], + "sku": { + "name": "[parameters('accountType')]" + }, + "kind": "[parameters('kind')]" + } + ], + "outputs": {} +} \ No newline at end of file diff --git a/src/SDKs/DeploymentManager/DeploymentManager.Tests/Tests/ArtifactRoot/Storage.Parameters.json b/src/SDKs/DeploymentManager/DeploymentManager.Tests/Tests/ArtifactRoot/Storage.Parameters.json new file mode 100644 index 000000000000..b77371db22b8 --- /dev/null +++ b/src/SDKs/DeploymentManager/DeploymentManager.Tests/Tests/ArtifactRoot/Storage.Parameters.json @@ -0,0 +1,24 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "value": "centralus" + }, + "storageAccountName": { + "value": "__STORAGEACCOUNTNAME__" + }, + "accountType": { + "value": "Standard_RAGRS" + }, + "kind": { + "value": "StorageV2" + }, + "accessTier": { + "value": "Hot" + }, + "supportsHttpsTrafficOnly": { + "value": true + } + } +} \ No newline at end of file diff --git a/src/SDKs/DeploymentManager/DeploymentManager.Tests/Tests/ArtifactRoot/Storage.Template.json b/src/SDKs/DeploymentManager/DeploymentManager.Tests/Tests/ArtifactRoot/Storage.Template.json new file mode 100644 index 000000000000..f6e275dbcb00 --- /dev/null +++ b/src/SDKs/DeploymentManager/DeploymentManager.Tests/Tests/ArtifactRoot/Storage.Template.json @@ -0,0 +1,43 @@ +{ + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string" + }, + "storageAccountName": { + "type": "string" + }, + "accountType": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "accessTier": { + "type": "string" + }, + "supportsHttpsTrafficOnly": { + "type": "bool" + } + }, + "variables": {}, + "resources": [ + { + "name": "[parameters('storageAccountName')]", + "type": "Microsoft.Storage/storageAccounts", + "apiVersion": "2018-07-01", + "location": "[parameters('location')]", + "properties": { + "accessTier": "[parameters('accessTier')]", + "supportsHttpsTrafficOnly": "[parameters('supportsHttpsTrafficOnly')]" + }, + "dependsOn": [], + "sku": { + "name": "[parameters('accountType')]" + }, + "kind": "[parameters('kind')]" + } + ], + "outputs": {} +} \ No newline at end of file diff --git a/src/SDKs/DeploymentManager/DeploymentManager.Tests/Tests/ArtifactRoot/Storage_Invalid.Parameters.json b/src/SDKs/DeploymentManager/DeploymentManager.Tests/Tests/ArtifactRoot/Storage_Invalid.Parameters.json new file mode 100644 index 000000000000..309b5a270681 --- /dev/null +++ b/src/SDKs/DeploymentManager/DeploymentManager.Tests/Tests/ArtifactRoot/Storage_Invalid.Parameters.json @@ -0,0 +1,24 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "value": "centralus" + }, + "storageAccountName": { + "value": "(Invalid_Storage.Account/Name)" + }, + "accountType": { + "value": "Standard_RAGRS" + }, + "kind": { + "value": "StorageV2" + }, + "accessTier": { + "value": "Hot" + }, + "supportsHttpsTrafficOnly": { + "value": true + } + } +} \ No newline at end of file diff --git a/src/SDKs/DeploymentManager/DeploymentManager.Tests/Tests/EndToEndFunctionalTests.cs b/src/SDKs/DeploymentManager/DeploymentManager.Tests/Tests/EndToEndFunctionalTests.cs new file mode 100644 index 000000000000..ae595df11134 --- /dev/null +++ b/src/SDKs/DeploymentManager/DeploymentManager.Tests/Tests/EndToEndFunctionalTests.cs @@ -0,0 +1,683 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +namespace DeploymentManager.Tests +{ + using Management.DeploymentManager.Tests; + using Microsoft.Azure.Management.DeploymentManager; + using Microsoft.Azure.Management.DeploymentManager.Models; + using Microsoft.Azure.Test.HttpRecorder; + using Microsoft.Rest.Azure; + using Microsoft.Rest.ClientRuntime.Azure.TestFramework; + using System; + using System.Collections.Generic; + using System.Net; + using Xunit; + + public class EndToEndFunctionalTests : TestBase + { + private static string subscriptionId; + private const string ArtifactSourceType = "AzureStorage"; + private const string ArtifactRoot = @"Tests\ArtifactRoot"; + private const string ContainerName = "artifacts"; + + private const string ParametersFileName = "Storage.Parameters.json"; + private const string InvalidParametersFileName = "Storage_Invalid.Parameters.json"; + private const string TemplateFileName = "Storage.Template.json"; + private const string ParametersCopyFileName = "Storage.Copy.Parameters.json"; + private const string TemplateCopyFileName = "Storage.Copy.Template.json"; + + private const string ParametersArtifactSourceRelativePath = ArtifactRoot + @"\" + ParametersFileName; + private const string TemplateArtifactSourceRelativePath = ArtifactRoot + @"\" + TemplateFileName; + private const string InvalidParametersArtifactSourceRelativePath = ArtifactRoot + @"\" + InvalidParametersFileName; + private const string ParametersCopyArtifactSourceRelativePath = ArtifactRoot + @"\" + ParametersCopyFileName; + private const string TemplateCopyArtifactSourceRelativePath = ArtifactRoot + @"\" + TemplateCopyFileName; + + /// + /// Tests the end to end scenarios by creating all dependent resources that are part of the API. + /// + [Fact] + public void TopologyAndRolloutScenarioTest() + { + var handler = new RecordedDelegatingHandler { StatusCodeToReturn = HttpStatusCode.OK }; + + using (var context = MockContext.Start(typeof(EndToEndFunctionalTests).FullName)) + { + var deploymentManagerClient = DeploymentManagerTestUtilities.GetDeploymentManagerClient(context, handler); + var clientHelper = new DeploymentManagerClientHelper(this, context); + + var te = TestEnvironmentFactory.GetTestEnvironment(); + EndToEndFunctionalTests.subscriptionId = te.SubscriptionId; + + var location = clientHelper.GetProviderLocation("Microsoft.DeploymentManager", "serviceTopologies"); + + try + { + // Create resource group + clientHelper.TryCreateResourceGroup(location); + + var artifactSourceName = clientHelper.ResourceGroupName + "ArtifactSource"; + var updatedArtifactSourceName = clientHelper.ResourceGroupName + "UpdatedArtifactSource"; + var storageAccountName = clientHelper.ResourceGroupName + "stgacct"; + + // Create artifact source + var artifactSource = this.CreateArtifactSource( + storageAccountName, + artifactSourceName, + location, + deploymentManagerClient, + clientHelper, + setupContainer: true); + + // Test Create service topology. + var serviceTopologyName = clientHelper.ResourceGroupName + "ServiceTopology"; + + var inputTopology = new ServiceTopologyResource( + location: location, + name: serviceTopologyName, + artifactSourceId: artifactSource.Id); + + var createTopologyResponse = deploymentManagerClient.ServiceTopologies.CreateOrUpdate( + resourceGroupName: clientHelper.ResourceGroupName, + serviceTopologyName: serviceTopologyName, + serviceTopologyInfo: inputTopology); + + this.ValidateTopology(inputTopology, createTopologyResponse); + + // Test Get topology. + var serviceTopology = deploymentManagerClient.ServiceTopologies.Get( + resourceGroupName: clientHelper.ResourceGroupName, + serviceTopologyName: serviceTopologyName); + + this.ValidateTopology(inputTopology, serviceTopology); + + // Test CRUD operations on services. + this.ServiceCrudTests(artifactSource, serviceTopology, location, deploymentManagerClient, clientHelper); + + // Create another artifact source to test update topology. + artifactSource = this.CreateArtifactSource( + storageAccountName, + updatedArtifactSourceName, + location, + deploymentManagerClient, + clientHelper); + + // Test Update topology. + serviceTopology.ArtifactSourceId = artifactSource.Id; + var updatedStepResource = deploymentManagerClient.ServiceTopologies.CreateOrUpdate( + resourceGroupName: clientHelper.ResourceGroupName, + serviceTopologyName: serviceTopologyName, + serviceTopologyInfo: serviceTopology); + + this.ValidateTopology(serviceTopology, updatedStepResource); + + // Test Delete topology. + deploymentManagerClient.ServiceTopologies.Delete( + resourceGroupName: clientHelper.ResourceGroupName, + serviceTopologyName: serviceTopologyName); + + var cloudException = Assert.Throws(() => deploymentManagerClient.ServiceTopologies.Get( + resourceGroupName: clientHelper.ResourceGroupName, + serviceTopologyName: serviceTopologyName)); + Assert.Equal(HttpStatusCode.NotFound, cloudException.Response.StatusCode); + + // Cleanup artifact source + this.CleanupArtifactSources(artifactSourceName, location, deploymentManagerClient, clientHelper); + this.CleanupArtifactSources(updatedArtifactSourceName, location, deploymentManagerClient, clientHelper); + + cloudException = Assert.Throws(() => deploymentManagerClient.ArtifactSources.Get( + resourceGroupName: clientHelper.ResourceGroupName, + artifactSourceName: artifactSourceName)); + Assert.Equal(HttpStatusCode.NotFound, cloudException.Response.StatusCode); + } + finally + { + clientHelper.DeleteResourceGroup(); + } + } + } + + private void ServiceCrudTests( + ArtifactSource artifactSource, + ServiceTopologyResource serviceTopologyResource, + string location, + AzureDeploymentManagerClient deploymentManagerClient, + DeploymentManagerClientHelper clientHelper) + { + var serviceName = clientHelper.ResourceGroupName + "Service"; + var targetLocation = location; + + var inputService = new ServiceResource( + location: location, + name: serviceName, + targetLocation: targetLocation, + targetSubscriptionId: EndToEndFunctionalTests.subscriptionId); + + var createServiceResponse = deploymentManagerClient.Services.CreateOrUpdate( + resourceGroupName: clientHelper.ResourceGroupName, + serviceTopologyName: serviceTopologyResource.Name, + serviceName: serviceName, + serviceInfo: inputService); + + this.ValidateService(inputService, createServiceResponse); + + // Test Get service. + var service = deploymentManagerClient.Services.Get( + resourceGroupName: clientHelper.ResourceGroupName, + serviceTopologyName: serviceTopologyResource.Name, + serviceName: serviceName); + + this.ValidateService(inputService, service); + + // Test CRUD operations on service units. + this.ServiceUnitCrudTests( + artifactSource, + serviceTopologyResource, + serviceName, + location, + deploymentManagerClient, + clientHelper); + + // Test Update service. + service.TargetSubscriptionId = "1e591dc1-b014-4754-b53b-58b67bcab1cd"; + var updatedService = deploymentManagerClient.Services.CreateOrUpdate( + resourceGroupName: clientHelper.ResourceGroupName, + serviceTopologyName: serviceTopologyResource.Name, + serviceName: serviceName, + serviceInfo: service); + + this.ValidateService(service, updatedService); + + // Test Delete service. + deploymentManagerClient.Services.Delete( + resourceGroupName: clientHelper.ResourceGroupName, + serviceTopologyName: serviceTopologyResource.Name, + serviceName: serviceName); + + var cloudException = Assert.Throws(() => deploymentManagerClient.Services.Get( + resourceGroupName: clientHelper.ResourceGroupName, + serviceTopologyName: serviceTopologyResource.Name, + serviceName: serviceName)); + Assert.Equal(HttpStatusCode.NotFound, cloudException.Response.StatusCode); + } + + private void ServiceUnitCrudTests( + ArtifactSource artifactSource, + ServiceTopologyResource serviceTopologyResource, + string serviceName, + string location, + AzureDeploymentManagerClient deploymentManagerClient, + DeploymentManagerClientHelper clientHelper) + { + var serviceUnitName = clientHelper.ResourceGroupName + "ServiceUnit"; + var failureServiceUnitName = clientHelper.ResourceGroupName + "InvalidServiceUnit"; + var targetResourceGroup = clientHelper.ResourceGroupName; + var artifacts = new ServiceUnitArtifacts() + { + ParametersArtifactSourceRelativePath = ParametersFileName, + TemplateArtifactSourceRelativePath = TemplateFileName + }; + + var inputServiceUnit = new ServiceUnitResource( + location: location, + targetResourceGroup: targetResourceGroup, + name: serviceUnitName, + deploymentMode: DeploymentMode.Incremental, + artifacts: artifacts); + + var createServiceResponse = deploymentManagerClient.ServiceUnits.CreateOrUpdate( + resourceGroupName: clientHelper.ResourceGroupName, + serviceTopologyName: serviceTopologyResource.Name, + serviceName: serviceName, + serviceUnitName: serviceUnitName, + serviceUnitInfo: inputServiceUnit); + + this.ValidateServiceUnit(inputServiceUnit, createServiceResponse); + + // Test Get service unit. + var serviceUnit = deploymentManagerClient.ServiceUnits.Get( + resourceGroupName: clientHelper.ResourceGroupName, + serviceTopologyName: serviceTopologyResource.Name, + serviceName: serviceName, + serviceUnitName: serviceUnitName); + + this.ValidateServiceUnit(inputServiceUnit, serviceUnit); + + // Create a service unit that fails deployment for failure rollout scenario. + var invalidArtifacts = new ServiceUnitArtifacts() + { + ParametersArtifactSourceRelativePath = InvalidParametersFileName, + TemplateArtifactSourceRelativePath = TemplateFileName + }; + + var failureServiceUnitInput = new ServiceUnitResource( + location: location, + targetResourceGroup: targetResourceGroup, + name: failureServiceUnitName, + deploymentMode: DeploymentMode.Incremental, + artifacts: invalidArtifacts); + + var failureServiceUnitResponse = deploymentManagerClient.ServiceUnits.CreateOrUpdate( + resourceGroupName: clientHelper.ResourceGroupName, + serviceTopologyName: serviceTopologyResource.Name, + serviceName: serviceName, + serviceUnitName: failureServiceUnitName, + serviceUnitInfo: failureServiceUnitInput); + + this.ValidateServiceUnit(failureServiceUnitInput, failureServiceUnitResponse); + + // Test Steps CRUD operations along with running a rollout. + this.StepsCrudTests( + serviceTopologyResource.Id, + artifactSource.Id, + serviceUnit.Id, + failureServiceUnitResponse.Id, + location, + clientHelper, + deploymentManagerClient); + + // Test Update service unit. + serviceUnit.DeploymentMode = DeploymentMode.Complete; + serviceUnit.Artifacts.ParametersArtifactSourceRelativePath = ParametersCopyFileName; + serviceUnit.Artifacts.TemplateArtifactSourceRelativePath = TemplateCopyFileName; + var updatedService = deploymentManagerClient.ServiceUnits.CreateOrUpdate( + resourceGroupName: clientHelper.ResourceGroupName, + serviceTopologyName: serviceTopologyResource.Name, + serviceName: serviceName, + serviceUnitName: serviceUnitName, + serviceUnitInfo: serviceUnit); + + this.ValidateServiceUnit(serviceUnit, updatedService); + + // Test Delete service unit. + deploymentManagerClient.ServiceUnits.Delete( + resourceGroupName: clientHelper.ResourceGroupName, + serviceTopologyName: serviceTopologyResource.Name, + serviceName: serviceName, + serviceUnitName: serviceUnitName); + + var cloudException = Assert.Throws(() => deploymentManagerClient.ServiceUnits.Get( + resourceGroupName: clientHelper.ResourceGroupName, + serviceTopologyName: serviceTopologyResource.Name, + serviceName: serviceName, + serviceUnitName: serviceUnitName)); + Assert.Equal(HttpStatusCode.NotFound, cloudException.Response.StatusCode); + + deploymentManagerClient.ServiceUnits.Delete( + resourceGroupName: clientHelper.ResourceGroupName, + serviceTopologyName: serviceTopologyResource.Name, + serviceName: serviceName, + serviceUnitName: failureServiceUnitName); + } + + private void StepsCrudTests( + string serviceTopologyId, + string artifactSourceId, + string serviceUnitId, + string failureServiceUnitId, + string location, + DeploymentManagerClientHelper clientHelper, + AzureDeploymentManagerClient deploymentManagerClient) + { + // Test Create step. + var stepName = clientHelper.ResourceGroupName + "WaitStep"; + var stepProperties = new WaitStepProperties() + { + Attributes = new WaitStepAttributes() + { + Duration = "PT5M" + } + }; + + var inputStep = new StepResource( + location: location, + properties: stepProperties, + name: stepName); + + var stepResponse = deploymentManagerClient.Steps.CreateOrUpdate( + resourceGroupName: clientHelper.ResourceGroupName, + stepName: stepName, + stepInfo: inputStep); + + this.ValidateStep(inputStep, stepResponse); + + // Test Get step. + var getStepResource = deploymentManagerClient.Steps.Get( + resourceGroupName: clientHelper.ResourceGroupName, + stepName: stepName); + + this.ValidateStep(inputStep, getStepResource); + + this.RolloutCrudTests( + serviceTopologyId: serviceTopologyId, + artifactSourceId: artifactSourceId, + serviceUnitId: serviceUnitId, + failureServiceUnitId: failureServiceUnitId, + stepId: getStepResource.Id, + location: location, + deploymentManagerClient: deploymentManagerClient, + clientHelper: clientHelper); + + // Test Update step. + ((WaitStepProperties)(getStepResource.Properties)).Attributes.Duration = "PT10M"; + var updatedStepResource = deploymentManagerClient.Steps.CreateOrUpdate( + resourceGroupName: clientHelper.ResourceGroupName, + stepName: stepName, + stepInfo: getStepResource); + + this.ValidateStep(getStepResource, updatedStepResource); + + // Test Delete step. + deploymentManagerClient.Steps.Delete( + resourceGroupName: clientHelper.ResourceGroupName, + stepName: stepName); + + var cloudException = Assert.Throws(() => deploymentManagerClient.Steps.Get( + resourceGroupName: clientHelper.ResourceGroupName, + stepName: stepName)); + Assert.Equal(HttpStatusCode.NotFound, cloudException.Response.StatusCode); + } + + private void ValidateStep(StepResource inputStep, StepResource stepResponse) + { + Assert.NotNull(stepResponse); + Assert.Equal(inputStep.Location, stepResponse.Location); + Assert.Equal(inputStep.Name, stepResponse.Name); + + var stepProperties = stepResponse.Properties as WaitStepProperties; + Assert.NotNull(stepProperties); + Assert.Equal(((WaitStepProperties)inputStep.Properties).Attributes.Duration, stepProperties.Attributes.Duration); + } + + private void RolloutCrudTests( + string serviceTopologyId, + string artifactSourceId, + string serviceUnitId, + string failureServiceUnitId, + string stepId, + string location, + AzureDeploymentManagerClient deploymentManagerClient, + DeploymentManagerClientHelper clientHelper) + { + var rolloutName = clientHelper.ResourceGroupName + "Rollout"; + var failureRolloutName = clientHelper.ResourceGroupName + "FailureRollout"; + + var userAssignedIdentity = this.SetManagedIdentity(clientHelper); + + var identity = new Identity() + { + Type = "userAssigned", + IdentityIds = new List() + { + userAssignedIdentity + } + }; + + var stepGroup = new Step( + name: "First_Region", + deploymentTargetId: serviceUnitId) + { + PreDeploymentSteps = new List () { new PrePostStep(stepId) } + }; + + var stepGroupForFailureRollout = new Step( + name: "FirstRegion", + deploymentTargetId: failureServiceUnitId); + + var rolloutRequest = new RolloutRequest( + location: location, + buildVersion: "1.0.0.0", + identity: identity, + targetServiceTopologyId: serviceTopologyId, + artifactSourceId: artifactSourceId, + stepGroups: new List() { stepGroup }); + + var createRolloutResponse = deploymentManagerClient.Rollouts.CreateOrUpdate( + resourceGroupName: clientHelper.ResourceGroupName, + rolloutName: rolloutName, + rolloutRequest: rolloutRequest); + + this.ValidateRollout(rolloutRequest, createRolloutResponse); + + // Kick off a rollout that would fail to test restart operation. + var failureRolloutRequest = new RolloutRequest( + location: location, + buildVersion: "1.0.0.0", + identity: identity, + targetServiceTopologyId: serviceTopologyId, + artifactSourceId: artifactSourceId, + stepGroups: new List() { stepGroupForFailureRollout }); + + var failureRolloutResponse = deploymentManagerClient.Rollouts.CreateOrUpdate( + resourceGroupName: clientHelper.ResourceGroupName, + rolloutName: failureRolloutName, + rolloutRequest: failureRolloutRequest); + + this.ValidateRollout(failureRolloutRequest, failureRolloutResponse); + + // Test Get rollout. + var rollout = deploymentManagerClient.Rollouts.Get( + resourceGroupName: clientHelper.ResourceGroupName, + rolloutName: rolloutName); + + Assert.NotNull(rollout); + Assert.Equal("Running", rollout.Status); + Assert.NotNull(rollout.OperationInfo); + Assert.Equal(0, rollout.OperationInfo.RetryAttempt); + + // Test cancel rollout. + rollout = deploymentManagerClient.Rollouts.Cancel( + resourceGroupName: clientHelper.ResourceGroupName, + rolloutName: rolloutName); + + Assert.NotNull(rollout); + Assert.Equal("Canceling", rollout.Status); + + this.WaitForRolloutTermination( + rolloutName, + deploymentManagerClient, + clientHelper); + + // Test delete rollout. + deploymentManagerClient.Rollouts.Delete( + resourceGroupName: clientHelper.ResourceGroupName, + rolloutName: rolloutName); + + var cloudException = Assert.Throws(() => deploymentManagerClient.Rollouts.Get( + resourceGroupName: clientHelper.ResourceGroupName, + rolloutName: rolloutName)); + Assert.Equal(HttpStatusCode.NotFound, cloudException.Response.StatusCode); + + // Check status of rollout expected to fail and attempt restart operation. + var failureRollout = this.WaitForRolloutTermination( + failureRolloutName, + deploymentManagerClient, + clientHelper); + + Assert.NotNull(failureRollout); + Assert.Equal("Failed", failureRollout.Status); + + // Test Restart rollout. + failureRollout = deploymentManagerClient.Rollouts.Restart( + resourceGroupName: clientHelper.ResourceGroupName, + rolloutName: failureRolloutName); + + Assert.NotNull(failureRollout); + Assert.Equal("Running", failureRollout.Status); + Assert.Equal(1, failureRollout.TotalRetryAttempts); + Assert.Equal(false.ToString(), failureRollout.OperationInfo.SkipSucceededOnRetry.ToString()); + } + + private Rollout WaitForRolloutTermination( + string rolloutName, + AzureDeploymentManagerClient deploymentManagerClient, + DeploymentManagerClientHelper clientHelper) + { + Rollout rollout; + do + { + DeploymentManagerTestUtilities.Sleep(TimeSpan.FromMinutes(1)); + rollout = deploymentManagerClient.Rollouts.Get( + resourceGroupName: clientHelper.ResourceGroupName, + rolloutName: rolloutName); + } while (rollout.Status == "Running"); + + return rollout; + } + + private void ValidateRollout(RolloutRequest rolloutRequest, RolloutRequest rolloutResponse) + { + Assert.NotNull(rolloutResponse); + Assert.Equal(rolloutRequest.Location, rolloutResponse.Location); + Assert.Equal(rolloutRequest.ArtifactSourceId, rolloutResponse.ArtifactSourceId); + Assert.Equal(rolloutRequest.TargetServiceTopologyId, rolloutResponse.TargetServiceTopologyId); + Assert.Equal(rolloutRequest.StepGroups.Count, rolloutResponse.StepGroups.Count); + } + + private void ValidateServiceUnit(ServiceUnitResource inputServiceUnit, ServiceUnitResource serviceUnitResponse) + { + Assert.NotNull(serviceUnitResponse); + Assert.Equal(inputServiceUnit.Location, serviceUnitResponse.Location); + Assert.Equal(inputServiceUnit.Name, serviceUnitResponse.Name); + Assert.Equal(inputServiceUnit.DeploymentMode, serviceUnitResponse.DeploymentMode); + Assert.Equal(inputServiceUnit.Artifacts.ParametersArtifactSourceRelativePath, serviceUnitResponse.Artifacts.ParametersArtifactSourceRelativePath); + Assert.Equal(inputServiceUnit.Artifacts.TemplateArtifactSourceRelativePath, serviceUnitResponse.Artifacts.TemplateArtifactSourceRelativePath); + } + + private void ValidateService(ServiceResource inputService, ServiceResource serviceResponse) + { + Assert.NotNull(serviceResponse); + Assert.Equal(inputService.Location, serviceResponse.Location); + Assert.Equal(inputService.Name, serviceResponse.Name); + Assert.Equal(inputService.TargetSubscriptionId, serviceResponse.TargetSubscriptionId); + } + + private void ValidateTopology(ServiceTopologyResource inputTopology, ServiceTopologyResource serviceTopologyResponse) + { + Assert.NotNull(serviceTopologyResponse); + Assert.Equal(inputTopology.Location, serviceTopologyResponse.Location); + Assert.Equal(inputTopology.Name, serviceTopologyResponse.Name); + Assert.Equal(inputTopology.ArtifactSourceId, serviceTopologyResponse.ArtifactSourceId); + } + + private string SetManagedIdentity( + DeploymentManagerClientHelper clientHelper) + { + var identityName = clientHelper.ResourceGroupName + "Identity"; + var identityId = clientHelper.CreateManagedIdentity(EndToEndFunctionalTests.subscriptionId, identityName); + return identityId; + } + + private ArtifactSource CreateArtifactSource( + string storageAccountName, + string artifactSourceName, + string location, + AzureDeploymentManagerClient deploymentManagerClient, + DeploymentManagerClientHelper clientHelper, + bool setupContainer = false) + { + if (setupContainer) + { + this.SetupContainer(storageAccountName, clientHelper); + } + + var authentication = new SasAuthentication() + { + SasUri = clientHelper.GetBlobContainerSasUri( + clientHelper.ResourceGroupName, + storageAccountName, + containerName: EndToEndFunctionalTests.ContainerName) + }; + + var inputArtifactSource = new ArtifactSource( + location: location, + sourceType: EndToEndFunctionalTests.ArtifactSourceType, + authentication: authentication, + artifactRoot: EndToEndFunctionalTests.ArtifactRoot, + name: artifactSourceName); + + var artifactSourceResponse = deploymentManagerClient.ArtifactSources.CreateOrUpdate( + resourceGroupName: clientHelper.ResourceGroupName, + artifactSourceName: artifactSourceName, + artifactSourceInfo: inputArtifactSource); + + this.ValidateArtifactSource(inputArtifactSource, artifactSourceResponse); + return artifactSourceResponse; + } + + private void SetupContainer( + string storageAccountName, + DeploymentManagerClientHelper clientHelper) + { + if (HttpMockServer.Mode == HttpRecorderMode.Record) + { + clientHelper.CreateStorageAccount(storageAccountName); + var storageAccountNameForTemplate = clientHelper.ResourceGroupName + "stgtempl"; + var storageAccountReplacementSymbol = "__STORAGEACCOUNTNAME__"; + + this.ReplaceString(storageAccountReplacementSymbol, storageAccountNameForTemplate, ParametersArtifactSourceRelativePath); + this.ReplaceString(storageAccountReplacementSymbol, storageAccountNameForTemplate, TemplateArtifactSourceRelativePath); + this.ReplaceString(storageAccountReplacementSymbol, storageAccountNameForTemplate, ParametersCopyArtifactSourceRelativePath); + this.ReplaceString(storageAccountReplacementSymbol, storageAccountNameForTemplate, TemplateCopyArtifactSourceRelativePath); + + clientHelper.UploadBlob(storageAccountName, ContainerName, ParametersArtifactSourceRelativePath, ParametersArtifactSourceRelativePath); + clientHelper.UploadBlob(storageAccountName, ContainerName, ParametersCopyArtifactSourceRelativePath, ParametersCopyArtifactSourceRelativePath); + clientHelper.UploadBlob(storageAccountName, ContainerName, InvalidParametersArtifactSourceRelativePath, InvalidParametersArtifactSourceRelativePath); + clientHelper.UploadBlob(storageAccountName, ContainerName, TemplateArtifactSourceRelativePath, TemplateArtifactSourceRelativePath); + clientHelper.UploadBlob(storageAccountName, ContainerName, TemplateCopyArtifactSourceRelativePath, TemplateCopyArtifactSourceRelativePath); + } + } + + private void ReplaceRolloutSymbols( + string rolloutName, + string targetServiceTopologyId, + string artifactSourceId, + string stepId, + string serviceUnitId, + string filePath) + { + this.ReplaceString("__ROLLOUT_NAME__", rolloutName, filePath); + this.ReplaceString("__TARGET_SERVICE_TOPOLOGY__", targetServiceTopologyId, filePath); + this.ReplaceString("__ARTIFACT_SOURCE_ID__", artifactSourceId, filePath); + this.ReplaceString("__STEP_ID__", stepId, filePath); + this.ReplaceString("__SERVICE_UNIT_ID__", serviceUnitId, filePath); + } + + private void ReplaceString( + string replacementSymbol, + string replacementValue, + string filePath) + { + if (HttpMockServer.Mode == HttpRecorderMode.Record) + { + var fileSystemUtils = new FileSystemUtils(); + var fileContents = fileSystemUtils.ReadFileAsText(filePath); + + fileContents = fileContents.Replace(replacementSymbol, replacementValue); + + fileSystemUtils.WriteFile(filePath, fileContents); + } + } + + protected void CleanupArtifactSources( + string artifactSourceName, + string location, + AzureDeploymentManagerClient deploymentManagerClient, + DeploymentManagerClientHelper clientHelper) + { + deploymentManagerClient.ArtifactSources.Delete( + resourceGroupName: clientHelper.ResourceGroupName, + artifactSourceName: artifactSourceName); + } + + private void ValidateArtifactSource(ArtifactSource inputArtifactSource, ArtifactSource artifactSourceResponse) + { + Assert.NotNull(artifactSourceResponse); + Assert.Equal(inputArtifactSource.Location, artifactSourceResponse.Location); + Assert.Equal(inputArtifactSource.Name, artifactSourceResponse.Name); + Assert.Equal(inputArtifactSource.SourceType, artifactSourceResponse.SourceType); + Assert.Equal(inputArtifactSource.ArtifactRoot, artifactSourceResponse.ArtifactRoot); + Assert.Equal(typeof(SasAuthentication), artifactSourceResponse.Authentication.GetType()); + } + } +} diff --git a/src/SDKs/DeploymentManager/DeploymentManager.sln b/src/SDKs/DeploymentManager/DeploymentManager.sln new file mode 100644 index 000000000000..81af01516a35 --- /dev/null +++ b/src/SDKs/DeploymentManager/DeploymentManager.sln @@ -0,0 +1,43 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.26228.4 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Management.DeploymentManager", "Management.DeploymentManager\Microsoft.Azure.Management.DeploymentManager.csproj", "{81E66A55-F17C-4088-80F6-EF7C01C11E37}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DeploymentManager.Tests", "DeploymentManager.Tests\DeploymentManager.Tests.csproj", "{23CD2878-1A27-4ECD-80F9-8B9BB1539F7F}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Management.ManagedServiceIdentity", "..\ManagedServiceIdentity\Management.ManagedServiceIdentity\Microsoft.Azure.Management.ManagedServiceIdentity.csproj", "{15BB052A-CEF6-49BA-8010-E6D1FAD30099}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Management.Authorization", "..\Authorization\Management.Authorization\Microsoft.Azure.Management.Authorization.csproj", "{99EF70BF-5689-4175-8848-602904ADE9FC}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {81E66A55-F17C-4088-80F6-EF7C01C11E37}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {81E66A55-F17C-4088-80F6-EF7C01C11E37}.Debug|Any CPU.Build.0 = Debug|Any CPU + {81E66A55-F17C-4088-80F6-EF7C01C11E37}.Release|Any CPU.ActiveCfg = Release|Any CPU + {81E66A55-F17C-4088-80F6-EF7C01C11E37}.Release|Any CPU.Build.0 = Release|Any CPU + {23CD2878-1A27-4ECD-80F9-8B9BB1539F7F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {23CD2878-1A27-4ECD-80F9-8B9BB1539F7F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {23CD2878-1A27-4ECD-80F9-8B9BB1539F7F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {23CD2878-1A27-4ECD-80F9-8B9BB1539F7F}.Release|Any CPU.Build.0 = Release|Any CPU + {15BB052A-CEF6-49BA-8010-E6D1FAD30099}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {15BB052A-CEF6-49BA-8010-E6D1FAD30099}.Debug|Any CPU.Build.0 = Debug|Any CPU + {15BB052A-CEF6-49BA-8010-E6D1FAD30099}.Release|Any CPU.ActiveCfg = Release|Any CPU + {15BB052A-CEF6-49BA-8010-E6D1FAD30099}.Release|Any CPU.Build.0 = Release|Any CPU + {99EF70BF-5689-4175-8848-602904ADE9FC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {99EF70BF-5689-4175-8848-602904ADE9FC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {99EF70BF-5689-4175-8848-602904ADE9FC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {99EF70BF-5689-4175-8848-602904ADE9FC}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {8FE5AD53-3F8A-4345-99CE-EF585C940D65} + EndGlobalSection +EndGlobal diff --git a/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/ArtifactSourcesOperations.cs b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/ArtifactSourcesOperations.cs new file mode 100644 index 000000000000..1f5d723426a5 --- /dev/null +++ b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/ArtifactSourcesOperations.cs @@ -0,0 +1,684 @@ +// +// 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.DeploymentManager +{ + 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; + + /// + /// ArtifactSourcesOperations operations. + /// + internal partial class ArtifactSourcesOperations : IServiceOperations, IArtifactSourcesOperations + { + /// + /// Initializes a new instance of the ArtifactSourcesOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal ArtifactSourcesOperations(AzureDeploymentManagerClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the AzureDeploymentManagerClient + /// + public AzureDeploymentManagerClient Client { get; private set; } + + /// + /// Creates or updates an artifact source. + /// + /// + /// Synchronously creates a new artifact source or updates an existing artifact + /// source. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the artifact source. + /// + /// + /// Source object that defines the resource. + /// + /// + /// 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 resourceGroupName, string artifactSourceName, ArtifactSource artifactSourceInfo = default(ArtifactSource), 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 (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (artifactSourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "artifactSourceName"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (artifactSourceInfo != null) + { + artifactSourceInfo.Validate(); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("artifactSourceName", artifactSourceName); + tracingParameters.Add("artifactSourceInfo", artifactSourceInfo); + 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.DeploymentManager/artifactSources/{artifactSourceName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{artifactSourceName}", System.Uri.EscapeDataString(artifactSourceName)); + 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(artifactSourceInfo != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(artifactSourceInfo, 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 != 201) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + 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 == 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; + } + + /// + /// Gets an artifact source. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the artifact source. + /// + /// + /// 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 artifactSourceName, 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 (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (artifactSourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "artifactSourceName"); + } + 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("artifactSourceName", artifactSourceName); + 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.DeploymentManager/artifactSources/{artifactSourceName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{artifactSourceName}", System.Uri.EscapeDataString(artifactSourceName)); + 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 CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + 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; + } + + /// + /// Deletes an artifact source. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the artifact source. + /// + /// + /// 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 artifactSourceName, 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 (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (artifactSourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "artifactSourceName"); + } + 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("artifactSourceName", artifactSourceName); + 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.DeploymentManager/artifactSources/{artifactSourceName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{artifactSourceName}", System.Uri.EscapeDataString(artifactSourceName)); + 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 CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + 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; + } + + } +} diff --git a/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/ArtifactSourcesOperationsExtensions.cs b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/ArtifactSourcesOperationsExtensions.cs new file mode 100644 index 000000000000..0a4097176d8e --- /dev/null +++ b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/ArtifactSourcesOperationsExtensions.cs @@ -0,0 +1,156 @@ +// +// 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.DeploymentManager +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for ArtifactSourcesOperations. + /// + public static partial class ArtifactSourcesOperationsExtensions + { + /// + /// Creates or updates an artifact source. + /// + /// + /// Synchronously creates a new artifact source or updates an existing artifact + /// source. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the artifact source. + /// + /// + /// Source object that defines the resource. + /// + public static ArtifactSource CreateOrUpdate(this IArtifactSourcesOperations operations, string resourceGroupName, string artifactSourceName, ArtifactSource artifactSourceInfo = default(ArtifactSource)) + { + return operations.CreateOrUpdateAsync(resourceGroupName, artifactSourceName, artifactSourceInfo).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates an artifact source. + /// + /// + /// Synchronously creates a new artifact source or updates an existing artifact + /// source. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the artifact source. + /// + /// + /// Source object that defines the resource. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this IArtifactSourcesOperations operations, string resourceGroupName, string artifactSourceName, ArtifactSource artifactSourceInfo = default(ArtifactSource), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, artifactSourceName, artifactSourceInfo, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets an artifact source. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the artifact source. + /// + public static ArtifactSource Get(this IArtifactSourcesOperations operations, string resourceGroupName, string artifactSourceName) + { + return operations.GetAsync(resourceGroupName, artifactSourceName).GetAwaiter().GetResult(); + } + + /// + /// Gets an artifact source. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the artifact source. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IArtifactSourcesOperations operations, string resourceGroupName, string artifactSourceName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, artifactSourceName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes an artifact source. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the artifact source. + /// + public static void Delete(this IArtifactSourcesOperations operations, string resourceGroupName, string artifactSourceName) + { + operations.DeleteAsync(resourceGroupName, artifactSourceName).GetAwaiter().GetResult(); + } + + /// + /// Deletes an artifact source. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the artifact source. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IArtifactSourcesOperations operations, string resourceGroupName, string artifactSourceName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, artifactSourceName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + } +} diff --git a/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/AzureDeploymentManagerClient.cs b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/AzureDeploymentManagerClient.cs new file mode 100644 index 000000000000..753b048754af --- /dev/null +++ b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/AzureDeploymentManagerClient.cs @@ -0,0 +1,405 @@ +// +// 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.DeploymentManager +{ + 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; + + /// + /// REST APIs for orchestrating deployments using the Azure Deployment + /// Manager (ADM). See + /// https://docs.microsoft.com/en-us/azure/azure-resource-manager/deployment-manager-overview + /// for more information. + /// + public partial class AzureDeploymentManagerClient : ServiceClient, IAzureDeploymentManagerClient, 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; } + + /// + /// Subscription credentials which uniquely identify Microsoft Azure + /// subscription. The subscription ID forms part of the URI for every service + /// call. + /// + public string SubscriptionId { get; set; } + + /// + /// The API version to use for this operation. + /// + public string ApiVersion { get; private 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 IServiceTopologiesOperations. + /// + public virtual IServiceTopologiesOperations ServiceTopologies { get; private set; } + + /// + /// Gets the IServicesOperations. + /// + public virtual IServicesOperations Services { get; private set; } + + /// + /// Gets the IServiceUnitsOperations. + /// + public virtual IServiceUnitsOperations ServiceUnits { get; private set; } + + /// + /// Gets the IStepsOperations. + /// + public virtual IStepsOperations Steps { get; private set; } + + /// + /// Gets the IRolloutsOperations. + /// + public virtual IRolloutsOperations Rollouts { get; private set; } + + /// + /// Gets the IArtifactSourcesOperations. + /// + public virtual IArtifactSourcesOperations ArtifactSources { get; private set; } + + /// + /// Gets the IOperations. + /// + public virtual IOperations Operations { get; private set; } + + /// + /// Initializes a new instance of the AzureDeploymentManagerClient class. + /// + /// + /// HttpClient to be used + /// + /// + /// True: will dispose the provided httpClient on calling AzureDeploymentManagerClient.Dispose(). False: will not dispose provided httpClient + protected AzureDeploymentManagerClient(HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClient) + { + Initialize(); + } + + /// + /// Initializes a new instance of the AzureDeploymentManagerClient class. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + protected AzureDeploymentManagerClient(params DelegatingHandler[] handlers) : base(handlers) + { + Initialize(); + } + + /// + /// Initializes a new instance of the AzureDeploymentManagerClient class. + /// + /// + /// Optional. The http client handler used to handle http transport. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + protected AzureDeploymentManagerClient(HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : base(rootHandler, handlers) + { + Initialize(); + } + + /// + /// Initializes a new instance of the AzureDeploymentManagerClient 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 AzureDeploymentManagerClient(System.Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) + { + if (baseUri == null) + { + throw new System.ArgumentNullException("baseUri"); + } + BaseUri = baseUri; + } + + /// + /// Initializes a new instance of the AzureDeploymentManagerClient 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 AzureDeploymentManagerClient(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 AzureDeploymentManagerClient 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 AzureDeploymentManagerClient(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 AzureDeploymentManagerClient class. + /// + /// + /// Required. Credentials needed for the client to connect to Azure. + /// + /// + /// HttpClient to be used + /// + /// + /// True: will dispose the provided httpClient on calling AzureDeploymentManagerClient.Dispose(). False: will not dispose provided httpClient + /// + /// Thrown when a required parameter is null + /// + public AzureDeploymentManagerClient(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 AzureDeploymentManagerClient 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 AzureDeploymentManagerClient(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 AzureDeploymentManagerClient 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 AzureDeploymentManagerClient(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 AzureDeploymentManagerClient 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 AzureDeploymentManagerClient(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() + { + ServiceTopologies = new ServiceTopologiesOperations(this); + Services = new ServicesOperations(this); + ServiceUnits = new ServiceUnitsOperations(this); + Steps = new StepsOperations(this); + Rollouts = new RolloutsOperations(this); + ArtifactSources = new ArtifactSourcesOperations(this); + Operations = new Operations(this); + BaseUri = new System.Uri("https://management.azure.com"); + ApiVersion = "2018-09-01-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() + } + }; + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("type")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("type")); + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("stepType")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("stepType")); + CustomInitialize(); + DeserializationSettings.Converters.Add(new TransformationJsonConverter()); + DeserializationSettings.Converters.Add(new CloudErrorJsonConverter()); + } + } +} diff --git a/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/IArtifactSourcesOperations.cs b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/IArtifactSourcesOperations.cs new file mode 100644 index 000000000000..9d5597a9fda0 --- /dev/null +++ b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/IArtifactSourcesOperations.cs @@ -0,0 +1,106 @@ +// +// 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.DeploymentManager +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ArtifactSourcesOperations operations. + /// + public partial interface IArtifactSourcesOperations + { + /// + /// Creates or updates an artifact source. + /// + /// + /// Synchronously creates a new artifact source or updates an existing + /// artifact source. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the artifact source. + /// + /// + /// Source object that defines the resource. + /// + /// + /// 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 resourceGroupName, string artifactSourceName, ArtifactSource artifactSourceInfo = default(ArtifactSource), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets an artifact source. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the artifact source. + /// + /// + /// 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 artifactSourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes an artifact source. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the artifact source. + /// + /// + /// 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 artifactSourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/IAzureDeploymentManagerClient.cs b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/IAzureDeploymentManagerClient.cs new file mode 100644 index 000000000000..80032e462814 --- /dev/null +++ b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/IAzureDeploymentManagerClient.cs @@ -0,0 +1,113 @@ +// +// 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.DeploymentManager +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + + /// + /// REST APIs for orchestrating deployments using the Azure Deployment + /// Manager (ADM). See + /// https://docs.microsoft.com/en-us/azure/azure-resource-manager/deployment-manager-overview + /// for more information. + /// + public partial interface IAzureDeploymentManagerClient : 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; } + + /// + /// Subscription credentials which uniquely identify Microsoft Azure + /// subscription. The subscription ID forms part of the URI for every + /// service call. + /// + string SubscriptionId { get; set; } + + /// + /// The API version to use for this operation. + /// + string ApiVersion { get; } + + /// + /// 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 IServiceTopologiesOperations. + /// + IServiceTopologiesOperations ServiceTopologies { get; } + + /// + /// Gets the IServicesOperations. + /// + IServicesOperations Services { get; } + + /// + /// Gets the IServiceUnitsOperations. + /// + IServiceUnitsOperations ServiceUnits { get; } + + /// + /// Gets the IStepsOperations. + /// + IStepsOperations Steps { get; } + + /// + /// Gets the IRolloutsOperations. + /// + IRolloutsOperations Rollouts { get; } + + /// + /// Gets the IArtifactSourcesOperations. + /// + IArtifactSourcesOperations ArtifactSources { get; } + + /// + /// Gets the IOperations. + /// + IOperations Operations { get; } + + } +} diff --git a/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/IOperations.cs b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/IOperations.cs new file mode 100644 index 000000000000..319b9205cac7 --- /dev/null +++ b/src/SDKs/DeploymentManager/Management.DeploymentManager/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.DeploymentManager +{ + 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 + { + /// + /// Gets an operation resource. + /// + /// + /// 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(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/IRolloutsOperations.cs b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/IRolloutsOperations.cs new file mode 100644 index 000000000000..c0925ea5b883 --- /dev/null +++ b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/IRolloutsOperations.cs @@ -0,0 +1,207 @@ +// +// 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.DeploymentManager +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// RolloutsOperations operations. + /// + public partial interface IRolloutsOperations + { + /// + /// Creates or updates a rollout. + /// + /// + /// This is an asynchronous operation and can be polled to completion + /// using the location header returned by this operation. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The rollout name. + /// + /// + /// Source rollout request object that defines the rollout. + /// + /// + /// 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 resourceGroupName, string rolloutName, RolloutRequest rolloutRequest = default(RolloutRequest), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets detailed information of a rollout. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The rollout name. + /// + /// + /// Rollout retry attempt ordinal to get the result of. If not + /// specified, result of the latest attempt will be returned. + /// + /// + /// 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 rolloutName, int? retryAttempt = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes a rollout resource. + /// + /// + /// Only rollouts in terminal state can be deleted. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The rollout name. + /// + /// + /// 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 rolloutName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Stops a running rollout. + /// + /// + /// Only running rollouts can be canceled. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The rollout 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> CancelWithHttpMessagesAsync(string resourceGroupName, string rolloutName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Restarts a failed rollout and optionally skips all succeeded steps. + /// + /// + /// Only failed rollouts can be restarted. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The rollout name. + /// + /// + /// If true, will skip all succeeded steps so far in the rollout. If + /// false, will execute the entire rollout again regardless of the + /// current state of individual resources. Defaults to false if not + /// specified. + /// + /// + /// 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> RestartWithHttpMessagesAsync(string resourceGroupName, string rolloutName, bool? skipSucceeded = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates or updates a rollout. + /// + /// + /// This is an asynchronous operation and can be polled to completion + /// using the location header returned by this operation. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The rollout name. + /// + /// + /// Source rollout request object that defines the rollout. + /// + /// + /// 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 resourceGroupName, string rolloutName, RolloutRequest rolloutRequest = default(RolloutRequest), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/IServiceTopologiesOperations.cs b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/IServiceTopologiesOperations.cs new file mode 100644 index 000000000000..ffc076a40a14 --- /dev/null +++ b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/IServiceTopologiesOperations.cs @@ -0,0 +1,106 @@ +// +// 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.DeploymentManager +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ServiceTopologiesOperations operations. + /// + public partial interface IServiceTopologiesOperations + { + /// + /// Creates or updates a service topology. + /// + /// + /// Synchronously creates a new service topology or updates an existing + /// service topology. + /// + /// + /// Source topology object defines the resource. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the service topology . + /// + /// + /// 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(ServiceTopologyResource serviceTopologyInfo, string resourceGroupName, string serviceTopologyName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the service topology. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the service topology . + /// + /// + /// 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 serviceTopologyName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes the service topology. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the service topology . + /// + /// + /// 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 serviceTopologyName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/IServiceUnitsOperations.cs b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/IServiceUnitsOperations.cs new file mode 100644 index 000000000000..9a4d67426a53 --- /dev/null +++ b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/IServiceUnitsOperations.cs @@ -0,0 +1,164 @@ +// +// 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.DeploymentManager +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ServiceUnitsOperations operations. + /// + public partial interface IServiceUnitsOperations + { + /// + /// Creates or updates a service unit under the service in the service + /// topology. + /// + /// + /// This is an asynchronous operation and can be polled to completion + /// using the operation resource returned by this operation. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the service topology . + /// + /// + /// The name of the service resource. + /// + /// + /// The name of the service unit resource. + /// + /// + /// The service unit resource object. + /// + /// + /// 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 resourceGroupName, string serviceTopologyName, string serviceName, string serviceUnitName, ServiceUnitResource serviceUnitInfo, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the service unit. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the service topology . + /// + /// + /// The name of the service resource. + /// + /// + /// The name of the service unit resource. + /// + /// + /// 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 serviceTopologyName, string serviceName, string serviceUnitName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes the service unit. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the service topology . + /// + /// + /// The name of the service resource. + /// + /// + /// The name of the service unit resource. + /// + /// + /// 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 serviceTopologyName, string serviceName, string serviceUnitName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates or updates a service unit under the service in the service + /// topology. + /// + /// + /// This is an asynchronous operation and can be polled to completion + /// using the operation resource returned by this operation. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the service topology . + /// + /// + /// The name of the service resource. + /// + /// + /// The name of the service unit resource. + /// + /// + /// The service unit resource object. + /// + /// + /// 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 resourceGroupName, string serviceTopologyName, string serviceName, string serviceUnitName, ServiceUnitResource serviceUnitInfo, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/IServicesOperations.cs b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/IServicesOperations.cs new file mode 100644 index 000000000000..058fed3392f9 --- /dev/null +++ b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/IServicesOperations.cs @@ -0,0 +1,114 @@ +// +// 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.DeploymentManager +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ServicesOperations operations. + /// + public partial interface IServicesOperations + { + /// + /// Creates or updates a service in the service topology. + /// + /// + /// Synchronously creates a new service or updates an existing service. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the service topology . + /// + /// + /// The name of the service resource. + /// + /// + /// The service object + /// + /// + /// 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 resourceGroupName, string serviceTopologyName, string serviceName, ServiceResource serviceInfo, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the service. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the service topology . + /// + /// + /// The name of the service resource. + /// + /// + /// 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 serviceTopologyName, string serviceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes the service. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the service topology . + /// + /// + /// The name of the service resource. + /// + /// + /// 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 serviceTopologyName, string serviceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/IStepsOperations.cs b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/IStepsOperations.cs new file mode 100644 index 000000000000..5055f0ecf781 --- /dev/null +++ b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/IStepsOperations.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.DeploymentManager +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// StepsOperations operations. + /// + public partial interface IStepsOperations + { + /// + /// Creates or updates a rollout step with the given step properties. + /// + /// + /// Synchronously creates a new step or updates an existing step. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the deployment step. + /// + /// + /// The step object. + /// + /// + /// 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 resourceGroupName, string stepName, StepResource stepInfo = default(StepResource), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the step. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the deployment step. + /// + /// + /// 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 stepName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes the step. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the deployment step. + /// + /// + /// 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 stepName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/ArtifactSource.cs b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/ArtifactSource.cs new file mode 100644 index 000000000000..5394b77d9628 --- /dev/null +++ b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/ArtifactSource.cs @@ -0,0 +1,117 @@ +// +// 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.DeploymentManager.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The resource that defines the source location where the artifacts are + /// located. + /// + [Rest.Serialization.JsonTransformation] + public partial class ArtifactSource : TrackedResource + { + /// + /// Initializes a new instance of the ArtifactSource class. + /// + public ArtifactSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ArtifactSource class. + /// + /// The geo-location where the resource + /// lives + /// The type of artifact source used. + /// The authentication method to use to + /// access the artifact source. + /// Fully qualified resource Id for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. Ex- + /// Microsoft.Compute/virtualMachines or + /// Microsoft.Storage/storageAccounts. + /// Resource tags. + /// The path from the location that the + /// 'authentication' property [say, a SAS URI to the blob container] + /// refers to, to the location of the artifacts. This can be used to + /// differentiate different versions of the artifacts. Or, different + /// types of artifacts like binaries or templates. The location + /// referenced by the authentication property concatenated with this + /// optional artifactRoot path forms the artifact source location where + /// the artifacts are expected to be found. + public ArtifactSource(string location, string sourceType, Authentication authentication, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string artifactRoot = default(string)) + : base(location, id, name, type, tags) + { + SourceType = sourceType; + ArtifactRoot = artifactRoot; + Authentication = authentication; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the type of artifact source used. + /// + [JsonProperty(PropertyName = "properties.sourceType")] + public string SourceType { get; set; } + + /// + /// Gets or sets the path from the location that the 'authentication' + /// property [say, a SAS URI to the blob container] refers to, to the + /// location of the artifacts. This can be used to differentiate + /// different versions of the artifacts. Or, different types of + /// artifacts like binaries or templates. The location referenced by + /// the authentication property concatenated with this optional + /// artifactRoot path forms the artifact source location where the + /// artifacts are expected to be found. + /// + [JsonProperty(PropertyName = "properties.artifactRoot")] + public string ArtifactRoot { get; set; } + + /// + /// Gets or sets the authentication method to use to access the + /// artifact source. + /// + [JsonProperty(PropertyName = "properties.authentication")] + public Authentication Authentication { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (SourceType == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "SourceType"); + } + if (Authentication == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Authentication"); + } + } + } +} diff --git a/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/ArtifactSourcePropertiesModel.cs b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/ArtifactSourcePropertiesModel.cs new file mode 100644 index 000000000000..6a35b8323073 --- /dev/null +++ b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/ArtifactSourcePropertiesModel.cs @@ -0,0 +1,104 @@ +// +// 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.DeploymentManager.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// The properties that define the source location where the artifacts are + /// located. + /// + public partial class ArtifactSourcePropertiesModel + { + /// + /// Initializes a new instance of the ArtifactSourcePropertiesModel + /// class. + /// + public ArtifactSourcePropertiesModel() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ArtifactSourcePropertiesModel + /// class. + /// + /// The type of artifact source used. + /// The authentication method to use to + /// access the artifact source. + /// The path from the location that the + /// 'authentication' property [say, a SAS URI to the blob container] + /// refers to, to the location of the artifacts. This can be used to + /// differentiate different versions of the artifacts. Or, different + /// types of artifacts like binaries or templates. The location + /// referenced by the authentication property concatenated with this + /// optional artifactRoot path forms the artifact source location where + /// the artifacts are expected to be found. + public ArtifactSourcePropertiesModel(string sourceType, Authentication authentication, string artifactRoot = default(string)) + { + SourceType = sourceType; + ArtifactRoot = artifactRoot; + Authentication = authentication; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the type of artifact source used. + /// + [JsonProperty(PropertyName = "sourceType")] + public string SourceType { get; set; } + + /// + /// Gets or sets the path from the location that the 'authentication' + /// property [say, a SAS URI to the blob container] refers to, to the + /// location of the artifacts. This can be used to differentiate + /// different versions of the artifacts. Or, different types of + /// artifacts like binaries or templates. The location referenced by + /// the authentication property concatenated with this optional + /// artifactRoot path forms the artifact source location where the + /// artifacts are expected to be found. + /// + [JsonProperty(PropertyName = "artifactRoot")] + public string ArtifactRoot { get; set; } + + /// + /// Gets or sets the authentication method to use to access the + /// artifact source. + /// + [JsonProperty(PropertyName = "authentication")] + public Authentication Authentication { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (SourceType == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "SourceType"); + } + if (Authentication == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Authentication"); + } + } + } +} diff --git a/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/Authentication.cs b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/Authentication.cs new file mode 100644 index 000000000000..938493020d66 --- /dev/null +++ b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/Authentication.cs @@ -0,0 +1,36 @@ +// +// 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.DeploymentManager.Models +{ + using System.Linq; + + /// + /// Defines the authentication method and properties to access the + /// artifacts. + /// + public partial class Authentication + { + /// + /// Initializes a new instance of the Authentication class. + /// + public Authentication() + { + CustomInit(); + } + + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/AzureEntityResource.cs b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/AzureEntityResource.cs new file mode 100644 index 000000000000..520ee08adcdc --- /dev/null +++ b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/AzureEntityResource.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.DeploymentManager.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// The resource model definition for a Azure Resource Manager resource + /// with an etag. + /// + public partial class AzureEntityResource : Resource + { + /// + /// Initializes a new instance of the AzureEntityResource class. + /// + public AzureEntityResource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureEntityResource class. + /// + /// Fully qualified resource Id for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. Ex- + /// Microsoft.Compute/virtualMachines or + /// Microsoft.Storage/storageAccounts. + /// Resource Etag. + public AzureEntityResource(string id = default(string), string name = default(string), string type = default(string), string etag = default(string)) + : base(id, name, type) + { + Etag = etag; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets resource Etag. + /// + [JsonProperty(PropertyName = "etag")] + public string Etag { get; private set; } + + } +} diff --git a/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/CloudErrorBody.cs b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/CloudErrorBody.cs new file mode 100644 index 000000000000..6f9be723569b --- /dev/null +++ b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/CloudErrorBody.cs @@ -0,0 +1,77 @@ +// +// 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.DeploymentManager.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Detailed error information of any failure. + /// + public partial class CloudErrorBody + { + /// + /// Initializes a new instance of the CloudErrorBody class. + /// + public CloudErrorBody() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CloudErrorBody class. + /// + /// Error code string. + /// Descriptive error information. + /// Error target + /// More detailed error information. + public CloudErrorBody(string code = default(string), string message = default(string), string target = default(string), IList details = default(IList)) + { + Code = code; + Message = message; + Target = target; + Details = details; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets error code string. + /// + [JsonProperty(PropertyName = "code")] + public string Code { get; private set; } + + /// + /// Gets descriptive error information. + /// + [JsonProperty(PropertyName = "message")] + public string Message { get; private set; } + + /// + /// Gets or sets error target + /// + [JsonProperty(PropertyName = "target")] + public string Target { get; set; } + + /// + /// Gets or sets more detailed error information. + /// + [JsonProperty(PropertyName = "details")] + public IList Details { get; set; } + + } +} diff --git a/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/DeploymentMode.cs b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/DeploymentMode.cs new file mode 100644 index 000000000000..3a85ccb37f99 --- /dev/null +++ b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/DeploymentMode.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.DeploymentManager.Models +{ + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for DeploymentMode. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum DeploymentMode + { + [EnumMember(Value = "Incremental")] + Incremental, + [EnumMember(Value = "Complete")] + Complete + } + internal static class DeploymentModeEnumExtension + { + internal static string ToSerializedValue(this DeploymentMode? value) + { + return value == null ? null : ((DeploymentMode)value).ToSerializedValue(); + } + + internal static string ToSerializedValue(this DeploymentMode value) + { + switch( value ) + { + case DeploymentMode.Incremental: + return "Incremental"; + case DeploymentMode.Complete: + return "Complete"; + } + return null; + } + + internal static DeploymentMode? ParseDeploymentMode(this string value) + { + switch( value ) + { + case "Incremental": + return DeploymentMode.Incremental; + case "Complete": + return DeploymentMode.Complete; + } + return null; + } + } +} diff --git a/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/Identity.cs b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/Identity.cs new file mode 100644 index 000000000000..c20d1388fbd4 --- /dev/null +++ b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/Identity.cs @@ -0,0 +1,79 @@ +// +// 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.DeploymentManager.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Identity for the resource. + /// + public partial class Identity + { + /// + /// Initializes a new instance of the Identity class. + /// + public Identity() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Identity class. + /// + /// The identity type. + /// The list of identities. + public Identity(string type, IList identityIds) + { + Type = type; + IdentityIds = identityIds; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the identity type. + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + + /// + /// Gets or sets the list of identities. + /// + [JsonProperty(PropertyName = "identityIds")] + public IList IdentityIds { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Type == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Type"); + } + if (IdentityIds == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "IdentityIds"); + } + } + } +} diff --git a/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/Message.cs b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/Message.cs new file mode 100644 index 000000000000..51f11f81cde6 --- /dev/null +++ b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/Message.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.DeploymentManager.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Supplementary contextual messages during a rollout. + /// + public partial class Message + { + /// + /// Initializes a new instance of the Message class. + /// + public Message() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Message class. + /// + /// Time in UTC this message was + /// provided. + /// The actual message text. + public Message(System.DateTime? timeStamp = default(System.DateTime?), string messageProperty = default(string)) + { + TimeStamp = timeStamp; + MessageProperty = messageProperty; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets time in UTC this message was provided. + /// + [JsonProperty(PropertyName = "timeStamp")] + public System.DateTime? TimeStamp { get; private set; } + + /// + /// Gets the actual message text. + /// + [JsonProperty(PropertyName = "message")] + public string MessageProperty { get; private set; } + + } +} diff --git a/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/Operation.cs b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/Operation.cs new file mode 100644 index 000000000000..7363fb7d1145 --- /dev/null +++ b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/Operation.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.DeploymentManager.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Represents an operation that can be performed on the service. + /// + public partial class Operation + { + /// + /// Initializes a new instance of the Operation class. + /// + public Operation() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Operation class. + /// + /// The name of the operation. + /// The display name of the operation. + /// The origin of the operation. + /// The properties of the operation. + public Operation(string name = default(string), OperationDetail display = default(OperationDetail), string origin = default(string), object properties = default(object)) + { + Name = name; + Display = display; + Origin = origin; + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name of the operation. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets the display name of the operation. + /// + [JsonProperty(PropertyName = "display")] + public OperationDetail Display { get; set; } + + /// + /// Gets or sets the origin of the operation. + /// + [JsonProperty(PropertyName = "origin")] + public string Origin { get; set; } + + /// + /// Gets or sets the properties of the operation. + /// + [JsonProperty(PropertyName = "properties")] + public object Properties { get; set; } + + } +} diff --git a/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/OperationDetail.cs b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/OperationDetail.cs new file mode 100644 index 000000000000..1d9f572f619a --- /dev/null +++ b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/OperationDetail.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.DeploymentManager.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// The detail about an operation. + /// + public partial class OperationDetail + { + /// + /// Initializes a new instance of the OperationDetail class. + /// + public OperationDetail() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the OperationDetail class. + /// + /// The name of the provider that supports the + /// operation. + /// The resource type on which this operation + /// can be performed. + /// The name of the operation. + /// The description of the operation. + public OperationDetail(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 the name of the provider that supports the operation. + /// + [JsonProperty(PropertyName = "provider")] + public string Provider { get; set; } + + /// + /// Gets or sets the resource type on which this operation can be + /// performed. + /// + [JsonProperty(PropertyName = "resource")] + public string Resource { get; set; } + + /// + /// Gets or sets the name of the operation. + /// + [JsonProperty(PropertyName = "operation")] + public string Operation { get; set; } + + /// + /// Gets or sets the description of the operation. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + } +} diff --git a/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/PrePostStep.cs b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/PrePostStep.cs new file mode 100644 index 000000000000..abb23ebcac0b --- /dev/null +++ b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/PrePostStep.cs @@ -0,0 +1,65 @@ +// +// 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.DeploymentManager.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// The properties that define a step. + /// + public partial class PrePostStep + { + /// + /// Initializes a new instance of the PrePostStep class. + /// + public PrePostStep() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PrePostStep class. + /// + /// The resource Id of the step to be run. + public PrePostStep(string stepId) + { + StepId = stepId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the resource Id of the step to be run. + /// + [JsonProperty(PropertyName = "stepId")] + public string StepId { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (StepId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "StepId"); + } + } + } +} diff --git a/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/ProxyResource.cs b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/ProxyResource.cs new file mode 100644 index 000000000000..76f7d74e7570 --- /dev/null +++ b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/ProxyResource.cs @@ -0,0 +1,50 @@ +// +// 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.DeploymentManager.Models +{ + using System.Linq; + + /// + /// The resource model definition for a ARM proxy resource. It will have + /// everything other than required location and tags + /// + public partial class ProxyResource : Resource + { + /// + /// Initializes a new instance of the ProxyResource class. + /// + public ProxyResource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ProxyResource class. + /// + /// Fully qualified resource Id for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. Ex- + /// Microsoft.Compute/virtualMachines or + /// Microsoft.Storage/storageAccounts. + public ProxyResource(string id = default(string), string name = default(string), string type = default(string)) + : base(id, name, type) + { + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/Resource.cs b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/Resource.cs new file mode 100644 index 000000000000..a1b477572c6d --- /dev/null +++ b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/Resource.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. +// +// 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.DeploymentManager.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Newtonsoft.Json; + using System.Linq; + + public partial class Resource : IResource + { + /// + /// Initializes a new instance of the Resource class. + /// + public Resource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Resource class. + /// + /// Fully qualified resource Id for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. Ex- + /// Microsoft.Compute/virtualMachines or + /// Microsoft.Storage/storageAccounts. + public Resource(string id = default(string), string name = default(string), string type = default(string)) + { + Id = id; + Name = name; + Type = type; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets fully qualified resource Id for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// + [JsonProperty(PropertyName = "id")] + public string Id { get; private set; } + + /// + /// Gets the name of the resource + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; private set; } + + /// + /// Gets the type of the resource. Ex- + /// Microsoft.Compute/virtualMachines or + /// Microsoft.Storage/storageAccounts. + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; private set; } + + } +} diff --git a/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/ResourceOperation.cs b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/ResourceOperation.cs new file mode 100644 index 000000000000..6296bb9e502f --- /dev/null +++ b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/ResourceOperation.cs @@ -0,0 +1,106 @@ +// +// 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.DeploymentManager.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Individual resource operation information. + /// + public partial class ResourceOperation + { + /// + /// Initializes a new instance of the ResourceOperation class. + /// + public ResourceOperation() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ResourceOperation class. + /// + /// Name of the resource as specified in the + /// artifacts. For ARM resources, this is the name of the resource + /// specified in the template. + /// Unique identifier of the operation. For + /// ARM resources, this is the operationId obtained from ARM + /// service. + /// Type of the resource as specified in the + /// artifacts. For ARM resources, this is the type of the resource + /// specified in the template. + /// State of the resource deployment. + /// For ARM resources, this is the current provisioning state of the + /// resource. + /// Descriptive information of the resource + /// operation. + /// Http status code of the operation. + public ResourceOperation(string resourceName = default(string), string operationId = default(string), string resourceType = default(string), string provisioningState = default(string), string statusMessage = default(string), string statusCode = default(string)) + { + ResourceName = resourceName; + OperationId = operationId; + ResourceType = resourceType; + ProvisioningState = provisioningState; + StatusMessage = statusMessage; + StatusCode = statusCode; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets name of the resource as specified in the artifacts. + /// For ARM resources, this is the name of the resource specified in + /// the template. + /// + [JsonProperty(PropertyName = "resourceName")] + public string ResourceName { get; set; } + + /// + /// Gets unique identifier of the operation. For ARM resources, this is + /// the operationId obtained from ARM service. + /// + [JsonProperty(PropertyName = "operationId")] + public string OperationId { get; private set; } + + /// + /// Gets or sets type of the resource as specified in the artifacts. + /// For ARM resources, this is the type of the resource specified in + /// the template. + /// + [JsonProperty(PropertyName = "resourceType")] + public string ResourceType { get; set; } + + /// + /// Gets state of the resource deployment. For ARM resources, this is + /// the current provisioning state of the resource. + /// + [JsonProperty(PropertyName = "provisioningState")] + public string ProvisioningState { get; private set; } + + /// + /// Gets descriptive information of the resource operation. + /// + [JsonProperty(PropertyName = "statusMessage")] + public string StatusMessage { get; private set; } + + /// + /// Gets http status code of the operation. + /// + [JsonProperty(PropertyName = "statusCode")] + public string StatusCode { get; private set; } + + } +} diff --git a/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/Rollout.cs b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/Rollout.cs new file mode 100644 index 000000000000..3c66441aa210 --- /dev/null +++ b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/Rollout.cs @@ -0,0 +1,187 @@ +// +// 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.DeploymentManager.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Defines the rollout. + /// + [Rest.Serialization.JsonTransformation] + public partial class Rollout : TrackedResource + { + /// + /// Initializes a new instance of the Rollout class. + /// + public Rollout() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Rollout class. + /// + /// The geo-location where the resource + /// lives + /// The version of the build being + /// deployed. + /// The resource Id of the + /// service topology from which service units are being referenced in + /// step groups to be deployed. + /// The list of step groups that define the + /// orchestration. + /// Fully qualified resource Id for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. Ex- + /// Microsoft.Compute/virtualMachines or + /// Microsoft.Storage/storageAccounts. + /// Resource tags. + /// Identity for the resource. + /// The reference to the artifact source + /// resource Id where the payload is located. + /// The current status of the rollout. + /// The cardinal count of total number + /// of retries performed on the rollout at a given time. + /// Operational information of the + /// rollout. + /// The detailed information on the services + /// being deployed. + public Rollout(string location, string buildVersion, string targetServiceTopologyId, IList stepGroups, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), Identity identity = default(Identity), string artifactSourceId = default(string), string status = default(string), int? totalRetryAttempts = default(int?), RolloutOperationInfo operationInfo = default(RolloutOperationInfo), IList services = default(IList)) + : base(location, id, name, type, tags) + { + Identity = identity; + BuildVersion = buildVersion; + ArtifactSourceId = artifactSourceId; + TargetServiceTopologyId = targetServiceTopologyId; + StepGroups = stepGroups; + Status = status; + TotalRetryAttempts = totalRetryAttempts; + OperationInfo = operationInfo; + Services = services; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets identity for the resource. + /// + [JsonProperty(PropertyName = "identity")] + public Identity Identity { get; set; } + + /// + /// Gets or sets the version of the build being deployed. + /// + [JsonProperty(PropertyName = "properties.buildVersion")] + public string BuildVersion { get; set; } + + /// + /// Gets or sets the reference to the artifact source resource Id where + /// the payload is located. + /// + [JsonProperty(PropertyName = "properties.artifactSourceId")] + public string ArtifactSourceId { get; set; } + + /// + /// Gets or sets the resource Id of the service topology from which + /// service units are being referenced in step groups to be deployed. + /// + [JsonProperty(PropertyName = "properties.targetServiceTopologyId")] + public string TargetServiceTopologyId { get; set; } + + /// + /// Gets or sets the list of step groups that define the orchestration. + /// + [JsonProperty(PropertyName = "properties.stepGroups")] + public IList StepGroups { get; set; } + + /// + /// Gets the current status of the rollout. + /// + [JsonProperty(PropertyName = "properties.status")] + public string Status { get; private set; } + + /// + /// Gets the cardinal count of total number of retries performed on the + /// rollout at a given time. + /// + [JsonProperty(PropertyName = "properties.totalRetryAttempts")] + public int? TotalRetryAttempts { get; private set; } + + /// + /// Gets operational information of the rollout. + /// + [JsonProperty(PropertyName = "properties.operationInfo")] + public RolloutOperationInfo OperationInfo { get; private set; } + + /// + /// Gets the detailed information on the services being deployed. + /// + [JsonProperty(PropertyName = "properties.services")] + public IList Services { get; private set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (BuildVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "BuildVersion"); + } + if (TargetServiceTopologyId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "TargetServiceTopologyId"); + } + if (StepGroups == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "StepGroups"); + } + if (Identity != null) + { + Identity.Validate(); + } + if (StepGroups != null) + { + foreach (var element in StepGroups) + { + if (element != null) + { + element.Validate(); + } + } + } + if (Services != null) + { + foreach (var element1 in Services) + { + if (element1 != null) + { + element1.Validate(); + } + } + } + } + } +} diff --git a/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/RolloutOperationInfo.cs b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/RolloutOperationInfo.cs new file mode 100644 index 000000000000..4619b9df7659 --- /dev/null +++ b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/RolloutOperationInfo.cs @@ -0,0 +1,96 @@ +// +// 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.DeploymentManager.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Detailed runtime information of the rollout. + /// + public partial class RolloutOperationInfo + { + /// + /// Initializes a new instance of the RolloutOperationInfo class. + /// + public RolloutOperationInfo() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the RolloutOperationInfo class. + /// + /// The ordinal count of the number of retry + /// attempts on a rollout. 0 if no retries of the rollout have been + /// performed. If the rollout is updated with a PUT, this count is + /// reset to 0. + /// True, if all steps that + /// succeeded on the previous run/attempt were chosen to be skipped in + /// this retry attempt. False, otherwise. + /// The start time of the rollout in + /// UTC. + /// The start time of the rollout in UTC. This + /// property will not be set if the rollout has not completed + /// yet. + /// The detailed error information for any + /// failure. + public RolloutOperationInfo(int? retryAttempt = default(int?), bool? skipSucceededOnRetry = default(bool?), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), CloudErrorBody error = default(CloudErrorBody)) + { + RetryAttempt = retryAttempt; + SkipSucceededOnRetry = skipSucceededOnRetry; + StartTime = startTime; + EndTime = endTime; + Error = error; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the ordinal count of the number of retry attempts on a + /// rollout. 0 if no retries of the rollout have been performed. If the + /// rollout is updated with a PUT, this count is reset to 0. + /// + [JsonProperty(PropertyName = "retryAttempt")] + public int? RetryAttempt { get; private set; } + + /// + /// Gets true, if all steps that succeeded on the previous run/attempt + /// were chosen to be skipped in this retry attempt. False, otherwise. + /// + [JsonProperty(PropertyName = "skipSucceededOnRetry")] + public bool? SkipSucceededOnRetry { get; private set; } + + /// + /// Gets the start time of the rollout in UTC. + /// + [JsonProperty(PropertyName = "startTime")] + public System.DateTime? StartTime { get; private set; } + + /// + /// Gets the start time of the rollout in UTC. This property will not + /// be set if the rollout has not completed yet. + /// + [JsonProperty(PropertyName = "endTime")] + public System.DateTime? EndTime { get; private set; } + + /// + /// Gets the detailed error information for any failure. + /// + [JsonProperty(PropertyName = "error")] + public CloudErrorBody Error { get; private set; } + + } +} diff --git a/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/RolloutPropertiesModel.cs b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/RolloutPropertiesModel.cs new file mode 100644 index 000000000000..0878c212d6f3 --- /dev/null +++ b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/RolloutPropertiesModel.cs @@ -0,0 +1,81 @@ +// +// 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.DeploymentManager.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Defines the properties of a rollout. + /// + public partial class RolloutPropertiesModel + { + /// + /// Initializes a new instance of the RolloutPropertiesModel class. + /// + public RolloutPropertiesModel() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the RolloutPropertiesModel class. + /// + /// The current status of the rollout. + /// The cardinal count of total number + /// of retries performed on the rollout at a given time. + /// Operational information of the + /// rollout. + /// The detailed information on the services + /// being deployed. + public RolloutPropertiesModel(string status = default(string), int? totalRetryAttempts = default(int?), RolloutOperationInfo operationInfo = default(RolloutOperationInfo), IList services = default(IList)) + { + Status = status; + TotalRetryAttempts = totalRetryAttempts; + OperationInfo = operationInfo; + Services = services; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the current status of the rollout. + /// + [JsonProperty(PropertyName = "status")] + public string Status { get; private set; } + + /// + /// Gets the cardinal count of total number of retries performed on the + /// rollout at a given time. + /// + [JsonProperty(PropertyName = "totalRetryAttempts")] + public int? TotalRetryAttempts { get; private set; } + + /// + /// Gets operational information of the rollout. + /// + [JsonProperty(PropertyName = "operationInfo")] + public RolloutOperationInfo OperationInfo { get; private set; } + + /// + /// Gets the detailed information on the services being deployed. + /// + [JsonProperty(PropertyName = "services")] + public IList Services { get; private set; } + + } +} diff --git a/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/RolloutRequest.cs b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/RolloutRequest.cs new file mode 100644 index 000000000000..e574d420bd35 --- /dev/null +++ b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/RolloutRequest.cs @@ -0,0 +1,145 @@ +// +// 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.DeploymentManager.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Defines the PUT rollout request body. + /// + [Rest.Serialization.JsonTransformation] + public partial class RolloutRequest : TrackedResource + { + /// + /// Initializes a new instance of the RolloutRequest class. + /// + public RolloutRequest() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the RolloutRequest class. + /// + /// The geo-location where the resource + /// lives + /// Identity for the resource. + /// The version of the build being + /// deployed. + /// The resource Id of the + /// service topology from which service units are being referenced in + /// step groups to be deployed. + /// The list of step groups that define the + /// orchestration. + /// Fully qualified resource Id for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. Ex- + /// Microsoft.Compute/virtualMachines or + /// Microsoft.Storage/storageAccounts. + /// Resource tags. + /// The reference to the artifact source + /// resource Id where the payload is located. + public RolloutRequest(string location, Identity identity, string buildVersion, string targetServiceTopologyId, IList stepGroups, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string artifactSourceId = default(string)) + : base(location, id, name, type, tags) + { + Identity = identity; + BuildVersion = buildVersion; + ArtifactSourceId = artifactSourceId; + TargetServiceTopologyId = targetServiceTopologyId; + StepGroups = stepGroups; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets identity for the resource. + /// + [JsonProperty(PropertyName = "identity")] + public Identity Identity { get; set; } + + /// + /// Gets or sets the version of the build being deployed. + /// + [JsonProperty(PropertyName = "properties.buildVersion")] + public string BuildVersion { get; set; } + + /// + /// Gets or sets the reference to the artifact source resource Id where + /// the payload is located. + /// + [JsonProperty(PropertyName = "properties.artifactSourceId")] + public string ArtifactSourceId { get; set; } + + /// + /// Gets or sets the resource Id of the service topology from which + /// service units are being referenced in step groups to be deployed. + /// + [JsonProperty(PropertyName = "properties.targetServiceTopologyId")] + public string TargetServiceTopologyId { get; set; } + + /// + /// Gets or sets the list of step groups that define the orchestration. + /// + [JsonProperty(PropertyName = "properties.stepGroups")] + public IList StepGroups { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Identity == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Identity"); + } + if (BuildVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "BuildVersion"); + } + if (TargetServiceTopologyId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "TargetServiceTopologyId"); + } + if (StepGroups == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "StepGroups"); + } + if (Identity != null) + { + Identity.Validate(); + } + if (StepGroups != null) + { + foreach (var element in StepGroups) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/RolloutStep.cs b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/RolloutStep.cs new file mode 100644 index 000000000000..1703e4bde00d --- /dev/null +++ b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/RolloutStep.cs @@ -0,0 +1,112 @@ +// +// 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.DeploymentManager.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Defines a specific step on a target service unit. + /// + public partial class RolloutStep + { + /// + /// Initializes a new instance of the RolloutStep class. + /// + public RolloutStep() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the RolloutStep class. + /// + /// Name of the step. + /// Current state of the step. + /// The step group the current step is part + /// of. + /// Detailed information of specific action + /// execution. + /// Set of resource operations that + /// were performed, if any, on an Azure resource. + /// Supplementary informative messages during + /// rollout. + public RolloutStep(string name, string status = default(string), string stepGroup = default(string), StepOperationInfo operationInfo = default(StepOperationInfo), IList resourceOperations = default(IList), IList messages = default(IList)) + { + Name = name; + Status = status; + StepGroup = stepGroup; + OperationInfo = operationInfo; + ResourceOperations = resourceOperations; + Messages = messages; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets name of the step. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets current state of the step. + /// + [JsonProperty(PropertyName = "status")] + public string Status { get; private set; } + + /// + /// Gets or sets the step group the current step is part of. + /// + [JsonProperty(PropertyName = "stepGroup")] + public string StepGroup { get; set; } + + /// + /// Gets detailed information of specific action execution. + /// + [JsonProperty(PropertyName = "operationInfo")] + public StepOperationInfo OperationInfo { get; private set; } + + /// + /// Gets set of resource operations that were performed, if any, on an + /// Azure resource. + /// + [JsonProperty(PropertyName = "resourceOperations")] + public IList ResourceOperations { get; private set; } + + /// + /// Gets supplementary informative messages during rollout. + /// + [JsonProperty(PropertyName = "messages")] + public IList Messages { get; private set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Name"); + } + } + } +} diff --git a/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/RolloutsCreateOrUpdateHeaders.cs b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/RolloutsCreateOrUpdateHeaders.cs new file mode 100644 index 000000000000..52065f65b803 --- /dev/null +++ b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/RolloutsCreateOrUpdateHeaders.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.DeploymentManager.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Defines headers for CreateOrUpdate operation. + /// + public partial class RolloutsCreateOrUpdateHeaders + { + /// + /// Initializes a new instance of the RolloutsCreateOrUpdateHeaders + /// class. + /// + public RolloutsCreateOrUpdateHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the RolloutsCreateOrUpdateHeaders + /// class. + /// + /// Contains the status URL on which + /// clients are expected to poll the status of the operation. + public RolloutsCreateOrUpdateHeaders(string azureAsyncOperation = default(string)) + { + AzureAsyncOperation = azureAsyncOperation; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets contains the status URL on which clients are expected + /// to poll the status of the operation. + /// + [JsonProperty(PropertyName = "Azure-AsyncOperation")] + public string AzureAsyncOperation { get; set; } + + } +} diff --git a/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/SasAuthentication.cs b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/SasAuthentication.cs new file mode 100644 index 000000000000..dd015fb63259 --- /dev/null +++ b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/SasAuthentication.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.DeploymentManager.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Defines the properties to access the artifacts using an Azure Storage + /// SAS URI. + /// + [Newtonsoft.Json.JsonObject("Sas")] + [Rest.Serialization.JsonTransformation] + public partial class SasAuthentication : Authentication + { + /// + /// Initializes a new instance of the SasAuthentication class. + /// + public SasAuthentication() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SasAuthentication class. + /// + /// The SAS URI to the Azure Storage blob + /// container. Any offset from the root of the container to where the + /// artifacts are located can be defined in the artifactRoot. + public SasAuthentication(string sasUri) + { + SasUri = sasUri; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the SAS URI to the Azure Storage blob container. Any + /// offset from the root of the container to where the artifacts are + /// located can be defined in the artifactRoot. + /// + [JsonProperty(PropertyName = "properties.sasUri")] + public string SasUri { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (SasUri == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "SasUri"); + } + } + } +} diff --git a/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/Service.cs b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/Service.cs new file mode 100644 index 000000000000..80e2090143a7 --- /dev/null +++ b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/Service.cs @@ -0,0 +1,90 @@ +// +// 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.DeploymentManager.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Defines a service. + /// + public partial class Service : ServiceProperties + { + /// + /// Initializes a new instance of the Service class. + /// + public Service() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Service class. + /// + /// The Azure location to which the + /// resources in the service belong to or should be deployed + /// to. + /// The subscription to which the + /// resources in the service belong to or should be deployed + /// to. + /// Name of the service. + /// The detailed information about the units + /// that make up the service. + public Service(string targetLocation, string targetSubscriptionId, string name = default(string), IList serviceUnits = default(IList)) + : base(targetLocation, targetSubscriptionId) + { + Name = name; + ServiceUnits = serviceUnits; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets name of the service. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets the detailed information about the units that make up + /// the service. + /// + [JsonProperty(PropertyName = "serviceUnits")] + public IList ServiceUnits { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (ServiceUnits != null) + { + foreach (var element in ServiceUnits) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/ServiceProperties.cs b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/ServiceProperties.cs new file mode 100644 index 000000000000..5da7f89adb50 --- /dev/null +++ b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/ServiceProperties.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.DeploymentManager.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// The properties of a service. + /// + public partial class ServiceProperties + { + /// + /// Initializes a new instance of the ServiceProperties class. + /// + public ServiceProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ServiceProperties class. + /// + /// The Azure location to which the + /// resources in the service belong to or should be deployed + /// to. + /// The subscription to which the + /// resources in the service belong to or should be deployed + /// to. + public ServiceProperties(string targetLocation, string targetSubscriptionId) + { + TargetLocation = targetLocation; + TargetSubscriptionId = targetSubscriptionId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the Azure location to which the resources in the + /// service belong to or should be deployed to. + /// + [JsonProperty(PropertyName = "targetLocation")] + public string TargetLocation { get; set; } + + /// + /// Gets or sets the subscription to which the resources in the service + /// belong to or should be deployed to. + /// + [JsonProperty(PropertyName = "targetSubscriptionId")] + public string TargetSubscriptionId { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (TargetLocation == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "TargetLocation"); + } + if (TargetSubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "TargetSubscriptionId"); + } + } + } +} diff --git a/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/ServiceResource.cs b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/ServiceResource.cs new file mode 100644 index 000000000000..522dac59ccdd --- /dev/null +++ b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/ServiceResource.cs @@ -0,0 +1,98 @@ +// +// 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.DeploymentManager.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The resource representation of a service in a service topology. + /// + [Rest.Serialization.JsonTransformation] + public partial class ServiceResource : TrackedResource + { + /// + /// Initializes a new instance of the ServiceResource class. + /// + public ServiceResource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ServiceResource class. + /// + /// The geo-location where the resource + /// lives + /// The Azure location to which the + /// resources in the service belong to or should be deployed + /// to. + /// The subscription to which the + /// resources in the service belong to or should be deployed + /// to. + /// Fully qualified resource Id for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. Ex- + /// Microsoft.Compute/virtualMachines or + /// Microsoft.Storage/storageAccounts. + /// Resource tags. + public ServiceResource(string location, string targetLocation, string targetSubscriptionId, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary)) + : base(location, id, name, type, tags) + { + TargetLocation = targetLocation; + TargetSubscriptionId = targetSubscriptionId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the Azure location to which the resources in the + /// service belong to or should be deployed to. + /// + [JsonProperty(PropertyName = "properties.targetLocation")] + public string TargetLocation { get; set; } + + /// + /// Gets or sets the subscription to which the resources in the service + /// belong to or should be deployed to. + /// + [JsonProperty(PropertyName = "properties.targetSubscriptionId")] + public string TargetSubscriptionId { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (TargetLocation == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "TargetLocation"); + } + if (TargetSubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "TargetSubscriptionId"); + } + } + } +} diff --git a/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/ServiceTopologyProperties.cs b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/ServiceTopologyProperties.cs new file mode 100644 index 000000000000..f65179278776 --- /dev/null +++ b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/ServiceTopologyProperties.cs @@ -0,0 +1,54 @@ +// +// 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.DeploymentManager.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// The properties of a service topology. + /// + public partial class ServiceTopologyProperties + { + /// + /// Initializes a new instance of the ServiceTopologyProperties class. + /// + public ServiceTopologyProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ServiceTopologyProperties class. + /// + /// The resource Id of the artifact + /// source that contains the artifacts that can be referenced in the + /// service units. + public ServiceTopologyProperties(string artifactSourceId = default(string)) + { + ArtifactSourceId = artifactSourceId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the resource Id of the artifact source that contains + /// the artifacts that can be referenced in the service units. + /// + [JsonProperty(PropertyName = "artifactSourceId")] + public string ArtifactSourceId { get; set; } + + } +} diff --git a/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/ServiceTopologyResource.cs b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/ServiceTopologyResource.cs new file mode 100644 index 000000000000..54adf27eeb2d --- /dev/null +++ b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/ServiceTopologyResource.cs @@ -0,0 +1,79 @@ +// +// 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.DeploymentManager.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The resource representation of a service topology. + /// + [Rest.Serialization.JsonTransformation] + public partial class ServiceTopologyResource : TrackedResource + { + /// + /// Initializes a new instance of the ServiceTopologyResource class. + /// + public ServiceTopologyResource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ServiceTopologyResource class. + /// + /// The geo-location where the resource + /// lives + /// Fully qualified resource Id for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. Ex- + /// Microsoft.Compute/virtualMachines or + /// Microsoft.Storage/storageAccounts. + /// Resource tags. + /// The resource Id of the artifact + /// source that contains the artifacts that can be referenced in the + /// service units. + public ServiceTopologyResource(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string artifactSourceId = default(string)) + : base(location, id, name, type, tags) + { + ArtifactSourceId = artifactSourceId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the resource Id of the artifact source that contains + /// the artifacts that can be referenced in the service units. + /// + [JsonProperty(PropertyName = "properties.artifactSourceId")] + public string ArtifactSourceId { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/ServiceUnit.cs b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/ServiceUnit.cs new file mode 100644 index 000000000000..190361c3281f --- /dev/null +++ b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/ServiceUnit.cs @@ -0,0 +1,89 @@ +// +// 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.DeploymentManager.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Defines a service unit. + /// + public partial class ServiceUnit : ServiceUnitProperties + { + /// + /// Initializes a new instance of the ServiceUnit class. + /// + public ServiceUnit() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ServiceUnit class. + /// + /// The Azure Resource Group to which + /// the resources in the service unit belong to or should be deployed + /// to. + /// Describes the type of ARM deployment + /// to be performed on the resource. Possible values include: + /// 'Incremental', 'Complete' + /// The artifacts for the service unit. + /// Name of the service unit. + /// Detailed step information, if present. + public ServiceUnit(string targetResourceGroup, DeploymentMode deploymentMode, ServiceUnitArtifacts artifacts = default(ServiceUnitArtifacts), string name = default(string), IList steps = default(IList)) + : base(targetResourceGroup, deploymentMode, artifacts) + { + Name = name; + Steps = steps; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets name of the service unit. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets detailed step information, if present. + /// + [JsonProperty(PropertyName = "steps")] + public IList Steps { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Steps != null) + { + foreach (var element in Steps) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/ServiceUnitArtifacts.cs b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/ServiceUnitArtifacts.cs new file mode 100644 index 000000000000..cee7c916e0e1 --- /dev/null +++ b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/ServiceUnitArtifacts.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.DeploymentManager.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Defines the artifacts of a service unit. + /// + public partial class ServiceUnitArtifacts + { + /// + /// Initializes a new instance of the ServiceUnitArtifacts class. + /// + public ServiceUnitArtifacts() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ServiceUnitArtifacts class. + /// + /// The full URI of the ARM template file + /// with the SAS token. + /// The full URI of the ARM parameters file + /// with the SAS token. + /// The path to the + /// ARM template file relative to the artifact source. + /// The path to the + /// ARM parameters file relative to the artifact source. + public ServiceUnitArtifacts(string templateUri = default(string), string parametersUri = default(string), string templateArtifactSourceRelativePath = default(string), string parametersArtifactSourceRelativePath = default(string)) + { + TemplateUri = templateUri; + ParametersUri = parametersUri; + TemplateArtifactSourceRelativePath = templateArtifactSourceRelativePath; + ParametersArtifactSourceRelativePath = parametersArtifactSourceRelativePath; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the full URI of the ARM template file with the SAS + /// token. + /// + [JsonProperty(PropertyName = "templateUri")] + public string TemplateUri { get; set; } + + /// + /// Gets or sets the full URI of the ARM parameters file with the SAS + /// token. + /// + [JsonProperty(PropertyName = "parametersUri")] + public string ParametersUri { get; set; } + + /// + /// Gets or sets the path to the ARM template file relative to the + /// artifact source. + /// + [JsonProperty(PropertyName = "templateArtifactSourceRelativePath")] + public string TemplateArtifactSourceRelativePath { get; set; } + + /// + /// Gets or sets the path to the ARM parameters file relative to the + /// artifact source. + /// + [JsonProperty(PropertyName = "parametersArtifactSourceRelativePath")] + public string ParametersArtifactSourceRelativePath { get; set; } + + } +} diff --git a/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/ServiceUnitProperties.cs b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/ServiceUnitProperties.cs new file mode 100644 index 000000000000..dfad522eed1b --- /dev/null +++ b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/ServiceUnitProperties.cs @@ -0,0 +1,87 @@ +// +// 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.DeploymentManager.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Defines the properties of a service unit. + /// + public partial class ServiceUnitProperties + { + /// + /// Initializes a new instance of the ServiceUnitProperties class. + /// + public ServiceUnitProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ServiceUnitProperties class. + /// + /// The Azure Resource Group to which + /// the resources in the service unit belong to or should be deployed + /// to. + /// Describes the type of ARM deployment + /// to be performed on the resource. Possible values include: + /// 'Incremental', 'Complete' + /// The artifacts for the service unit. + public ServiceUnitProperties(string targetResourceGroup, DeploymentMode deploymentMode, ServiceUnitArtifacts artifacts = default(ServiceUnitArtifacts)) + { + TargetResourceGroup = targetResourceGroup; + DeploymentMode = deploymentMode; + Artifacts = artifacts; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the Azure Resource Group to which the resources in the + /// service unit belong to or should be deployed to. + /// + [JsonProperty(PropertyName = "targetResourceGroup")] + public string TargetResourceGroup { get; set; } + + /// + /// Gets or sets describes the type of ARM deployment to be performed + /// on the resource. Possible values include: 'Incremental', 'Complete' + /// + [JsonProperty(PropertyName = "deploymentMode")] + public DeploymentMode DeploymentMode { get; set; } + + /// + /// Gets or sets the artifacts for the service unit. + /// + [JsonProperty(PropertyName = "artifacts")] + public ServiceUnitArtifacts Artifacts { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (TargetResourceGroup == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "TargetResourceGroup"); + } + } + } +} diff --git a/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/ServiceUnitResource.cs b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/ServiceUnitResource.cs new file mode 100644 index 000000000000..14d81391c8ab --- /dev/null +++ b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/ServiceUnitResource.cs @@ -0,0 +1,102 @@ +// +// 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.DeploymentManager.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Represents the response of a service unit resource. + /// + [Rest.Serialization.JsonTransformation] + public partial class ServiceUnitResource : TrackedResource + { + /// + /// Initializes a new instance of the ServiceUnitResource class. + /// + public ServiceUnitResource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ServiceUnitResource class. + /// + /// The geo-location where the resource + /// lives + /// The Azure Resource Group to which + /// the resources in the service unit belong to or should be deployed + /// to. + /// Describes the type of ARM deployment + /// to be performed on the resource. Possible values include: + /// 'Incremental', 'Complete' + /// Fully qualified resource Id for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. Ex- + /// Microsoft.Compute/virtualMachines or + /// Microsoft.Storage/storageAccounts. + /// Resource tags. + /// The artifacts for the service unit. + public ServiceUnitResource(string location, string targetResourceGroup, DeploymentMode deploymentMode, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), ServiceUnitArtifacts artifacts = default(ServiceUnitArtifacts)) + : base(location, id, name, type, tags) + { + TargetResourceGroup = targetResourceGroup; + DeploymentMode = deploymentMode; + Artifacts = artifacts; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the Azure Resource Group to which the resources in the + /// service unit belong to or should be deployed to. + /// + [JsonProperty(PropertyName = "properties.targetResourceGroup")] + public string TargetResourceGroup { get; set; } + + /// + /// Gets or sets describes the type of ARM deployment to be performed + /// on the resource. Possible values include: 'Incremental', 'Complete' + /// + [JsonProperty(PropertyName = "properties.deploymentMode")] + public DeploymentMode DeploymentMode { get; set; } + + /// + /// Gets or sets the artifacts for the service unit. + /// + [JsonProperty(PropertyName = "properties.artifacts")] + public ServiceUnitArtifacts Artifacts { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (TargetResourceGroup == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "TargetResourceGroup"); + } + } + } +} diff --git a/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/ServiceUnitsCreateOrUpdateHeaders.cs b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/ServiceUnitsCreateOrUpdateHeaders.cs new file mode 100644 index 000000000000..dd3f65034c2f --- /dev/null +++ b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/ServiceUnitsCreateOrUpdateHeaders.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.DeploymentManager.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Defines headers for CreateOrUpdate operation. + /// + public partial class ServiceUnitsCreateOrUpdateHeaders + { + /// + /// Initializes a new instance of the ServiceUnitsCreateOrUpdateHeaders + /// class. + /// + public ServiceUnitsCreateOrUpdateHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ServiceUnitsCreateOrUpdateHeaders + /// class. + /// + /// Contains the status URL on which + /// clients are expected to poll the status of the operation. + public ServiceUnitsCreateOrUpdateHeaders(string azureAsyncOperation = default(string)) + { + AzureAsyncOperation = azureAsyncOperation; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets contains the status URL on which clients are expected + /// to poll the status of the operation. + /// + [JsonProperty(PropertyName = "Azure-AsyncOperation")] + public string AzureAsyncOperation { get; set; } + + } +} diff --git a/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/Step.cs b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/Step.cs new file mode 100644 index 000000000000..f2578fb2706c --- /dev/null +++ b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/Step.cs @@ -0,0 +1,133 @@ +// +// 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.DeploymentManager.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The properties that define an Azure Deployment Manager step. + /// + public partial class Step + { + /// + /// Initializes a new instance of the Step class. + /// + public Step() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Step class. + /// + /// The name of the step group. + /// The resource Id of service unit to + /// be deployed. The service unit should be from the service topology + /// referenced in targetServiceTopologyId + /// The list of step group names on + /// which this step group depends on. + /// The list of steps to be run before + /// deploying the target. + /// The list of steps to be run after + /// deploying the target. + public Step(string name, string deploymentTargetId, IList dependsOnStepGroups = default(IList), IList preDeploymentSteps = default(IList), IList postDeploymentSteps = default(IList)) + { + Name = name; + DependsOnStepGroups = dependsOnStepGroups; + PreDeploymentSteps = preDeploymentSteps; + DeploymentTargetId = deploymentTargetId; + PostDeploymentSteps = postDeploymentSteps; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name of the step group. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets the list of step group names on which this step group + /// depends on. + /// + [JsonProperty(PropertyName = "dependsOnStepGroups")] + public IList DependsOnStepGroups { get; set; } + + /// + /// Gets or sets the list of steps to be run before deploying the + /// target. + /// + [JsonProperty(PropertyName = "preDeploymentSteps")] + public IList PreDeploymentSteps { get; set; } + + /// + /// Gets or sets the resource Id of service unit to be deployed. The + /// service unit should be from the service topology referenced in + /// targetServiceTopologyId + /// + [JsonProperty(PropertyName = "deploymentTargetId")] + public string DeploymentTargetId { get; set; } + + /// + /// Gets or sets the list of steps to be run after deploying the + /// target. + /// + [JsonProperty(PropertyName = "postDeploymentSteps")] + public IList PostDeploymentSteps { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Name"); + } + if (DeploymentTargetId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "DeploymentTargetId"); + } + if (PreDeploymentSteps != null) + { + foreach (var element in PreDeploymentSteps) + { + if (element != null) + { + element.Validate(); + } + } + } + if (PostDeploymentSteps != null) + { + foreach (var element1 in PostDeploymentSteps) + { + if (element1 != null) + { + element1.Validate(); + } + } + } + } + } +} diff --git a/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/StepOperationInfo.cs b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/StepOperationInfo.cs new file mode 100644 index 000000000000..19bd8b20d637 --- /dev/null +++ b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/StepOperationInfo.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.DeploymentManager.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Detailed information of a specific step run. + /// + public partial class StepOperationInfo + { + /// + /// Initializes a new instance of the StepOperationInfo class. + /// + public StepOperationInfo() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the StepOperationInfo class. + /// + /// The name of the ARM deployment + /// initiated as part of the step. + /// Unique identifier to track the request + /// for ARM-based resources. + /// Start time of the action in UTC. + /// End time of the action in UTC. + /// Last time in UTC this operation was + /// updated. + /// The errors, if any, for the action. + public StepOperationInfo(string deploymentName = default(string), string correlationId = default(string), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), System.DateTime? lastUpdatedTime = default(System.DateTime?), CloudErrorBody error = default(CloudErrorBody)) + { + DeploymentName = deploymentName; + CorrelationId = correlationId; + StartTime = startTime; + EndTime = endTime; + LastUpdatedTime = lastUpdatedTime; + Error = error; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the name of the ARM deployment initiated as part of the step. + /// + [JsonProperty(PropertyName = "deploymentName")] + public string DeploymentName { get; private set; } + + /// + /// Gets unique identifier to track the request for ARM-based + /// resources. + /// + [JsonProperty(PropertyName = "correlationId")] + public string CorrelationId { get; private set; } + + /// + /// Gets start time of the action in UTC. + /// + [JsonProperty(PropertyName = "startTime")] + public System.DateTime? StartTime { get; private set; } + + /// + /// Gets end time of the action in UTC. + /// + [JsonProperty(PropertyName = "endTime")] + public System.DateTime? EndTime { get; private set; } + + /// + /// Gets last time in UTC this operation was updated. + /// + [JsonProperty(PropertyName = "lastUpdatedTime")] + public System.DateTime? LastUpdatedTime { get; private set; } + + /// + /// Gets or sets the errors, if any, for the action. + /// + [JsonProperty(PropertyName = "error")] + public CloudErrorBody Error { get; set; } + + } +} diff --git a/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/StepProperties.cs b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/StepProperties.cs new file mode 100644 index 000000000000..9155408cbae5 --- /dev/null +++ b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/StepProperties.cs @@ -0,0 +1,35 @@ +// +// 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.DeploymentManager.Models +{ + using System.Linq; + + /// + /// The properties of a step resource. + /// + public partial class StepProperties + { + /// + /// Initializes a new instance of the StepProperties class. + /// + public StepProperties() + { + CustomInit(); + } + + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/StepResource.cs b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/StepResource.cs new file mode 100644 index 000000000000..6f0efca8183e --- /dev/null +++ b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/StepResource.cs @@ -0,0 +1,79 @@ +// +// 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.DeploymentManager.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The resource representation of a rollout step. + /// + public partial class StepResource : TrackedResource + { + /// + /// Initializes a new instance of the StepResource class. + /// + public StepResource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the StepResource class. + /// + /// The geo-location where the resource + /// lives + /// The properties that define the + /// step. + /// Fully qualified resource Id for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. Ex- + /// Microsoft.Compute/virtualMachines or + /// Microsoft.Storage/storageAccounts. + /// Resource tags. + public StepResource(string location, StepProperties properties, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary)) + : base(location, id, name, type, tags) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the properties that define the step. + /// + [JsonProperty(PropertyName = "properties")] + public StepProperties Properties { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Properties == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Properties"); + } + } + } +} diff --git a/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/TrackedResource.cs b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/TrackedResource.cs new file mode 100644 index 000000000000..5143dbe54469 --- /dev/null +++ b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/TrackedResource.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.DeploymentManager.Models +{ + using Microsoft.Rest; + 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. + /// + /// The geo-location where the resource + /// lives + /// Fully qualified resource Id for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. Ex- + /// Microsoft.Compute/virtualMachines or + /// Microsoft.Storage/storageAccounts. + /// Resource tags. + public TrackedResource(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary)) + : base(id, name, type) + { + Tags = tags; + Location = location; + 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; } + + /// + /// Gets or sets the geo-location where the resource lives + /// + [JsonProperty(PropertyName = "location")] + public string Location { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Location == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Location"); + } + } + } +} diff --git a/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/WaitStepAttributes.cs b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/WaitStepAttributes.cs new file mode 100644 index 000000000000..1ceddd7fbd0a --- /dev/null +++ b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/WaitStepAttributes.cs @@ -0,0 +1,67 @@ +// +// 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.DeploymentManager.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// The parameters for the wait step. + /// + public partial class WaitStepAttributes + { + /// + /// Initializes a new instance of the WaitStepAttributes class. + /// + public WaitStepAttributes() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the WaitStepAttributes class. + /// + /// The duration in ISO 8601 format of how long + /// the wait should be. + public WaitStepAttributes(string duration) + { + Duration = duration; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the duration in ISO 8601 format of how long the wait + /// should be. + /// + [JsonProperty(PropertyName = "duration")] + public string Duration { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Duration == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Duration"); + } + } + } +} diff --git a/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/WaitStepProperties.cs b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/WaitStepProperties.cs new file mode 100644 index 000000000000..4b20ea4dd373 --- /dev/null +++ b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Models/WaitStepProperties.cs @@ -0,0 +1,65 @@ +// +// 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.DeploymentManager.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Defines the properties of a Wait step. + /// + [Newtonsoft.Json.JsonObject("Wait")] + public partial class WaitStepProperties : StepProperties + { + /// + /// Initializes a new instance of the WaitStepProperties class. + /// + public WaitStepProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the WaitStepProperties class. + /// + /// The Wait attributes + public WaitStepProperties(WaitStepAttributes attributes = default(WaitStepAttributes)) + { + Attributes = attributes; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the Wait attributes + /// + [JsonProperty(PropertyName = "attributes")] + public WaitStepAttributes Attributes { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Attributes != null) + { + Attributes.Validate(); + } + } + } +} diff --git a/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Operations.cs b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Operations.cs new file mode 100644 index 000000000000..f5efee43c8ab --- /dev/null +++ b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/Operations.cs @@ -0,0 +1,232 @@ +// +// 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.DeploymentManager +{ + 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(AzureDeploymentManagerClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the AzureDeploymentManagerClient + /// + public AzureDeploymentManagerClient Client { get; private set; } + + /// + /// Gets an operation resource. + /// + /// + /// 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(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, "Get", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.DeploymentManager/operations").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 CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + 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/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/OperationsExtensions.cs b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/OperationsExtensions.cs new file mode 100644 index 000000000000..6d4eb2eb177d --- /dev/null +++ b/src/SDKs/DeploymentManager/Management.DeploymentManager/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.DeploymentManager +{ + 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 + { + /// + /// Gets an operation resource. + /// + /// + /// The operations group for this extension method. + /// + public static IList Get(this IOperations operations) + { + return operations.GetAsync().GetAwaiter().GetResult(); + } + + /// + /// Gets an operation resource. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task> GetAsync(this IOperations operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/RolloutsOperations.cs b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/RolloutsOperations.cs new file mode 100644 index 000000000000..bd7899b5678d --- /dev/null +++ b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/RolloutsOperations.cs @@ -0,0 +1,1176 @@ +// +// 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.DeploymentManager +{ + 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; + + /// + /// RolloutsOperations operations. + /// + internal partial class RolloutsOperations : IServiceOperations, IRolloutsOperations + { + /// + /// Initializes a new instance of the RolloutsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal RolloutsOperations(AzureDeploymentManagerClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the AzureDeploymentManagerClient + /// + public AzureDeploymentManagerClient Client { get; private set; } + + /// + /// Creates or updates a rollout. + /// + /// + /// This is an asynchronous operation and can be polled to completion using the + /// location header returned by this operation. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The rollout name. + /// + /// + /// Source rollout request object that defines the rollout. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string rolloutName, RolloutRequest rolloutRequest = default(RolloutRequest), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send Request + AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, rolloutName, rolloutRequest, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets detailed information of a rollout. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The rollout name. + /// + /// + /// Rollout retry attempt ordinal to get the result of. If not specified, + /// result of the latest attempt will be returned. + /// + /// + /// 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 rolloutName, int? retryAttempt = default(int?), 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 (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (rolloutName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "rolloutName"); + } + 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("rolloutName", rolloutName); + tracingParameters.Add("retryAttempt", retryAttempt); + 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.DeploymentManager/rollouts/{rolloutName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{rolloutName}", System.Uri.EscapeDataString(rolloutName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (retryAttempt != null) + { + _queryParameters.Add(string.Format("retryAttempt={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(retryAttempt, Client.SerializationSettings).Trim('"')))); + } + 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 CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + 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; + } + + /// + /// Deletes a rollout resource. + /// + /// + /// Only rollouts in terminal state can be deleted. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The rollout name. + /// + /// + /// 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 rolloutName, 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 (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (rolloutName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "rolloutName"); + } + 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("rolloutName", rolloutName); + 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.DeploymentManager/rollouts/{rolloutName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{rolloutName}", System.Uri.EscapeDataString(rolloutName)); + 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 CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + 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; + } + + /// + /// Stops a running rollout. + /// + /// + /// Only running rollouts can be canceled. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The rollout 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> CancelWithHttpMessagesAsync(string resourceGroupName, string rolloutName, 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 (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (rolloutName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "rolloutName"); + } + 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("rolloutName", rolloutName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Cancel", 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.DeploymentManager/rollouts/{rolloutName}/cancel").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{rolloutName}", System.Uri.EscapeDataString(rolloutName)); + 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("POST"); + _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 CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + 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; + } + + /// + /// Restarts a failed rollout and optionally skips all succeeded steps. + /// + /// + /// Only failed rollouts can be restarted. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The rollout name. + /// + /// + /// If true, will skip all succeeded steps so far in the rollout. If false, + /// will execute the entire rollout again regardless of the current state of + /// individual resources. Defaults to false if not specified. + /// + /// + /// 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> RestartWithHttpMessagesAsync(string resourceGroupName, string rolloutName, bool? skipSucceeded = default(bool?), 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 (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (rolloutName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "rolloutName"); + } + 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("rolloutName", rolloutName); + tracingParameters.Add("skipSucceeded", skipSucceeded); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Restart", 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.DeploymentManager/rollouts/{rolloutName}/restart").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{rolloutName}", System.Uri.EscapeDataString(rolloutName)); + List _queryParameters = new List(); + if (skipSucceeded != null) + { + _queryParameters.Add(string.Format("skipSucceeded={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(skipSucceeded, Client.SerializationSettings).Trim('"')))); + } + 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("POST"); + _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 CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + 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 or updates a rollout. + /// + /// + /// This is an asynchronous operation and can be polled to completion using the + /// location header returned by this operation. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The rollout name. + /// + /// + /// Source rollout request object that defines the rollout. + /// + /// + /// 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 resourceGroupName, string rolloutName, RolloutRequest rolloutRequest = default(RolloutRequest), 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 (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (rolloutName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "rolloutName"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (rolloutRequest != null) + { + rolloutRequest.Validate(); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("rolloutName", rolloutName); + tracingParameters.Add("rolloutRequest", rolloutRequest); + 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.DeploymentManager/rollouts/{rolloutName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{rolloutName}", System.Uri.EscapeDataString(rolloutName)); + 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(rolloutRequest != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(rolloutRequest, 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 != 201) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + 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 == 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); + } + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/RolloutsOperationsExtensions.cs b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/RolloutsOperationsExtensions.cs new file mode 100644 index 000000000000..46036429af64 --- /dev/null +++ b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/RolloutsOperationsExtensions.cs @@ -0,0 +1,326 @@ +// +// 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.DeploymentManager +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for RolloutsOperations. + /// + public static partial class RolloutsOperationsExtensions + { + /// + /// Creates or updates a rollout. + /// + /// + /// This is an asynchronous operation and can be polled to completion using the + /// location header returned by this operation. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The rollout name. + /// + /// + /// Source rollout request object that defines the rollout. + /// + public static RolloutRequest CreateOrUpdate(this IRolloutsOperations operations, string resourceGroupName, string rolloutName, RolloutRequest rolloutRequest = default(RolloutRequest)) + { + return operations.CreateOrUpdateAsync(resourceGroupName, rolloutName, rolloutRequest).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates a rollout. + /// + /// + /// This is an asynchronous operation and can be polled to completion using the + /// location header returned by this operation. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The rollout name. + /// + /// + /// Source rollout request object that defines the rollout. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this IRolloutsOperations operations, string resourceGroupName, string rolloutName, RolloutRequest rolloutRequest = default(RolloutRequest), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, rolloutName, rolloutRequest, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets detailed information of a rollout. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The rollout name. + /// + /// + /// Rollout retry attempt ordinal to get the result of. If not specified, + /// result of the latest attempt will be returned. + /// + public static Rollout Get(this IRolloutsOperations operations, string resourceGroupName, string rolloutName, int? retryAttempt = default(int?)) + { + return operations.GetAsync(resourceGroupName, rolloutName, retryAttempt).GetAwaiter().GetResult(); + } + + /// + /// Gets detailed information of a rollout. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The rollout name. + /// + /// + /// Rollout retry attempt ordinal to get the result of. If not specified, + /// result of the latest attempt will be returned. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IRolloutsOperations operations, string resourceGroupName, string rolloutName, int? retryAttempt = default(int?), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, rolloutName, retryAttempt, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes a rollout resource. + /// + /// + /// Only rollouts in terminal state can be deleted. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The rollout name. + /// + public static void Delete(this IRolloutsOperations operations, string resourceGroupName, string rolloutName) + { + operations.DeleteAsync(resourceGroupName, rolloutName).GetAwaiter().GetResult(); + } + + /// + /// Deletes a rollout resource. + /// + /// + /// Only rollouts in terminal state can be deleted. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The rollout name. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IRolloutsOperations operations, string resourceGroupName, string rolloutName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, rolloutName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Stops a running rollout. + /// + /// + /// Only running rollouts can be canceled. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The rollout name. + /// + public static Rollout Cancel(this IRolloutsOperations operations, string resourceGroupName, string rolloutName) + { + return operations.CancelAsync(resourceGroupName, rolloutName).GetAwaiter().GetResult(); + } + + /// + /// Stops a running rollout. + /// + /// + /// Only running rollouts can be canceled. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The rollout name. + /// + /// + /// The cancellation token. + /// + public static async Task CancelAsync(this IRolloutsOperations operations, string resourceGroupName, string rolloutName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CancelWithHttpMessagesAsync(resourceGroupName, rolloutName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Restarts a failed rollout and optionally skips all succeeded steps. + /// + /// + /// Only failed rollouts can be restarted. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The rollout name. + /// + /// + /// If true, will skip all succeeded steps so far in the rollout. If false, + /// will execute the entire rollout again regardless of the current state of + /// individual resources. Defaults to false if not specified. + /// + public static Rollout Restart(this IRolloutsOperations operations, string resourceGroupName, string rolloutName, bool? skipSucceeded = default(bool?)) + { + return operations.RestartAsync(resourceGroupName, rolloutName, skipSucceeded).GetAwaiter().GetResult(); + } + + /// + /// Restarts a failed rollout and optionally skips all succeeded steps. + /// + /// + /// Only failed rollouts can be restarted. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The rollout name. + /// + /// + /// If true, will skip all succeeded steps so far in the rollout. If false, + /// will execute the entire rollout again regardless of the current state of + /// individual resources. Defaults to false if not specified. + /// + /// + /// The cancellation token. + /// + public static async Task RestartAsync(this IRolloutsOperations operations, string resourceGroupName, string rolloutName, bool? skipSucceeded = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.RestartWithHttpMessagesAsync(resourceGroupName, rolloutName, skipSucceeded, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates or updates a rollout. + /// + /// + /// This is an asynchronous operation and can be polled to completion using the + /// location header returned by this operation. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The rollout name. + /// + /// + /// Source rollout request object that defines the rollout. + /// + public static RolloutRequest BeginCreateOrUpdate(this IRolloutsOperations operations, string resourceGroupName, string rolloutName, RolloutRequest rolloutRequest = default(RolloutRequest)) + { + return operations.BeginCreateOrUpdateAsync(resourceGroupName, rolloutName, rolloutRequest).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates a rollout. + /// + /// + /// This is an asynchronous operation and can be polled to completion using the + /// location header returned by this operation. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The rollout name. + /// + /// + /// Source rollout request object that defines the rollout. + /// + /// + /// The cancellation token. + /// + public static async Task BeginCreateOrUpdateAsync(this IRolloutsOperations operations, string resourceGroupName, string rolloutName, RolloutRequest rolloutRequest = default(RolloutRequest), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, rolloutName, rolloutRequest, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/SdkInfo_AzureDeploymentManager.cs b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/SdkInfo_AzureDeploymentManager.cs new file mode 100644 index 000000000000..7da22c92e40a --- /dev/null +++ b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/SdkInfo_AzureDeploymentManager.cs @@ -0,0 +1,44 @@ + +// +// 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.DeploymentManager +{ + using System; + using System.Collections.Generic; + using System.Linq; + + internal static partial class SdkInfo + { + public static IEnumerable> ApiInfo_AzureDeploymentManager + { + get + { + return new Tuple[] + { + new Tuple("DeploymentManager", "ArtifactSources", "2018-09-01-preview"), + new Tuple("DeploymentManager", "Operations", "2018-09-01-preview"), + new Tuple("DeploymentManager", "Rollouts", "2018-09-01-preview"), + new Tuple("DeploymentManager", "ServiceTopologies", "2018-09-01-preview"), + new Tuple("DeploymentManager", "ServiceUnits", "2018-09-01-preview"), + new Tuple("DeploymentManager", "Services", "2018-09-01-preview"), + new Tuple("DeploymentManager", "Steps", "2018-09-01-preview"), + }.AsEnumerable(); + } + } + // BEGIN: Code Generation Metadata Section + public static readonly String AutoRestVersion = "latest"; + public static readonly String AutoRestBootStrapperVersion = "autorest@2.0.4283"; + public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/deploymentmanager/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=E:\\repos\\azure-sdk-for-net\\src\\SDKs"; + public static readonly String GithubForkName = "Azure"; + public static readonly String GithubBranchName = "master"; + public static readonly String GithubCommidId = "67d6bf5c72fb183114938332e72f5d8d995f9979"; + public static readonly String CodeGenerationErrors = ""; + public static readonly String GithubRepoName = "azure-rest-api-specs"; + // END: Code Generation Metadata Section + } +} + diff --git a/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/ServiceTopologiesOperations.cs b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/ServiceTopologiesOperations.cs new file mode 100644 index 000000000000..9b47ccd16653 --- /dev/null +++ b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/ServiceTopologiesOperations.cs @@ -0,0 +1,688 @@ +// +// 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.DeploymentManager +{ + 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; + + /// + /// ServiceTopologiesOperations operations. + /// + internal partial class ServiceTopologiesOperations : IServiceOperations, IServiceTopologiesOperations + { + /// + /// Initializes a new instance of the ServiceTopologiesOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal ServiceTopologiesOperations(AzureDeploymentManagerClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the AzureDeploymentManagerClient + /// + public AzureDeploymentManagerClient Client { get; private set; } + + /// + /// Creates or updates a service topology. + /// + /// + /// Synchronously creates a new service topology or updates an existing service + /// topology. + /// + /// + /// Source topology object defines the resource. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the service topology . + /// + /// + /// 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(ServiceTopologyResource serviceTopologyInfo, string resourceGroupName, string serviceTopologyName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (serviceTopologyInfo == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceTopologyInfo"); + } + if (serviceTopologyInfo != null) + { + serviceTopologyInfo.Validate(); + } + 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 (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (serviceTopologyName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceTopologyName"); + } + 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("serviceTopologyInfo", serviceTopologyInfo); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceTopologyName", serviceTopologyName); + 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.DeploymentManager/serviceTopologies/{serviceTopologyName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceTopologyName}", System.Uri.EscapeDataString(serviceTopologyName)); + 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(serviceTopologyInfo != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(serviceTopologyInfo, 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 != 201) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + 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 == 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; + } + + /// + /// Gets the service topology. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the service topology . + /// + /// + /// 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 serviceTopologyName, 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 (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (serviceTopologyName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceTopologyName"); + } + 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("serviceTopologyName", serviceTopologyName); + 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.DeploymentManager/serviceTopologies/{serviceTopologyName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceTopologyName}", System.Uri.EscapeDataString(serviceTopologyName)); + 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 CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + 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; + } + + /// + /// Deletes the service topology. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the service topology . + /// + /// + /// 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 serviceTopologyName, 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 (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (serviceTopologyName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceTopologyName"); + } + 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("serviceTopologyName", serviceTopologyName); + 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.DeploymentManager/serviceTopologies/{serviceTopologyName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceTopologyName}", System.Uri.EscapeDataString(serviceTopologyName)); + 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 CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + 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; + } + + } +} diff --git a/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/ServiceTopologiesOperationsExtensions.cs b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/ServiceTopologiesOperationsExtensions.cs new file mode 100644 index 000000000000..16b52b57f5b2 --- /dev/null +++ b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/ServiceTopologiesOperationsExtensions.cs @@ -0,0 +1,156 @@ +// +// 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.DeploymentManager +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for ServiceTopologiesOperations. + /// + public static partial class ServiceTopologiesOperationsExtensions + { + /// + /// Creates or updates a service topology. + /// + /// + /// Synchronously creates a new service topology or updates an existing service + /// topology. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Source topology object defines the resource. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the service topology . + /// + public static ServiceTopologyResource CreateOrUpdate(this IServiceTopologiesOperations operations, ServiceTopologyResource serviceTopologyInfo, string resourceGroupName, string serviceTopologyName) + { + return operations.CreateOrUpdateAsync(serviceTopologyInfo, resourceGroupName, serviceTopologyName).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates a service topology. + /// + /// + /// Synchronously creates a new service topology or updates an existing service + /// topology. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Source topology object defines the resource. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the service topology . + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this IServiceTopologiesOperations operations, ServiceTopologyResource serviceTopologyInfo, string resourceGroupName, string serviceTopologyName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(serviceTopologyInfo, resourceGroupName, serviceTopologyName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the service topology. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the service topology . + /// + public static ServiceTopologyResource Get(this IServiceTopologiesOperations operations, string resourceGroupName, string serviceTopologyName) + { + return operations.GetAsync(resourceGroupName, serviceTopologyName).GetAwaiter().GetResult(); + } + + /// + /// Gets the service topology. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the service topology . + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IServiceTopologiesOperations operations, string resourceGroupName, string serviceTopologyName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serviceTopologyName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes the service topology. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the service topology . + /// + public static void Delete(this IServiceTopologiesOperations operations, string resourceGroupName, string serviceTopologyName) + { + operations.DeleteAsync(resourceGroupName, serviceTopologyName).GetAwaiter().GetResult(); + } + + /// + /// Deletes the service topology. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the service topology . + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IServiceTopologiesOperations operations, string resourceGroupName, string serviceTopologyName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, serviceTopologyName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + } +} diff --git a/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/ServiceUnitsOperations.cs b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/ServiceUnitsOperations.cs new file mode 100644 index 000000000000..9917d746b353 --- /dev/null +++ b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/ServiceUnitsOperations.cs @@ -0,0 +1,792 @@ +// +// 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.DeploymentManager +{ + 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; + + /// + /// ServiceUnitsOperations operations. + /// + internal partial class ServiceUnitsOperations : IServiceOperations, IServiceUnitsOperations + { + /// + /// Initializes a new instance of the ServiceUnitsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal ServiceUnitsOperations(AzureDeploymentManagerClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the AzureDeploymentManagerClient + /// + public AzureDeploymentManagerClient Client { get; private set; } + + /// + /// Creates or updates a service unit under the service in the service + /// topology. + /// + /// + /// This is an asynchronous operation and can be polled to completion using the + /// operation resource returned by this operation. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the service topology . + /// + /// + /// The name of the service resource. + /// + /// + /// The name of the service unit resource. + /// + /// + /// The service unit resource object. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serviceTopologyName, string serviceName, string serviceUnitName, ServiceUnitResource serviceUnitInfo, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send Request + AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serviceTopologyName, serviceName, serviceUnitName, serviceUnitInfo, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the service unit. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the service topology . + /// + /// + /// The name of the service resource. + /// + /// + /// The name of the service unit resource. + /// + /// + /// 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 serviceTopologyName, string serviceName, string serviceUnitName, 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 (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (serviceTopologyName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceTopologyName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceUnitName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceUnitName"); + } + 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("serviceTopologyName", serviceTopologyName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("serviceUnitName", serviceUnitName); + 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.DeploymentManager/serviceTopologies/{serviceTopologyName}/services/{serviceName}/serviceUnits/{serviceUnitName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceTopologyName}", System.Uri.EscapeDataString(serviceTopologyName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{serviceUnitName}", System.Uri.EscapeDataString(serviceUnitName)); + 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 CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + 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; + } + + /// + /// Deletes the service unit. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the service topology . + /// + /// + /// The name of the service resource. + /// + /// + /// The name of the service unit resource. + /// + /// + /// 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 serviceTopologyName, string serviceName, string serviceUnitName, 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 (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (serviceTopologyName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceTopologyName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceUnitName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceUnitName"); + } + 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("serviceTopologyName", serviceTopologyName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("serviceUnitName", serviceUnitName); + 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.DeploymentManager/serviceTopologies/{serviceTopologyName}/services/{serviceName}/serviceUnits/{serviceUnitName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceTopologyName}", System.Uri.EscapeDataString(serviceTopologyName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{serviceUnitName}", System.Uri.EscapeDataString(serviceUnitName)); + 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 CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + 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; + } + + /// + /// Creates or updates a service unit under the service in the service + /// topology. + /// + /// + /// This is an asynchronous operation and can be polled to completion using the + /// operation resource returned by this operation. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the service topology . + /// + /// + /// The name of the service resource. + /// + /// + /// The name of the service unit resource. + /// + /// + /// The service unit resource object. + /// + /// + /// 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 resourceGroupName, string serviceTopologyName, string serviceName, string serviceUnitName, ServiceUnitResource serviceUnitInfo, 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 (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (serviceTopologyName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceTopologyName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceUnitName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceUnitName"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (serviceUnitInfo == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceUnitInfo"); + } + if (serviceUnitInfo != null) + { + serviceUnitInfo.Validate(); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceTopologyName", serviceTopologyName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("serviceUnitName", serviceUnitName); + tracingParameters.Add("serviceUnitInfo", serviceUnitInfo); + 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.DeploymentManager/serviceTopologies/{serviceTopologyName}/services/{serviceName}/serviceUnits/{serviceUnitName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceTopologyName}", System.Uri.EscapeDataString(serviceTopologyName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{serviceUnitName}", System.Uri.EscapeDataString(serviceUnitName)); + 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(serviceUnitInfo != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(serviceUnitInfo, 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 != 201) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + 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 == 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); + } + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/ServiceUnitsOperationsExtensions.cs b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/ServiceUnitsOperationsExtensions.cs new file mode 100644 index 000000000000..f84d4c05b42e --- /dev/null +++ b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/ServiceUnitsOperationsExtensions.cs @@ -0,0 +1,262 @@ +// +// 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.DeploymentManager +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for ServiceUnitsOperations. + /// + public static partial class ServiceUnitsOperationsExtensions + { + /// + /// Creates or updates a service unit under the service in the service + /// topology. + /// + /// + /// This is an asynchronous operation and can be polled to completion using the + /// operation resource returned by this operation. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the service topology . + /// + /// + /// The name of the service resource. + /// + /// + /// The name of the service unit resource. + /// + /// + /// The service unit resource object. + /// + public static ServiceUnitResource CreateOrUpdate(this IServiceUnitsOperations operations, string resourceGroupName, string serviceTopologyName, string serviceName, string serviceUnitName, ServiceUnitResource serviceUnitInfo) + { + return operations.CreateOrUpdateAsync(resourceGroupName, serviceTopologyName, serviceName, serviceUnitName, serviceUnitInfo).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates a service unit under the service in the service + /// topology. + /// + /// + /// This is an asynchronous operation and can be polled to completion using the + /// operation resource returned by this operation. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the service topology . + /// + /// + /// The name of the service resource. + /// + /// + /// The name of the service unit resource. + /// + /// + /// The service unit resource object. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this IServiceUnitsOperations operations, string resourceGroupName, string serviceTopologyName, string serviceName, string serviceUnitName, ServiceUnitResource serviceUnitInfo, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serviceTopologyName, serviceName, serviceUnitName, serviceUnitInfo, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the service unit. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the service topology . + /// + /// + /// The name of the service resource. + /// + /// + /// The name of the service unit resource. + /// + public static ServiceUnitResource Get(this IServiceUnitsOperations operations, string resourceGroupName, string serviceTopologyName, string serviceName, string serviceUnitName) + { + return operations.GetAsync(resourceGroupName, serviceTopologyName, serviceName, serviceUnitName).GetAwaiter().GetResult(); + } + + /// + /// Gets the service unit. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the service topology . + /// + /// + /// The name of the service resource. + /// + /// + /// The name of the service unit resource. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IServiceUnitsOperations operations, string resourceGroupName, string serviceTopologyName, string serviceName, string serviceUnitName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serviceTopologyName, serviceName, serviceUnitName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes the service unit. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the service topology . + /// + /// + /// The name of the service resource. + /// + /// + /// The name of the service unit resource. + /// + public static void Delete(this IServiceUnitsOperations operations, string resourceGroupName, string serviceTopologyName, string serviceName, string serviceUnitName) + { + operations.DeleteAsync(resourceGroupName, serviceTopologyName, serviceName, serviceUnitName).GetAwaiter().GetResult(); + } + + /// + /// Deletes the service unit. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the service topology . + /// + /// + /// The name of the service resource. + /// + /// + /// The name of the service unit resource. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IServiceUnitsOperations operations, string resourceGroupName, string serviceTopologyName, string serviceName, string serviceUnitName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, serviceTopologyName, serviceName, serviceUnitName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Creates or updates a service unit under the service in the service + /// topology. + /// + /// + /// This is an asynchronous operation and can be polled to completion using the + /// operation resource returned by this operation. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the service topology . + /// + /// + /// The name of the service resource. + /// + /// + /// The name of the service unit resource. + /// + /// + /// The service unit resource object. + /// + public static ServiceUnitResource BeginCreateOrUpdate(this IServiceUnitsOperations operations, string resourceGroupName, string serviceTopologyName, string serviceName, string serviceUnitName, ServiceUnitResource serviceUnitInfo) + { + return operations.BeginCreateOrUpdateAsync(resourceGroupName, serviceTopologyName, serviceName, serviceUnitName, serviceUnitInfo).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates a service unit under the service in the service + /// topology. + /// + /// + /// This is an asynchronous operation and can be polled to completion using the + /// operation resource returned by this operation. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the service topology . + /// + /// + /// The name of the service resource. + /// + /// + /// The name of the service unit resource. + /// + /// + /// The service unit resource object. + /// + /// + /// The cancellation token. + /// + public static async Task BeginCreateOrUpdateAsync(this IServiceUnitsOperations operations, string resourceGroupName, string serviceTopologyName, string serviceName, string serviceUnitName, ServiceUnitResource serviceUnitInfo, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serviceTopologyName, serviceName, serviceUnitName, serviceUnitInfo, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/ServicesOperations.cs b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/ServicesOperations.cs new file mode 100644 index 000000000000..d885eda340ae --- /dev/null +++ b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/ServicesOperations.cs @@ -0,0 +1,714 @@ +// +// 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.DeploymentManager +{ + 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; + + /// + /// ServicesOperations operations. + /// + internal partial class ServicesOperations : IServiceOperations, IServicesOperations + { + /// + /// Initializes a new instance of the ServicesOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal ServicesOperations(AzureDeploymentManagerClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the AzureDeploymentManagerClient + /// + public AzureDeploymentManagerClient Client { get; private set; } + + /// + /// Creates or updates a service in the service topology. + /// + /// + /// Synchronously creates a new service or updates an existing service. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the service topology . + /// + /// + /// The name of the service resource. + /// + /// + /// The service object + /// + /// + /// 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 resourceGroupName, string serviceTopologyName, string serviceName, ServiceResource serviceInfo, 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 (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (serviceTopologyName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceTopologyName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (serviceInfo == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceInfo"); + } + if (serviceInfo != null) + { + serviceInfo.Validate(); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceTopologyName", serviceTopologyName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("serviceInfo", serviceInfo); + 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.DeploymentManager/serviceTopologies/{serviceTopologyName}/services/{serviceName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceTopologyName}", System.Uri.EscapeDataString(serviceTopologyName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + 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(serviceInfo != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(serviceInfo, 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 != 201) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + 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 == 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; + } + + /// + /// Gets the service. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the service topology . + /// + /// + /// The name of the service resource. + /// + /// + /// 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 serviceTopologyName, string serviceName, 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 (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (serviceTopologyName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceTopologyName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + 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("serviceTopologyName", serviceTopologyName); + tracingParameters.Add("serviceName", serviceName); + 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.DeploymentManager/serviceTopologies/{serviceTopologyName}/services/{serviceName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceTopologyName}", System.Uri.EscapeDataString(serviceTopologyName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + 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 CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + 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; + } + + /// + /// Deletes the service. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the service topology . + /// + /// + /// The name of the service resource. + /// + /// + /// 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 serviceTopologyName, string serviceName, 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 (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (serviceTopologyName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceTopologyName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + 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("serviceTopologyName", serviceTopologyName); + tracingParameters.Add("serviceName", serviceName); + 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.DeploymentManager/serviceTopologies/{serviceTopologyName}/services/{serviceName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceTopologyName}", System.Uri.EscapeDataString(serviceTopologyName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + 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 CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + 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; + } + + } +} diff --git a/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/ServicesOperationsExtensions.cs b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/ServicesOperationsExtensions.cs new file mode 100644 index 000000000000..f12ca1a12076 --- /dev/null +++ b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/ServicesOperationsExtensions.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.DeploymentManager +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for ServicesOperations. + /// + public static partial class ServicesOperationsExtensions + { + /// + /// Creates or updates a service in the service topology. + /// + /// + /// Synchronously creates a new service or updates an existing service. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the service topology . + /// + /// + /// The name of the service resource. + /// + /// + /// The service object + /// + public static ServiceResource CreateOrUpdate(this IServicesOperations operations, string resourceGroupName, string serviceTopologyName, string serviceName, ServiceResource serviceInfo) + { + return operations.CreateOrUpdateAsync(resourceGroupName, serviceTopologyName, serviceName, serviceInfo).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates a service in the service topology. + /// + /// + /// Synchronously creates a new service or updates an existing service. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the service topology . + /// + /// + /// The name of the service resource. + /// + /// + /// The service object + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this IServicesOperations operations, string resourceGroupName, string serviceTopologyName, string serviceName, ServiceResource serviceInfo, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serviceTopologyName, serviceName, serviceInfo, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the service. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the service topology . + /// + /// + /// The name of the service resource. + /// + public static ServiceResource Get(this IServicesOperations operations, string resourceGroupName, string serviceTopologyName, string serviceName) + { + return operations.GetAsync(resourceGroupName, serviceTopologyName, serviceName).GetAwaiter().GetResult(); + } + + /// + /// Gets the service. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the service topology . + /// + /// + /// The name of the service resource. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IServicesOperations operations, string resourceGroupName, string serviceTopologyName, string serviceName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serviceTopologyName, serviceName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes the service. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the service topology . + /// + /// + /// The name of the service resource. + /// + public static void Delete(this IServicesOperations operations, string resourceGroupName, string serviceTopologyName, string serviceName) + { + operations.DeleteAsync(resourceGroupName, serviceTopologyName, serviceName).GetAwaiter().GetResult(); + } + + /// + /// Deletes the service. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the service topology . + /// + /// + /// The name of the service resource. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IServicesOperations operations, string resourceGroupName, string serviceTopologyName, string serviceName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, serviceTopologyName, serviceName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + } +} diff --git a/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/StepsOperations.cs b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/StepsOperations.cs new file mode 100644 index 000000000000..d45038c460f0 --- /dev/null +++ b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/StepsOperations.cs @@ -0,0 +1,683 @@ +// +// 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.DeploymentManager +{ + 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; + + /// + /// StepsOperations operations. + /// + internal partial class StepsOperations : IServiceOperations, IStepsOperations + { + /// + /// Initializes a new instance of the StepsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal StepsOperations(AzureDeploymentManagerClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the AzureDeploymentManagerClient + /// + public AzureDeploymentManagerClient Client { get; private set; } + + /// + /// Creates or updates a rollout step with the given step properties. + /// + /// + /// Synchronously creates a new step or updates an existing step. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the deployment step. + /// + /// + /// The step object. + /// + /// + /// 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 resourceGroupName, string stepName, StepResource stepInfo = default(StepResource), 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 (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (stepName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "stepName"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (stepInfo != null) + { + stepInfo.Validate(); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("stepName", stepName); + tracingParameters.Add("stepInfo", stepInfo); + 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.DeploymentManager/steps/{stepName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{stepName}", System.Uri.EscapeDataString(stepName)); + 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(stepInfo != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(stepInfo, 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 != 201) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + 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 == 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; + } + + /// + /// Gets the step. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the deployment step. + /// + /// + /// 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 stepName, 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 (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (stepName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "stepName"); + } + 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("stepName", stepName); + 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.DeploymentManager/steps/{stepName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{stepName}", System.Uri.EscapeDataString(stepName)); + 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 CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + 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; + } + + /// + /// Deletes the step. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the deployment step. + /// + /// + /// 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 stepName, 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 (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (stepName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "stepName"); + } + 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("stepName", stepName); + 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.DeploymentManager/steps/{stepName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{stepName}", System.Uri.EscapeDataString(stepName)); + 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 CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + 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; + } + + } +} diff --git a/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/StepsOperationsExtensions.cs b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/StepsOperationsExtensions.cs new file mode 100644 index 000000000000..cafa225ed5d3 --- /dev/null +++ b/src/SDKs/DeploymentManager/Management.DeploymentManager/Generated/StepsOperationsExtensions.cs @@ -0,0 +1,154 @@ +// +// 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.DeploymentManager +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for StepsOperations. + /// + public static partial class StepsOperationsExtensions + { + /// + /// Creates or updates a rollout step with the given step properties. + /// + /// + /// Synchronously creates a new step or updates an existing step. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the deployment step. + /// + /// + /// The step object. + /// + public static StepResource CreateOrUpdate(this IStepsOperations operations, string resourceGroupName, string stepName, StepResource stepInfo = default(StepResource)) + { + return operations.CreateOrUpdateAsync(resourceGroupName, stepName, stepInfo).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates a rollout step with the given step properties. + /// + /// + /// Synchronously creates a new step or updates an existing step. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the deployment step. + /// + /// + /// The step object. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this IStepsOperations operations, string resourceGroupName, string stepName, StepResource stepInfo = default(StepResource), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, stepName, stepInfo, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the step. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the deployment step. + /// + public static StepResource Get(this IStepsOperations operations, string resourceGroupName, string stepName) + { + return operations.GetAsync(resourceGroupName, stepName).GetAwaiter().GetResult(); + } + + /// + /// Gets the step. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the deployment step. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IStepsOperations operations, string resourceGroupName, string stepName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, stepName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes the step. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the deployment step. + /// + public static void Delete(this IStepsOperations operations, string resourceGroupName, string stepName) + { + operations.DeleteAsync(resourceGroupName, stepName).GetAwaiter().GetResult(); + } + + /// + /// Deletes the step. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the deployment step. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IStepsOperations operations, string resourceGroupName, string stepName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, stepName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + } +} diff --git a/src/SDKs/DeploymentManager/Management.DeploymentManager/Microsoft.Azure.Management.DeploymentManager.csproj b/src/SDKs/DeploymentManager/Management.DeploymentManager/Microsoft.Azure.Management.DeploymentManager.csproj new file mode 100644 index 000000000000..e2706ccf881e --- /dev/null +++ b/src/SDKs/DeploymentManager/Management.DeploymentManager/Microsoft.Azure.Management.DeploymentManager.csproj @@ -0,0 +1,26 @@ + + + + + + + Microsoft.Azure.Management.DeploymentManager + Provides Deployment Manager management capabilities for Microsoft Azure. + 0.9.0-preview + Microsoft.Azure.Management.DeploymentManager + Microsoft Azure Deployment Manager;Deployment Manager; + + + + + + + $(SdkTargetFx) + + + + + + \ No newline at end of file diff --git a/src/SDKs/DeploymentManager/Management.DeploymentManager/Properties/AssemblyInfo.cs b/src/SDKs/DeploymentManager/Management.DeploymentManager/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..e301487b288d --- /dev/null +++ b/src/SDKs/DeploymentManager/Management.DeploymentManager/Properties/AssemblyInfo.cs @@ -0,0 +1,20 @@ +// 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; +using System.Runtime.InteropServices; + +[assembly: AssemblyTitle("Microsoft Azure Deployment Manager Management Library")] +[assembly: AssemblyDescription("Provides Microsoft Azure Deployment Manager management operations.")] + +[assembly: AssemblyVersion("0.9.0.0")] +[assembly: AssemblyFileVersion("0.9.0.0")] + +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("Microsoft Azure .NET SDK")] +[assembly: AssemblyCopyright("Copyright (c) Microsoft Corporation")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] +[assembly: NeutralResourcesLanguage("en")] diff --git a/src/SDKs/DeploymentManager/Management.DeploymentManager/generate.ps1 b/src/SDKs/DeploymentManager/Management.DeploymentManager/generate.ps1 new file mode 100644 index 000000000000..1c0935867a98 --- /dev/null +++ b/src/SDKs/DeploymentManager/Management.DeploymentManager/generate.ps1 @@ -0,0 +1 @@ +Start-AutoRestCodeGeneration -ResourceProvider "deploymentmanager/resource-manager" -AutoRestVersion "latest" \ No newline at end of file diff --git a/src/SDKs/DeploymentManager/ReleaseNotes.md b/src/SDKs/DeploymentManager/ReleaseNotes.md new file mode 100644 index 000000000000..a9eed23cc319 --- /dev/null +++ b/src/SDKs/DeploymentManager/ReleaseNotes.md @@ -0,0 +1,4 @@ +Below is a summary of the changes in the most recent release of Microsoft.Azure.Management.DeploymentManager. + +## v0.9.0-Preview +Add support for creating and managing rollouts and other supporting scenarios. \ No newline at end of file diff --git a/src/SDKs/_metadata/deploymentmanager_resource-manager.txt b/src/SDKs/_metadata/deploymentmanager_resource-manager.txt new file mode 100644 index 000000000000..f8d35c2d4677 --- /dev/null +++ b/src/SDKs/_metadata/deploymentmanager_resource-manager.txt @@ -0,0 +1,14 @@ +Installing AutoRest version: latest +AutoRest installed successfully. +Commencing code generation +Generating CSharp code +Executing AutoRest command +cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/deploymentmanager/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=E:\repos\azure-sdk-for-net\src\SDKs +2019-04-08 20:28:33 UTC +Azure-rest-api-specs repository information +GitHub fork: Azure +Branch: master +Commit: 67d6bf5c72fb183114938332e72f5d8d995f9979 +AutoRest information +Requested version: latest +Bootstrapper version: autorest@2.0.4283